ai-helper-agent 2.3.1 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +13 -3
  2. package/dist/assets/__vite-browser-external-CM3Eme-n.js +1 -0
  3. package/dist/assets/agent-store-Ce3f4Ya3.js +1 -0
  4. package/dist/assets/background.js +104 -80
  5. package/dist/assets/chat-export-CWSUeOo4.js +37 -0
  6. package/dist/assets/chunk-CMxvf4Kt.js +1 -0
  7. package/dist/assets/content.js +159 -156
  8. package/dist/assets/{dist-BQOFgIxk.js → dist-DhUTa_WT.js} +5 -6
  9. package/dist/assets/dist-LQPh1k0y.js +24 -0
  10. package/dist/assets/i18n-ouMgDZ2t.js +49 -0
  11. package/dist/assets/jszip.min-Bm_16osY.js +2 -0
  12. package/dist/assets/lib-33nIefF6.js +220 -0
  13. package/dist/assets/{marked.min.js-08SGy6CO.js → marked.min.js-D2rXgLAQ.js} +7 -8
  14. package/dist/assets/{marked.min.js-loader-4kRZ9iCP.js → marked.min.js-loader-tKH5SQVQ.js} +1 -1
  15. package/dist/assets/model-profiles-6dzdrSS4.js +24 -0
  16. package/dist/assets/network-scope-CNRYXk74.js +1 -0
  17. package/dist/assets/options-Cp1UMkjK.css +1 -0
  18. package/dist/assets/options.js +108 -102
  19. package/dist/assets/{page-snapshot-renderer-CVL6r6Kf.js → page-snapshot-renderer-j72q92KH.js} +2 -3
  20. package/dist/assets/pdf-DnVqBaAN.js +6 -0
  21. package/dist/assets/session-store-CmGs_rhh.js +76 -0
  22. package/dist/assets/side_panel.css +1 -1
  23. package/dist/assets/side_panel.js +958 -1124
  24. package/dist/assets/theme-BRAX5X2F.css +1 -0
  25. package/dist/assets/{modulepreload-polyfill-P2Xu9kJm.js → theme-CLwYsx9o.js} +1 -1
  26. package/dist/assets/utils-9i9g8vW8.js +112 -0
  27. package/dist/assets/version-BrT5Y9A7.js +1 -0
  28. package/dist/assets/xlsx-DGkz7cnk.js +105 -0
  29. package/dist/manifest.json +2 -5
  30. package/dist/offscreen/offscreen.js +7 -7
  31. package/dist/options.html +151 -75
  32. package/dist/side_panel.html +167 -137
  33. package/package.json +1 -1
  34. package/src/config.js +3 -2
  35. package/src/executor.js +99 -18
  36. package/src/locales/en.json +16 -2
  37. package/src/locales/zh.json +16 -2
  38. package/src/memory/injection.js +12 -2
  39. package/src/memory/routes.js +6 -0
  40. package/src/memory/service.js +57 -2
  41. package/src/rag/manager.js +1 -1
  42. package/src/rag/url-guard.js +27 -12
  43. package/src/security.js +433 -31
  44. package/src/server.js +28 -8
  45. package/dist/assets/agent-store-DcAs6YyA.js +0 -2
  46. package/dist/assets/agent-store-DcAs6YyA.js.map +0 -1
  47. package/dist/assets/background.js.map +0 -1
  48. package/dist/assets/dist-BQOFgIxk.js.map +0 -1
  49. package/dist/assets/i18n-C4jSRoCH.js +0 -50
  50. package/dist/assets/i18n-C4jSRoCH.js.map +0 -1
  51. package/dist/assets/jszip.min-BXqW2-9v.js +0 -3
  52. package/dist/assets/jszip.min-BXqW2-9v.js.map +0 -1
  53. package/dist/assets/lib-Bi7BFuND.js +0 -221
  54. package/dist/assets/lib-Bi7BFuND.js.map +0 -1
  55. package/dist/assets/marked.min.js-08SGy6CO.js.map +0 -1
  56. package/dist/assets/model-profiles-Dl_MsXWa.js +0 -25
  57. package/dist/assets/model-profiles-Dl_MsXWa.js.map +0 -1
  58. package/dist/assets/options-8-nu3P5K.css +0 -1
  59. package/dist/assets/options.js.map +0 -1
  60. package/dist/assets/page-snapshot-renderer-CVL6r6Kf.js.map +0 -1
  61. package/dist/assets/pdf-HiJ0icvU.js +0 -7
  62. package/dist/assets/pdf-HiJ0icvU.js.map +0 -1
  63. package/dist/assets/rolldown-runtime-C0FnF6B9.js +0 -1
  64. package/dist/assets/session-store-CzVQCgQ_.js +0 -77
  65. package/dist/assets/session-store-CzVQCgQ_.js.map +0 -1
  66. package/dist/assets/side_panel.js.map +0 -1
  67. package/dist/assets/version-CNG2KGnJ.js +0 -2
  68. package/dist/assets/version-CNG2KGnJ.js.map +0 -1
  69. package/dist/assets/xlsx-BHKh7vjA.js +0 -106
  70. package/dist/assets/xlsx-BHKh7vjA.js.map +0 -1
  71. package/dist/icons/badges/license-MIT.svg +0 -21
  72. package/dist/icons/badges/platform.svg +0 -21
  73. package/dist/icons/badges/prs-welcome.svg +0 -21
  74. package/dist/icons/badges/version.svg +0 -21
@@ -4,14 +4,16 @@
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title data-i18n="header.docTitle">AI Helper - 模型问答</title>
7
- <script type="module" crossorigin src="/assets/rolldown-runtime-C0FnF6B9.js"></script>
8
- <script type="module" crossorigin src="/assets/i18n-C4jSRoCH.js"></script>
9
- <script type="module" crossorigin src="/assets/model-profiles-Dl_MsXWa.js"></script>
10
- <script type="module" crossorigin src="/assets/session-store-CzVQCgQ_.js"></script>
11
- <script type="module" crossorigin src="/assets/agent-store-DcAs6YyA.js"></script>
12
- <script type="module" crossorigin src="/assets/version-CNG2KGnJ.js"></script>
7
+ <script type="module" crossorigin src="/assets/theme-CLwYsx9o.js"></script>
8
+ <script type="module" crossorigin src="/assets/chunk-CMxvf4Kt.js"></script>
9
+ <script type="module" crossorigin src="/assets/i18n-ouMgDZ2t.js"></script>
10
+ <script type="module" crossorigin src="/assets/session-store-CmGs_rhh.js"></script>
11
+ <script type="module" crossorigin src="/assets/model-profiles-6dzdrSS4.js"></script>
12
+ <script type="module" crossorigin src="/assets/version-BrT5Y9A7.js"></script>
13
+ <script type="module" crossorigin src="/assets/agent-store-Ce3f4Ya3.js"></script>
14
+ <script type="module" crossorigin src="/assets/utils-9i9g8vW8.js"></script>
13
15
  <script type="module" crossorigin src="/assets/side_panel.js"></script>
14
- <script type="module" crossorigin src="/assets/modulepreload-polyfill-P2Xu9kJm.js"></script>
16
+ <link rel="stylesheet" crossorigin href="/assets/theme-BRAX5X2F.css">
15
17
  <link rel="stylesheet" crossorigin href="/assets/side_panel.css">
16
18
  </head>
17
19
  <body>
@@ -118,6 +120,28 @@
118
120
  </svg>
119
121
  <span data-i18n="header.shortcuts">查看快捷键</span>
120
122
  </button>
123
+ <button class="header-dropdown-item header-dropdown-parent" id="themeToggleBtn" aria-haspopup="true" aria-expanded="false" title="选择主题">
124
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
125
+ <circle cx="12" cy="12" r="9"/>
126
+ <path d="M12 3a9 9 0 000 18z" fill="currentColor" stroke="none"/>
127
+ </svg>
128
+ <span id="themeToggleLabel">主题</span>
129
+ <svg class="submenu-chevron" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>
130
+ </button>
131
+ <div class="theme-submenu" id="themeSubmenu">
132
+ <button class="theme-submenu-item" data-theme-value="system">
133
+ <span data-i18n="settings.themeSystem">跟随系统</span>
134
+ <svg class="theme-submenu-check" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6L9 17l-5-5"/></svg>
135
+ </button>
136
+ <button class="theme-submenu-item" data-theme-value="light">
137
+ <span data-i18n="settings.themeLight">亮色</span>
138
+ <svg class="theme-submenu-check" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6L9 17l-5-5"/></svg>
139
+ </button>
140
+ <button class="theme-submenu-item" data-theme-value="dark">
141
+ <span data-i18n="settings.themeDark">暗色</span>
142
+ <svg class="theme-submenu-check" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6L9 17l-5-5"/></svg>
143
+ </button>
144
+ </div>
121
145
  <button class="header-dropdown-item" id="versionInfoBtn">
122
146
  <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
123
147
  <circle cx="12" cy="12" r="10"/>
@@ -208,22 +232,22 @@
208
232
  </div>
209
233
  </div>
210
234
 
211
- <!-- 消息跳转按钮(上一条/下一条,默认收起为左侧窄条,鼠标移入展开) -->
212
- <div class="chat-nav-hotzone" id="chatNavHotzone" title="消息跳转"></div>
235
+ <!-- 消息跳转把手(上一个/下一个问题 + 问题列表;悬停展开,点击钉住) -->
236
+ <div class="chat-nav-hotzone" id="chatNavHotzone" role="button" tabindex="0" aria-pressed="false" data-i18n-title="chat.navHotzoneTitle" data-i18n-aria-label="chat.navHotzoneTitle"></div>
213
237
  <div class="chat-nav-buttons" id="chatNavButtons">
214
- <button class="chat-nav-btn" id="chatNavUp" data-i18n-title="chat.navPrevTitle" title="上一条消息 (Alt+↑),Ctrl/Cmd+点击回到最顶端">
238
+ <button class="chat-nav-btn" id="chatNavUp" data-i18n-title="chat.navPrevTitle" title="上一个问题 (Alt+↑),Ctrl/Cmd+点击回到最顶端">
215
239
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
216
240
  <polyline points="18 15 12 9 6 15"/>
217
241
  </svg>
218
242
  </button>
219
- <button class="chat-nav-btn" id="chatNavDown" data-i18n-title="chat.navNextTitle" title="下一条消息 (Alt+↓),Ctrl/Cmd+点击跳到底端">
243
+ <button class="chat-nav-btn" id="chatNavDown" data-i18n-title="chat.navNextTitle" title="下一个问题 (Alt+↓),Ctrl/Cmd+点击跳到底端">
220
244
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
221
245
  <polyline points="6 9 12 15 18 9"/>
222
246
  </svg>
223
247
  </button>
224
248
  </div>
225
249
 
226
- <!-- 用户问题列表:鼠标悬停消息跳转热区时右侧展开(半透明) -->
250
+ <!-- 用户问题列表:悬停消息跳转把手时右侧展开,按问答组编号,可钉住 -->
227
251
  <div class="chat-nav-question-panel" id="chatNavQuestionPanel"></div>
228
252
 
229
253
  <!-- Toast 提示容器 -->
@@ -233,77 +257,77 @@
233
257
  <div class="modal-overlay" id="toolsPopupOverlay">
234
258
  <div class="modal-container" style="max-width: 520px; width: 90%; height: 520px; display: flex; flex-direction: column;">
235
259
  <button class="prompt-modal-close" id="toolsPopupClose" data-i18n-title="common.close" title="关闭">×</button>
236
- <button id="toolStatsBtn" data-i18n-title="toolStats.btnTitle" title="工具使用统计" style="position: absolute; top: 12px; right: 45px; width: 28px; height: 28px; border: none; border-radius: 6px; background: transparent; color: #888; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s;">📊</button>
260
+ <button id="toolStatsBtn" data-i18n-title="toolStats.btnTitle" title="工具使用统计" style="position: absolute; top: 12px; right: 45px; width: 28px; height: 28px; border: none; border-radius: 6px; background: transparent; color: var(--text-tertiary); font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s;">📊</button>
237
261
  <div class="modal-title" data-i18n="toolPanel.title">工具配置</div>
238
262
  <div style="margin-bottom: 12px; position: relative;">
239
- <input type="text" id="toolsSearchInput" data-i18n-placeholder="toolPanel.searchPlaceholder" placeholder="搜索工具名称或描述..." style="width: 100%; padding: 10px 36px 10px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; outline: none; box-sizing: border-box;">
240
- <button type="button" id="toolsSearchClear" style="position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: none; background: transparent; color: #999; font-size: 16px; cursor: pointer; display: none; padding: 4px 6px; line-height: 1; border-radius: 50%;" data-i18n-title="toolPanel.clearSearch" title="清除搜索">✕</button>
263
+ <input type="text" id="toolsSearchInput" data-i18n-placeholder="toolPanel.searchPlaceholder" placeholder="搜索工具名称或描述..." style="width: 100%; padding: 10px 36px 10px 14px; border: 1px solid var(--border-default); border-radius: 8px; font-size: 14px; outline: none; box-sizing: border-box;">
264
+ <button type="button" id="toolsSearchClear" style="position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: none; background: transparent; color: var(--text-tertiary); font-size: 16px; cursor: pointer; display: none; padding: 4px 6px; line-height: 1; border-radius: 50%;" data-i18n-title="toolPanel.clearSearch" title="清除搜索">✕</button>
241
265
  </div>
242
266
  <div style="display: flex; gap: 8px; margin-bottom: 12px;">
243
- <button type="button" class="category-btn category-all" data-category="all" style="padding: 6px 12px; border: none; border-radius: 16px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
267
+ <button type="button" class="category-btn category-all" data-category="all" style="padding: 6px 12px; border: none; border-radius: 16px; background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-accent) 100%); color: var(--text-on-brand); font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
244
268
  <span data-i18n="toolPanel.categoryAll">全部</span>
245
269
  <span class="category-badge" id="badge-all" style="margin-left: 4px; padding: 1px 5px; background: rgba(255,255,255,0.25); border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center;">0</span>
246
270
  </button>
247
271
  <div id="toolsCategories" style="flex: 1; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: thin;">
248
272
  <div style="display: inline-flex; gap: 8px; padding: 4px 0; width: max-content;">
249
- <button type="button" class="category-btn" data-category="page_interaction" style="padding: 6px 12px; border: 1px solid #ececec; border-radius: 16px; background: white; color: #555; font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
273
+ <button type="button" class="category-btn" data-category="page_interaction" style="padding: 6px 12px; border: 1px solid var(--border-subtle); border-radius: 16px; background: var(--bg-surface); color: var(--text-secondary); font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
250
274
  <span data-i18n="toolCategory.page_interaction">🖱️ 页面交互</span>
251
- <span class="category-badge" id="badge-page_interaction" style="margin-left: 4px; padding: 1px 5px; background: #fafafa; border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: #999;">0</span>
275
+ <span class="category-badge" id="badge-page_interaction" style="margin-left: 4px; padding: 1px 5px; background: var(--bg-subtle); border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: var(--text-tertiary);">0</span>
252
276
  </button>
253
- <button type="button" class="category-btn" data-category="form_operation" style="padding: 6px 12px; border: 1px solid #ececec; border-radius: 16px; background: white; color: #555; font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
277
+ <button type="button" class="category-btn" data-category="form_operation" style="padding: 6px 12px; border: 1px solid var(--border-subtle); border-radius: 16px; background: var(--bg-surface); color: var(--text-secondary); font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
254
278
  <span data-i18n="toolCategory.form_operation">📝 表单操作</span>
255
- <span class="category-badge" id="badge-form_operation" style="margin-left: 4px; padding: 1px 5px; background: #fafafa; border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: #999;">0</span>
279
+ <span class="category-badge" id="badge-form_operation" style="margin-left: 4px; padding: 1px 5px; background: var(--bg-subtle); border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: var(--text-tertiary);">0</span>
256
280
  </button>
257
- <button type="button" class="category-btn" data-category="content_extraction" style="padding: 6px 12px; border: 1px solid #ececec; border-radius: 16px; background: white; color: #555; font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
281
+ <button type="button" class="category-btn" data-category="content_extraction" style="padding: 6px 12px; border: 1px solid var(--border-subtle); border-radius: 16px; background: var(--bg-surface); color: var(--text-secondary); font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
258
282
  <span data-i18n="toolCategory.content_extraction">📄 内容提取</span>
259
- <span class="category-badge" id="badge-content_extraction" style="margin-left: 4px; padding: 1px 5px; background: #fafafa; border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: #999;">0</span>
283
+ <span class="category-badge" id="badge-content_extraction" style="margin-left: 4px; padding: 1px 5px; background: var(--bg-subtle); border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: var(--text-tertiary);">0</span>
260
284
  </button>
261
- <button type="button" class="category-btn" data-category="tab_management" style="padding: 6px 12px; border: 1px solid #ececec; border-radius: 16px; background: white; color: #555; font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
285
+ <button type="button" class="category-btn" data-category="tab_management" style="padding: 6px 12px; border: 1px solid var(--border-subtle); border-radius: 16px; background: var(--bg-surface); color: var(--text-secondary); font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
262
286
  <span data-i18n="toolCategory.tab_management">📑 标签页管理</span>
263
- <span class="category-badge" id="badge-tab_management" style="margin-left: 4px; padding: 1px 5px; background: #fafafa; border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: #999;">0</span>
287
+ <span class="category-badge" id="badge-tab_management" style="margin-left: 4px; padding: 1px 5px; background: var(--bg-subtle); border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: var(--text-tertiary);">0</span>
264
288
  </button>
265
- <button type="button" class="category-btn" data-category="bookmark_history" style="padding: 6px 12px; border: 1px solid #ececec; border-radius: 16px; background: white; color: #555; font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
289
+ <button type="button" class="category-btn" data-category="bookmark_history" style="padding: 6px 12px; border: 1px solid var(--border-subtle); border-radius: 16px; background: var(--bg-surface); color: var(--text-secondary); font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
266
290
  <span data-i18n="toolCategory.bookmark_history">🔖 书签历史</span>
267
- <span class="category-badge" id="badge-bookmark_history" style="margin-left: 4px; padding: 1px 5px; background: #fafafa; border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: #999;">0</span>
291
+ <span class="category-badge" id="badge-bookmark_history" style="margin-left: 4px; padding: 1px 5px; background: var(--bg-subtle); border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: var(--text-tertiary);">0</span>
268
292
  </button>
269
- <button type="button" class="category-btn" data-category="storage_management" style="padding: 6px 12px; border: 1px solid #ececec; border-radius: 16px; background: white; color: #555; font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
293
+ <button type="button" class="category-btn" data-category="storage_management" style="padding: 6px 12px; border: 1px solid var(--border-subtle); border-radius: 16px; background: var(--bg-surface); color: var(--text-secondary); font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
270
294
  <span data-i18n="toolCategory.storage_management">💾 存储管理</span>
271
- <span class="category-badge" id="badge-storage_management" style="margin-left: 4px; padding: 1px 5px; background: #fafafa; border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: #999;">0</span>
295
+ <span class="category-badge" id="badge-storage_management" style="margin-left: 4px; padding: 1px 5px; background: var(--bg-subtle); border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: var(--text-tertiary);">0</span>
272
296
  </button>
273
- <button type="button" class="category-btn" data-category="network_request" style="padding: 6px 12px; border: 1px solid #ececec; border-radius: 16px; background: white; color: #555; font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
297
+ <button type="button" class="category-btn" data-category="network_request" style="padding: 6px 12px; border: 1px solid var(--border-subtle); border-radius: 16px; background: var(--bg-surface); color: var(--text-secondary); font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
274
298
  <span data-i18n="toolCategory.network_request">🌐 网络请求</span>
275
- <span class="category-badge" id="badge-network_request" style="margin-left: 4px; padding: 1px 5px; background: #fafafa; border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: #999;">0</span>
299
+ <span class="category-badge" id="badge-network_request" style="margin-left: 4px; padding: 1px 5px; background: var(--bg-subtle); border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: var(--text-tertiary);">0</span>
276
300
  </button>
277
- <button type="button" class="category-btn" data-category="media_output" style="padding: 6px 12px; border: 1px solid #ececec; border-radius: 16px; background: white; color: #555; font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
301
+ <button type="button" class="category-btn" data-category="media_output" style="padding: 6px 12px; border: 1px solid var(--border-subtle); border-radius: 16px; background: var(--bg-surface); color: var(--text-secondary); font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
278
302
  <span data-i18n="toolCategory.media_output">📷 媒体与输出</span>
279
- <span class="category-badge" id="badge-media_output" style="margin-left: 4px; padding: 1px 5px; background: #fafafa; border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: #999;">0</span>
303
+ <span class="category-badge" id="badge-media_output" style="margin-left: 4px; padding: 1px 5px; background: var(--bg-subtle); border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: var(--text-tertiary);">0</span>
280
304
  </button>
281
- <button type="button" class="category-btn" data-category="debug_dev" style="padding: 6px 12px; border: 1px solid #ececec; border-radius: 16px; background: white; color: #555; font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
305
+ <button type="button" class="category-btn" data-category="debug_dev" style="padding: 6px 12px; border: 1px solid var(--border-subtle); border-radius: 16px; background: var(--bg-surface); color: var(--text-secondary); font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
282
306
  <span data-i18n="toolCategory.debug_dev">🔧 调试开发</span>
283
- <span class="category-badge" id="badge-debug_dev" style="margin-left: 4px; padding: 1px 5px; background: #fafafa; border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: #999;">0</span>
307
+ <span class="category-badge" id="badge-debug_dev" style="margin-left: 4px; padding: 1px 5px; background: var(--bg-subtle); border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: var(--text-tertiary);">0</span>
284
308
  </button>
285
- <button type="button" class="category-btn" data-category="ai_collaboration" style="padding: 6px 12px; border: 1px solid #ececec; border-radius: 16px; background: white; color: #555; font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
309
+ <button type="button" class="category-btn" data-category="ai_collaboration" style="padding: 6px 12px; border: 1px solid var(--border-subtle); border-radius: 16px; background: var(--bg-surface); color: var(--text-secondary); font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
286
310
  <span data-i18n="toolCategory.ai_collaboration">🤖 AI协作</span>
287
- <span class="category-badge" id="badge-ai_collaboration" style="margin-left: 4px; padding: 1px 5px; background: #fafafa; border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: #999;">0</span>
311
+ <span class="category-badge" id="badge-ai_collaboration" style="margin-left: 4px; padding: 1px 5px; background: var(--bg-subtle); border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: var(--text-tertiary);">0</span>
288
312
  </button>
289
- <button type="button" class="category-btn" data-category="local_agent" style="padding: 6px 12px; border: 1px solid #ececec; border-radius: 16px; background: white; color: #555; font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
313
+ <button type="button" class="category-btn" data-category="local_agent" style="padding: 6px 12px; border: 1px solid var(--border-subtle); border-radius: 16px; background: var(--bg-surface); color: var(--text-secondary); font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
290
314
  <span data-i18n="toolCategory.local_agent">🖥️ 代理</span>
291
- <span class="category-badge" id="badge-local_agent" style="margin-left: 4px; padding: 1px 5px; background: #fafafa; border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: #999;">0</span>
315
+ <span class="category-badge" id="badge-local_agent" style="margin-left: 4px; padding: 1px 5px; background: var(--bg-subtle); border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: var(--text-tertiary);">0</span>
292
316
  </button>
293
- <button type="button" class="category-btn" data-category="mcp" style="padding: 6px 12px; border: 1px solid #ececec; border-radius: 16px; background: white; color: #555; font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
317
+ <button type="button" class="category-btn" data-category="mcp" style="padding: 6px 12px; border: 1px solid var(--border-subtle); border-radius: 16px; background: var(--bg-surface); color: var(--text-secondary); font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
294
318
  <span data-i18n="toolCategory.mcp">🔌 MCP</span>
295
- <span class="category-badge" id="badge-mcp" style="margin-left: 4px; padding: 1px 5px; background: #fafafa; border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: #999;">0</span>
319
+ <span class="category-badge" id="badge-mcp" style="margin-left: 4px; padding: 1px 5px; background: var(--bg-subtle); border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: var(--text-tertiary);">0</span>
296
320
  </button>
297
- <button type="button" class="category-btn" data-category="knowledge" style="padding: 6px 12px; border: 1px solid #ececec; border-radius: 16px; background: white; color: #555; font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
321
+ <button type="button" class="category-btn" data-category="knowledge" style="padding: 6px 12px; border: 1px solid var(--border-subtle); border-radius: 16px; background: var(--bg-surface); color: var(--text-secondary); font-size: 13px; cursor: pointer; flex-shrink: 0; transition: all 0.2s ease;">
298
322
  <span data-i18n="toolCategory.knowledge">📚 知识库</span>
299
- <span class="category-badge" id="badge-knowledge" style="margin-left: 4px; padding: 1px 5px; background: #fafafa; border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: #999;">0</span>
323
+ <span class="category-badge" id="badge-knowledge" style="margin-left: 4px; padding: 1px 5px; background: var(--bg-subtle); border-radius: 10px; font-size: 11px; min-width: 18px; text-align: center; color: var(--text-tertiary);">0</span>
300
324
  </button>
301
325
  </div>
302
326
  </div>
303
327
  </div>
304
328
  <div style="display: flex; gap: 8px; margin-bottom: 12px;">
305
- <button type="button" id="toolsSelectAll" style="flex: 1; padding: 6px 12px; border: 1px solid #ddd; border-radius: 6px; background: white; color: #666; font-size: 13px; cursor: pointer; transition: all 0.2s ease;"><span data-i18n="common.selectAll">全选</span></button>
306
- <button type="button" id="toolsSelectNone" style="flex: 1; padding: 6px 12px; border: 1px solid #ddd; border-radius: 6px; background: white; color: #666; font-size: 13px; cursor: pointer; transition: all 0.2s ease;"><span data-i18n="common.deselectAll">取消全选</span></button>
329
+ <button type="button" id="toolsSelectAll" style="flex: 1; padding: 6px 12px; border: 1px solid var(--border-default); border-radius: 6px; background: var(--bg-surface); color: var(--text-secondary); font-size: 13px; cursor: pointer; transition: all 0.2s ease;"><span data-i18n="common.selectAll">全选</span></button>
330
+ <button type="button" id="toolsSelectNone" style="flex: 1; padding: 6px 12px; border: 1px solid var(--border-default); border-radius: 6px; background: var(--bg-surface); color: var(--text-secondary); font-size: 13px; cursor: pointer; transition: all 0.2s ease;"><span data-i18n="common.deselectAll">取消全选</span></button>
307
331
  </div>
308
332
  <div style="flex: 1; overflow-y: auto; margin-bottom: 16px;" id="toolsPopupList">
309
333
  <!-- 工具列表由 JS 动态生成 -->
@@ -313,17 +337,17 @@
313
337
  <label class="tool-preselect-toggle" id="toolsPreselectToggleLabel" data-i18n-title="toolPanel.preselectHint" title="开启:AI 先判断哪些工具可能用得上,只传相关工具。好处是 Token 省了,但万一判断不准,漏掉了关键工具,任务可能做不好&#10;关闭:全部启用的工具一次性给模型。没有判断开销,启动更快,但工具太多会浪费 Token">
314
338
  <input type="checkbox" id="toolsPreselectToggle" checked style="display: none;">
315
339
  <span class="toggle-switch"></span>
316
- <span id="toolsPreselectToggleText" style="font-size: 12px; color: #666;" data-i18n="toolPanel.preselect">工具预筛选</span>
340
+ <span id="toolsPreselectToggleText" style="font-size: 12px; color: var(--text-secondary);" data-i18n="toolPanel.preselect">工具预筛选</span>
317
341
  </label>
318
342
  <label class="tool-preselect-toggle" id="toolConfirmToggleLabel" data-i18n-title="toolPanel.confirmHint" title="启用后,当模型执行敏感操作(工具调用、命令执行等)时,会弹出确认框等待用户确认。&#10;关闭后,所有操作将直接放行执行,无需确认。">
319
343
  <input type="checkbox" id="toolConfirmToggle" checked style="display: none;">
320
344
  <span class="toggle-switch"></span>
321
- <span id="toolConfirmToggleText" style="font-size: 12px; color: #666;" data-i18n="react.toolConfirmation">敏感操作确认</span>
345
+ <span id="toolConfirmToggleText" style="font-size: 12px; color: var(--text-secondary);" data-i18n="react.toolConfirmation">敏感操作确认</span>
322
346
  </label>
323
347
  </div>
324
348
  <div class="modal-btns">
325
349
  <button class="modal-btn cancel" id="toolsPopupCancel" data-i18n="common.cancel">取消</button>
326
- <button class="modal-btn confirm" id="toolsPopupSave" style="background: #667eea;" data-i18n="common.save">保存</button>
350
+ <button class="modal-btn confirm" id="toolsPopupSave" style="background: var(--brand-gradient);" data-i18n="common.save">保存</button>
327
351
  </div>
328
352
  </div>
329
353
  </div>
@@ -333,34 +357,34 @@
333
357
  <div class="modal-overlay" id="toolStatsOverlay" style="display: none;">
334
358
  <div class="modal-container" style="max-width: 560px; width: 90%; height: 480px; display: flex; flex-direction: column;">
335
359
  <button class="prompt-modal-close" id="toolStatsClose" data-i18n-title="common.close" title="关闭">×</button>
336
- <button id="toolStatsRefreshBtn" data-i18n-title="common.refresh" title="刷新" style="position: absolute; top: 12px; right: 45px; width: 28px; height: 28px; border: none; border-radius: 6px; background: transparent; color: #888; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;">🔄</button>
360
+ <button id="toolStatsRefreshBtn" data-i18n-title="common.refresh" title="刷新" style="position: absolute; top: 12px; right: 45px; width: 28px; height: 28px; border: none; border-radius: 6px; background: transparent; color: var(--text-tertiary); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;">🔄</button>
337
361
  <div class="modal-title" data-i18n="toolStats.title">📊 工具使用统计</div>
338
362
  <div style="margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between;">
339
- <span style="font-size: 12px; color: #999;" data-i18n="toolStats.subtitle">各工具调用频率、成功率、平均耗时</span>
363
+ <span style="font-size: 12px; color: var(--text-tertiary);" data-i18n="toolStats.subtitle">各工具调用频率、成功率、平均耗时</span>
340
364
  <div>
341
- <span id="toolStatsSummary" style="font-size: 12px; color: #888; margin-right: 12px;"></span>
342
- <button id="toolStatsClearBtn" data-i18n-title="toolStats.clearTitle" data-i18n="common.clear" title="清空统计" style="padding: 2px 10px; border: 1px solid #ddd; border-radius: 4px; background: white; color: #e53e3e; font-size: 12px; cursor: pointer;">清空</button>
365
+ <span id="toolStatsSummary" style="font-size: 12px; color: var(--text-tertiary); margin-right: 12px;"></span>
366
+ <button id="toolStatsClearBtn" data-i18n-title="toolStats.clearTitle" data-i18n="common.clear" title="清空统计" style="padding: 2px 10px; border: 1px solid var(--border-default); border-radius: 4px; background: var(--bg-surface); color: var(--danger-500); font-size: 12px; cursor: pointer;">清空</button>
343
367
  </div>
344
368
  </div>
345
369
  <div style="flex: 1; overflow-y: auto;">
346
- <div id="toolStatsLoading" style="text-align: center; padding: 60px; color: #999;" data-i18n="common.loading">加载中...</div>
370
+ <div id="toolStatsLoading" style="text-align: center; padding: 60px; color: var(--text-tertiary);" data-i18n="common.loading">加载中...</div>
347
371
  <table id="toolStatsTable" style="display: none; width: 100%; border-collapse: collapse; font-size: 13px;">
348
372
  <thead>
349
- <tr style="position: sticky; top: 0; background: #f5f7fa; z-index: 1;">
350
- <th id="sortByName" data-sort="name" style="padding: 8px 10px; text-align: left; font-weight: 600; color: #555; border-bottom: 2px solid #e0e0e0; cursor: pointer; user-select: none; white-space: nowrap;"><span data-i18n="toolStats.usedTools">已使用工具</span> <span class="sort-indicator" style="font-size: 10px;"></span></th>
351
- <th id="sortByCallCount" data-sort="callCount" style="padding: 8px 10px; text-align: right; font-weight: 600; color: #555; border-bottom: 2px solid #e0e0e0; cursor: pointer; user-select: none; white-space: nowrap;"><span data-i18n="toolStats.calls">调用</span> <span class="sort-indicator" style="font-size: 10px;">▼</span></th>
352
- <th id="sortBySuccessCount" data-sort="successCount" style="padding: 8px 10px; text-align: right; font-weight: 600; color: #555; border-bottom: 2px solid #e0e0e0; cursor: pointer; user-select: none; white-space: nowrap;"><span data-i18n="toolStats.success">成功</span> <span class="sort-indicator" style="font-size: 10px;"></span></th>
353
- <th id="sortBySuccessRate" data-sort="successRate" style="padding: 8px 10px; text-align: left; font-weight: 600; color: #555; border-bottom: 2px solid #e0e0e0; cursor: pointer; user-select: none; white-space: nowrap;"><span data-i18n="toolStats.successRate">成功率</span> <span class="sort-indicator" style="font-size: 10px;"></span></th>
354
- <th id="sortByDuration" data-sort="duration" style="padding: 8px 10px; text-align: right; font-weight: 600; color: #555; border-bottom: 2px solid #e0e0e0; cursor: pointer; user-select: none; white-space: nowrap;"><span data-i18n="toolStats.avgDuration">平均耗时</span> <span class="sort-indicator" style="font-size: 10px;"></span></th>
373
+ <tr style="position: sticky; top: 0; background: var(--bg-subtle); z-index: 1;">
374
+ <th id="sortByName" data-sort="name" style="padding: 8px 10px; text-align: left; font-weight: 600; color: var(--text-secondary); border-bottom: 2px solid var(--border-default); cursor: pointer; user-select: none; white-space: nowrap;"><span data-i18n="toolStats.usedTools">已使用工具</span> <span class="sort-indicator" style="font-size: 10px;"></span></th>
375
+ <th id="sortByCallCount" data-sort="callCount" style="padding: 8px 10px; text-align: right; font-weight: 600; color: var(--text-secondary); border-bottom: 2px solid var(--border-default); cursor: pointer; user-select: none; white-space: nowrap;"><span data-i18n="toolStats.calls">调用</span> <span class="sort-indicator" style="font-size: 10px;">▼</span></th>
376
+ <th id="sortBySuccessCount" data-sort="successCount" style="padding: 8px 10px; text-align: right; font-weight: 600; color: var(--text-secondary); border-bottom: 2px solid var(--border-default); cursor: pointer; user-select: none; white-space: nowrap;"><span data-i18n="toolStats.success">成功</span> <span class="sort-indicator" style="font-size: 10px;"></span></th>
377
+ <th id="sortBySuccessRate" data-sort="successRate" style="padding: 8px 10px; text-align: left; font-weight: 600; color: var(--text-secondary); border-bottom: 2px solid var(--border-default); cursor: pointer; user-select: none; white-space: nowrap;"><span data-i18n="toolStats.successRate">成功率</span> <span class="sort-indicator" style="font-size: 10px;"></span></th>
378
+ <th id="sortByDuration" data-sort="duration" style="padding: 8px 10px; text-align: right; font-weight: 600; color: var(--text-secondary); border-bottom: 2px solid var(--border-default); cursor: pointer; user-select: none; white-space: nowrap;"><span data-i18n="toolStats.avgDuration">平均耗时</span> <span class="sort-indicator" style="font-size: 10px;"></span></th>
355
379
  </tr>
356
380
  </thead>
357
381
  <tbody id="toolStatsTableBody"></tbody>
358
382
  </table>
359
383
  <div id="toolStatsUnusedSection" style="display: none; margin-top: 16px;">
360
- <div style="font-size: 12px; font-weight: 600; color: #999; margin-bottom: 6px;" data-i18n="toolStats.unusedTools">未使用工具</div>
384
+ <div style="font-size: 12px; font-weight: 600; color: var(--text-tertiary); margin-bottom: 6px;" data-i18n="toolStats.unusedTools">未使用工具</div>
361
385
  <div id="toolStatsUnusedList" style="display: flex; flex-wrap: wrap; gap: 6px 4px;"></div>
362
386
  </div>
363
- <div id="toolStatsEmpty" style="display: none; text-align: center; padding: 60px; color: #999;" data-i18n="toolStats.noData">暂无统计数据</div>
387
+ <div id="toolStatsEmpty" style="display: none; text-align: center; padding: 60px; color: var(--text-tertiary);" data-i18n="toolStats.noData">暂无统计数据</div>
364
388
  </div>
365
389
  </div>
366
390
  </div>
@@ -369,63 +393,63 @@
369
393
  <div class="modal-overlay" id="tokenStatsOverlay" style="display: none;">
370
394
  <div class="modal-container" style="max-width: 520px; width: 90%; height: 540px; max-height: 90vh; display: flex; flex-direction: column;">
371
395
  <button class="prompt-modal-close" id="tokenStatsClose" data-i18n-title="common.close" title="关闭">×</button>
372
- <button id="tokenStatsRefreshBtn" data-i18n-title="common.refresh" title="刷新" style="position: absolute; top: 12px; right: 45px; width: 28px; height: 28px; border: none; border-radius: 6px; background: transparent; color: #888; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;">🔄</button>
396
+ <button id="tokenStatsRefreshBtn" data-i18n-title="common.refresh" title="刷新" style="position: absolute; top: 12px; right: 45px; width: 28px; height: 28px; border: none; border-radius: 6px; background: transparent; color: var(--text-tertiary); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;">🔄</button>
373
397
  <div class="modal-title" data-i18n="tokenStatsPanel.title">🪙 Token 使用统计</div>
374
398
  <div style="margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between;">
375
- <span style="font-size: 12px; color: #999;" data-i18n="tokenStatsPanel.subtitle">单次问答 ReAct 会话维度 & 总体维度</span>
376
- <button id="tokenStatsClearBtn" data-i18n-title="toolStats.clearTitle" data-i18n="common.clear" title="清空统计" style="padding: 2px 10px; border: 1px solid #ddd; border-radius: 4px; background: white; color: #e53e3e; font-size: 12px; cursor: pointer;">清空</button>
399
+ <span style="font-size: 12px; color: var(--text-tertiary);" data-i18n="tokenStatsPanel.subtitle">单次问答 ReAct 会话维度 & 总体维度</span>
400
+ <button id="tokenStatsClearBtn" data-i18n-title="toolStats.clearTitle" data-i18n="common.clear" title="清空统计" style="padding: 2px 10px; border: 1px solid var(--border-default); border-radius: 4px; background: var(--bg-surface); color: var(--danger-500); font-size: 12px; cursor: pointer;">清空</button>
377
401
  </div>
378
402
 
379
403
  <!-- 顶部固定卡片:3 个核心数字(所有 Tab 都显示) -->
380
404
  <div id="tokenStatsTopCards" style="display: none; margin-bottom: 12px;"></div>
381
405
 
382
406
  <!-- Tab 导航 -->
383
- <div id="tokenStatsTabNav" style="display: none; margin-bottom: 12px; border-bottom: 1px solid #e5e7eb; gap: 4px;">
384
- <button class="token-tab-btn active" data-tab="trend" data-i18n="tokenStatsPanel.tabTrend" style="padding: 6px 12px; border: none; border-bottom: 2px solid transparent; background: transparent; color: #666; font-size: 12px; cursor: pointer; transition: all 0.2s;">趋势</button>
385
- <button class="token-tab-btn" data-tab="distribution" data-i18n="tokenStatsPanel.tabDistribution" style="padding: 6px 12px; border: none; border-bottom: 2px solid transparent; background: transparent; color: #666; font-size: 12px; cursor: pointer; transition: all 0.2s;">分布</button>
386
- <button class="token-tab-btn" data-tab="global" data-i18n="tokenStatsPanel.tabGlobal" style="padding: 6px 12px; border: none; border-bottom: 2px solid transparent; background: transparent; color: #666; font-size: 12px; cursor: pointer; transition: all 0.2s;">全局</button>
407
+ <div id="tokenStatsTabNav" style="display: none; margin-bottom: 12px; border-bottom: 1px solid var(--border-default); gap: 4px;">
408
+ <button class="token-tab-btn active" data-tab="trend" data-i18n="tokenStatsPanel.tabTrend" style="padding: 6px 12px; border: none; border-bottom: 2px solid transparent; background: transparent; color: var(--text-secondary); font-size: 12px; cursor: pointer; transition: all 0.2s;">趋势</button>
409
+ <button class="token-tab-btn" data-tab="distribution" data-i18n="tokenStatsPanel.tabDistribution" style="padding: 6px 12px; border: none; border-bottom: 2px solid transparent; background: transparent; color: var(--text-secondary); font-size: 12px; cursor: pointer; transition: all 0.2s;">分布</button>
410
+ <button class="token-tab-btn" data-tab="global" data-i18n="tokenStatsPanel.tabGlobal" style="padding: 6px 12px; border: none; border-bottom: 2px solid transparent; background: transparent; color: var(--text-secondary); font-size: 12px; cursor: pointer; transition: all 0.2s;">全局</button>
387
411
  </div>
388
412
 
389
413
  <div style="flex: 1; overflow-y: auto; padding-right: 12px;">
390
- <div id="tokenStatsLoading" style="text-align: center; padding: 60px; color: #999;" data-i18n="common.loading">加载中...</div>
391
- <div id="tokenStatsEmpty" style="display: none; text-align: center; padding: 60px; color: #999;" data-i18n="tokenStatsPanel.noData">暂无统计数据</div>
414
+ <div id="tokenStatsLoading" style="text-align: center; padding: 60px; color: var(--text-tertiary);" data-i18n="common.loading">加载中...</div>
415
+ <div id="tokenStatsEmpty" style="display: none; text-align: center; padding: 60px; color: var(--text-tertiary);" data-i18n="tokenStatsPanel.noData">暂无统计数据</div>
392
416
  <div id="tokenStatsContent" style="display: none; height: 100%;">
393
417
  <!-- Tab 1: 趋势 -->
394
418
  <div id="tokenTabTrend" class="token-tab-content">
395
419
  <div style="margin-bottom: 14px;">
396
- <div style="font-size: 13px; font-weight: 600; color: #555; margin-bottom: 8px;" data-i18n="tokenStatsPanel.currentSession">当前会话</div>
420
+ <div style="font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px;" data-i18n="tokenStatsPanel.currentSession">当前会话</div>
397
421
  <div id="tokenSessionStats"></div>
398
422
  </div>
399
423
  <div>
400
- <div style="font-size: 13px; font-weight: 600; color: #555; margin-bottom: 6px;" data-i18n="tokenStatsPanel.recentCalls">近期调用</div>
424
+ <div style="font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px;" data-i18n="tokenStatsPanel.recentCalls">近期调用</div>
401
425
  <div id="tokenRecentCalls"></div>
402
426
  </div>
403
427
  </div>
404
428
 
405
429
  <!-- Tab 2: 分布(阶段二实施) -->
406
430
  <div id="tokenTabDistribution" class="token-tab-content" style="display: none;">
407
- <div id="tokenDistributionStats" style="text-align: center; padding: 40px; color: #999; font-size: 12px;">阶段二实施中...</div>
431
+ <div id="tokenDistributionStats" style="text-align: center; padding: 40px; color: var(--text-tertiary); font-size: 12px;">阶段二实施中...</div>
408
432
  </div>
409
433
 
410
434
  <!-- Tab 3: 全局 -->
411
435
  <div id="tokenTabGlobal" class="token-tab-content" style="display: none; flex-direction: column; height: 100%;">
412
436
  <!-- 时间范围切换 -->
413
437
  <div style="margin-bottom: 12px; display: flex; gap: 6px;">
414
- <button class="token-time-range-btn" data-range="today" data-i18n="tokenStatsPanel.timeRangeToday" style="padding: 4px 10px; border: 1px solid #ddd; border-radius: 4px; background: white; color: #666; font-size: 11px; cursor: pointer;">今日</button>
415
- <button class="token-time-range-btn" data-range="week" data-i18n="tokenStatsPanel.timeRangeWeek" style="padding: 4px 10px; border: 1px solid #ddd; border-radius: 4px; background: white; color: #666; font-size: 11px; cursor: pointer;">本周</button>
416
- <button class="token-time-range-btn active" data-range="month" data-i18n="tokenStatsPanel.timeRangeMonth" style="padding: 4px 10px; border: 1px solid #667eea; border-radius: 4px; background: #667eea; color: white; font-size: 11px; cursor: pointer;">本月</button>
417
- <button class="token-time-range-btn" data-range="all" data-i18n="tokenStatsPanel.timeRangeAll" style="padding: 4px 10px; border: 1px solid #ddd; border-radius: 4px; background: white; color: #666; font-size: 11px; cursor: pointer;">全部</button>
438
+ <button class="token-time-range-btn" data-range="today" data-i18n="tokenStatsPanel.timeRangeToday" style="padding: 4px 10px; border: 1px solid var(--border-default); border-radius: 4px; background: var(--bg-surface); color: var(--text-secondary); font-size: 11px; cursor: pointer;">今日</button>
439
+ <button class="token-time-range-btn" data-range="week" data-i18n="tokenStatsPanel.timeRangeWeek" style="padding: 4px 10px; border: 1px solid var(--border-default); border-radius: 4px; background: var(--bg-surface); color: var(--text-secondary); font-size: 11px; cursor: pointer;">本周</button>
440
+ <button class="token-time-range-btn active" data-range="month" data-i18n="tokenStatsPanel.timeRangeMonth" style="padding: 4px 10px; border: 1px solid var(--brand-500); border-radius: 4px; background: var(--brand-gradient); color: var(--text-on-brand); font-size: 11px; cursor: pointer;">本月</button>
441
+ <button class="token-time-range-btn" data-range="all" data-i18n="tokenStatsPanel.timeRangeAll" style="padding: 4px 10px; border: 1px solid var(--border-default); border-radius: 4px; background: var(--bg-surface); color: var(--text-secondary); font-size: 11px; cursor: pointer;">全部</button>
418
442
  </div>
419
443
 
420
444
  <!-- 全局 sparkline(flex:1 自适应填满剩余高度) -->
421
445
  <div style="margin-bottom: 14px; flex: 1; min-height: 0; display: flex; flex-direction: column;">
422
- <div style="font-size: 11px; color: #888; margin-bottom: 6px;" data-i18n="tokenStatsPanel.globalSparklineTitle">最近 30 天趋势</div>
446
+ <div style="font-size: 11px; color: var(--text-tertiary); margin-bottom: 6px;" data-i18n="tokenStatsPanel.globalSparklineTitle">最近 30 天趋势</div>
423
447
  <div id="tokenGlobalSparkline" style="flex: 1; min-height: 0;"></div>
424
448
  </div>
425
449
 
426
450
  <!-- 全局统计卡片 -->
427
451
  <div style="margin-bottom: 14px;">
428
- <div style="font-size: 13px; font-weight: 600; color: #555; margin-bottom: 8px;" data-i18n="tokenStatsPanel.globalStats">全局统计</div>
452
+ <div style="font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px;" data-i18n="tokenStatsPanel.globalStats">全局统计</div>
429
453
  <div id="tokenOverallStats"></div>
430
454
  </div>
431
455
  </div>
@@ -438,10 +462,10 @@
438
462
  <div class="modal-overlay" id="customConfirmOverlay" style="display: none;">
439
463
  <div class="modal-container" style="max-width: 380px; width: 90%;">
440
464
  <div class="modal-title" id="customConfirmTitle" data-i18n="customConfirm.defaultTitle">确认操作</div>
441
- <div class="modal-message" id="customConfirmMessage" style="color: #555; font-size: 14px; margin-bottom: 20px; line-height: 1.6;"></div>
465
+ <div class="modal-message" id="customConfirmMessage" style="color: var(--text-secondary); font-size: 14px; margin-bottom: 20px; line-height: 1.6;"></div>
442
466
  <div style="display: flex; justify-content: flex-end; gap: 10px;">
443
- <button id="customConfirmCancelBtn" style="padding: 8px 20px; border: 1px solid #ddd; border-radius: 6px; background: white; color: #666; font-size: 14px; cursor: pointer;" data-i18n="common.cancel">取消</button>
444
- <button id="customConfirmOkBtn" style="padding: 8px 20px; border: none; border-radius: 6px; background: #e53e3e; color: white; font-size: 14px; cursor: pointer;" data-i18n="common.confirm">确认</button>
467
+ <button id="customConfirmCancelBtn" style="padding: 8px 20px; border: 1px solid var(--border-default); border-radius: 6px; background: var(--bg-surface); color: var(--text-secondary); font-size: 14px; cursor: pointer;" data-i18n="common.cancel">取消</button>
468
+ <button id="customConfirmOkBtn" style="padding: 8px 20px; border: none; border-radius: 6px; background: var(--danger-500); color: var(--text-on-brand); font-size: 14px; cursor: pointer;" data-i18n="common.confirm">确认</button>
445
469
  </div>
446
470
  </div>
447
471
  </div>
@@ -780,7 +804,7 @@
780
804
  <div class="modal-title" data-i18n="promptDialog.title">提示</div>
781
805
  <div class="modal-message" id="promptErrorMessage"></div>
782
806
  <div class="modal-actions">
783
- <button class="modal-btn confirm" id="promptErrorConfirmBtn" style="background: #667eea;" data-i18n="common.ok">确定</button>
807
+ <button class="modal-btn confirm" id="promptErrorConfirmBtn" style="background: var(--brand-gradient);" data-i18n="common.ok">确定</button>
784
808
  </div>
785
809
  </div>
786
810
  </div>
@@ -795,12 +819,12 @@
795
819
  </div>
796
820
  <div style="margin-bottom: 16px;">
797
821
  <input type="text" id="editPromptIndex" placeholder="" style="display: none;">
798
- <input type="text" id="newPromptCode" data-i18n-placeholder="promptManager.codePlaceholder" placeholder="编码(如: code)" style="width: 100%; padding: 8px; margin-bottom: 8px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 13px;">
799
- <textarea id="newPromptContent" data-i18n-placeholder="promptManager.contentPlaceholder" placeholder="提示词内容" rows="3" style="width: 100%; padding: 8px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 13px; resize: vertical; font-family: inherit;"></textarea>
822
+ <input type="text" id="newPromptCode" data-i18n-placeholder="promptManager.codePlaceholder" placeholder="编码(如: code)" style="width: 100%; padding: 8px; margin-bottom: 8px; border: 1px solid var(--border-default); border-radius: 6px; font-size: 13px;">
823
+ <textarea id="newPromptContent" data-i18n-placeholder="promptManager.contentPlaceholder" placeholder="提示词内容" rows="3" style="width: 100%; padding: 8px; border: 1px solid var(--border-default); border-radius: 6px; font-size: 13px; resize: vertical; font-family: inherit;"></textarea>
800
824
  </div>
801
825
  <div class="modal-actions">
802
826
  <button class="modal-btn cancel" id="promptManageCancelBtn" data-i18n="common.cancel">取消</button>
803
- <button class="modal-btn confirm" id="promptManageAddBtn" style="background: #667eea;" data-i18n="promptManager.addPrompt">添加提示词</button>
827
+ <button class="modal-btn confirm" id="promptManageAddBtn" style="background: var(--brand-gradient);" data-i18n="promptManager.addPrompt">添加提示词</button>
804
828
  </div>
805
829
  </div>
806
830
  </div>
@@ -814,9 +838,9 @@
814
838
  <div class="clarify-header-content">
815
839
  <div class="clarify-title" data-i18n="dialog.operationConfirm">操作确认</div>
816
840
  <div class="clarify-question" id="confirmMessage" data-i18n="dialog.confirmDefaultMessage">模型请求执行敏感操作,是否允许?</div>
817
- <div class="confirm-tool-name" id="confirmToolName" style="font-weight: 600; color: #e67e22; margin-top: 4px;"></div>
818
- <div class="confirm-args" id="confirmArgsSummary" style="display: none; font-size: 12px; color: #666; margin-top: 8px; padding: 8px; background: #f5f5f5; border-radius: 4px;"></div>
819
- <div class="confirm-countdown" id="confirmCountdown" style="margin-top: 12px; font-size: 13px; color: #e67e22; display: flex; align-items: center; gap: 6px;">
841
+ <div class="confirm-tool-name" id="confirmToolName" style="font-weight: 600; color: var(--warning-500); margin-top: 4px;"></div>
842
+ <div class="confirm-args" id="confirmArgsSummary" style="display: none; font-size: 12px; color: var(--text-secondary); margin-top: 8px; padding: 8px; background: var(--bg-subtle); border-radius: 4px;"></div>
843
+ <div class="confirm-countdown" id="confirmCountdown" style="margin-top: 12px; font-size: 13px; color: var(--warning-500); display: flex; align-items: center; gap: 6px;">
820
844
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="16" height="16"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
821
845
  <span id="confirmCountdownText">剩余时间: 3:00</span>
822
846
  </div>
@@ -826,32 +850,35 @@
826
850
 
827
851
  <div class="clarify-footer">
828
852
  <button class="clarify-btn cancel" id="confirmDenyBtn" data-i18n="dialog.deny">拒绝</button>
829
- <button class="clarify-btn confirm-once" id="confirmApproveOnceBtn" data-i18n="dialog.approveOnce" style="background: linear-gradient(135deg, #27ae60, #2ecc71);">本次放行</button>
830
- <button class="clarify-btn confirm-loop" id="confirmApproveLoopBtn" data-i18n="dialog.approveLoop" style="background: linear-gradient(135deg, #2980b9, #3498db);">当前任务放行</button>
853
+ <button class="clarify-btn confirm-once" id="confirmApproveOnceBtn" data-i18n="dialog.approveOnce" style="background: linear-gradient(135deg, var(--success-strong), var(--success-500));">本次放行</button>
854
+ <button class="clarify-btn confirm-loop" id="confirmApproveLoopBtn" data-i18n="dialog.approveLoop" style="background: linear-gradient(135deg, var(--info-strong), var(--info-500));">当前任务放行</button>
831
855
  </div>
832
856
  </div>
833
857
  </div>
834
858
 
835
859
  <!-- 问题澄清对话框 -->
836
860
  <div class="clarify-overlay" id="clarifyOverlay">
837
- <div class="clarify-container" id="clarifyContainer">
838
- <div class="clarify-content">
839
- <div class="clarify-header">
840
- <div class="clarify-icon">💡</div>
841
- <div class="clarify-header-content">
842
- <div class="clarify-title" data-i18n="clarify.title">需要您的澄清</div>
843
- <div class="clarify-session-name" id="clarifySessionName"></div>
844
- <div class="clarify-question" id="clarifyQuestion"></div>
861
+ <div class="clarify-container" id="clarifyContainer" role="dialog" aria-modal="true" aria-labelledby="clarifyTitleText">
862
+ <div class="clarify-header">
863
+ <div class="clarify-icon">💡</div>
864
+ <div class="clarify-header-content">
865
+ <div class="clarify-title-row">
866
+ <div class="clarify-title"><span id="clarifyTitleText" data-i18n="clarify.title">需要您的澄清</span></div>
845
867
  <div class="clarify-timer" id="clarifyTimer">
846
- <span class="clarify-timer-icon">⏱️</span>
847
868
  <span id="clarifyTimerText" data-i18n="clarify.remainingTime">剩余时间: 3:00</span>
869
+ <div class="clarify-timer-bar"><div class="clarify-timer-bar-fill" id="clarifyTimerBarFill"></div></div>
870
+ <button class="clarify-extend-btn" id="clarifyExtendBtn" type="button" data-i18n="clarify.extend">延长时间</button>
848
871
  </div>
849
872
  </div>
873
+ <div class="clarify-session-name" id="clarifySessionName"></div>
850
874
  </div>
875
+ </div>
876
+ <div class="clarify-content">
877
+ <div class="clarify-question" id="clarifyQuestion"></div>
851
878
 
852
879
  <div class="clarify-options" id="clarifyOptions">
853
880
  <div class="clarify-options-title" data-i18n="clarify.selectOption">请选择一个选项</div>
854
- <div id="clarifyOptionsList">
881
+ <div id="clarifyOptionsList" role="radiogroup">
855
882
  <div class="clarify-custom-input" id="clarifyCustomInput">
856
883
  <textarea class="clarify-custom-textarea" id="clarifyCustomTextarea" data-i18n-placeholder="clarify.customPlaceholder" placeholder="请输入您的自定义内容..."></textarea>
857
884
  </div>
@@ -860,7 +887,6 @@
860
887
 
861
888
  <div class="clarify-additional-info" id="clarifyAdditionalInfo">
862
889
  <div class="clarify-additional-title" data-i18n="clarify.additionalTitle">补充说明(可选)</div>
863
- <div class="clarify-additional-hint" data-i18n="clarify.additionalHint">如果您有更多相关信息,可以在此补充说明</div>
864
890
  <textarea class="clarify-additional-textarea" id="clarifyAdditionalTextarea" data-i18n-placeholder="clarify.inputPlaceholder" placeholder="请输入补充信息(可选)..."></textarea>
865
891
  </div>
866
892
  </div>
@@ -975,10 +1001,14 @@
975
1001
  <tr><th data-i18n="shortcuts.colShortcut">快捷键</th><th data-i18n="shortcuts.colFunction">功能</th><th data-i18n="shortcuts.colPlatform">平台</th></tr>
976
1002
  </thead>
977
1003
  <tbody>
978
- <tr><td><kbd>Alt</kbd> + <kbd>↑</kbd></td><td data-i18n="shortcuts.gotoPrev">跳转到上一条消息</td><td>Win / Mac</td></tr>
979
- <tr><td><kbd>Alt</kbd> + <kbd>↓</kbd></td><td data-i18n="shortcuts.gotoNext">跳转到下一条消息</td><td>Win / Mac</td></tr>
1004
+ <tr><td><kbd>Alt</kbd> + <kbd>↑</kbd></td><td data-i18n="shortcuts.gotoPrev">跳转到上一个问题</td><td>Win / Mac</td></tr>
1005
+ <tr><td><kbd>Alt</kbd> + <kbd>↓</kbd></td><td data-i18n="shortcuts.gotoNext">跳转到下一个问题</td><td>Win / Mac</td></tr>
980
1006
  <tr><td><kbd>Alt</kbd> + <kbd>Ctrl/Cmd</kbd> + <kbd>↑</kbd></td><td data-i18n="shortcuts.scrollTop">回到对话顶部</td><td>Win / Mac</td></tr>
981
1007
  <tr><td><kbd>Alt</kbd> + <kbd>Ctrl/Cmd</kbd> + <kbd>↓</kbd></td><td data-i18n="shortcuts.scrollBottom">跳到对话底部</td><td>Win / Mac</td></tr>
1008
+ <tr><td><kbd>Tab</kbd></td><td data-i18n="shortcuts.navOpenByTab">聚焦左侧把手并展开问题列表</td><td>Win / Mac</td></tr>
1009
+ <tr><td><kbd>↑</kbd> / <kbd>↓</kbd></td><td data-i18n="shortcuts.navListArrows">在问题列表条目间移动(Enter 跳转)</td><td>Win / Mac</td></tr>
1010
+ <tr><td><kbd>Enter</kbd> / <kbd>Space</kbd></td><td data-i18n="shortcuts.navPinToggle">钉住 / 取消钉住问题列表</td><td>Win / Mac</td></tr>
1011
+ <tr><td><kbd>Esc</kbd></td><td data-i18n="shortcuts.navEscCollapse">收起问题列表 / 取消钉住(有搜索词时先清空)</td><td>Win / Mac</td></tr>
982
1012
  <tr class="shortcuts-divider"><td colspan="3"></td></tr>
983
1013
  <tr><td><kbd>Alt</kbd> + <kbd>S</kbd></td><td data-i18n="shortcuts.fullScreenshot">全页面截图</td><td>Win / Mac</td></tr>
984
1014
  <tr><td><kbd>Alt</kbd> + <kbd>Shift</kbd> + <kbd>S</kbd></td><td data-i18n="shortcuts.regionScreenshot">区域截图</td><td>Win / Mac</td></tr>
@@ -1014,9 +1044,9 @@
1014
1044
  <!-- 图片预览弹窗 -->
1015
1045
  <div class="modal-overlay" id="imagePreviewOverlay" style="z-index: 5000;">
1016
1046
  <div class="modal-container image-preview-container" style="max-width:90vw;max-height:90vh;padding:12px;background:transparent;box-shadow:none;">
1017
- <button class="image-preview-close" data-i18n-title="common.close" title="关闭" style="position:absolute;top:8px;right:8px;width:32px;height:32px;border:none;border-radius:50%;background:rgba(0,0,0,0.5);color:white;font-size:20px;cursor:pointer;z-index:3;">×</button>
1018
- <button class="image-preview-download" id="imagePreviewDownload" data-i18n-title="imageEditor.downloadImage" title="下载图片" style="position:absolute;top:8px;right:48px;width:32px;height:32px;border:none;border-radius:50%;background:rgba(0,0,0,0.5);color:white;font-size:16px;cursor:pointer;z-index:3;display:flex;align-items:center;justify-content:center;">↓</button>
1019
- <button class="image-preview-edit" id="imagePreviewEdit" data-i18n-title="imageEditor.editImage" title="编辑图片" style="position:absolute;top:8px;right:88px;width:32px;height:32px;border:none;border-radius:50%;background:rgba(0,0,0,0.5);color:white;font-size:16px;cursor:pointer;z-index:3;display:flex;align-items:center;justify-content:center;">✏️</button>
1047
+ <button class="image-preview-close" data-i18n-title="common.close" title="关闭" style="position:absolute;top:8px;right:8px;width:32px;height:32px;border:none;border-radius:50%;background:var(--scrim);color:var(--text-on-brand);font-size:20px;cursor:pointer;z-index:3;">×</button>
1048
+ <button class="image-preview-download" id="imagePreviewDownload" data-i18n-title="imageEditor.downloadImage" title="下载图片" style="position:absolute;top:8px;right:48px;width:32px;height:32px;border:none;border-radius:50%;background:var(--scrim);color:var(--text-on-brand);font-size:16px;cursor:pointer;z-index:3;display:flex;align-items:center;justify-content:center;">↓</button>
1049
+ <button class="image-preview-edit" id="imagePreviewEdit" data-i18n-title="imageEditor.editImage" title="编辑图片" style="position:absolute;top:8px;right:88px;width:32px;height:32px;border:none;border-radius:50%;background:var(--scrim);color:var(--text-on-brand);font-size:16px;cursor:pointer;z-index:3;display:flex;align-items:center;justify-content:center;">✏️</button>
1020
1050
  <button class="image-preview-nav prev" id="imagePreviewPrev" data-i18n-title="imageEditor.prevImage" title="上一张" style="display:none;">◀</button>
1021
1051
  <button class="image-preview-nav next" id="imagePreviewNext" data-i18n-title="imageEditor.nextImage" title="下一张" style="display:none;">▶</button>
1022
1052
  <div id="imagePreviewViewport" style="overflow:hidden;display:flex;align-items:center;justify-content:center;max-width:calc(90vw - 24px);max-height:calc(90vh - 24px);border-radius:8px;position:relative;">
@@ -1120,12 +1150,12 @@
1120
1150
  <div style="flex: 1; overflow-y: auto; padding-right: 4px;">
1121
1151
  <div style="display: flex; gap: 12px; margin-bottom: 12px;">
1122
1152
  <div style="flex: 1;">
1123
- <label style="font-size: 12px; color: #666; display: block; margin-bottom: 4px;" data-i18n="agentEditor.nameLabel">名称</label>
1124
- <input type="text" id="agentEditName" data-i18n-placeholder="agentEditor.namePlaceholder" placeholder="助手名称" style="width: 100%; height: 34px; box-sizing: border-box; padding: 0 8px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 13px;">
1153
+ <label style="font-size: 12px; color: var(--text-secondary); display: block; margin-bottom: 4px;" data-i18n="agentEditor.nameLabel">名称</label>
1154
+ <input type="text" id="agentEditName" data-i18n-placeholder="agentEditor.namePlaceholder" placeholder="助手名称" style="width: 100%; height: 34px; box-sizing: border-box; padding: 0 8px; border: 1px solid var(--border-default); border-radius: 6px; font-size: 13px;">
1125
1155
  </div>
1126
1156
  <div style="width: 70px; position: relative;">
1127
- <label style="font-size: 12px; color: #666; display: block; margin-bottom: 4px;" data-i18n="agentEditor.icon">图标</label>
1128
- <button type="button" id="agentEditIconBtn" style="width: 100%; height: 34px; box-sizing: border-box; padding: 0; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 18px; text-align: center; background: white; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1;">🤖</button>
1157
+ <label style="font-size: 12px; color: var(--text-secondary); display: block; margin-bottom: 4px;" data-i18n="agentEditor.icon">图标</label>
1158
+ <button type="button" id="agentEditIconBtn" style="width: 100%; height: 34px; box-sizing: border-box; padding: 0; border: 1px solid var(--border-default); border-radius: 6px; font-size: 18px; text-align: center; background: var(--bg-surface); cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1;">🤖</button>
1129
1159
  <input type="hidden" id="agentEditIcon" value="🤖">
1130
1160
  <div class="emoji-picker" id="emojiPicker" style="display:none;">
1131
1161
  <div class="emoji-search-bar">
@@ -1140,49 +1170,49 @@
1140
1170
  </div>
1141
1171
 
1142
1172
  <div style="margin-bottom: 12px;">
1143
- <label style="font-size: 12px; color: #666; display: block; margin-bottom: 4px;" data-i18n="agentEditor.descLabel">简短描述</label>
1144
- <input type="text" id="agentEditDesc" data-i18n-placeholder="agentEditor.descPlaceholder" placeholder="这个助手擅长什么?" style="width: 100%; padding: 8px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 13px;">
1173
+ <label style="font-size: 12px; color: var(--text-secondary); display: block; margin-bottom: 4px;" data-i18n="agentEditor.descLabel">简短描述</label>
1174
+ <input type="text" id="agentEditDesc" data-i18n-placeholder="agentEditor.descPlaceholder" placeholder="这个助手擅长什么?" style="width: 100%; padding: 8px; border: 1px solid var(--border-default); border-radius: 6px; font-size: 13px;">
1145
1175
  </div>
1146
1176
 
1147
1177
  <div style="margin-bottom: 12px;">
1148
- <label style="font-size: 12px; color: #666; display: block; margin-bottom: 4px;" data-i18n="agentEditor.templateQuickCreate">模板快速创建</label>
1149
- <select id="agentTemplateSelect" style="width: 100%; padding: 8px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 13px;">
1178
+ <label style="font-size: 12px; color: var(--text-secondary); display: block; margin-bottom: 4px;" data-i18n="agentEditor.templateQuickCreate">模板快速创建</label>
1179
+ <select id="agentTemplateSelect" style="width: 100%; padding: 8px; border: 1px solid var(--border-default); border-radius: 6px; font-size: 13px;">
1150
1180
  <option value="" data-i18n="agentEditor.selectTemplate">-- 选择模板(可选) --</option>
1151
1181
  </select>
1152
1182
  </div>
1153
1183
 
1154
1184
  <div style="margin-bottom: 12px;">
1155
- <label style="font-size: 12px; color: #666; display: block; margin-bottom: 4px;" data-i18n="agentEditor.systemPrompt">系统提示词(定义助手的角色和能力)</label>
1156
- <textarea id="agentEditPrompt" data-i18n-placeholder="agentEditor.promptPlaceholder" placeholder="你是一个专业的..." rows="6" style="width: 100%; padding: 8px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 13px; resize: vertical; font-family: inherit;"></textarea>
1185
+ <label style="font-size: 12px; color: var(--text-secondary); display: block; margin-bottom: 4px;" data-i18n="agentEditor.systemPrompt">系统提示词(定义助手的角色和能力)</label>
1186
+ <textarea id="agentEditPrompt" data-i18n-placeholder="agentEditor.promptPlaceholder" placeholder="你是一个专业的..." rows="6" style="width: 100%; padding: 8px; border: 1px solid var(--border-default); border-radius: 6px; font-size: 13px; resize: vertical; font-family: inherit;"></textarea>
1157
1187
  </div>
1158
1188
 
1159
1189
  <div style="margin-bottom: 12px;">
1160
- <label style="font-size: 12px; color: #666; display: block; margin-bottom: 4px;"><span data-i18n="agentEditor.availableTools">可用工具</span> <span id="agentToolCount" style="color: #999;"></span><span data-i18n="agentEditor.toolsInheritGlobal">(不勾选则继承全局工具设置)</span></label>
1190
+ <label style="font-size: 12px; color: var(--text-secondary); display: block; margin-bottom: 4px;"><span data-i18n="agentEditor.availableTools">可用工具</span> <span id="agentToolCount" style="color: var(--text-tertiary);"></span><span data-i18n="agentEditor.toolsInheritGlobal">(不勾选则继承全局工具设置)</span></label>
1161
1191
  <div id="agentToolActions" style="display: flex; gap: 6px; margin-bottom: 6px;">
1162
1192
  <button type="button" class="agent-tool-action-btn" data-action="selectAll" data-i18n="common.selectAll">全选</button>
1163
1193
  <button type="button" class="agent-tool-action-btn" data-action="deselectAll" data-i18n="common.deselectAll">取消全选</button>
1164
1194
  </div>
1165
- <div id="agentToolList" style="max-height: 240px; overflow-y: auto; border: 1px solid #e0e0e0; border-radius: 6px; padding: 8px;"></div>
1195
+ <div id="agentToolList" style="max-height: 240px; overflow-y: auto; border: 1px solid var(--border-default); border-radius: 6px; padding: 8px;"></div>
1166
1196
  </div>
1167
1197
 
1168
1198
  <div style="margin-bottom: 12px;">
1169
- <label style="font-size: 12px; color: #666; display: block; margin-bottom: 4px;"><span data-i18n="agentEditor.availableSkills">可用技能</span> <span id="agentSkillCount" style="color: #999;"></span><span data-i18n="agentEditor.skillsInheritAll">(不勾选则使用全部启用技能)</span></label>
1199
+ <label style="font-size: 12px; color: var(--text-secondary); display: block; margin-bottom: 4px;"><span data-i18n="agentEditor.availableSkills">可用技能</span> <span id="agentSkillCount" style="color: var(--text-tertiary);"></span><span data-i18n="agentEditor.skillsInheritAll">(不勾选则使用全部启用技能)</span></label>
1170
1200
  <div id="agentSkillActions" style="display: flex; gap: 6px; margin-bottom: 6px;">
1171
1201
  <button type="button" class="agent-tool-action-btn" data-action="selectAllSkills" data-i18n="common.selectAll">全选</button>
1172
1202
  <button type="button" class="agent-tool-action-btn" data-action="deselectAllSkills" data-i18n="common.deselectAll">取消全选</button>
1173
1203
  </div>
1174
- <div id="agentSkillList" style="max-height: 200px; overflow-y: auto; border: 1px solid #e0e0e0; border-radius: 6px; padding: 8px;"></div>
1204
+ <div id="agentSkillList" style="max-height: 200px; overflow-y: auto; border: 1px solid var(--border-default); border-radius: 6px; padding: 8px;"></div>
1175
1205
  </div>
1176
1206
 
1177
1207
  <div style="margin-bottom: 12px;">
1178
- <label style="font-size: 12px; color: #666; display: block; margin-bottom: 4px;" data-i18n="agentEditor.modelSettings">模型设置(留空则使用全局设置)</label>
1208
+ <label style="font-size: 12px; color: var(--text-secondary); display: block; margin-bottom: 4px;" data-i18n="agentEditor.modelSettings">模型设置(留空则使用全局设置)</label>
1179
1209
  <div style="display: flex; gap: 12px;">
1180
1210
  <div style="flex: 1;">
1181
- <input type="text" id="agentEditModel" data-i18n-placeholder="agentEditor.modelPlaceholder" placeholder="选择或输入模型名称" list="agentModelList" autocomplete="off" style="width: 100%; padding: 8px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 13px;">
1211
+ <input type="text" id="agentEditModel" data-i18n-placeholder="agentEditor.modelPlaceholder" placeholder="选择或输入模型名称" list="agentModelList" autocomplete="off" style="width: 100%; padding: 8px; border: 1px solid var(--border-default); border-radius: 6px; font-size: 13px;">
1182
1212
  <datalist id="agentModelList"></datalist>
1183
1213
  </div>
1184
1214
  <div style="width: 160px;">
1185
- <select id="agentEditTempPreset" style="width: 100%; padding: 8px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 13px; color: #333;">
1215
+ <select id="agentEditTempPreset" style="width: 100%; padding: 8px; border: 1px solid var(--border-default); border-radius: 6px; font-size: 13px; color: var(--text-primary);">
1186
1216
  <option value="" data-i18n="agentEditor.noPreset">不设置(使用全局)</option>
1187
1217
  </select>
1188
1218
  </div>
@@ -1190,7 +1220,7 @@
1190
1220
  </div>
1191
1221
 
1192
1222
  <div style="margin-bottom: 16px; display: flex; gap: 16px;">
1193
- <label class="check-toggle" style="display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; color: #555;">
1223
+ <label class="check-toggle" style="display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; color: var(--text-secondary);">
1194
1224
  <input type="checkbox" id="agentEditAllowSub" style="display:none;">
1195
1225
  <span class="checkmark"></span>
1196
1226
  <span data-i18n="agentEditor.allowSubAgent">允许作为子助手被调度</span>
@@ -1199,8 +1229,8 @@
1199
1229
  </div>
1200
1230
 
1201
1231
  <div class="modal-actions" style="flex-shrink: 0; padding-top: 12px; margin-top: 0;">
1202
- <button class="modal-btn cancel" id="agentDeleteBtn" style="display:none; background: #e74c3c; color: white; border: none; margin-right: auto;" data-i18n-title="agentEditor.deleteAgentTitle" title="删除此助手" data-i18n="common.delete">删除</button>
1203
- <button class="modal-btn confirm" id="agentSaveBtn" style="background: #667eea;" data-i18n="common.save">保存</button>
1232
+ <button class="modal-btn cancel" id="agentDeleteBtn" style="display:none; background: var(--danger-500); color: var(--text-on-brand); border: none; margin-right: auto;" data-i18n-title="agentEditor.deleteAgentTitle" title="删除此助手" data-i18n="common.delete">删除</button>
1233
+ <button class="modal-btn confirm" id="agentSaveBtn" style="background: var(--brand-gradient);" data-i18n="common.save">保存</button>
1204
1234
  </div>
1205
1235
  </div>
1206
1236
  </div>
@@ -1209,11 +1239,11 @@
1209
1239
  <div class="modal-overlay" id="auditLogOverlay" style="display: none; z-index: 4000;">
1210
1240
  <div class="modal-container" style="max-width: 640px; width: 90%; height: 520px; display: flex; flex-direction: column;">
1211
1241
  <button class="prompt-modal-close" id="auditLogClose" data-i18n-title="common.close" title="关闭">×</button>
1212
- <button id="auditLogRefreshBtn" data-i18n-title="common.refresh" title="刷新" style="position: absolute; top: 12px; right: 45px; width: 28px; height: 28px; border: none; border-radius: 6px; background: transparent; color: #888; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;">🔄</button>
1242
+ <button id="auditLogRefreshBtn" data-i18n-title="common.refresh" title="刷新" style="position: absolute; top: 12px; right: 45px; width: 28px; height: 28px; border: none; border-radius: 6px; background: transparent; color: var(--text-tertiary); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center;">🔄</button>
1213
1243
  <div class="modal-title" data-i18n="auditLog.title">📋 命令执行审计</div>
1214
1244
  <div style="margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;">
1215
- <span style="font-size: 12px; color: #999;" data-i18n="auditLog.categoryFilter">分类筛选:</span>
1216
- <select id="auditLogCategoryFilter" style="padding: 4px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 12px;">
1245
+ <span style="font-size: 12px; color: var(--text-tertiary);" data-i18n="auditLog.categoryFilter">分类筛选:</span>
1246
+ <select id="auditLogCategoryFilter" style="padding: 4px 8px; border: 1px solid var(--border-default); border-radius: 4px; font-size: 12px;">
1217
1247
  <option value="" data-i18n="auditLog.filterAll">全部</option>
1218
1248
  <option value="exec" data-i18n="auditLog.filterCommand">命令执行</option>
1219
1249
  <option value="fs" data-i18n="auditLog.filterFile">文件操作</option>
@@ -1221,8 +1251,8 @@
1221
1251
  <option value="security" data-i18n="auditLog.filterSecurity">安全</option>
1222
1252
  <option value="system" data-i18n="auditLog.filterSystem">系统</option>
1223
1253
  </select>
1224
- <span style="font-size: 12px; color: #999; margin-left: 8px;" data-i18n="auditLog.countLabel">条数:</span>
1225
- <select id="auditLogLimit" style="padding: 4px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 12px;">
1254
+ <span style="font-size: 12px; color: var(--text-tertiary); margin-left: 8px;" data-i18n="auditLog.countLabel">条数:</span>
1255
+ <select id="auditLogLimit" style="padding: 4px 8px; border: 1px solid var(--border-default); border-radius: 4px; font-size: 12px;">
1226
1256
  <option value="50" data-i18n="auditLog.recent50">最近50条</option>
1227
1257
  <option value="100" data-i18n="auditLog.recent100">最近100条</option>
1228
1258
  <option value="200" selected data-i18n="auditLog.recent200">最近200条</option>
@@ -1230,15 +1260,15 @@
1230
1260
  </select>
1231
1261
  </div>
1232
1262
  <div style="margin-bottom: 10px; position: relative;">
1233
- <input type="text" id="auditLogSearch" data-i18n-placeholder="auditLog.searchPlaceholder" placeholder="搜索操作名、命令或路径..." style="width: 100%; padding: 8px 32px 8px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 12px; outline: none; box-sizing: border-box;">
1234
- <button type="button" id="auditLogSearchClear" style="position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: none; background: transparent; color: #999; font-size: 14px; cursor: pointer; display: none; padding: 2px 6px; line-height: 1; border-radius: 50%;" data-i18n-title="common.clear" title="清除">✕</button>
1263
+ <input type="text" id="auditLogSearch" data-i18n-placeholder="auditLog.searchPlaceholder" placeholder="搜索操作名、命令或路径..." style="width: 100%; padding: 8px 32px 8px 10px; border: 1px solid var(--border-default); border-radius: 6px; font-size: 12px; outline: none; box-sizing: border-box;">
1264
+ <button type="button" id="auditLogSearchClear" style="position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: none; background: transparent; color: var(--text-tertiary); font-size: 14px; cursor: pointer; display: none; padding: 2px 6px; line-height: 1; border-radius: 50%;" data-i18n-title="common.clear" title="清除">✕</button>
1235
1265
  </div>
1236
1266
  <div style="flex: 1; overflow-y: auto;" id="auditLogContent">
1237
- <div id="auditLogLoading" style="text-align: center; padding: 60px; color: #999;" data-i18n="common.loading">加载中...</div>
1238
- <div id="auditLogEmpty" style="display: none; text-align: center; padding: 60px; color: #999;" data-i18n="auditLog.noLogs">暂无审计日志</div>
1267
+ <div id="auditLogLoading" style="text-align: center; padding: 60px; color: var(--text-tertiary);" data-i18n="common.loading">加载中...</div>
1268
+ <div id="auditLogEmpty" style="display: none; text-align: center; padding: 60px; color: var(--text-tertiary);" data-i18n="auditLog.noLogs">暂无审计日志</div>
1239
1269
  <div id="auditLogList" style="display: none;"></div>
1240
1270
  </div>
1241
- <div style="padding-top: 8px; border-top: 1px solid #eee; font-size: 11px; color: #999; text-align: center;" data-i18n="auditLog.defaultRange">
1271
+ <div style="padding-top: 8px; border-top: 1px solid var(--border-subtle); font-size: 11px; color: var(--text-tertiary); text-align: center;" data-i18n="auditLog.defaultRange">
1242
1272
  默认查询最近7天的审计日志
1243
1273
  </div>
1244
1274
  </div>
@@ -1251,7 +1281,7 @@
1251
1281
  <div class="modal-message" id="agentConfirmMessage"></div>
1252
1282
  <div class="modal-actions">
1253
1283
  <button class="modal-btn cancel" id="agentConfirmCancel" data-i18n="common.cancel">取消</button>
1254
- <button class="modal-btn confirm" id="agentConfirmOk" style="background: #667eea;" data-i18n="common.ok">确定</button>
1284
+ <button class="modal-btn confirm" id="agentConfirmOk" style="background: var(--brand-gradient);" data-i18n="common.ok">确定</button>
1255
1285
  </div>
1256
1286
  </div>
1257
1287
  </div>