Version: 0.9.50.dev.260428
后端: 1. 工具执行结果协议升级为结构化 ToolExecutionResult——execute/tool_runtime、ToolRegistry、stream extra 与 timeline 持久化统一改为透传 observation_text / summary / argument_view / result_view,不再只回写纯文本结果;context_tools、upsert_task_class 与旧 schedule/web 工具通过兼容包装接入新协议 2. 日程写工具注册继续收口——place / move / swap / batch_move / unplace / queue_apply_head_move 从 registry 内联实现下沉为独立 handler,降低注册表内参数解析与业务逻辑混写 3. 工具结果展示基础能力补齐——新增 execution_result / schedule_operation_handlers 公共件,为日程操作结果、参数本地化展示、blocked/failed/done 状态统一建模 前端: 4. AssistantPanel 接入结构化工具卡片渲染——新增 ToolCardRenderer,tool_call / tool_result 支持 argument_view / result_view 展示;schedule_completed 恢复为时间线内的占位卡片块,避免排程卡片脱离原消息顺序 5. 时间线类型与渲染收敛——schedule_agent.ts 补齐 ToolView 协议,AssistantPanel 改为按块渲染 tool / schedule_card / business_card,并移除旧 demo/prototype 路由与页面,收束正式面板代码路径 仓库: 6. AGENTS.md 新增协作约束——禁止擅自回滚、覆盖或删除用户/其他代理产生的工作区改动
This commit is contained in:
@@ -363,12 +363,19 @@ func buildTimelinePayloadFromStreamExtra(extra *newagentstream.OpenAIChunkExtra)
|
||||
"display_mode": string(extra.DisplayMode),
|
||||
}
|
||||
if extra.Tool != nil {
|
||||
payload["tool"] = map[string]any{
|
||||
toolPayload := map[string]any{
|
||||
"name": strings.TrimSpace(extra.Tool.Name),
|
||||
"status": strings.TrimSpace(extra.Tool.Status),
|
||||
"summary": strings.TrimSpace(extra.Tool.Summary),
|
||||
"arguments_preview": strings.TrimSpace(extra.Tool.ArgumentsPreview),
|
||||
}
|
||||
if len(extra.Tool.ArgumentView) > 0 {
|
||||
toolPayload["argument_view"] = cloneTimelinePayload(extra.Tool.ArgumentView)
|
||||
}
|
||||
if len(extra.Tool.ResultView) > 0 {
|
||||
toolPayload["result_view"] = cloneTimelinePayload(extra.Tool.ResultView)
|
||||
}
|
||||
payload["tool"] = toolPayload
|
||||
}
|
||||
if extra.Confirm != nil {
|
||||
payload["confirm"] = map[string]any{
|
||||
|
||||
Reference in New Issue
Block a user