@ibiz-template-plugin/ai-chat 0.0.59 → 0.0.60

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.
@@ -451,6 +451,31 @@ export declare class AiChatController {
451
451
  * @memberof AiChatController
452
452
  */
453
453
  messageDisLike(message: IChatMessage): Promise<void>;
454
+ /**
455
+ * 处理预定义点击
456
+ * @param type
457
+ * @param url
458
+ * @param message
459
+ * @param event
460
+ * @returns
461
+ */
462
+ handlePredefinedClick(type: 'chunkview' | 'view' | 'action', url: string, message: IChatMessage, event: MouseEvent): Promise<void>;
463
+ /**
464
+ * 处理预定义视图跳转点击
465
+ * @param url
466
+ * @param message
467
+ * @param event
468
+ * @returns
469
+ */
470
+ handlePredefViewClick(url: string, message: IChatMessage, event: MouseEvent): Promise<void>;
471
+ /**
472
+ * 处理预定义界面行为点击
473
+ * @param url
474
+ * @param message
475
+ * @param event
476
+ * @returns
477
+ */
478
+ handlePredefActionClick(url: string, message: IChatMessage, event: MouseEvent): Promise<void>;
454
479
  /**
455
480
  * 销毁
456
481
  *
@@ -216,6 +216,18 @@ export interface IChatOptions extends IChat {
216
216
  * @type {number}
217
217
  */
218
218
  chunkThresholdDefaultValue: number;
219
+ /**
220
+ * 知识分片打开视图
221
+ *
222
+ * @type {string}
223
+ */
224
+ chunkView?: string;
225
+ /**
226
+ * 知识分片实体代码名称
227
+ *
228
+ * @type {string}
229
+ */
230
+ chunkEntity?: string;
219
231
  /**
220
232
  * 聊天窗触发提问回调
221
233
  *
@@ -327,4 +339,11 @@ export interface IChatOptions extends IChat {
327
339
  * @return {*} {Promise<object>}
328
340
  */
329
341
  chatDigest(context: object, params: object, otherParams: object): Promise<object>;
342
+ /**
343
+ * 打开链接视图
344
+ * @param url
345
+ * @param message
346
+ * @param event
347
+ */
348
+ openLinkView(url: string, message: IChatMessage, event: MouseEvent): Promise<void>;
330
349
  }
@@ -1,6 +1,6 @@
1
1
  export { Namespace } from '@ibiz-template/scss-utils';
2
2
  export { PluginStaticResource } from './plugin-static-resource/plugin-static-resource';
3
- export { createUUID, isSvg } from './util/util';
3
+ export { createUUID, isSvg, parsePredefProtocol } from './util/util';
4
4
  export { IndexedDBUtil } from './util/indexdb-util';
5
5
  export { FileUploader } from './util/file-uploader';
6
6
  export { MaterialResourceParser } from './util/material-resource-parser';
@@ -28,6 +28,28 @@ export declare function isSvg(str: string): boolean;
28
28
  * @param sessionID
29
29
  */
30
30
  export declare function getChatSessionId(type: 'TOPIC' | 'INLINE' | 'TEMP', sessionID?: string): string;
31
+ /**
32
+ * @description 解析url对象查询参数,防止浏览器不支持解析URL
33
+ * @export
34
+ * @param {string} search
35
+ * @return {*} {any}
36
+ */
37
+ export declare function parseSearchParams(search: string): any;
38
+ /**
39
+ * 解析预置协议的字符串
40
+ * @export
41
+ * @param {string} urlStr
42
+ * @return {*} {{
43
+ * context: any;
44
+ * params: any;
45
+ * typeId: string;
46
+ * }}
47
+ */
48
+ export declare function parsePredefProtocol(urlStr: string): {
49
+ context: any;
50
+ params: any;
51
+ typeId: string;
52
+ };
31
53
  export declare class TextUtil {
32
54
  /**
33
55
  * input元素,用于存储拷贝的文本
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template-plugin/ai-chat",
3
- "version": "0.0.59",
3
+ "version": "0.0.60",
4
4
  "description": "iBiz AI交互框插件",
5
5
  "type": "module",
6
6
  "main": "dist/index.es.js",