feat(web): 用户侧体验补齐——思维链/工具卡数据源 + 图片附件 + 语音上行 + home/vision/voice 真表现
- 打通 thinking/tool_call 运行时数据源:openai 发 thinking_*(reasoning_content)/tool_call_* (delta.tool_calls 累积重新组装 Args 非 JSON 串);anthropic_stream 发 thinking_*(content_block thinking start/delta/stop)。ws_bridge 已映射 thinking.*/tool_call.*,前端渲染活。 - 前端消息模型 + 附件:ChatMessage 加 image?;ChatInput 加附件按钮(file→base64)、预览/移除、 image-aware onSend(text,image);VisionMessageBody 升级图像卡+识别 chip;VoiceMessageBody 升级通话控制卡(live2D预留/波形/静音/挂断);HomeMessageBody 读真实 deviceUpdates(去掉 sampleDevices 猜)。 - 激活 voice_input:ChatShell onVoice 不再 no-op → sendUp voice_input + 切 voice mode。 - addTool 改按工具名 upsert(修复 tool_call.start/end 重复卡);ws_mode_switch 应用 agent 驱动 mode;addUserMessage/beginAssistant 带 image/mode;chatStream/useChat.send 带 image。 - 新增 image/phone 图标。 已知限制(标注):图片仅前端收集(后端 chatRequest 无 image 字段未接真推理);流式工具卡无真实 工具名(StreamEvent 只带 ID,回退 tool_<id前缀>);mode 由 agent 驱动但后端未逐消息下发 mode (mode_switch 回显+默认当前 mode 兜底);voice 为 UI+voice_input 上行(真实通话后置)。 go build/vet/test + 前端 tsc 绿。
This commit is contained in:
1 parent
b0bd93b15c
commit
2248ddce15
14 files changed
+576
-102
No files matched your search
@@ -44,7 +44,9 @@ export type IconName =
|
||||
| "vision" // 👁 vision (visibility_rounded)
|
||||
| "home" // 🏠 home (home_rounded)
|
||||
| "arrow" // → direction (arrow_forward_rounded)
|
||||
| "terminal" // 🖥 code (terminal_rounded);
|
||||
| "terminal" // 🖥 code (terminal_rounded)
|
||||
| "image" // 🖼 attachment/vision (image_rounded)
|
||||
| "phone" // 📞 voice call / hang up (call_rounded);
|
||||
|
||||
const ICON_PATHS: Record<IconName, string> = {
|
||||
chart:
|
||||
@@ -119,6 +121,10 @@ const ICON_PATHS: Record<IconName, string> = {
|
||||
"M5 11h10.2l-3.6-3.6L13 6l6 6-6 6-1.4-1.4 3.6-3.6H5v-2Z",
|
||||
terminal:
|
||||
"M4 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2H4Zm2.5 4 3 3.5-3 3.5L4.6 12l2.4-2.5-1-1 1-1.5Zm5.5 7h5v1.5h-5V14Z",
|
||||
image:
|
||||
"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2ZM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5Z",
|
||||
phone:
|
||||
"M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1l-2.3 2.2Z",
|
||||
};
|
||||
|
||||
export interface IconProps {
|
||||
|
||||
Reference in new issue
Block a user