diff --git a/frontend/sgClaw验证/index.html b/frontend/sgClaw验证/index.html
index f6eb513..523703f 100644
--- a/frontend/sgClaw验证/index.html
+++ b/frontend/sgClaw验证/index.html
@@ -3,908 +3,1060 @@
+
+ SG Claw Chat
+
+
+ 就绪
+
+
-
-
-
-
-
sgClaw 验证系统加载中...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
注意:聊天数据仅保存在本地浏览器,不会上传到服务器。
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
{{ stat.value }}
-
{{ stat.label }}
-
-
-
-
-
-
-
-
-
-
-
-
-
Side Panel UI
-
Vue 2.6 + Element UI
-
-
-
-
-
-
-
-
SuperRPA Browser
-
C++ Chromium
-
- CommandRouter ·
- MAC Check ·
- PipeListener
-
-
-
-
-
-
-
-
STDIO Pipe (JSON Line)
-
-
-
-
sgClaw Agent
-
Rust / ZeroClaw
-
- ReAct Loop ·
- BrowserPipeTool
-
-
-
-
-
-
-
-
-
LLM 服务
-
Claude / GPT / 本地
-
-
-
-
-
-
-
-
-
-
-
-
- 验证 sgClaw 在互联网可达环境下的外部服务连通性,包括 LLM API 调用、模型推理能力、
- Tool-use 协议兼容性等。适用于开发环境和具备外网访问的部署环境。
-
-
-
-
-
-
- {{ row.category }}
- {{ row.name }}
-
-
-
-
-
-
-
-
-
- {{ statusLabel(row.status) }}
-
-
-
-
-
- {{ row.duration }}ms
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 验证 sgClaw 在隔离内网环境(银河麒麟 V10 / 政企内网)下的核心能力,
- 不依赖外网。包括 Pipe 通信、MAC 安全策略、Skill 加载、BrowserAction 执行、本地模型推理等。
-
-
-
-
-
-
- {{ row.category }}
- {{ row.name }}
-
-
-
-
-
-
-
-
-
- {{ statusLabel(row.status) }}
-
-
-
-
-
- {{ row.duration }}ms
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 模拟真实用户场景,从自然语言指令到任务完成的全链路验证。覆盖主要业务系统的典型操作。
-
-
-
-
-
-
-
{{ si + 1 }}
-
- {{ step.action }}
- {{ step.target }}
-
-
-
- {{ step.duration }}ms
-
-
-
-
- 总步数: {{ s.metrics.steps }}
-
- 总耗时: {{ s.metrics.totalMs }}ms
-
- Token: {{ s.metrics.tokens }}
-
-
-
-
-
-
-
-
-
-
-
{{ p.label }}
-
-
- {{ p.actual }}
- 目标: {{ p.target }}
-
-
-
-
-
-
-
- {{ detailDialog.content }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ function clearChat() {
+ if (!window.confirm('确定清空当前聊天记录吗?')) return
+ state.messages = [
+ {
+ role: 'assistant',
+ content: '记录已清空。请继续输入你的新问题。',
+ time: Date.now(),
+ status: 'done'
+ }
+ ]
+ saveMessages()
+ render()
+ }
+
+ function bindEvents() {
+ els.provider.addEventListener('change', function (e) {
+ state.provider = e.target.value
+ updateForm()
+ })
+
+ els.endpoint.addEventListener('change', function (e) {
+ if (state.provider === 'openai') {
+ state.openai.endpoint = e.target.value
+ } else if (state.provider === 'claude') {
+ state.claude.endpoint = e.target.value
+ }
+ state.endpoint = e.target.value
+ saveConfig()
+ })
+
+ els.model.addEventListener('change', function (e) {
+ if (state.provider === 'openai') {
+ state.openai.model = e.target.value
+ } else if (state.provider === 'claude') {
+ state.claude.model = e.target.value
+ }
+ state.model = e.target.value
+ updateForm()
+ })
+
+ els.apiKey.addEventListener('change', function (e) {
+ if (state.provider === 'openai') {
+ state.openai.key = e.target.value.trim()
+ } else if (state.provider === 'claude') {
+ state.claude.key = e.target.value.trim()
+ }
+ state.apiKey = e.target.value.trim()
+ saveConfig()
+ setError('')
+ updateForm()
+ })
+
+ els.sendMsgBtn.addEventListener('click', sendMessage)
+ els.sendBtn.addEventListener('click', function () {
+ els.userInput.focus()
+ })
+
+ els.exportBtn.addEventListener('click', exportChat)
+ els.clearBtn.addEventListener('click', clearChat)
+
+ els.userInput.addEventListener('input', function () {
+ setError('')
+ els.userInput.style.height = 'auto'
+ els.userInput.style.height = Math.min(150, els.userInput.scrollHeight) + 'px'
+ })
+
+ els.userInput.addEventListener('keydown', function (e) {
+ if (e.key === 'Enter' && !e.shiftKey) {
+ e.preventDefault()
+ sendMessage()
+ }
+ })
+
+ var quickButtons = document.querySelectorAll('.quick-grid .chip')
+ quickButtons.forEach(function (btn) {
+ btn.addEventListener('click', function () {
+ if (state.busy) return
+ els.userInput.value = btn.dataset.prompt
+ els.userInput.focus()
+ sendMessage()
+ })
+ })
+ }
+
+ loadPersistedState()
+ bindEvents()
+ updateForm()
+ render()
+ els.userInput.focus()
+ })()
+