@blueking/chat-x 0.0.49-beta.7 → 0.0.49-beta.9
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/file.d.ts +1 -11
- package/dist/ag-ui/types/messages.d.ts +2 -0
- package/dist/components/chat-message/assistant-message/message-artifacts/artifact-preview/artifact-preview-host.vue.d.ts +5 -1
- package/dist/components/chat-message/assistant-message/message-artifacts/artifact-preview/preview-strategy.d.ts +4 -5
- package/dist/components/chat-message/assistant-message/message-artifacts/artifact-preview/renderers/code-preview.vue.d.ts +8 -0
- package/dist/components/chat-message/assistant-message/message-artifacts/artifact-preview/renderers/image-preview.vue.d.ts +7 -0
- package/dist/components/chat-message/assistant-message/message-artifacts/artifact-preview/use-artifact-preview-loader.d.ts +1 -0
- package/dist/components/chat-message/assistant-message/message-artifacts/file-artifact-panel.vue.d.ts +1 -0
- package/dist/components/chat-message/user-message/user-message.vue.d.ts +1 -0
- package/dist/components/file-icon/file-icon.vue.d.ts +7 -0
- package/dist/components/index.d.ts +3 -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-global-config.d.ts +3 -0
- package/dist/composables/use-message-group.d.ts +144 -72
- package/dist/icons/file-icons.d.ts +4 -0
- package/dist/icons/file.d.ts +0 -18
- package/dist/icons/index.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +2239 -1982
- package/dist/index.js.map +1 -1
- package/dist/lang/lang.d.ts +2 -1
- package/dist/mcp/generated/docs/assistant-message.md +12 -8
- package/dist/mcp/generated/docs/chat-container.md +3 -1
- package/dist/mcp/generated/docs/file-artifact-panel.md +27 -11
- package/dist/mcp/generated/docs/file-icon.md +111 -0
- package/dist/mcp/generated/docs/message-container.md +2 -0
- 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 +4 -0
- package/dist/mcp/generated/docs/use-global-config.md +15 -5
- package/dist/mcp/generated/docs/user-message.md +6 -0
- package/dist/mcp/generated/index.json +61 -5
- package/dist/utils/file-type.d.ts +14 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +2 -2
- package/dist/components/chat-message/assistant-message/message-artifacts/file-icon.d.ts +0 -29
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<!-- AI SUMMARY -->
|
|
2
2
|
## 快速了解
|
|
3
3
|
|
|
4
|
-
useGlobalConfig 接收 GlobalConfig(含 size?: ComputedRef<AiSizeMode>、supportUpload: ComputedRef<boolean>),以 GLOBAL_CONFIG_TOKEN provide 给后代; injectGlobalConfig 在子组件中取出配置,无 Provider 时返回 undefined。ChatContainer 在 setup 中调用 useGlobalConfig 注入 size 与
|
|
4
|
+
useGlobalConfig 接收 GlobalConfig(含 size?: ComputedRef<AiSizeMode>、supportUpload: ComputedRef<boolean>、timezone?: ComputedRef<string | undefined>),以 GLOBAL_CONFIG_TOKEN provide 给后代; injectGlobalConfig 在子组件中取出配置,无 Provider 时返回 undefined。ChatContainer 在 setup 中调用 useGlobalConfig 注入 size、supportUpload 与 timezone; 后代组件可通过 injectGlobalConfig 读取配置;字号主题主要通过根节点 data-ai-size 与 CSS 变量生效。
|
|
5
5
|
|
|
6
6
|
### 关联组件
|
|
7
7
|
- **chat-container** — 根容器调用 useGlobalConfig 注入 supportUpload
|
|
8
|
+
- **message-time** — 消息时间组件读取 timezone
|
|
8
9
|
|
|
9
10
|
---
|
|
10
11
|
<!-- FULL DOC -->
|
|
@@ -13,7 +14,7 @@ useGlobalConfig 接收 GlobalConfig(含 size?: ComputedRef<AiSizeMode>、suppo
|
|
|
13
14
|
|
|
14
15
|
> **分类**:composable
|
|
15
16
|
|
|
16
|
-
在聊天容器根组件与子组件之间通过 Vue `provide` / `inject` 共享**全局展示相关配置**(当前包括字号主题档位 `size`、是否支持上传 `supportUpload`)。与 Teleport 插槽 ID 无关。
|
|
17
|
+
在聊天容器根组件与子组件之间通过 Vue `provide` / `inject` 共享**全局展示相关配置**(当前包括字号主题档位 `size`、是否支持上传 `supportUpload`、消息时间时区 `timezone`)。与 Teleport 插槽 ID 无关。
|
|
17
18
|
|
|
18
19
|
> 字号主题主要通过 `ChatContainer` 根节点的 `data-ai-size` 与 CSS 变量(`--ai-font-size` 等)生效;`GlobalConfig.size` 供后代在逻辑层读取当前档位,样式层无需逐组件传参。
|
|
19
20
|
|
|
@@ -25,10 +26,11 @@ ChatContainer(根)
|
|
|
25
26
|
├── useGlobalConfig({
|
|
26
27
|
│ size: computed(() => props.size ?? 'small'),
|
|
27
28
|
│ supportUpload: computed(() => props.supportUpload ?? false),
|
|
29
|
+
│ timezone: computed(() => props.timezone),
|
|
28
30
|
│ })
|
|
29
|
-
│ └── provide(GLOBAL_CONFIG_TOKEN, { size, supportUpload })
|
|
31
|
+
│ └── provide(GLOBAL_CONFIG_TOKEN, { size, supportUpload, timezone })
|
|
30
32
|
│
|
|
31
|
-
└── MessageContainer → … → UserMessage 等
|
|
33
|
+
└── MessageContainer → … → UserMessage / MessageTime 等
|
|
32
34
|
|
|
33
35
|
UserMessage(后代)
|
|
34
36
|
├── injectGlobalConfig()
|
|
@@ -51,11 +53,14 @@ UserMessage(后代)
|
|
|
51
53
|
const props = defineProps<{
|
|
52
54
|
size?: 'normal' | 'small';
|
|
53
55
|
supportUpload?: boolean;
|
|
56
|
+
timezone?: string;
|
|
54
57
|
}>();
|
|
55
58
|
|
|
56
59
|
useGlobalConfig({
|
|
57
60
|
size: computed(() => props.size ?? 'small'),
|
|
58
61
|
supportUpload: computed(() => props.supportUpload ?? false),
|
|
62
|
+
// 无默认值:未配置时由 MessageTime 回退到浏览器时区
|
|
63
|
+
timezone: computed(() => props.timezone),
|
|
59
64
|
});
|
|
60
65
|
</script>
|
|
61
66
|
```
|
|
@@ -88,11 +93,13 @@ export type AiSizeMode = 'normal' | 'small';
|
|
|
88
93
|
export type GlobalConfig = {
|
|
89
94
|
size?: ComputedRef<AiSizeMode>;
|
|
90
95
|
supportUpload: ComputedRef<boolean>;
|
|
96
|
+
timezone?: ComputedRef<string | undefined>;
|
|
91
97
|
};
|
|
92
98
|
|
|
93
99
|
export function useGlobalConfig(options: GlobalConfig): {
|
|
94
100
|
size?: ComputedRef<AiSizeMode>;
|
|
95
101
|
supportUpload: ComputedRef<boolean>;
|
|
102
|
+
timezone?: ComputedRef<string | undefined>;
|
|
96
103
|
};
|
|
97
104
|
|
|
98
105
|
export function injectGlobalConfig(): GlobalConfig | undefined;
|
|
@@ -110,6 +117,7 @@ export function injectGlobalConfig(): GlobalConfig | undefined;
|
|
|
110
117
|
| --------------- | ------------------------------------------------------------------------ |
|
|
111
118
|
| `size` | 可选。字号主题档位 `normal`(14px)/ `small`(12px),与 `ChatContainer.size` 对齐 |
|
|
112
119
|
| `supportUpload` | 是否支持上传,与根容器 `ChatContainer` 的 `supportUpload` 等展示策略对齐 |
|
|
120
|
+
| `timezone` | 可选。消息时间展示所用的 IANA 时区名,与 `ChatContainer.timezone` 对齐;未配置时 `MessageTime` 按浏览器时区展示 |
|
|
113
121
|
|
|
114
122
|
### `useGlobalConfig(options)`
|
|
115
123
|
|
|
@@ -117,6 +125,7 @@ export function injectGlobalConfig(): GlobalConfig | undefined;
|
|
|
117
125
|
| ----------------------- | ------------------------------------------------------------------------------------- |
|
|
118
126
|
| `options.size` | 可选。字号主题档位,建议使用 `computed(() => props.size ?? 'small')` 与根 props 同步 |
|
|
119
127
|
| `options.supportUpload` | 是否支持上传,建议使用 `computed(() => props.supportUpload ?? false)` 与根 props 同步 |
|
|
128
|
+
| `options.timezone` | 可选。消息时间时区,建议使用 `computed(() => props.timezone)` 与根 props 同步;不设默认值,交由 `MessageTime` 回退浏览器时区 |
|
|
120
129
|
|
|
121
130
|
- 调用后立即 `provide(GLOBAL_CONFIG_TOKEN, options)`。
|
|
122
131
|
- 必须在具有组件实例上下文的 `setup` 中调用(与 Vue `provide` 要求一致)。
|
|
@@ -136,5 +145,6 @@ export function injectGlobalConfig(): GlobalConfig | undefined;
|
|
|
136
145
|
|
|
137
146
|
## 关联组件
|
|
138
147
|
|
|
139
|
-
- [ChatContainer](../components/setup/chat-container) — 调用 `useGlobalConfig` 注入 `size` 与 `
|
|
148
|
+
- [ChatContainer](../components/setup/chat-container) — 调用 `useGlobalConfig` 注入 `size`、`supportUpload` 与 `timezone`
|
|
149
|
+
- [MessageTime](../components/feedback/message-time) — 读取 `timezone` 展示消息时间
|
|
140
150
|
- [主题配置](../theme/theme) — `data-ai-size` 与 CSS 变量说明
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
### 关联组件
|
|
7
7
|
- **message-render** — 由 MessageRender 在 role 为 user 时创建
|
|
8
8
|
- **message-tools** — 消息工具栏交互与状态由 MessageTools 体系承载
|
|
9
|
+
- **message-time** — createdAt 经工具栏 prepend 插槽展示
|
|
9
10
|
- **message-container** — 嵌入列表时由 MessageContainer 管理分组与多选
|
|
10
11
|
- **chat-input** — 编辑态普通消息使用 ChatInput
|
|
11
12
|
|
|
@@ -47,8 +48,11 @@
|
|
|
47
48
|
v-if: messageToolsStatus !== 'hidden'
|
|
48
49
|
visibility: hidden(默认)→ visible(:hover 时)
|
|
49
50
|
tools: [copy, cite, edit, delete],updateTools: []
|
|
51
|
+
#prepend slot → MessageTime(createdAt,工具图标左侧)
|
|
50
52
|
```
|
|
51
53
|
|
|
54
|
+
> **时间随工具栏显隐**:时间位于工具栏内,与工具按钮共用 `visibility` 控制,因此同样在悬停消息时才可见。
|
|
55
|
+
|
|
52
56
|
**编辑模式**(点击 `edit` 按钮后 `isEdit=true`)
|
|
53
57
|
|
|
54
58
|
```
|
|
@@ -356,6 +360,7 @@ binaryFiles 有值 → 进入编辑模式(editContent 可为空)
|
|
|
356
360
|
| 属性名 | 类型 | 说明 |
|
|
357
361
|
| ------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------- |
|
|
358
362
|
| content | `string \| InputContent[]` | 消息内容,字符串或含 text/binary 的数组 |
|
|
363
|
+
| createdAt | `number \| string` | 消息创建时间,经 `MessageTools` 的 `#prepend` 插槽交给 `MessageTime` 渲染在工具图标左侧;无值时不展示 |
|
|
359
364
|
| property | `{ extra?: MessageExtra; artifacts?: AIFileInfo[] }` | 附加属性;本组件消费 `extra.cite` / `shortcut` / `context` |
|
|
360
365
|
| messageToolsStatus | `MessageToolsStatus` | 工具按钮状态,`disabled` 禁用、`hidden` 从 DOM 移除 |
|
|
361
366
|
| onAction | `MessageToolsProps['onAction']` | 工具回调;`copy`/`edit` 有内置行为,`cite`/`delete` 需外部处理 |
|
|
@@ -417,4 +422,5 @@ type MessageExtra = {
|
|
|
417
422
|
|
|
418
423
|
- [MessageRender](/components/message/message-render) — user 角色由其实例化
|
|
419
424
|
- [MessageTools](/components/feedback/message-tools) — 工具栏交互
|
|
425
|
+
- [MessageTime](/components/feedback/message-time) — 工具栏左侧的消息时间
|
|
420
426
|
- [MessageContainer](/components/setup/message-container) — 列表与多选容器
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "2.0.0",
|
|
3
|
-
"generatedAt": "2026-08-
|
|
3
|
+
"generatedAt": "2026-08-17T11:24:59.221Z",
|
|
4
4
|
"domains": {
|
|
5
5
|
"setup": {
|
|
6
6
|
"label": "对话搭建",
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
"label": "工具与反馈",
|
|
84
84
|
"components": [
|
|
85
85
|
"delete-tool",
|
|
86
|
+
"message-time",
|
|
86
87
|
"message-tools",
|
|
87
88
|
"scroll-btn",
|
|
88
89
|
"tool-btn",
|
|
@@ -98,6 +99,7 @@
|
|
|
98
99
|
"components": [
|
|
99
100
|
"activity-layout",
|
|
100
101
|
"ai-loading",
|
|
102
|
+
"file-icon",
|
|
101
103
|
"highlight-keyword",
|
|
102
104
|
"message-loading",
|
|
103
105
|
"questions-container",
|
|
@@ -433,12 +435,35 @@
|
|
|
433
435
|
"docFile": "docs/delete-tool.md",
|
|
434
436
|
"domain": "feedback"
|
|
435
437
|
},
|
|
438
|
+
{
|
|
439
|
+
"name": "MessageTime 消息时间",
|
|
440
|
+
"slug": "message-time",
|
|
441
|
+
"kind": "component",
|
|
442
|
+
"description": "按「今天 / 昨天 / 今年内 / 跨年」四档格式展示消息创建时间。",
|
|
443
|
+
"aiSummary": "按 createdAt 展示消息时间,四档格式:今天 `12:00`、昨天 `昨天 12:00`、今年内更早 `3-12 12:00`、非今年 `2025-3-12 12:00`; 时区取 props.timezone,未传时回退 injectGlobalConfig().timezone(由 ChatContainer 的 timezone prop 注入),都没有则用浏览器时区; 无值或非法时间不渲染任何 DOM。通常通过 MessageTools 的 prepend / append 插槽使用。 源码位置:src/components/message-tools/message-time/message-time.vue。",
|
|
444
|
+
"relatedComponents": [
|
|
445
|
+
{
|
|
446
|
+
"slug": "message-tools",
|
|
447
|
+
"relation": "通过 prepend / append 插槽嵌入工具栏"
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"slug": "user-message",
|
|
451
|
+
"relation": "用户消息在工具栏左侧展示时间"
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"slug": "message-container",
|
|
455
|
+
"relation": "AI 消息组在工具栏右侧展示本轮回答时间"
|
|
456
|
+
}
|
|
457
|
+
],
|
|
458
|
+
"docFile": "docs/message-time.md",
|
|
459
|
+
"domain": "feedback"
|
|
460
|
+
},
|
|
436
461
|
{
|
|
437
462
|
"name": "MessageTools 消息工具栏",
|
|
438
463
|
"slug": "message-tools",
|
|
439
464
|
"kind": "component",
|
|
440
465
|
"description": "消息悬浮工具栏,组合复制、删除、反馈等工具按钮。",
|
|
441
|
-
"aiSummary": "
|
|
466
|
+
"aiSummary": "消息悬浮工具栏,组合复制、删除、反馈等工具按钮;提供 prepend / append 两端插槽承载消息时间等附加内容。 源码位置:src/components/message-tools/message-tools.vue。",
|
|
442
467
|
"relatedComponents": [
|
|
443
468
|
{
|
|
444
469
|
"slug": "tool-btn",
|
|
@@ -451,6 +476,10 @@
|
|
|
451
476
|
{
|
|
452
477
|
"slug": "delete-tool",
|
|
453
478
|
"relation": "id 为 delete 时替换为带确认的删除按钮"
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"slug": "message-time",
|
|
482
|
+
"relation": "通过 prepend / append 插槽嵌入消息时间"
|
|
454
483
|
}
|
|
455
484
|
],
|
|
456
485
|
"docFile": "docs/message-tools.md",
|
|
@@ -555,6 +584,25 @@
|
|
|
555
584
|
"docFile": "docs/ai-loading.md",
|
|
556
585
|
"domain": "helper"
|
|
557
586
|
},
|
|
587
|
+
{
|
|
588
|
+
"name": "FileIcon 文件类型图标",
|
|
589
|
+
"slug": "file-icon",
|
|
590
|
+
"kind": "component",
|
|
591
|
+
"description": "按文件扩展名渲染对应类型图标,尺寸随外层 font-size 自适应。",
|
|
592
|
+
"aiSummary": "按扩展名渲染文件类型图标:内联 svg,尺寸用 1em 跟随外层 font-size; 扩展名解析走 normalizeFileExtension(优先 fileType,缺省回退 fileName,大小写不敏感, 支持 Dockerfile / .gitignore 这类无扩展名或点号开头的文件);未登记类型返回 unknown 兜底图标。 源码位置:src/components/file-icon/file-icon.vue,图标注册表在 src/icons/file-icons.ts。",
|
|
593
|
+
"relatedComponents": [
|
|
594
|
+
{
|
|
595
|
+
"slug": "file-artifact-panel",
|
|
596
|
+
"relation": "文件产物列表与预览头使用该组件展示类型图标"
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
"slug": "assistant-message",
|
|
600
|
+
"relation": "消息内的文件产物卡片使用该组件"
|
|
601
|
+
}
|
|
602
|
+
],
|
|
603
|
+
"docFile": "docs/file-icon.md",
|
|
604
|
+
"domain": "helper"
|
|
605
|
+
},
|
|
558
606
|
{
|
|
559
607
|
"name": "HighlightKeyword 关键词高亮",
|
|
560
608
|
"slug": "highlight-keyword",
|
|
@@ -1115,7 +1163,7 @@
|
|
|
1115
1163
|
"slug": "file-artifact-panel",
|
|
1116
1164
|
"kind": "component",
|
|
1117
1165
|
"description": "汇总当前会话全部文件产物,支持搜索、选中与分类型预览,挂载在 ChatContainer 侧栏「文件产物」Tab。",
|
|
1118
|
-
"aiSummary": "汇总当前会话所有 AssistantMessage 的 artifacts(按 outputId 去重),支持关键词搜索、列表选中与下载; 预览区委托 ArtifactPreviewHost
|
|
1166
|
+
"aiSummary": "汇总当前会话所有 AssistantMessage 的 artifacts(按 outputId 去重),支持关键词搜索、列表选中与下载; 预览区委托 ArtifactPreviewHost:由 resolveFileKind 把扩展名归入 code / markdown / html / text / image / binary 六类, 前四类走 text_from_download 拉正文(code 交给 highlight.js 高亮),image / binary 走 preview_url; download_url / preview_url 经 onArtifactClick 每次异步获取(无 URL 缓存,并发去重); 预览重载键为 outputId:type;重试再次调用 load() 重新取链。 源码位置:src/components/chat-message/assistant-message/message-artifacts/file-artifact-panel.vue。",
|
|
1119
1167
|
"relatedComponents": [
|
|
1120
1168
|
{
|
|
1121
1169
|
"slug": "assistant-message",
|
|
@@ -1267,6 +1315,10 @@
|
|
|
1267
1315
|
"slug": "message-tools",
|
|
1268
1316
|
"relation": "消息工具栏交互与状态由 MessageTools 体系承载"
|
|
1269
1317
|
},
|
|
1318
|
+
{
|
|
1319
|
+
"slug": "message-time",
|
|
1320
|
+
"relation": "createdAt 经工具栏 prepend 插槽展示"
|
|
1321
|
+
},
|
|
1270
1322
|
{
|
|
1271
1323
|
"slug": "message-container",
|
|
1272
1324
|
"relation": "嵌入列表时由 MessageContainer 管理分组与多选"
|
|
@@ -1711,12 +1763,16 @@
|
|
|
1711
1763
|
"name": "useGlobalConfig",
|
|
1712
1764
|
"slug": "use-global-config",
|
|
1713
1765
|
"kind": "composable",
|
|
1714
|
-
"description": "在聊天根容器与子组件之间通过 provide/inject
|
|
1715
|
-
"aiSummary": "useGlobalConfig 接收 GlobalConfig(含 size?: ComputedRef<AiSizeMode>、supportUpload: ComputedRef<boolean>),以 GLOBAL_CONFIG_TOKEN provide 给后代; injectGlobalConfig 在子组件中取出配置,无 Provider 时返回 undefined。ChatContainer 在 setup 中调用 useGlobalConfig 注入 size 与
|
|
1766
|
+
"description": "在聊天根容器与子组件之间通过 provide/inject 共享全局展示配置(字号主题档位、是否支持上传、消息时间时区等)。",
|
|
1767
|
+
"aiSummary": "useGlobalConfig 接收 GlobalConfig(含 size?: ComputedRef<AiSizeMode>、supportUpload: ComputedRef<boolean>、timezone?: ComputedRef<string | undefined>),以 GLOBAL_CONFIG_TOKEN provide 给后代; injectGlobalConfig 在子组件中取出配置,无 Provider 时返回 undefined。ChatContainer 在 setup 中调用 useGlobalConfig 注入 size、supportUpload 与 timezone; 后代组件可通过 injectGlobalConfig 读取配置;字号主题主要通过根节点 data-ai-size 与 CSS 变量生效。",
|
|
1716
1768
|
"relatedComponents": [
|
|
1717
1769
|
{
|
|
1718
1770
|
"slug": "chat-container",
|
|
1719
1771
|
"relation": "根容器调用 useGlobalConfig 注入 supportUpload"
|
|
1772
|
+
},
|
|
1773
|
+
{
|
|
1774
|
+
"slug": "message-time",
|
|
1775
|
+
"relation": "消息时间组件读取 timezone"
|
|
1720
1776
|
}
|
|
1721
1777
|
],
|
|
1722
1778
|
"docFile": "docs/use-global-config.md"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 文件分类:图标兜底与预览渲染策略的共同依据。
|
|
3
|
+
* - code:可交给 highlight.js 渲染的源码 / 配置文件
|
|
4
|
+
* - text:纯文本,直接按原文展示
|
|
5
|
+
* - binary:无法在前端直接解析,统一交由后端 preview_url 预览
|
|
6
|
+
*/
|
|
7
|
+
export type AIFileKind = 'binary' | 'code' | 'html' | 'image' | 'markdown' | 'text';
|
|
8
|
+
/**
|
|
9
|
+
* 归一化文件类型标识:优先取后台下发的 type,缺省时回退文件名。
|
|
10
|
+
* 统一转小写并截取最后一段扩展名;无扩展名的文件(Dockerfile / Makefile)直接返回文件名本身。
|
|
11
|
+
*/
|
|
12
|
+
export declare const normalizeFileExtension: (type?: string, name?: string) => string;
|
|
13
|
+
/** 解析文件分类;未登记的扩展名按 binary 兜底 */
|
|
14
|
+
export declare const resolveFileKind: (type?: string, name?: string) => AIFileKind;
|
package/dist/utils/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blueking/chat-x",
|
|
3
|
-
"version": "0.0.49-beta.
|
|
3
|
+
"version": "0.0.49-beta.9",
|
|
4
4
|
"description": "蓝鲸智云 AI Chat 组件库 —— 遵循 AG-UI,为 AI Agent 和人类开发者共同设计的对话 UI 组件库。",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"vitepress": "2.0.0-alpha.16",
|
|
80
80
|
"vitest": "^4.0.18",
|
|
81
81
|
"vue-tsc": "^3.1.4",
|
|
82
|
-
"@blueking/chat-helper": "0.0.12-beta.
|
|
82
|
+
"@blueking/chat-helper": "0.0.12-beta.20"
|
|
83
83
|
},
|
|
84
84
|
"scripts": {
|
|
85
85
|
"dev": "vite --config vite.config.ts",
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { AIFileType } from '../../../../ag-ui/types/file';
|
|
2
|
-
/** 文件类型 → 图标映射;未命中类型兜底用文本图标 */
|
|
3
|
-
export declare const FILE_ICON_MAP: {
|
|
4
|
-
readonly html: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
}>;
|
|
7
|
-
readonly jpg: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
}>;
|
|
10
|
-
readonly json: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
}>;
|
|
13
|
-
readonly md: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
}>;
|
|
16
|
-
readonly markdown: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
}>;
|
|
19
|
-
readonly pdf: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
}>;
|
|
22
|
-
readonly txt: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
}>;
|
|
25
|
-
};
|
|
26
|
-
/** 图标为共享 VNode,克隆后再渲染,避免同类型多处复用同一实例 */
|
|
27
|
-
export declare const getFileIcon: (type: AIFileType) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
28
|
-
[key: string]: any;
|
|
29
|
-
}>;
|