@ibiz-template-plugin/ai-chat 0.0.82 → 0.0.84
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 +3069 -2778
- package/dist/index.legacy.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/flat-chat-container/flat-chat-container.d.ts +67 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/controller/ai-topic/ai-topic.controller.d.ts +3 -4
- package/dist/types/controller/chat/chat-base.controller.d.ts +151 -0
- package/dist/types/controller/chat/flat-chat.controller.d.ts +78 -0
- package/dist/types/controller/chat/modal-chat.controller.d.ts +77 -0
- package/dist/types/controller/index.d.ts +2 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/interface/i-chat-container/i-chat-container.d.ts +6 -0
- package/dist/types/interface/i-chat-controller/i-chat-controller.d.ts +30 -0
- package/dist/types/interface/index.d.ts +1 -0
- package/docs/ARCHITECTURE.md +399 -0
- package/package.json +2 -1
- package/dist/types/controller/chat/chat.controller.d.ts +0 -131
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { IContainerOptions, IResourceOptions } from '../../interface';
|
|
2
|
-
import { AiTopicController } from '../ai-topic/ai-topic.controller';
|
|
3
|
-
import { AiChatController } from '../ai-chat/ai-chat.controller';
|
|
4
|
-
import { ChatTopic } from '../../entity';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* 聊天器控制器
|
|
8
|
-
*
|
|
9
|
-
* @author chitanda
|
|
10
|
-
* @date 2023-10-13 17:10:47
|
|
11
|
-
* @export
|
|
12
|
-
* @class ChatController
|
|
13
|
-
*/
|
|
14
|
-
export declare class ChatController {
|
|
15
|
-
/**
|
|
16
|
-
* 聊天框容器
|
|
17
|
-
*
|
|
18
|
-
* @author chitanda
|
|
19
|
-
* @date 2023-10-13 17:10:03
|
|
20
|
-
* @protected
|
|
21
|
-
* @type {HTMLDivElement}
|
|
22
|
-
*/
|
|
23
|
-
protected container?: HTMLDivElement;
|
|
24
|
-
/**
|
|
25
|
-
* 默认模式(聊天框)和话题模式(支持多话题切换),聊天框为默认模式
|
|
26
|
-
*
|
|
27
|
-
* @author tony001
|
|
28
|
-
* @date 2025-02-20 16:02:50
|
|
29
|
-
* @protected
|
|
30
|
-
* @type {('DEFAULT' | 'TOPIC')}
|
|
31
|
-
*/
|
|
32
|
-
protected mode: 'DEFAULT' | 'TOPIC';
|
|
33
|
-
/**
|
|
34
|
-
* 资源配置数据
|
|
35
|
-
*/
|
|
36
|
-
resourceOptions: IResourceOptions | undefined;
|
|
37
|
-
/**
|
|
38
|
-
* 容器配置备份
|
|
39
|
-
*
|
|
40
|
-
* @author tony001
|
|
41
|
-
* @date 2025-02-24 11:02:49
|
|
42
|
-
* @protected
|
|
43
|
-
* @type {(IContainerOptions | undefined)}
|
|
44
|
-
*/
|
|
45
|
-
protected backupChatOptions: IContainerOptions | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* 话题控制器
|
|
48
|
-
*
|
|
49
|
-
* @author tony001
|
|
50
|
-
* @date 2025-02-23 16:02:56
|
|
51
|
-
* @public
|
|
52
|
-
* @type {AiTopicController}
|
|
53
|
-
*/
|
|
54
|
-
aiTopic: AiTopicController;
|
|
55
|
-
/**
|
|
56
|
-
* 聊天控制器
|
|
57
|
-
*
|
|
58
|
-
* @readonly
|
|
59
|
-
* @type {(AiChatController | undefined)}
|
|
60
|
-
* @memberof ChatController
|
|
61
|
-
*/
|
|
62
|
-
get aiChat(): AiChatController | undefined;
|
|
63
|
-
/**
|
|
64
|
-
* 话题map
|
|
65
|
-
*
|
|
66
|
-
* @private
|
|
67
|
-
* @type {Map<string, AiChatController>}
|
|
68
|
-
* @memberof ChatController
|
|
69
|
-
*/
|
|
70
|
-
private aiTopicMap;
|
|
71
|
-
/**
|
|
72
|
-
* Creates an instance of ChatController.
|
|
73
|
-
* @author tony001
|
|
74
|
-
* @date 2025-02-24 11:02:20
|
|
75
|
-
*/
|
|
76
|
-
constructor();
|
|
77
|
-
/**
|
|
78
|
-
* 初始化IndexDB
|
|
79
|
-
*
|
|
80
|
-
* @author tony001
|
|
81
|
-
* @date 2025-02-24 18:02:50
|
|
82
|
-
* @return {*} {Promise<void>}
|
|
83
|
-
*/
|
|
84
|
-
initIndexDB(): Promise<void>;
|
|
85
|
-
/**
|
|
86
|
-
* 创建聊天窗口(会同时显示出来)
|
|
87
|
-
*
|
|
88
|
-
* @author tony001
|
|
89
|
-
* @date 2025-02-24 12:02:58
|
|
90
|
-
* @param {IContainerOptions} opts
|
|
91
|
-
* @return {*} {Promise<AiChatController>}
|
|
92
|
-
*/
|
|
93
|
-
create(opts: IContainerOptions): Promise<AiChatController>;
|
|
94
|
-
/**
|
|
95
|
-
* 同步历史参数(历史激活标识、历史会话标识)
|
|
96
|
-
* @param topicOptions
|
|
97
|
-
* @param chatOptions
|
|
98
|
-
*/
|
|
99
|
-
protected syncHistoryOptions(topicOptions: Record<string, any>, chatOptions: Record<string, any>, resourceOptions: IResourceOptions): void;
|
|
100
|
-
/**
|
|
101
|
-
* 切换聊天控制器
|
|
102
|
-
*
|
|
103
|
-
* @author tony001
|
|
104
|
-
* @date 2025-02-24 11:02:24
|
|
105
|
-
* @param {ChatTopic} topic
|
|
106
|
-
*/
|
|
107
|
-
switchAiChatController(topic: ChatTopic): void;
|
|
108
|
-
/**
|
|
109
|
-
* 隐藏聊天窗口(必须先创建)
|
|
110
|
-
*
|
|
111
|
-
* @author chitanda
|
|
112
|
-
* @date 2023-10-13 17:10:55
|
|
113
|
-
*/
|
|
114
|
-
hidden(): void;
|
|
115
|
-
/**
|
|
116
|
-
* 显示聊天窗窗口(必须先创建)
|
|
117
|
-
*
|
|
118
|
-
* @author chitanda
|
|
119
|
-
* @date 2023-10-13 17:10:29
|
|
120
|
-
*/
|
|
121
|
-
show(): void;
|
|
122
|
-
/**
|
|
123
|
-
* 关闭聊天窗口
|
|
124
|
-
*
|
|
125
|
-
* @author chitanda
|
|
126
|
-
* @date 2023-10-13 17:10:10
|
|
127
|
-
*/
|
|
128
|
-
close(): void;
|
|
129
|
-
}
|
|
130
|
-
declare const chat: ChatController;
|
|
131
|
-
export { chat };
|