@ibiz-template-plugin/ai-chat 0.0.117 → 0.0.119

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 (49) hide show
  1. package/dist/index.es.js +17565 -14324
  2. package/dist/index.legacy.js +2 -2
  3. package/dist/style.css +2 -2
  4. package/dist/types/components/chat-back-bottom/chat-back-bottom.d.ts +5 -3
  5. package/dist/types/components/chat-file-preview/components/custom-chat-file-preview/custom-chat-file-preview.d.ts +19 -0
  6. package/dist/types/components/chat-file-preview/components/default-chat-file-preview/default-chat-file-preview.d.ts +19 -0
  7. package/dist/types/components/chat-messages/chat-messages.d.ts +10 -9
  8. package/dist/types/components/chat-messages/use-message-renderer.d.ts +89 -0
  9. package/dist/types/components/chat-net-disk/file-move-panel/file-move-panel.d.ts +27 -0
  10. package/dist/types/components/chat-net-disk/file-new-panel/file-new-panel.d.ts +27 -0
  11. package/dist/types/components/chat-search/chat-search.d.ts +4 -0
  12. package/dist/types/components/common/actions/actions.d.ts +29 -0
  13. package/dist/types/components/common/breadcrumb/breadcrumb.d.ts +1 -8
  14. package/dist/types/components/common/context-menu/context-menu.d.ts +34 -0
  15. package/dist/types/components/common/drawer/drawer.d.ts +6 -1
  16. package/dist/types/components/common/index.d.ts +9 -0
  17. package/dist/types/components/common/inline-editor/inline-editor.d.ts +13 -0
  18. package/dist/types/components/common/lazy-list-tree/lazy-list-tree.d.ts +34 -4
  19. package/dist/types/components/common/lazy-tree/lazy-tree.d.ts +77 -5
  20. package/dist/types/components/common/modal/modal.d.ts +37 -0
  21. package/dist/types/components/flat-chat-container/flat-chat-container.d.ts +5 -1
  22. package/dist/types/components/popup/popup.d.ts +2 -1
  23. package/dist/types/controller/file-system/file-system.controller.d.ts +68 -1
  24. package/dist/types/controller/overlay/drawer-overlay.controller.d.ts +7 -0
  25. package/dist/types/controller/overlay/index.d.ts +1 -0
  26. package/dist/types/controller/overlay/modal-overlay.controller.d.ts +47 -0
  27. package/dist/types/icons/index.d.ts +2 -1
  28. package/dist/types/icons/move-file-svg.d.ts +2 -0
  29. package/dist/types/icons/new-folder-svg.d.ts +1 -0
  30. package/dist/types/icons/system-file/archive.d.ts +7 -0
  31. package/dist/types/icons/system-file/audio.d.ts +5 -0
  32. package/dist/types/icons/system-file/excel.d.ts +1 -1
  33. package/dist/types/icons/system-file/image.d.ts +7 -0
  34. package/dist/types/icons/system-file/ppt.d.ts +0 -1
  35. package/dist/types/icons/system-file/program.d.ts +17 -0
  36. package/dist/types/icons/system-file/text.d.ts +4 -0
  37. package/dist/types/icons/system-file/video.d.ts +6 -0
  38. package/dist/types/icons/system-file/word.d.ts +7 -0
  39. package/dist/types/interface/i-chat-container/i-chat-container.d.ts +6 -0
  40. package/dist/types/interface/i-chat-options/i-chat-options.d.ts +6 -0
  41. package/dist/types/interface/i-file-system-options/i-file-system-options.d.ts +156 -3
  42. package/dist/types/interface/i-remote-resource/i-remote-resource.d.ts +20 -0
  43. package/dist/types/locale/en/index.d.ts +16 -1
  44. package/dist/types/locale/zh-CN/index.d.ts +16 -1
  45. package/dist/types/utils/index.d.ts +1 -1
  46. package/dist/types/utils/util/system-file.d.ts +2 -0
  47. package/package.json +2 -2
  48. package/dist/types/components/chat-messages/use-virtual-list.d.ts +0 -156
  49. package/dist/types/components/chat-scrollbar/chat-scrollbar.d.ts +0 -102
@@ -1,4 +1,4 @@
1
- import { IFile, IFileItem, IFileItemParams, IFileUploadPrams, IFileSystemOptions, FileUploaderOptions } from '../../interface';
1
+ import { IFile, IFileItem, IMessageUtil, IFileItemParams, IFileUploadPrams, IFileSystemOptions, FileUploaderOptions } from '../../interface';
2
2
  import { AiChatController } from '../ai-chat/ai-chat.controller';
3
3
 
4
4
  /**
@@ -24,12 +24,40 @@ export declare class FileSystemController {
24
24
  * @memberof FileSystemController
25
25
  */
26
26
  constructor(opts: IFileSystemOptions, uploader: FileUploaderOptions<object>, aiChat: AiChatController);
27
+ /**
28
+ * @description 文件参数
29
+ * @private
30
+ * @type {object}
31
+ * @memberof FileSystemController
32
+ */
33
+ private params;
34
+ /**
35
+ * @description 消息
36
+ * @readonly
37
+ * @type {(IMessageUtil | undefined)}
38
+ * @memberof FileSystemController
39
+ */
40
+ get message(): IMessageUtil | undefined;
41
+ /**
42
+ * @description 文件预览模式
43
+ * @readonly
44
+ * @memberof FileSystemController
45
+ */
46
+ get filePreviewMode(): "DEFAULT" | "CUSTOM" | undefined;
27
47
  /**
28
48
  * @description 绑定函数this指向
29
49
  * @private
30
50
  * @memberof FileSystemController
31
51
  */
32
52
  private bindFunction;
53
+ /**
54
+ * @description 拼接pattern
55
+ * @private
56
+ * @param {string} [str]
57
+ * @returns {*} {(string | undefined)}
58
+ * @memberof FileSystemController
59
+ */
60
+ private splicingPattern;
33
61
  /**
34
62
  * @description 查询系统文件
35
63
  * @param {IFileItemParams} params
@@ -82,4 +110,43 @@ export declare class FileSystemController {
82
110
  * @memberof FileSystemController
83
111
  */
84
112
  downLoadFile(fileid: string, filename: string, cat: string): Promise<void>;
113
+ /**
114
+ * @description 获取自定义文件预览路径
115
+ * @param {string} id
116
+ * @param {string} name
117
+ * @param {string} folder
118
+ * @returns {*}
119
+ * @memberof FileSystemController
120
+ */
121
+ getCustomFilePreviewUrl(file: IFile): Promise<string>;
122
+ /**
123
+ * @description 创建文件夹
124
+ * @param {string} file_path 文件路径
125
+ * @returns {*} {Promise<boolean>}
126
+ * @memberof FileSystemController
127
+ */
128
+ createFolder(file_path: string): Promise<boolean>;
129
+ /**
130
+ * @description 创建文件
131
+ * @param {string} file_path 文件路径
132
+ * @param {string} [content=' '] 文件内容
133
+ * @returns {*} {Promise<boolean>}
134
+ * @memberof FileSystemController
135
+ */
136
+ createFile(file_path: string, content?: string): Promise<boolean>;
137
+ /**
138
+ * @description 移动文件夹/文件
139
+ * @param {string} src 源路径
140
+ * @param {string} dst 目标路径
141
+ * @returns {*} {Promise<boolean>}
142
+ * @memberof FileSystemController
143
+ */
144
+ move(src: string, dst: string): Promise<boolean>;
145
+ /**
146
+ * @description 删除文件夹/文件
147
+ * @param {string} file_path 目标路径
148
+ * @returns {*} {Promise<boolean>}
149
+ * @memberof FileSystemController
150
+ */
151
+ delete(file_path: string): Promise<boolean>;
85
152
  }
@@ -13,6 +13,8 @@ interface DrawerOpenOptions {
13
13
  props?: Record<string, any>;
14
14
  /** 是否显示遮罩,默认 true */
15
15
  mask?: boolean;
16
+ /** 按 Esc 是否关闭,默认 true */
17
+ escClosable?: boolean;
16
18
  /** 是否显示右上角关闭按钮,默认 true */
17
19
  showClose?: boolean;
18
20
  /** 点击遮罩是否关闭,默认 true */
@@ -23,6 +25,11 @@ interface DrawerOpenOptions {
23
25
  title?: string;
24
26
  /** 事件源 */
25
27
  event?: MouseEvent;
28
+ /** 关闭回调 */
29
+ onClose?: (params?: {
30
+ ok: boolean;
31
+ data: any;
32
+ }) => void;
26
33
  }
27
34
  declare class DrawerOverlayController extends OverlayController {
28
35
  constructor();
@@ -1 +1,2 @@
1
1
  export { drawerController } from './drawer-overlay.controller';
2
+ export { modalController } from './modal-overlay.controller';
@@ -0,0 +1,47 @@
1
+ import { VNode } from 'preact';
2
+ import { OverlayController } from './overlay.controller';
3
+
4
+ interface ModalOpenOptions {
5
+ /** 头部图标 */
6
+ icon?: VNode;
7
+ /** 容器(DOM 元素或选择器),不传默认 body */
8
+ container?: HTMLElement | string;
9
+ /** 内容组件 */
10
+ component: any;
11
+ /** 传递给内容组件的参数 */
12
+ props?: Record<string, any>;
13
+ /** 是否显示遮罩,默认 true */
14
+ mask?: boolean;
15
+ /** 是否显示右上角关闭按钮,默认 true */
16
+ showClose?: boolean;
17
+ /** 点击遮罩是否关闭,默认 true */
18
+ maskClosable?: boolean;
19
+ /** 按 Esc 是否关闭,默认 true */
20
+ escClosable?: boolean;
21
+ /** 外部扩展类名 */
22
+ className?: string;
23
+ /** 标题 */
24
+ title?: string;
25
+ /** 宽度 */
26
+ width?: number | string;
27
+ /** 高度 */
28
+ height?: number | string;
29
+ /** 垂直居中,默认 true */
30
+ centered?: boolean;
31
+ /** 关闭回调 */
32
+ onClose?: (params?: {
33
+ ok: boolean;
34
+ data: any;
35
+ }) => void;
36
+ /** 事件源 */
37
+ event?: MouseEvent;
38
+ }
39
+ declare class ModalOverlayController extends OverlayController {
40
+ constructor();
41
+ /**
42
+ * @description 打开模态框
43
+ */
44
+ open(options: ModalOpenOptions): void;
45
+ }
46
+ export declare const modalController: ModalOverlayController;
47
+ export {};
@@ -55,5 +55,6 @@ export { UnTopSvg } from './untop-svg';
55
55
  export { PlusSvg } from './plus-svg';
56
56
  export { ProjectSvg } from './project-svg';
57
57
  export { WorlSpaceSvg } from './workspace-svg';
58
- export { NewFolderSvg } from './new-folder-svg';
58
+ export { NewFolderSvg, NewFileSvg } from './new-folder-svg';
59
59
  export { EyeSvg } from './eye-svg';
60
+ export { MoveFileSvg, UploadFileSvg } from './move-file-svg';
@@ -0,0 +1,2 @@
1
+ export declare const MoveFileSvg: () => import("preact").JSX.Element;
2
+ export declare const UploadFileSvg: () => import("preact").JSX.Element;
@@ -1 +1,2 @@
1
1
  export declare const NewFolderSvg: () => import("preact").JSX.Element;
2
+ export declare const NewFileSvg: () => import("preact").JSX.Element;
@@ -1 +1,8 @@
1
1
  export declare const archive: () => import("preact").JSX.Element;
2
+ export declare const zip: () => import("preact").JSX.Element;
3
+ export declare const rar: () => import("preact").JSX.Element;
4
+ export declare const _7z: () => import("preact").JSX.Element;
5
+ export declare const tar: () => import("preact").JSX.Element;
6
+ export declare const dmg: () => import("preact").JSX.Element;
7
+ export declare const jar: () => import("preact").JSX.Element;
8
+ export declare const apk: () => import("preact").JSX.Element;
@@ -1 +1,6 @@
1
1
  export declare const audio: () => import("preact").JSX.Element;
2
+ export declare const mp3: () => import("preact").JSX.Element;
3
+ export declare const wav: () => import("preact").JSX.Element;
4
+ export declare const flac: () => import("preact").JSX.Element;
5
+ export declare const aac: () => import("preact").JSX.Element;
6
+ export declare const wma: () => import("preact").JSX.Element;
@@ -1,4 +1,4 @@
1
1
  export declare const xls: () => import("preact").JSX.Element;
2
2
  export declare const xlsx: () => import("preact").JSX.Element;
3
3
  export declare const xlsm: () => import("preact").JSX.Element;
4
- export declare const excel: () => import("preact").JSX.Element;
4
+ export declare const numbers: () => import("preact").JSX.Element;
@@ -1 +1,8 @@
1
1
  export declare const image: () => import("preact").JSX.Element;
2
+ export declare const jpeg: () => import("preact").JSX.Element;
3
+ export declare const png: () => import("preact").JSX.Element;
4
+ export declare const gif: () => import("preact").JSX.Element;
5
+ export declare const bmp: () => import("preact").JSX.Element;
6
+ export declare const webp: () => import("preact").JSX.Element;
7
+ export declare const svg: () => import("preact").JSX.Element;
8
+ export declare const ico: () => import("preact").JSX.Element;
@@ -1,5 +1,4 @@
1
1
  export declare const ppt: () => import("preact").JSX.Element;
2
2
  export declare const pptx: () => import("preact").JSX.Element;
3
3
  export declare const pptm: () => import("preact").JSX.Element;
4
- export declare const _ppt: () => import("preact").JSX.Element;
5
4
  export declare const pdf: () => import("preact").JSX.Element;
@@ -1 +1,18 @@
1
1
  export declare const program: () => import("preact").JSX.Element;
2
+ export declare const exe: () => import("preact").JSX.Element;
3
+ export declare const msi: () => import("preact").JSX.Element;
4
+ export declare const cmd: () => import("preact").JSX.Element;
5
+ export declare const sh: () => import("preact").JSX.Element;
6
+ export declare const fish: () => import("preact").JSX.Element;
7
+ export declare const js: () => import("preact").JSX.Element;
8
+ export declare const ts: () => import("preact").JSX.Element;
9
+ export declare const app: () => import("preact").JSX.Element;
10
+ export declare const dylib: () => import("preact").JSX.Element;
11
+ export declare const _class: () => import("preact").JSX.Element;
12
+ export declare const py: () => import("preact").JSX.Element;
13
+ export declare const php: () => import("preact").JSX.Element;
14
+ export declare const go: () => import("preact").JSX.Element;
15
+ export declare const swift: () => import("preact").JSX.Element;
16
+ export declare const java: () => import("preact").JSX.Element;
17
+ export declare const sql: () => import("preact").JSX.Element;
18
+ export declare const groovy: () => import("preact").JSX.Element;
@@ -12,6 +12,10 @@ export declare const cfg: () => import("preact").JSX.Element;
12
12
  export declare const conf: () => import("preact").JSX.Element;
13
13
  export declare const html: () => import("preact").JSX.Element;
14
14
  export declare const css: () => import("preact").JSX.Element;
15
+ export declare const scss: () => import("preact").JSX.Element;
15
16
  export declare const jsx: () => import("preact").JSX.Element;
16
17
  export declare const tsx: () => import("preact").JSX.Element;
17
18
  export declare const vue: () => import("preact").JSX.Element;
19
+ export declare const text: () => import("preact").JSX.Element;
20
+ export declare const ftl: () => import("preact").JSX.Element;
21
+ export declare const hbs: () => import("preact").JSX.Element;
@@ -3,3 +3,9 @@ export declare const mp4: () => import("preact").JSX.Element;
3
3
  export declare const m4v: () => import("preact").JSX.Element;
4
4
  export declare const mkv: () => import("preact").JSX.Element;
5
5
  export declare const avi: () => import("preact").JSX.Element;
6
+ export declare const mov: () => import("preact").JSX.Element;
7
+ export declare const wmv: () => import("preact").JSX.Element;
8
+ export declare const flv: () => import("preact").JSX.Element;
9
+ export declare const f4v: () => import("preact").JSX.Element;
10
+ export declare const mpg: () => import("preact").JSX.Element;
11
+ export declare const mpeg: () => import("preact").JSX.Element;
@@ -1 +1,8 @@
1
1
  export declare const word: () => import("preact").JSX.Element;
2
+ export declare const doc: () => import("preact").JSX.Element;
3
+ export declare const docx: () => import("preact").JSX.Element;
4
+ export declare const docm: () => import("preact").JSX.Element;
5
+ export declare const dot: () => import("preact").JSX.Element;
6
+ export declare const odt: () => import("preact").JSX.Element;
7
+ export declare const rtf: () => import("preact").JSX.Element;
8
+ export declare const wps: () => import("preact").JSX.Element;
@@ -149,4 +149,10 @@ export interface IChatContainerOptions {
149
149
  * @memberof IChatContainerOptions
150
150
  */
151
151
  minimizeOptions: IMinimizeOptions;
152
+ /**
153
+ * @description 是否隐藏嵌入AI聊天框头部区域,仅嵌入AI聊天框生效
154
+ * @type {boolean}
155
+ * @memberof IChatContainerOptions
156
+ */
157
+ isEmbedAiHeaderHidden?: boolean;
152
158
  }
@@ -304,6 +304,12 @@ export interface IChatOptions extends IChat {
304
304
  * @type {number}
305
305
  */
306
306
  chatMessagePageSize: number;
307
+ /**
308
+ * @description AI聊天框是否启用工作空间(文件系统)相关操作,默认值为true,若为false,则无工作空间图标
309
+ * @type {boolean}
310
+ * @memberof IChatOptions
311
+ */
312
+ enableWorkSpace: boolean;
307
313
  /**
308
314
  * 消息提示工具类工具
309
315
  */
@@ -1,6 +1,10 @@
1
1
  import { IFileItem } from '../i-file-item/i-file-item';
2
2
 
3
- interface IFileSystemParams {
3
+ /**
4
+ * @description 查询文件列表参数
5
+ * @interface IFileSystemListParams
6
+ */
7
+ interface IFileSystemListParams {
4
8
  sessionid: string;
5
9
  srfaiagent?: string;
6
10
  srfscope?: string;
@@ -9,28 +13,132 @@ interface IFileSystemParams {
9
13
  file_path?: string;
10
14
  only_dirs?: boolean;
11
15
  }
16
+ /**
17
+ * @description 上传文件参数
18
+ * @interface IFileSystemUploadParams
19
+ */
12
20
  interface IFileSystemUploadParams {
13
21
  sessionid: string;
14
22
  file_path: string;
15
23
  srfaiagent?: string;
16
24
  srfscope?: string;
17
25
  }
26
+ /**
27
+ * @description 新建目录参数
28
+ * @interface IFileSystemCreateParams
29
+ */
30
+ interface IFileSystemCreateParams {
31
+ sessionid: string;
32
+ file_path: string;
33
+ srfaiagent?: string;
34
+ srfscope?: string;
35
+ create_parents?: boolean;
36
+ timeout?: number;
37
+ }
38
+ /**
39
+ * @description 新建文件参数
40
+ * @interface IFileSystemWriteParams
41
+ */
42
+ interface IFileSystemWriteParams {
43
+ sessionid: string;
44
+ file_path: string;
45
+ content: string;
46
+ srfaiagent?: string;
47
+ srfscope?: string;
48
+ append?: boolean;
49
+ timeout?: number;
50
+ }
51
+ /**
52
+ * @description 移动文件参数
53
+ * @interface IFileSystemMoveParams
54
+ */
55
+ interface IFileSystemMoveParams {
56
+ sessionid: string;
57
+ src: string;
58
+ dst: string;
59
+ srfaiagent?: string;
60
+ srfscope?: string;
61
+ overwrite?: boolean;
62
+ create_parents?: boolean;
63
+ timeout?: number;
64
+ }
65
+ /**
66
+ * @description 删除文件参数
67
+ * @interface IFileSystemDeleteParams
68
+ */
69
+ interface IFileSystemDeleteParams {
70
+ sessionid: string;
71
+ file_path: string;
72
+ srfaiagent?: string;
73
+ srfscope?: string;
74
+ recursive?: boolean;
75
+ timeout?: number;
76
+ }
77
+ /**
78
+ * @description 读取文件参数
79
+ * @interface IFileSystemReadParams
80
+ */
81
+ interface IFileSystemReadParams {
82
+ sessionid: string;
83
+ file_path: string;
84
+ srfaiagent?: string;
85
+ srfscope?: string;
86
+ offset?: number;
87
+ length?: number;
88
+ binary?: boolean;
89
+ timeout?: number;
90
+ }
91
+ /**
92
+ * @description 文件操作结果对象
93
+ * @interface IFileSystemResult
94
+ */
95
+ interface IFileSystemResult {
96
+ ok: boolean;
97
+ action: 'MKDIR' | 'WRITE' | 'MOVE' | 'DELETE' | 'READ';
98
+ path: string;
99
+ transport: 'native' | 'command';
100
+ content?: string;
101
+ content_length?: number;
102
+ error?: {
103
+ code: string;
104
+ message: string;
105
+ };
106
+ }
18
107
  /**
19
108
  * @description 文件系统操作参数
20
109
  * @export
21
110
  * @interface IFileSystemOptions
22
111
  */
23
112
  export interface IFileSystemOptions {
113
+ /**
114
+ * @description 文件预览模式,默认值为DEFAULT
115
+ * @type {('DEFAULT' | 'CUSTOM')}
116
+ * @memberof IFileSystemOptions
117
+ */
118
+ filePreviewMode?: 'DEFAULT' | 'CUSTOM';
119
+ /**
120
+ * @description 获取自定义文件预览url
121
+ * @param {object} ctx
122
+ * @param {object} param
123
+ * @param {{ id: string; name: string; folder: string }} file
124
+ * @returns {*} {Promise<string>}
125
+ * @memberof IFileSystemOptions
126
+ */
127
+ getCustomFilePreviewUrl?(ctx: object, param: object, file: {
128
+ id: string;
129
+ name: string;
130
+ folder: string;
131
+ }): Promise<string>;
24
132
  /**
25
133
  * @description 获取文件清单
26
134
  * @memberof IFileSystemOptions
27
135
  */
28
- getFileList: (context: object, params: object, other: IFileSystemParams) => Promise<IFileItem | undefined>;
136
+ getFileList: (ctx: object, param: object, other: IFileSystemListParams) => Promise<IFileItem | undefined>;
29
137
  /**
30
138
  * @description 上传文件
31
139
  * @memberof IFileSystemOptions
32
140
  */
33
- uploadFile: (context: object, params: object, other: IFileSystemUploadParams) => Promise<{
141
+ uploadFile: (ctx: object, param: object, other: IFileSystemUploadParams) => Promise<{
34
142
  id: string;
35
143
  name: string;
36
144
  folder: string;
@@ -57,5 +165,50 @@ export interface IFileSystemOptions {
57
165
  * @memberof IFileSystemOptions
58
166
  */
59
167
  getImgContent(ctx: object, param: object, id: string, type: string, cat: string): Promise<string>;
168
+ /**
169
+ * @description 新建文件夹
170
+ * @param {object} ctx
171
+ * @param {object} param
172
+ * @param {IFileSystemCreateParams} other
173
+ * @returns {*} {Promise<IFileSystemResult>}
174
+ * @memberof IFileSystemOptions
175
+ */
176
+ createFolder(ctx: object, param: object, other: IFileSystemCreateParams): Promise<IFileSystemResult>;
177
+ /**
178
+ * @description 新建文件
179
+ * @param {object} ctx
180
+ * @param {object} param
181
+ * @param {IFileSystemWriteParams} other
182
+ * @returns {*} {Promise<IFileSystemResult>}
183
+ * @memberof IFileSystemOptions
184
+ */
185
+ createFile(ctx: object, param: object, other: IFileSystemWriteParams): Promise<IFileSystemResult>;
186
+ /**
187
+ * @description 移动文件夹/文件,包含文件夹/文件重命名均调用此接口
188
+ * @param {object} ctx
189
+ * @param {object} param
190
+ * @param {IFileSystemMoveParams} other
191
+ * @returns {*} {Promise<IFileSystemResult>}
192
+ * @memberof IFileSystemOptions
193
+ */
194
+ move(ctx: object, param: object, other: IFileSystemMoveParams): Promise<IFileSystemResult>;
195
+ /**
196
+ * @description 删除文件夹/文件
197
+ * @param {object} ctx
198
+ * @param {object} param
199
+ * @param {IFileSystemDeleteParams} other
200
+ * @returns {*} {Promise<IFileSystemResult>}
201
+ * @memberof IFileSystemOptions
202
+ */
203
+ delete(ctx: object, param: object, other: IFileSystemDeleteParams): Promise<IFileSystemResult>;
204
+ /**
205
+ * @description 读文件内容
206
+ * @param {object} ctx
207
+ * @param {object} param
208
+ * @param {IFileSystemReadParams} other
209
+ * @returns {*} {Promise<IFileSystemResult>}
210
+ * @memberof IFileSystemOptions
211
+ */
212
+ readFile(ctx: object, param: object, other: IFileSystemReadParams): Promise<IFileSystemResult>;
60
213
  }
61
214
  export {};
@@ -93,4 +93,24 @@ export interface IRemoteMessage {
93
93
  * 创建时间
94
94
  */
95
95
  create_time: string | undefined;
96
+ /**
97
+ * 智能体消息类型,默认 | 工具调用 | 用户消息补充(老数据可能没值)
98
+ */
99
+ type: 'default' | 'toolcall_step' | 'supplement_step' | undefined;
100
+ /**
101
+ * 输入token数
102
+ */
103
+ input_tokens: number | undefined;
104
+ /**
105
+ * 输出token数
106
+ */
107
+ output_tokens: number | undefined;
108
+ /**
109
+ * 总token数
110
+ */
111
+ total_tokens: number | undefined;
112
+ /**
113
+ * 工具调用数
114
+ */
115
+ tool_calls: number | undefined;
96
116
  }
@@ -159,10 +159,25 @@ export declare const EN: {
159
159
  projectPlaceholder: string;
160
160
  workSpace: string;
161
161
  listMode: string;
162
- treeMode: string;
162
+ cardMode: string;
163
163
  notYetSupported: string;
164
164
  fileName: string;
165
165
  size: string;
166
166
  type: string;
167
167
  folder: string;
168
+ file: string;
169
+ move: string;
170
+ new: string;
171
+ newFile: string;
172
+ newFolder: string;
173
+ folderName: string;
174
+ cannotEmpty: string;
175
+ moveToNone: string;
176
+ moveToSelf: string;
177
+ moveToDescendant: string;
178
+ moveToSameParent: string;
179
+ alreadyExists: string;
180
+ uploadFile: string;
181
+ fileContent: string;
182
+ clear: string;
168
183
  };
@@ -159,10 +159,25 @@ export declare const ZH_CN: {
159
159
  projectPlaceholder: string;
160
160
  workSpace: string;
161
161
  listMode: string;
162
- treeMode: string;
162
+ cardMode: string;
163
163
  notYetSupported: string;
164
164
  fileName: string;
165
165
  size: string;
166
166
  type: string;
167
167
  folder: string;
168
+ file: string;
169
+ move: string;
170
+ new: string;
171
+ newFile: string;
172
+ newFolder: string;
173
+ folderName: string;
174
+ cannotEmpty: string;
175
+ moveToNone: string;
176
+ moveToSelf: string;
177
+ moveToDescendant: string;
178
+ moveToSameParent: string;
179
+ alreadyExists: string;
180
+ uploadFile: string;
181
+ fileContent: string;
182
+ clear: string;
168
183
  };
@@ -12,4 +12,4 @@ export { ChatStepParser } from './util/chat-step-parser';
12
12
  export { ChatUIActionParser } from './util/chat-ui-action-parser';
13
13
  export { ContentProtector } from './util/content-protector';
14
14
  export { TextUtil } from './util/util';
15
- export { FileIcon } from './util/system-file';
15
+ export { FileIcon, FolderIcon } from './util/system-file';
@@ -1,5 +1,7 @@
1
1
  import { FunctionComponent } from 'preact';
2
+ import { folder } from '../../icons/system-file';
2
3
 
4
+ export { folder as FolderIcon };
3
5
  /**
4
6
  * 通用渲染组件:直接传入文件名渲染对应图标
5
7
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template-plugin/ai-chat",
3
- "version": "0.0.117",
3
+ "version": "0.0.119",
4
4
  "description": "iBiz AI交互框插件",
5
5
  "type": "module",
6
6
  "main": "dist/index.es.js",
@@ -29,7 +29,7 @@
29
29
  "publish:local": "npm run build && npm publish --access public --registry=http://172.16.240.221:8081/repository/local/"
30
30
  },
31
31
  "dependencies": {
32
- "@ibiz-template-plugin/ibiz-file-previewer": "^0.0.26",
32
+ "@ibiz-template-plugin/ibiz-file-previewer": "^0.0.27",
33
33
  "@ibiz-template/scss-utils": "^0.0.2",
34
34
  "@preact/signals": "^1.2.1",
35
35
  "@tiptap/core": "^3.11.1",