缺陷 / 高 / 前端组件
src/stores/agent-store.ts
src/components/chat/
setCurrentSession 加载会话历史时:
const filtered = messages.filter(m => m.role !== 'tool');
过滤掉 tool 角色消息(防止冗余 UI 卡片)。 但前端组件中仍存在 ToolMessage 组件用于渲染 tool 消息:
明确决策:
方案 A:显示 tool 消息(移除过滤)
// 不再过滤 const filtered = messages;
方案 B:不显示 tool 消息,但保留 tool_calls 与 tool result 的关联
// 过滤独立的 tool 消息 // 但保留 assistant 消息中的 tool_calls const filtered = messages.filter(m => m.role !== 'tool'); // 删除 ToolMessage 组件
方案 B 更符合用户预期(不显示工具调用细节)。统一代码与 UI。
No dependencies set.
The note is not visible to the blocked user.
问题类型
缺陷 / 高 / 前端组件
文件位置
src/stores/agent-store.ts(setCurrentSession)src/components/chat/(ToolMessage 渲染)问题描述
setCurrentSession 加载会话历史时:
过滤掉 tool 角色消息(防止冗余 UI 卡片)。
但前端组件中仍存在 ToolMessage 组件用于渲染 tool 消息:
影响
建议修复
明确决策:
方案 A:显示 tool 消息(移除过滤)
方案 B:不显示 tool 消息,但保留 tool_calls 与 tool result 的关联
方案 B 更符合用户预期(不显示工具调用细节)。统一代码与 UI。