@ibiz-template-plugin/ibiz-mob-ai-chat 0.0.1
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/LICENSE +21 -0
- package/README.md +80 -0
- package/dist/assets/gif/halo.gif +0 -0
- package/dist/assets/svg/AIChat.svg +1 -0
- package/dist/index.es.js +4425 -0
- package/dist/index.legacy.js +1 -0
- package/dist/polyfills.legacy.js +1 -0
- package/dist/style.css +1 -0
- package/dist/types/components/back-bottom/back-bottom.d.ts +57 -0
- package/dist/types/components/chart-material/chart-material-item/chart-material-item.d.ts +36 -0
- package/dist/types/components/chart-material/chart-material.d.ts +32 -0
- package/dist/types/components/chart-suggestion/chart-suggestion.d.ts +22 -0
- package/dist/types/components/chart-thought-chain/chart-thought-chain.d.ts +21 -0
- package/dist/types/components/chart-tool-call/chart-tool-call-item/chart-tool-call-item.d.ts +21 -0
- package/dist/types/components/chart-tool-call/chart-tool-call.d.ts +21 -0
- package/dist/types/components/chat-container/chat-container.d.ts +91 -0
- package/dist/types/components/chat-input/chat-input.d.ts +37 -0
- package/dist/types/components/chat-messages/chat-message-hook.d.ts +14 -0
- package/dist/types/components/chat-messages/chat-messages.d.ts +45 -0
- package/dist/types/components/chat-messages/common/error-message/error-message.d.ts +17 -0
- package/dist/types/components/chat-messages/common/index.d.ts +4 -0
- package/dist/types/components/chat-messages/common/markdown-message/markdown-message.d.ts +27 -0
- package/dist/types/components/chat-messages/common/unknown-message/unknown-message.d.ts +17 -0
- package/dist/types/components/chat-messages/common/user-message/user-message.d.ts +33 -0
- package/dist/types/components/chat-toolbar/chat-input-toolbar/chat-input-toolbar.d.ts +36 -0
- package/dist/types/components/chat-toolbar/chat-message-toolbar/chat-message-toolbar.d.ts +77 -0
- package/dist/types/components/chat-toolbar/chat-toolbar-hook.d.ts +14 -0
- package/dist/types/components/chat-toolbar/chat-toolbar-item/chat-toolbar-item.d.ts +44 -0
- package/dist/types/components/chat-toolbar/index.d.ts +3 -0
- package/dist/types/components/custom-modal/custom-modal.d.ts +10 -0
- package/dist/types/components/index.d.ts +3 -0
- package/dist/types/constants/index.d.ts +14 -0
- package/dist/types/controller/ai-chat/ai-chat.controller.d.ts +372 -0
- package/dist/types/controller/ai-material/ai-material-factory.d.ts +7 -0
- package/dist/types/controller/ai-material/common-helper.d.ts +13 -0
- package/dist/types/controller/ai-material/file-helper.d.ts +22 -0
- package/dist/types/controller/ai-material/material-helper.d.ts +16 -0
- package/dist/types/controller/ai-topic/ai-topic.controller.d.ts +165 -0
- package/dist/types/controller/chat/chat.controller.d.ts +138 -0
- package/dist/types/controller/index.d.ts +4 -0
- package/dist/types/entity/ai-agent/ai-agent.d.ts +12 -0
- package/dist/types/entity/chart-material/chart-material.d.ts +10 -0
- package/dist/types/entity/chart-topic/chart-topic.d.ts +28 -0
- package/dist/types/entity/chat-message/chat-message.d.ts +64 -0
- package/dist/types/entity/chat-suggestion/chat-suggestion.d.ts +9 -0
- package/dist/types/entity/index.d.ts +5 -0
- package/dist/types/global.d.ts +3 -0
- package/dist/types/icon/index.d.ts +1 -0
- package/dist/types/icon/svg.d.ts +101 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/interface/i-ai-agent/i-ai-agent.d.ts +21 -0
- package/dist/types/interface/i-chat-container/i-chat-container.d.ts +107 -0
- package/dist/types/interface/i-chat-message/i-chat-message.d.ts +150 -0
- package/dist/types/interface/i-chat-options/i-chat-options.d.ts +263 -0
- package/dist/types/interface/i-chat-suggestion/i-chat-suggestion.d.ts +26 -0
- package/dist/types/interface/i-chat-tool-call/i-chat-tool-call.d.ts +39 -0
- package/dist/types/interface/i-chat-toolbar-item/i-chat-toolbar-item.d.ts +75 -0
- package/dist/types/interface/i-config-service/i-config-service.d.ts +27 -0
- package/dist/types/interface/i-container-options/i-container-options.d.ts +51 -0
- package/dist/types/interface/i-file-uploader-options/i-file-uploader-options.d.ts +27 -0
- package/dist/types/interface/i-material/i-material.d.ts +34 -0
- package/dist/types/interface/i-message-item-provider/i-message-item-provider.d.ts +18 -0
- package/dist/types/interface/i-portal-async-action/i-portal-async-action.d.ts +90 -0
- package/dist/types/interface/i-remote-resource/i-remote-resource.d.ts +68 -0
- package/dist/types/interface/i-resource-options/i-resource-options.d.ts +61 -0
- package/dist/types/interface/i-topic-options/i-topic-options.d.ts +147 -0
- package/dist/types/interface/index.d.ts +15 -0
- package/dist/types/utils/index.d.ts +10 -0
- package/dist/types/utils/plugin-static-resource/plugin-static-resource.d.ts +63 -0
- package/dist/types/utils/util/chat-suggestion-parser.d.ts +67 -0
- package/dist/types/utils/util/chat-tool-call-parser.d.ts +17 -0
- package/dist/types/utils/util/drag-util.d.ts +28 -0
- package/dist/types/utils/util/file-uploader.d.ts +37 -0
- package/dist/types/utils/util/indexdb-util.d.ts +91 -0
- package/dist/types/utils/util/material-resource-parser.d.ts +67 -0
- package/dist/types/utils/util/remote-resource-util.d.ts +26 -0
- package/dist/types/utils/util/text-hash-util.d.ts +8 -0
- package/dist/types/utils/util/util.d.ts +50 -0
- package/package.json +89 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Namespace } from '../../utils';
|
|
2
|
+
|
|
3
|
+
export declare const BackBottom: import('vue').DefineComponent<{
|
|
4
|
+
target: {
|
|
5
|
+
type: (StringConstructor | {
|
|
6
|
+
new (): HTMLElement;
|
|
7
|
+
prototype: HTMLElement;
|
|
8
|
+
})[];
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
right: {
|
|
12
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
bottom: {
|
|
16
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
offset: {
|
|
20
|
+
type: NumberConstructor;
|
|
21
|
+
default: number;
|
|
22
|
+
};
|
|
23
|
+
}, {
|
|
24
|
+
ns: Namespace;
|
|
25
|
+
btnRef: import('vue').Ref<HTMLElement | undefined>;
|
|
26
|
+
isShow: import('vue').Ref<boolean>;
|
|
27
|
+
buttonStyle: import('vue').ComputedRef<{
|
|
28
|
+
right: string | number;
|
|
29
|
+
bottom: string | number;
|
|
30
|
+
}>;
|
|
31
|
+
scrollToBottom: () => void;
|
|
32
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
33
|
+
target: {
|
|
34
|
+
type: (StringConstructor | {
|
|
35
|
+
new (): HTMLElement;
|
|
36
|
+
prototype: HTMLElement;
|
|
37
|
+
})[];
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
right: {
|
|
41
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
bottom: {
|
|
45
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
offset: {
|
|
49
|
+
type: NumberConstructor;
|
|
50
|
+
default: number;
|
|
51
|
+
};
|
|
52
|
+
}>>, {
|
|
53
|
+
bottom: string | number;
|
|
54
|
+
right: string | number;
|
|
55
|
+
target: string | HTMLElement;
|
|
56
|
+
offset: number;
|
|
57
|
+
}, {}>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Namespace } from '../../../utils';
|
|
3
|
+
import { IMaterial } from '../../../interface';
|
|
4
|
+
|
|
5
|
+
export declare const ChartMaterialItem: import('vue').DefineComponent<{
|
|
6
|
+
material: {
|
|
7
|
+
type: PropType<IMaterial>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
readonly: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
}, {
|
|
15
|
+
ns: Namespace;
|
|
16
|
+
state: import('vue').ComputedRef<{
|
|
17
|
+
color: string;
|
|
18
|
+
label: string;
|
|
19
|
+
}>;
|
|
20
|
+
onRemove: () => void;
|
|
21
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
22
|
+
remove: () => true;
|
|
23
|
+
}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
24
|
+
material: {
|
|
25
|
+
type: PropType<IMaterial>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
readonly: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
}>> & {
|
|
33
|
+
onRemove?: (() => any) | undefined;
|
|
34
|
+
}, {
|
|
35
|
+
readonly: boolean;
|
|
36
|
+
}, {}>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Namespace } from '../../utils';
|
|
3
|
+
import { IMaterial } from '../../interface';
|
|
4
|
+
|
|
5
|
+
export declare const ChartMaterial: import('vue').DefineComponent<{
|
|
6
|
+
materials: {
|
|
7
|
+
type: PropType<IMaterial[]>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
readonly: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
}, {
|
|
15
|
+
ns: Namespace;
|
|
16
|
+
onRemove: (material: IMaterial) => void;
|
|
17
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
+
remove: (_material: IMaterial) => true;
|
|
19
|
+
}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
20
|
+
materials: {
|
|
21
|
+
type: PropType<IMaterial[]>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
readonly: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
}>> & {
|
|
29
|
+
onRemove?: ((_material: IMaterial) => any) | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
readonly: boolean;
|
|
32
|
+
}, {}>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IChatSuggestion } from '../../interface';
|
|
3
|
+
import { Namespace } from '../../utils';
|
|
4
|
+
|
|
5
|
+
export declare const ChartSuggestion: import('vue').DefineComponent<{
|
|
6
|
+
suggestions: {
|
|
7
|
+
type: PropType<IChatSuggestion[]>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
ns: Namespace;
|
|
12
|
+
onItemClick: (suggestion: IChatSuggestion, evt: MouseEvent) => void;
|
|
13
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
itemClick: (_suggestion: IChatSuggestion, _evt: MouseEvent) => true;
|
|
15
|
+
}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
16
|
+
suggestions: {
|
|
17
|
+
type: PropType<IChatSuggestion[]>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
}>> & {
|
|
21
|
+
onItemClick?: ((_suggestion: IChatSuggestion, _evt: MouseEvent) => any) | undefined;
|
|
22
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Namespace } from '../../utils';
|
|
3
|
+
import { IChatMessage } from '../../interface';
|
|
4
|
+
|
|
5
|
+
export declare const ChatThoughtChain: import('vue').DefineComponent<{
|
|
6
|
+
message: {
|
|
7
|
+
type: PropType<IChatMessage>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
ns: Namespace;
|
|
12
|
+
think: import('vue').ComputedRef<string | undefined>;
|
|
13
|
+
isLoading: import('vue').ComputedRef<boolean>;
|
|
14
|
+
isCollapse: import('vue').Ref<boolean>;
|
|
15
|
+
onCollapseChange: () => void;
|
|
16
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
17
|
+
message: {
|
|
18
|
+
type: PropType<IChatMessage>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
}>>, {}, {}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Namespace } from '../../../utils';
|
|
3
|
+
import { IChatToolCall } from '../../../interface';
|
|
4
|
+
|
|
5
|
+
export declare const AIToolCallItem: import('vue').DefineComponent<{
|
|
6
|
+
toolCall: {
|
|
7
|
+
type: PropType<IChatToolCall>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
ns: Namespace;
|
|
12
|
+
lines: import('vue').Ref<string[]>;
|
|
13
|
+
isExpanded: import('vue').Ref<boolean>;
|
|
14
|
+
onCopy: (event: MouseEvent) => void;
|
|
15
|
+
handleExpandChange: () => void;
|
|
16
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
17
|
+
toolCall: {
|
|
18
|
+
type: PropType<IChatToolCall>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
}>>, {}, {}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IChatToolCall } from '../../interface';
|
|
3
|
+
import { Namespace } from '../../utils';
|
|
4
|
+
|
|
5
|
+
export declare const ChartToolCall: import('vue').DefineComponent<{
|
|
6
|
+
toolCalls: {
|
|
7
|
+
type: PropType<IChatToolCall[]>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
ns: Namespace;
|
|
12
|
+
items: import('vue').ComputedRef<IChatToolCall[]>;
|
|
13
|
+
showToggle: import('vue').ComputedRef<boolean>;
|
|
14
|
+
isExpanded: import('vue').Ref<boolean>;
|
|
15
|
+
handleToggle: () => void;
|
|
16
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
17
|
+
toolCalls: {
|
|
18
|
+
type: PropType<IChatToolCall[]>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
}>>, {}, {}>;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Namespace } from '../../utils';
|
|
3
|
+
import { IAutoClose, IChatToolbarItem, IChatContainerOptions } from '../../interface';
|
|
4
|
+
import { AIChatController, AITopicController } from '../../controller';
|
|
5
|
+
|
|
6
|
+
export declare const ChatContainer: import('vue').DefineComponent<{
|
|
7
|
+
enableBackFill: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
aiTopic: {
|
|
12
|
+
type: PropType<AITopicController>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
aiChat: {
|
|
16
|
+
type: PropType<AIChatController>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
openMode: {
|
|
20
|
+
type: PropType<"default" | "top" | "bottom">;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
caption: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
contentToolbarItems: {
|
|
28
|
+
type: PropType<IChatToolbarItem[]>;
|
|
29
|
+
};
|
|
30
|
+
footerToolbarItems: {
|
|
31
|
+
type: PropType<IChatToolbarItem[]>;
|
|
32
|
+
};
|
|
33
|
+
questionToolbarItems: {
|
|
34
|
+
type: PropType<IChatToolbarItem[]>;
|
|
35
|
+
};
|
|
36
|
+
containerOptions: {
|
|
37
|
+
type: PropType<IChatContainerOptions>;
|
|
38
|
+
};
|
|
39
|
+
autoClose: {
|
|
40
|
+
type: PropType<IAutoClose>;
|
|
41
|
+
};
|
|
42
|
+
}, {
|
|
43
|
+
ns: Namespace;
|
|
44
|
+
zIndex: number;
|
|
45
|
+
onClose: () => void;
|
|
46
|
+
onClickOverlay: () => void;
|
|
47
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
48
|
+
close: () => true;
|
|
49
|
+
}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
50
|
+
enableBackFill: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: boolean;
|
|
53
|
+
};
|
|
54
|
+
aiTopic: {
|
|
55
|
+
type: PropType<AITopicController>;
|
|
56
|
+
required: true;
|
|
57
|
+
};
|
|
58
|
+
aiChat: {
|
|
59
|
+
type: PropType<AIChatController>;
|
|
60
|
+
required: true;
|
|
61
|
+
};
|
|
62
|
+
openMode: {
|
|
63
|
+
type: PropType<"default" | "top" | "bottom">;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
caption: {
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
default: string;
|
|
69
|
+
};
|
|
70
|
+
contentToolbarItems: {
|
|
71
|
+
type: PropType<IChatToolbarItem[]>;
|
|
72
|
+
};
|
|
73
|
+
footerToolbarItems: {
|
|
74
|
+
type: PropType<IChatToolbarItem[]>;
|
|
75
|
+
};
|
|
76
|
+
questionToolbarItems: {
|
|
77
|
+
type: PropType<IChatToolbarItem[]>;
|
|
78
|
+
};
|
|
79
|
+
containerOptions: {
|
|
80
|
+
type: PropType<IChatContainerOptions>;
|
|
81
|
+
};
|
|
82
|
+
autoClose: {
|
|
83
|
+
type: PropType<IAutoClose>;
|
|
84
|
+
};
|
|
85
|
+
}>> & {
|
|
86
|
+
onClose?: (() => any) | undefined;
|
|
87
|
+
}, {
|
|
88
|
+
caption: string;
|
|
89
|
+
enableBackFill: boolean;
|
|
90
|
+
openMode: "default" | "top" | "bottom";
|
|
91
|
+
}, {}>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Namespace } from '../../utils';
|
|
3
|
+
import { IChatToolbarItem, IMaterial } from '../../interface';
|
|
4
|
+
import { AIChatController } from '../../controller';
|
|
5
|
+
|
|
6
|
+
export declare const ChatInput: import('vue').DefineComponent<{
|
|
7
|
+
controller: {
|
|
8
|
+
type: PropType<AIChatController>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
toolbarItems: {
|
|
12
|
+
type: PropType<IChatToolbarItem[]>;
|
|
13
|
+
};
|
|
14
|
+
}, {
|
|
15
|
+
ns: Namespace;
|
|
16
|
+
message: import('vue').Ref<string>;
|
|
17
|
+
isLoading: import('vue').ComputedRef<boolean>;
|
|
18
|
+
recording: import('vue').Ref<boolean>;
|
|
19
|
+
imageList: import('vue').Ref<{
|
|
20
|
+
name: string;
|
|
21
|
+
url: string;
|
|
22
|
+
isImage: boolean;
|
|
23
|
+
}[]>;
|
|
24
|
+
uploadImage: () => Promise<void>;
|
|
25
|
+
onSendMessage: () => Promise<void>;
|
|
26
|
+
uploadMaterial: (event: MouseEvent) => Promise<void>;
|
|
27
|
+
onRemoveMaterial: (material: IMaterial) => void;
|
|
28
|
+
onSpeechRecognition: () => void;
|
|
29
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
30
|
+
controller: {
|
|
31
|
+
type: PropType<AIChatController>;
|
|
32
|
+
required: true;
|
|
33
|
+
};
|
|
34
|
+
toolbarItems: {
|
|
35
|
+
type: PropType<IChatToolbarItem[]>;
|
|
36
|
+
};
|
|
37
|
+
}>>, {}, {}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { ChatMessage } from '../../entity';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description 消息工具栏
|
|
6
|
+
* @param {*}
|
|
7
|
+
* @return {*}
|
|
8
|
+
*/
|
|
9
|
+
export declare function useMessageToolbar(model: Ref<any>): {
|
|
10
|
+
message: Ref<ChatMessage | undefined>;
|
|
11
|
+
handleTouchStart: (event: MouseEvent | TouchEvent, message: ChatMessage) => void;
|
|
12
|
+
handleTouchEnd: () => void;
|
|
13
|
+
closeToolbar: () => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Namespace } from '../../utils';
|
|
3
|
+
import { AIChatController } from '../../controller';
|
|
4
|
+
import { IChatToolbarItem } from '../../interface';
|
|
5
|
+
import { ChatMessage } from '../../entity';
|
|
6
|
+
|
|
7
|
+
export declare const ChatMessages: import('vue').DefineComponent<{
|
|
8
|
+
controller: {
|
|
9
|
+
type: PropType<AIChatController>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
toolbarItems: {
|
|
13
|
+
type: PropType<IChatToolbarItem[]>;
|
|
14
|
+
};
|
|
15
|
+
enableBackFill: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
19
|
+
}, {
|
|
20
|
+
ns: Namespace;
|
|
21
|
+
message: import('vue').Ref<ChatMessage | undefined>;
|
|
22
|
+
messages: import('vue').Ref<ChatMessage[]>;
|
|
23
|
+
modalRef: import('vue').Ref<HTMLElement | undefined>;
|
|
24
|
+
containerRef: import('vue').Ref<any>;
|
|
25
|
+
visibleMessages: import('vue').ComputedRef<ChatMessage[]>;
|
|
26
|
+
handleScroll: () => void;
|
|
27
|
+
closeToolbar: () => void;
|
|
28
|
+
renderMessage: (msg: ChatMessage) => JSX.Element;
|
|
29
|
+
handleTouchStart: (event: MouseEvent | TouchEvent, message: ChatMessage) => void;
|
|
30
|
+
handleTouchEnd: () => void;
|
|
31
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
32
|
+
controller: {
|
|
33
|
+
type: PropType<AIChatController>;
|
|
34
|
+
required: true;
|
|
35
|
+
};
|
|
36
|
+
toolbarItems: {
|
|
37
|
+
type: PropType<IChatToolbarItem[]>;
|
|
38
|
+
};
|
|
39
|
+
enableBackFill: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
}>>, {
|
|
44
|
+
enableBackFill: boolean;
|
|
45
|
+
}, {}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Namespace } from '../../../../utils';
|
|
3
|
+
import { IChatMessage } from '../../../../interface';
|
|
4
|
+
|
|
5
|
+
export declare const ErrorMessage: import('vue').DefineComponent<{
|
|
6
|
+
message: {
|
|
7
|
+
type: PropType<IChatMessage>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
ns: Namespace;
|
|
12
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
13
|
+
message: {
|
|
14
|
+
type: PropType<IChatMessage>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
}>>, {}, {}>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Namespace } from '../../../../utils';
|
|
3
|
+
import { IChatMessage } from '../../../../interface';
|
|
4
|
+
import { AIChatController } from '../../../../controller';
|
|
5
|
+
|
|
6
|
+
export declare const MarkdownMessage: import('vue').DefineComponent<{
|
|
7
|
+
controller: {
|
|
8
|
+
type: PropType<AIChatController>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
message: {
|
|
12
|
+
type: PropType<IChatMessage>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}, {
|
|
16
|
+
ns: Namespace;
|
|
17
|
+
UUID: string;
|
|
18
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
19
|
+
controller: {
|
|
20
|
+
type: PropType<AIChatController>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
message: {
|
|
24
|
+
type: PropType<IChatMessage>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
}>>, {}, {}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Namespace } from '../../../../utils';
|
|
3
|
+
import { IChatMessage } from '../../../../interface';
|
|
4
|
+
|
|
5
|
+
export declare const UnknownMessage: import('vue').DefineComponent<{
|
|
6
|
+
message: {
|
|
7
|
+
type: PropType<IChatMessage>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
ns: Namespace;
|
|
12
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
13
|
+
message: {
|
|
14
|
+
type: PropType<IChatMessage>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
}>>, {}, {}>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Namespace } from '../../../../utils';
|
|
3
|
+
import { AIChatController } from '../../../../controller';
|
|
4
|
+
import { IChatMessage } from '../../../../interface';
|
|
5
|
+
|
|
6
|
+
export declare const UserMessage: import('vue').DefineComponent<{
|
|
7
|
+
controller: {
|
|
8
|
+
type: PropType<AIChatController>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
message: {
|
|
12
|
+
type: PropType<IChatMessage>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}, {
|
|
16
|
+
ns: Namespace;
|
|
17
|
+
UUID: string;
|
|
18
|
+
material: {
|
|
19
|
+
resources: import('../../../../interface').IMaterial[];
|
|
20
|
+
remainingText: string;
|
|
21
|
+
hasResources: boolean;
|
|
22
|
+
error?: string;
|
|
23
|
+
};
|
|
24
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
25
|
+
controller: {
|
|
26
|
+
type: PropType<AIChatController>;
|
|
27
|
+
required: true;
|
|
28
|
+
};
|
|
29
|
+
message: {
|
|
30
|
+
type: PropType<IChatMessage>;
|
|
31
|
+
required: true;
|
|
32
|
+
};
|
|
33
|
+
}>>, {}, {}>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Namespace } from '../../../utils';
|
|
3
|
+
import { IChatToolbarItem, ITopic } from '../../../interface';
|
|
4
|
+
import { AIChatController } from '../../../controller';
|
|
5
|
+
|
|
6
|
+
export declare const ChatInputToolbar: import('vue').DefineComponent<{
|
|
7
|
+
controller: {
|
|
8
|
+
type: PropType<AIChatController>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
data: {
|
|
12
|
+
type: PropType<ITopic>;
|
|
13
|
+
};
|
|
14
|
+
items: {
|
|
15
|
+
type: PropType<IChatToolbarItem[]>;
|
|
16
|
+
default: () => never[];
|
|
17
|
+
};
|
|
18
|
+
}, {
|
|
19
|
+
ns: Namespace;
|
|
20
|
+
toolbarItems: IChatToolbarItem[];
|
|
21
|
+
handleItemClick: (_e: MouseEvent, _item: IChatToolbarItem) => void;
|
|
22
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
23
|
+
controller: {
|
|
24
|
+
type: PropType<AIChatController>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
data: {
|
|
28
|
+
type: PropType<ITopic>;
|
|
29
|
+
};
|
|
30
|
+
items: {
|
|
31
|
+
type: PropType<IChatToolbarItem[]>;
|
|
32
|
+
default: () => never[];
|
|
33
|
+
};
|
|
34
|
+
}>>, {
|
|
35
|
+
items: IChatToolbarItem[];
|
|
36
|
+
}, {}>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { PropType, VNode } from 'vue';
|
|
2
|
+
import { Namespace } from '../../../utils';
|
|
3
|
+
import { IChatMessage, IChatToolbarItem } from '../../../interface';
|
|
4
|
+
import { AIChatController } from '../../../controller';
|
|
5
|
+
|
|
6
|
+
export declare const ChatMessageToolbar: import('vue').DefineComponent<{
|
|
7
|
+
controller: {
|
|
8
|
+
type: PropType<AIChatController>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
data: {
|
|
12
|
+
type: PropType<IChatMessage>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
items: {
|
|
16
|
+
type: PropType<IChatToolbarItem[]>;
|
|
17
|
+
default: () => never[];
|
|
18
|
+
};
|
|
19
|
+
enableBackFill: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
23
|
+
}, {
|
|
24
|
+
ns: Namespace;
|
|
25
|
+
isLoadding: import('vue').ComputedRef<boolean>;
|
|
26
|
+
topItems: import('vue').Ref<{
|
|
27
|
+
id?: string | undefined;
|
|
28
|
+
label?: (string | VNode | ((h: Function) => VNode)) | undefined;
|
|
29
|
+
title?: string | undefined;
|
|
30
|
+
icon: (() => VNode) | {
|
|
31
|
+
showIcon: boolean;
|
|
32
|
+
cssClass: string;
|
|
33
|
+
imagePath: string;
|
|
34
|
+
};
|
|
35
|
+
disabled?: boolean | ((data: object) => boolean) | undefined;
|
|
36
|
+
hidden?: boolean | ((data: object) => boolean) | undefined;
|
|
37
|
+
customClass?: string | undefined;
|
|
38
|
+
children?: /*elided*/ any[] | undefined;
|
|
39
|
+
onClick?: ((e: MouseEvent, item: object, context: object, params: object, data?: object) => Promise<object> | void) | undefined;
|
|
40
|
+
}[]>;
|
|
41
|
+
centerItems: import('vue').Ref<{
|
|
42
|
+
id?: string | undefined;
|
|
43
|
+
label?: (string | VNode | ((h: Function) => VNode)) | undefined;
|
|
44
|
+
title?: string | undefined;
|
|
45
|
+
icon: (() => VNode) | {
|
|
46
|
+
showIcon: boolean;
|
|
47
|
+
cssClass: string;
|
|
48
|
+
imagePath: string;
|
|
49
|
+
};
|
|
50
|
+
disabled?: boolean | ((data: object) => boolean) | undefined;
|
|
51
|
+
hidden?: boolean | ((data: object) => boolean) | undefined;
|
|
52
|
+
customClass?: string | undefined;
|
|
53
|
+
children?: /*elided*/ any[] | undefined;
|
|
54
|
+
onClick?: ((e: MouseEvent, item: object, context: object, params: object, data?: object) => Promise<object> | void) | undefined;
|
|
55
|
+
}[]>;
|
|
56
|
+
handleItemClick: (_e: MouseEvent, _item: IChatToolbarItem) => void;
|
|
57
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{
|
|
58
|
+
controller: {
|
|
59
|
+
type: PropType<AIChatController>;
|
|
60
|
+
required: true;
|
|
61
|
+
};
|
|
62
|
+
data: {
|
|
63
|
+
type: PropType<IChatMessage>;
|
|
64
|
+
required: true;
|
|
65
|
+
};
|
|
66
|
+
items: {
|
|
67
|
+
type: PropType<IChatToolbarItem[]>;
|
|
68
|
+
default: () => never[];
|
|
69
|
+
};
|
|
70
|
+
enableBackFill: {
|
|
71
|
+
type: BooleanConstructor;
|
|
72
|
+
default: boolean;
|
|
73
|
+
};
|
|
74
|
+
}>>, {
|
|
75
|
+
items: IChatToolbarItem[];
|
|
76
|
+
enableBackFill: boolean;
|
|
77
|
+
}, {}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IChatMessage, IChatToolbarItem, ITopic } from '../../interface';
|
|
2
|
+
import { AIChatController } from '../../controller';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description 工具栏
|
|
6
|
+
* @param {*}
|
|
7
|
+
* @return {*}
|
|
8
|
+
*/
|
|
9
|
+
export declare function useToolbar(props: {
|
|
10
|
+
controller: AIChatController;
|
|
11
|
+
data?: ITopic | IChatMessage;
|
|
12
|
+
}): {
|
|
13
|
+
handleItemClick: (_e: MouseEvent, _item: IChatToolbarItem) => void;
|
|
14
|
+
};
|