Skip to content

feat: 支持显示思维链功能 - #1

Merged
nolaurence merged 1 commit into
codex/bundle-midscene-previewfrom
trae/agent-G10qrE
Jul 24, 2026
Merged

nolaurence merged 1 commit into
codex/bundle-midscene-previewfrom
trae/agent-G10qrE

Conversation

@nolaurence

Copy link
Copy Markdown
Owner

概述

为推理型 provider(Codex reasoning / Claude thinking / Pi thinking_delta / OpenCode reasoning)增加端到端的思维链展示能力。推理内容与 assistant 文本共享同一消息 ID,以可折叠的「Thinking」区块在 UI 中渲染。

改动

  • contracts: OrchestrationMessage.reasoningText(可选)、ThreadMessageSentPayload.reasoning、thread.message.assistant.reasoning.delta 命令
  • decider/projector: 新增 reasoning delta 命令分支,流式合并 reasoningText(streaming 追加 / completion 替换)
  • ingestion: 提取 reasoning_text/reasoning_summary_text 增量,复用 createBufferedTextStore 缓冲,遵循 enableAssistantStreaming 投递模式
  • 持久化: ProjectionThreadMessage 加 reasoningText,SQLite upsert/SELECT 补 reasoning_text 列,新增 migration 033
  • ProjectionPipeline / ProjectionSnapshotQuery: 投影与读取模型双向贯通
  • UI: AssistantReasoningBlock 可折叠组件,流式时自动展开、完成后自动收起
  • i18n: 中英文 chat.reasoning.* 键

验证

  • vp run typecheck 通过(0 错误)
  • vp check 格式化通过
  • ingestion 42/42、orchestration+persistence 179/179、contracts+client-runtime+web 452/452 测试通过

为推理型 provider(Codex reasoning / Claude thinking / Pi thinking_delta /
OpenCode reasoning)增加端到端的思维链展示能力。推理内容与 assistant 文本
共享同一消息 ID,以可折叠的「Thinking」区块在 UI 中渲染。

- contracts: OrchestrationMessage.reasoningText(可选)、ThreadMessageSentPayload.reasoning、
  thread.message.assistant.reasoning.delta 命令
- decider/projector: 新增 reasoning delta 命令分支,流式合并 reasoningText
  (streaming 追加 / completion 替换)
- ingestion: 提取 reasoning_text / reasoning_summary_text 增量,复用
  createBufferedTextStore 缓冲逻辑,遵循 enableAssistantStreaming 投递模式
- 持久化: ProjectionThreadMessage 增加 reasoningText,SQLite upsert/SELECT
  补 reasoning_text 列,新增 migration 033
- ProjectionPipeline / ProjectionSnapshotQuery: 投影与读取模型双向贯通
- UI: AssistantReasoningBlock 可折叠组件,流式时自动展开、完成后自动收起
- i18n: 中英文 chat.reasoning.* 键

验证: vp run typecheck / vp check 通过;ingestion 42/42、orchestration+
persistence 179/179、contracts+client-runtime+web 452/452 测试通过

Co-authored-by: traeagent <[email protected]>
@nolaurence
nolaurence merged commit 741f264 into codex/bundle-midscene-preview Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant