workspace/ files existed on disk but were not included in previous incremental commit, causing git to record them as deleted. Re-adding all workspace card components, AgentWorkspace, ActivityTimeline, and WorkspaceCardRenderer to properly track them. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1.1 KiB
1.1 KiB
CoT (Chain of Thought) 实现方案
目标:当用户选择 Auto 或 Pro 模式时,实时展示模型推理过程(正在做什么)
文档结构
- architecture.md — 整体架构与数据流
- backend.md — 后端实现方案(Python/LangGraph)
- frontend.md — 前端实现方案(Next.js/React)
核心结论
方案选择:Prompt 标签 + 流式状态机解析
| 方案 | 描述 | 结论 |
|---|---|---|
| A. 原生 reasoning tokens | Azure o1/o3 的 reasoning_content | 备用升级路径,gpt-5.4 支持情况待验证 |
| B. Prompt 标签解析 ✅ | 注入 <think> 标签,流式解析 |
默认实现,兼容所有 GPT 模型 |
| C. LangGraph 多节点 | 专门的 thinking 节点 | 双倍延迟/成本,不采用 |
Auto vs Pro 差异
| 维度 | Flash | Auto | Pro |
|---|---|---|---|
| CoT | 关闭 | 轻量(关键决策点) | 完整(每步详细推理) |
| max_tokens | 500 | 2048 | 4096 |
| temperature | 0.2 | 0.3 | 0.3 |
| 前端 thinking UI | 无 | 3个脉冲点,done后消失 | 可折叠 thinking block |