Skip to content
Latestv1.0.63

AiThinking ​

Used to display the reasoning state of AI models before generating the final output, allowing detailed thoughts to be collapsed for a cleaner chat interface.

Basic Usage ​

Control the current thinking state using the status prop.

Basic Usage

Auto Collapse ​

Set auto-collapse to true. When status changes to end, the component will automatically collapse the detail area.

Auto Collapse

Nuxt Support ​

This component fully supports Nuxt 3/4 SSR. In a Nuxt project, it is auto-imported.

For more details, refer to Nuxt Integration Guide.

API ​

Props ​

NameDescriptionTypeDefault
modelValue / v-modelWhether the details are expandedbooleanfalse
statusThinking status'start' | 'thinking' | 'end' | 'error''thinking'
titleCustom title textstring—
contentDetail content textstring—
auto-collapseCollapses once status is 'end'booleanfalse

Slots ​

NameDescription
defaultCustom details section content

Theme Variables ​

AiThinking uses a compact design to maintain clarity in message flows while offering high extensibility:

AI Thinking CSS Variables

Variable NameDefault Value
--yh-ai-thinking-bgvar(--yh-fill-color-light)
--yh-ai-thinking-border-radius8px

Released under the MIT License.