@blueking/chat-x 0.0.26 → 0.0.28
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.
- package/dist/ag-ui/types/constants.d.ts +3 -3
- package/dist/ag-ui/types/contents.d.ts +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/lang/lang.d.ts +2 -1
- package/dist/mcp/generated/docs/activity-message.md +13 -13
- package/dist/mcp/generated/docs/constants.md +4 -3
- package/dist/mcp/generated/docs/content-render.md +1 -1
- package/dist/mcp/generated/docs/messages.md +6 -3
- package/dist/mcp/generated/index.json +1 -1
- package/package.json +1 -1
package/dist/lang/lang.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare const lang: {
|
|
|
9
9
|
readonly 删除: "Delete";
|
|
10
10
|
readonly 引用: "Quote";
|
|
11
11
|
readonly 重新生成: "Regenerate";
|
|
12
|
+
readonly 重新生成将清空下文内容: "Regenerating will clear the content below";
|
|
12
13
|
readonly 提交: "Submit";
|
|
13
14
|
readonly 取消: "Cancel";
|
|
14
15
|
readonly 预览内容: "Preview Content";
|
|
@@ -96,4 +97,4 @@ export declare const lang: {
|
|
|
96
97
|
readonly 清空搜索: "Clear Search";
|
|
97
98
|
readonly 搜索结果为空: "Search Result is Empty";
|
|
98
99
|
};
|
|
99
|
-
export declare const t: (key: keyof typeof lang) => "Send" | "Stop" | "Ask AI" | "Copy" | "Share" | "Like" | "Unsatisfied" | "Delete" | "Quote" | "Regenerate" | "Submit" | "Cancel" | "Preview Content" | "Jump to Detail" | "Call Tool:" | "Calling..." | "Call Success" | "Call Failed" | "Tell us your thoughts" | "What makes you satisfied?" | "What makes you dissatisfied?" | "Return Content" | "Edit" | "Deep Thinking" | "Loading image..." | "Failed to load image" | "Thinking..." | "Thinking Completed" | "Thinking Failed" | "Copy Success" | "Copy Failed" | "Return to bottom" | "Stop generating" | "Stopping" | "Duration" | "Parameters" | "Description" | "Execution Status" | "Running" | "Success" | "Failed" | "Pending" | "To Be Executed" | "Details" | "Node" | "Node Config" | "Node Output" | "Basic Info" | "Flow Template" | "Node Name" | "Step Name" | "Execution Plan" | "Optional" | "Failure Handler" | "Timeout Control" | "Yes" | "No" | "Input Params" | "Output Params" | "Param Name" | "Param Value" | "Name" | "Structured Output" | "Manual Skip" | "No Data" | "Call MCP:" | "More" | "Searching" | "Search Completed" | "Upload File" | "Requesting..." | "Cancel satisfied" | "Cancel dissatisfied" | "Confirm delete this answer?" | "This operation cannot be undone. Please proceed with caution!" | "Preview" | "Zoom Out" | "Zoom In" | "Rotate" | "Download" | "Sorry, image loading failed. Please try reloading." | "Reset" | "Reload" | "W" | "H" | "Upload Image" | "Search keyword" | "Select date" | "Locate in Chat" | "Select All" | "Confirm" | "Upload Image, up to 3 images supported, max 2.4MB each" | "Hello, I am BlueKing AI Bot" | "Clear Search" | "Search Result is Empty" | "发送" | "停止" | "问问小鲸" | "复制" | "分享" | "点赞" | "不满意" | "删除" | "引用" | "重新生成" | "提交" | "取消" | "预览内容" | "跳转详情" | "调用工具:" | "调用中" | "调用成功" | "调用失败" | "说出您的想法" | "什么原因让你满意?" | "什么原因让你不满意?" | "返回内容" | "编辑" | "深度思考" | "图片加载中..." | "图片加载失败" | "思考中" | "已思考完成" | "思考失败" | "复制成功" | "复制失败" | "返回底部" | "停止生成" | "正在停止" | "耗时" | "参数" | "描述" | "执行情况" | "执行中" | "成功" | "失败" | "挂起" | "待执行" | "详情" | "节点" | "节点配置" | "节点输出" | "基础信息" | "流程模板" | "节点名称" | "步骤名称" | "执行方案" | "是否可选" | "失败处理" | "超时控制" | "是" | "否" | "输入参数" | "输出参数" | "参数名" | "参数值" | "名称" | "变量说明" | "结构化输出" | "手动跳过" | "暂无数据" | "调用 MCP:" | "更多" | "检索中" | "检索完成" | "上传文件" | "请求中..." | "取消满意" | "取消不满意" | "确认删除该回答?" | "删除操作无法撤回,请谨慎操作!" | "预览" | "缩小" | "放大" | "旋转" | "下载" | "抱歉,图片加载失败,可尝试重新加载" | "重置" | "重新加载" | "宽" | "高" | "上传图片" | "搜索 关键字" | "选择日期" | "在对话中定位" | "全选" | "确定" | "上传图片, 最多支持上传 3 个, 最大支持 2.4MB" | "你好,我是小鲸" | "清空搜索" | "搜索结果为空";
|
|
100
|
+
export declare const t: (key: keyof typeof lang) => "Send" | "Stop" | "Ask AI" | "Copy" | "Share" | "Like" | "Unsatisfied" | "Delete" | "Quote" | "Regenerate" | "Regenerating will clear the content below" | "Submit" | "Cancel" | "Preview Content" | "Jump to Detail" | "Call Tool:" | "Calling..." | "Call Success" | "Call Failed" | "Tell us your thoughts" | "What makes you satisfied?" | "What makes you dissatisfied?" | "Return Content" | "Edit" | "Deep Thinking" | "Loading image..." | "Failed to load image" | "Thinking..." | "Thinking Completed" | "Thinking Failed" | "Copy Success" | "Copy Failed" | "Return to bottom" | "Stop generating" | "Stopping" | "Duration" | "Parameters" | "Description" | "Execution Status" | "Running" | "Success" | "Failed" | "Pending" | "To Be Executed" | "Details" | "Node" | "Node Config" | "Node Output" | "Basic Info" | "Flow Template" | "Node Name" | "Step Name" | "Execution Plan" | "Optional" | "Failure Handler" | "Timeout Control" | "Yes" | "No" | "Input Params" | "Output Params" | "Param Name" | "Param Value" | "Name" | "Structured Output" | "Manual Skip" | "No Data" | "Call MCP:" | "More" | "Searching" | "Search Completed" | "Upload File" | "Requesting..." | "Cancel satisfied" | "Cancel dissatisfied" | "Confirm delete this answer?" | "This operation cannot be undone. Please proceed with caution!" | "Preview" | "Zoom Out" | "Zoom In" | "Rotate" | "Download" | "Sorry, image loading failed. Please try reloading." | "Reset" | "Reload" | "W" | "H" | "Upload Image" | "Search keyword" | "Select date" | "Locate in Chat" | "Select All" | "Confirm" | "Upload Image, up to 3 images supported, max 2.4MB each" | "Hello, I am BlueKing AI Bot" | "Clear Search" | "Search Result is Empty" | "发送" | "停止" | "问问小鲸" | "复制" | "分享" | "点赞" | "不满意" | "删除" | "引用" | "重新生成" | "重新生成将清空下文内容" | "提交" | "取消" | "预览内容" | "跳转详情" | "调用工具:" | "调用中" | "调用成功" | "调用失败" | "说出您的想法" | "什么原因让你满意?" | "什么原因让你不满意?" | "返回内容" | "编辑" | "深度思考" | "图片加载中..." | "图片加载失败" | "思考中" | "已思考完成" | "思考失败" | "复制成功" | "复制失败" | "返回底部" | "停止生成" | "正在停止" | "耗时" | "参数" | "描述" | "执行情况" | "执行中" | "成功" | "失败" | "挂起" | "待执行" | "详情" | "节点" | "节点配置" | "节点输出" | "基础信息" | "流程模板" | "节点名称" | "步骤名称" | "执行方案" | "是否可选" | "失败处理" | "超时控制" | "是" | "否" | "输入参数" | "输出参数" | "参数名" | "参数值" | "名称" | "变量说明" | "结构化输出" | "手动跳过" | "暂无数据" | "调用 MCP:" | "更多" | "检索中" | "检索完成" | "上传文件" | "请求中..." | "取消满意" | "取消不满意" | "确认删除该回答?" | "删除操作无法撤回,请谨慎操作!" | "预览" | "缩小" | "放大" | "旋转" | "下载" | "抱歉,图片加载失败,可尝试重新加载" | "重置" | "重新加载" | "宽" | "高" | "上传图片" | "搜索 关键字" | "选择日期" | "在对话中定位" | "全选" | "确定" | "上传图片, 最多支持上传 3 个, 最大支持 2.4MB" | "你好,我是小鲸" | "清空搜索" | "搜索结果为空";
|
|
@@ -25,10 +25,10 @@ ActivityMessage 展示活动类消息:知识检索(knowledge_rag)、引用
|
|
|
25
25
|
| `activityType` | 模式 | 标题文案 | 图标 | 内容区 |
|
|
26
26
|
| ----------------- | -------------- | ------------------------------------ | ---------------- | ----------------------------------- |
|
|
27
27
|
| `'knowledge_rag'` | 知识检索模式 | 检索中 / 检索完成(随 status 切换) | Loading / 文档 | Markdown 检索摘要 + 引用列表 |
|
|
28
|
-
| `'
|
|
28
|
+
| `'flow_agent'` | FlowAgent 模式 | 执行情况: 成功 N / 失败 N / 执行中 N | Loading / 箭头 | 任务节点树 + 节点详情(自定义 Tab) |
|
|
29
29
|
| 其他任意值 | 引用文档模式 | 引用 N 篇资料作为参考 | 文档图标(固定) | 引用文档列表 |
|
|
30
30
|
|
|
31
|
-
> **注意:** 只有值严格等于 `'knowledge_rag'` 才进入知识检索模式;严格等于 `'
|
|
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`(`'
|
|
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 = '
|
|
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, // '
|
|
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 = '
|
|
327
|
-
KnowledgeRag = '
|
|
328
|
-
ReferenceDocument = '
|
|
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' \| '
|
|
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 = '
|
|
411
|
-
KnowledgeRag = '
|
|
412
|
-
ReferenceDocument = '
|
|
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 执行监控**:以 `
|
|
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 = '
|
|
84
|
-
KnowledgeRag = '
|
|
84
|
+
KeyValue = 'key_value',
|
|
85
|
+
KnowledgeRag = 'knowledge_rag',
|
|
85
86
|
Other = 'other',
|
|
86
|
-
ReferenceDocument = '
|
|
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 = '
|
|
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 = '
|
|
388
|
+
KeyValue = 'key_value',
|
|
386
389
|
|
|
387
390
|
// 知识检索
|
|
388
|
-
KnowledgeRag = '
|
|
391
|
+
KnowledgeRag = 'knowledge_rag',
|
|
389
392
|
|
|
390
393
|
// 其他
|
|
391
394
|
Other = 'other',
|
|
392
395
|
|
|
393
396
|
// 引用文档
|
|
394
|
-
ReferenceDocument = '
|
|
397
|
+
ReferenceDocument = 'reference_document',
|
|
395
398
|
|
|
396
399
|
// 文本
|
|
397
400
|
Text = 'text',
|