@ibiz-template-plugin/ai-chat 0.0.8 → 0.0.9

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 (61) hide show
  1. package/dist/index.es.js +1122 -947
  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/package.json +1 -1
  6. package/dist/types/app.d.ts +0 -1
  7. package/dist/types/components/chat-container/chat-container.d.ts +0 -185
  8. package/dist/types/components/chat-input/chat-input.d.ts +0 -12
  9. package/dist/types/components/chat-message-item/chat-message-item.d.ts +0 -30
  10. package/dist/types/components/chat-message-item/error-message/error-message.d.ts +0 -30
  11. package/dist/types/components/chat-message-item/markdown-message/markdown-message.d.ts +0 -30
  12. package/dist/types/components/chat-message-item/unknown-message/unknown-message.d.ts +0 -13
  13. package/dist/types/components/chat-message-item/user-message/user-message.d.ts +0 -23
  14. package/dist/types/components/chat-messages/chat-messages.d.ts +0 -20
  15. package/dist/types/components/chat-toolbar/chat-toolbar.d.ts +0 -41
  16. package/dist/types/components/chat-topic-item/chat-topic-item.d.ts +0 -9
  17. package/dist/types/components/chat-topics/chat-topics.d.ts +0 -12
  18. package/dist/types/components/index.d.ts +0 -1
  19. package/dist/types/components/popup/popup.d.ts +0 -15
  20. package/dist/types/constants/index.d.ts +0 -22
  21. package/dist/types/controller/ai-chat/ai-chat.controller.d.ts +0 -147
  22. package/dist/types/controller/ai-topic/ai-topic.controller.d.ts +0 -96
  23. package/dist/types/controller/chat/chat.controller.d.ts +0 -122
  24. package/dist/types/controller/index.d.ts +0 -3
  25. package/dist/types/entity/chart-topic/chart-topic.d.ts +0 -20
  26. package/dist/types/entity/chat-message/chat-message.d.ts +0 -28
  27. package/dist/types/entity/index.d.ts +0 -2
  28. package/dist/types/global.d.ts +0 -2
  29. package/dist/types/icons/ai-svg.d.ts +0 -1
  30. package/dist/types/icons/audio-svg.d.ts +0 -1
  31. package/dist/types/icons/close-full-screen-svg.d.ts +0 -1
  32. package/dist/types/icons/close-svg.d.ts +0 -1
  33. package/dist/types/icons/copy-svg.d.ts +0 -1
  34. package/dist/types/icons/delete-svg.d.ts +0 -1
  35. package/dist/types/icons/fill-svg.d.ts +0 -1
  36. package/dist/types/icons/full-screen-svg.d.ts +0 -1
  37. package/dist/types/icons/index.d.ts +0 -16
  38. package/dist/types/icons/link-svg.d.ts +0 -3
  39. package/dist/types/icons/minimize-svg.d.ts +0 -1
  40. package/dist/types/icons/more-svg.d.ts +0 -4
  41. package/dist/types/icons/new-dialogue.d.ts +0 -1
  42. package/dist/types/icons/recording-svg.d.ts +0 -1
  43. package/dist/types/icons/refresh-svg.d.ts +0 -1
  44. package/dist/types/icons/remove-svg.d.ts +0 -1
  45. package/dist/types/icons/send-svg.d.ts +0 -1
  46. package/dist/types/index.d.ts +0 -3
  47. package/dist/types/interface/i-chat-container/i-chat-container.d.ts +0 -58
  48. package/dist/types/interface/i-chat-message/i-chat-message.d.ts +0 -83
  49. package/dist/types/interface/i-chat-options/i-chat-options.d.ts +0 -139
  50. package/dist/types/interface/i-chat-toolbar-item/i-chat-toolbar-item.d.ts +0 -53
  51. package/dist/types/interface/i-config-service/i-config-service.d.ts +0 -27
  52. package/dist/types/interface/i-container-options/i-container-options.d.ts +0 -45
  53. package/dist/types/interface/i-message-item-provider/i-message-item-provider.d.ts +0 -18
  54. package/dist/types/interface/i-portal-async-action/i-portal-async-action.d.ts +0 -90
  55. package/dist/types/interface/i-topic-options/i-topic-options.d.ts +0 -102
  56. package/dist/types/interface/index.d.ts +0 -7
  57. package/dist/types/main.d.ts +0 -1
  58. package/dist/types/utils/index.d.ts +0 -4
  59. package/dist/types/utils/plugin-static-resource/plugin-static-resource.d.ts +0 -63
  60. package/dist/types/utils/util/indexdb-util.d.ts +0 -91
  61. package/dist/types/utils/util/util.d.ts +0 -29
@@ -1,185 +0,0 @@
1
- import { Component } from 'preact';
2
- import { Namespace } from '../../utils';
3
- import { AiChatController, AiTopicController } from '../../controller';
4
- import { IChatToolbarItem } from '../../interface';
5
- export interface ChatContainerProps {
6
- /**
7
- * 呈现模式
8
- *
9
- * @author tony001
10
- * @date 2025-02-23 16:02:00
11
- * @type {('DEFAULT' | 'TOPIC')}
12
- */
13
- mode: 'DEFAULT' | 'TOPIC';
14
- /**
15
- * ai话题控制器
16
- *
17
- * @author tony001
18
- * @date 2025-02-23 16:02:38
19
- * @type {AiTopicController}
20
- */
21
- aiTopic: AiTopicController;
22
- /**
23
- * 聊天控制器
24
- *
25
- * @author tony001
26
- * @date 2025-02-23 16:02:24
27
- * @type {AiChatController}
28
- */
29
- aiChat: AiChatController;
30
- /**
31
- * 关闭聊天窗口
32
- *
33
- * @author chitanda
34
- * @date 2023-10-15 19:10:35
35
- */
36
- close: () => void;
37
- /**
38
- * 全屏行为
39
- *
40
- * @memberof ChatContainerProps
41
- */
42
- fullscreen: (target: boolean) => void;
43
- /**
44
- * 最小化行为
45
- *
46
- * @memberof ChatContainerProps
47
- */
48
- minimize: (target: boolean) => void;
49
- /**
50
- * 标题
51
- *
52
- * @type {string}
53
- * @memberof ChatContainerProps
54
- */
55
- caption?: string;
56
- /**
57
- * 内容工具项
58
- *
59
- * @type {IChatToolbarItem[]}
60
- * @memberof ChatContainerProps
61
- */
62
- contentToolbarItems?: IChatToolbarItem[];
63
- /**
64
- * 底部工具项
65
- *
66
- * @type {IChatToolbarItem[]}
67
- * @memberof ChatContainerProps
68
- */
69
- footerToolbarItems?: IChatToolbarItem[];
70
- }
71
- interface ChatContainerState {
72
- /**
73
- * 全屏状态
74
- *
75
- * @author ljx
76
- * @date 2024-05-07 15:10:31
77
- */
78
- isFullScreen: boolean;
79
- /**
80
- * 最小化
81
- *
82
- * @type {boolean}
83
- * @memberof ChatContainerState
84
- */
85
- isMinimize: boolean;
86
- }
87
- /**
88
- * 聊天窗口容器,可拖拽,可缩放
89
- *
90
- * @author chitanda
91
- * @date 2023-10-13 17:10:37
92
- * @export
93
- * @class ChatContainer
94
- * @extends {Component<ChatContainerProps>}
95
- */
96
- export declare class ChatContainer extends Component<ChatContainerProps, ChatContainerState> {
97
- constructor(props: ChatContainerProps | undefined);
98
- ns: Namespace;
99
- containerRef: import("preact").RefObject<HTMLDivElement>;
100
- dragHandle: import("preact").RefObject<HTMLDivElement>;
101
- minimizeRef: import("preact").RefObject<HTMLDivElement>;
102
- data: {
103
- x: number;
104
- y: number;
105
- width: number;
106
- height: number;
107
- minWidth: number;
108
- minHeight: number;
109
- };
110
- minimizeData: {
111
- x: number;
112
- y: number;
113
- };
114
- /**
115
- * 是否禁止拖动
116
- * - 拖拽边时应禁止拖动
117
- * @type {boolean}
118
- * @memberof ChatContainer
119
- */
120
- disabled: boolean;
121
- /**
122
- * 最小化是否在拖拽中
123
- * - 在拖拽时不应触发点击事件
124
- * @type {boolean}
125
- * @memberof ChatContainer
126
- */
127
- isDragging: boolean;
128
- calcWindowStyle(): {
129
- left: string;
130
- top: string;
131
- height: string;
132
- width: string;
133
- 'z-index': string;
134
- };
135
- calcMinimizeStyle(): {
136
- left: string;
137
- top: string;
138
- 'z-index': string;
139
- };
140
- setStyle(): void;
141
- componentDidMount(): void;
142
- componentWillUnmount(): void;
143
- /**
144
- * 关闭聊天窗口
145
- *
146
- * @author chitanda
147
- * @date 2023-10-15 19:10:31
148
- */
149
- close(): void;
150
- /**
151
- * 全屏
152
- *
153
- * @author ljx
154
- * @date 2024-05-07 15:10:31
155
- */
156
- fullScreen(): void;
157
- /**
158
- * 关闭全屏
159
- *
160
- * @author ljx
161
- * @date 2024-05-07 15:10:31
162
- */
163
- closeFullScreen(): void;
164
- /**
165
- * 最小化
166
- *
167
- * @memberof ChatContainer
168
- */
169
- minimize(): void;
170
- /**
171
- * 退出最小化
172
- *
173
- * @memberof ChatContainer
174
- */
175
- exitMinimize(): void;
176
- /**
177
- * 阻止冒泡
178
- * - 防止点击头部行为时误触发拖动监听
179
- * @param {MouseEvent} evt
180
- * @memberof ChatContainer
181
- */
182
- stopPropagation(evt: MouseEvent): void;
183
- render(): import("preact").JSX.Element;
184
- }
185
- export {};
@@ -1,12 +0,0 @@
1
- import { AiChatController } from '../../controller';
2
- export interface ChatInputProps {
3
- /**
4
- * 单实例聊天总控
5
- *
6
- * @author chitanda
7
- * @date 2023-10-13 17:10:43
8
- * @type {AiChatController}
9
- */
10
- controller: AiChatController;
11
- }
12
- export declare const ChatInput: (props: ChatInputProps) => import("preact/compat").JSX.Element;
@@ -1,30 +0,0 @@
1
- import { VNode, h } from 'preact';
2
- import { IChatMessage } from '../../interface';
3
- import { AiChatController } from '../../controller';
4
- export interface ChatMessageItemProps {
5
- /**
6
- * 单实例聊天总控
7
- *
8
- * @author chitanda
9
- * @date 2023-10-13 17:10:43
10
- * @type {AiChatController}
11
- */
12
- controller: AiChatController;
13
- message: IChatMessage;
14
- /**
15
- * 内容大小,用于更新绘制
16
- *
17
- * @author chitanda
18
- * @date 2023-10-15 21:10:22
19
- * @type {number}
20
- */
21
- size: number;
22
- /**
23
- * 插槽
24
- *
25
- * @type {VNode}
26
- * @memberof ChatMessageItemProps
27
- */
28
- children: VNode;
29
- }
30
- export declare const ChatMessageItem: (props: ChatMessageItemProps) => h.JSX.Element;
@@ -1,30 +0,0 @@
1
- import { VNode } from 'preact';
2
- import { IChatMessage } from '../../../interface';
3
- import { AiChatController } from '../../../controller';
4
- export interface ErrorMessageProps {
5
- /**
6
- * 单实例聊天总控
7
- *
8
- * @author chitanda
9
- * @date 2023-10-13 17:10:43
10
- * @type {AiChatController}
11
- */
12
- controller: AiChatController;
13
- message: IChatMessage;
14
- /**
15
- * 内容大小,用于更新绘制
16
- *
17
- * @author chitanda
18
- * @date 2023-10-15 21:10:22
19
- * @type {number}
20
- */
21
- size: number;
22
- /**
23
- * 工具栏
24
- *
25
- * @type {VNode[]}
26
- * @memberof ErrorMessageProps
27
- */
28
- children: VNode;
29
- }
30
- export declare const ErrorMessage: (props: ErrorMessageProps) => import("preact").JSX.Element;
@@ -1,30 +0,0 @@
1
- import { VNode } from 'preact';
2
- import { IChatMessage } from '../../../interface';
3
- import { AiChatController } from '../../../controller';
4
- export interface MarkdownMessageProps {
5
- /**
6
- * 单实例聊天总控
7
- *
8
- * @author chitanda
9
- * @date 2023-10-13 17:10:43
10
- * @type {AiChatController}
11
- */
12
- controller: AiChatController;
13
- message: IChatMessage;
14
- /**
15
- * 内容大小,用于更新绘制
16
- *
17
- * @author chitanda
18
- * @date 2023-10-15 21:10:22
19
- * @type {number}
20
- */
21
- size: number;
22
- /**
23
- * 工具栏
24
- *
25
- * @type {VNode}
26
- * @memberof MarkdownMessageProps
27
- */
28
- children: VNode;
29
- }
30
- export declare const MarkdownMessage: (props: MarkdownMessageProps) => import("preact").JSX.Element;
@@ -1,13 +0,0 @@
1
- import { IChatMessage } from '../../../interface';
2
- export interface UnknownMessageProps {
3
- message: IChatMessage;
4
- /**
5
- * 内容大小,用于更新绘制
6
- *
7
- * @author chitanda
8
- * @date 2023-10-15 21:10:22
9
- * @type {number}
10
- */
11
- size: number;
12
- }
13
- export declare const UnknownMessage: (props: UnknownMessageProps) => import("preact").JSX.Element;
@@ -1,23 +0,0 @@
1
- import { VNode } from 'preact';
2
- import { IChatMessage } from '../../../interface';
3
- import { AiChatController } from '../../../controller';
4
- export interface UserMessageProps {
5
- controller: AiChatController;
6
- message: IChatMessage;
7
- /**
8
- * 内容大小,用于更新绘制
9
- *
10
- * @author chitanda
11
- * @date 2023-10-15 21:10:22
12
- * @type {number}
13
- */
14
- size: number;
15
- /**
16
- * 工具栏
17
- *
18
- * @type {VNode}
19
- * @memberof UserMessageProps
20
- */
21
- children: VNode;
22
- }
23
- export declare const UserMessage: (props: UserMessageProps) => import("preact").JSX.Element;
@@ -1,20 +0,0 @@
1
- import { AiChatController } from '../../controller';
2
- import { IChatToolbarItem } from '../../interface';
3
- export interface ChatMessageProps {
4
- /**
5
- * 单实例聊天总控
6
- *
7
- * @author chitanda
8
- * @date 2023-10-13 17:10:43
9
- * @type {AiChatController}
10
- */
11
- controller: AiChatController;
12
- /**
13
- * 工具项集合
14
- *
15
- * @type {IChatToolbarItem[]}
16
- * @memberof ChatMessageProps
17
- */
18
- toolbarItems?: IChatToolbarItem[];
19
- }
20
- export declare const ChatMessages: (props: ChatMessageProps) => import("preact").JSX.Element;
@@ -1,41 +0,0 @@
1
- import { h } from 'preact';
2
- import { IChatToolbarItem } from '../../interface';
3
- import { AiChatController } from '../../controller';
4
- export interface ChatToolbarProps {
5
- /**
6
- * 单实例聊天总控
7
- *
8
- * @type {AiChatController}
9
- * @memberof ChatToolbarProps
10
- */
11
- controller: AiChatController;
12
- /**
13
- * 用户自定义工具项集合
14
- *
15
- * @type {IChatToolbarItem}
16
- * @memberof ChatToolbarProps
17
- */
18
- items?: IChatToolbarItem[];
19
- /**
20
- * 业务数据
21
- *
22
- * @type {*}
23
- * @memberof ChatToolbarProps
24
- */
25
- data: any;
26
- /**
27
- * 工具栏类型
28
- *
29
- * @type {('content' | 'footer')}
30
- * @memberof ChatToolbarProps
31
- */
32
- type: 'content' | 'footer';
33
- /**
34
- * 类名
35
- *
36
- * @type {string}
37
- * @memberof ChatToolbarProps
38
- */
39
- className?: string;
40
- }
41
- export declare const ChatToolbar: (props: ChatToolbarProps) => h.JSX.Element;
@@ -1,9 +0,0 @@
1
- import { ChatTopic } from '../../entity';
2
- export interface ChatTopicItemProps {
3
- current: boolean;
4
- active: boolean;
5
- topic: ChatTopic;
6
- onClick: () => void;
7
- onAction: (action: string, event: MouseEvent) => void;
8
- }
9
- export declare const ChatTopicItem: (props: ChatTopicItemProps) => import("preact").JSX.Element;
@@ -1,12 +0,0 @@
1
- import { AiTopicController } from '../../controller';
2
- export interface ChatTopicProps {
3
- /**
4
- * 话题控制器
5
- *
6
- * @author tony001
7
- * @date 2025-02-20 17:02:49
8
- * @type {AiTopicController}
9
- */
10
- controller: AiTopicController;
11
- }
12
- export declare const ChatTopics: (props: ChatTopicProps) => import("preact").JSX.Element;
@@ -1 +0,0 @@
1
- export { ChatContainer } from './chat-container/chat-container';
@@ -1,15 +0,0 @@
1
- type Position = 'top' | 'bottom' | 'left' | 'right';
2
- interface ActionItem {
3
- id: string;
4
- caption: string;
5
- icon?: string;
6
- }
7
- export declare const Popup: ({ children, actions, position, isOpen: isOpenProp, onToggleOpen, onAction, }: {
8
- children: import('preact').ComponentChildren;
9
- actions?: ActionItem[] | undefined;
10
- position?: Position | undefined;
11
- isOpen?: boolean | undefined;
12
- onToggleOpen?: ((isOpen: boolean) => void) | undefined;
13
- onAction?: ((actionId: string, event: MouseEvent) => void) | undefined;
14
- }) => import("preact").JSX.Element;
15
- export {};
@@ -1,22 +0,0 @@
1
- export declare enum AIChatConst {
2
- /**
3
- * 聊天窗口样式缓存
4
- */
5
- STYLE_CACHE = "ai-chat-style-cache",
6
- /**
7
- * 最小化样式缓存
8
- */
9
- MINIMIZE_STYLY_CHCHE = "ai-chat-minimize-style-cache",
10
- /**
11
- * 数据库名称
12
- */
13
- DATA_BASE_NAME = "ibiz-chat",
14
- /**
15
- * 数据表名称
16
- */
17
- DATA_TABLE_NAME = "history-message",
18
- /**
19
- * 数据表主键
20
- */
21
- DATA_TABLE_KEY_NAME = "id"
22
- }
@@ -1,147 +0,0 @@
1
- import { Signal } from '@preact/signals';
2
- import { ChatMessage } from '../../entity';
3
- import { IChatMessage, IChatOptions } from '../../interface';
4
- /**
5
- * 聊天逻辑控制器
6
- *
7
- * @author chitanda
8
- * @date 2023-10-09 15:10:51
9
- * @export
10
- * @class AiChatController
11
- */
12
- export declare class AiChatController {
13
- readonly opts: IChatOptions;
14
- /**
15
- * 聊天记录
16
- *
17
- * @author chitanda
18
- * @date 2023-10-16 16:10:29
19
- * @type {Signal<ChatMessage[]>}
20
- */
21
- readonly messages: Signal<ChatMessage[]>;
22
- /**
23
- * 聊天框输入值
24
- *
25
- * @author chitanda
26
- * @date 2023-10-16 15:10:43
27
- * @type {Signal<string>}
28
- */
29
- readonly input: Signal<string>;
30
- /**
31
- * 视图参数
32
- *
33
- * @author tony001
34
- * @date 2025-02-24 14:02:23
35
- * @type {object}
36
- */
37
- readonly context: object;
38
- /**
39
- * 视图参数
40
- *
41
- * @author tony001
42
- * @date 2025-02-24 14:02:32
43
- * @type {object}
44
- */
45
- readonly params: object;
46
- /**
47
- * 应用实体标记
48
- *
49
- * @author tony001
50
- * @date 2025-02-24 14:02:10
51
- * @type {string}
52
- */
53
- readonly appDataEntityId: string;
54
- /**
55
- * 话题标识
56
- *
57
- * @author tony001
58
- * @date 2025-02-24 18:02:02
59
- * @type {(string | undefined)}
60
- */
61
- readonly topicId: string | undefined;
62
- /**
63
- * Creates an instance of AiChatController.
64
- *
65
- * @author chitanda
66
- * @date 2023-10-15 19:10:34
67
- * @param {IChatOptions} opts 聊天配置
68
- */
69
- constructor(opts: IChatOptions);
70
- /**
71
- * 获取历史记录
72
- *
73
- * @author tony001
74
- * @date 2025-02-24 13:02:52
75
- * @return {*} {Promise<boolean>}
76
- */
77
- fecthHistory(): Promise<boolean>;
78
- /**
79
- * 更新数据到indexdb
80
- *
81
- * @author tony001
82
- * @date 2025-02-24 18:02:41
83
- * @return {*} {Promise<void>}
84
- */
85
- asyncToIndexDB(action: 'ADD' | 'UPDATE'): Promise<void>;
86
- /**
87
- * 设置聊天框值
88
- *
89
- * @author chitanda
90
- * @date 2023-10-16 16:10:21
91
- * @param {string} input
92
- */
93
- setInput(input: string): void;
94
- /**
95
- * 新增聊天记录
96
- *
97
- * @author chitanda
98
- * @date 2023-10-09 15:10:15
99
- * @param {IMessage} data
100
- */
101
- addMessage(data: IChatMessage): void;
102
- /**
103
- * 替换已经存在的聊天消息
104
- *
105
- * @author chitanda
106
- * @date 2023-10-16 22:10:49
107
- * @param {IChatMessage} data
108
- */
109
- replaceMessage(data: IChatMessage): void;
110
- /**
111
- * 提问
112
- *
113
- * @author chitanda
114
- * @date 2023-10-09 20:10:43
115
- * @return {*} {Promise<void>}
116
- */
117
- question(input: string): Promise<void>;
118
- /**
119
- * 回填选中的消息
120
- *
121
- * @author chitanda
122
- * @date 2023-10-16 18:10:19
123
- * @param {IChatMessage} message
124
- */
125
- backfill(message: IChatMessage): void;
126
- /**
127
- *
128
- * 删除指定消息,如果是用户提问的刷新调用的删除,则需要删除从问题开始到最后的所有记录
129
- * @param {IChatMessage} message
130
- * @param {boolean} [isuser=false]
131
- * @memberof AiChatController
132
- */
133
- deleteMessage(message: IChatMessage): void;
134
- /**
135
- * 刷新当前消息
136
- *
137
- * @memberof AiChatController
138
- */
139
- refreshMessage(message: IChatMessage, isuser?: boolean): Promise<void>;
140
- /**
141
- * 复制消息
142
- *
143
- * @param {IChatMessage} message
144
- * @memberof AiChatController
145
- */
146
- copyMessage(message: IChatMessage): void;
147
- }
@@ -1,96 +0,0 @@
1
- import { Signal } from '@preact/signals';
2
- import { ChatTopic } from '../../entity';
3
- import { ITopic, ITopicOptions } from '../../interface';
4
- import { ChatController } from '../chat/chat.controller';
5
- /**
6
- * ai话题控制器
7
- *
8
- * @author tony001
9
- * @date 2025-02-20 16:02:01
10
- * @export
11
- * @class AiTopicController
12
- */
13
- export declare class AiTopicController {
14
- private chat;
15
- /**
16
- * 话题清单
17
- *
18
- * @author tony001
19
- * @date 2025-02-20 16:02:38
20
- * @type {Signal<ChatTopic[]>}
21
- */
22
- readonly topics: Signal<ChatTopic[]>;
23
- /**
24
- * 激活话题
25
- *
26
- * @author tony001
27
- * @date 2025-02-24 16:02:44
28
- * @type {(Signal<ITopic | null>)}
29
- */
30
- readonly activedTopic: Signal<ITopic | null>;
31
- /**
32
- * 当前话题配置备份
33
- *
34
- * @author tony001
35
- * @date 2025-02-24 16:02:28
36
- * @public
37
- * @type {(ITopicOptions | undefined)}
38
- */
39
- currentTopicOptions: ITopicOptions | undefined;
40
- /**
41
- * Creates an instance of AiTopicController.
42
- * @author tony001
43
- * @date 2025-02-24 11:02:26
44
- * @param {ChatController} chat
45
- */
46
- constructor(chat: ChatController);
47
- /**
48
- * 获取历史话题
49
- *
50
- * @author tony001
51
- * @date 2025-02-23 16:02:37
52
- * @return {*} {Promise<void>}
53
- */
54
- fetchHistory(options: ITopicOptions): Promise<void>;
55
- /**
56
- * 更新当前话题
57
- *
58
- * @author tony001
59
- * @date 2025-02-23 17:02:43
60
- * @param {ITopicOptions} options
61
- * @return {*} {Promise<void>}
62
- */
63
- updateCurrentTopic(options: ITopicOptions): Promise<void>;
64
- /**
65
- * 删除话题
66
- *
67
- * @author tony001
68
- * @date 2025-02-24 16:02:03
69
- * @param {ITopicOptions} options
70
- * @param {object} context
71
- * @param {object} params
72
- * @param {ITopic} data
73
- * @param {MouseEvent} event
74
- * @return {*} {Promise<void>}
75
- */
76
- removeTopic(options: ITopicOptions, context: object, params: object, data: ITopic, event: MouseEvent): Promise<void>;
77
- /**
78
- * 处理选中变化
79
- *
80
- * @author tony001
81
- * @date 2025-02-20 19:02:27
82
- * @param {ChatTopic} item
83
- */
84
- handleTopicChange(item: ChatTopic): void;
85
- /**
86
- * 处理话题行为
87
- *
88
- * @author tony001
89
- * @date 2025-02-24 16:02:58
90
- * @param {string} action
91
- * @param {ChatTopic} topic
92
- * @param {MouseEvent} event
93
- * @return {*} {Promise<void>}
94
- */
95
- handleTopicAction(action: string, topic: ChatTopic, event: MouseEvent): Promise<void>;
96
- }