Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
b32a422
feat(chat): 封装webc组件
May 19, 2025
e8c210a
Merge branch 'develop' of https://github.com/Tencent/tdesign-common i…
May 28, 2025
80e7a8a
fix: tmp (#2155)
waiterxiaoyy May 28, 2025
d6f971e
fix(chat-sender): style of the chat-sender attachments padding
May 29, 2025
f6d9860
feat: 新增chatbot示例
May 30, 2025
c62c78d
Merge branch 'feature/attachments' of https://github.com/Tencent/tdes…
Jun 3, 2025
d60e4e0
feat(chat): 新增思考过程和消息体示例
Jun 9, 2025
d10c8ce
fix(chat): base示例重命名
Jun 9, 2025
a442936
feat(chat): 分享按钮国际化配置
Jun 11, 2025
f58aced
Merge branch 'develop' of https://github.com/Tencent/tdesign-common i…
Jun 11, 2025
62b909f
Merge branch 'develop' into feature/attachments
Jun 11, 2025
c423df8
feat(sender): sender输入框内置附件调整边距
Jun 12, 2025
694fc42
fix(sender): 内置附件样式调整
zydemail Jun 16, 2025
ef7741f
Merge branch 'develop' of https://github.com/Tencent/tdesign-common i…
zydemail Jun 17, 2025
ffbe52d
feat(chat): chatmessasg增加tvision
zydemail Jun 17, 2025
fc44517
Merge branch 'develop' of https://github.com/Tencent/tdesign-common i…
zydemail Jul 3, 2025
4d308b0
feat(sender): 新增input-prefix
zydemail Jul 3, 2025
10d4dbe
feat: 添加chatbot示例;添加attachmentslivedemo;修改chatsender背景色
Jul 7, 2025
a4c4d2b
Merge branch 'feature/attachments' of https://github.com/Tencent/tdes…
zydemail Jul 17, 2025
f134484
Merge branch 'develop' of https://github.com/Tencent/tdesign-common i…
zydemail Jul 29, 2025
20c25f3
Merge branch 'develop' of github.com:Tencent/tdesign-common into feat…
uyarn Aug 12, 2025
f624ced
Merge branch 'feature/attachments' of https://github.com/Tencent/tdes…
zydemail Aug 12, 2025
6d3eb13
chore: rename
uyarn Aug 13, 2025
af2daf3
Merge branch 'feature/attachments' of https://github.com/Tencent/tdes…
zydemail Aug 15, 2025
84013d0
feat: update padding for chat detail and text components
zydemail Sep 2, 2025
fefdb9a
fix: 保留chat-content组件容器的上下边距兼容其他
zydemail Sep 2, 2025
55f8765
fix: 兼容系统消息和模型切换消息样式
zydemail Sep 2, 2025
33092ec
feat: 新增chat-with-message示例
zydemail Sep 2, 2025
7b40c63
feat: 新增chat-with-message示例
zydemail Sep 2, 2025
76c3790
feat: 文档更新
zydemail Sep 3, 2025
2138e15
feat: 文档更新
zydemail Sep 3, 2025
cd9fd78
style(chat-sender): 优化输入框blur过渡动画
zhangjiaoalice Sep 24, 2025
220fdec
style(chat-sender): 发送按钮hover样式更改
zhangjiaoalice Sep 25, 2025
f110642
style(chat-sender): 发送按钮样式修复
zhangjiaoalice Sep 25, 2025
f73fcc1
style(chat-sender): 发送按钮样式修复
zhangjiaoalice Sep 25, 2025
023b24f
style(chat-sender): 修改sender组件存在附件时样式上的bug
zhangjiaoalice Sep 25, 2025
eb67b8c
style(chat-sender): 修改chat-sender组件action按钮的样式
zhangjiaoalice Sep 25, 2025
a270a7b
feat(chat-sender): 补充综合示例
zhangjiaoalice Sep 25, 2025
36f93e4
style(chat-sender): sender组件发送按钮过渡动画移除
zhangjiaoalice Sep 26, 2025
e9a4d31
style(chat-sender): sender 组件 textarea区域内边距更改
zhangjiaoalice Sep 26, 2025
1568689
docs: 新增 ChatMarkdown 消息内容 API 文档
zydemail Sep 28, 2025
d56c2f6
style: 调整聊天文本样式,新增系统及错误消息样式
zydemail Sep 29, 2025
1448a3a
docs: 删除 ChatAction 文档,新增 ChatActionbar 文档
zydemail Sep 29, 2025
118b96f
docs: 新增 chat-sender 综合示例;优化 _index.less 样式
zydemail Sep 29, 2025
e033c7f
docs: 更新 chat 组件文档,支持自动滚动及手动滚动检测
zydemail Oct 13, 2025
e622d9c
docs: 移除 API 文档中 SSE 流式与非流式说明
zydemail Oct 13, 2025
4d858d9
docs: 完善文档
zydemail Oct 17, 2025
2038eea
feat: chatbot新增agui场景示例
Oct 17, 2025
254694b
Merge branch 'feature/attachments' of https://github.com/Tencent/tdes…
Oct 17, 2025
944e65e
Merge branch 'feature/attachments' of https://github.com/Tencent/tdes…
zydemail Oct 17, 2025
e6c2d68
style: 调整选择器格式,新增按钮样式,替换多层阴影为变量
zydemail Oct 17, 2025
9f12a74
style: 调整聊天组件容器定位及默认聊天项样式格式
zydemail Oct 17, 2025
7066dce
chore(chat): fix style
uyarn Oct 20, 2025
1a92f21
chore: fix style
uyarn Oct 22, 2025
85a86a2
Merge branch 'feature/attachments' of https://github.com/Tencent/tdes…
zydemail Oct 27, 2025
9ab74ba
chore: optimize
uyarn Oct 29, 2025
91987e8
Merge branch 'feature/attachments' of https://github.com/Tencent/tdes…
zydemail Nov 3, 2025
9ed9b56
chore: update
uyarn Nov 4, 2025
c00848a
chore: update
uyarn Nov 4, 2025
a07ae69
fix: fix chatbot style
uyarn Nov 5, 2025
5ec81fb
chore: update desc
uyarn Nov 5, 2025
e7d503b
chore: optimize demo
uyarn Nov 12, 2025
ab94fa9
chore: remove filecard
uyarn Nov 15, 2025
22bbf57
Merge branch 'develop' of github.com:Tencent/tdesign-common into feat…
uyarn Nov 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/web/api/attachments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Attachments 文件附件
description: 文件附件。
isComponent: true
usage: { title: '', description: '' }
spline: aigc
---

### 基础使用

{{ attachments-base }}

### 滚动scrollX

{{ attachments-scrollX }}

### 滚动scrollY

{{ attachments-scrollY }}
12 changes: 0 additions & 12 deletions docs/web/api/chat-action.md

This file was deleted.

12 changes: 12 additions & 0 deletions docs/web/api/chat-actionbar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: ChatActionbar 对话操作栏
description: ChatActionbar 包含重新生成,点赞,点踩,复制按钮。 内置 Clipboard 可以复制聊天内容,提供按钮的交互样式,监听 actions 相关事件由业务层实现具体逻辑。
isComponent: true
usage: { title: "", description: "" }
spline: ai
---

### 聊天操作按钮

可以通过`actionBar`配置操作按钮选项和顺序
{{ chat-action }}
63 changes: 0 additions & 63 deletions docs/web/api/chat-ai.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/web/api/chat-content.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: ChatContent
title: ChatContent 对话正文
description: 支持 markdown 格式的渲染。
isComponent: true
usage: { title: "", description: "" }
Expand Down
2 changes: 1 addition & 1 deletion docs/web/api/chat-input.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: ChatInput
title: ChatInput 对话输入
description: 用于 对话输入。
isComponent: true
usage: { title: "", description: "" }
Expand Down
2 changes: 1 addition & 1 deletion docs/web/api/chat-item.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: ChatItem
title: ChatItem 对话单元
description: ChatItem 用于在聊天对话中显示单个 item。它可以展示用户的头像、昵称、时间、聊天内容。AI 聊天场景下提供模型切换提示,如果消息仍在发送过程中,它还可以显示一个 loading 效果。
isComponent: true
usage: { title: "", description: "" }
Expand Down
45 changes: 45 additions & 0 deletions docs/web/api/chat-list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: ChatList 对话列表
description: 用于展示对话或者普通对话场景的组件。
isComponent: true
usage: { title: "", description: "" }
spline: ai
---

### 基础问答

- chat 最基本的组件,包括头像、作者、时间、聊天内容,输入框,适用于各种需要进行聊天的场景。
- 支持新消息自动滚动到底部,自动检测用户滚动行为,当用户主动滚动时暂停自动滚动

{{ base }}

### 具名插槽

- 通过`avatar`可以调整头像,通过`name`可以调整昵称,通过`datetime`可以调整日期时间,通过`content`可以
调整聊天内容,通过`actionbar` 可以调整操作按钮,通过`footer` 可以调整 chat 的底部内容。
- 每个插槽都提供 `{ item, index }` 参数,方便获取当前消息数据和索引

{{ chat-footer-slot }}

### 默认插槽

- 使用 `t-chat-list` 嵌套 `t-chat-message` 遍历聊天列表的方式,提供更灵活的消息渲染控制
- 通过默认插槽自定义整个聊天列表的渲染逻辑
- 支持结构化内容类型:`text`、`markdown`、`thinking` 等
- 灵活配置聊天气泡对齐方式
- 支持配置聊天气泡框样式:基础、线框、文字


{{ chat-with-message }}

### AI 助手可拖拽

搭配`Dialog`非模态类对话框对话框组件

{{ chat-drag }}

### AI 助手悬窗

搭配`Drawer` 抽屉组件

{{ chat-drawer }}
2 changes: 1 addition & 1 deletion docs/web/api/chat-loading.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: ChatLoading
title: ChatLoading 对话加载
description: 适用于 Chat 对话场景下的加载组件。
isComponent: true
usage: { title: "", description: "" }
Expand Down
33 changes: 33 additions & 0 deletions docs/web/api/chat-markdown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: ChatMarkdown Markdown内容
description: Markdown格式的消息内容
isComponent: true
usage: { title: "", description: "" }
spline: ai
---

### 基础用法

{{ base }}

### 主题配置

目前仅支持对`代码块`的主题设置

{{ theme }}

### 配置项及加载插件

组件内置了`cherry-markdown`作为 markdown 解析引擎,可以通过配置项`options`来定制解析规则,其中通过 themeSetting 可以来设置。同时为了减小打包体积,我们只默认加载了部分必要插件,如果需要加载更多插件,可以通过查看[cherry-markdown 文档](https://github.com/Tencent/cherry-markdown/blob/dev/README.CN.md)配置开启,以下给出动态引入`katex公式`插件的示例。

{{ plugin }}

### 自定义事件响应

{{ event }}

### 自定义语法渲染

以下展示了如何基于`cherry createSyntaxHook`机制来实现自定义脚注,语法格式:**[ref:1|标题|摘要|链接]**, 更多更丰富的自定义语法功能和示例,可以参考[cherry-markdown 自定义语法](https://github.com/Tencent/cherry-markdown/wiki/%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AF%AD%E6%B3%95)

{{ footnote }}
33 changes: 33 additions & 0 deletions docs/web/api/chat-message.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: ChatMessage 对话消息体
description: 对话消息体
isComponent: true
usage: { title: '', description: '' }
spline: aigc
---

## 基础样式
### 气泡样式
对话消息气泡样式,分为基础、线框、文字,默认为文字

{{ chat-message-base }}

### 可配置角色,头像,昵称,位置

{{ configure }}

### 消息状态
{{ status }}

## 消息内容渲染
### 内置支持的几种消息内容
通过配置 `message type`属性,可以渲染内置的几种消息内容:**文件附件列表**、**思考过程**、**搜索结果**、**建议问题**、**Markdown格式内容**、**图片**, 通过`chatContentProps`属性来配置对应类型的属性
{{ content }}

### 消息内容自定义
可以通过`植入插槽content插槽`的方式实现,以下是引入了`tvision`自定义渲染`图表`组件的例子:
{{ custom }}

### 消息操作栏
消息底部操作栏,通过`植入插槽actionbar`的方式实现,可以直接使用`ChatActionBar`组件,也可以完全自定义实现
{{ action }}
2 changes: 1 addition & 1 deletion docs/web/api/chat-reasoning.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: ChatReasoning
title: ChatReasoning 思考过程
description: 带思维链的markdown渲染。在某些场景下输出最终回答之前,模型会先输出一段思维链内容,以提升最终答案的准确性。
isComponent: true
usage: { title: '', description: '' }
Expand Down
20 changes: 16 additions & 4 deletions docs/web/api/chat-sender.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: ChatSender
title: ChatSender 对话输入
description: 用于 AI 聊天的输入框,可以扩展模型、多模态等能力。
isComponent: true
usage: { title: "", description: "" }
Expand All @@ -8,10 +8,22 @@ spline: ai

### 基础输入框

{{ chat-sender }}
受控进行输入/发送等状态管理

### 输入框自定义
{{ chat-sender-base }}

### 附件输入

支持选择附件及展示附件列表,受控进行文件数据管理,示例中模拟了文件上传流程

{{ chat-sender-attachments }}

通过`prefix`,`suffix` 可以调整输入框左下角,右下角区域内容扩展。
### 输入框自定义
可输入区域前置部分 `input-prefix` ,输入框底部左侧区域 `footer-prefix` ,输入框底部操作区域 `suffix`

{{ chat-sender-slot }}


### 综合示例

{{ chat-sender-mix }}
35 changes: 35 additions & 0 deletions docs/web/api/chat-thinking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: ChatThinking 思考过程
description: 思考过程
isComponent: true
usage: { title: '', description: '' }
spline: aigc
---

## 基础用法
支持通过`maxHeight`来设置展示内容的最大高度,超出会自动滚动;

支持通过`collapsed`来控制面板是否折叠,示例中展示了当内容输出结束时自动收起的效果

{{ think-base }}


## 样式设置
支持通过`layout`来设置思考过程的布局方式

支持通过`animation`来设置思考内容加载过程的动画效果

{{ think-style }}


## API
### ChatThinking Props

名称 | 类型 | 默认值 | 说明 | 必传
-- | -- | -- | -- | --
content | Object | - | 思考内容对象。TS类型:`{ text?: string; title?: string }` | N
layout | String | block | 布局方式。可选项: block/border | N
status | ChatMessageStatus/Function | - | 思考状态。可选项:complete/stop/error/pending | N
maxHeight | Number | - | 内容区域最大高度,超出会自动滚动 | N
animation | String | circle | 加载动画类型。可选项: circle/moving/gradient | N
collapsed | Boolean | false | 是否折叠(受控) | N
37 changes: 0 additions & 37 deletions docs/web/api/chat.md

This file was deleted.

Loading