@ibiz-template-plugin/ai-chat 0.0.116 → 0.0.118

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 (69) hide show
  1. package/dist/index.es.js +20814 -15578
  2. package/dist/index.legacy.js +2 -2
  3. package/dist/polyfills.legacy.js +1 -1
  4. package/dist/style.css +2 -2
  5. package/dist/types/components/chat-back-bottom/chat-back-bottom.d.ts +5 -3
  6. package/dist/types/components/chat-container/chat-container.d.ts +25 -24
  7. package/dist/types/components/chat-file-preview/components/custom-chat-file-preview/custom-chat-file-preview.d.ts +19 -0
  8. package/dist/types/components/chat-file-preview/components/default-chat-file-preview/default-chat-file-preview.d.ts +19 -0
  9. package/dist/types/components/chat-group-topics/components/selected-mode-topic/selected-mode-topic.d.ts +21 -0
  10. package/dist/types/components/chat-group-topics/components/show-hidden-setting/show-hidden-setting.d.ts +17 -0
  11. package/dist/types/components/chat-group-topics/components/topic-batch-action/topic-batch-action.d.ts +21 -0
  12. package/dist/types/components/chat-messages/chat-messages.d.ts +10 -9
  13. package/dist/types/components/chat-messages/use-message-renderer.d.ts +89 -0
  14. package/dist/types/components/chat-net-disk/file-move-panel/file-move-panel.d.ts +27 -0
  15. package/dist/types/components/common/actions/actions.d.ts +29 -0
  16. package/dist/types/components/common/context-menu/context-menu.d.ts +34 -0
  17. package/dist/types/components/common/drawer/drawer.d.ts +6 -1
  18. package/dist/types/components/common/index.d.ts +9 -0
  19. package/dist/types/components/common/inline-editor/inline-editor.d.ts +13 -0
  20. package/dist/types/components/common/lazy-list-tree/lazy-list-tree.d.ts +31 -3
  21. package/dist/types/components/common/lazy-tree/lazy-tree.d.ts +46 -5
  22. package/dist/types/components/common/modal/modal.d.ts +37 -0
  23. package/dist/types/components/flat-chat-container/flat-chat-container.d.ts +5 -1
  24. package/dist/types/components/popup/popup.d.ts +2 -1
  25. package/dist/types/constants/index.d.ts +4 -0
  26. package/dist/types/controller/ai-chat/ai-chat.controller.d.ts +12 -0
  27. package/dist/types/controller/ai-topic/ai-topic.controller.d.ts +83 -5
  28. package/dist/types/controller/file-system/file-system.controller.d.ts +68 -1
  29. package/dist/types/controller/index.d.ts +1 -0
  30. package/dist/types/controller/overlay/drawer-overlay.controller.d.ts +9 -0
  31. package/dist/types/controller/overlay/index.d.ts +1 -0
  32. package/dist/types/controller/overlay/modal-overlay.controller.d.ts +47 -0
  33. package/dist/types/controller/overlay/overlay.controller.d.ts +7 -1
  34. package/dist/types/controller/tiptap/config/file-node-config.d.ts +3 -0
  35. package/dist/types/controller/tiptap/tiptap.controller.d.ts +50 -0
  36. package/dist/types/entity/chart-topic/chart-topic.d.ts +1 -0
  37. package/dist/types/entity/chat-message/chat-message.d.ts +1 -0
  38. package/dist/types/icons/eye-svg.d.ts +1 -0
  39. package/dist/types/icons/index.d.ts +3 -0
  40. package/dist/types/icons/move-file-svg.d.ts +1 -0
  41. package/dist/types/icons/new-folder-svg.d.ts +2 -0
  42. package/dist/types/icons/system-file/archive.d.ts +8 -0
  43. package/dist/types/icons/system-file/audio.d.ts +6 -0
  44. package/dist/types/icons/system-file/excel.d.ts +4 -0
  45. package/dist/types/icons/system-file/image.d.ts +8 -0
  46. package/dist/types/icons/system-file/index.d.ts +10 -0
  47. package/dist/types/icons/system-file/other.d.ts +2 -0
  48. package/dist/types/icons/system-file/ppt.d.ts +4 -0
  49. package/dist/types/icons/system-file/program.d.ts +18 -0
  50. package/dist/types/icons/system-file/text.d.ts +21 -0
  51. package/dist/types/icons/system-file/video.d.ts +11 -0
  52. package/dist/types/icons/system-file/word.d.ts +8 -0
  53. package/dist/types/interface/i-chat-container/i-chat-container.d.ts +6 -0
  54. package/dist/types/interface/i-chat-message/i-chat-message.d.ts +6 -0
  55. package/dist/types/interface/i-chat-options/i-chat-options.d.ts +6 -0
  56. package/dist/types/interface/i-file-system-options/i-file-system-options.d.ts +156 -3
  57. package/dist/types/interface/i-remote-resource/i-remote-resource.d.ts +6 -0
  58. package/dist/types/interface/i-tiptap/i-tiptap.d.ts +51 -0
  59. package/dist/types/interface/i-topic-options/i-topic-options.d.ts +50 -5
  60. package/dist/types/interface/index.d.ts +2 -1
  61. package/dist/types/locale/en/index.d.ts +18 -1
  62. package/dist/types/locale/zh-CN/index.d.ts +18 -1
  63. package/dist/types/utils/index.d.ts +1 -0
  64. package/dist/types/utils/util/system-file.d.ts +12 -0
  65. package/dist/types/utils/util/util.d.ts +2 -1
  66. package/package.json +2 -2
  67. package/dist/types/components/chat-editor/node/mention-node.d.ts +0 -3
  68. package/dist/types/components/chat-messages/use-virtual-list.d.ts +0 -156
  69. package/dist/types/components/chat-scrollbar/chat-scrollbar.d.ts +0 -102
@@ -6,13 +6,14 @@ interface ActionItem {
6
6
  caption: string;
7
7
  icon?: VNode;
8
8
  }
9
- export declare const Popup: ({ triggerMode, children, actions, content, position, isOpen: isOpenProp, onToggleOpen, onAction, }: {
9
+ export declare const Popup: ({ triggerMode, children, actions, content, position, isOpen: isOpenProp, onToggleOpen, popupClassName, onAction, }: {
10
10
  triggerMode: "click" | "hover";
11
11
  children: import('preact').ComponentChildren;
12
12
  actions?: ActionItem[];
13
13
  content?: import('preact').ComponentChildren;
14
14
  position?: Position;
15
15
  isOpen?: boolean;
16
+ popupClassName?: string;
16
17
  onToggleOpen?: (isOpen: boolean) => void;
17
18
  onAction?: (actionId: string, event: MouseEvent) => void;
18
19
  }) => import("preact").JSX.Element;
@@ -26,6 +26,10 @@ export declare enum AIChatConst {
26
26
  * 操作区面板默认宽度(px)
27
27
  */
28
28
  ACTION_PANEL_DEFAULT_WIDTH = 380,
29
+ /**
30
+ * 话题侧边栏默认宽度(px)
31
+ */
32
+ TOPIC_SIDEBAR_DEFAULT_WIDTH = 200,
29
33
  /**
30
34
  * 数据库名称
31
35
  */
@@ -399,6 +399,18 @@ export declare class AiChatController {
399
399
  * @memberof AiChatController
400
400
  */
401
401
  attachMessageAgentID(data: IChatMessage): void;
402
+ /**
403
+ * @description 新增等待回复消息(与后续流式推送共用同一消息标识,首条内容到达时原地更新该消息)
404
+ * @param {string} messageid 消息标识
405
+ * @memberof AiChatController
406
+ */
407
+ addWaitingMessage(messageid: string): void;
408
+ /**
409
+ * @description 移除等待回复状态:未收到任何内容则删除占位消息(中断、超时、无推送场景);已有内容则仅清除等待标记
410
+ * @param {string} messageid 消息标识
411
+ * @memberof AiChatController
412
+ */
413
+ removeWaitingMessage(messageid: string): void;
402
414
  /**
403
415
  * @description 新增聊天记录
404
416
  * @param {IChatMessage} data
@@ -1,6 +1,6 @@
1
1
  import { Signal } from '@preact/signals';
2
2
  import { ChatTopic } from '../../entity';
3
- import { ITopic, ITopicOptions, IResourceOptions, IChatController, IGroupItem, IScopeItem, ITopicGroupNode } from '../../interface';
3
+ import { ITopic, ITopicOptions, IResourceOptions, IChatController, IGroupItem, IScopeOption, IScopeItem, ITopicGroupNode } from '../../interface';
4
4
  import { AiChatController } from '../ai-chat/ai-chat.controller';
5
5
 
6
6
  /**
@@ -113,16 +113,22 @@ export declare class AiTopicController {
113
113
  disableSelectScope: boolean;
114
114
  /**
115
115
  * @description 业务域列表(WORKSPACE 工作模式使用)
116
- * @type {IScopeItem[]}
116
+ * @type {IScopeOption[]}
117
117
  * @memberof AiTopicController
118
118
  */
119
- scopeList: IScopeItem[];
119
+ scopeList: IScopeOption[];
120
120
  /**
121
121
  * @description 用户自定义分组清单(WORKSPACE 工作模式使用)
122
122
  * @type {Signal<IGroupItem[]>}
123
123
  * @memberof AiTopicController
124
124
  */
125
125
  readonly groups: Signal<IGroupItem[]>;
126
+ /**
127
+ * @description 业务域界面数据清单(WORKSPACE 工作模式,存储于 'aiscopes')
128
+ * @type {Signal<IScopeItem[]>}
129
+ * @memberof AiTopicController
130
+ */
131
+ readonly scopes: Signal<IScopeItem[]>;
126
132
  /**
127
133
  * @description 分组存储服务实例('aigroups',与会话数据 'aitopics' 区分)
128
134
  * @private
@@ -130,6 +136,13 @@ export declare class AiTopicController {
130
136
  * @memberof AiTopicController
131
137
  */
132
138
  private groupConfig;
139
+ /**
140
+ * @description 业务域存储服务实例('aiscopes',与会话数据 'aitopics' 区分)
141
+ * @private
142
+ * @type {(IConfigService | undefined)}
143
+ * @memberof AiTopicController
144
+ */
145
+ private scopeConfig;
133
146
  /**
134
147
  * Creates an instance of AiTopicController.
135
148
  * @author tony001
@@ -156,10 +169,10 @@ export declare class AiTopicController {
156
169
  * @param {string} compWrapperId
157
170
  * @param {('DEFAULT' | 'WORKSPACE')} workMode
158
171
  * @param {boolean} [disableSelectScope]
159
- * @param {IScopeItem[]} [scopeList]
172
+ * @param {IScopeOption[]} [scopeList]
160
173
  * @memberof AiTopicController
161
174
  */
162
- injectBasicResources(compWrapperId: string, workMode: 'DEFAULT' | 'WORKSPACE', disableSelectScope?: boolean, scopeList?: IScopeItem[]): void;
175
+ injectBasicResources(compWrapperId: string, workMode: 'DEFAULT' | 'WORKSPACE', disableSelectScope?: boolean, scopeList?: IScopeOption[]): void;
163
176
  /**
164
177
  * 注入资源选项
165
178
  * @param resourceOptions
@@ -317,6 +330,12 @@ export declare class AiTopicController {
317
330
  * @memberof AiTopicController
318
331
  */
319
332
  updateTopicConfig(options: ITopicOptions): Promise<void>;
333
+ /**
334
+ * @description 获取侧边栏默认宽度
335
+ * @returns {*} {number}
336
+ * @memberof AiTopicController
337
+ */
338
+ getDefaultWidth(): number;
320
339
  /**
321
340
  * 计算话题侧边栏宽度
322
341
  */
@@ -431,6 +450,35 @@ export declare class AiTopicController {
431
450
  * @memberof AiTopicController
432
451
  */
433
452
  private saveGroups;
453
+ /**
454
+ * @description 获取业务域存储服务实例('aiscopes',与会话数据 'aitopics' 区分)
455
+ * @private
456
+ * @param {ITopicOptions} options 话题配置
457
+ * @returns {*} {IConfigService}
458
+ * @memberof AiTopicController
459
+ */
460
+ private getScopeConfig;
461
+ /**
462
+ * @description 加载业务域界面数据
463
+ * @param {ITopicOptions} options 话题配置
464
+ * @returns {*} {Promise<void>}
465
+ * @memberof AiTopicController
466
+ */
467
+ fetchScopes(options: ITopicOptions): Promise<void>;
468
+ /**
469
+ * @description 保存业务域界面数据
470
+ * @returns {*} {Promise<void>}
471
+ * @memberof AiTopicController
472
+ */
473
+ private saveScopes;
474
+ /**
475
+ * @description 获取业务域界面数据,无存储记录时返回默认值(显示、不置顶)
476
+ * @private
477
+ * @param {(string | number)} scopeid 业务域标识
478
+ * @returns {*} {IScopeItem}
479
+ * @memberof AiTopicController
480
+ */
481
+ private getScopeItemConfig;
434
482
  /**
435
483
  * @description 计算分组树(WORKSPACE 工作模式):业务域第一层,自定义分组第二层,其后为话题
436
484
  * @param {string} [query] 快速搜索关键词
@@ -468,6 +516,28 @@ export declare class AiTopicController {
468
516
  * @memberof AiTopicController
469
517
  */
470
518
  toggleGroupCollapse(groupid: string): Promise<void>;
519
+ /**
520
+ * @description 更新业务域界面数据(visible/istop)并持久化,scopeid不传表示无分类节点;
521
+ * 归一化后与默认值一致(visible为true且istop为false)时移除存储记录,默认值数据不落存储
522
+ * @param {(string | number)} [scopeid] 业务域标识
523
+ * @param {Partial<Pick<IScopeItem, 'visible' | 'istop'>>} partial 更新数据
524
+ * @returns {*} {Promise<IScopeItem | undefined>} 成功返回归一化后的数据,持久化失败返回undefined
525
+ * @memberof AiTopicController
526
+ */
527
+ updateScopeItem(scopeid: string | number | undefined, partial: Partial<Pick<IScopeItem, 'visible' | 'istop'>>): Promise<IScopeItem | undefined>;
528
+ /**
529
+ * @description 批量更新业务域界面数据(visible/istop),内部合并处理scopes数据,最终一次持久化;
530
+ * scopeid不传表示无分类节点,未传字段保留原值(缺省visible视为true、istop视为false),
531
+ * 归一化后与默认值一致(visible为true且istop为false)时移除存储记录,默认值数据不落存储
532
+ * @param {Array<{ scopeid: string | number | undefined; visible?: boolean; istop?: boolean }>} updates 更新数据集合
533
+ * @returns {*} {Promise<boolean>} 是否全部更新成功
534
+ * @memberof AiTopicController
535
+ */
536
+ batchUpdateScopeItems(updates: Array<{
537
+ scopeid: string | number | undefined;
538
+ visible?: boolean;
539
+ istop?: boolean;
540
+ }>): Promise<boolean>;
471
541
  /**
472
542
  * @description 删除业务域:真删该域下所有分组和会话数据;不传scopeid表示删除无分类域
473
543
  * @param {(string | number)} [scopeid] 业务域标识
@@ -475,6 +545,14 @@ export declare class AiTopicController {
475
545
  * @memberof AiTopicController
476
546
  */
477
547
  removeScope(scopeid?: string | number): Promise<boolean>;
548
+ /**
549
+ * @description 批量删除业务域:一次性归集所有待删域的会话数据,统一走一次 beforeDelete
550
+ * 确认后真删(含域下分组和会话),域界面数据与分组数据各持久化一次;不传scopeid表示无分类域
551
+ * @param {Array<string | number | undefined>} scopeids 业务域标识集合
552
+ * @returns {*} {Promise<boolean>} 是否删除成功(确认取消或持久化失败返回false)
553
+ * @memberof AiTopicController
554
+ */
555
+ batchRemoveScopes(scopeids: Array<string | number | undefined>): Promise<boolean>;
478
556
  /**
479
557
  * @description 删除用户自定义分组:真删该分组下所有会话数据
480
558
  * @param {string} groupid 分组标识
@@ -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
  }
@@ -6,3 +6,4 @@ export { ModalChatController, chat } from './chat/modal-chat.controller';
6
6
  export { FlatChatController, createFlatChat, } from './chat/flat-chat.controller';
7
7
  export { drawerController } from './overlay';
8
8
  export { FileSystemController } from './file-system/file-system.controller';
9
+ export { tipTapController } from './tiptap/tiptap.controller';
@@ -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 */
@@ -21,6 +23,13 @@ interface DrawerOpenOptions {
21
23
  className?: string;
22
24
  /** 标题 */
23
25
  title?: string;
26
+ /** 事件源 */
27
+ event?: MouseEvent;
28
+ /** 关闭回调 */
29
+ onClose?: (params?: {
30
+ ok: boolean;
31
+ data: any;
32
+ }) => void;
24
33
  }
25
34
  declare class DrawerOverlayController extends OverlayController {
26
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 {};
@@ -28,8 +28,14 @@ export declare class OverlayController {
28
28
  constructor(name?: string);
29
29
  /**
30
30
  * @description 解析容器
31
+ * @protected
32
+ * @param {(HTMLElement | string | null)} [container] 容器:DOM 元素或选择器,不传默认 body
33
+ * @param {(EventTarget | null)} [origin] 事件源,传入后会优先从事件源所在组件根内查找容器
34
+ * @param {string} [rootSelector='.ibiz-ai-chat'] 组件根选择器,从事件源向上定位作用域,默认 '.ibiz-ai-chat'
35
+ * @returns {*} {HTMLElement}
36
+ * @memberof OverlayController
31
37
  */
32
- protected resolveContainer(container?: HTMLElement | string | null): HTMLElement;
38
+ protected resolveContainer(container?: HTMLElement | string | null, origin?: EventTarget | null, rootSelector?: string): HTMLElement;
33
39
  /**
34
40
  * @description 确保容器有定位上下文
35
41
  */
@@ -0,0 +1,3 @@
1
+ import { TipTapNodeConfig } from '../../../interface';
2
+
3
+ export declare const FileNodeConfig: TipTapNodeConfig;
@@ -0,0 +1,50 @@
1
+ import { Editor, Node } from '@tiptap/core';
2
+ import { EditorView } from '@tiptap/pm/view';
3
+ import { TipTapNodeConfig } from '../../interface';
4
+
5
+ /**
6
+ * @description tiptap控制器
7
+ * @export
8
+ * @class TipTapController
9
+ */
10
+ declare class TipTapController {
11
+ /**
12
+ * @description 节点
13
+ * @private
14
+ * @type {{ [key: string]: Node }}
15
+ * @memberof TipTapController
16
+ */
17
+ private nodes;
18
+ /**
19
+ * 获取所有已注册的节点,用于传给 Editor 的 extensions
20
+ */
21
+ getExtensions(): Node[];
22
+ /**
23
+ * Creates an instance of TipTapController.
24
+ * @memberof TipTapController
25
+ */
26
+ constructor();
27
+ /**
28
+ * @description 创建节点
29
+ * - 必须在AI组件初始化之前执行
30
+ * @param {TipTapNodeConfig} config 节点配置
31
+ * @memberof TipTapController
32
+ */
33
+ createNode(config: TipTapNodeConfig): void;
34
+ /**
35
+ * @description 处理放置
36
+ * @param {EditorView} view 视图
37
+ * @param {DragEvent} event 事件源
38
+ * @memberof TipTapController
39
+ */
40
+ handleDrop(editor: Editor, view: EditorView, event: DragEvent): boolean;
41
+ /**
42
+ * @description 获取html字符串
43
+ * @param {Editor} editor
44
+ * @returns {*} {string}
45
+ * @memberof TipTapController
46
+ */
47
+ getHTML(editor: Editor): string;
48
+ }
49
+ export declare const tipTapController: TipTapController;
50
+ export {};
@@ -27,5 +27,6 @@ export declare class ChatTopic implements ITopic {
27
27
  get captionComputed(): boolean;
28
28
  get scope(): ITopic['scope'];
29
29
  get groupid(): ITopic['groupid'];
30
+ get context_code_name(): ITopic['context_code_name'];
30
31
  constructor(data: ITopic);
31
32
  }
@@ -50,6 +50,7 @@ export declare class ChatMessage implements IChatMessage {
50
50
  get agent_tag(): IChatMessage['agent_tag'];
51
51
  get create_time(): IChatMessage['create_time'];
52
52
  set create_time(value: string);
53
+ get iswaiting(): IChatMessage['iswaiting'];
53
54
  constructor(msg: IChatMessage);
54
55
  /**
55
56
  * 更新消息
@@ -0,0 +1 @@
1
+ export declare const EyeSvg: () => import("preact").JSX.Element;
@@ -55,3 +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, NewFileSvg } from './new-folder-svg';
59
+ export { EyeSvg } from './eye-svg';
60
+ export { MoveFileSvg } from './move-file-svg';
@@ -0,0 +1 @@
1
+ export declare const MoveFileSvg: () => import("preact").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const NewFolderSvg: () => import("preact").JSX.Element;
2
+ export declare const NewFileSvg: () => import("preact").JSX.Element;
@@ -0,0 +1,8 @@
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;
@@ -0,0 +1,6 @@
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;
@@ -0,0 +1,4 @@
1
+ export declare const xls: () => import("preact").JSX.Element;
2
+ export declare const xlsx: () => import("preact").JSX.Element;
3
+ export declare const xlsm: () => import("preact").JSX.Element;
4
+ export declare const numbers: () => import("preact").JSX.Element;
@@ -0,0 +1,8 @@
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;
@@ -0,0 +1,10 @@
1
+ export * from './other';
2
+ export * from './text';
3
+ export * from './excel';
4
+ export * from './ppt';
5
+ export * from './video';
6
+ export * from './image';
7
+ export * from './word';
8
+ export * from './audio';
9
+ export * from './program';
10
+ export * from './archive';
@@ -0,0 +1,2 @@
1
+ export declare const folder: () => import("preact").JSX.Element;
2
+ export declare const unknown: () => import("preact").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare const ppt: () => import("preact").JSX.Element;
2
+ export declare const pptx: () => import("preact").JSX.Element;
3
+ export declare const pptm: () => import("preact").JSX.Element;
4
+ export declare const pdf: () => import("preact").JSX.Element;
@@ -0,0 +1,18 @@
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;
@@ -0,0 +1,21 @@
1
+ export declare const txt: () => import("preact").JSX.Element;
2
+ export declare const md: () => import("preact").JSX.Element;
3
+ export declare const log: () => import("preact").JSX.Element;
4
+ export declare const csv: () => import("preact").JSX.Element;
5
+ export declare const tsv: () => import("preact").JSX.Element;
6
+ export declare const xml: () => import("preact").JSX.Element;
7
+ export declare const json: () => import("preact").JSX.Element;
8
+ export declare const yaml: () => import("preact").JSX.Element;
9
+ export declare const yml: () => import("preact").JSX.Element;
10
+ export declare const ini: () => import("preact").JSX.Element;
11
+ export declare const cfg: () => import("preact").JSX.Element;
12
+ export declare const conf: () => import("preact").JSX.Element;
13
+ export declare const html: () => import("preact").JSX.Element;
14
+ export declare const css: () => import("preact").JSX.Element;
15
+ export declare const scss: () => import("preact").JSX.Element;
16
+ export declare const jsx: () => import("preact").JSX.Element;
17
+ export declare const tsx: () => import("preact").JSX.Element;
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;
@@ -0,0 +1,11 @@
1
+ export declare const video: () => import("preact").JSX.Element;
2
+ export declare const mp4: () => import("preact").JSX.Element;
3
+ export declare const m4v: () => import("preact").JSX.Element;
4
+ export declare const mkv: () => import("preact").JSX.Element;
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;
@@ -0,0 +1,8 @@
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
  }
@@ -195,4 +195,10 @@ export interface IChatMessage {
195
195
  * @memberof IChatMessage
196
196
  */
197
197
  create_time?: string;
198
+ /**
199
+ * @description 是否等待回复中(AI首条内容到达前的loading占位标记)
200
+ * @type {boolean}
201
+ * @memberof IChatMessage
202
+ */
203
+ iswaiting?: boolean;
198
204
  }
@@ -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
  */