@blueking/chat-x 0.0.52-dev.5 → 2.4.0
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/components/chat-content/flow-agent-content/flow-agent-state.d.ts +1 -1
- package/dist/components/chat-content/flow-agent-content/use-flow-node-actions.d.ts +1 -1
- package/dist/composables/use-common.d.ts +9 -0
- package/dist/index.css +1 -1
- package/dist/index.js +2497 -2486
- package/dist/index.js.map +1 -1
- package/dist/lang/lang.d.ts +3 -2
- package/dist/mcp/generated/docs/activity-layout.md +4 -2
- package/dist/mcp/generated/docs/activity-message.md +4 -4
- package/dist/mcp/generated/docs/ai-selection.md +5 -2
- package/dist/mcp/generated/docs/ai-slash-input.md +4 -0
- package/dist/mcp/generated/docs/animation-text.md +5 -1
- package/dist/mcp/generated/docs/assistant-message.md +1 -1
- package/dist/mcp/generated/docs/chat-container.md +3 -1
- package/dist/mcp/generated/docs/chat-input.md +1 -0
- package/dist/mcp/generated/docs/cite-content.md +6 -2
- package/dist/mcp/generated/docs/common-error-content.md +8 -2
- package/dist/mcp/generated/docs/delete-tool.md +6 -1
- package/dist/mcp/generated/docs/desc-panel.md +5 -1
- package/dist/mcp/generated/docs/detail-section.md +3 -1
- package/dist/mcp/generated/docs/execution-summary.md +23 -1
- package/dist/mcp/generated/docs/file-content.md +8 -2
- package/dist/mcp/generated/docs/file-upload-btn.md +3 -1
- package/dist/mcp/generated/docs/flow-agent-content.md +24 -15
- package/dist/mcp/generated/docs/flow-agent-node-detail.md +5 -2
- package/dist/mcp/generated/docs/highlight-keyword.md +9 -31
- package/dist/mcp/generated/docs/input-attachment.md +3 -0
- package/dist/mcp/generated/docs/input-info-alert.md +3 -0
- package/dist/mcp/generated/docs/interrupt-message.md +6 -1
- package/dist/mcp/generated/docs/key-value-content.md +6 -1
- package/dist/mcp/generated/docs/knowledge-rag-content.md +4 -1
- package/dist/mcp/generated/docs/markdown-container.md +3 -0
- package/dist/mcp/generated/docs/markdown-content.md +2 -2
- package/dist/mcp/generated/docs/mention-tag.md +2 -0
- package/dist/mcp/generated/docs/mention-text.md +3 -0
- package/dist/mcp/generated/docs/message-container.md +4 -4
- package/dist/mcp/generated/docs/preview-toolbar.md +4 -0
- package/dist/mcp/generated/docs/reference-content.md +6 -1
- package/dist/mcp/generated/docs/reference-doc-content.md +3 -1
- package/dist/mcp/generated/docs/simple-table.md +3 -1
- package/dist/mcp/generated/docs/text-content.md +5 -1
- package/dist/mcp/generated/docs/tool-btn.md +10 -4
- package/dist/mcp/generated/docs/toolcall-render.md +8 -8
- package/dist/mcp/generated/docs/use-animation-text.md +2 -1
- package/dist/mcp/generated/docs/use-artifact-preview.md +11 -1
- package/dist/mcp/generated/docs/use-flow-node-actions.md +20 -10
- package/dist/mcp/generated/docs/user-question-card.md +31 -0
- package/dist/mcp/generated/docs/vnode-renderer.md +3 -3
- package/dist/mcp/generated/index.json +93 -100
- package/dist/mcp/tools/list-components.js +1 -0
- package/dist/mcp/tools/list-components.js.map +1 -1
- package/dist/mcp/utils/doc-loader.d.ts +1 -0
- package/dist/mcp/utils/doc-loader.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/package.json +2 -2
- package/skills/blueking-chat-x/references/components/ai-selection.md +1 -1
- package/dist/mcp/generated/docs/questions-container.md +0 -88
- package/dist/mcp/generated/docs/selection-question.md +0 -91
package/dist/lang/lang.d.ts
CHANGED
|
@@ -141,6 +141,8 @@ export declare const lang: {
|
|
|
141
141
|
readonly 全选: "Select All";
|
|
142
142
|
readonly 确定: "Confirm";
|
|
143
143
|
readonly '\u4E0A\u4F20\u6587\u4EF6\uFF0C\u6700\u591A\u652F\u6301 {count} \u4E2A\uFF0C\u5355\u4E2A\u6700\u5927 {size}MB': "Upload file, up to {count} files, max {size}MB each";
|
|
144
|
+
readonly '\u652F\u6301\u683C\u5F0F\uFF1A{formats}': "Supported formats: {formats}";
|
|
145
|
+
readonly '\u6709 {count} \u4E2A\u6587\u4EF6\u56E0\u683C\u5F0F\u4E0D\u652F\u6301\u672A\u6DFB\u52A0': "{count} file(s) were not added because the format is not supported";
|
|
144
146
|
readonly '\u4F60\u597D\uFF0C\u6211\u662F\u5C0F\u9CB8': "Hello, I am BlueKing AI Bot";
|
|
145
147
|
readonly 清空搜索: "Clear Search";
|
|
146
148
|
readonly 搜索结果为空: "Search Result is Empty";
|
|
@@ -170,6 +172,5 @@ export declare const lang: {
|
|
|
170
172
|
readonly '\u6587\u4EF6\u4E0A\u4F20\u4E2D\uFF0C\u8BF7\u7A0D\u5019': "Uploading files, please wait";
|
|
171
173
|
readonly '\u5B58\u5728\u4E0A\u4F20\u5931\u8D25\u7684\u6587\u4EF6\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u8BD5': "Remove failed uploads before sending";
|
|
172
174
|
readonly 上传失败: "Upload failed";
|
|
173
|
-
readonly '\u6709 {count} \u4E2A\u6587\u4EF6\u56E0\u683C\u5F0F\u4E0D\u652F\u6301\u672A\u6DFB\u52A0': "{count} file(s) were not added because the format is not supported";
|
|
174
175
|
};
|
|
175
|
-
export declare const t: (key: keyof typeof lang) => "Send" | "Stop" | "Add" | "Skill" | "MCP" | "Prompt" | "File" | "Image" | "Tool" | "Knowledge Base" | "Conversation Files" | "Collapse" | "Show More" | "Ask AI" | "Copy" | "Share" | "Like" | "Unsatisfied" | "Delete" | "Quote" | "Regenerate" | "Regenerating will clear the content below" | "Submit" | "Cancel" | "Preview Content" | "Jump to Detail" | "Call Tool" | "Read Skill" | "Calling" | "Reading" | "Tell us your thoughts" | "What makes you satisfied?" | "What makes you dissatisfied?" | "Return Content" | "Edit" | "Deep Thinking" | "Quick Thinking" | "Image to Text" | "Loading image..." | "Failed to load image" | "Thinking..." | "Thinking Completed" | "Thinking Failed" | "Copy Success" | "Copy Failed" | "Return to bottom" | "Stop generating" | "Stopping" | "Duration" | "Yesterday" | "Parameters" | "Description" | "Execution Status" | "Running" | "Success" | "Failed" | "Pending" | "To Be Executed" | "Details" | "Retry" | "Retrying" | "Skipping" | "The task is retrying and cannot be skipped" | "The task is skipping and cannot be retried" | "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" | "Algorithm Plan Review Ticket" | "Reviewing" | "Approving" | "Abandoned" | "Approved" | "Cancelled" | "Expired" | "Rejected" | "Revoked" | "Ticket No." | "Submitted At" | "Current Handler" | "None" | "View Ticket Detail" | "Copy Ticket" | "Copy Ticket Link" | "Cancel Approval" | "Approval Cancelled" | "Refresh Ticket Status" | "This ticket has been rejected and cannot be cancelled" | "This ticket has been approved and cannot be cancelled" | "This ticket has been cancelled, no need to click again" | "Approval cannot be cancelled in the current status" | "There are {count} pending approval tickets in the current conversation. To continue, cancel approval first." | "Unsupported interrupt message" | "Searching" | "Search Completed" | "Upload File" | "Select model" | "Search models" | "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 file, up to {count} files, max {size}MB each" | "Hello, I am BlueKing AI Bot" | "Clear Search" | "Search Result is Empty" | "Valid Evidence" | "Full Screen" | "Exit Full Screen" | "Please choose to continue" | "Continue" | "Received: " | "Done" | "Skip" | "Single" | "Multiple" | "Others" | "Completed" | "question(s)" | "Answers" | "Replied" | "Please enter..." | "File Artifacts" | "File List" | "Search file keyword" | "Failed to load preview" | "No file to preview" | "Uploading files, please wait" | "Remove failed uploads before sending" | "Upload failed" | "
|
|
176
|
+
export declare const t: (key: keyof typeof lang) => "Send" | "Stop" | "Add" | "Skill" | "MCP" | "Prompt" | "File" | "Image" | "Tool" | "Knowledge Base" | "Conversation Files" | "Collapse" | "Show More" | "Ask AI" | "Copy" | "Share" | "Like" | "Unsatisfied" | "Delete" | "Quote" | "Regenerate" | "Regenerating will clear the content below" | "Submit" | "Cancel" | "Preview Content" | "Jump to Detail" | "Call Tool" | "Read Skill" | "Calling" | "Reading" | "Tell us your thoughts" | "What makes you satisfied?" | "What makes you dissatisfied?" | "Return Content" | "Edit" | "Deep Thinking" | "Quick Thinking" | "Image to Text" | "Loading image..." | "Failed to load image" | "Thinking..." | "Thinking Completed" | "Thinking Failed" | "Copy Success" | "Copy Failed" | "Return to bottom" | "Stop generating" | "Stopping" | "Duration" | "Yesterday" | "Parameters" | "Description" | "Execution Status" | "Running" | "Success" | "Failed" | "Pending" | "To Be Executed" | "Details" | "Retry" | "Retrying" | "Skipping" | "The task is retrying and cannot be skipped" | "The task is skipping and cannot be retried" | "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" | "Algorithm Plan Review Ticket" | "Reviewing" | "Approving" | "Abandoned" | "Approved" | "Cancelled" | "Expired" | "Rejected" | "Revoked" | "Ticket No." | "Submitted At" | "Current Handler" | "None" | "View Ticket Detail" | "Copy Ticket" | "Copy Ticket Link" | "Cancel Approval" | "Approval Cancelled" | "Refresh Ticket Status" | "This ticket has been rejected and cannot be cancelled" | "This ticket has been approved and cannot be cancelled" | "This ticket has been cancelled, no need to click again" | "Approval cannot be cancelled in the current status" | "There are {count} pending approval tickets in the current conversation. To continue, cancel approval first." | "Unsupported interrupt message" | "Searching" | "Search Completed" | "Upload File" | "Select model" | "Search models" | "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 file, up to {count} files, max {size}MB each" | "Supported formats: {formats}" | "{count} file(s) were not added because the format is not supported" | "Hello, I am BlueKing AI Bot" | "Clear Search" | "Search Result is Empty" | "Valid Evidence" | "Full Screen" | "Exit Full Screen" | "Please choose to continue" | "Continue" | "Received: " | "Done" | "Skip" | "Single" | "Multiple" | "Others" | "Completed" | "question(s)" | "Answers" | "Replied" | "Please enter..." | "File Artifacts" | "File List" | "Search file keyword" | "Failed to load preview" | "No file to preview" | "Uploading files, please wait" | "Remove failed uploads before sending" | "Upload failed" | "发送" | "停止" | "添加" | "文件" | "图片" | "工具" | "知识库" | "会话产物" | "收起" | "显示更多" | "问问小鲸" | "复制" | "分享" | "点赞" | "不满意" | "删除" | "引用" | "重新生成" | "重新生成将清空下文内容" | "提交" | "取消" | "预览内容" | "跳转详情" | "调用工具" | "读取 Skill" | "正在调用" | "正在读取" | "说出您的想法" | "什么原因让你满意?" | "什么原因让你不满意?" | "返回内容" | "编辑" | "深度思考" | "快速思考" | "图生文" | "图片加载中..." | "图片加载失败" | "思考中" | "已思考完成" | "思考失败" | "复制成功" | "复制失败" | "返回底部" | "停止生成" | "正在停止" | "耗时" | "昨天" | "参数" | "描述" | "执行情况" | "执行中" | "成功" | "失败" | "挂起" | "待执行" | "详情" | "重试" | "重试中" | "跳过中" | "任务正在重试中,不可跳过" | "任务正在跳过中,不可重试" | "节点" | "节点配置" | "节点输出" | "基础信息" | "流程模板" | "节点名称" | "步骤名称" | "执行方案" | "是否可选" | "失败处理" | "超时控制" | "是" | "否" | "输入参数" | "输出参数" | "参数名" | "参数值" | "名称" | "变量说明" | "结构化输出" | "手动跳过" | "暂无数据" | "调用 MCP" | "更多" | "算法方案评审单" | "评审中" | "审批中" | "已废弃" | "已批准" | "已通过" | "已取消" | "已过期" | "已拒绝" | "已撤销" | "单据编号" | "提交时间" | "当前处理人" | "无" | "查看单据详情" | "复制单据" | "复制单据链接" | "取消审批" | "已取消审批" | "刷新单据状态" | "单据已取消审批" | "该单据已被拒绝,无法取消" | "该单据已通过,无法取消" | "单据已取消,无需重复点击" | "当前状态无法取消审批" | "当前会话有 {count} 个待审批单,如需继续,请先取消审批" | "暂不支持的中断消息" | "检索中" | "检索完成" | "上传文件" | "选择模型" | "搜索模型关键字" | "请求中..." | "取消满意" | "取消不满意" | "确认删除该回答?" | "删除操作无法撤回,请谨慎操作!" | "预览" | "缩小" | "放大" | "旋转" | "下载" | "抱歉,图片加载失败,可尝试重新加载" | "重置" | "重新加载" | "宽" | "高" | "上传图片" | "搜索 关键字" | "选择日期" | "在对话中定位" | "全选" | "确定" | "上传文件,最多支持 {count} 个,单个最大 {size}MB" | "支持格式:{formats}" | "有 {count} 个文件因格式不支持未添加" | "你好,我是小鲸" | "清空搜索" | "搜索结果为空" | "有效证据" | "全屏" | "退出全屏" | "请选择以继续" | "继续" | "收到信息:" | "待审批" | "已审批" | "完成" | "跳过" | "单选" | "多选" | "其他" | "已完成" | "题" | "回答内容" | "已回复" | "请输入..." | "文件产物" | "文件列表" | "搜索文件关键字" | "预览加载失败" | "暂无可预览的文件" | "文件上传中,请稍候" | "存在上传失败的文件,请删除后重试" | "上传失败";
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
# ActivityLayout 活动布局
|
|
16
16
|
|
|
17
|
+
> **导出状态**:内部实现,未从 `@blueking/chat-x` 包入口导出。
|
|
18
|
+
|
|
17
19
|
> **能力域**:辅助能力
|
|
18
20
|
|
|
19
21
|
`ActivityLayout` 是活动消息的通用折叠布局容器,负责渲染标题栏、折叠箭头和内容区域。它不关心活动内容类型本身,标题和正文均通过插槽传入,因此常被 `KnowledgeRagContent`、`ReferenceDocContent`、`FlowAgentContent` 等活动组件复用。
|
|
@@ -55,8 +57,8 @@
|
|
|
55
57
|
|
|
56
58
|
<script setup lang="ts">
|
|
57
59
|
import { ref } from 'vue';
|
|
58
|
-
import
|
|
59
|
-
|
|
60
|
+
import { DocumentIcon } from '@blueking/chat-x';
|
|
61
|
+
// ActivityLayout 未从包入口导出;文档站 demo 使用页面顶部相对路径
|
|
60
62
|
|
|
61
63
|
const collapsed = ref(false);
|
|
62
64
|
</script>
|
|
@@ -166,7 +166,7 @@ const collapsed = ref(false); // false = 展开,true = 折叠
|
|
|
166
166
|
- **默认激活**:当 `MessageContainer` 已注入滚动上下文(`useContainerScrollProvider`,供 `FlowAgentContent` 内 `useContainerScrollConsumer` 读取)时,组件挂载后若存在 `task.is_active === true` 且 `task.has_confidence === true` 的任务,会自动在侧栏打开该任务的「有效证据」Tab;无滚动 Provider(例如独立演示)时不做自动打开。用户手动切换 Tab 后不再沿用 `is_active` 默认高亮
|
|
167
167
|
- **选中态**:当前侧栏 Tab 与任务行 / 节点行联动高亮(`is-selected`);任务 Tab 与「有效证据」Tab 均视为该任务的选中态
|
|
168
168
|
- **节点列表**:每个节点显示状态圆点、名称和耗时;hover 时出现行尾操作按钮组
|
|
169
|
-
- **失败节点操作**:失败且 `retryable` / `skippable` 为 `true` 的节点,hover 时额外展示「重试」「跳过」按钮,点击后通过 `onInterruptResume` 回传 Agent(不传 `interrupt
|
|
169
|
+
- **失败节点操作**:失败且 `retryable` / `skippable` 为 `true` 的节点,hover 时额外展示「重试」「跳过」按钮,点击后通过 `onInterruptResume` 回传 Agent(不传 `interrupt`)。仅在对话流内出现:侧栏「执行情况」面板(`ExecutionSummary`)内渲染的同一消息只保留「详情」
|
|
170
170
|
- **节点详情**:点击「详情」会通过 `useCustomTabConsumer` 在 `ChatContainer` 侧边栏新增自定义 Tab,展示节点配置(基础信息、输入参数、输出参数)
|
|
171
171
|
|
|
172
172
|
> `FlowAgentContent` 会读取 `ChatContainer` 注入的 `renderMode`。当 `renderMode === RenderMode.Share` 时,任务行不展示总耗时与「有效证据」,节点列表不展示耗时与「详情」按钮,避免分享预览中出现可交互入口。独立使用 `ActivityMessage` 且没有上层 Provider 时,默认按 `Chat` 模式渲染。
|
|
@@ -191,8 +191,8 @@ FlowAgentContent(activityType = 'flow_agent')
|
|
|
191
191
|
├── node.name(HighlightKeyword 支持搜索高亮)
|
|
192
192
|
├── node.elapsed_time
|
|
193
193
|
└── 行尾操作按钮组(hover 显示)
|
|
194
|
-
├── 重试(失败 + retryable
|
|
195
|
-
├── 跳过(失败 + skippable
|
|
194
|
+
├── 重试(失败 + retryable;侧栏执行情况面板内隐藏)→ onInterruptResume
|
|
195
|
+
├── 跳过(失败 + skippable;侧栏执行情况面板内隐藏)→ onInterruptResume
|
|
196
196
|
└── 详情 → 打开节点详情 Tab
|
|
197
197
|
```
|
|
198
198
|
|
|
@@ -340,7 +340,7 @@ const messages = [
|
|
|
340
340
|
|
|
341
341
|
### 节点详情 Tab
|
|
342
342
|
|
|
343
|
-
点击节点的「详情」按钮,内部调用 `useCustomTabConsumer().addCustomTab()` 在 `ChatContainer` 侧边栏新开一个 Tab,渲染 `
|
|
343
|
+
点击节点的「详情」按钮,内部调用 `useCustomTabConsumer().addCustomTab()` 在 `ChatContainer` 侧边栏新开一个 Tab,渲染 `FlowAgentNodeDetail`(或 `getSideRenderComponent` 返回的自定义组件),该组件提供:
|
|
344
344
|
|
|
345
345
|
- **节点配置** Tab:基础信息表单(流程模板、节点名称、步骤名称、失败处理、超时控制)+ 输入参数表 + 输出参数表
|
|
346
346
|
- **节点输出** Tab:结构化输出参数表
|
|
@@ -322,6 +322,8 @@ AI 划词选择组件,监听用户在页面中的文本选区,在选区附
|
|
|
322
322
|
|
|
323
323
|
## 与 ChatBot 联动
|
|
324
324
|
|
|
325
|
+
`ChatBot` 属于 `@blueking/ai-blueking`,不是 chat-x 的导出。
|
|
326
|
+
|
|
325
327
|
选中文本后触发快捷指令,自动将选中内容作为上下文发送到聊天窗口:
|
|
326
328
|
|
|
327
329
|
```vue
|
|
@@ -341,7 +343,8 @@ AI 划词选择组件,监听用户在页面中的文本选区,在选区附
|
|
|
341
343
|
|
|
342
344
|
<script setup lang="ts">
|
|
343
345
|
import { ref } from 'vue';
|
|
344
|
-
import { AiSelection,
|
|
346
|
+
import { AiSelection, type Shortcut } from '@blueking/chat-x';
|
|
347
|
+
import { ChatBot } from '@blueking/ai-blueking';
|
|
345
348
|
|
|
346
349
|
const selectionVisible = ref(false);
|
|
347
350
|
const chatBotRef = ref();
|
|
@@ -378,7 +381,7 @@ v-model:visible="selectionVisible"
|
|
|
378
381
|
| 属性名 | 类型 | 默认值 | 必填 | 说明 |
|
|
379
382
|
| ---------------- | ------------ | ------------------- | ---- | ------------------------------------------------------- |
|
|
380
383
|
| visible | `boolean` | - | ✅ | 控制弹窗显示,必须使用 `v-model:visible` |
|
|
381
|
-
| shortcuts | `Shortcut[]` | `DEFAULT_SHORTCUTS` | - |
|
|
384
|
+
| shortcuts | `Shortcut[]` | `DEFAULT_SHORTCUTS` | - | 快捷指令列表;未传或空数组时回退内置「问问小鲸」 |
|
|
382
385
|
| maxShortcutCount | `number` | `3` | - | 直接展示的最大指令数,超出收起到「更多」菜单 |
|
|
383
386
|
| offset | `number` | `10` | - | 弹窗与选区的垂直间距(px) |
|
|
384
387
|
| excludeSelectors | `string[]` | `[]` | - | 排除的 CSS 选择器数组,选区在这些选择器内部时不显示弹窗 |
|
|
@@ -13,6 +13,10 @@ ChatInput 内部富文本编辑区,基于 edix 编辑器渲染「文本 + 资
|
|
|
13
13
|
|
|
14
14
|
# AiSlashInput 富文本命令输入
|
|
15
15
|
|
|
16
|
+
> **导出状态**:内部实现,未从 `@blueking/chat-x` 包入口导出。
|
|
17
|
+
> 业务请通过 [ChatInput](/components/input/chat-input) 使用。
|
|
18
|
+
> 文档站 demo 使用相对路径引入源码;不要写 `import { AiSlashInput } from '@blueking/chat-x'`。
|
|
19
|
+
|
|
16
20
|
> **能力域**:输入交互
|
|
17
21
|
|
|
18
22
|
## 源码事实
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
<!-- FULL DOC -->
|
|
12
12
|
|
|
13
13
|
# AnimationText 动画文本
|
|
14
|
+
|
|
15
|
+
> **导出状态**:内部实现,未从 `@blueking/chat-x` 包入口导出。
|
|
16
|
+
> 流式场景请使用公开的 [useAnimationText](/composables/use-animation-text)。
|
|
17
|
+
> 文档站 demo 使用相对路径引入源码;不要写 `import { AnimationText } from '@blueking/chat-x'`。
|
|
14
18
|
## 源码事实
|
|
15
19
|
|
|
16
20
|
- **源码位置**:`src/components/animation-text/animation-text.vue`
|
|
@@ -52,7 +56,7 @@ animationStyle = {
|
|
|
52
56
|
</template>
|
|
53
57
|
|
|
54
58
|
<script setup lang="ts">
|
|
55
|
-
|
|
59
|
+
// AnimationText 组件未导出;公开 API 是 useAnimationText
|
|
56
60
|
</script>
|
|
57
61
|
```
|
|
58
62
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
### 关联组件
|
|
7
7
|
- **message-render** — 由 MessageRender 在 role 为 assistant 时创建
|
|
8
8
|
- **tool-message** — 工具结果通过 toolCall.toolMessage 内联或独立 tool 消息关联展示
|
|
9
|
-
- **toolcall-render** — 多条工具调用由
|
|
9
|
+
- **toolcall-render** — 多条工具调用由 ToolCallRender 统一渲染
|
|
10
10
|
- **file-artifact-panel** — property.artifacts 文件产物点击后在侧栏预览
|
|
11
11
|
|
|
12
12
|
---
|
|
@@ -136,6 +136,8 @@ ai-chat-container(:data-ai-size="size")
|
|
|
136
136
|
|
|
137
137
|
侧边栏默认包含「执行情况」Tab,展示所有工具调用和 FlowAgent 类型的 Activity 消息。支持关键词搜索过滤和点击定位到对话中的消息位置。Tab 标签内 `.ai-execution-summary-icon` 固定 16×16px,避免被 flex 压缩。
|
|
138
138
|
|
|
139
|
+
面板内的消息虽与对话流复用同一套渲染链路,但按**只读回看**呈现:`ExecutionSummary` 会 provide 面板上下文,FlowAgent 失败节点在面板内不展示「重试 / 跳过」,只保留「详情」;对话流内不受影响。详见 [ExecutionSummary](/components/agent/execution-summary)。
|
|
140
|
+
|
|
139
141
|
**展示条件**:侧栏是否渲染只取决于折叠态与是否存在可见 Tab —— `asideCollapsed === false` 且 `displayTabs` 非空即展开,与 `executionGroups`、`keyword`、是否有文件产物均无关。无执行数据时 `ExecutionSummary` 展示自身空态,无文件产物时 `FileArtifactPanel` 展示整块空态。`renderMode === Share` 分享态同样按折叠态展示侧栏(开放只读查看流程智能体详情/证据/执行情况),仅底部输入区保持隐藏。
|
|
140
142
|
|
|
141
143
|
**展开 / 折叠由外部判断(严格受控)**:只要传入了 `asideCollapsed`,折叠态就**一律以外部值为准**。容器内部的展开动作(点击文件卡片预览、`addCustomTab` 打开节点详情等)只发出 `update:asideCollapsed` 请求,外部不改值就不会展开 —— 所以务必用 `v-model:asideCollapsed` 绑定,只写 `:aside-collapsed` 会让这些内部入口失效。完全不传该 prop 时退化为组件内部状态(默认折叠),内部入口照常生效。容器不会因为数据变空而自动收起或重置自定义 Tab。
|
|
@@ -737,7 +739,7 @@ ai-chat-container(:data-ai-size="size")
|
|
|
737
739
|
|
|
738
740
|
### Props
|
|
739
741
|
|
|
740
|
-
ChatContainer 的 Props 继承自 `ChatInputProps` 和 `MessageContainerProps`(排除 `enableSelection
|
|
742
|
+
ChatContainer 的 Props 继承自 `ChatInputProps` 和 `MessageContainerProps`(排除 `enableSelection`、`messageGroups`、`messageToolsTippyOptions`),另外新增:
|
|
741
743
|
|
|
742
744
|
| 属性名 | 类型 | 默认值 | 说明 |
|
|
743
745
|
| ------------------------- | ---------------------------------------------------------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
@@ -538,6 +538,7 @@ const defaultFiles: UploadFile[] = [
|
|
|
538
538
|
| focus | `() => void` | 聚焦编辑器并把光标置于末尾 |
|
|
539
539
|
| insertMention | `(item: IInputMenuItem) => void` | 把条目以标签形式追加到文档末尾(不依赖当前光标) |
|
|
540
540
|
| triggerSendMessage | `() => void` | 手动触发发送逻辑 |
|
|
541
|
+
| uploadedArtifacts | `AIFileInfo[]` | 已上传且带 `outputId` 的附件列表(只读) |
|
|
541
542
|
|
|
542
543
|
## 键盘快捷键
|
|
543
544
|
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
<!-- FULL DOC -->
|
|
11
11
|
|
|
12
12
|
# CiteContent 引用内容
|
|
13
|
+
|
|
14
|
+
> **导出状态**:内部实现,未从 `@blueking/chat-x` 包入口导出。
|
|
15
|
+
> 业务请通过 [ChatInput](/components/input/chat-input) 的 `v-model:cite` 使用。
|
|
16
|
+
> 文档站 demo 使用相对路径引入源码;不要写 `import { CiteContent } from '@blueking/chat-x'`。
|
|
13
17
|
## 源码事实
|
|
14
18
|
|
|
15
19
|
- **源码位置**:`src/components/chat-content/cite-content/cite-content.vue`
|
|
@@ -44,7 +48,7 @@
|
|
|
44
48
|
</template>
|
|
45
49
|
|
|
46
50
|
<script setup lang="ts">
|
|
47
|
-
|
|
51
|
+
// CiteContent 未从包入口导出;文档站 demo 使用页面顶部相对路径
|
|
48
52
|
</script>
|
|
49
53
|
```
|
|
50
54
|
|
|
@@ -62,7 +66,7 @@
|
|
|
62
66
|
</template>
|
|
63
67
|
|
|
64
68
|
<script setup lang="ts">
|
|
65
|
-
|
|
69
|
+
// CiteContent 未从包入口导出;文档站 demo 使用页面顶部相对路径
|
|
66
70
|
|
|
67
71
|
const handleClose = (content: string) => {
|
|
68
72
|
// content 即当前引用文本,可用于日志或状态清除
|
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
---
|
|
11
11
|
<!-- FULL DOC -->
|
|
12
12
|
|
|
13
|
-
#
|
|
13
|
+
# commonErrorContent 通用错误内容
|
|
14
|
+
|
|
15
|
+
| 名称 | 种类 |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| `CommonErrorContent` | 源码 SFC / 模板别名 |
|
|
18
|
+
| `commonErrorContent` | 包入口导出名 |
|
|
19
|
+
|
|
14
20
|
## 源码事实
|
|
15
21
|
|
|
16
22
|
- **源码位置**:`src/components/chat-content/common-error-content/common-error-content.vue`
|
|
@@ -40,7 +46,7 @@
|
|
|
40
46
|
</template>
|
|
41
47
|
|
|
42
48
|
<script setup lang="ts">
|
|
43
|
-
import { CommonErrorContent } from '@blueking/chat-x';
|
|
49
|
+
import { commonErrorContent as CommonErrorContent } from '@blueking/chat-x';
|
|
44
50
|
</script>
|
|
45
51
|
```
|
|
46
52
|
|
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
<!-- FULL DOC -->
|
|
12
12
|
|
|
13
13
|
# DeleteTool 删除确认按钮
|
|
14
|
+
|
|
15
|
+
> **导出状态**:内部实现,未从 `@blueking/chat-x` 包入口导出。
|
|
16
|
+
> 业务请通过 [MessageTools](/components/feedback/message-tools)(`id === 'delete'`)使用。
|
|
17
|
+
> 文档站 demo 使用相对路径引入源码;不要写 `import { DeleteTool } from '@blueking/chat-x'`。
|
|
18
|
+
|
|
14
19
|
## 源码事实
|
|
15
20
|
|
|
16
21
|
- **源码位置**:`src/components/message-tools/delete-tool/delete-tool.vue`
|
|
@@ -54,7 +59,7 @@ disabled=true 时:Tippy onShow 返回 false,弹窗不打开
|
|
|
54
59
|
</template>
|
|
55
60
|
|
|
56
61
|
<script setup lang="ts">
|
|
57
|
-
|
|
62
|
+
// DeleteTool 未从包入口导出;文档站 demo 使用页面顶部相对路径
|
|
58
63
|
|
|
59
64
|
const handleConfirm = () => {
|
|
60
65
|
console.log('用户确认删除,执行删除操作');
|
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
<!-- FULL DOC -->
|
|
13
13
|
|
|
14
14
|
# DescPanel 描述面板
|
|
15
|
+
|
|
16
|
+
> **导出状态**:内部实现,未从 `@blueking/chat-x` 包入口导出。
|
|
17
|
+
> 业务请通过 [ToolCallRender](/components/agent/toolcall-render) 使用。
|
|
18
|
+
> 文档站 demo 使用相对路径引入源码;不要写 `import { DescPanel } from '@blueking/chat-x'`。
|
|
15
19
|
## 源码事实
|
|
16
20
|
|
|
17
21
|
- **源码位置**:`src/components/tool-call/desc-panel/desc-panel.vue`
|
|
@@ -97,7 +101,7 @@ const data = computed(() => {
|
|
|
97
101
|
</template>
|
|
98
102
|
|
|
99
103
|
<script setup lang="ts">
|
|
100
|
-
|
|
104
|
+
// DescPanel 未从包入口导出;文档站 demo 使用页面顶部相对路径
|
|
101
105
|
</script>
|
|
102
106
|
```
|
|
103
107
|
|
|
@@ -12,6 +12,8 @@ FlowAgent 节点详情中的标题/内容分段容器。 源码位置:src/comp
|
|
|
12
12
|
|
|
13
13
|
# DetailSection 详情分段
|
|
14
14
|
|
|
15
|
+
> **导出状态**:内部实现,未从 `@blueking/chat-x` 包入口导出。
|
|
16
|
+
|
|
15
17
|
> **能力域**:Agent 能力
|
|
16
18
|
|
|
17
19
|
`DetailSection` 是 FlowAgent 节点详情页中的轻量分段容器,用于给一组相关信息提供统一标题样式。组件自身只负责渲染标题和默认插槽,不处理数据格式、折叠、空态或表格逻辑。
|
|
@@ -39,7 +41,7 @@ FlowAgent 节点详情中的标题/内容分段容器。 源码位置:src/comp
|
|
|
39
41
|
</template>
|
|
40
42
|
|
|
41
43
|
<script setup lang="ts">
|
|
42
|
-
|
|
44
|
+
// DetailSection 未从包入口导出;文档站 demo 使用页面顶部相对路径
|
|
43
45
|
</script>
|
|
44
46
|
```
|
|
45
47
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- AI SUMMARY -->
|
|
2
2
|
## 快速了解
|
|
3
3
|
|
|
4
|
-
按消息流提取执行摘要,支持关键词定位和消息渲染。 源码位置:src/components/execution-summary/execution-summary.vue。
|
|
4
|
+
按消息流提取执行摘要,支持关键词定位和消息渲染。 通过 useExecutionPanelProvider 提供 EXECUTION_PANEL_TOKEN,面板内消息按只读呈现, FlowAgent 失败节点在面板内不展示重试/跳过,只保留详情。 源码位置:src/components/execution-summary/execution-summary.vue。
|
|
5
5
|
|
|
6
6
|
### 关联组件
|
|
7
7
|
- **message-render** — 摘要列表内渲染消息内容
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
- **关键词搜索**:实时过滤匹配的执行记录
|
|
31
31
|
- **对话定位**:hover 显示「在对话中定位」按钮,点击滚动到对应消息
|
|
32
32
|
- **空状态处理**:无数据或搜索无结果时显示空状态提示
|
|
33
|
+
- **面板上下文(只读呈现)**:组件 setup 时通过 `useExecutionPanelProvider()` 提供 `EXECUTION_PANEL_TOKEN`,供内部消息组件识别「当前处于侧栏面板内」并隐藏交互操作。目前 `FlowAgentContent` 据此不展示节点「重试 / 跳过」,只保留「详情」
|
|
33
34
|
|
|
34
35
|
## 基础用法
|
|
35
36
|
|
|
@@ -93,6 +94,27 @@ ai-execution-summary
|
|
|
93
94
|
/>
|
|
94
95
|
```
|
|
95
96
|
|
|
97
|
+
## 面板内的消息按只读呈现
|
|
98
|
+
|
|
99
|
+
面板与对话流复用同一套渲染链路(`MessageRender` → `ContentRender` → 具体内容组件),但面板定位是「回看执行过程」,不承载操作。为此组件在 setup 阶段 provide 面板上下文:
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
// 源码:src/composables/use-common.ts(内部上下文,未从包入口导出)
|
|
103
|
+
import { useExecutionPanelProvider } from '../../composables/use-common';
|
|
104
|
+
|
|
105
|
+
// 面板身份在组件树中恒定,provide 常量 true 即可,无需响应式
|
|
106
|
+
useExecutionPanelProvider();
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
内容组件用 `useExecutionPanelInject()` 读取(缺省 `false`,即对话流内)。当前的差异:
|
|
110
|
+
|
|
111
|
+
| 内容 | 对话流内 | 侧栏「执行情况」面板内 |
|
|
112
|
+
| ---- | -------- | ---------------------- |
|
|
113
|
+
| FlowAgent 失败节点「重试 / 跳过」 | 展示(依赖 `retryable` / `skippable`) | **不展示** |
|
|
114
|
+
| FlowAgent 节点「详情」 | 展示 | 展示 |
|
|
115
|
+
|
|
116
|
+
新增内容组件若也需要区分这两种场景,同样注入 `useExecutionPanelInject()` 即可,不必扩展 props。`EXECUTION_PANEL_TOKEN` 与这两个函数同属 `use-common.ts` 的内部上下文,未从 `@blueking/chat-x` 包入口导出,仅供库内组件使用。详见 [FlowAgentContent](/components/agent/flow-agent-content)。
|
|
117
|
+
|
|
96
118
|
## API
|
|
97
119
|
|
|
98
120
|
### Props
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
<!-- FULL DOC -->
|
|
12
12
|
|
|
13
13
|
# FileContent 文件内容展示
|
|
14
|
+
|
|
15
|
+
> **导出状态**:内部实现,未从 `@blueking/chat-x` 包入口导出。
|
|
16
|
+
> 业务请通过 [ChatInput](/components/input/chat-input) / [UserMessage](/components/message/user-message) 使用。
|
|
17
|
+
> 文档站 demo 使用相对路径引入源码;不要写 `import { FileContent } from '@blueking/chat-x'`。
|
|
14
18
|
## 源码事实
|
|
15
19
|
|
|
16
20
|
- **源码位置**:`src/components/chat-content/file-content/file-content.vue`
|
|
@@ -62,7 +66,8 @@ MIME 类型非 `image/*` 的文件,渲染为固定宽 180px 的文件卡片(
|
|
|
62
66
|
|
|
63
67
|
<script setup lang="ts">
|
|
64
68
|
import { ref } from 'vue';
|
|
65
|
-
import {
|
|
69
|
+
import type { UploadFile } from '@blueking/chat-x';
|
|
70
|
+
// FileContent 未从包入口导出;文档站 demo 使用相对路径 FileContentComp
|
|
66
71
|
|
|
67
72
|
const files = ref<Partial<UploadFile>[]>([
|
|
68
73
|
{ file: new File(['content'], 'report.pdf', { type: 'application/pdf' }) },
|
|
@@ -117,7 +122,8 @@ MIME 为 `image/*` 时渲染为图片缩略图(`cursor: zoom-in`)。点击
|
|
|
117
122
|
|
|
118
123
|
<script setup lang="ts">
|
|
119
124
|
import { ref } from 'vue';
|
|
120
|
-
import {
|
|
125
|
+
import type { UploadFile } from '@blueking/chat-x';
|
|
126
|
+
// FileContent 未从包入口导出;文档站 demo 使用相对路径 FileContentComp
|
|
121
127
|
|
|
122
128
|
const imageFiles = ref<Partial<UploadFile>[]>([
|
|
123
129
|
{ url: 'https://example.com/cat.jpg', filename: 'cat.jpg', mimeType: 'image/jpeg' },
|
|
@@ -112,6 +112,8 @@
|
|
|
112
112
|
|
|
113
113
|
> `accept` 仅影响文件选择框的过滤 UI,不做服务端验证,请在 `upload` 回调中自行校验 MIME 类型。
|
|
114
114
|
|
|
115
|
+
传入 `accept` 后,按钮 tooltip 会在「最多 N 个 / 单个最大 MB」下一行补格式说明:等于 `DEFAULT_UPLOAD_ACCEPT` 时用 `formatDefaultUploadAcceptTip`(分类文案),否则为 `支持格式:{accept}`。缺省 `accept` 时只有数量与大小,不写格式行。这两个工具函数与常量从 `@blueking/chat-x` 的 utils 导出。
|
|
116
|
+
|
|
115
117
|
## 自定义图标
|
|
116
118
|
|
|
117
119
|
通过默认插槽替换上传图标:
|
|
@@ -130,7 +132,7 @@
|
|
|
130
132
|
|
|
131
133
|
| 属性名 | 类型 | 默认值 | 说明 |
|
|
132
134
|
| ------------ | -------------- | ------ | -------------------------------------------------------------------------- |
|
|
133
|
-
| accept | `string` | — | 文件选择框过滤类型,遵循 `<input accept>`
|
|
135
|
+
| accept | `string` | — | 文件选择框过滤类型,遵循 `<input accept>` 规范;缺省时不下发、不限制类型,tooltip 也不展示格式行;有值时 tooltip 追加格式说明 |
|
|
134
136
|
| multiple | `boolean` | `true` | 声明属性(当前版本未实际绑定到 input,始终多选) |
|
|
135
137
|
| tippyOptions | `AITippyProps` | — | 扩展 tooltip 配置,会与内置配置合并 |
|
|
136
138
|
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
|
|
14
14
|
# FlowAgentContent FlowAgent 执行内容
|
|
15
15
|
|
|
16
|
+
> **导出状态**:内部实现,未从 `@blueking/chat-x` 包入口导出。
|
|
17
|
+
> 业务请通过 [MessageRender](/components/message/message-render) 渲染 `role: 'activity'`(见本页「推荐入口」)。
|
|
18
|
+
> 文档站 demo 使用相对路径引入源码;不要写 `import { FlowAgentContent } from '@blueking/chat-x'`。
|
|
19
|
+
|
|
16
20
|
> **能力域**:Agent 能力
|
|
17
21
|
|
|
18
22
|
渲染 FlowAgent(标准运维 / 流程编排)执行过程的活动组件,以「任务 → 节点」两级结构展示执行状态、耗时统计与详情入口。组件内部消费 `useCustomTabConsumer`,点击节点「详情」会向侧栏的自定义 Tab 注入 `FlowAgentNodeDetail` 渲染节点输入输出。
|
|
@@ -33,6 +37,7 @@
|
|
|
33
37
|
- **重试 / 跳过进行中态**:点击后节点行进入 `is-pending`,按钮组常驻显示(无需 hover);进行中按钮切换为 loading +「重试中 / 跳过中」,重试与跳过互斥禁用;被阻塞按钮 hover 显示提示(如「任务正在重试中,不可跳过」);详情不受影响。pending 以 `task_id:node_id:retry` 为键,后端 `retry` 计数变化后自动失效
|
|
34
38
|
- **详情入口联动**:「详情」按钮点击后通过自定义 Tab 挂载 `FlowAgentNodeDetail`
|
|
35
39
|
- **分享态只读查看**:`RenderMode.Share` 下保留耗时、「详情」「有效证据」等只读查看入口,仅隐藏「重试 / 跳过」等交互式 resume 操作
|
|
40
|
+
- **侧栏执行情况面板只读**:侧栏「执行情况」Tab 内经 `ExecutionSummary` 渲染的同一组件同样只保留「详情」,不展示「重试 / 跳过」;面板身份由 `ExecutionSummary` 通过 `EXECUTION_PANEL_TOKEN` 提供,组件以 `useExecutionPanelInject` 读取。因此重试 / 跳过只出现在对话流内的执行情况
|
|
36
41
|
|
|
37
42
|
## 状态映射
|
|
38
43
|
|
|
@@ -61,8 +66,8 @@
|
|
|
61
66
|
</template>
|
|
62
67
|
|
|
63
68
|
<script setup lang="ts">
|
|
64
|
-
import { FlowAgentContent } from '@blueking/chat-x';
|
|
65
69
|
import type { BkFlowMessageContent, OnInterruptResume } from '@blueking/chat-x';
|
|
70
|
+
// FlowAgentContent 未从包入口导出;文档站 demo 使用相对路径 FlowAgentContentComp
|
|
66
71
|
|
|
67
72
|
const messageUid = 'flow-msg-1';
|
|
68
73
|
const status = 'success';
|
|
@@ -94,7 +99,7 @@
|
|
|
94
99
|
|
|
95
100
|
## 失败节点重试 / 跳过
|
|
96
101
|
|
|
97
|
-
失败节点(`convergedState === 'failed'
|
|
102
|
+
失败节点(`convergedState === 'failed'`)且具备对应能力位时,在**对话流内**的执行情况 hover 行尾展示「重试」或「跳过」按钮(侧栏「执行情况」面板与 Share 分享态不展示,见下方显隐条件)。点击后:
|
|
98
103
|
|
|
99
104
|
1. 节点行添加 `is-pending` class,按钮组常驻显示(设计稿:鼠标移出后仍可见进行中反馈)
|
|
100
105
|
2. 被点击按钮进入 loading +「重试中 / 跳过中」,重试与跳过均禁用(`is-disabled`,置灰色 `#c4c6cc`)
|
|
@@ -125,11 +130,11 @@ onInterruptResume?.({
|
|
|
125
130
|
|
|
126
131
|
| 按钮 | 显隐条件 | 进行中表现 | `operation` |
|
|
127
132
|
| ---- | ------------------------------------- | ---------------------------------- | ---------------------- |
|
|
128
|
-
| 重试 | 失败态且 `node.retryable === true
|
|
129
|
-
| 跳过 | 失败态且 `node.skippable === true
|
|
130
|
-
| 详情 | 始终展示(含 Share
|
|
133
|
+
| 重试 | 失败态且 `node.retryable === true`;且不在 Share 分享态、不在侧栏「执行情况」面板内 | loading +「重试中」,二者均禁用 | `flow_node_retry` |
|
|
134
|
+
| 跳过 | 失败态且 `node.skippable === true`;且不在 Share 分享态、不在侧栏「执行情况」面板内 | loading +「跳过中」,二者均禁用 | `flow_node_skip` |
|
|
135
|
+
| 详情 | 始终展示(含 Share 分享态与侧栏面板) | 不受 pending 影响 | —(打开侧栏 Tab,不走 resume) |
|
|
131
136
|
|
|
132
|
-
行尾操作由内部 composable [`useFlowNodeActions`](/composables/use-flow-node-actions)
|
|
137
|
+
行尾操作由内部 composable [`useFlowNodeActions`](/composables/use-flow-node-actions) 聚合为声明式列表,组件层仅遍历渲染;两类只读场景合并为它的 `hideResumeActions` 入参。
|
|
133
138
|
|
|
134
139
|
## 节点详情联动
|
|
135
140
|
|
|
@@ -140,7 +145,7 @@ addCustomTab?.({
|
|
|
140
145
|
label: node.name,
|
|
141
146
|
name: `${task.task_id}|${node.id}|${node.name}`,
|
|
142
147
|
data: {
|
|
143
|
-
component:
|
|
148
|
+
component: FlowAgentNodeDetail,
|
|
144
149
|
messageUid: props.messageUid,
|
|
145
150
|
props: {
|
|
146
151
|
loading: true,
|
|
@@ -176,9 +181,9 @@ ActivityLayout(activity-type=flow_agent,v-model:collapsed)
|
|
|
176
181
|
└── node-trailing(含 Share 分享态)
|
|
177
182
|
├── node-time(节点耗时,hover / pending 时隐藏)
|
|
178
183
|
└── node-actions(hover 或 `is-pending` 时显示,间距 12px)
|
|
179
|
-
├── node-action-btn「重试」(失败 + retryable;Share
|
|
180
|
-
├── node-action-btn「跳过」(失败 + skippable;Share
|
|
181
|
-
└── node-action-btn「详情」(始终可用,含 Share
|
|
184
|
+
├── node-action-btn「重试」(失败 + retryable;Share 态与侧栏面板隐藏;进行中 loading + 禁用)
|
|
185
|
+
├── node-action-btn「跳过」(失败 + skippable;Share 态与侧栏面板隐藏;进行中 loading + 禁用)
|
|
186
|
+
└── node-action-btn「详情」(始终可用,含 Share 态与侧栏面板,点击挂载详情 Tab)
|
|
182
187
|
```
|
|
183
188
|
|
|
184
189
|
## API
|
|
@@ -187,14 +192,17 @@ ActivityLayout(activity-type=flow_agent,v-model:collapsed)
|
|
|
187
192
|
|
|
188
193
|
| 属性名 | 类型 | 必填 | 默认值 | 说明 |
|
|
189
194
|
| ---------- | ------------------------ | ---- | ----------- | -------------------------------------------------------------------------- |
|
|
190
|
-
| content | `BkFlowMessageContent` | 否 |
|
|
195
|
+
| content | `BkFlowMessageContent` | 否 | — | 任务数组;传入单个 `BkFlowTask` 时自动包装为单元素数组 |
|
|
196
|
+
| collapsed | `boolean` | 否 | `false` | `v-model:collapsed`,控制活动布局折叠 |
|
|
191
197
|
| messageUid | `string` | 否 | — | 所属消息唯一标识,注入到节点详情 Tab 的 `data.messageUid`,用于异步回填数据 |
|
|
192
198
|
| onInterruptResume | `OnInterruptResume` | 否 | — | 节点「重试 / 跳过」与第三方审批取消复用同一回调,按 `payload.operation` 分流;流程节点操作时不传 `interrupt` |
|
|
193
199
|
| status | `MessageStatus` | 否 | — | 消息状态;`pending` / `streaming` 时标题栏显示加载动画 |
|
|
194
200
|
|
|
195
201
|
### Emits
|
|
196
202
|
|
|
197
|
-
|
|
203
|
+
| 事件名 | 说明 |
|
|
204
|
+
| --- | --- |
|
|
205
|
+
| `update:collapsed` | `v-model:collapsed` 回写 |
|
|
198
206
|
|
|
199
207
|
### Slots
|
|
200
208
|
|
|
@@ -242,7 +250,7 @@ interface BkFlowNode {
|
|
|
242
250
|
|
|
243
251
|
- `AiLoading` — 标题栏流式加载动画
|
|
244
252
|
- `ActivityLayout` — 可折叠活动容器外壳
|
|
245
|
-
- `
|
|
253
|
+
- `FlowAgentNodeDetail` — 节点详情面板(经自定义 Tab 挂载)
|
|
246
254
|
- `Loading`(bkui-vue) — 运行中状态的旋转指示
|
|
247
255
|
- `HighlightKeyword` — 任务 / 节点名称的搜索关键词高亮
|
|
248
256
|
|
|
@@ -254,8 +262,9 @@ interface BkFlowNode {
|
|
|
254
262
|
4. **`task_outputs` 暂不渲染**:模板中任务输出展示区块已注释,传入也不会显示。
|
|
255
263
|
5. **未知状态兜底为 `running`**:`getConvergedState` 对未识别的原始状态统一归为运行中。
|
|
256
264
|
6. **Share 模式只读查看**:`RenderMode.Share` 下保留节点/任务耗时与「详情」「有效证据」查看入口,仅过滤「重试 / 跳过」等交互式 resume 操作(由 `useFlowNodeActions` 的 `hideResumeActions` 收敛)。
|
|
257
|
-
7.
|
|
258
|
-
8.
|
|
265
|
+
7. **侧栏「执行情况」面板同为只读**:面板内经 `ExecutionSummary` → `MessageRender` 渲染的本组件不展示「重试 / 跳过」,只保留「详情」;判定来自 `useExecutionPanelInject()`(内部上下文,未从包入口导出;缺省 `false`),与 Share 态一起并入 `hideResumeActions`。因此脱离 `ExecutionSummary` 独立使用组件时,行为与对话流内一致。
|
|
266
|
+
8. **`onInterruptResume` 透传链路**:`MessageRender` → `ActivityMessage` → `FlowAgentContent`;未传入时重试 / 跳过按钮仍展示但点击无回调。
|
|
267
|
+
9. **pending 自动收敛**:`useFlowNodeActions` 以 `task_id:node_id:retry` 为 pending 键;节点重试再次失败(`retry` +1)后键变化,进行中态自动解除,无需手动清理。
|
|
259
268
|
|
|
260
269
|
## 关联组件
|
|
261
270
|
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
|
|
15
15
|
# FlowAgentNodeDetail FlowAgent 节点详情
|
|
16
16
|
|
|
17
|
+
> **导出状态**:内部实现,未从 `@blueking/chat-x` 包入口导出。
|
|
18
|
+
> 由 [FlowAgentContent](/components/agent/flow-agent-content) 挂到自定义 Tab。
|
|
19
|
+
|
|
17
20
|
> **能力域**:Agent 能力
|
|
18
21
|
|
|
19
22
|
`FlowAgentNodeDetail` 用于展示 FlowAgent 单个节点的配置与输出详情。它通常被 `FlowAgentContent` 通过自定义 Tab 挂载到侧栏,应用层再根据 `messageUid`、`task_id`、`node_id` 拉取真实节点详情并回填到 `data`。
|
|
@@ -53,7 +56,7 @@
|
|
|
53
56
|
</template>
|
|
54
57
|
|
|
55
58
|
<script setup lang="ts">
|
|
56
|
-
|
|
59
|
+
// FlowAgentNodeDetail 未从包入口导出;文档站 demo 使用页面顶部相对路径
|
|
57
60
|
import type { NodeDetailData } from '@blueking/chat-x';
|
|
58
61
|
|
|
59
62
|
const nodeDetailData: Partial<NodeDetailData> = {
|
|
@@ -127,7 +130,7 @@ addCustomTab?.({
|
|
|
127
130
|
label: node.name,
|
|
128
131
|
name: `${task.task_id}|${node.id}|${node.name}`,
|
|
129
132
|
data: {
|
|
130
|
-
component:
|
|
133
|
+
component: FlowAgentNodeDetail,
|
|
131
134
|
messageUid: props.messageUid,
|
|
132
135
|
props: {
|
|
133
136
|
loading: true,
|