@blueking/chat-x 0.0.1-beta.5 → 0.0.1-beta.6

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.
Files changed (30) hide show
  1. package/dist/ag-ui/types/constants.d.ts +2 -0
  2. package/dist/ag-ui/types/contents.d.ts +10 -0
  3. package/dist/ag-ui/types/messages.d.ts +4 -4
  4. package/dist/common/constants.d.ts +2 -0
  5. package/dist/components/ai-buttons/file-upload-btn/file-upload-btn.vue.d.ts +26 -0
  6. package/dist/components/chat-content/common-error-content/common-error-content.vue.d.ts +1 -1
  7. package/dist/components/chat-content/file-content/file-content.vue.d.ts +12 -0
  8. package/dist/components/chat-content/markdown-content/markdown-content.vue.d.ts +1 -1
  9. package/dist/components/chat-content/reference-content/reference-content.vue.d.ts +2 -2
  10. package/dist/components/chat-input/ai-slash-input/ai-slash-input.vue.d.ts +3 -0
  11. package/dist/components/chat-input/chat-input.vue.d.ts +40 -7
  12. package/dist/components/chat-message/message-container/message-container.vue.d.ts +85 -50
  13. package/dist/components/chat-message/message-render/message-render.vue.d.ts +2 -1
  14. package/dist/components/chat-message/user-message/user-message.vue.d.ts +6 -1
  15. package/dist/components/message-tools/message-tools.vue.d.ts +3 -2
  16. package/dist/components/message-tools/user-feedback/user-feedback.vue.d.ts +1 -0
  17. package/dist/icons/content.d.ts +6 -0
  18. package/dist/icons/index.d.ts +1 -0
  19. package/dist/icons/input.d.ts +12 -0
  20. package/dist/icons/messages.d.ts +0 -3
  21. package/dist/index.css +1 -1
  22. package/dist/index.js +668 -302
  23. package/dist/index.js.map +1 -1
  24. package/dist/lang/lang.d.ts +4 -1
  25. package/dist/types/input.d.ts +10 -0
  26. package/dist/types/tool.d.ts +2 -2
  27. package/dist/utils/file.d.ts +24 -0
  28. package/dist/utils/index.d.ts +1 -0
  29. package/package.json +2 -2
  30. package/dist/components/chat-content/x-content/x-content.vue.d.ts +0 -17
@@ -66,5 +66,8 @@ export declare const lang: {
66
66
  readonly '\u8282\u70B9\u8F93\u51FA\u5185\u5BB9...': "Node output content...";
67
67
  readonly '\u8C03\u7528 MCP\uFF1A': "Call MCP:";
68
68
  readonly 更多: "More";
69
+ readonly '\u68C0\u7D22\u4E2D...': "Searching...";
70
+ readonly 检索完成: "Search Completed";
71
+ readonly 上传文件: "Upload File";
69
72
  };
70
- 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" | "Duration" | "Parameters" | "Description" | "Execution Status" | "Running" | "Success" | "Failed" | "Pending" | "Details" | "Node Details" | "Node" | "Node Config" | "Node Output" | "Basic Info" | "Flow Template" | "Node Name" | "Step Name" | "Execution Plan" | "Optional" | "Failure Handler" | "Timeout Control" | "Always Use Latest Version" | "Yes" | "No" | "Input Params" | "Output Params" | "Param Name" | "Param Value" | "Name" | "No Data" | "Node output content..." | "Call MCP:" | "More" | "发送" | "停止" | "问问小鲸" | "复制" | "分享" | "点赞" | "不满意" | "删除" | "引用" | "重新生成" | "提交" | "取消" | "预览内容" | "跳转详情" | "调用工具:" | "调用中" | "调用成功" | "调用失败" | "说出您的想法" | "什么原因让你满意?" | "什么原因让你不满意?" | "返回内容" | "编辑" | "深度思考" | "图片加载中..." | "图片加载失败" | "思考中" | "已思考完成" | "思考失败" | "复制成功" | "复制失败" | "返回底部" | "停止生成" | "耗时" | "参数" | "描述" | "执行情况" | "执行中" | "成功" | "失败" | "挂起" | "详情" | "节点详情" | "节点" | "节点配置" | "节点输出" | "基础信息" | "流程模板" | "节点名称" | "步骤名称" | "执行方案" | "是否可选" | "失败处理" | "超时控制" | "总是使用最新版本" | "是" | "否" | "输入参数" | "输出参数" | "参数名" | "参数值" | "名称" | "变量说明" | "暂无数据" | "节点输出内容..." | "调用 MCP:" | "更多";
73
+ 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" | "Duration" | "Parameters" | "Description" | "Execution Status" | "Running" | "Success" | "Failed" | "Pending" | "Details" | "Node Details" | "Node" | "Node Config" | "Node Output" | "Basic Info" | "Flow Template" | "Node Name" | "Step Name" | "Execution Plan" | "Optional" | "Failure Handler" | "Timeout Control" | "Always Use Latest Version" | "Yes" | "No" | "Input Params" | "Output Params" | "Param Name" | "Param Value" | "Name" | "No Data" | "Node output content..." | "Call MCP:" | "More" | "Searching..." | "Search Completed" | "Upload File" | "发送" | "停止" | "问问小鲸" | "复制" | "分享" | "点赞" | "不满意" | "删除" | "引用" | "重新生成" | "提交" | "取消" | "预览内容" | "跳转详情" | "调用工具:" | "调用中" | "调用成功" | "调用失败" | "说出您的想法" | "什么原因让你满意?" | "什么原因让你不满意?" | "返回内容" | "编辑" | "深度思考" | "图片加载中..." | "图片加载失败" | "思考中" | "已思考完成" | "思考失败" | "复制成功" | "复制失败" | "返回底部" | "停止生成" | "耗时" | "参数" | "描述" | "执行情况" | "执行中" | "成功" | "失败" | "挂起" | "详情" | "节点详情" | "节点" | "节点配置" | "节点输出" | "基础信息" | "流程模板" | "节点名称" | "步骤名称" | "执行方案" | "是否可选" | "失败处理" | "超时控制" | "总是使用最新版本" | "是" | "否" | "输入参数" | "输出参数" | "参数名" | "参数值" | "名称" | "变量说明" | "暂无数据" | "节点输出内容..." | "调用 MCP:" | "更多" | "检索中..." | "检索完成" | "上传文件";
@@ -1,10 +1,16 @@
1
1
  import { type tagSchema } from '../components/chat-input/ai-slash-input/constants';
2
+ import type { BinaryInputContent } from '../ag-ui/types/contents';
2
3
  import type { InferDoc } from '../edix';
3
4
  export declare const MessageState: {
4
5
  readonly ACTIVE: "active";
5
6
  readonly DISABLED: "disabled";
6
7
  readonly LOADING: "loading";
7
8
  };
9
+ export declare enum UploadStatus {
10
+ Error = "error",
11
+ Pending = "pending",
12
+ Success = "success"
13
+ }
8
14
  export type MentionState = {
9
15
  coordinates: null | {
10
16
  height: number;
@@ -16,3 +22,7 @@ export type MentionState = {
16
22
  rect: DOMRect | null;
17
23
  };
18
24
  export type TagSchema = InferDoc<typeof tagSchema>;
25
+ export type UploadFile = BinaryInputContent & {
26
+ file?: File;
27
+ status?: UploadStatus;
28
+ };
@@ -1,6 +1,6 @@
1
1
  import { type ToolIconsMap } from '../icons/tools';
2
2
  export interface IToolBtn {
3
- description: string;
3
+ description?: string;
4
4
  id: keyof typeof ToolIconsMap;
5
- name: string;
5
+ name?: string;
6
6
  }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * 判断文件是否为图片文件
3
+ * @param file 文件
4
+ * @returns 是否为图片文件
5
+ */
6
+ export declare const isImageFile: (mimeType?: string) => boolean;
7
+ /**
8
+ * 获取文件预览 URL
9
+ * @param file 文件
10
+ * @returns 文件预览 URL
11
+ */
12
+ export declare const getFilePreviewUrl: (file?: File) => string;
13
+ /**
14
+ * 获取文件扩展名
15
+ * @param file 文件
16
+ * @returns 文件扩展名
17
+ */
18
+ export declare const getFileExtension: (file?: File) => string;
19
+ /**
20
+ * 格式化文件大小 及 单位展示
21
+ * @param file 文件
22
+ * @returns 1024B -> 1KB 1024KB -> 1MB 1024MB -> 1GB
23
+ */
24
+ export declare const formatFileSize: (file?: File) => string;
@@ -1,2 +1,3 @@
1
+ export * from './file';
1
2
  export * from './markdown-completer';
2
3
  export * from './utils';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/chat-x",
3
- "version": "0.0.1-beta.5",
3
+ "version": "0.0.1-beta.6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -68,7 +68,7 @@
68
68
  "punycode.js": "^2.3.1",
69
69
  "sass-embedded": "^1.93.3",
70
70
  "uc.micro": "^2.1.0",
71
- "vite": "npm:rolldown-vite@7.2.5",
71
+ "vite": "npm:rolldown-vite@7.3.1",
72
72
  "vite-bundle-analyzer": "^1.3.2",
73
73
  "vitest": "^3.1.1",
74
74
  "vue-tippy": "^6.7.1",
@@ -1,17 +0,0 @@
1
- export interface XContentProps {
2
- content?: string;
3
- disabled?: boolean;
4
- }
5
- declare var __VLS_1: {};
6
- type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_1) => any;
8
- };
9
- declare const __VLS_base: import("vue").DefineComponent<XContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<XContentProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
- declare const _default: typeof __VLS_export;
12
- export default _default;
13
- type __VLS_WithSlots<T, S> = T & {
14
- new (): {
15
- $slots: S;
16
- };
17
- };