@ibiz-template-plugin/ai-chat 0.0.30 → 0.0.32

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 (54) hide show
  1. package/dist/index.es.js +2919 -2617
  2. package/dist/index.legacy.js +1 -1
  3. package/dist/polyfills.legacy.js +1 -1
  4. package/dist/style.css +1 -1
  5. package/dist/types/app.d.ts +1 -0
  6. package/dist/types/components/chat-back-bottom/chat-back-bottom.d.ts +1 -0
  7. package/dist/types/components/chat-container/chat-container.d.ts +19 -4
  8. package/dist/types/components/chat-input/chat-input.d.ts +2 -1
  9. package/dist/types/components/chat-input-material/chat-input-material.d.ts +1 -0
  10. package/dist/types/components/chat-input-material-item/chat-input-material-item.d.ts +1 -0
  11. package/dist/types/components/chat-input-material-item/common-material/common-material.d.ts +1 -0
  12. package/dist/types/components/chat-input-material-item/ossfile-material/ossfile-material.d.ts +1 -0
  13. package/dist/types/components/chat-message-item/chat-message-item.d.ts +1 -0
  14. package/dist/types/components/chat-message-item/error-message/error-message.d.ts +1 -0
  15. package/dist/types/components/chat-message-item/markdown-message/markdown-message.d.ts +1 -0
  16. package/dist/types/components/chat-message-item/unknown-message/unknown-message.d.ts +1 -0
  17. package/dist/types/components/chat-message-item/user-message/user-message.d.ts +1 -0
  18. package/dist/types/components/chat-messages/chat-messages.d.ts +1 -0
  19. package/dist/types/components/chat-minimize/chat-minimize.d.ts +1 -0
  20. package/dist/types/components/chat-search/chat-search.d.ts +1 -0
  21. package/dist/types/components/chat-suggestions/chat-suggestions.d.ts +1 -0
  22. package/dist/types/components/chat-thought-chain/chat-thought-chain.d.ts +1 -0
  23. package/dist/types/components/chat-tool-call/chat-tool-call.d.ts +1 -0
  24. package/dist/types/components/chat-tool-call-item/chat-tool-call-item.d.ts +1 -0
  25. package/dist/types/components/chat-toolbar/chat-toolbar-item/chat-toolbar-item.d.ts +1 -0
  26. package/dist/types/components/chat-toolbar/chat-toolbar.d.ts +1 -0
  27. package/dist/types/components/chat-topic-item/chat-topic-item.d.ts +1 -0
  28. package/dist/types/components/chat-topics/chat-topics.d.ts +1 -0
  29. package/dist/types/components/popup/popup.d.ts +6 -5
  30. package/dist/types/controller/ai-chat/ai-chat.controller.d.ts +17 -12
  31. package/dist/types/controller/ai-material/ai-material-factory.d.ts +1 -0
  32. package/dist/types/controller/ai-material/common-helper.d.ts +1 -0
  33. package/dist/types/controller/ai-material/file-helper.d.ts +1 -0
  34. package/dist/types/controller/ai-material/material-helper.d.ts +1 -0
  35. package/dist/types/controller/ai-topic/ai-topic.controller.d.ts +1 -0
  36. package/dist/types/controller/chat/chat.controller.d.ts +1 -0
  37. package/dist/types/entity/chart-material/chart-material.d.ts +1 -0
  38. package/dist/types/entity/chart-topic/chart-topic.d.ts +1 -0
  39. package/dist/types/entity/chat-message/chat-message.d.ts +14 -0
  40. package/dist/types/entity/chat-suggestion/chat-suggestion.d.ts +1 -0
  41. package/dist/types/global.d.ts +1 -0
  42. package/dist/types/icons/more-svg.d.ts +2 -2
  43. package/dist/types/index.d.ts +1 -0
  44. package/dist/types/interface/i-chat-message/i-chat-message.d.ts +1 -0
  45. package/dist/types/interface/i-chat-options/i-chat-options.d.ts +49 -0
  46. package/dist/types/interface/i-chat-toolbar-item/i-chat-toolbar-item.d.ts +1 -0
  47. package/dist/types/interface/i-container-options/i-container-options.d.ts +1 -0
  48. package/dist/types/interface/i-topic-options/i-topic-options.d.ts +1 -0
  49. package/dist/types/interface/index.d.ts +1 -1
  50. package/dist/types/utils/util/chat-suggestion-parser.d.ts +1 -0
  51. package/dist/types/utils/util/chat-tool-call-parser.d.ts +1 -0
  52. package/dist/types/utils/util/file-uploader.d.ts +1 -0
  53. package/dist/types/utils/util/material-resource-parser.d.ts +1 -0
  54. package/package.json +5 -2
@@ -1,7 +1,8 @@
1
1
  import { Component } from 'preact';
2
2
  import { Namespace } from '../../utils';
3
3
  import { AiChatController, AiTopicController } from '../../controller';
4
- import { IChatToolbarItem, IChatContainerOptions } from '../../interface';
4
+ import { IChatToolbarItem, IChatContainerOptions, IAutoClose } from '../../interface';
5
+
5
6
  export interface ChatContainerProps {
6
7
  /**
7
8
  * 呈现模式
@@ -91,6 +92,20 @@ export interface ChatContainerProps {
91
92
  * @type {IChatContainerOptions}
92
93
  */
93
94
  containerOptions?: IChatContainerOptions;
95
+ /**
96
+ * 自动关闭
97
+ *
98
+ * @type {IAutoClose}
99
+ * @memberof ChatContainerProps
100
+ */
101
+ autoClose?: IAutoClose;
102
+ /**
103
+ * @description AI窗口的打开模式
104
+ * - default:默认;minimize:最小化;autoexpand:自动展开
105
+ * @type {('default' | 'minimize' | 'autoexpand')}
106
+ * @memberof IChat
107
+ */
108
+ openMode?: 'default' | 'minimize' | 'autoexpand';
94
109
  }
95
110
  interface ChatContainerState {
96
111
  /**
@@ -113,7 +128,7 @@ interface ContainerContext {
113
128
  enableBackFill: boolean;
114
129
  newTopic: Function;
115
130
  }
116
- export declare const ContainerContext: import("preact").Context<ContainerContext>;
131
+ export declare const ContainerContext: import('preact').Context<ContainerContext>;
117
132
  /**
118
133
  * 聊天窗口容器,可拖拽,可缩放
119
134
  *
@@ -126,8 +141,8 @@ export declare const ContainerContext: import("preact").Context<ContainerContext
126
141
  export declare class ChatContainer extends Component<ChatContainerProps, ChatContainerState> {
127
142
  constructor(props: ChatContainerProps | undefined);
128
143
  ns: Namespace;
129
- containerRef: import("preact").RefObject<HTMLDivElement>;
130
- dragHandle: import("preact").RefObject<HTMLDivElement>;
144
+ containerRef: import('preact').RefObject<HTMLDivElement>;
145
+ dragHandle: import('preact').RefObject<HTMLDivElement>;
131
146
  /**
132
147
  * 窗口样式数据
133
148
  *
@@ -1,5 +1,6 @@
1
1
  import { AiChatController } from '../../controller';
2
2
  import { IChatToolbarItem } from '../../interface';
3
+
3
4
  export interface ChatInputProps {
4
5
  /**
5
6
  * 单实例聊天总控
@@ -18,4 +19,4 @@ export interface ChatInputProps {
18
19
  */
19
20
  questionToolbarItems?: IChatToolbarItem[];
20
21
  }
21
- export declare const ChatInput: (props: ChatInputProps) => import("preact/compat").JSX.Element;
22
+ export declare const ChatInput: (props: ChatInputProps) => import("preact").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { AiChatController } from '../../controller';
2
+
2
3
  export interface ChatInputMaterialProps {
3
4
  /**
4
5
  * 聊天实例
@@ -1,6 +1,7 @@
1
1
  import { h } from 'preact';
2
2
  import { AiChatController } from '../../controller';
3
3
  import { IMaterial } from '../../interface';
4
+
4
5
  export interface ChatInputMaterialtemProps {
5
6
  /**
6
7
  * 聊天控制器
@@ -1,5 +1,6 @@
1
1
  import { AiChatController } from '../../../controller';
2
2
  import { IMaterial } from '../../../interface';
3
+
3
4
  export interface CommonMaterialProps {
4
5
  controller: AiChatController;
5
6
  material: IMaterial;
@@ -1,5 +1,6 @@
1
1
  import { AiChatController } from '../../../controller';
2
2
  import { IMaterial } from '../../../interface';
3
+
3
4
  export interface OssfileMaterialProps {
4
5
  controller: AiChatController;
5
6
  material: IMaterial;
@@ -1,6 +1,7 @@
1
1
  import { VNode, h } from 'preact';
2
2
  import { IChatMessage } from '../../interface';
3
3
  import { AiChatController } from '../../controller';
4
+
4
5
  export interface ChatMessageItemProps {
5
6
  /**
6
7
  * 单实例聊天总控
@@ -1,6 +1,7 @@
1
1
  import { VNode } from 'preact';
2
2
  import { IChatMessage } from '../../../interface';
3
3
  import { AiChatController } from '../../../controller';
4
+
4
5
  export interface ErrorMessageProps {
5
6
  /**
6
7
  * 单实例聊天总控
@@ -1,6 +1,7 @@
1
1
  import { VNode } from 'preact';
2
2
  import { IChatMessage } from '../../../interface';
3
3
  import { AiChatController } from '../../../controller';
4
+
4
5
  export interface MarkdownMessageProps {
5
6
  /**
6
7
  * 单实例聊天总控
@@ -1,4 +1,5 @@
1
1
  import { IChatMessage } from '../../../interface';
2
+
2
3
  export interface UnknownMessageProps {
3
4
  message: IChatMessage;
4
5
  /**
@@ -1,6 +1,7 @@
1
1
  import { VNode } from 'preact';
2
2
  import { IChatMessage } from '../../../interface';
3
3
  import { AiChatController } from '../../../controller';
4
+
4
5
  export interface UserMessageProps {
5
6
  controller: AiChatController;
6
7
  message: IChatMessage;
@@ -1,5 +1,6 @@
1
1
  import { AiChatController } from '../../controller';
2
2
  import { IChatToolbarItem } from '../../interface';
3
+
3
4
  export interface ChatMessageProps {
4
5
  /**
5
6
  * 单实例聊天总控
@@ -1,4 +1,5 @@
1
1
  import { AiChatController } from '../../controller';
2
+
2
3
  export interface ChatMinimizeProps {
3
4
  /**
4
5
  * 单实例聊天总控
@@ -1,3 +1,4 @@
1
+
1
2
  export interface ChatSearchProps {
2
3
  /**
3
4
  * 值
@@ -1,4 +1,5 @@
1
1
  import { IChatSuggestion } from '../../interface';
2
+
2
3
  export interface ChatSuggestionsProps {
3
4
  /**
4
5
  * 聊天建议集合
@@ -1,4 +1,5 @@
1
1
  import { IChatThoughtChain } from '../../interface';
2
+
2
3
  export interface ChatThoughtChainProps {
3
4
  /**
4
5
  * @description AI聊天思维链
@@ -1,4 +1,5 @@
1
1
  import { IChatToolCall } from '../../interface';
2
+
2
3
  export interface ChatToolCallProps {
3
4
  /**
4
5
  * @description 工具调用集合
@@ -1,4 +1,5 @@
1
1
  import { IChatToolCall } from '../../interface';
2
+
2
3
  export interface ChatToolCallItemProps {
3
4
  /**
4
5
  * @description 工具调用
@@ -1,4 +1,5 @@
1
1
  import { IChatToolbarItem } from '../../../interface';
2
+
2
3
  export interface ChatToolberItemProps {
3
4
  /**
4
5
  * 工具栏项模型
@@ -1,5 +1,6 @@
1
1
  import { IChatToolbarItem } from '../../interface';
2
2
  import { AiChatController } from '../../controller';
3
+
3
4
  export interface ChatToolbarProps {
4
5
  /**
5
6
  * 单实例聊天总控
@@ -1,5 +1,6 @@
1
1
  import { ChatTopic } from '../../entity';
2
2
  import { AiTopicController } from '../../controller';
3
+
3
4
  export interface ChatTopicItemProps {
4
5
  controller: AiTopicController;
5
6
  topic: ChatTopic;
@@ -1,4 +1,5 @@
1
1
  import { AiTopicController } from '../../controller';
2
+
2
3
  export interface ChatTopicProps {
3
4
  /**
4
5
  * 话题控制器
@@ -1,4 +1,5 @@
1
1
  import { VNode } from 'preact';
2
+
2
3
  type Position = 'top' | 'bottom' | 'left' | 'right' | 'top-left';
3
4
  interface ActionItem {
4
5
  id: string;
@@ -7,11 +8,11 @@ interface ActionItem {
7
8
  }
8
9
  export declare const Popup: ({ children, actions, content, position, isOpen: isOpenProp, onToggleOpen, onAction, }: {
9
10
  children: import('preact').ComponentChildren;
10
- actions?: ActionItem[] | undefined;
11
+ actions?: ActionItem[];
11
12
  content?: import('preact').ComponentChildren;
12
- position?: Position | undefined;
13
- isOpen?: boolean | undefined;
14
- onToggleOpen?: ((isOpen: boolean) => void) | undefined;
15
- onAction?: ((actionId: string, event: MouseEvent) => void) | undefined;
13
+ position?: Position;
14
+ isOpen?: boolean;
15
+ onToggleOpen?: (isOpen: boolean) => void;
16
+ onAction?: (actionId: string, event: MouseEvent) => void;
16
17
  }) => import("preact").JSX.Element;
17
18
  export {};
@@ -1,6 +1,8 @@
1
1
  import { Signal } from '@preact/signals';
2
+ import { QXEvent } from 'qx-util';
2
3
  import { ChatMessage } from '../../entity';
3
- import { IChatMessage, IChatOptions, IChatSuggestion, IMaterial, ITopic } from '../../interface';
4
+ import { ITopic, IMaterial, IChatMessage, IChatOptions, IChatSuggestion } from '../../interface';
5
+
4
6
  /**
5
7
  * 聊天逻辑控制器
6
8
  *
@@ -11,6 +13,13 @@ import { IChatMessage, IChatOptions, IChatSuggestion, IMaterial, ITopic } from '
11
13
  */
12
14
  export declare class AiChatController {
13
15
  readonly opts: IChatOptions;
16
+ /**
17
+ * 事件触发器
18
+ * @type {EventBase}
19
+ */
20
+ evt: QXEvent<{
21
+ [p: string]: (...args: any[]) => any;
22
+ }>;
14
23
  /**
15
24
  * 聊天记录
16
25
  *
@@ -89,17 +98,6 @@ export declare class AiChatController {
89
98
  * @memberof AiChatController
90
99
  */
91
100
  chatSessionid: string;
92
- /**
93
- * 聊天窗触发提问回调
94
- *
95
- * @author tony001
96
- * @date 2025-02-24 14:02:51
97
- * @param {object} context
98
- * @param {object} params
99
- * @param {object} otherParams
100
- * @param {IChatMessage[]} question 提问历史内容(包含当前提问)
101
- * @return {*} {Promise<boolean>} 等待回答
102
-
103
101
  /**
104
102
  * Creates an instance of AiChatController.
105
103
  *
@@ -282,4 +280,11 @@ export declare class AiChatController {
282
280
  * @return {*} {Promise<void>}
283
281
  */
284
282
  handleSuggestionClick(message: IChatMessage, suggestion: IChatSuggestion, event: MouseEvent): Promise<void>;
283
+ /**
284
+ * 销毁
285
+ *
286
+ * @return {*} {Promise<void>}
287
+ * @memberof AiChatController
288
+ */
289
+ destroyed(): Promise<void>;
285
290
  }
@@ -1,6 +1,7 @@
1
1
  import { AiChatController } from '../ai-chat/ai-chat.controller';
2
2
  import { CommonHelper } from './common-helper';
3
3
  import { FileHelper } from './file-helper';
4
+
4
5
  export declare class AIMaterialFactory {
5
6
  static getMaterialHelper(type: string, aiChat: AiChatController): CommonHelper | FileHelper;
6
7
  }
@@ -1,5 +1,6 @@
1
1
  import { IChatToolbarItem } from '../../interface';
2
2
  import { MaterialHelper } from './material-helper';
3
+
3
4
  export declare class CommonHelper extends MaterialHelper {
4
5
  /**
5
6
  * 执行操作
@@ -1,5 +1,6 @@
1
1
  import { IChatToolbarItem, IMaterial } from '../../interface';
2
2
  import { MaterialHelper } from './material-helper';
3
+
3
4
  export declare class FileHelper extends MaterialHelper {
4
5
  /**
5
6
  * 执行操作
@@ -1,5 +1,6 @@
1
1
  import { IChatToolbarItem } from '../../interface';
2
2
  import { AiChatController } from '../ai-chat/ai-chat.controller';
3
+
3
4
  export declare abstract class MaterialHelper {
4
5
  protected aiChat: AiChatController;
5
6
  constructor(aiChat: AiChatController);
@@ -2,6 +2,7 @@ import { Signal } from '@preact/signals';
2
2
  import { ChatTopic } from '../../entity';
3
3
  import { ITopic, ITopicOptions } from '../../interface';
4
4
  import { ChatController } from '../chat/chat.controller';
5
+
5
6
  /**
6
7
  * ai话题控制器
7
8
  *
@@ -2,6 +2,7 @@ import { IContainerOptions } from '../../interface';
2
2
  import { AiTopicController } from '../ai-topic/ai-topic.controller';
3
3
  import { AiChatController } from '../ai-chat/ai-chat.controller';
4
4
  import { ChatTopic } from '../../entity';
5
+
5
6
  /**
6
7
  * 聊天器控制器
7
8
  *
@@ -1,4 +1,5 @@
1
1
  import { IMaterial } from '../../interface';
2
+
2
3
  export declare class ChatMaterial implements IMaterial {
3
4
  material: IMaterial;
4
5
  get id(): IMaterial['id'];
@@ -1,4 +1,5 @@
1
1
  import { ITopic } from '../../interface';
2
+
2
3
  /**
3
4
  * 话题实体
4
5
  *
@@ -1,4 +1,5 @@
1
1
  import { IChatMessage } from '../../interface';
2
+
2
3
  /**
3
4
  * 消息实体
4
5
  *
@@ -11,6 +12,13 @@ import { IChatMessage } from '../../interface';
11
12
  export declare class ChatMessage implements IChatMessage {
12
13
  protected msg: IChatMessage;
13
14
  toolcalls: IChatMessage['toolcalls'];
15
+ /**
16
+ * @description 消息的所有原始内容
17
+ * - 用于维护工具调用消息数据
18
+ * @type {string}
19
+ * @memberof ChatMessage
20
+ */
21
+ allcontent: string;
14
22
  get messageid(): IChatMessage['messageid'];
15
23
  get state(): IChatMessage['state'];
16
24
  get role(): IChatMessage['role'];
@@ -29,6 +37,12 @@ export declare class ChatMessage implements IChatMessage {
29
37
  * @param {IChatMessage} msg
30
38
  */
31
39
  update(msg: IChatMessage): void;
40
+ /**
41
+ * @description 替换消息
42
+ * @param {IChatMessage} msg
43
+ * @memberof ChatMessage
44
+ */
45
+ replace(msg: IChatMessage): void;
32
46
  /**
33
47
  * 更新消息完成状态
34
48
  *
@@ -1,4 +1,5 @@
1
1
  import { IChatSuggestion } from '../../interface';
2
+
2
3
  export declare class ChatSuggestion implements IChatSuggestion {
3
4
  suggestion: IChatSuggestion;
4
5
  get type(): IChatSuggestion['type'];
@@ -1,2 +1,3 @@
1
1
  import { PluginStaticResource } from './utils';
2
+
2
3
  export declare const resource: PluginStaticResource;
@@ -1,4 +1,4 @@
1
1
  export declare const MoreSvg: (props: {
2
- className?: string | undefined;
3
- onClick?: ((event: MouseEvent) => void) | undefined;
2
+ className?: string;
3
+ onClick?: (event: MouseEvent) => void;
4
4
  }) => import("preact").JSX.Element;
@@ -1,3 +1,4 @@
1
+
1
2
  export { ChatContainer } from './components';
2
3
  export { chat } from './controller';
3
4
  export type { IChatToolbarItem } from './interface';
@@ -1,6 +1,7 @@
1
1
  import { IChatSuggestion } from '../i-chat-suggestion/i-chat-suggestion';
2
2
  import { IChatToolCall } from '../i-chat-tool-call/i-chat-tool-call';
3
3
  import { IPortalAsyncAction } from '../i-portal-async-action/i-portal-async-action';
4
+
4
5
  /**
5
6
  * AI聊天消息
6
7
  *
@@ -3,6 +3,27 @@ import { IChatMessage } from '../i-chat-message/i-chat-message';
3
3
  import { IChatToolbarItem } from '../i-chat-toolbar-item/i-chat-toolbar-item';
4
4
  import { FileUploaderOptions } from '../i-file-uploader-options/i-file-uploader-options';
5
5
  import { ITopic } from '../i-topic-options/i-topic-options';
6
+
7
+ /**
8
+ * 自动关闭窗口,用于在提问完成时配置窗口关闭模式
9
+ *
10
+ * @export
11
+ * @interface IAutoClose
12
+ */
13
+ export interface IAutoClose {
14
+ /**
15
+ * @description 模式
16
+ * - minimize:最小化;close:直接关闭;closetime:定时关闭
17
+ * @type {('minimize' | 'closetime' | 'close')}
18
+ */
19
+ mode: 'minimize' | 'close' | 'closetime';
20
+ /**
21
+ * @description 自动关闭延时时间,该值单位为秒(s),当 mode 值为closetime时生效
22
+ * @default 3
23
+ * @type {number}
24
+ */
25
+ duration?: number;
26
+ }
6
27
  /**
7
28
  * 聊天数据
8
29
  *
@@ -43,6 +64,34 @@ export interface IChat {
43
64
  * @type {string}
44
65
  */
45
66
  appDataEntityId: string;
67
+ /**
68
+ * @description 自动提问
69
+ * - 历史数据最后一个项是user时是否自动提问,默认开启
70
+ * @type {boolean}
71
+ * @memberof IChat
72
+ */
73
+ autoQuestion?: boolean;
74
+ /**
75
+ * 自动关闭窗口,用于在提问完成时配置窗口关闭模式
76
+ *
77
+ * @type {IAutoClose}
78
+ * @memberof IChat
79
+ */
80
+ autoClose?: IAutoClose;
81
+ /**
82
+ * @description AI窗口的打开模式
83
+ * - default:默认;minimize:默认最小化窗口;autoexpand:默认最小化窗口,当提问完成时自动展开窗口
84
+ * @type {('default' | 'minimize' | 'autoexpand')}
85
+ * @memberof IChat
86
+ */
87
+ openMode?: 'default' | 'minimize' | 'autoexpand';
88
+ /**
89
+ * @description 是否自动回填
90
+ * - AI回答完成之后是否触发回填,默认关闭
91
+ * @type {boolean}
92
+ * @memberof IChat
93
+ */
94
+ autoFill?: boolean;
46
95
  /**
47
96
  * 传入对象参数(如果外部传入,在请求历史记录,需要附加当前参数)
48
97
  *
@@ -1,4 +1,5 @@
1
1
  import { VNode } from 'preact';
2
+
2
3
  /**
3
4
  * 聊天自定义工具栏项接口
4
5
  *
@@ -1,6 +1,7 @@
1
1
  import { IChatContainerOptions } from '../i-chat-container/i-chat-container';
2
2
  import { IChatOptions } from '../i-chat-options/i-chat-options';
3
3
  import { ITopicOptions } from '../i-topic-options/i-topic-options';
4
+
4
5
  /**
5
6
  * ai容器配置参数
6
7
  *
@@ -1,5 +1,6 @@
1
1
  import { IChat } from '../i-chat-options/i-chat-options';
2
2
  import { IConfigService } from '../i-config-service/i-config-service';
3
+
3
4
  /**
4
5
  * 话题数据
5
6
  *
@@ -1,5 +1,5 @@
1
1
  export type { IChatMessage } from './i-chat-message/i-chat-message';
2
- export type { IChat, IChatOptions } from './i-chat-options/i-chat-options';
2
+ export type { IChat, IChatOptions, IAutoClose, } from './i-chat-options/i-chat-options';
3
3
  export type { IMessageItemProvider } from './i-message-item-provider/i-message-item-provider';
4
4
  export type { IPortalAsyncAction } from './i-portal-async-action/i-portal-async-action';
5
5
  export type { IChatToolbarItem } from './i-chat-toolbar-item/i-chat-toolbar-item';
@@ -1,4 +1,5 @@
1
1
  import { IChatSuggestion } from '../../interface';
2
+
2
3
  /**
3
4
  * 聊天建议解析器
4
5
  *
@@ -1,4 +1,5 @@
1
1
  import { IChatToolCall } from '../../interface';
2
+
2
3
  /**
3
4
  * @description 工具调用解析器
4
5
  * @export
@@ -1,4 +1,5 @@
1
1
  import { FileUploaderOptions } from '../../interface';
2
+
2
3
  /**
3
4
  * 文件上传器
4
5
  *
@@ -1,4 +1,5 @@
1
1
  import { IMaterial } from '../../interface';
2
+
2
3
  /**
3
4
  * 素材资源解析器
4
5
  *
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@ibiz-template-plugin/ai-chat",
3
- "version": "0.0.30",
3
+ "version": "0.0.32",
4
4
  "description": "iBiz AI交互框插件",
5
+ "type": "module",
5
6
  "main": "dist/index.es.js",
6
7
  "module": "dist/index.es.js",
7
8
  "types": "dist/types/index.d.ts",
@@ -32,6 +33,7 @@
32
33
  "autosize": "^6.0.1",
33
34
  "cherry-markdown": "^0.8.26",
34
35
  "interactjs": "^1.10.19",
36
+ "qx-util": "^0.4.8",
35
37
  "path-browserify": "^1.0.1",
36
38
  "preact": "^10.18.1",
37
39
  "react-tabs": "^6.0.2",
@@ -76,7 +78,8 @@
76
78
  },
77
79
  "peerDependencies": {
78
80
  "cherry-markdown": "^0.8.26",
79
- "interactjs": "^1.10.19"
81
+ "interactjs": "^1.10.19",
82
+ "qx-util": "^0.4.8"
80
83
  },
81
84
  "lint-staged": {
82
85
  "*.ts": "eslint --fix",