@opentiny/tiny-robot 0.4.2-alpha.5 → 0.4.2-alpha.6
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/chat/components/ChatConversation.vue.d.ts +200 -3
- package/dist/chat/components/ChatThemeToggleButton.vue.d.ts +5 -1
- package/dist/chat/components/ChatWelcome.vue.d.ts +2 -1
- package/dist/chat/components/icons/IconModelAliyunBailian.vue.d.ts +7 -0
- package/dist/chat/components/icons/IconModelDeepseek.vue.d.ts +7 -0
- package/dist/chat/components/icons/index.d.ts +5 -0
- package/dist/chat/composables/useChatModel.d.ts +2 -2
- package/dist/chat/index.js +4640 -4439
- package/dist/chat/index.type.d.ts +4 -0
- package/dist/chat/index.vue.d.ts +1 -8
- package/dist/chat/locale.d.ts +12 -0
- package/dist/chat/mcpServers.d.ts +3 -0
- package/dist/style.css +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { nextTick, ComponentPublicInstance } from 'vue';
|
|
2
|
+
import { BubbleRoleConfig } from '../../bubble/index.type';
|
|
1
3
|
import { PluginInfo } from '../../mcp-server-picker/index.type';
|
|
2
|
-
import { ChatModelOption, ChatPromptItem, ChatWelcomeIcon } from '../index.type';
|
|
4
|
+
import { ChatLang, ChatModelOption, ChatPromptItem, ChatWelcomeIcon } from '../index.type';
|
|
3
5
|
type __VLS_Props = {
|
|
6
|
+
lang: ChatLang;
|
|
4
7
|
fullscreen?: boolean;
|
|
5
8
|
inputMessage: string;
|
|
6
9
|
messages: Record<string, unknown>[];
|
|
@@ -36,7 +39,104 @@ declare function __VLS_template(): {
|
|
|
36
39
|
slots: {
|
|
37
40
|
welcome?(_: {}): any;
|
|
38
41
|
};
|
|
39
|
-
refs: {
|
|
42
|
+
refs: {
|
|
43
|
+
bubbleListRef: ({
|
|
44
|
+
$: import('vue').ComponentInternalInstance;
|
|
45
|
+
$data: {};
|
|
46
|
+
$props: {
|
|
47
|
+
readonly messages: import('../..').BubbleMessage[];
|
|
48
|
+
readonly groupStrategy?: ("consecutive" | "divider" | ((messages: import('../..').BubbleMessage[], dividerRole?: string) => import('../..').BubbleMessageGroup[])) | undefined;
|
|
49
|
+
readonly dividerRole?: string | undefined;
|
|
50
|
+
readonly fallbackRole?: string | undefined;
|
|
51
|
+
readonly roleConfigs?: Record<string, BubbleRoleConfig> | undefined;
|
|
52
|
+
readonly contentRenderMode?: "split" | "single" | undefined;
|
|
53
|
+
readonly contentResolver?: ((message: import('../..').BubbleMessage) => import('../..').ChatMessageContent | undefined) | undefined;
|
|
54
|
+
readonly autoScroll?: boolean | undefined;
|
|
55
|
+
readonly "onState-change"?: ((payload: {
|
|
56
|
+
key: string;
|
|
57
|
+
value: unknown;
|
|
58
|
+
messageIndex: number;
|
|
59
|
+
contentIndex: number;
|
|
60
|
+
}) => any) | undefined;
|
|
61
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
62
|
+
$attrs: import('vue').Attrs;
|
|
63
|
+
$refs: {
|
|
64
|
+
[x: string]: unknown;
|
|
65
|
+
} & {
|
|
66
|
+
listRef: HTMLDivElement;
|
|
67
|
+
};
|
|
68
|
+
$slots: Readonly<{
|
|
69
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
70
|
+
}>;
|
|
71
|
+
$root: ComponentPublicInstance | null;
|
|
72
|
+
$parent: ComponentPublicInstance | null;
|
|
73
|
+
$host: Element | null;
|
|
74
|
+
$emit: (event: "state-change", payload: {
|
|
75
|
+
key: string;
|
|
76
|
+
value: unknown;
|
|
77
|
+
messageIndex: number;
|
|
78
|
+
contentIndex: number;
|
|
79
|
+
}) => void;
|
|
80
|
+
$el: HTMLDivElement;
|
|
81
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('../..').BubbleListProps> & Readonly<{
|
|
82
|
+
"onState-change"?: ((payload: {
|
|
83
|
+
key: string;
|
|
84
|
+
value: unknown;
|
|
85
|
+
messageIndex: number;
|
|
86
|
+
contentIndex: number;
|
|
87
|
+
}) => any) | undefined;
|
|
88
|
+
}>, {
|
|
89
|
+
scrollToBottom: (behavior?: ScrollBehavior) => Promise<void>;
|
|
90
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
91
|
+
"state-change": (payload: {
|
|
92
|
+
key: string;
|
|
93
|
+
value: unknown;
|
|
94
|
+
messageIndex: number;
|
|
95
|
+
contentIndex: number;
|
|
96
|
+
}) => any;
|
|
97
|
+
}, string, {
|
|
98
|
+
contentResolver: (message: import('../..').BubbleMessage) => import('../..').ChatMessageContent | undefined;
|
|
99
|
+
groupStrategy: "consecutive" | "divider" | ((messages: import('../..').BubbleMessage[], dividerRole?: string) => import('../..').BubbleMessageGroup[]);
|
|
100
|
+
dividerRole: string;
|
|
101
|
+
fallbackRole: string;
|
|
102
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
103
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
104
|
+
created?: (() => void) | (() => void)[];
|
|
105
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
106
|
+
mounted?: (() => void) | (() => void)[];
|
|
107
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
108
|
+
updated?: (() => void) | (() => void)[];
|
|
109
|
+
activated?: (() => void) | (() => void)[];
|
|
110
|
+
deactivated?: (() => void) | (() => void)[];
|
|
111
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
112
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
113
|
+
destroyed?: (() => void) | (() => void)[];
|
|
114
|
+
unmounted?: (() => void) | (() => void)[];
|
|
115
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
116
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
117
|
+
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
118
|
+
};
|
|
119
|
+
$forceUpdate: () => void;
|
|
120
|
+
$nextTick: typeof nextTick;
|
|
121
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
122
|
+
} & Readonly<{
|
|
123
|
+
contentResolver: (message: import('../..').BubbleMessage) => import('../..').ChatMessageContent | undefined;
|
|
124
|
+
groupStrategy: "consecutive" | "divider" | ((messages: import('../..').BubbleMessage[], dividerRole?: string) => import('../..').BubbleMessageGroup[]);
|
|
125
|
+
dividerRole: string;
|
|
126
|
+
fallbackRole: string;
|
|
127
|
+
}> & Omit<Readonly<import('../..').BubbleListProps> & Readonly<{
|
|
128
|
+
"onState-change"?: ((payload: {
|
|
129
|
+
key: string;
|
|
130
|
+
value: unknown;
|
|
131
|
+
messageIndex: number;
|
|
132
|
+
contentIndex: number;
|
|
133
|
+
}) => any) | undefined;
|
|
134
|
+
}>, "scrollToBottom" | ("contentResolver" | "groupStrategy" | "dividerRole" | "fallbackRole")> & {
|
|
135
|
+
scrollToBottom: (behavior?: ScrollBehavior) => Promise<void>;
|
|
136
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
137
|
+
$slots: Readonly<import('../..').BubbleListSlots> & import('../..').BubbleListSlots;
|
|
138
|
+
}) | null;
|
|
139
|
+
};
|
|
40
140
|
rootEl: HTMLElement;
|
|
41
141
|
};
|
|
42
142
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
@@ -60,7 +160,104 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
60
160
|
"onUpdate:selectedModelId"?: ((value: string) => any) | undefined;
|
|
61
161
|
"onUpdate:pickerVisible"?: ((value: boolean) => any) | undefined;
|
|
62
162
|
"onUpdate:inputMessage"?: ((value: string) => any) | undefined;
|
|
63
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
163
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
164
|
+
bubbleListRef: ({
|
|
165
|
+
$: import('vue').ComponentInternalInstance;
|
|
166
|
+
$data: {};
|
|
167
|
+
$props: {
|
|
168
|
+
readonly messages: import('../..').BubbleMessage[];
|
|
169
|
+
readonly groupStrategy?: ("consecutive" | "divider" | ((messages: import('../..').BubbleMessage[], dividerRole?: string) => import('../..').BubbleMessageGroup[])) | undefined;
|
|
170
|
+
readonly dividerRole?: string | undefined;
|
|
171
|
+
readonly fallbackRole?: string | undefined;
|
|
172
|
+
readonly roleConfigs?: Record<string, BubbleRoleConfig> | undefined;
|
|
173
|
+
readonly contentRenderMode?: "split" | "single" | undefined;
|
|
174
|
+
readonly contentResolver?: ((message: import('../..').BubbleMessage) => import('../..').ChatMessageContent | undefined) | undefined;
|
|
175
|
+
readonly autoScroll?: boolean | undefined;
|
|
176
|
+
readonly "onState-change"?: ((payload: {
|
|
177
|
+
key: string;
|
|
178
|
+
value: unknown;
|
|
179
|
+
messageIndex: number;
|
|
180
|
+
contentIndex: number;
|
|
181
|
+
}) => any) | undefined;
|
|
182
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
183
|
+
$attrs: import('vue').Attrs;
|
|
184
|
+
$refs: {
|
|
185
|
+
[x: string]: unknown;
|
|
186
|
+
} & {
|
|
187
|
+
listRef: HTMLDivElement;
|
|
188
|
+
};
|
|
189
|
+
$slots: Readonly<{
|
|
190
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
191
|
+
}>;
|
|
192
|
+
$root: ComponentPublicInstance | null;
|
|
193
|
+
$parent: ComponentPublicInstance | null;
|
|
194
|
+
$host: Element | null;
|
|
195
|
+
$emit: (event: "state-change", payload: {
|
|
196
|
+
key: string;
|
|
197
|
+
value: unknown;
|
|
198
|
+
messageIndex: number;
|
|
199
|
+
contentIndex: number;
|
|
200
|
+
}) => void;
|
|
201
|
+
$el: HTMLDivElement;
|
|
202
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('../..').BubbleListProps> & Readonly<{
|
|
203
|
+
"onState-change"?: ((payload: {
|
|
204
|
+
key: string;
|
|
205
|
+
value: unknown;
|
|
206
|
+
messageIndex: number;
|
|
207
|
+
contentIndex: number;
|
|
208
|
+
}) => any) | undefined;
|
|
209
|
+
}>, {
|
|
210
|
+
scrollToBottom: (behavior?: ScrollBehavior) => Promise<void>;
|
|
211
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
212
|
+
"state-change": (payload: {
|
|
213
|
+
key: string;
|
|
214
|
+
value: unknown;
|
|
215
|
+
messageIndex: number;
|
|
216
|
+
contentIndex: number;
|
|
217
|
+
}) => any;
|
|
218
|
+
}, string, {
|
|
219
|
+
contentResolver: (message: import('../..').BubbleMessage) => import('../..').ChatMessageContent | undefined;
|
|
220
|
+
groupStrategy: "consecutive" | "divider" | ((messages: import('../..').BubbleMessage[], dividerRole?: string) => import('../..').BubbleMessageGroup[]);
|
|
221
|
+
dividerRole: string;
|
|
222
|
+
fallbackRole: string;
|
|
223
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
224
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
225
|
+
created?: (() => void) | (() => void)[];
|
|
226
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
227
|
+
mounted?: (() => void) | (() => void)[];
|
|
228
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
229
|
+
updated?: (() => void) | (() => void)[];
|
|
230
|
+
activated?: (() => void) | (() => void)[];
|
|
231
|
+
deactivated?: (() => void) | (() => void)[];
|
|
232
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
233
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
234
|
+
destroyed?: (() => void) | (() => void)[];
|
|
235
|
+
unmounted?: (() => void) | (() => void)[];
|
|
236
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
237
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
238
|
+
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
239
|
+
};
|
|
240
|
+
$forceUpdate: () => void;
|
|
241
|
+
$nextTick: typeof nextTick;
|
|
242
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
243
|
+
} & Readonly<{
|
|
244
|
+
contentResolver: (message: import('../..').BubbleMessage) => import('../..').ChatMessageContent | undefined;
|
|
245
|
+
groupStrategy: "consecutive" | "divider" | ((messages: import('../..').BubbleMessage[], dividerRole?: string) => import('../..').BubbleMessageGroup[]);
|
|
246
|
+
dividerRole: string;
|
|
247
|
+
fallbackRole: string;
|
|
248
|
+
}> & Omit<Readonly<import('../..').BubbleListProps> & Readonly<{
|
|
249
|
+
"onState-change"?: ((payload: {
|
|
250
|
+
key: string;
|
|
251
|
+
value: unknown;
|
|
252
|
+
messageIndex: number;
|
|
253
|
+
contentIndex: number;
|
|
254
|
+
}) => any) | undefined;
|
|
255
|
+
}>, "scrollToBottom" | ("contentResolver" | "groupStrategy" | "dividerRole" | "fallbackRole")> & {
|
|
256
|
+
scrollToBottom: (behavior?: ScrollBehavior) => Promise<void>;
|
|
257
|
+
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
258
|
+
$slots: Readonly<import('../..').BubbleListSlots> & import('../..').BubbleListSlots;
|
|
259
|
+
}) | null;
|
|
260
|
+
}, HTMLElement>;
|
|
64
261
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
65
262
|
export default _default;
|
|
66
263
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
lightLabel: string;
|
|
3
|
+
darkLabel: string;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
2
6
|
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
size?: number;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
5
|
+
size: number;
|
|
6
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, SVGSVGElement>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
size?: number;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
5
|
+
size: number;
|
|
6
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, SVGSVGElement>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { default as IconModelAliyunBailian } from './IconModelAliyunBailian.vue';
|
|
3
|
+
import { default as IconModelDeepseek } from './IconModelDeepseek.vue';
|
|
4
|
+
export declare function resolveChatModelIcon(provider?: string): Component;
|
|
5
|
+
export { IconModelAliyunBailian, IconModelDeepseek };
|
|
@@ -3,23 +3,23 @@ import { ChatModelOption } from '../index.type';
|
|
|
3
3
|
export declare function useChatModel(getModelOptions: () => ChatModelOption[], selectedModelId: Ref<string>): {
|
|
4
4
|
modelOptions: import('vue').ComputedRef<{
|
|
5
5
|
apiKey: string | undefined;
|
|
6
|
+
icon: import('vue').Component;
|
|
6
7
|
id: string;
|
|
7
8
|
provider: string;
|
|
8
9
|
name: string;
|
|
9
10
|
model: string;
|
|
10
11
|
apiUrl: string;
|
|
11
|
-
icon?: import('vue').Component;
|
|
12
12
|
capabilities?: import('..').ChatModelCapabilities;
|
|
13
13
|
}[]>;
|
|
14
14
|
selectedModelId: Ref<string, string>;
|
|
15
15
|
selectedModel: import('vue').ComputedRef<{
|
|
16
16
|
apiKey: string | undefined;
|
|
17
|
+
icon: import('vue').Component;
|
|
17
18
|
id: string;
|
|
18
19
|
provider: string;
|
|
19
20
|
name: string;
|
|
20
21
|
model: string;
|
|
21
22
|
apiUrl: string;
|
|
22
|
-
icon?: import('vue').Component;
|
|
23
23
|
capabilities?: import('..').ChatModelCapabilities;
|
|
24
24
|
} | undefined>;
|
|
25
25
|
hasApiConfig: import('vue').ComputedRef<boolean>;
|