@blueking/chat-x 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,10 +44,8 @@ ai-chat-container
44
44
  └── main(主内容区)
45
45
  ├── MessageContainer(有消息时)
46
46
  │ └── 消息列表 + 工具栏
47
- ├── 欢迎页(无消息时)
48
- ├── AIBluekingBannerIcon
49
- │ ├── 欢迎标题
50
- │ └── welcome 插槽(默认:开场白 ContentRender)
47
+ ├── 欢迎页(无消息时,容器 .ai-welcome-content)
48
+ └── welcome 插槽(默认:Banner + 欢迎标题 + 开场白 ContentRender;自定义则整块替换)
51
49
  ├── SelectionFooter(分享模式时)
52
50
  ├── ShortcutRender(有快捷指令时)
53
51
  └── ChatInput(默认状态)
@@ -227,7 +225,7 @@ ai-chat-container
227
225
  </template>
228
226
  ```
229
227
 
230
- > **注意**:使用 `welcome` 插槽后,默认的 `openingRemark` 渲染(`ContentRender`)将被替换,需要自行处理开场白展示逻辑。
228
+ > **注意**:使用 `welcome` 插槽后,将**整块替换**默认欢迎区(含 Banner 图标、默认欢迎标题与 `openingRemark` 的 `ContentRender` 渲染),需自行编排完整欢迎页;插槽参数 `openingRemark` 仍可用于读取传入的开场白文本。
231
229
 
232
230
  **渲染效果**
233
231
 
@@ -364,7 +362,7 @@ ChatContainer 的 Props 继承自 `ChatInputProps` 和 `MessageContainerProps`
364
362
  | codeHeader | `{ language: string; token: Token[] }` | 代码块头部自定义操作区域,透传给 MessageRender → ContentRender → MarkdownContent → CodeContent |
365
363
  | default | 消息列表相关绑定(messages 等) | 自定义消息列表区域 |
366
364
  | message | `{ message, messageToolsStatus }` | 自定义单条消息渲染 |
367
- | welcome | `{ openingRemark: string }` | 自定义欢迎页内容,替换默认的 openingRemark 渲染,无消息时显示 |
365
+ | welcome | `{ openingRemark: string }` | 无消息时自定义欢迎页;传入则替换默认 Banner、标题与开场白区域(整块替换) |
368
366
 
369
367
  ### Expose
370
368
 
@@ -43,6 +43,8 @@ props.content → completeMarkdownSyntax → md.parse → groupTokens → groupe
43
43
  └──── handleTokenMounted(throttle 100ms)→ containerScroll.toScrollBottom()
44
44
  ```
45
45
 
46
+ `VNodeRenderer` 的 `options` 中包含与当前 `MarkdownIt` 实例一致的 `mditOptions`(即 `md.options`),以便 `tokensToVNodes` 调用 `renderer.rules` 时第三参与 markdown-it 原生规则签名一致。
47
+
46
48
  ### Token 分组(groupTokens)
47
49
 
48
50
  `groupTokens` 使用栈将扁平 Token 数组转为分组数组,每组对应一个顶层 DOM 节点(段落、标题、列表、代码块等):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/chat-x",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "蓝鲸智云 AI Chat 组件库 —— 遵循 AG-UI,为 AI Agent 和人类开发者共同设计的对话 UI 组件库。",
5
5
  "main": "index.js",
6
6
  "scripts": {