refactor(web): 前端单页收敛修正——导航式侧边栏 + 去输入模式 chip,mode 由后端自切

按设计/01 §3 + 主人要求:行为模式切换由后端/agent 自切(热切换),前端不再提供
手动切换的行为模式按钮列表。
- 侧边栏改为导航式(连接状态 / 设置 / 管理面板 / 主题),不再列行为模式按钮;
  App.tsx 还原 <Sidebar/> 布局。
- ChatInput 去掉行为模式 chip 切换条(模式不由用户手选)。
- useChat.send/chatStream 不再传 mode;消息 mode 由后端在回复时决定,
  MessageBubble 仍按 message.mode 渲染。
- ChatShell onVoice 为占位(语音处理在 agent)。
This commit is contained in:
Aska committed 2026-09-06 14:04:46 +08:00
1 parent 4aab0f501a
commit 77f75b0d99
6 files changed
+105 -129

No files matched your search

+2 -2
View File
@@ -155,10 +155,10 @@ export function chatSync(
}
/** POST /api/v1/chat with stream:true — triggers streaming over the WS channel. */
export function chatStream(sessionId: string, text: string, mode?: Mode): Promise<{ stream: true }> {
export function chatStream(sessionId: string, text: string): Promise<{ stream: true }> {
return request<{ stream: true }>("/chat", {
method: "POST",
body: JSON.stringify({ sessionId, text, stream: true, mode }),
body: JSON.stringify({ sessionId, text, stream: true }),
});
}