add vitepress docs

This commit is contained in:
Timi
2026-09-21 16:05:14 +08:00
parent b435bf992e
commit 37cf38fe27
73 changed files with 7003 additions and 802 deletions
+29
View File
@@ -0,0 +1,29 @@
# AiChatThinking 思考过程
折叠展示模型的思考分段,生成中自动展开。
## 基础用法
:::preview 基础用法 || 逐段追加内容,生成中会自动滚到底部
demo-preview=../demos/ai-chat-thinking/basic.vue
:::
## 何时使用
需要把模型的推理过程单独呈现时使用,通常由 [AiChatMessageList](/components/ai-chat-message-list) 内部调用,也可以单独摆放。
## 行为
- `isGenerating` 为真时展开并跟随滚动到底部,结束后收起
- 内容受 `max-height` 限制,超出时内部滚动
- 容器带 `role="log"` 与 `aria-live="polite"`,屏幕阅读器会播报增量
## 与消息的关系
消息的 `thinkingList` 是一组分段(`{ id, content }`),[AiChatMessageList](/components/ai-chat-message-list) 会把它们拼成完整文本后传进来。
## API
<api-table name="AiChatThinking" />