@blueking/chat-x 0.0.27 → 0.0.29

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.
@@ -25,10 +25,10 @@ ActivityMessage 展示活动类消息:知识检索(knowledge_rag)、引用
25
25
  | `activityType` | 模式 | 标题文案 | 图标 | 内容区 |
26
26
  | ----------------- | -------------- | ------------------------------------ | ---------------- | ----------------------------------- |
27
27
  | `'knowledge_rag'` | 知识检索模式 | 检索中 / 检索完成(随 status 切换) | Loading / 文档 | Markdown 检索摘要 + 引用列表 |
28
- | `'flow-agent'` | FlowAgent 模式 | 执行情况: 成功 N / 失败 N / 执行中 N | Loading / 箭头 | 任务节点树 + 节点详情(自定义 Tab) |
28
+ | `'flow_agent'` | FlowAgent 模式 | 执行情况: 成功 N / 失败 N / 执行中 N | Loading / 箭头 | 任务节点树 + 节点详情(自定义 Tab) |
29
29
  | 其他任意值 | 引用文档模式 | 引用 N 篇资料作为参考 | 文档图标(固定) | 引用文档列表 |
30
30
 
31
- > **注意:** 只有值严格等于 `'knowledge_rag'` 才进入知识检索模式;严格等于 `'flow-agent'`(`MessageContentType.FlowAgent`)才进入 FlowAgent 模式;其他值均按引用文档模式处理。
31
+ > **注意:** 只有值严格等于 `'knowledge_rag'` 才进入知识检索模式;严格等于 `'flow_agent'`(`MessageContentType.FlowAgent`)才进入 FlowAgent 模式;其他值均按引用文档模式处理。
32
32
 
33
33
  ## 引用文档模式
34
34
 
@@ -151,7 +151,7 @@ ActivityMessage 展示活动类消息:知识检索(knowledge_rag)、引用
151
151
 
152
152
  ## FlowAgent 执行情况模式
153
153
 
154
- `activityType` 设为 `MessageContentType.FlowAgent`(`'flow-agent'`),`content` 传入 `BkFlowMessageContent` 对象。用于展示蓝鲸标准运维(BkFlow)任务的执行状态、节点列表和统计信息。
154
+ `activityType` 设为 `MessageContentType.FlowAgent`(`'flow_agent'`),`content` 传入 `BkFlowMessageContent` 对象。用于展示蓝鲸标准运维(BkFlow)任务的执行状态、节点列表和统计信息。
155
155
 
156
156
  ### 核心交互
157
157
 
@@ -163,7 +163,7 @@ ActivityMessage 展示活动类消息:知识检索(knowledge_rag)、引用
163
163
  ### 内部渲染结构
164
164
 
165
165
  ```
166
- FlowAgentContent(activityType = 'flow-agent')
166
+ FlowAgentContent(activityType = 'flow_agent')
167
167
  ├── ActivityLayout(公共折叠布局容器)
168
168
  │ └── #title
169
169
  │ ├── Loading / ArrowIcon(随 status 切换)
@@ -260,7 +260,7 @@ const messages = [
260
260
  {
261
261
  id: '3',
262
262
  role: 'activity',
263
- activityType: MessageContentType.FlowAgent, // 'flow-agent'
263
+ activityType: MessageContentType.FlowAgent, // 'flow_agent'
264
264
  status: MessageStatus.Streaming,
265
265
  content: {
266
266
  task_id: 100,
@@ -323,9 +323,9 @@ type BkFlowNode = {
323
323
  };
324
324
 
325
325
  enum MessageContentType {
326
- FlowAgent = 'flow-agent',
327
- KnowledgeRag = 'knowledge-rag',
328
- ReferenceDocument = 'reference-document',
326
+ FlowAgent = 'flow_agent',
327
+ KnowledgeRag = 'knowledge_rag',
328
+ ReferenceDocument = 'reference_document',
329
329
  // ...
330
330
  }
331
331
  ```
@@ -376,7 +376,7 @@ enum MessageContentType {
376
376
  | 属性名 | 类型 | 默认值 | 说明 |
377
377
  | ------------ | --------------------------------------------------------------------------- | ------ | --------------------------------------------------------- |
378
378
  | content | `ReferenceDocumentContent[] \| KnowledgeRagContent \| BkFlowMessageContent` | - | 内容数据,格式随 `activityType` 不同 |
379
- | activityType | `'knowledge_rag' \| 'flow-agent' \| 'reference_document' \| string` | - | 活动类型,决定渲染模式(知识检索 / FlowAgent / 引用文档) |
379
+ | activityType | `'knowledge_rag' \| 'flow_agent' \| 'reference_document' \| string` | - | 活动类型,决定渲染模式(知识检索 / FlowAgent / 引用文档) |
380
380
  | status | `MessageStatus` | - | 消息状态,仅在 `knowledge_rag` 模式下影响标题和图标 |
381
381
  | id | `string \| number` | - | 消息 ID |
382
382
  | messageId | `string \| number` | - | 消息唯一标识 |
@@ -407,9 +407,9 @@ interface KnowledgeRagContent {
407
407
 
408
408
  // activityType 枚举值
409
409
  enum MessageContentType {
410
- FlowAgent = 'flow-agent',
411
- KnowledgeRag = 'knowledge-rag',
412
- ReferenceDocument = 'reference-document',
410
+ FlowAgent = 'flow_agent',
411
+ KnowledgeRag = 'knowledge_rag',
412
+ ReferenceDocument = 'reference_document',
413
413
  // ...
414
414
  }
415
415
  ```
@@ -418,7 +418,7 @@ enum MessageContentType {
418
418
 
419
419
  - **知识检索过程**:以 `knowledge_rag` 模式展示 RAG 检索全过程,从"检索中"到"检索完成"的状态流转
420
420
  - **参考资料引用**:以 `reference_document` 模式展示 AI 回复所引用的参考文档列表
421
- - **FlowAgent 执行监控**:以 `flow-agent` 模式展示 BkFlow 流程执行状态、节点列表和详情
421
+ - **FlowAgent 执行监控**:以 `flow_agent` 模式展示 BkFlow 流程执行状态、节点列表和详情
422
422
  - **流式场景**:`pending` → `streaming` → `complete` 状态变化配合流式响应实时更新
423
423
  - **自动渲染**:通过 `MessageContainer` 或 `MessageRender` 自动处理 `role: 'activity'` 消息,无需手动引入
424
424
 
@@ -79,11 +79,12 @@ enum MessageStatus {
79
79
  ```typescript
80
80
  enum MessageContentType {
81
81
  Binary = 'binary',
82
+ FlowAgent = 'flow_agent',
82
83
  Function = 'function',
83
- KeyValue = 'key-value',
84
- KnowledgeRag = 'knowledge-rag',
84
+ KeyValue = 'key_value',
85
+ KnowledgeRag = 'knowledge_rag',
85
86
  Other = 'other',
86
- ReferenceDocument = 'reference-document',
87
+ ReferenceDocument = 'reference_document',
87
88
  Text = 'text',
88
89
  }
89
90
  ```
@@ -207,7 +207,7 @@ enum MessageContentType {
207
207
  ReferenceDocument = 'reference_document', // ReferenceDocumentContent[],引用列表
208
208
  Binary = 'binary',
209
209
  Function = 'function',
210
- KeyValue = 'key-value',
210
+ KeyValue = 'key_value',
211
211
  KnowledgeRag = 'knowledge_rag',
212
212
  Other = 'other',
213
213
  }
@@ -378,20 +378,23 @@ enum MessageContentType {
378
378
  // 二进制内容
379
379
  Binary = 'binary',
380
380
 
381
+ // FlowAgent 流程执行
382
+ FlowAgent = 'flow_agent',
383
+
381
384
  // 函数调用
382
385
  Function = 'function',
383
386
 
384
387
  // 键值对
385
- KeyValue = 'key-value',
388
+ KeyValue = 'key_value',
386
389
 
387
390
  // 知识检索
388
- KnowledgeRag = 'knowledge-rag',
391
+ KnowledgeRag = 'knowledge_rag',
389
392
 
390
393
  // 其他
391
394
  Other = 'other',
392
395
 
393
396
  // 引用文档
394
- ReferenceDocument = 'reference-document',
397
+ ReferenceDocument = 'reference_document',
395
398
 
396
399
  // 文本
397
400
  Text = 'text',
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "2.0.0",
3
- "generatedAt": "2026-04-17T06:33:00.809Z",
3
+ "generatedAt": "2026-04-20T08:50:14.604Z",
4
4
  "domains": {
5
5
  "message": {
6
6
  "label": "消息展示",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/chat-x",
3
- "version": "0.0.27",
3
+ "version": "0.0.29",
4
4
  "description": "蓝鲸智云 AI Chat 组件库 —— 遵循 AG-UI,为 AI Agent 和人类开发者共同设计的对话 UI 组件库。",
5
5
  "main": "index.js",
6
6
  "scripts": {