feat(chat): add ChatThoughtChain component - #6720
Open
fnfxy2017 wants to merge 2 commits into
Open
Conversation
新增 ChatThoughtChain 思维链组件,以时间线形式结构化展示 AI 的思考/计划 步骤,支持节点状态(pending/processing/success/error)、自定义图标/标题/ 内容插槽、节点内容折叠展开(受控与非受控)及流式追加场景。 Closes Tencent#6640
fnfxy2017
requested review from
Cat1007,
PengYYYYY,
Wesley-0808,
chaishi,
liweijie0812,
uyarn,
zhangpaopao0609 and
zydemail
as code owners
June 11, 2026 11:24
BASE_DOC 依赖 tdesign-common 子仓库的 docs/web/api/chat-thought-chain.md, 该文件尚不存在导致文档页无 demo 内容,改为在组件 md 内直接编写文档主体 与 demo 占位符。
Collaborator
TDesign Component Site Preview Open
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #6640
Summary
新增
ChatThoughtChain思维链组件,用于以时间线/步骤形式结构化展示 AI 的思考过程与执行计划(参考 issue 中提到的 ai-elements-vue Chain of Thought 与 semi.design 同类组件),补足现有ChatReasoning(单一折叠面板)在复杂 Agent 场景下表现力不足的问题。主要能力:
items节点列表,每个节点支持title/content/status(pending / processing / success / error,对应默认图标与配色)/ 自定义iconcollapsible、受控v-model:expandedValue与非受控defaultExpandedValue、expand-change事件title/content/icon插槽(带{ item, index }参数),支持完全自定义渲染包含:组件实现(tsx + 临时 less,待样式沉淀至 tdesign-common 后迁移)、类型定义、API 文档(md)、3 个示例(基础 / 流式执行 / 自定义插槽)、单元测试,并已注册到入口导出与 chat 站点导航。
How verified
eslint --max-warnings 0对改动文件通过;tsc --noEmit全仓通过pnpm run dev:chat启动站点,/vue-next-chat/components/chat-thought-chain文档页与 3 个示例均正常渲染🤖 Generated with Claude Code