frontend: replace sgClaw verification page with chat UI
This commit is contained in:
30
frontend/sgClaw验证/superrpa_migration/README.md
Normal file
30
frontend/sgClaw验证/superrpa_migration/README.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# sgClaw 聊天界面:SuperRPA 迁移稿
|
||||
|
||||
该目录用于在当前仓库先验证新聊天页面,再手动迁移到:
|
||||
`/home/zyl/projects/superRpa/src/chrome/browser/resources/superrpa/devtools/functions/sgclaw-chat/`
|
||||
|
||||
## 可直接迁移文件
|
||||
|
||||
- `sgclaw-chat.ts`:新的 Lit 组件版聊天页(对应 `sgclaw-chat` Function 的主实现)。
|
||||
|
||||
## 迁移步骤(建议)
|
||||
|
||||
1. 备份原文件:
|
||||
- `cp /home/zyl/projects/superRpa/src/chrome/browser/resources/superrpa/devtools/functions/sgclaw-chat/sgclaw-chat.ts /tmp/sgclaw-chat-backup.ts`
|
||||
|
||||
2. 复制新文件:
|
||||
- `cp frontend/sgClaw验证/superrpa_migration/sgclaw-chat.ts /home/zyl/projects/superRpa/src/chrome/browser/resources/superrpa/devtools/functions/sgclaw-chat/sgclaw-chat.ts`
|
||||
|
||||
3. (可选)保留兼容:
|
||||
- 现有 `sgclaw-chat.html.ts` 与 `sgclaw-chat.css.ts` 仍是占位导出,不影响本组件内联模板;
|
||||
- 如有项目 lint/格式规范要求,可再拆分为独立 html.ts/css.ts。
|
||||
|
||||
4. 重新加载 Functions 页面验证:访问对应的 `sgclaw-chat` 功能入口。
|
||||
|
||||
## 注意
|
||||
|
||||
- 当前版本保留 localStorage 键:
|
||||
- `sgclaw-chat-ui-v1`
|
||||
- `sgclaw-chat-messages-v1`
|
||||
- 未检测到 API Key 时会自动降级到 mock 回答。
|
||||
- 已支持 OpenAI / Claude / mock 三种模式。
|
||||
1140
frontend/sgClaw验证/superrpa_migration/sgclaw-chat.ts
Normal file
1140
frontend/sgClaw验证/superrpa_migration/sgclaw-chat.ts
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user