@blueking/chat-x 0.0.50 → 0.0.51-beta.2
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/contents.d.ts +2 -0
- package/dist/ag-ui/types/messages.d.ts +5 -0
- package/dist/common/constants.d.ts +1 -1
- package/dist/components/ai-buttons/file-upload-btn/file-upload-btn.vue.d.ts +0 -2
- package/dist/components/chat-content/file-content/file-content.vue.d.ts +5 -2
- package/dist/components/chat-content/file-content/upload-file-item.vue.d.ts +12 -0
- package/dist/components/chat-content/file-content/upload-image-item.vue.d.ts +21 -0
- package/dist/components/chat-input/ai-slash-editor/ai-slash-editor.vue.d.ts +1 -1
- package/dist/components/chat-input/build-default-placeholder.d.ts +7 -0
- package/dist/components/chat-input/chat-input.vue.d.ts +1 -1
- package/dist/components/chat-message/message-container/message-container.vue.d.ts +1 -0
- package/dist/components/chat-message/message-render/message-render.vue.d.ts +2 -0
- package/dist/components/chat-message/user-message/user-message.vue.d.ts +3 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/message-tools/message-time/format-message-time.d.ts +8 -0
- package/dist/components/message-tools/message-time/message-time.vue.d.ts +8 -0
- package/dist/components/message-tools/message-tools.vue.d.ts +11 -1
- package/dist/composables/use-custom-tab.d.ts +5 -3
- package/dist/composables/use-global-config.d.ts +3 -0
- package/dist/composables/use-message-group.d.ts +150 -72
- package/dist/icons/execution.d.ts +6 -0
- package/dist/icons/tools.d.ts +3 -0
- package/dist/index.css +1 -1
- package/dist/index.js +3124 -2837
- package/dist/index.js.map +1 -1
- package/dist/lang/lang.d.ts +8 -7
- package/dist/mcp/generated/docs/ai-slash-input.md +2 -0
- package/dist/mcp/generated/docs/assistant-message.md +9 -7
- package/dist/mcp/generated/docs/chat-container.md +38 -32
- package/dist/mcp/generated/docs/chat-input.md +18 -12
- package/dist/mcp/generated/docs/cite-content.md +3 -3
- package/dist/mcp/generated/docs/desc-panel.md +32 -10
- package/dist/mcp/generated/docs/execution-summary.md +3 -3
- package/dist/mcp/generated/docs/file-artifact-panel.md +6 -4
- package/dist/mcp/generated/docs/file-content.md +89 -73
- package/dist/mcp/generated/docs/file-upload-btn.md +16 -18
- package/dist/mcp/generated/docs/message-container.md +3 -0
- package/dist/mcp/generated/docs/message-render.md +2 -1
- package/dist/mcp/generated/docs/message-time.md +180 -0
- package/dist/mcp/generated/docs/message-tools.md +47 -12
- package/dist/mcp/generated/docs/messages.md +9 -0
- package/dist/mcp/generated/docs/toolcall-render.md +82 -43
- package/dist/mcp/generated/docs/use-artifact-preview.md +19 -17
- package/dist/mcp/generated/docs/use-custom-tab.md +12 -8
- package/dist/mcp/generated/docs/use-global-config.md +15 -5
- package/dist/mcp/generated/docs/user-message.md +9 -0
- package/dist/mcp/generated/docs/user-question-card.md +2 -0
- package/dist/mcp/generated/index.json +46 -6
- package/dist/types/input.d.ts +6 -0
- package/dist/utils/file.d.ts +7 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/merge-tools-by-id.d.ts +6 -0
- package/dist/utils/upload-file.d.ts +35 -0
- package/package.json +3 -2
- package/skills/blueking-chat-x/SKILL.md +139 -0
- package/skills/blueking-chat-x/references/_index.md +131 -0
- package/skills/blueking-chat-x/references/components/activity-layout.md +134 -0
- package/skills/blueking-chat-x/references/components/activity-message.md +486 -0
- package/skills/blueking-chat-x/references/components/ai-image.md +230 -0
- package/skills/blueking-chat-x/references/components/ai-loading.md +131 -0
- package/skills/blueking-chat-x/references/components/ai-prompt-list.md +44 -0
- package/skills/blueking-chat-x/references/components/ai-selection.md +439 -0
- package/skills/blueking-chat-x/references/components/ai-skill-list.md +73 -0
- package/skills/blueking-chat-x/references/components/ai-slash-editor.md +43 -0
- package/skills/blueking-chat-x/references/components/ai-slash-input.md +56 -0
- package/skills/blueking-chat-x/references/components/ai-slash-menu.md +42 -0
- package/skills/blueking-chat-x/references/components/animation-text.md +202 -0
- package/skills/blueking-chat-x/references/components/assistant-message.md +498 -0
- package/skills/blueking-chat-x/references/components/chat-container.md +869 -0
- package/skills/blueking-chat-x/references/components/chat-input.md +769 -0
- package/skills/blueking-chat-x/references/components/cite-content.md +142 -0
- package/skills/blueking-chat-x/references/components/code-content.md +211 -0
- package/skills/blueking-chat-x/references/components/common-error-content.md +73 -0
- package/skills/blueking-chat-x/references/components/content-render.md +233 -0
- package/skills/blueking-chat-x/references/components/delete-tool.md +191 -0
- package/skills/blueking-chat-x/references/components/desc-panel.md +162 -0
- package/skills/blueking-chat-x/references/components/detail-section.md +91 -0
- package/skills/blueking-chat-x/references/components/execution-summary.md +128 -0
- package/skills/blueking-chat-x/references/components/file-artifact-panel.md +289 -0
- package/skills/blueking-chat-x/references/components/file-content.md +319 -0
- package/skills/blueking-chat-x/references/components/file-icon.md +109 -0
- package/skills/blueking-chat-x/references/components/file-upload-btn.md +159 -0
- package/skills/blueking-chat-x/references/components/flow-agent-content.md +264 -0
- package/skills/blueking-chat-x/references/components/flow-agent-node-detail.md +236 -0
- package/skills/blueking-chat-x/references/components/highlight-keyword.md +146 -0
- package/skills/blueking-chat-x/references/components/image-content.md +182 -0
- package/skills/blueking-chat-x/references/components/image-preview-group.md +184 -0
- package/skills/blueking-chat-x/references/components/image-preview.md +226 -0
- package/skills/blueking-chat-x/references/components/info-message.md +144 -0
- package/skills/blueking-chat-x/references/components/input-attachment.md +49 -0
- package/skills/blueking-chat-x/references/components/input-info-alert.md +42 -0
- package/skills/blueking-chat-x/references/components/interrupt-message.md +212 -0
- package/skills/blueking-chat-x/references/components/key-value-content.md +128 -0
- package/skills/blueking-chat-x/references/components/knowledge-rag-content.md +122 -0
- package/skills/blueking-chat-x/references/components/latex-content.md +200 -0
- package/skills/blueking-chat-x/references/components/loading-message.md +192 -0
- package/skills/blueking-chat-x/references/components/markdown-content.md +232 -0
- package/skills/blueking-chat-x/references/components/mermaid-content.md +189 -0
- package/skills/blueking-chat-x/references/components/message-container.md +645 -0
- package/skills/blueking-chat-x/references/components/message-loading.md +118 -0
- package/skills/blueking-chat-x/references/components/message-render.md +327 -0
- package/skills/blueking-chat-x/references/components/message-time.md +177 -0
- package/skills/blueking-chat-x/references/components/message-tools.md +416 -0
- package/skills/blueking-chat-x/references/components/model-selector.md +155 -0
- package/skills/blueking-chat-x/references/components/preview-toolbar.md +42 -0
- package/skills/blueking-chat-x/references/components/questions-container.md +85 -0
- package/skills/blueking-chat-x/references/components/reasoning-message.md +232 -0
- package/skills/blueking-chat-x/references/components/reference-content.md +135 -0
- package/skills/blueking-chat-x/references/components/reference-doc-content.md +109 -0
- package/skills/blueking-chat-x/references/components/scroll-btn.md +159 -0
- package/skills/blueking-chat-x/references/components/selection-footer.md +78 -0
- package/skills/blueking-chat-x/references/components/selection-question.md +88 -0
- package/skills/blueking-chat-x/references/components/shortcut-btn.md +204 -0
- package/skills/blueking-chat-x/references/components/shortcut-btns.md +266 -0
- package/skills/blueking-chat-x/references/components/shortcut-render.md +424 -0
- package/skills/blueking-chat-x/references/components/simple-table.md +101 -0
- package/skills/blueking-chat-x/references/components/text-content.md +77 -0
- package/skills/blueking-chat-x/references/components/tool-approval-card.md +183 -0
- package/skills/blueking-chat-x/references/components/tool-btn.md +317 -0
- package/skills/blueking-chat-x/references/components/tool-message.md +235 -0
- package/skills/blueking-chat-x/references/components/toolcall-render.md +348 -0
- package/skills/blueking-chat-x/references/components/user-feedback.md +233 -0
- package/skills/blueking-chat-x/references/components/user-message.md +424 -0
- package/skills/blueking-chat-x/references/components/user-question-answered-card.md +104 -0
- package/skills/blueking-chat-x/references/components/user-question-card.md +231 -0
- package/skills/blueking-chat-x/references/components/user-question-choice.md +105 -0
- package/skills/blueking-chat-x/references/components/user-question-option.md +42 -0
- package/skills/blueking-chat-x/references/components/vnode-renderer.md +122 -0
- package/skills/blueking-chat-x/references/composables/use-animation-text.md +196 -0
- package/skills/blueking-chat-x/references/composables/use-artifact-preview.md +231 -0
- package/skills/blueking-chat-x/references/composables/use-clipboard.md +203 -0
- package/skills/blueking-chat-x/references/composables/use-command-selection.md +150 -0
- package/skills/blueking-chat-x/references/composables/use-container-scroll.md +57 -0
- package/skills/blueking-chat-x/references/composables/use-custom-tab.md +158 -0
- package/skills/blueking-chat-x/references/composables/use-flow-node-actions.md +157 -0
- package/skills/blueking-chat-x/references/composables/use-full-screen.md +112 -0
- package/skills/blueking-chat-x/references/composables/use-global-config.md +148 -0
- package/skills/blueking-chat-x/references/composables/use-menu-keydown.md +163 -0
- package/skills/blueking-chat-x/references/composables/use-message-group.md +247 -0
- package/skills/blueking-chat-x/references/composables/use-observer-visible-list.md +188 -0
- package/skills/blueking-chat-x/references/composables/use-parent-scrolling.md +46 -0
- package/skills/blueking-chat-x/references/theme/theme.md +431 -0
- package/skills/blueking-chat-x/references/types/constants.md +307 -0
- package/skills/blueking-chat-x/references/types/interrupt.md +379 -0
- package/skills/blueking-chat-x/references/types/messages.md +553 -0
- package/skills/blueking-chat-x/references/types/schema.md +91 -0
- package/skills/blueking-chat-x/scripts/generate-references.mjs +314 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# FileIcon 文件类型图标
|
|
2
|
+
|
|
3
|
+
> 能力域:辅助能力 | 导入:`import { FileIcon } from '@blueking/chat-x'` | since 1.0.0
|
|
4
|
+
|
|
5
|
+
按扩展名渲染文件类型图标:内联 svg,尺寸用 1em 跟随外层 font-size; 扩展名解析走 normalizeFileExtension(优先 fileType,缺省回退 fileName,大小写不敏感, 支持 Dockerfile / .gitignore 这类无扩展名或点号开头的文件);未登记类型返回 unknown 兜底图标。 源码位置:src/components/file-icon/file-icon.vue,图标注册表在 src/icons/file-icons.ts。
|
|
6
|
+
|
|
7
|
+
**关联**:file-artifact-panel(文件产物列表与预览头使用该组件展示类型图标)、assistant-message(消息内的文件产物卡片使用该组件)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# FileIcon 文件类型图标
|
|
12
|
+
|
|
13
|
+
> **能力域**:辅助能力
|
|
14
|
+
|
|
15
|
+
`FileIcon` 按文件扩展名渲染对应的类型图标,用于文件列表、附件卡片、产物预览头等需要「一眼看出这是什么文件」的场景。图标以内联 svg 形式打进包内,不产生额外网络请求,也不需要消费方配置静态资源路径。
|
|
16
|
+
|
|
17
|
+
## 源码事实
|
|
18
|
+
|
|
19
|
+
- **源码位置**:`src/components/file-icon/file-icon.vue`
|
|
20
|
+
- **图标注册表**:`src/icons/file-icons.ts`(导出 `getFileIconSvg` / `UNKNOWN_FILE_ICON_SVG`)
|
|
21
|
+
- **扩展名解析**:`src/utils/file-type.ts` 的 `normalizeFileExtension`
|
|
22
|
+
|
|
23
|
+
## 核心能力
|
|
24
|
+
|
|
25
|
+
- **扩展名驱动**:优先取 `fileType`,缺省时回退 `fileName` 推断;大小写不敏感
|
|
26
|
+
- **特殊文件名**:`Dockerfile` / `Makefile` 这类无扩展名文件,以及 `.gitignore` / `.editorconfig` 这类点号开头的文件都能正确命中
|
|
27
|
+
- **多扩展名共用图标**:如 `xlsx` / `xls` / `csv` / `tsv` 共用表格图标,`tsx` / `jsx` 共用 React 图标
|
|
28
|
+
- **兜底不报错**:未登记的扩展名返回 `unknown` 图标,后台新增文件类型时前端不会缺图
|
|
29
|
+
- **尺寸自适应**:内部 svg 固定为 `1em`,直接用外层 `font-size` 控制大小
|
|
30
|
+
|
|
31
|
+
## 基础用法
|
|
32
|
+
|
|
33
|
+
```vue
|
|
34
|
+
<template>
|
|
35
|
+
<FileIcon file-type="pdf" />
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script setup lang="ts">
|
|
39
|
+
import { FileIcon } from '@blueking/chat-x';
|
|
40
|
+
</script>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**渲染效果**
|
|
44
|
+
|
|
45
|
+
## 从文件名推断
|
|
46
|
+
|
|
47
|
+
后台未下发 `type` 时传 `fileName` 即可,组件会取最后一段扩展名:
|
|
48
|
+
|
|
49
|
+
```vue
|
|
50
|
+
<template>
|
|
51
|
+
<!-- 取 xlsx -->
|
|
52
|
+
<FileIcon file-name="季度报告.final.xlsx" />
|
|
53
|
+
<!-- 取 gitignore -->
|
|
54
|
+
<FileIcon file-name=".gitignore" />
|
|
55
|
+
</template>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
两者同时传入时以 `fileType` 优先。
|
|
59
|
+
|
|
60
|
+
## 控制尺寸
|
|
61
|
+
|
|
62
|
+
图标宽高为 `1em`,用外层 `font-size` 控制即可,无需改 svg:
|
|
63
|
+
|
|
64
|
+
```vue
|
|
65
|
+
<template>
|
|
66
|
+
<span style="font-size: 16px"><FileIcon file-type="py" /></span>
|
|
67
|
+
<span style="font-size: 32px"><FileIcon file-type="py" /></span>
|
|
68
|
+
</template>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## API
|
|
72
|
+
|
|
73
|
+
### Props
|
|
74
|
+
|
|
75
|
+
| 属性名 | 类型 | 必填 | 默认值 | 说明 |
|
|
76
|
+
| -------- | -------- | ---- | ----------- | -------------------------------------------------------- |
|
|
77
|
+
| fileType | `string` | 否 | `undefined` | 文件类型:扩展名(如 `pdf` / `py`)或无扩展名文件名(如 `Dockerfile`) |
|
|
78
|
+
| fileName | `string` | 否 | `undefined` | 文件名,`fileType` 缺省时用于推断扩展名 |
|
|
79
|
+
|
|
80
|
+
两者都不传时渲染兜底图标。
|
|
81
|
+
|
|
82
|
+
### Emits / Slots / Expose
|
|
83
|
+
|
|
84
|
+
- 无。
|
|
85
|
+
|
|
86
|
+
## 图标覆盖范围
|
|
87
|
+
|
|
88
|
+
| 图标 | 覆盖扩展名 |
|
|
89
|
+
| ---- | ---------- |
|
|
90
|
+
| 文档类 | `pptx` / `docx` / `pdf` / `txt` / `rst` / `md` / `markdown` / `tex` |
|
|
91
|
+
| 表格类 | `xlsx` / `xlsm` / `xls` / `csv` / `tsv` |
|
|
92
|
+
| 前端 | `html` / `htm` / `css` / `scss` / `less` / `js` / `mjs` / `cjs` / `ts` / `tsx` / `jsx` / `vue` / `xml` |
|
|
93
|
+
| 后端 / 系统 | `py` / `go` / `rs` / `rb` / `java` / `kt` / `swift` / `c` / `h` / `cpp` / `hpp` / `cs` / `php` / `lua` / `r` / `scala` / `dart` / `sql` / `sh` / `bash` / `zsh` / `ps1` |
|
|
94
|
+
| 配置 | `json` / `jsonc` / `yaml` / `yml` / `toml` / `ini` / `cfg` / `conf` / `env` / `editorconfig` / `Makefile` |
|
|
95
|
+
| 工具链 | `Dockerfile` / `dockerignore` / `gitignore` |
|
|
96
|
+
| 图片 | `png` / `jpg` / `jpeg` / `svg` |
|
|
97
|
+
| 兜底 | 以上之外的所有类型 |
|
|
98
|
+
|
|
99
|
+
新增类型时在 `src/icons/file-icons.ts` 的 `FILE_ICON_GROUPS` 里补一行即可;对应 svg 需先放进 `src/svgs/` 并按需 `?raw` 引入(只引实际用到的,避免把整个图标库打进产物)。
|
|
100
|
+
|
|
101
|
+
## 使用建议
|
|
102
|
+
|
|
103
|
+
- 图标颜色由 svg 自带,不继承 `currentColor`,不要试图用 `color` 覆盖
|
|
104
|
+
- 需要与文件名同行展示时,给父容器设 `display: flex` + `gap`,组件本身已是 `inline-flex` 且 `flex-shrink: 0`
|
|
105
|
+
|
|
106
|
+
## 关联组件
|
|
107
|
+
|
|
108
|
+
- [FileArtifactPanel](../message/file-artifact-panel.md) — 文件产物列表与预览头使用该组件。
|
|
109
|
+
- [AssistantMessage](../message/assistant-message.md) — 消息内文件产物卡片的图标来源。
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# FileUploadBtn 文件上传按钮
|
|
2
|
+
|
|
3
|
+
> 能力域:输入交互 | 导入:`import { FileUploadBtn } from '@blueking/chat-x'` | since 1.0.0
|
|
4
|
+
|
|
5
|
+
文件选择按钮,封装 input[type=file] 并输出选择事件。 源码位置:src/components/ai-buttons/file-upload-btn/file-upload-btn.vue。
|
|
6
|
+
|
|
7
|
+
**关联**:chat-input(输入区附件上传按钮常见挂载位置)、file-content(选中文件常以列表形式展示待发送内容)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# FileUploadBtn 文件上传按钮
|
|
12
|
+
## 源码事实
|
|
13
|
+
|
|
14
|
+
- **源码位置**:`src/components/ai-buttons/file-upload-btn/file-upload-btn.vue`
|
|
15
|
+
- **能力域**:输入交互
|
|
16
|
+
- **能力说明**:文件选择按钮,封装 input[type=file] 并输出选择事件。
|
|
17
|
+
|
|
18
|
+
> **能力域**:输入交互
|
|
19
|
+
|
|
20
|
+
聊天输入框内置的文件上传触发按钮,点击后弹出系统文件选择框。内部包含隐藏的 `<input type="file">` 与可见的图标按钮;**不限制文件类型**,在按钮层只对**单文件**做大小与空文件过滤,**已选文件个数上限**由上层(如 `ChatInput`)统一校验并提示,避免按钮与输入区各弹一条错误提示。
|
|
21
|
+
|
|
22
|
+
## 组件结构
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
.ai-file-upload-btn(display: flex,align-items: center)
|
|
26
|
+
├── input[type="file"](.file-upload-btn-input,display: none,multiple,:accept)
|
|
27
|
+
│ accept 缺省时不下发该属性,系统选择框不过滤任何类型
|
|
28
|
+
│ 触发后走 handleFileInputChange → 校验 → emit upload → target.value = ''
|
|
29
|
+
└── span.ai-shortcut-btn.file-upload-btn-icon(热区 32×32px / 圆角 8px;图标字号跟随 --ai-icon-size-sm:small=16px、normal=18px;color: #979ba5;hover: #f0f1f5)
|
|
30
|
+
v-tippy: "上传文件,最多支持 {count} 个,单个最大 {size}MB"
|
|
31
|
+
({count} / {size} 由 MAX_UPLOAD_FILES 与 MAX_UPLOAD_FILE_SIZE 运行时填充,theme: ai-chat-box,offset: [0, 16],可通过 tippyOptions 扩展)
|
|
32
|
+
@click → fileInputRef.click()
|
|
33
|
+
└── <slot> 默认:FileUploadIcon
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 文件校验逻辑
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
用户选择文件
|
|
40
|
+
│
|
|
41
|
+
├─ 遍历所选文件:size > 0 且 size < MAX_UPLOAD_FILE_SIZE(约 2.4MB)→ 加入 toEmit
|
|
42
|
+
│ size 为 0 或 ≥ 上限 → sizeRejected += 1
|
|
43
|
+
│
|
|
44
|
+
├─ sizeRejected > 0 → bkui-vue Message.error(formatUploadNotAddedMessage,说明可能超大或超出个数等)
|
|
45
|
+
│
|
|
46
|
+
├─ toEmit.length > 0 → emit('upload', toEmit)
|
|
47
|
+
│
|
|
48
|
+
└─ target.value = ''(重置 input,允许再次选择同一文件)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**关键边界行为**:
|
|
52
|
+
|
|
53
|
+
| 场景 | 结果 |
|
|
54
|
+
| ------------------------------------------------------------ | -------------------------------------------------------------------- |
|
|
55
|
+
| 一次多选超过上层允许个数(如 `ChatInput` 内已达 3 个) | 由 **ChatInput** 侧 toast 并丢弃/不计入,不在本按钮内按个数提前拦截 |
|
|
56
|
+
| 部分文件因空文件或单文件超大被过滤 | 弹出错误 toast;若仍有合法文件,**仍触发** `upload`(payload 为合法子集) |
|
|
57
|
+
| 全部被过滤(均为空或超大) | 仅 toast,**不触发** `upload` |
|
|
58
|
+
| `file.size === 0` | 计入未添加提示,不进入 `upload` payload |
|
|
59
|
+
| `file.size >= MAX_UPLOAD_FILE_SIZE`(与全局常量一致,约 2.4MB) | 计入未添加提示,不进入 `upload` payload(比较为严格 `<`) |
|
|
60
|
+
| 选择后取消 | `files.length === 0`,不触发 `upload` |
|
|
61
|
+
|
|
62
|
+
> `multiple` prop 声明存在但当前模板中 `input` 的 `multiple` 属性为**硬编码**(非 `:multiple="multiple"` 绑定),始终允许多选,该 prop 暂时无实际效果。
|
|
63
|
+
|
|
64
|
+
> **文件类型不做限制**:组件不再默认 `accept="image/*"`,任意类型文件都可选择。若业务需要收窄,显式传入 `accept`。个数上限由上层(如 `ChatInput` 的 `MAX_UPLOAD_FILES`)控制,详见 [ChatInput 文件上传](/components/input/chat-input#file-upload)。
|
|
65
|
+
|
|
66
|
+
## 基础用法
|
|
67
|
+
|
|
68
|
+
```vue
|
|
69
|
+
<template>
|
|
70
|
+
<FileUploadBtn @upload="handleUpload" />
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<script setup lang="ts">
|
|
74
|
+
import { FileUploadBtn } from '@blueking/chat-x';
|
|
75
|
+
|
|
76
|
+
const handleUpload = (files: File[]) => {
|
|
77
|
+
console.log(
|
|
78
|
+
'选中文件:',
|
|
79
|
+
files.map(f => `${f.name}(${f.size}B)`),
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
</script>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## 限制文件类型
|
|
86
|
+
|
|
87
|
+
默认**不限制**文件类型。需要收窄时通过 `accept` 属性控制系统文件选择框的过滤条件,遵循 `<input type="file">` 的 `accept` 规范:
|
|
88
|
+
|
|
89
|
+
```vue
|
|
90
|
+
<template>
|
|
91
|
+
<!-- 不限制类型(默认,不下发 accept) -->
|
|
92
|
+
<FileUploadBtn @upload="handleUpload" />
|
|
93
|
+
|
|
94
|
+
<!-- 仅图片 -->
|
|
95
|
+
<FileUploadBtn
|
|
96
|
+
accept="image/*"
|
|
97
|
+
@upload="handleUpload"
|
|
98
|
+
/>
|
|
99
|
+
|
|
100
|
+
<!-- 文档类型 -->
|
|
101
|
+
<FileUploadBtn
|
|
102
|
+
accept=".pdf,.doc,.docx,.xlsx,.pptx"
|
|
103
|
+
@upload="handleUpload"
|
|
104
|
+
/>
|
|
105
|
+
</template>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
> `accept` 仅影响文件选择框的过滤 UI,不做服务端验证,请在 `upload` 回调中自行校验 MIME 类型。
|
|
109
|
+
|
|
110
|
+
## 自定义图标
|
|
111
|
+
|
|
112
|
+
通过默认插槽替换上传图标:
|
|
113
|
+
|
|
114
|
+
```vue
|
|
115
|
+
<template>
|
|
116
|
+
<FileUploadBtn @upload="handleUpload">
|
|
117
|
+
<span style="font-size: 16px; line-height: 1;">📎</span>
|
|
118
|
+
</FileUploadBtn>
|
|
119
|
+
</template>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## API
|
|
123
|
+
|
|
124
|
+
### Props
|
|
125
|
+
|
|
126
|
+
| 属性名 | 类型 | 默认值 | 说明 |
|
|
127
|
+
| ------------ | -------------- | ------ | -------------------------------------------------------------------------- |
|
|
128
|
+
| accept | `string` | — | 文件选择框过滤类型,遵循 `<input accept>` 规范;缺省时不下发,不限制类型 |
|
|
129
|
+
| multiple | `boolean` | `true` | 声明属性(当前版本未实际绑定到 input,始终多选) |
|
|
130
|
+
| tippyOptions | `AITippyProps` | — | 扩展 tooltip 配置,会与内置配置合并 |
|
|
131
|
+
|
|
132
|
+
### Events
|
|
133
|
+
|
|
134
|
+
| 事件名 | 参数 | 说明 |
|
|
135
|
+
| ------ | ----------------- | ----------------------------------------------------------------------------------------- |
|
|
136
|
+
| upload | `(files: File[])` | 当存在至少一个合法文件时触发;`files` 为过滤掉空文件与单文件超大(`size >= MAX_UPLOAD_FILE_SIZE`,约 2.4MB)后的数组;个数截断不在此组件内完成 |
|
|
137
|
+
|
|
138
|
+
### Slots
|
|
139
|
+
|
|
140
|
+
| 插槽名 | 说明 |
|
|
141
|
+
| ------- | ----------------------------------------------- |
|
|
142
|
+
| default | 自定义按钮图标内容,默认为内置 `FileUploadIcon` |
|
|
143
|
+
|
|
144
|
+
## 使用场景
|
|
145
|
+
|
|
146
|
+
`FileUploadBtn` 由 `ChatInput` 组件内置,当 `ChatInput` 的 `supportUpload` prop 为 `true`(默认值)时自动渲染。一般不需要单独引入,除非构建完全自定义的输入区域。
|
|
147
|
+
|
|
148
|
+
## 类型定义
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
import type { TippyOptions } from 'vue-tippy';
|
|
152
|
+
|
|
153
|
+
type AITippyProps = Partial<Pick<TippyOptions, 'appendTo' | 'placement' | 'zIndex'>>;
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## 关联组件
|
|
157
|
+
|
|
158
|
+
- [ChatInput](/components/input/chat-input) — 默认内置上传入口
|
|
159
|
+
- [FileContent](/components/medias/file-content) — 选中文件列表展示
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
# FlowAgentContent FlowAgent 执行内容
|
|
2
|
+
|
|
3
|
+
> 能力域:Agent 能力 | 导入:`import { FlowAgentContent } from '@blueking/chat-x'` | since 1.0.0
|
|
4
|
+
|
|
5
|
+
渲染 FlowAgent 任务/节点执行状态、耗时、详情入口和自定义 Tab 联动。 源码位置:src/components/chat-content/flow-agent-content/flow-agent-content.vue。
|
|
6
|
+
|
|
7
|
+
**关联**:flow-agent-node-detail(详情入口点击后挂载到自定义 Tab 渲染)、activity-layout(提供可折叠的活动容器外壳)、chat-container(通过自定义 Tab 在侧栏展示节点详情)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# FlowAgentContent FlowAgent 执行内容
|
|
12
|
+
|
|
13
|
+
> **能力域**:Agent 能力
|
|
14
|
+
|
|
15
|
+
渲染 FlowAgent(标准运维 / 流程编排)执行过程的活动组件,以「任务 → 节点」两级结构展示执行状态、耗时统计与详情入口。组件内部消费 `useCustomTabConsumer`,点击节点「详情」会向侧栏的自定义 Tab 注入 `FlowAgentNodeDetail` 渲染节点输入输出。
|
|
16
|
+
|
|
17
|
+
通常不需要直接使用,`MessageRender` 会根据消息 `content.type === flow_agent` 自动渲染。
|
|
18
|
+
|
|
19
|
+
## 源码事实
|
|
20
|
+
|
|
21
|
+
- **源码位置**:`src/components/chat-content/flow-agent-content/flow-agent-content.vue`
|
|
22
|
+
- **能力说明**:渲染 FlowAgent 任务/节点执行状态、耗时、详情入口和自定义 Tab 联动。
|
|
23
|
+
|
|
24
|
+
## 核心能力
|
|
25
|
+
|
|
26
|
+
- **状态聚合统计**:汇总所有任务的 `statistics.state_counts`,在标题栏按「执行中 / 成功 / 失败 / 挂起 / 待执行」分类展示带颜色的计数(超过 99 显示 `99+`)
|
|
27
|
+
- **两级折叠**:任务整体由 `ActivityLayout` 折叠;每个任务节点列表可单独展开/收起
|
|
28
|
+
- **耗时格式化**:节点耗时与任务总耗时按 `d/h/m/s` 紧凑展示,小于 1 秒显示 `<1s`
|
|
29
|
+
- **节点行尾操作**:hover 失败节点行显示「重试 / 跳过 / 详情」按钮组(间距 12px);成功 / 运行中等非失败节点仅显示「详情」。重试 / 跳过依赖节点 `retryable` / `skippable` 能力位,通过 `onInterruptResume` 回传 Agent
|
|
30
|
+
- **重试 / 跳过进行中态**:点击后节点行进入 `is-pending`,按钮组常驻显示(无需 hover);进行中按钮切换为 loading +「重试中 / 跳过中」,重试与跳过互斥禁用;被阻塞按钮 hover 显示提示(如「任务正在重试中,不可跳过」);详情不受影响。pending 以 `task_id:node_id:retry` 为键,后端 `retry` 计数变化后自动失效
|
|
31
|
+
- **详情入口联动**:「详情」按钮点击后通过自定义 Tab 挂载 `FlowAgentNodeDetail`
|
|
32
|
+
- **分享态只读查看**:`RenderMode.Share` 下保留耗时、「详情」「有效证据」等只读查看入口,仅隐藏「重试 / 跳过」等交互式 resume 操作
|
|
33
|
+
|
|
34
|
+
## 状态映射
|
|
35
|
+
|
|
36
|
+
组件将后端原始 `state` / `task_state` 归一为 5 类收敛状态(`getConvergedState`),用于图标、颜色与统计分类:
|
|
37
|
+
|
|
38
|
+
| 收敛状态 | 颜色 | 原始状态 |
|
|
39
|
+
| ----------- | ----------- | --------------------------------------------------------------------------------- |
|
|
40
|
+
| `success` | `#18B456` | `FINISHED` |
|
|
41
|
+
| `failed` | `#EA3636` | `FAILED`、`REVOKED`、`ROLL_BACK_FAILED` |
|
|
42
|
+
| `suspended` | `#F59500` | `SUSPENDED` |
|
|
43
|
+
| `pending` | `#4D4F56` | `PENDING` |
|
|
44
|
+
| `running` | `#3A84FF` | `CREATED`、`LOOP_READY`、`READY`、`RUNNING`、`BLOCKED`、`ROLLING_BACK`、`ROLL_BACK_SUCCESS` 及未知状态(兜底) |
|
|
45
|
+
|
|
46
|
+
## 基础用法
|
|
47
|
+
|
|
48
|
+
`content` 为任务数组 `BkFlowTask[]`;传入单个对象时组件会自动包装为单元素数组。
|
|
49
|
+
|
|
50
|
+
```vue
|
|
51
|
+
<template>
|
|
52
|
+
<FlowAgentContent
|
|
53
|
+
:content="flowContent"
|
|
54
|
+
:message-uid="messageUid"
|
|
55
|
+
:on-interrupt-resume="handleInterruptResume"
|
|
56
|
+
:status="status"
|
|
57
|
+
/>
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<script setup lang="ts">
|
|
61
|
+
import { FlowAgentContent } from '@blueking/chat-x';
|
|
62
|
+
import type { BkFlowMessageContent, OnInterruptResume } from '@blueking/chat-x';
|
|
63
|
+
|
|
64
|
+
const messageUid = 'flow-msg-1';
|
|
65
|
+
const status = 'success';
|
|
66
|
+
const handleInterruptResume: OnInterruptResume = async payload => {
|
|
67
|
+
console.log('flow node resume:', payload);
|
|
68
|
+
};
|
|
69
|
+
const flowContent: BkFlowMessageContent = [
|
|
70
|
+
{
|
|
71
|
+
task_id: 100,
|
|
72
|
+
task_name: '主机巡检流程',
|
|
73
|
+
task_state: 'FINISHED',
|
|
74
|
+
task_outputs: { result: 'ok' },
|
|
75
|
+
statistics: { state_counts: { FINISHED: 2, FAILED: 1 }, total: 3 },
|
|
76
|
+
nodes: {
|
|
77
|
+
n1: { id: 'n1', name: '采集主机指标', state: 'FINISHED', elapsed_time: 12, type: 'task', loop: 0, retry: 0, skip: false, start_time: '', finish_time: '' },
|
|
78
|
+
n2: { id: 'n2', name: '分析异常项', state: 'FINISHED', elapsed_time: 65, type: 'task', loop: 0, retry: 0, skip: false, start_time: '', finish_time: '' },
|
|
79
|
+
n3: { id: 'n3', name: '推送告警', state: 'FAILED', elapsed_time: 3, type: 'task', loop: 0, retry: 1, skip: false, retryable: true, skippable: true, start_time: '', finish_time: '' },
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
];
|
|
83
|
+
</script>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**渲染效果**(hover 失败节点行可看到「重试 / 跳过 / 详情」按钮组;点击「详情」会向侧栏自定义 Tab 注入节点详情)
|
|
87
|
+
|
|
88
|
+
## 执行中状态
|
|
89
|
+
|
|
90
|
+
`status` 为 `pending` / `streaming` 时,标题栏图标显示为加载动画;运行中的节点显示旋转 Loading,待执行 / 挂起节点显示对应颜色的状态点。
|
|
91
|
+
|
|
92
|
+
## 失败节点重试 / 跳过
|
|
93
|
+
|
|
94
|
+
失败节点(`convergedState === 'failed'`)且具备对应能力位时,hover 行尾展示「重试」或「跳过」按钮。点击后:
|
|
95
|
+
|
|
96
|
+
1. 节点行添加 `is-pending` class,按钮组常驻显示(设计稿:鼠标移出后仍可见进行中反馈)
|
|
97
|
+
2. 被点击按钮进入 loading +「重试中 / 跳过中」,重试与跳过均禁用(`is-disabled`,置灰色 `#c4c6cc`)
|
|
98
|
+
3. 另一按钮 hover 显示阻塞提示(`v-tippy`)
|
|
99
|
+
4. 调用 `onInterruptResume`,**不传** `interrupt` 参数;进行中重复点击被 `handleActionClick` 拦截
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
// 组件层点击分发(禁用态不执行 run)
|
|
103
|
+
const handleActionClick = (action: FlowNodeActionVM) => {
|
|
104
|
+
if (action.disabled) return;
|
|
105
|
+
action.run();
|
|
106
|
+
};
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
// 重试
|
|
111
|
+
onInterruptResume?.({
|
|
112
|
+
operation: InterruptResumeOperation.FlowNodeRetry,
|
|
113
|
+
payload: { node_id: node.id, task_id: task.task_id },
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// 跳过
|
|
117
|
+
onInterruptResume?.({
|
|
118
|
+
operation: InterruptResumeOperation.FlowNodeSkip,
|
|
119
|
+
payload: { node_id: node.id, task_id: task.task_id },
|
|
120
|
+
});
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
| 按钮 | 显隐条件 | 进行中表现 | `operation` |
|
|
124
|
+
| ---- | ------------------------------------- | ---------------------------------- | ---------------------- |
|
|
125
|
+
| 重试 | 失败态且 `node.retryable === true` | loading +「重试中」,二者均禁用 | `flow_node_retry` |
|
|
126
|
+
| 跳过 | 失败态且 `node.skippable === true` | loading +「跳过中」,二者均禁用 | `flow_node_skip` |
|
|
127
|
+
| 详情 | 始终展示(含 Share 分享态) | 不受 pending 影响 | —(打开侧栏 Tab,不走 resume) |
|
|
128
|
+
|
|
129
|
+
行尾操作由内部 composable [`useFlowNodeActions`](/composables/use-flow-node-actions) 聚合为声明式列表,组件层仅遍历渲染。
|
|
130
|
+
|
|
131
|
+
## 节点详情联动
|
|
132
|
+
|
|
133
|
+
点击节点「详情」按钮时,组件调用 `addCustomTab` 注入一个以 `${task_id}|${node.id}|${node.name}` 为唯一 `name` 的 Tab,渲染组件为 `FlowAgentNodeDetail`:
|
|
134
|
+
|
|
135
|
+
```ts
|
|
136
|
+
addCustomTab?.({
|
|
137
|
+
label: node.name,
|
|
138
|
+
name: `${task.task_id}|${node.id}|${node.name}`,
|
|
139
|
+
data: {
|
|
140
|
+
component: BkFlowNodeDetail,
|
|
141
|
+
messageUid: props.messageUid,
|
|
142
|
+
props: {
|
|
143
|
+
loading: true,
|
|
144
|
+
node_id: node.id,
|
|
145
|
+
node_name: node.name,
|
|
146
|
+
task_id: task.task_id,
|
|
147
|
+
task_name: task.task_name,
|
|
148
|
+
data: {},
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
> 实际节点详情数据由应用层在 `ChatContainer` 的 `onCustomTabChange` 中异步拉取后回填,组件本身只负责挂载占位与传参。组件卸载时(在消息容器滚动上下文中)会自动调用 `removeCustomTab` 清理对应 Tab。
|
|
155
|
+
|
|
156
|
+
## 组件结构
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
ActivityLayout(activity-type=flow_agent,v-model:collapsed)
|
|
160
|
+
├── #title(执行情况统计栏)
|
|
161
|
+
│ ├── AiLoading / ArrowRightIcon(加载态 / 折叠箭头)
|
|
162
|
+
│ └── flow-agent-stat-item × N(按收敛状态分类的计数)
|
|
163
|
+
└── flow-agent-task-group × N(任务)
|
|
164
|
+
├── flow-agent-task-header(点击折叠当前任务)
|
|
165
|
+
│ ├── task-arrow(任务展开箭头)
|
|
166
|
+
│ ├── task-state-icon(Loading / 状态图标)
|
|
167
|
+
│ ├── task-name(HighlightKeyword + 溢出提示)
|
|
168
|
+
│ └── task-time(任务总耗时 = 各节点耗时累加)
|
|
169
|
+
└── flow-agent-task-nodes(v-show 折叠)
|
|
170
|
+
└── flow-agent-node-item × N(节点;`is-pending` 时按钮组常驻)
|
|
171
|
+
├── node-status(Loading / 状态圆点)
|
|
172
|
+
├── node-name(HighlightKeyword + 溢出提示)
|
|
173
|
+
└── node-trailing(含 Share 分享态)
|
|
174
|
+
├── node-time(节点耗时,hover / pending 时隐藏)
|
|
175
|
+
└── node-actions(hover 或 `is-pending` 时显示,间距 12px)
|
|
176
|
+
├── node-action-btn「重试」(失败 + retryable;Share 态隐藏;进行中 loading + 禁用)
|
|
177
|
+
├── node-action-btn「跳过」(失败 + skippable;Share 态隐藏;进行中 loading + 禁用)
|
|
178
|
+
└── node-action-btn「详情」(始终可用,含 Share 态,点击挂载详情 Tab)
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## API
|
|
182
|
+
|
|
183
|
+
### Props
|
|
184
|
+
|
|
185
|
+
| 属性名 | 类型 | 必填 | 默认值 | 说明 |
|
|
186
|
+
| ---------- | ------------------------ | ---- | ----------- | -------------------------------------------------------------------------- |
|
|
187
|
+
| content | `BkFlowMessageContent` | 否 | `[{}]` | 任务数组;传入单个 `BkFlowTask` 时自动包装为单元素数组 |
|
|
188
|
+
| messageUid | `string` | 否 | — | 所属消息唯一标识,注入到节点详情 Tab 的 `data.messageUid`,用于异步回填数据 |
|
|
189
|
+
| onInterruptResume | `OnInterruptResume` | 否 | — | 节点「重试 / 跳过」与第三方审批取消复用同一回调,按 `payload.operation` 分流;流程节点操作时不传 `interrupt` |
|
|
190
|
+
| status | `MessageStatus` | 否 | — | 消息状态;`pending` / `streaming` 时标题栏显示加载动画 |
|
|
191
|
+
|
|
192
|
+
### Emits
|
|
193
|
+
|
|
194
|
+
- 无。
|
|
195
|
+
|
|
196
|
+
### Slots
|
|
197
|
+
|
|
198
|
+
- 无。
|
|
199
|
+
|
|
200
|
+
### Expose
|
|
201
|
+
|
|
202
|
+
- 无。
|
|
203
|
+
|
|
204
|
+
## 类型定义
|
|
205
|
+
|
|
206
|
+
```typescript
|
|
207
|
+
// 来自 @blueking/chat-x 导出
|
|
208
|
+
type BkFlowMessageContent = BkFlowTask[];
|
|
209
|
+
|
|
210
|
+
interface BkFlowTask {
|
|
211
|
+
task_id: number;
|
|
212
|
+
task_name: string;
|
|
213
|
+
task_state: string; // 原始任务状态,经 getConvergedState 归一
|
|
214
|
+
task_outputs: unknown; // 任务输出(当前展示区块已注释,不渲染)
|
|
215
|
+
statistics: {
|
|
216
|
+
state_counts: Record<string, number>; // 原始状态 → 数量,用于标题统计聚合
|
|
217
|
+
total: number;
|
|
218
|
+
};
|
|
219
|
+
nodes: Record<string, BkFlowNode>; // key 为节点 id
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
interface BkFlowNode {
|
|
223
|
+
id: string;
|
|
224
|
+
name: string;
|
|
225
|
+
state: string; // 原始节点状态
|
|
226
|
+
elapsed_time: number; // 耗时(秒)
|
|
227
|
+
type: string;
|
|
228
|
+
loop: number;
|
|
229
|
+
retry: number;
|
|
230
|
+
retryable?: boolean; // 是否可重试(失败节点「重试」按钮显隐)
|
|
231
|
+
skip: boolean;
|
|
232
|
+
skippable?: boolean; // 是否可跳过(失败节点「跳过」按钮显隐)
|
|
233
|
+
start_time: string;
|
|
234
|
+
finish_time: string;
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## 组件依赖
|
|
239
|
+
|
|
240
|
+
- `AiLoading` — 标题栏流式加载动画
|
|
241
|
+
- `ActivityLayout` — 可折叠活动容器外壳
|
|
242
|
+
- `BkFlowNodeDetail` — 节点详情面板(经自定义 Tab 挂载)
|
|
243
|
+
- `Loading`(bkui-vue) — 运行中状态的旋转指示
|
|
244
|
+
- `HighlightKeyword` — 任务 / 节点名称的搜索关键词高亮
|
|
245
|
+
|
|
246
|
+
## 注意事项
|
|
247
|
+
|
|
248
|
+
1. **依赖自定义 Tab 上下文**:组件内部使用 `useCustomTabConsumer()!`,必须存在 `useCustomTabProvider` 提供者(`ChatContainer` 已内置)。脱离上下文直接使用需自行提供,否则详情入口会报错。
|
|
249
|
+
2. **统计来自 `statistics.state_counts` 而非节点遍历**:标题栏计数直接读取后端下发的统计,不会实时统计 `nodes`;两者不一致时以 `state_counts` 为准。
|
|
250
|
+
3. **任务总耗时为节点累加**:`task-time` 由各节点 `elapsed_time` 求和得到,并非任务级独立字段。
|
|
251
|
+
4. **`task_outputs` 暂不渲染**:模板中任务输出展示区块已注释,传入也不会显示。
|
|
252
|
+
5. **未知状态兜底为 `running`**:`getConvergedState` 对未识别的原始状态统一归为运行中。
|
|
253
|
+
6. **Share 模式只读查看**:`RenderMode.Share` 下保留节点/任务耗时与「详情」「有效证据」查看入口,仅过滤「重试 / 跳过」等交互式 resume 操作(由 `useFlowNodeActions` 的 `hideResumeActions` 收敛)。
|
|
254
|
+
7. **`onInterruptResume` 透传链路**:`MessageRender` → `ActivityMessage` → `FlowAgentContent`;未传入时重试 / 跳过按钮仍展示但点击无回调。
|
|
255
|
+
8. **pending 自动收敛**:`useFlowNodeActions` 以 `task_id:node_id:retry` 为 pending 键;节点重试再次失败(`retry` +1)后键变化,进行中态自动解除,无需手动清理。
|
|
256
|
+
|
|
257
|
+
## 关联组件
|
|
258
|
+
|
|
259
|
+
- [FlowAgentNodeDetail](/components/agent/flow-agent-node-detail) — 节点详情面板
|
|
260
|
+
- [ActivityLayout](/components/helper/activity-layout) — 可折叠活动容器
|
|
261
|
+
- [ChatContainer](/components/setup/chat-container) — 侧栏自定义 Tab 挂载场景
|
|
262
|
+
- [useFlowNodeActions](/composables/use-flow-node-actions) — 节点行尾操作聚合 composable
|
|
263
|
+
- [中断类型 Interrupt](/types/interrupt) — `InterruptResumeOperation`、`FlowNodeResume`、`OnInterruptResume`
|
|
264
|
+
- [使用建议] 优先通过上层组合组件(`MessageRender`)使用;直接使用前请确认 `content` 数据结构来自对应类型定义。
|