feat(llm): console_log.llm 控制可读单行流程日志,并追踪路由 AI 决策
autoreply.Service 增加 consoleLog 字段和 logf 辅助;processMessage 中 原本的 printJSON map dump 全部替换为 [llm] 前缀的单行 key=value 输出。 关闭开关时整条链路静默。 把原本传 nil 给 toolrouter.RunAgentToolLoop 的 emit 接进来,将 stream.Frame trace 帧渲染为可读行,区分三类来源: - 主 AI:main_model / completion / 最终 reply - 路由 AI:router=<model> prepare/decide iter=N → call_tools=[...] / no_tool - 工具调用:tool=<name> args=... / result(Nms)=... / ERROR ... ai.Config 增加 ConsoleLog 字段,由 main.go 传入 cfg.ConsoleLog.LLM, 再透传给 autoreply.NewService。 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Reference in New Issue
Block a user