@ibiz-template-plugin/ai-chat 0.0.114 → 0.0.115
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/index.es.js +7930 -7045
- package/dist/index.legacy.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/chat-action-panel/chat-action-panel.d.ts +19 -0
- package/dist/types/components/chat-container/chat-container.d.ts +81 -4
- package/dist/types/components/chat-editor/node/mention-node.d.ts +3 -0
- package/dist/types/components/chat-net-disk/chat-net-disk.d.ts +7 -0
- package/dist/types/components/common/breadcrumb/breadcrumb.d.ts +16 -0
- package/dist/types/components/common/lazy-list-tree/lazy-list-tree.d.ts +59 -0
- package/dist/types/components/common/lazy-tree/lazy-tree.d.ts +26 -1
- package/dist/types/components/flat-chat-container/flat-chat-container.d.ts +39 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/constants/index.d.ts +8 -0
- package/dist/types/controller/ai-action-panel/ai-action-panel.controller.d.ts +102 -0
- package/dist/types/controller/ai-chat/ai-chat.controller.d.ts +25 -10
- package/dist/types/controller/chat/chat-base.controller.d.ts +7 -0
- package/dist/types/controller/index.d.ts +1 -0
- package/dist/types/icons/index.d.ts +2 -0
- package/dist/types/icons/project-svg.d.ts +1 -0
- package/dist/types/icons/workspace-svg.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/interface/i-action-panel/i-action-panel.d.ts +24 -0
- package/dist/types/interface/i-chat-options/i-chat-options.d.ts +30 -4
- package/dist/types/interface/i-project/i-project.d.ts +26 -0
- package/dist/types/interface/index.d.ts +2 -1
- package/dist/types/locale/en/index.d.ts +8 -0
- package/dist/types/locale/zh-CN/index.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AiChatController, AiTopicController } from '../../controller';
|
|
2
|
+
import { AiActionPanelController } from '../../controller/ai-action-panel/ai-action-panel.controller';
|
|
2
3
|
import { IAIAgent, IAIAgentConfig } from '../i-ai-agent/i-ai-agent';
|
|
3
4
|
import { IChatMessage } from '../i-chat-message/i-chat-message';
|
|
4
5
|
import { IChatToolbarItem } from '../i-chat-toolbar-item/i-chat-toolbar-item';
|
|
@@ -148,6 +149,10 @@ export interface IChat {
|
|
|
148
149
|
* 选中知识库ID
|
|
149
150
|
*/
|
|
150
151
|
selectAIKnowledgeBaseId?: string;
|
|
152
|
+
/**
|
|
153
|
+
* 选中项目目录ID
|
|
154
|
+
*/
|
|
155
|
+
selectAIProjectId?: string;
|
|
151
156
|
/**
|
|
152
157
|
* 模式参数,用于业务区分
|
|
153
158
|
*/
|
|
@@ -156,6 +161,10 @@ export interface IChat {
|
|
|
156
161
|
* 作用域参数
|
|
157
162
|
*/
|
|
158
163
|
srfScope?: string;
|
|
164
|
+
/**
|
|
165
|
+
* @description 当前会话最近一次交谈异步任务id
|
|
166
|
+
*/
|
|
167
|
+
activeAsyncAcitonID?: string;
|
|
159
168
|
/**
|
|
160
169
|
* map参数
|
|
161
170
|
*/
|
|
@@ -211,6 +220,12 @@ export interface IChatOptions extends IChat {
|
|
|
211
220
|
* @type {AiTopicController}
|
|
212
221
|
*/
|
|
213
222
|
aiTopic?: AiTopicController;
|
|
223
|
+
/**
|
|
224
|
+
* 操作区面板控制器(容器级单例,由聊天总控制器注入)
|
|
225
|
+
*
|
|
226
|
+
* @type {AiActionPanelController}
|
|
227
|
+
*/
|
|
228
|
+
actionPanel?: AiActionPanelController;
|
|
214
229
|
/**
|
|
215
230
|
* 摘要最大长度
|
|
216
231
|
*
|
|
@@ -314,7 +329,18 @@ export interface IChatOptions extends IChat {
|
|
|
314
329
|
* @param {IChatMessage[]} question 提问历史内容(包含当前提问)
|
|
315
330
|
* @return {*} {Promise<boolean>} 等待回答,用于显示 loading 并获取最终成功与否
|
|
316
331
|
*/
|
|
317
|
-
question(aiChat: AiChatController, context: object, params: object, otherParams: object,
|
|
332
|
+
question(aiChat: AiChatController, context: object, params: object, otherParams: object, messages: IChatMessage[], sessionid: string, srfaiagent: string | undefined, srfmode: string | undefined, srfscope: string | undefined, srfaiknowledgebases: string | undefined, srfaiagentconfig: IAIAgentConfig | undefined, appendcurdata: object | undefined, srfmcpservers: string | undefined, srfsessionmeta: object | undefined, srfproject: string | undefined): Promise<boolean>;
|
|
333
|
+
/**
|
|
334
|
+
* @description 恢复会话
|
|
335
|
+
* @param {AiChatController} aiChat
|
|
336
|
+
* @param {object} context
|
|
337
|
+
* @param {object} params
|
|
338
|
+
* @param {object} otherParams
|
|
339
|
+
* @param {IChatMessage[]} messages
|
|
340
|
+
* @returns {*} {Promise<boolean>}
|
|
341
|
+
* @memberof IChatOptions
|
|
342
|
+
*/
|
|
343
|
+
resumeQuestion(aiChat: AiChatController, context: object, params: object, otherParams: object, messages: IChatMessage[]): Promise<boolean>;
|
|
318
344
|
/**
|
|
319
345
|
* 中断消息
|
|
320
346
|
* @param aiChat
|
|
@@ -401,10 +427,10 @@ export interface IChatOptions extends IChat {
|
|
|
401
427
|
fetchProject?: (context: object, params: object, other: {
|
|
402
428
|
srfaiagent: string;
|
|
403
429
|
sessionid: string;
|
|
404
|
-
pattern: string;
|
|
405
|
-
file_path: string;
|
|
406
430
|
max_depth: number;
|
|
407
|
-
|
|
431
|
+
pattern?: string;
|
|
432
|
+
file_path?: string;
|
|
433
|
+
only_dirs?: boolean;
|
|
408
434
|
}) => Promise<IProject[]>;
|
|
409
435
|
/**
|
|
410
436
|
* 文件上传配置
|
|
@@ -12,3 +12,29 @@ export interface IProject {
|
|
|
12
12
|
*/
|
|
13
13
|
children?: IProject[];
|
|
14
14
|
}
|
|
15
|
+
export interface IProjectParams {
|
|
16
|
+
/**
|
|
17
|
+
* @description 文件路径
|
|
18
|
+
* @type {string}
|
|
19
|
+
* @memberof IProjectParams
|
|
20
|
+
*/
|
|
21
|
+
file_path?: string;
|
|
22
|
+
/**
|
|
23
|
+
* @description 匹配
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof IProjectParams
|
|
26
|
+
*/
|
|
27
|
+
pattern?: string;
|
|
28
|
+
/**
|
|
29
|
+
* @description 最大层级
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof IProjectParams
|
|
32
|
+
*/
|
|
33
|
+
max_depth: number;
|
|
34
|
+
/**
|
|
35
|
+
* @description 是否只查询目录
|
|
36
|
+
* @type {boolean}
|
|
37
|
+
* @memberof IProjectParams
|
|
38
|
+
*/
|
|
39
|
+
only_dirs?: boolean;
|
|
40
|
+
}
|
|
@@ -23,6 +23,7 @@ export type { IChatMessageUsage } from './i-chat-message-usage/i-chat-message-us
|
|
|
23
23
|
export type { IChatController } from './i-chat-controller/i-chat-controller';
|
|
24
24
|
export type { IAIQuesitionItem, IAIQuesition, IAIQuesitionAnswer, } from './i-ai-quesition/i-ai-quesition';
|
|
25
25
|
export type { IExtensionOptions } from './i-extension-options/i-extension-options';
|
|
26
|
+
export type { IActionPanelContentProps, TActionPanelComponent, } from './i-action-panel/i-action-panel';
|
|
26
27
|
export type { ISpeechRecognition } from './i-speech-recognition/i-speech-recognition';
|
|
27
|
-
export type { IProject } from './i-project/i-project';
|
|
28
|
+
export type { IProject, IProjectParams } from './i-project/i-project';
|
|
28
29
|
export * from './deep-research';
|
|
@@ -151,4 +151,12 @@ export declare const EN: {
|
|
|
151
151
|
noTextReportContent: string;
|
|
152
152
|
chatInputPlaceholder: string;
|
|
153
153
|
projectPlaceholder: string;
|
|
154
|
+
workSpace: string;
|
|
155
|
+
listMode: string;
|
|
156
|
+
treeMode: string;
|
|
157
|
+
rootDirectory: string;
|
|
158
|
+
fileName: string;
|
|
159
|
+
size: string;
|
|
160
|
+
type: string;
|
|
161
|
+
folder: string;
|
|
154
162
|
};
|
|
@@ -151,4 +151,12 @@ export declare const ZH_CN: {
|
|
|
151
151
|
noTextReportContent: string;
|
|
152
152
|
chatInputPlaceholder: string;
|
|
153
153
|
projectPlaceholder: string;
|
|
154
|
+
workSpace: string;
|
|
155
|
+
listMode: string;
|
|
156
|
+
treeMode: string;
|
|
157
|
+
rootDirectory: string;
|
|
158
|
+
fileName: string;
|
|
159
|
+
size: string;
|
|
160
|
+
type: string;
|
|
161
|
+
folder: string;
|
|
154
162
|
};
|