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

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 (28) hide show
  1. package/dist/index.es.js +12402 -11580
  2. package/dist/index.legacy.js +2 -2
  3. package/dist/style.css +2 -2
  4. package/dist/types/components/chat-container/chat-container.d.ts +25 -8
  5. package/dist/types/components/chat-net-disk/file-new-panel/file-new-panel.d.ts +7 -0
  6. package/dist/types/components/chat-topic-item/chat-topic-item.d.ts +0 -8
  7. package/dist/types/components/chat-topics/components/batch-mode-topic/batch-mode-topic.d.ts +21 -0
  8. package/dist/types/components/common/breadcrumb/breadcrumb.d.ts +1 -1
  9. package/dist/types/components/common/index.d.ts +1 -1
  10. package/dist/types/components/common/{lazy-list-tree/lazy-list-tree.d.ts → lazy-level-list/lazy-level-list.d.ts} +7 -7
  11. package/dist/types/components/common/lazy-tree/lazy-tree.d.ts +4 -0
  12. package/dist/types/components/flat-chat-container/flat-chat-container.d.ts +54 -0
  13. package/dist/types/components/popup/popup.d.ts +2 -1
  14. package/dist/types/constants/index.d.ts +27 -2
  15. package/dist/types/controller/ai-action-panel/ai-action-panel.controller.d.ts +0 -8
  16. package/dist/types/controller/ai-topic/ai-topic.controller.d.ts +75 -7
  17. package/dist/types/controller/file-system/file-system.controller.d.ts +26 -3
  18. package/dist/types/entity/chart-topic/chart-topic.d.ts +1 -0
  19. package/dist/types/icons/back-svg.d.ts +1 -0
  20. package/dist/types/icons/index.d.ts +1 -0
  21. package/dist/types/interface/i-chat-options/i-chat-options.d.ts +6 -0
  22. package/dist/types/interface/i-file-system-options/i-file-system-options.d.ts +18 -0
  23. package/dist/types/interface/i-topic-options/i-topic-options.d.ts +77 -13
  24. package/dist/types/interface/index.d.ts +1 -1
  25. package/dist/types/locale/en/index.d.ts +2 -0
  26. package/dist/types/locale/zh-CN/index.d.ts +2 -0
  27. package/docs/msglist-memory-optimization.md +90 -0
  28. package/package.json +2 -2
@@ -166,6 +166,10 @@ export declare class ChatContainer extends Component<ChatContainerProps, ChatCon
166
166
  * @memberof ChatContainer
167
167
  */
168
168
  private interactable;
169
+ /**
170
+ * resize 节流句柄
171
+ */
172
+ private resizeRafId;
169
173
  /**
170
174
  * 消息完成事件回调
171
175
  */
@@ -174,6 +178,19 @@ export declare class ChatContainer extends Component<ChatContainerProps, ChatCon
174
178
  * 最小化状态变化事件回调
175
179
  */
176
180
  private onMinimizeChangeHandler;
181
+ /**
182
+ * 浏览器窗口尺寸变化处理
183
+ * - 触发节流后统一重算:容器最小宽高、左侧栏宽度、右侧面板宽度
184
+ */
185
+ private handleWindowResize;
186
+ /**
187
+ * 浏览器窗口尺寸变化后的重算逻辑
188
+ * 1. 校正窗口自身尺寸,不低于最小宽高,且不超出可视区域
189
+ * 2. 收敛左侧栏宽度到 [左最小宽, 容器宽 - 中最小宽 - 右占用]
190
+ * 3. 收敛右侧面板宽度到 [右最小宽, 容器宽 - 中最小宽 - 左占用]
191
+ * 4. 同步输入区高度,保证消息区最小高
192
+ */
193
+ private recalcOnResize;
177
194
  listener(): void;
178
195
  componentDidUpdate(): void;
179
196
  /**
@@ -382,6 +399,7 @@ export declare class ChatContainer extends Component<ChatContainerProps, ChatCon
382
399
  getRightWidth(): string;
383
400
  /**
384
401
  * @description 获取宽度
402
+ * @private
385
403
  * @returns {*} {{
386
404
  * centreMinWidth: number;
387
405
  * leftWidth: number;
@@ -391,13 +409,7 @@ export declare class ChatContainer extends Component<ChatContainerProps, ChatCon
391
409
  * }}
392
410
  * @memberof ChatContainer
393
411
  */
394
- getWidth(): {
395
- centreMinWidth: number;
396
- leftWidth: number;
397
- rightWidth: number;
398
- leftMinWidth: number;
399
- rightMinWidth: number;
400
- };
412
+ private getWidth;
401
413
  /**
402
414
  * 侧栏宽度拖动开始
403
415
  */
@@ -411,7 +423,7 @@ export declare class ChatContainer extends Component<ChatContainerProps, ChatCon
411
423
  */
412
424
  handleSidebarResizeEnd: () => void;
413
425
  /**
414
- * 将侧栏宽度校正到合理区间 [200, 容器宽度/3, 容器宽度-右侧最小宽]
426
+ * 将侧栏宽度校正到合理区间 [最小宽, 容器宽度-右侧最小宽]
415
427
  */
416
428
  clampSidebarWidth(width: number): number;
417
429
  /**
@@ -460,6 +472,11 @@ export declare class ChatContainer extends Component<ChatContainerProps, ChatCon
460
472
  * 提交拖动边框后的输入区高度(持久化到状态与本地缓存)
461
473
  */
462
474
  commitInputHeight: () => void;
475
+ /**
476
+ * 将面板宽度矫正到合理区间 [最小宽, 容器宽度-左侧最小宽]
477
+ * @param width
478
+ */
479
+ clampPanelWidth(width: number): void;
463
480
  /**
464
481
  * 操作区面板宽度拖动开始
465
482
  */
@@ -22,6 +22,13 @@ interface FileNewPanelProps {
22
22
  ok: boolean;
23
23
  data: LazyTreeNode;
24
24
  }) => void;
25
+ /**
26
+ * @description 后缀名
27
+ * @default '.txt'
28
+ * @type {string}
29
+ * @memberof FileNewPanelProps
30
+ */
31
+ suffixName?: string;
25
32
  }
26
33
  export declare const FileNewPanel: (props: FileNewPanelProps) => import("preact").JSX.Element;
27
34
  export {};
@@ -5,14 +5,6 @@ export interface ChatTopicItemProps {
5
5
  hasMoreThanOne: boolean;
6
6
  controller: AiTopicController;
7
7
  topic: ChatTopic;
8
- /**
9
- * 是否处于多选模式
10
- */
11
- isSelectMode?: boolean;
12
- /**
13
- * 多选模式下是否被选中
14
- */
15
- isSelected?: boolean;
16
8
  onClick: () => void;
17
9
  onAction: (action: string, event: MouseEvent) => void;
18
10
  }
@@ -0,0 +1,21 @@
1
+ import { AiTopicController } from '../../../../controller';
2
+
3
+ export interface BatchModeTopicProps {
4
+ /**
5
+ * 话题控制器
6
+ *
7
+ * @author tony001
8
+ * @date 2025-02-20 17:02:49
9
+ * @type {AiTopicController}
10
+ */
11
+ controller: AiTopicController;
12
+ /**
13
+ * 进入多选模式时默认选中的话题id
14
+ */
15
+ defaultSelectedTopicId?: string;
16
+ /**
17
+ * 抽屉关闭回调(由 Drawer 自动注入)
18
+ */
19
+ onClose?: () => void;
20
+ }
21
+ export declare const BatchModeTopic: (props: BatchModeTopicProps) => import("preact").JSX.Element;
@@ -8,7 +8,7 @@ interface BreadcrumbProps {
8
8
  label: string;
9
9
  }[];
10
10
  /**
11
- * 点击某一层跳转,-1 表示回到根
11
+ * 点击某一层跳转
12
12
  */
13
13
  onJump: (index: number) => void;
14
14
  }
@@ -5,7 +5,7 @@ export { Slider } from './slider/slider';
5
5
  export { Switch } from './switch/switch';
6
6
  export { Actions, type IAction } from './actions/actions';
7
7
  export { Breadcrumb } from './breadcrumb/breadcrumb';
8
- export { LazyListTree, type LazyListTreeRef, type LazyListTreeMode, } from './lazy-list-tree/lazy-list-tree';
8
+ export { LazyLevelList, type LazyLevelListRef, type LazyLevelListMode, } from './lazy-level-list/lazy-level-list';
9
9
  export { ContextMenu, type IContextMenuAction, } from './context-menu/context-menu';
10
10
  export { Drawer } from './drawer/drawer';
11
11
  export { LazyTree, type LazyTreeRef, type LazyTreeNode, type INodeEditInfo, } from './lazy-tree/lazy-tree';
@@ -1,8 +1,8 @@
1
1
  import { INodeEditInfo, LazyTreeNode } from '../lazy-tree/lazy-tree';
2
2
  import { IAction } from '../actions/actions';
3
3
 
4
- export type LazyListTreeMode = 'list' | 'card';
5
- interface LazyListTreeProps {
4
+ export type LazyLevelListMode = 'list' | 'card';
5
+ interface LazyLevelListProps {
6
6
  /**
7
7
  * 根节点数据
8
8
  */
@@ -83,17 +83,17 @@ interface LazyListTreeProps {
83
83
  * 展示模式
84
84
  * @default 'list'
85
85
  */
86
- mode?: LazyListTreeMode;
86
+ mode?: LazyLevelListMode;
87
87
  }
88
- export interface LazyListTreeRef {
88
+ export interface LazyLevelListRef {
89
89
  /**
90
90
  * 重载
91
91
  * @param
92
92
  * @returns
93
93
  */
94
- overloadNode: () => Promise<void>;
94
+ overloadNode: (node: LazyTreeNode) => Promise<void>;
95
95
  }
96
- export declare const LazyListTree: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<LazyListTreeProps> & {
97
- ref?: import('preact').Ref<LazyListTreeRef> | undefined;
96
+ export declare const LazyLevelList: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<LazyLevelListProps> & {
97
+ ref?: import('preact').Ref<LazyLevelListRef> | undefined;
98
98
  }>;
99
99
  export {};
@@ -54,6 +54,10 @@ export interface LazyTreeNode {
54
54
  * 根节点
55
55
  */
56
56
  isRoot?: boolean;
57
+ /**
58
+ * 是否显示
59
+ */
60
+ visible?: boolean;
57
61
  }
58
62
  export interface INodeEditInfo {
59
63
  /**
@@ -112,10 +112,42 @@ export declare class FlatChatContainer extends Component<FlatChatContainerProps>
112
112
  * 操作区面板宽度拖动起始值(px)
113
113
  */
114
114
  private panelDragStartWidth;
115
+ /**
116
+ * resize 节流句柄
117
+ */
118
+ private resizeRafId;
115
119
  state: {
116
120
  mountedSlots: Record<string, boolean>;
117
121
  inputHeight: number | null;
118
122
  };
123
+ /**
124
+ * @description 获取宽度
125
+ * @private
126
+ * @returns {*} {{
127
+ * centreMinWidth: number;
128
+ * leftWidth: number;
129
+ * rightWidth: number;
130
+ * leftMinWidth: number;
131
+ * rightMinWidth: number;
132
+ * }}
133
+ * @memberof FlatChatContainer
134
+ */
135
+ private getWidth;
136
+ /**
137
+ * 浏览器窗口尺寸变化处理
138
+ * - 触发节流后统一重算:容器最小宽高、左侧栏宽度、右侧面板宽度
139
+ */
140
+ private handleWindowResize;
141
+ /**
142
+ * @description 浏览器窗口尺寸变化后的重算逻辑
143
+ * 1. 收敛左侧栏宽度到 [左最小宽, 容器宽 - 中最小宽 - 右占用]
144
+ * 2. 收敛右侧面板宽度到 [右最小宽, 容器宽 - 中最小宽 - 左占用]
145
+ * 3. 同步输入区高度,保证消息区最小高
146
+ * @private
147
+ * @returns {*} {void}
148
+ * @memberof FlatChatContainer
149
+ */
150
+ private recalcOnResize;
119
151
  /**
120
152
  * @description 添加扩展插槽
121
153
  * @private
@@ -131,11 +163,24 @@ export declare class FlatChatContainer extends Component<FlatChatContainerProps>
131
163
  * @memberof FlatChatContainer
132
164
  */
133
165
  componentDidMount(): void;
166
+ /**
167
+ * @description 销毁
168
+ * @memberof FlatChatContainer
169
+ */
170
+ componentWillUnmount(): void;
134
171
  /**
135
172
  * @description 更新
136
173
  * @memberof FlatChatContainer
137
174
  */
138
175
  componentDidUpdate(prevProps: FlatChatContainerProps): void;
176
+ /**
177
+ * 拖动容器边框时实时校正输入区高度,保证消息区不小于最小高度
178
+ */
179
+ syncInputHeight: () => void;
180
+ /**
181
+ * 提交拖动边框后的输入区高度(持久化到状态与本地缓存)
182
+ */
183
+ commitInputHeight: () => void;
139
184
  /**
140
185
  * @description 同步操作区面板状态(展开收起动画由 CSS 过渡完成)
141
186
  * @memberof FlatChatContainer
@@ -166,6 +211,10 @@ export declare class FlatChatContainer extends Component<FlatChatContainerProps>
166
211
  * 右侧聊天区宽度
167
212
  */
168
213
  getRightWidth(): string;
214
+ /**
215
+ * 将侧栏宽度校正到合理区间 [最小宽, 容器宽度-右侧最小宽]
216
+ */
217
+ clampSidebarWidth(width: number): number;
169
218
  /**
170
219
  * 侧栏宽度拖动开始
171
220
  */
@@ -178,6 +227,11 @@ export declare class FlatChatContainer extends Component<FlatChatContainerProps>
178
227
  * 侧栏宽度拖动结束
179
228
  */
180
229
  handleSidebarResizeEnd: () => void;
230
+ /**
231
+ * 将面板宽度矫正到合理区间 [最小宽, 容器宽度-左侧最小宽]
232
+ * @param width
233
+ */
234
+ clampPanelWidth(width: number): void;
181
235
  /**
182
236
  * 操作区面板宽度拖动开始
183
237
  */
@@ -6,7 +6,7 @@ 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, popupClassName, onAction, }: {
9
+ export declare const Popup: ({ triggerMode, children, actions, content, disabled, position, isOpen: isOpenProp, onToggleOpen, popupClassName, onAction, }: {
10
10
  triggerMode: "click" | "hover";
11
11
  children: import('preact').ComponentChildren;
12
12
  actions?: ActionItem[];
@@ -14,6 +14,7 @@ export declare const Popup: ({ triggerMode, children, actions, content, position
14
14
  position?: Position;
15
15
  isOpen?: boolean;
16
16
  popupClassName?: string;
17
+ disabled?: boolean;
17
18
  onToggleOpen?: (isOpen: boolean) => void;
18
19
  onAction?: (actionId: string, event: MouseEvent) => void;
19
20
  }) => import("preact").JSX.Element;
@@ -73,7 +73,32 @@ export declare enum AIGroupChatConst {
73
73
  */
74
74
  NONE_SCOPE_ID = "__NONE__",
75
75
  /**
76
- * 无分类虚拟节点标识(与 AiTopicController.computeGroupTree 约定一致)
76
+ * 无分类虚拟节点标识(与 AiTopicController.computeWorkSpaceTree 约定一致)
77
77
  */
78
- NONE_SCOPE_KEY = "scope:__NONE__"
78
+ NONE_SCOPE_KEY = "scope:__NONE__",
79
+ /**
80
+ * 无分类虚拟分组节点标识(默认模式,与 AiTopicController.computeGroupTree 约定一致)
81
+ */
82
+ NONE_GROUP_KEY = "group:__NONE__"
83
+ }
84
+ /**
85
+ * @description 话题数据存储类型常量(configService 的 storageType 参数)
86
+ */
87
+ export declare enum AIChatStorageType {
88
+ /**
89
+ * 会话数据
90
+ */
91
+ TOPICS = "aitopics",
92
+ /**
93
+ * 自定义分组(WORKSPACE 工作模式)
94
+ */
95
+ GROUPS = "aigroups",
96
+ /**
97
+ * 分组(默认工作模式)
98
+ */
99
+ BASIC_GROUPS = "basicgroups",
100
+ /**
101
+ * 业务域(WORKSPACE 工作模式)
102
+ */
103
+ SCOPES = "aiscopes"
79
104
  }
@@ -1,14 +1,6 @@
1
1
  import { Signal } from '@preact/signals';
2
2
  import { TActionPanelComponent } from '../../interface';
3
3
 
4
- /**
5
- * 将操作区面板宽度校正到合理区间 [最小宽度, 容器宽度/3]
6
- *
7
- * @param {number} width 目标宽度
8
- * @param {number} containerWidth 容器整体宽度
9
- * @returns {*} {number}
10
- */
11
- export declare function clampPanelWidth(width: number, containerWidth: number): number;
12
4
  /**
13
5
  * 操作区面板控制器
14
6
  * - 面板为容器级单例,挂在 ChatBaseController 上,切话题不重建
@@ -1,6 +1,6 @@
1
1
  import { Signal } from '@preact/signals';
2
2
  import { ChatTopic } from '../../entity';
3
- import { ITopic, ITopicOptions, IResourceOptions, IChatController, IGroupItem, IScopeOption, IScopeItem, ITopicGroupNode } from '../../interface';
3
+ import { ITopic, ITopicOptions, IResourceOptions, IChatController, IGroupItem, IScopeOption, IScopeItem, ITopicGroupNode, IBasicGroupItem, IBasicTopicGroupNode } from '../../interface';
4
4
  import { AiChatController } from '../ai-chat/ai-chat.controller';
5
5
 
6
6
  /**
@@ -111,6 +111,12 @@ export declare class AiTopicController {
111
111
  * @memberof AiTopicController
112
112
  */
113
113
  disableSelectScope: boolean;
114
+ /**
115
+ * @description 是否启用基础分组
116
+ * @type {boolean}
117
+ * @memberof AiTopicController
118
+ */
119
+ enableBasicGroup: boolean;
114
120
  /**
115
121
  * @description 业务域列表(WORKSPACE 工作模式使用)
116
122
  * @type {IScopeOption[]}
@@ -129,6 +135,12 @@ export declare class AiTopicController {
129
135
  * @memberof AiTopicController
130
136
  */
131
137
  readonly scopes: Signal<IScopeItem[]>;
138
+ /**
139
+ * @description 用户自定义分组清单(默认工作模式,存储于 'basicgroups')
140
+ * @type {Signal<IBasicGroupItem[]>}
141
+ * @memberof AiTopicController
142
+ */
143
+ readonly basicGroups: Signal<IBasicGroupItem[]>;
132
144
  /**
133
145
  * @description 分组存储服务实例('aigroups',与会话数据 'aitopics' 区分)
134
146
  * @private
@@ -170,9 +182,10 @@ export declare class AiTopicController {
170
182
  * @param {('DEFAULT' | 'WORKSPACE')} workMode
171
183
  * @param {boolean} [disableSelectScope]
172
184
  * @param {IScopeOption[]} [scopeList]
185
+ * @param {boolean} [enableBasicGroup]
173
186
  * @memberof AiTopicController
174
187
  */
175
- injectBasicResources(compWrapperId: string, workMode: 'DEFAULT' | 'WORKSPACE', disableSelectScope?: boolean, scopeList?: IScopeOption[]): void;
188
+ injectBasicResources(compWrapperId: string, workMode: 'DEFAULT' | 'WORKSPACE', disableSelectScope?: boolean, scopeList?: IScopeOption[], enableBasicGroup?: boolean): void;
176
189
  /**
177
190
  * 注入资源选项
178
191
  * @param resourceOptions
@@ -277,6 +290,7 @@ export declare class AiTopicController {
277
290
  newTopic(topicid: string, args: Record<string, any>, extra?: {
278
291
  scope?: string | number;
279
292
  groupid?: string;
293
+ base_groupid?: string;
280
294
  }): Promise<void>;
281
295
  /**
282
296
  * 清空话题
@@ -361,8 +375,10 @@ export declare class AiTopicController {
361
375
  switchTopicSidebarCollapse(): void;
362
376
  /**
363
377
  * 全局新建会话
378
+ * - WORKSPACE 模式:scope 为业务域标识,groupid 为自定义分组标识
379
+ * - 默认模式:groupid 为自定义分组标识(写入 base_groupid),不传落入无分类会话
364
380
  * @param scope 业务域标识(WORKSPACE 工作模式)
365
- * @param groupid 自定义分组标识(WORKSPACE 工作模式)
381
+ * @param groupid 自定义分组标识
366
382
  * @returns
367
383
  */
368
384
  globalNewTopic(scope?: string | number, groupid?: string): void;
@@ -430,7 +446,7 @@ export declare class AiTopicController {
430
446
  */
431
447
  private deleteTopicsCore;
432
448
  /**
433
- * @description 获取分组存储服务实例('aigroups',与会话数据 'aitopics' 区分)
449
+ * @description 获取分组存储服务实例(WORKSPACE 模式 'aigroups',默认模式 'basicgroups',与会话数据 'aitopics' 区分)
434
450
  * @private
435
451
  * @param {ITopicOptions} options 话题配置
436
452
  * @returns {*} {IConfigService}
@@ -438,14 +454,14 @@ export declare class AiTopicController {
438
454
  */
439
455
  private getGroupConfig;
440
456
  /**
441
- * @description 加载用户自定义分组数据
457
+ * @description 加载分组数据(WORKSPACE 模式赋值 groups,默认模式赋值 basicGroups)
442
458
  * @param {ITopicOptions} options 话题配置
443
459
  * @returns {*} {Promise<void>}
444
460
  * @memberof AiTopicController
445
461
  */
446
462
  fetchGroups(options: ITopicOptions): Promise<void>;
447
463
  /**
448
- * @description 保存用户自定义分组数据
464
+ * @description 保存分组数据(WORKSPACE 模式存 groups,默认模式存 basicGroups)
449
465
  * @returns {*} {Promise<void>}
450
466
  * @memberof AiTopicController
451
467
  */
@@ -485,7 +501,15 @@ export declare class AiTopicController {
485
501
  * @returns {*} {ITopicGroupNode[]}
486
502
  * @memberof AiTopicController
487
503
  */
488
- computeGroupTree(query?: string): ITopicGroupNode[];
504
+ computeWorkSpaceTree(query?: string): ITopicGroupNode[];
505
+ /**
506
+ * @description 计算默认工作模式分组树:第一层分组('basicgroups'),第二层会话(base_groupid 匹配归属),
507
+ * 未匹配分组(含悬挂 base_groupid)的会话放入无分类虚拟节点
508
+ * @param {string} [query] 快速搜索值,仅匹配会话标题;搜索态下无匹配会话的分组不显示
509
+ * @returns {*} {IBasicTopicGroupNode[]}
510
+ * @memberof AiTopicController
511
+ */
512
+ computeGroupTree(query?: string): IBasicTopicGroupNode[];
489
513
  /**
490
514
  * @description 判断话题是否属于无分类(无scope、scope为空或scope不在scopeList中)
491
515
  * @private
@@ -560,6 +584,50 @@ export declare class AiTopicController {
560
584
  * @memberof AiTopicController
561
585
  */
562
586
  removeGroup(groupid: string): Promise<boolean>;
587
+ /**
588
+ * @description 新增默认工作模式分组
589
+ * @param {string} [text] 分组名称,不传使用国际化默认名
590
+ * @returns {*} {Promise<IBasicGroupItem | undefined>} 成功返回新建分组数据,持久化失败返回undefined
591
+ * @memberof AiTopicController
592
+ */
593
+ addBasicGroup(text?: string): Promise<IBasicGroupItem | undefined>;
594
+ /**
595
+ * @description 重命名默认工作模式分组
596
+ * @param {string} groupid 分组标识
597
+ * @param {string} text 新分组名称
598
+ * @returns {*} {Promise<IBasicGroupItem | undefined>} 成功返回更新后的分组数据,分组不存在、名称为空、未变化或持久化失败返回undefined
599
+ * @memberof AiTopicController
600
+ */
601
+ renameBasicGroup(groupid: string, text: string): Promise<IBasicGroupItem | undefined>;
602
+ /**
603
+ * @description 切换默认工作模式分组折叠状态(持久化)
604
+ * @param {string} groupid 分组标识
605
+ * @returns {*} {Promise<void>}
606
+ * @memberof AiTopicController
607
+ */
608
+ toggleBasicGroupCollapse(groupid: string): Promise<void>;
609
+ /**
610
+ * @description 切换默认工作模式分组置顶状态(持久化)
611
+ * @param {string} groupid 分组标识
612
+ * @returns {*} {Promise<void>}
613
+ * @memberof AiTopicController
614
+ */
615
+ toggleBasicGroupTop(groupid: string): Promise<void>;
616
+ /**
617
+ * @description 删除默认工作模式分组:真删该分组下所有会话数据
618
+ * @param {string} groupid 分组标识
619
+ * @returns {*} {Promise<boolean>} 是否删除成功
620
+ * @memberof AiTopicController
621
+ */
622
+ removeBasicGroup(groupid: string): Promise<boolean>;
623
+ /**
624
+ * @description 移动话题至指定自定义分组(默认工作模式拖拽),并持久化;groupid不传表示拖到无分类节点清空归属
625
+ * @param {string} topicid 话题标识
626
+ * @param {string} [groupid] 目标自定义分组标识
627
+ * @returns {*} {Promise<boolean>} 是否移动成功(归属未变化视为成功)
628
+ * @memberof AiTopicController
629
+ */
630
+ moveBasicTopic(topicid: string, groupid?: string): Promise<boolean>;
563
631
  /**
564
632
  * @description 移动话题至指定业务域或自定义分组(拖拽),并持久化
565
633
  * @param {string} topicid 话题标识
@@ -1,4 +1,4 @@
1
- import { IFile, IFileItem, IMessageUtil, IFileItemParams, IFileUploadPrams, IFileSystemOptions, FileUploaderOptions } from '../../interface';
1
+ import { IFile, IFileItem, IMessageUtil, IConfirmUtil, IFileItemParams, IFileUploadPrams, IFileSystemOptions, FileUploaderOptions } from '../../interface';
2
2
  import { AiChatController } from '../ai-chat/ai-chat.controller';
3
3
 
4
4
  /**
@@ -38,6 +38,13 @@ export declare class FileSystemController {
38
38
  * @memberof FileSystemController
39
39
  */
40
40
  get message(): IMessageUtil | undefined;
41
+ /**
42
+ * @description 提示
43
+ * @readonly
44
+ * @type {(IConfirmUtil | undefined)}
45
+ * @memberof FileSystemController
46
+ */
47
+ get confirm(): IConfirmUtil | undefined;
41
48
  /**
42
49
  * @description 文件预览模式
43
50
  * @readonly
@@ -66,12 +73,12 @@ export declare class FileSystemController {
66
73
  */
67
74
  fetch(params: IFileItemParams): Promise<IFileItem | undefined>;
68
75
  /**
69
- * @description 文件上传
76
+ * @description 系统文件上传
70
77
  * @param {IFileUploadPrams} params
71
78
  * @returns {*} {(Promise<IFile | undefined>)}
72
79
  * @memberof FileSystemController
73
80
  */
74
- uploadFile(params: IFileUploadPrams): Promise<IFile | undefined>;
81
+ uploadSystemFile(params: IFileUploadPrams): Promise<IFile | undefined>;
75
82
  /**
76
83
  * @description 获取文件内容
77
84
  * @param {string} id
@@ -149,4 +156,20 @@ export declare class FileSystemController {
149
156
  * @memberof FileSystemController
150
157
  */
151
158
  delete(file_path: string): Promise<boolean>;
159
+ /**
160
+ * @description 选择文件
161
+ * @param {string} [accept='']
162
+ * @param {boolean} [multiple=false]
163
+ * @returns {*} {(Promise<FileList | undefined>)}
164
+ * @memberof FileSystemController
165
+ */
166
+ selectFile(accept?: string, multiple?: boolean): Promise<FileList | undefined>;
167
+ /**
168
+ * @description 上传文件到系统
169
+ * @param {string} file_path 文件路径
170
+ * @param {File} file 文件
171
+ * @returns {*} {Promise<void>}
172
+ * @memberof FileSystemController
173
+ */
174
+ uploadFileToSystem(file_path: string, file: File): Promise<boolean>;
152
175
  }
@@ -28,5 +28,6 @@ export declare class ChatTopic implements ITopic {
28
28
  get scope(): ITopic['scope'];
29
29
  get groupid(): ITopic['groupid'];
30
30
  get context_code_name(): ITopic['context_code_name'];
31
+ get base_groupid(): ITopic['base_groupid'];
31
32
  constructor(data: ITopic);
32
33
  }
@@ -0,0 +1 @@
1
+ export declare const BackSvg: () => import("preact").JSX.Element;
@@ -58,3 +58,4 @@ export { WorlSpaceSvg } from './workspace-svg';
58
58
  export { NewFolderSvg, NewFileSvg } from './new-folder-svg';
59
59
  export { EyeSvg } from './eye-svg';
60
60
  export { MoveFileSvg, UploadFileSvg } from './move-file-svg';
61
+ export { BackSvg } from './back-svg';
@@ -244,6 +244,12 @@ export interface IChatOptions extends IChat {
244
244
  * @memberof IChatOptions
245
245
  */
246
246
  enableAIProject: boolean;
247
+ /**
248
+ * @description 项目选择占位提示
249
+ * @type {string}
250
+ * @memberof IChatOptions
251
+ */
252
+ projectSelectPlaceholder?: string;
247
253
  /**
248
254
  * 话题标题计算模式
249
255
  *
@@ -23,6 +23,19 @@ interface IFileSystemUploadParams {
23
23
  srfaiagent?: string;
24
24
  srfscope?: string;
25
25
  }
26
+ /**
27
+ * @description 下载文件参数
28
+ * @interface IFileSystemDownLoadParams
29
+ */
30
+ interface IFileSystemDownLoadParams {
31
+ sessionid: string;
32
+ folder: string;
33
+ id: string;
34
+ file_path: string;
35
+ srfaiagent?: string;
36
+ srfscope?: string;
37
+ timeout?: number;
38
+ }
26
39
  /**
27
40
  * @description 新建目录参数
28
41
  * @interface IFileSystemCreateParams
@@ -143,6 +156,11 @@ export interface IFileSystemOptions {
143
156
  name: string;
144
157
  folder: string;
145
158
  } | undefined>;
159
+ /**
160
+ * @description 下载文件
161
+ * @memberof IFileSystemOptions
162
+ */
163
+ downloadFile: (ctx: object, param: object, other: IFileSystemDownLoadParams) => Promise<IFileSystemResult>;
146
164
  /**
147
165
  * @description 获取文件内容
148
166
  * @param {object} ctx