logoAnt Design X

ThoughtChain

The ThoughtChain component is used to visualize and track the call chain of Actions and Tools invoked by an Agent.
Import
import{ ThoughtChain }from"@ant-design/x";

When To Use

  • Debug and trace complex call chains in the Agent System.
  • Similar chain-like scenarios.

Examples

1
Thought Chain Item Titledescription
2
Thought Chain Item Titledescription
3
Thought Chain Item Titledescription
4
Thought Chain Item Titledescription

Basic usage.

codepen icon
External Link Icon
expand codeexpand code
1
Thought Chain Item Titledescription
2
Thought Chain Item Titledescription
3
Thought Chain Item Titledescription
4
Thought Chain Item Titledescription

The ThoughtChain supports three sizes of small, middle and large. Default size is middle.

codepen icon
External Link Icon
expand codeexpand code
Thought Chain Item - 1status: success
Thought Chain Item - 2status: error

The thought chain nodes support configuring the status property to clearly indicate the current execution status of the node.

codepen icon
External Link Icon
expand codeexpand code
1
Click me to expand the contentCollapsible
2
Click me to expand the contentCollapsible

Configure collapsible to enable the expand for the content area of thought chain nodes.

codepen icon
External Link Icon
expand codeexpand code
Thought Chain Item Titledescription
In the process of internal desktop applications development, many different design specs and implementations would be involved, which might cause designers and developers difficulties and duplication and reduce the efficiency of development.
After massive project practice and summaries, Ant Design, a design language for background applications, is refined by Ant UED Team, which aims to uniform the user interface specs for internal background projects, lower the unnecessary cost of design differences and implementation and liberate the resources of design and front-end development
Thought Chain Item Titledescription
In the process of internal desktop applications development, many different design specs and implementations would be involved, which might cause designers and developers difficulties and duplication and reduce the efficiency of development.
After massive project practice and summaries, Ant Design, a design language for background applications, is refined by Ant UED Team, which aims to uniform the user interface specs for internal background projects, lower the unnecessary cost of design differences and implementation and liberate the resources of design and front-end development
Thought Chain Item Titledescription
In the process of internal desktop applications development, many different design specs and implementations would be involved, which might cause designers and developers difficulties and duplication and reduce the efficiency of development.
After massive project practice and summaries, Ant Design, a design language for background applications, is refined by Ant UED Team, which aims to uniform the user interface specs for internal background projects, lower the unnecessary cost of design differences and implementation and liberate the resources of design and front-end development

The items property supports flexible customization. For more details, refer to the ThoughtChainItem definition.

codepen icon
External Link Icon
expand codeexpand code
1
1 - Thought Chain Itemdescription
2
2 - Thought Chain Itemdescription

The ThoughtChain component supports nested usage.

codepen icon
External Link Icon
expand codeexpand code

API

Common props ref:Common props

ThoughtChainProps

PropertyDescriptionTypeDefaultVersion
collapsibleWhether collapsibleboolean | CollapsibleOptionsNone-
classNamesClass names for semantic structureRecord<'item' | 'itemHeader' | 'itemContent' | 'itemFooter', string>None-
itemsChain itemsThoughtChainItem[]None-
prefixClsCustom prefixstringNone-
rootClassNameCustom root class namestringNone-
sizeSize'large' | 'middle' | 'small''middle'-
stylesStyles for semantic structureRecord<'item' | 'itemHeader' | 'itemContent' | 'itemFooter', React.CSSProperties>None-

ThoughtChainItem

PropertyDescriptionTypeDefaultVersion
contentThought chain item contentReact.ReactNodeNone-
descriptionThought chain item descriptionReact.ReactNodeNone-
extraThought chain item extra contentReact.ReactNodeNone-
footerThought chain item footerReact.ReactNodeNone-
iconThought chain item iconReact.ReactNodeNone-
keyUnique identifierstringNone-
statusThought chain item status'pending' | 'success' | 'error'None-
titleThought chain item titleReact.ReactNodeNone-

CollapsibleOptions

PropertyDescriptionTypeDefaultVersion
expandedKeysCurrent expanded keysstring[]None-
onExpandCallback function when expanded keys change(expandedKeys: string[]) => voidNone-

Semantic DOM

Thought Chain Item Titledescription
Thought Chain Item Content
  • item
    Item
  • itemHeader
    Item Header
  • itemContent
    Item Content
  • itemFooter
    Item Footer

Design Token

Ask me