# H6 前端 Hermes-first Session Model ## 1. 目标 让前端从“runtime toggle + Jarvis 默认假设”过渡到 **Hermes-first session model**。 ## 2. 当前问题 当前前端已经支持: - `runtime: 'jarvis' | 'hermes'` 但本质上仍存在: - 默认 runtime = jarvis - 大量 Jarvis-specific 文案与状态 - runtime 只是一个请求字符串 - session/run metadata 不是一等状态 ## 3. 方向 前端长期目标不是让用户一直选 runtime,而是: - 普通用户默认走 Hermes-first 路径 - runtime toggle 仅保留给灰度、调试、回滚 - conversation/session/run metadata 进入更明确的状态模型 ## 4. 推荐调整点 ### 4.1 Transport Layer - `frontend/src/api/conversation.ts` 保持 transport 职责,不再承载过多 runtime 语义。 ### 4.2 Chat Runtime State - `frontend/src/pages/chat/composables/useChatView.ts` - `frontend/src/stores/conversation.ts` 需要逐步减少: - `selectedRuntime = 'jarvis'` 这类默认假设 - `jarvisNote` / `JARVIS THINKING` 等强绑定文案 - 仅靠本地拼装 model label 的方式 ### 4.3 Session/Run Metadata 建议逐步提升为一等状态: - active runtime - run status - session status(warm/resumed/cold) - runtime diagnostics summary ## 5. UI 原则 1. chat 仍是消息流,不变成终端模拟器。 2. 普通用户不需要长期理解 runtime 架构。 3. 迁移期保留 toggle,但它属于 admin/dev 工具。 4. 历史 conversation 渲染逻辑应尽量保持稳定。 ## 6. 推荐文件变更 - `frontend/src/api/conversation.ts` - `frontend/src/pages/chat/composables/useChatView.ts` - `frontend/src/pages/chat/index.vue` - `frontend/src/stores/conversation.ts` - `frontend/src/api/agent.ts` ## 7. 完成标准 - [ ] 前端减少 Jarvis-default 假设 - [ ] runtime toggle 可转向灰度/调试用途 - [ ] session/run metadata 开始成为一等状态 - [ ] 普通聊天体验保持稳定