@ibiz-template-plugin/ai-chat 0.0.99 → 0.0.101
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 +3037 -2780
- package/dist/index.legacy.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/chat-container/chat-container.d.ts +9 -2
- package/dist/types/components/chat-simple-input/chat-simple-input.d.ts +0 -6
- package/dist/types/components/chat-toolbar/chat-toolbar.d.ts +9 -1
- package/dist/types/components/flat-chat-container/flat-chat-container.d.ts +57 -5
- package/dist/types/components/simple-chat-container/simple-chat-container.d.ts +0 -6
- package/dist/types/controller/ai-chat/ai-chat.controller.d.ts +36 -8
- package/dist/types/icons/steer.d.ts +2 -0
- package/dist/types/interface/i-chat-options/i-chat-options.d.ts +21 -3
- package/dist/types/interface/i-container-options/i-container-options.d.ts +7 -6
- package/dist/types/interface/i-extension-options/i-extension-options.d.ts +31 -0
- package/dist/types/interface/index.d.ts +1 -0
- package/dist/types/locale/en/index.d.ts +2 -0
- package/dist/types/locale/zh-CN/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -182,6 +182,7 @@ export interface IChatOptions extends IChat {
|
|
|
182
182
|
mode?: 'DEFAULT' | 'TOPIC';
|
|
183
183
|
/**
|
|
184
184
|
* @description 是否为简单模式
|
|
185
|
+
* - 仅显示消息发送框,抛出send行为,无AI聊天能力
|
|
185
186
|
* @type {boolean}
|
|
186
187
|
* @memberof IChatOptions
|
|
187
188
|
*/
|
|
@@ -268,6 +269,12 @@ export interface IChatOptions extends IChat {
|
|
|
268
269
|
* @type {string}
|
|
269
270
|
*/
|
|
270
271
|
chunkEntity?: string;
|
|
272
|
+
/**
|
|
273
|
+
* 空白占位
|
|
274
|
+
*
|
|
275
|
+
* @type {string}
|
|
276
|
+
*/
|
|
277
|
+
placeholder?: string;
|
|
271
278
|
/**
|
|
272
279
|
* 消息提示工具类工具
|
|
273
280
|
*/
|
|
@@ -296,6 +303,14 @@ export interface IChatOptions extends IChat {
|
|
|
296
303
|
* @param otherParams
|
|
297
304
|
*/
|
|
298
305
|
abortQuestion(aiChat: AiChatController, context: object, params: object, otherParams: object): Promise<void>;
|
|
306
|
+
/**
|
|
307
|
+
* 补充提问
|
|
308
|
+
* @param aiChat
|
|
309
|
+
* @param context
|
|
310
|
+
* @param params
|
|
311
|
+
* @param otherParams
|
|
312
|
+
*/
|
|
313
|
+
supplementQuestion(aiChat: AiChatController, context: object, params: object, otherParams: object): Promise<void>;
|
|
299
314
|
/**
|
|
300
315
|
* 聊天窗历史记录获取
|
|
301
316
|
*
|
|
@@ -316,11 +331,11 @@ export interface IChatOptions extends IChat {
|
|
|
316
331
|
*
|
|
317
332
|
* @author chitanda
|
|
318
333
|
* @date 2023-10-13 18:10:56
|
|
319
|
-
* @param {string} action 操作的行为标识 backfill:回填 question:提问 deletemsg:删除消息 refreshmsg:刷新消息 send: 发送消息
|
|
334
|
+
* @param {string} action 操作的行为标识 backfill:回填 question:提问 deletemsg:删除消息 refreshmsg:刷新消息 send: 发送消息 message: 聊天消息
|
|
320
335
|
* @param {T} [params] 传递的参数
|
|
321
336
|
* @return {*} {Promise<boolean>} 等待操作,用于显示 loading 并获取最终成功与否
|
|
322
337
|
*/
|
|
323
|
-
action?<T = unknown>(action: 'backfill' | 'question' | 'deletemsg' | 'refreshmsg' | 'copymsg' | 'send', params?: T): Promise<boolean>;
|
|
338
|
+
action?<T = unknown>(action: 'backfill' | 'question' | 'deletemsg' | 'refreshmsg' | 'copymsg' | 'send' | 'message', params?: T): Promise<boolean>;
|
|
324
339
|
/**
|
|
325
340
|
* 全屏操作
|
|
326
341
|
*
|
|
@@ -355,7 +370,10 @@ export interface IChatOptions extends IChat {
|
|
|
355
370
|
*
|
|
356
371
|
* @returns
|
|
357
372
|
*/
|
|
358
|
-
fetchKnowledgeBaseList?: (
|
|
373
|
+
fetchKnowledgeBaseList?: (args?: {
|
|
374
|
+
query?: string;
|
|
375
|
+
knowledgebases?: string;
|
|
376
|
+
}) => Promise<IKnowledgeBase[]>;
|
|
359
377
|
/**
|
|
360
378
|
* 文件上传配置
|
|
361
379
|
*
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IChatContainerOptions } from '../i-chat-container/i-chat-container';
|
|
2
2
|
import { IChatOptions } from '../i-chat-options/i-chat-options';
|
|
3
|
+
import { IExtensionOptions } from '../i-extension-options/i-extension-options';
|
|
3
4
|
import { IResourceOptions } from '../i-resource-options/i-resource-options';
|
|
4
5
|
import { ITopicOptions } from '../i-topic-options/i-topic-options';
|
|
5
6
|
|
|
@@ -20,12 +21,6 @@ export interface IContainerOptions {
|
|
|
20
21
|
* @type {('DEFAULT' | 'TOPIC')}
|
|
21
22
|
*/
|
|
22
23
|
mode?: 'DEFAULT' | 'TOPIC';
|
|
23
|
-
/**
|
|
24
|
-
* @description 空白占位
|
|
25
|
-
* @type {string}
|
|
26
|
-
* @memberof IContainerOptions
|
|
27
|
-
*/
|
|
28
|
-
placeholder?: string;
|
|
29
24
|
/**
|
|
30
25
|
* 话题参数(话题模式必填)
|
|
31
26
|
*
|
|
@@ -54,4 +49,10 @@ export interface IContainerOptions {
|
|
|
54
49
|
* @type {IChatContainerOptions}
|
|
55
50
|
*/
|
|
56
51
|
containerOptions?: IChatContainerOptions;
|
|
52
|
+
/**
|
|
53
|
+
* @description 扩展配置
|
|
54
|
+
* @type {IExtensionOptions}
|
|
55
|
+
* @memberof IContainerOptions
|
|
56
|
+
*/
|
|
57
|
+
extensionOptions?: IExtensionOptions;
|
|
57
58
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description 扩展配置
|
|
3
|
+
* @export
|
|
4
|
+
* @interface IExtensionOptions
|
|
5
|
+
*/
|
|
6
|
+
export interface IExtensionOptions {
|
|
7
|
+
/**
|
|
8
|
+
* @description 头部容器
|
|
9
|
+
* @type {HTMLElement}
|
|
10
|
+
* @memberof IExtensionOptions
|
|
11
|
+
*/
|
|
12
|
+
headerContainer?: HTMLElement;
|
|
13
|
+
/**
|
|
14
|
+
* @description 话题挂载容器
|
|
15
|
+
* @type {HTMLElement}
|
|
16
|
+
* @memberof IExtensionOptions
|
|
17
|
+
*/
|
|
18
|
+
topicContainer?: HTMLElement;
|
|
19
|
+
/**
|
|
20
|
+
* @description 消息挂载容器
|
|
21
|
+
* @type {HTMLElement}
|
|
22
|
+
* @memberof IExtensionOptions
|
|
23
|
+
*/
|
|
24
|
+
messagesContainer?: HTMLElement;
|
|
25
|
+
/**
|
|
26
|
+
* @description 工具栏挂载容器
|
|
27
|
+
* @type {HTMLElement}
|
|
28
|
+
* @memberof IExtensionOptions
|
|
29
|
+
*/
|
|
30
|
+
toolbarContainer?: HTMLElement;
|
|
31
|
+
}
|
|
@@ -21,4 +21,5 @@ export type { IConfirmUtil, IConfirmParams, INotificationUtil, INotificationPara
|
|
|
21
21
|
export type { IChatMessageUsage } from './i-chat-message-usage/i-chat-message-usage';
|
|
22
22
|
export type { IChatController } from './i-chat-controller/i-chat-controller';
|
|
23
23
|
export type { IAIQuesitionItem, IAIQuesition, IAIQuesitionAnswer, } from './i-ai-quesition/i-ai-quesition';
|
|
24
|
+
export type { IExtensionOptions } from './i-extension-options/i-extension-options';
|
|
24
25
|
export * from './deep-research';
|