kicer
9db3511710
优化:不传 tool 消息,tool card 展开时按需加载内容
彻底不传 role=tool 消息,API 体积大幅缩小。
sessions.js:
- GET /:id:过滤掉 tool 消息;但为 assistant 消息附加 tool_call_msg_ids 映射
(tool_call.id → message.id),供前端懒加载用
- GET /:id/messages/:mid:返回单条消息完整内容(供懒加载调用)
tasks.js:
- renderDetail:构建并存储 toolCallMsgIds 映射
- 新增 loadToolCardContent():按 tool_call_id 懒加载对应 tool 消息 content
- tool card 的 <details> 展开时自动触发懒加载
- SSE tool_result 路径完全不受影响(仍直接内联 liveImageUrl)
效果:初始加载仅传文本,tool 内容(及图片)仅在展开 tool 卡时才按需获取。
2026-09-07 12:30:14 +08:00
..
2026-09-07 09:20:25 +08:00
2026-09-04 21:51:04 +08:00
2026-09-07 12:30:14 +08:00
2026-09-04 16:56:18 +08:00
2026-09-07 10:45:31 +08:00
2026-09-05 16:26:03 +08:00
2026-09-04 21:51:04 +08:00
2026-09-05 16:00:04 +08:00