fix(hermes): sidebar 缺失 group-chat / files 入口 + 补 folder 图标

复查发现 2 个真 bug:路由注册了但 sidebar 没入口,用户点不到。

## §N 群聊 - sidebar 缺入口
- /h/group-chat 已注册路由(debce2f),但 sidebar monitor section 没加
- 修复:紧跟 /h/chat 之后插入「群聊」(agents 图标)

## §L 文件管理器 - sidebar 缺入口
- /h/files 已注册路由(129d8c0),但 sidebar manage section 没加
- 修复:紧跟 /h/oauth 之后插入「文件管理器」(folder 图标)

## sidebar.js 补 folder 图标
- ICONS 表里没有 'folder',导致 /h/files sidebar 项无图标(fallback 到空字符串)
- 加进去(24x24 viewBox 的标准 folder svg)

## 复查覆盖
✓ 61 个 hermes_* Tauri 命令全部在 lib.rs invoke_handler 注册
✓ 63 个 invoke('hermes_*') 调用在 dev-api.js 都有 fallback (除 hermes_agent_run_stream 走 webStream)
✓ 6 个新页面所有 t('engine.*') 键在 engine.js 都有定义(含 zh-CN/en/zh-TW 三语)
✓ 19 个 Hermes 页面文件齐备(最大 chat.js 1626 行,最小 channels.js 占位 17 行)
✓ cargo check 干净(仅 1 个 unused field 警告,不影响)
✓ npm build ✓
This commit is contained in:
晴天
2026-05-14 05:53:32 +08:00
parent 6b118877f1
commit cc19a07999
2 changed files with 3 additions and 0 deletions

View File

@@ -111,6 +111,7 @@ const ICONS = {
gateway: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="2" width="20" height="8" rx="2"/><rect x="2" y="14" width="20" height="8" rx="2"/><line x1="6" y1="6" x2="6.01" y2="6"/><line x1="6" y1="18" x2="6.01" y2="18"/></svg>',
memory: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M2 3h6a4 4 0 014 4v14a3 3 0 00-3-3H2z"/><path d="M22 3h-6a4 4 0 00-4 4v14a3 3 0 013-3h7z"/></svg>',
inbox: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="22 12 16 12 14 15 10 15 8 12 2 12"/><path d="M5.45 5.11L2 12v6a2 2 0 002 2h16a2 2 0 002-2v-6l-3.45-6.89A2 2 0 0016.76 4H7.24a2 2 0 00-1.79 1.11z"/></svg>',
folder: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 19a2 2 0 01-2 2H4a2 2 0 01-2-2V5a2 2 0 012-2h5l2 3h9a2 2 0 012 2z"/></svg>',
extensions: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>',
package: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="16.5" y1="9.4" x2="7.5" y2="4.21"/><path d="M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg>',
about: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>',

View File

@@ -76,6 +76,7 @@ export default {
items: [
{ route: '/h/dashboard', label: t('sidebar.dashboard'), icon: 'dashboard' },
{ route: '/h/chat', label: t('sidebar.chat'), icon: 'chat' },
{ route: '/h/group-chat', label: t('engine.hermesGroupChatTitle'), icon: 'agents' },
{ route: '/h/sessions', label: t('sidebar.sessions'), icon: 'inbox' },
{ route: '/h/logs', label: t('sidebar.logs'), icon: 'logs' },
{ route: '/h/usage', label: t('sidebar.usage'), icon: 'bar-chart' },
@@ -90,6 +91,7 @@ export default {
{ route: '/h/gateways', label: t('engine.hermesGatewaysTitle'), icon: 'gateway' },
{ route: '/h/kanban', label: t('engine.hermesKanbanTitle'), icon: 'inbox' },
{ route: '/h/oauth', label: t('engine.hermesOAuthTitle'), icon: 'memory' },
{ route: '/h/files', label: t('engine.hermesFilesTitle'), icon: 'folder' },
{ route: '/h/lazy-deps', label: t('hermesLazyDeps.title'), icon: 'package' },
{ route: '/h/extensions', label: t('sidebar.extensions'), icon: 'package' },
]