@opentiny/tiny-robot 0.3.1-alpha.4 → 0.4.0-alpha.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/dist/action-group/index.js +1 -1
- package/dist/base-popper/index.js +1 -1
- package/dist/bubble/index.js +10 -4014
- package/dist/drag-overlay/index.js +5 -5
- package/dist/dropdown-menu/index.js +5 -5
- package/dist/flow-layout-buttons/index.js +1 -1
- package/dist/history/index.js +1 -1
- package/dist/index.d.ts +420 -193
- package/dist/index.js +87 -82
- package/dist/index2.js +819 -279
- package/dist/index3.js +282 -691
- package/dist/index4.js +382 -156
- package/dist/index5.js +710 -0
- package/dist/index6.js +161 -0
- package/dist/mcp-add-form/index.js +1 -1
- package/dist/mcp-server-picker/index.js +1 -1
- package/dist/sender/index.js +540 -548
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +1 -1
- package/dist/suggestion-popover/index.js +184 -185
- package/dist/useSlotRefs.js +3 -3
- package/dist/utils.js +1 -1
- package/package.json +8 -5
- package/dist/loading.js +0 -4
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ import { ComponentOptionsMixin } from 'vue';
|
|
|
9
9
|
import { ComponentProvideOptions } from 'vue';
|
|
10
10
|
import { ComponentPublicInstance } from 'vue';
|
|
11
11
|
import { ComputedRef } from 'vue';
|
|
12
|
-
import { Config } from 'dompurify';
|
|
13
12
|
import { CreateComponentPublicInstanceWithMixins } from 'vue';
|
|
14
13
|
import { CSSProperties } from 'vue';
|
|
15
14
|
import { DebuggerEvent } from 'vue';
|
|
@@ -18,9 +17,10 @@ import { Directive } from 'vue';
|
|
|
18
17
|
import { ExtractPropTypes } from 'vue';
|
|
19
18
|
import { GlobalComponents } from 'vue';
|
|
20
19
|
import { GlobalDirectives } from 'vue';
|
|
20
|
+
import { MaybeComputedElementRef } from '@vueuse/core';
|
|
21
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
21
22
|
import { nextTick } from 'vue';
|
|
22
23
|
import { OnCleanup } from '@vue/reactivity';
|
|
23
|
-
import { Options } from 'markdown-it';
|
|
24
24
|
import { PropType } from 'vue';
|
|
25
25
|
import { PublicProps } from 'vue';
|
|
26
26
|
import { Ref } from 'vue';
|
|
@@ -34,14 +34,47 @@ import { VNodeProps } from 'vue';
|
|
|
34
34
|
import { WatchOptions } from 'vue';
|
|
35
35
|
import { WatchStopHandle } from 'vue';
|
|
36
36
|
|
|
37
|
-
declare const __VLS_component: DefineComponent<BubbleProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}
|
|
38
|
-
|
|
37
|
+
declare const __VLS_component: DefineComponent<BubbleProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
38
|
+
"state-change": (payload: {
|
|
39
|
+
key: string;
|
|
40
|
+
value: unknown;
|
|
41
|
+
messageIndex: number;
|
|
42
|
+
contentIndex?: number;
|
|
43
|
+
}) => any;
|
|
44
|
+
}, string, PublicProps, Readonly<BubbleProps> & Readonly<{
|
|
45
|
+
"onState-change"?: ((payload: {
|
|
46
|
+
key: string;
|
|
47
|
+
value: unknown;
|
|
48
|
+
messageIndex: number;
|
|
49
|
+
contentIndex?: number;
|
|
50
|
+
}) => any) | undefined;
|
|
51
|
+
}>, {
|
|
39
52
|
placement: "start" | "end";
|
|
40
|
-
shape: "rounded" | "
|
|
41
|
-
|
|
53
|
+
shape: "corner" | "rounded" | "none";
|
|
54
|
+
contentRenderMode: "single" | "split";
|
|
42
55
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
43
56
|
|
|
44
|
-
declare const __VLS_component_10: DefineComponent<
|
|
57
|
+
declare const __VLS_component_10: DefineComponent<__VLS_PublicProps_3, {
|
|
58
|
+
children: ComputedRef<(HTMLElement | SVGElement)[]>;
|
|
59
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
60
|
+
"update:showAll": (value: boolean | undefined) => any;
|
|
61
|
+
} & {
|
|
62
|
+
"click-outside": (event: MouseEvent) => any;
|
|
63
|
+
}, string, PublicProps, Readonly<__VLS_PublicProps_3> & Readonly<{
|
|
64
|
+
"onClick-outside"?: ((event: MouseEvent) => any) | undefined;
|
|
65
|
+
"onUpdate:showAll"?: ((value: boolean | undefined) => any) | undefined;
|
|
66
|
+
}>, {
|
|
67
|
+
showAllButtonOn: "hover" | "always";
|
|
68
|
+
overflowMode: "expand" | "scroll";
|
|
69
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
70
|
+
containerWrapperRef: HTMLDivElement;
|
|
71
|
+
containerRef: HTMLDivElement;
|
|
72
|
+
staticMaybeItemRefs: unknown[];
|
|
73
|
+
floatingItemsRef: HTMLDivElement;
|
|
74
|
+
floatingMaybeItemRefs: unknown[];
|
|
75
|
+
}, HTMLDivElement>;
|
|
76
|
+
|
|
77
|
+
declare const __VLS_component_11: DefineComponent<__VLS_PublicProps_4, {
|
|
45
78
|
update: () => void;
|
|
46
79
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
47
80
|
"update:selectedGroup": (value: string) => any;
|
|
@@ -177,7 +210,7 @@ show?: TooltipContentProps["show"];
|
|
|
177
210
|
}>, {}, {}, {}, {}, {}> | null;
|
|
178
211
|
}, any>;
|
|
179
212
|
|
|
180
|
-
declare const
|
|
213
|
+
declare const __VLS_component_12: DefineComponent<__VLS_PublicProps_5, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
181
214
|
"update:theme": (value: string) => any;
|
|
182
215
|
"update:colorMode": (value: ColorMode) => any;
|
|
183
216
|
}, string, PublicProps, Readonly<__VLS_PublicProps_5> & Readonly<{
|
|
@@ -188,15 +221,37 @@ targetElement: string;
|
|
|
188
221
|
storageKey: string;
|
|
189
222
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
190
223
|
|
|
191
|
-
declare const
|
|
224
|
+
declare const __VLS_component_13: DefineComponent<WelcomeProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<WelcomeProps> & Readonly<{}>, {
|
|
192
225
|
align: "left" | "center" | "right" | string;
|
|
193
226
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
194
227
|
|
|
195
|
-
declare const __VLS_component_2: DefineComponent<
|
|
196
|
-
|
|
197
|
-
}, {}, {}, {},
|
|
228
|
+
declare const __VLS_component_2: DefineComponent<BubbleListProps, {
|
|
229
|
+
scrollToBottom: (behavior?: ScrollBehavior) => Promise<void>;
|
|
230
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
231
|
+
"state-change": (payload: {
|
|
232
|
+
key: string;
|
|
233
|
+
value: unknown;
|
|
234
|
+
messageIndex: number;
|
|
235
|
+
contentIndex?: number;
|
|
236
|
+
}) => any;
|
|
237
|
+
}, string, PublicProps, Readonly<BubbleListProps> & Readonly<{
|
|
238
|
+
"onState-change"?: ((payload: {
|
|
239
|
+
key: string;
|
|
240
|
+
value: unknown;
|
|
241
|
+
messageIndex: number;
|
|
242
|
+
contentIndex?: number;
|
|
243
|
+
}) => any) | undefined;
|
|
244
|
+
}>, {
|
|
245
|
+
groupStrategy: "consecutive" | "divider" | ((messages: BubbleMessage[], dividerRole?: string) => BubbleMessageGroup[]);
|
|
246
|
+
dividerRole: string;
|
|
247
|
+
fallbackRole: string;
|
|
248
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
249
|
+
listRef: HTMLDivElement;
|
|
250
|
+
}, HTMLDivElement>;
|
|
198
251
|
|
|
199
|
-
declare const __VLS_component_3: DefineComponent<
|
|
252
|
+
declare const __VLS_component_3: DefineComponent<BubbleProviderProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BubbleProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
253
|
+
|
|
254
|
+
declare const __VLS_component_4: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
200
255
|
"update:show": (value: boolean) => any;
|
|
201
256
|
"update:fullscreen": (value: boolean | undefined) => any;
|
|
202
257
|
} & {
|
|
@@ -209,9 +264,9 @@ onClose?: (() => any) | undefined;
|
|
|
209
264
|
title: string;
|
|
210
265
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
211
266
|
|
|
212
|
-
declare const
|
|
267
|
+
declare const __VLS_component_5: DefineComponent<DragOverlayProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<DragOverlayProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
213
268
|
|
|
214
|
-
declare const
|
|
269
|
+
declare const __VLS_component_6: DefineComponent<__VLS_PublicProps_2, {
|
|
215
270
|
update: () => void;
|
|
216
271
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
217
272
|
"update:show": (value: boolean) => any;
|
|
@@ -319,13 +374,13 @@ content?: () => VNode[];
|
|
|
319
374
|
}) | null;
|
|
320
375
|
}, any>;
|
|
321
376
|
|
|
322
|
-
declare const
|
|
377
|
+
declare const __VLS_component_7: DefineComponent<PromptsProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
323
378
|
"item-click": (ev: MouseEvent, item: PromptProps) => any;
|
|
324
379
|
}, string, PublicProps, Readonly<PromptsProps> & Readonly<{
|
|
325
380
|
"onItem-click"?: ((ev: MouseEvent, item: PromptProps) => any) | undefined;
|
|
326
381
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
327
382
|
|
|
328
|
-
declare const
|
|
383
|
+
declare const __VLS_component_8: DefineComponent<SenderProps, {
|
|
329
384
|
focus: () => void;
|
|
330
385
|
blur: () => void;
|
|
331
386
|
clear: () => void;
|
|
@@ -369,8 +424,8 @@ onSubmit?: ((value: string) => any) | undefined;
|
|
|
369
424
|
disabled: boolean;
|
|
370
425
|
modelValue: string;
|
|
371
426
|
placeholder: string;
|
|
372
|
-
mode: InputMode;
|
|
373
427
|
loading: boolean;
|
|
428
|
+
mode: InputMode;
|
|
374
429
|
autofocus: boolean;
|
|
375
430
|
allowSpeech: boolean;
|
|
376
431
|
allowFiles: boolean;
|
|
@@ -880,73 +935,49 @@ inputBoxType: string;
|
|
|
880
935
|
buttonsContainerRef: HTMLDivElement;
|
|
881
936
|
}, HTMLDivElement>;
|
|
882
937
|
|
|
883
|
-
declare const
|
|
884
|
-
|
|
885
|
-
declare const __VLS_component_9: DefineComponent<__VLS_PublicProps_3, {
|
|
886
|
-
children: ComputedRef<(HTMLElement | SVGElement)[]>;
|
|
887
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
888
|
-
"update:showAll": (value: boolean | undefined) => any;
|
|
889
|
-
} & {
|
|
890
|
-
"click-outside": (event: MouseEvent) => any;
|
|
891
|
-
}, string, PublicProps, Readonly<__VLS_PublicProps_3> & Readonly<{
|
|
892
|
-
"onClick-outside"?: ((event: MouseEvent) => any) | undefined;
|
|
893
|
-
"onUpdate:showAll"?: ((value: boolean | undefined) => any) | undefined;
|
|
894
|
-
}>, {
|
|
895
|
-
showAllButtonOn: "hover" | "always";
|
|
896
|
-
overflowMode: "expand" | "scroll";
|
|
897
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
898
|
-
containerWrapperRef: HTMLDivElement;
|
|
899
|
-
containerRef: HTMLDivElement;
|
|
900
|
-
staticMaybeItemRefs: unknown[];
|
|
901
|
-
floatingItemsRef: HTMLDivElement;
|
|
902
|
-
floatingMaybeItemRefs: unknown[];
|
|
903
|
-
}, HTMLDivElement>;
|
|
938
|
+
declare const __VLS_component_9: DefineComponent<SuggestionPillButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SuggestionPillButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
904
939
|
|
|
905
940
|
declare type __VLS_PrettifyLocal<T> = {
|
|
906
941
|
[K in keyof T]: T[K];
|
|
907
942
|
} & {};
|
|
908
943
|
|
|
909
|
-
declare type __VLS_Props =
|
|
910
|
-
contentRenderers?: Record<string, BubbleContentRenderer>;
|
|
911
|
-
};
|
|
912
|
-
|
|
913
|
-
declare type __VLS_Props_2 = ContainerProps;
|
|
944
|
+
declare type __VLS_Props = ContainerProps;
|
|
914
945
|
|
|
915
|
-
declare type
|
|
946
|
+
declare type __VLS_Props_2 = DropdownMenuProps;
|
|
916
947
|
|
|
917
|
-
declare type
|
|
948
|
+
declare type __VLS_Props_3 = SuggestionPillsProps;
|
|
918
949
|
|
|
919
|
-
declare type
|
|
950
|
+
declare type __VLS_Props_4 = SuggestionPopoverProps;
|
|
920
951
|
|
|
921
|
-
declare type
|
|
952
|
+
declare type __VLS_Props_5 = ThemeProviderProps;
|
|
922
953
|
|
|
923
|
-
declare type
|
|
954
|
+
declare type __VLS_Props_6 = McpServerPickerProps;
|
|
924
955
|
|
|
925
956
|
declare type __VLS_PublicProps = {
|
|
926
957
|
'show': ContainerProps['show'];
|
|
927
958
|
'fullscreen'?: ContainerProps['fullscreen'];
|
|
928
|
-
} &
|
|
959
|
+
} & __VLS_Props;
|
|
929
960
|
|
|
930
961
|
declare type __VLS_PublicProps_2 = {
|
|
931
962
|
'show'?: boolean;
|
|
932
|
-
} &
|
|
963
|
+
} & __VLS_Props_2;
|
|
933
964
|
|
|
934
965
|
declare type __VLS_PublicProps_3 = {
|
|
935
966
|
'showAll'?: SuggestionPillsProps['showAll'];
|
|
936
|
-
} &
|
|
967
|
+
} & __VLS_Props_3;
|
|
937
968
|
|
|
938
969
|
declare type __VLS_PublicProps_4 = {
|
|
939
970
|
'selectedGroup'?: string;
|
|
940
|
-
} &
|
|
971
|
+
} & __VLS_Props_4;
|
|
941
972
|
|
|
942
973
|
declare type __VLS_PublicProps_5 = {
|
|
943
974
|
'theme'?: string;
|
|
944
975
|
'colorMode'?: ColorMode;
|
|
945
|
-
} &
|
|
976
|
+
} & __VLS_Props_5;
|
|
946
977
|
|
|
947
978
|
declare type __VLS_PublicProps_6 = {
|
|
948
979
|
'visible': boolean;
|
|
949
|
-
} &
|
|
980
|
+
} & __VLS_Props_6;
|
|
950
981
|
|
|
951
982
|
declare function __VLS_template(): {
|
|
952
983
|
attrs: Partial<{}>;
|
|
@@ -956,6 +987,19 @@ declare function __VLS_template(): {
|
|
|
956
987
|
};
|
|
957
988
|
|
|
958
989
|
declare function __VLS_template_10(): {
|
|
990
|
+
attrs: Partial<{}>;
|
|
991
|
+
slots: Readonly<SuggestionPillsSlots> & SuggestionPillsSlots;
|
|
992
|
+
refs: {
|
|
993
|
+
containerWrapperRef: HTMLDivElement;
|
|
994
|
+
containerRef: HTMLDivElement;
|
|
995
|
+
staticMaybeItemRefs: unknown[];
|
|
996
|
+
floatingItemsRef: HTMLDivElement;
|
|
997
|
+
floatingMaybeItemRefs: unknown[];
|
|
998
|
+
};
|
|
999
|
+
rootEl: HTMLDivElement;
|
|
1000
|
+
};
|
|
1001
|
+
|
|
1002
|
+
declare function __VLS_template_11(): {
|
|
959
1003
|
attrs: Partial<{}>;
|
|
960
1004
|
slots: Readonly<SuggestionPopoverSlots> & SuggestionPopoverSlots;
|
|
961
1005
|
refs: {
|
|
@@ -1074,7 +1118,7 @@ declare function __VLS_template_10(): {
|
|
|
1074
1118
|
rootEl: any;
|
|
1075
1119
|
};
|
|
1076
1120
|
|
|
1077
|
-
declare function
|
|
1121
|
+
declare function __VLS_template_12(): {
|
|
1078
1122
|
attrs: Partial<{}>;
|
|
1079
1123
|
slots: {
|
|
1080
1124
|
default?(_: {}): any;
|
|
@@ -1083,7 +1127,7 @@ declare function __VLS_template_11(): {
|
|
|
1083
1127
|
rootEl: any;
|
|
1084
1128
|
};
|
|
1085
1129
|
|
|
1086
|
-
declare function
|
|
1130
|
+
declare function __VLS_template_13(): {
|
|
1087
1131
|
attrs: Partial<{}>;
|
|
1088
1132
|
slots: Readonly<WelcomeSlots> & WelcomeSlots;
|
|
1089
1133
|
refs: {};
|
|
@@ -1091,6 +1135,15 @@ declare function __VLS_template_12(): {
|
|
|
1091
1135
|
};
|
|
1092
1136
|
|
|
1093
1137
|
declare function __VLS_template_2(): {
|
|
1138
|
+
attrs: Partial<{}>;
|
|
1139
|
+
slots: Readonly<BubbleListSlots> & BubbleListSlots;
|
|
1140
|
+
refs: {
|
|
1141
|
+
listRef: HTMLDivElement;
|
|
1142
|
+
};
|
|
1143
|
+
rootEl: HTMLDivElement;
|
|
1144
|
+
};
|
|
1145
|
+
|
|
1146
|
+
declare function __VLS_template_3(): {
|
|
1094
1147
|
attrs: Partial<{}>;
|
|
1095
1148
|
slots: {
|
|
1096
1149
|
default?(_: {}): any;
|
|
@@ -1099,14 +1152,14 @@ declare function __VLS_template_2(): {
|
|
|
1099
1152
|
rootEl: any;
|
|
1100
1153
|
};
|
|
1101
1154
|
|
|
1102
|
-
declare function
|
|
1155
|
+
declare function __VLS_template_4(): {
|
|
1103
1156
|
attrs: Partial<{}>;
|
|
1104
1157
|
slots: Readonly<ContainerSlots> & ContainerSlots;
|
|
1105
1158
|
refs: {};
|
|
1106
1159
|
rootEl: HTMLDivElement;
|
|
1107
1160
|
};
|
|
1108
1161
|
|
|
1109
|
-
declare function
|
|
1162
|
+
declare function __VLS_template_5(): {
|
|
1110
1163
|
attrs: Partial<{}>;
|
|
1111
1164
|
slots: {
|
|
1112
1165
|
overlay?(_: {
|
|
@@ -1117,7 +1170,7 @@ declare function __VLS_template_4(): {
|
|
|
1117
1170
|
rootEl: any;
|
|
1118
1171
|
};
|
|
1119
1172
|
|
|
1120
|
-
declare function
|
|
1173
|
+
declare function __VLS_template_6(): {
|
|
1121
1174
|
attrs: Partial<{}>;
|
|
1122
1175
|
slots: {
|
|
1123
1176
|
trigger?(_: {}): any;
|
|
@@ -1219,14 +1272,14 @@ declare function __VLS_template_5(): {
|
|
|
1219
1272
|
rootEl: any;
|
|
1220
1273
|
};
|
|
1221
1274
|
|
|
1222
|
-
declare function
|
|
1275
|
+
declare function __VLS_template_7(): {
|
|
1223
1276
|
attrs: Partial<{}>;
|
|
1224
1277
|
slots: Readonly<PromptsSlots> & PromptsSlots;
|
|
1225
1278
|
refs: {};
|
|
1226
1279
|
rootEl: HTMLDivElement;
|
|
1227
1280
|
};
|
|
1228
1281
|
|
|
1229
|
-
declare function
|
|
1282
|
+
declare function __VLS_template_8(): {
|
|
1230
1283
|
attrs: Partial<{}>;
|
|
1231
1284
|
slots: {
|
|
1232
1285
|
header?(_: {}): any;
|
|
@@ -1736,26 +1789,13 @@ declare function __VLS_template_7(): {
|
|
|
1736
1789
|
rootEl: HTMLDivElement;
|
|
1737
1790
|
};
|
|
1738
1791
|
|
|
1739
|
-
declare function
|
|
1792
|
+
declare function __VLS_template_9(): {
|
|
1740
1793
|
attrs: Partial<{}>;
|
|
1741
1794
|
slots: Readonly<SuggestionPillButtonSlots> & SuggestionPillButtonSlots;
|
|
1742
1795
|
refs: {};
|
|
1743
1796
|
rootEl: HTMLButtonElement;
|
|
1744
1797
|
};
|
|
1745
1798
|
|
|
1746
|
-
declare function __VLS_template_9(): {
|
|
1747
|
-
attrs: Partial<{}>;
|
|
1748
|
-
slots: Readonly<SuggestionPillsSlots> & SuggestionPillsSlots;
|
|
1749
|
-
refs: {
|
|
1750
|
-
containerWrapperRef: HTMLDivElement;
|
|
1751
|
-
containerRef: HTMLDivElement;
|
|
1752
|
-
staticMaybeItemRefs: unknown[];
|
|
1753
|
-
floatingItemsRef: HTMLDivElement;
|
|
1754
|
-
floatingMaybeItemRefs: unknown[];
|
|
1755
|
-
};
|
|
1756
|
-
rootEl: HTMLDivElement;
|
|
1757
|
-
};
|
|
1758
|
-
|
|
1759
1799
|
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
1760
1800
|
|
|
1761
1801
|
declare type __VLS_TemplateResult_10 = ReturnType<typeof __VLS_template_10>;
|
|
@@ -1764,6 +1804,8 @@ declare type __VLS_TemplateResult_11 = ReturnType<typeof __VLS_template_11>;
|
|
|
1764
1804
|
|
|
1765
1805
|
declare type __VLS_TemplateResult_12 = ReturnType<typeof __VLS_template_12>;
|
|
1766
1806
|
|
|
1807
|
+
declare type __VLS_TemplateResult_13 = ReturnType<typeof __VLS_template_13>;
|
|
1808
|
+
|
|
1767
1809
|
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
|
|
1768
1810
|
|
|
1769
1811
|
declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
|
|
@@ -1804,6 +1846,12 @@ declare type __VLS_WithTemplateSlots_12<T, S> = T & {
|
|
|
1804
1846
|
};
|
|
1805
1847
|
};
|
|
1806
1848
|
|
|
1849
|
+
declare type __VLS_WithTemplateSlots_13<T, S> = T & {
|
|
1850
|
+
new (): {
|
|
1851
|
+
$slots: S;
|
|
1852
|
+
};
|
|
1853
|
+
};
|
|
1854
|
+
|
|
1807
1855
|
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
1808
1856
|
new (): {
|
|
1809
1857
|
$slots: S;
|
|
@@ -1931,58 +1979,32 @@ declare const Bubble: typeof _default_18 & {
|
|
|
1931
1979
|
export { Bubble }
|
|
1932
1980
|
export { Bubble as TrBubble }
|
|
1933
1981
|
|
|
1934
|
-
export declare
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
* 气泡头像
|
|
1941
|
-
*/
|
|
1942
|
-
avatar?: VNode;
|
|
1943
|
-
/**
|
|
1944
|
-
* 气泡形状,默认 'corner'
|
|
1945
|
-
*/
|
|
1946
|
-
shape?: 'rounded' | 'corner';
|
|
1947
|
-
/**
|
|
1948
|
-
* 气泡内容渲染器。
|
|
1949
|
-
* 如果 Bubble 中的 content 是长度大于 0 的数组,则 contentRenderer 无效。将会使用 BubbleProvider 中注册的渲染器
|
|
1950
|
-
*/
|
|
1951
|
-
contentRenderer?: BubbleContentRenderer;
|
|
1952
|
-
/**
|
|
1953
|
-
* 自定义气泡内容字段。比如 customContentField 设置为 'my-content',则 Bubble 优先渲染 my-content 属性到气泡内容
|
|
1954
|
-
*/
|
|
1955
|
-
customContentField?: string;
|
|
1956
|
-
/**
|
|
1957
|
-
* 气泡中止文本
|
|
1958
|
-
*/
|
|
1959
|
-
abortedText?: string;
|
|
1960
|
-
/**
|
|
1961
|
-
* 气泡最大宽度
|
|
1962
|
-
*/
|
|
1963
|
-
maxWidth?: string | number;
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
|
-
export declare abstract class BubbleContentClassRenderer {
|
|
1967
|
-
abstract render(options: {
|
|
1968
|
-
[key: string]: any;
|
|
1969
|
-
}): VNode;
|
|
1970
|
-
}
|
|
1982
|
+
export declare type BubbleBoxRendererMatch = {
|
|
1983
|
+
find: (messages: BubbleMessage[], contentIndex?: number) => boolean;
|
|
1984
|
+
renderer: Component<BubbleBoxRendererProps>;
|
|
1985
|
+
priority?: number;
|
|
1986
|
+
attributes?: Record<string, string>;
|
|
1987
|
+
};
|
|
1971
1988
|
|
|
1972
|
-
export declare type
|
|
1973
|
-
[key: string]: any;
|
|
1974
|
-
}) => VNode;
|
|
1989
|
+
export declare type BubbleBoxRendererProps = Pick<BubbleProps, 'placement' | 'shape'>;
|
|
1975
1990
|
|
|
1976
|
-
export declare
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1991
|
+
export declare type BubbleContentRendererMatch = {
|
|
1992
|
+
find: (message: BubbleMessage, contentIndex?: number) => boolean;
|
|
1993
|
+
renderer: Component<BubbleContentRendererProps>;
|
|
1994
|
+
priority?: number;
|
|
1995
|
+
attributes?: Record<string, string>;
|
|
1996
|
+
};
|
|
1980
1997
|
|
|
1981
|
-
export declare type
|
|
1982
|
-
|
|
1983
|
-
|
|
1998
|
+
export declare type BubbleContentRendererProps<T extends ChatMessageContent = ChatMessageContent, S extends Record<string, unknown> = Record<string, unknown>> = {
|
|
1999
|
+
message: BubbleMessage<T, S>;
|
|
2000
|
+
contentIndex?: number;
|
|
1984
2001
|
};
|
|
1985
2002
|
|
|
2003
|
+
/**
|
|
2004
|
+
* 自定义分组函数类型
|
|
2005
|
+
*/
|
|
2006
|
+
declare type BubbleGroupFunction = (messages: BubbleMessage[], dividerRole?: string) => BubbleMessageGroup[];
|
|
2007
|
+
|
|
1986
2008
|
declare const bubbleInstall: (app: App) => void;
|
|
1987
2009
|
|
|
1988
2010
|
declare const BubbleList: typeof _default_19 & {
|
|
@@ -1994,56 +2016,79 @@ export { BubbleList as TrBubbleList }
|
|
|
1994
2016
|
declare const bubbleListInstall: (app: App) => void;
|
|
1995
2017
|
|
|
1996
2018
|
export declare interface BubbleListProps {
|
|
1997
|
-
|
|
1998
|
-
slots?: BubbleSlots;
|
|
1999
|
-
})[];
|
|
2019
|
+
messages: BubbleMessage[];
|
|
2000
2020
|
/**
|
|
2001
|
-
*
|
|
2021
|
+
* 分组策略:
|
|
2022
|
+
* - 'consecutive': 连续相同角色的消息合并为一组
|
|
2023
|
+
* - 'divider': 按分割角色分组(连续的分割角色在一组,其他消息在另一组)
|
|
2024
|
+
* - 自定义函数: (messages, dividerRole) => BubbleMessageGroup[]
|
|
2025
|
+
*
|
|
2026
|
+
* 特殊情况:
|
|
2027
|
+
* - 当 message 的 content 为数组时,该 message 会被单独作为一个独立分组
|
|
2028
|
+
* - 该独立分组会被"密封",后续的消息(即使角色相同)也不会被添加到这个分组中
|
|
2002
2029
|
*/
|
|
2003
|
-
|
|
2030
|
+
groupStrategy?: 'consecutive' | 'divider' | BubbleGroupFunction;
|
|
2004
2031
|
/**
|
|
2005
|
-
*
|
|
2032
|
+
* 'divider' 策略的分割角色
|
|
2033
|
+
* 具有此角色的消息将作为分割线
|
|
2034
|
+
* @default 'user'
|
|
2006
2035
|
*/
|
|
2007
|
-
|
|
2036
|
+
dividerRole?: string;
|
|
2037
|
+
/**
|
|
2038
|
+
* 当消息没有角色或角色为空时,使用此角色
|
|
2039
|
+
* @default 'assistant'
|
|
2040
|
+
*/
|
|
2041
|
+
fallbackRole?: string;
|
|
2008
2042
|
/**
|
|
2009
|
-
*
|
|
2043
|
+
* 角色配置(头像、位置、形状)
|
|
2044
|
+
*/
|
|
2045
|
+
roleConfigs?: Record<string, BubbleRoleConfig>;
|
|
2046
|
+
contentRenderMode?: BubbleProps['contentRenderMode'];
|
|
2047
|
+
/**
|
|
2048
|
+
* 是否自动滚动到底部。需要满足以下条件:
|
|
2049
|
+
* - BubbleList 是可滚动容器(需要 scrollHeight > clientHeight)
|
|
2050
|
+
* - 滚动容器接近底部
|
|
2051
|
+
*
|
|
2052
|
+
* @default false
|
|
2010
2053
|
*/
|
|
2011
|
-
loadingRole?: string;
|
|
2012
2054
|
autoScroll?: boolean;
|
|
2013
2055
|
}
|
|
2014
2056
|
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
readonly sanitizeDisabled: boolean;
|
|
2019
|
-
readonly defaultAttrs: Record<string, unknown>;
|
|
2020
|
-
private md;
|
|
2021
|
-
constructor(options?: BubbleMarkdownRendererOptions);
|
|
2022
|
-
render(options: {
|
|
2023
|
-
content?: string;
|
|
2024
|
-
[key: string]: unknown;
|
|
2025
|
-
}): VNode<RendererNode, RendererElement, {
|
|
2026
|
-
[key: string]: any;
|
|
2027
|
-
}>;
|
|
2028
|
-
}
|
|
2057
|
+
declare type BubbleListSlotProps = BubbleSlotProps & {
|
|
2058
|
+
messageIndexes: number[];
|
|
2059
|
+
};
|
|
2029
2060
|
|
|
2030
|
-
declare interface
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2061
|
+
export declare interface BubbleListSlots {
|
|
2062
|
+
prefix?: (slotProps: BubbleListSlotProps) => VNode | VNode[];
|
|
2063
|
+
suffix?: (slotProps: BubbleListSlotProps) => VNode | VNode[];
|
|
2064
|
+
after?: (slotProps: BubbleListSlotProps) => VNode | VNode[];
|
|
2065
|
+
'content-footer'?: (slotProps: BubbleListSlotProps & {
|
|
2066
|
+
contentIndex?: number;
|
|
2067
|
+
}) => VNode | VNode[];
|
|
2035
2068
|
}
|
|
2036
2069
|
|
|
2037
|
-
export declare
|
|
2038
|
-
|
|
2039
|
-
* 气泡内容
|
|
2040
|
-
*/
|
|
2041
|
-
content?: string | BubbleContentItem[];
|
|
2042
|
-
id?: string | number | symbol;
|
|
2043
|
-
role?: string;
|
|
2070
|
+
export declare type BubbleMessage<T extends ChatMessageContent = ChatMessageContent, S extends Record<string, unknown> = Record<string, unknown>> = ChatMessageWithOptionalRole<T> & {
|
|
2071
|
+
id?: string;
|
|
2044
2072
|
loading?: boolean;
|
|
2045
|
-
|
|
2046
|
-
}
|
|
2073
|
+
state?: S;
|
|
2074
|
+
};
|
|
2075
|
+
|
|
2076
|
+
export declare type BubbleMessageGroup = {
|
|
2077
|
+
role: string;
|
|
2078
|
+
messages: BubbleMessage[];
|
|
2079
|
+
messageIndexes: number[];
|
|
2080
|
+
startIndex: number;
|
|
2081
|
+
};
|
|
2082
|
+
|
|
2083
|
+
export declare type BubbleProps = BubbleMessage & {
|
|
2084
|
+
hidden?: boolean;
|
|
2085
|
+
avatar?: VNode | Component;
|
|
2086
|
+
placement?: 'start' | 'end';
|
|
2087
|
+
shape?: 'corner' | 'rounded' | 'none';
|
|
2088
|
+
contentRenderMode?: 'single' | 'split';
|
|
2089
|
+
fallbackBoxRenderer?: Component<BubbleBoxRendererProps>;
|
|
2090
|
+
fallbackContentRenderer?: Component<BubbleContentRendererProps>;
|
|
2091
|
+
};
|
|
2047
2092
|
|
|
2048
2093
|
declare const BubbleProvider: typeof _default_20 & {
|
|
2049
2094
|
install: typeof bubbleProviderInstall;
|
|
@@ -2053,28 +2098,139 @@ export { BubbleProvider as TrBubbleProvider }
|
|
|
2053
2098
|
|
|
2054
2099
|
declare const bubbleProviderInstall: (app: App) => void;
|
|
2055
2100
|
|
|
2056
|
-
export declare
|
|
2057
|
-
|
|
2058
|
-
|
|
2101
|
+
export declare interface BubbleProviderProps {
|
|
2102
|
+
boxRendererMatches?: BubbleBoxRendererMatch[];
|
|
2103
|
+
contentRendererMatches?: BubbleContentRendererMatch[];
|
|
2104
|
+
fallbackBoxRenderer?: Component<BubbleBoxRendererProps>;
|
|
2105
|
+
fallbackContentRenderer?: Component<BubbleContentRendererProps>;
|
|
2106
|
+
initialStore?: Record<string, unknown>;
|
|
2107
|
+
}
|
|
2108
|
+
|
|
2109
|
+
/**
|
|
2110
|
+
* 气泡渲染器匹配优先级常量
|
|
2111
|
+
*
|
|
2112
|
+
* 用于定义不同类型渲染器的匹配优先级,数值越小优先级越高
|
|
2113
|
+
*
|
|
2114
|
+
* - LOADING: 通常基于 message.loading 判断。比如: `{ loading: true }`
|
|
2115
|
+
* - NORMAL: 普通渲染器的默认优先级
|
|
2116
|
+
* - CONTENT: 通常基于 message.content 判断。比如: `{ content: [{ type: 'image_url', image_url: 'xxx' }] }`
|
|
2117
|
+
* - ROLE: 通常基于 message.role 判断。比如: `{ role: 'tool' }`
|
|
2118
|
+
*/
|
|
2119
|
+
export declare const BubbleRendererMatchPriority: {
|
|
2120
|
+
readonly LOADING: -1;
|
|
2121
|
+
readonly NORMAL: 0;
|
|
2122
|
+
readonly CONTENT: 10;
|
|
2123
|
+
readonly ROLE: 20;
|
|
2124
|
+
};
|
|
2125
|
+
|
|
2126
|
+
export declare const BubbleRenderers: {
|
|
2127
|
+
Box: {
|
|
2128
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<BubbleBoxRendererProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
|
|
2129
|
+
P: {};
|
|
2130
|
+
B: {};
|
|
2131
|
+
D: {};
|
|
2132
|
+
C: {};
|
|
2133
|
+
M: {};
|
|
2134
|
+
Defaults: {};
|
|
2135
|
+
}, Readonly<BubbleBoxRendererProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
2136
|
+
__isFragment?: never;
|
|
2137
|
+
__isTeleport?: never;
|
|
2138
|
+
__isSuspense?: never;
|
|
2139
|
+
} & ComponentOptionsBase<Readonly<BubbleBoxRendererProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
2140
|
+
$slots: {
|
|
2141
|
+
default?(_: {}): any;
|
|
2142
|
+
};
|
|
2143
|
+
});
|
|
2144
|
+
Image: DefineComponent< {
|
|
2145
|
+
message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
|
|
2146
|
+
contentIndex?: number;
|
|
2147
|
+
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
|
|
2148
|
+
message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
|
|
2149
|
+
contentIndex?: number;
|
|
2150
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLImageElement>;
|
|
2151
|
+
Loading: DefineComponent< {
|
|
2152
|
+
message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
|
|
2153
|
+
contentIndex?: number;
|
|
2154
|
+
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
|
|
2155
|
+
message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
|
|
2156
|
+
contentIndex?: number;
|
|
2157
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
2158
|
+
Markdown: DefineComponent< {
|
|
2159
|
+
message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
|
|
2160
|
+
contentIndex?: number;
|
|
2161
|
+
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
|
|
2162
|
+
message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
|
|
2163
|
+
contentIndex?: number;
|
|
2164
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
2165
|
+
Reasoning: DefineComponent< {
|
|
2166
|
+
message: BubbleMessage<ChatMessageContent, {
|
|
2167
|
+
thinking?: boolean;
|
|
2168
|
+
open?: boolean;
|
|
2169
|
+
}>;
|
|
2170
|
+
contentIndex?: number;
|
|
2171
|
+
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
|
|
2172
|
+
message: BubbleMessage<ChatMessageContent, {
|
|
2173
|
+
thinking?: boolean;
|
|
2174
|
+
open?: boolean;
|
|
2175
|
+
}>;
|
|
2176
|
+
contentIndex?: number;
|
|
2177
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
2178
|
+
Text: DefineComponent< {
|
|
2179
|
+
message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
|
|
2180
|
+
contentIndex?: number;
|
|
2181
|
+
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
|
|
2182
|
+
message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
|
|
2183
|
+
contentIndex?: number;
|
|
2184
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
2185
|
+
Tool: DefineComponent<BubbleContentRendererProps<ChatMessageContent, {
|
|
2186
|
+
toolCall?: Record<string, {
|
|
2187
|
+
status?: "success" | "running" | "failed" | "cancelled";
|
|
2188
|
+
open?: boolean;
|
|
2189
|
+
}>;
|
|
2190
|
+
}> & {
|
|
2191
|
+
toolIndex: number;
|
|
2192
|
+
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BubbleContentRendererProps<ChatMessageContent, {
|
|
2193
|
+
toolCall?: Record<string, {
|
|
2194
|
+
status?: "success" | "running" | "failed" | "cancelled";
|
|
2195
|
+
open?: boolean;
|
|
2196
|
+
}>;
|
|
2197
|
+
}> & {
|
|
2198
|
+
toolIndex: number;
|
|
2199
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
2200
|
+
ToolRole: DefineComponent< {
|
|
2201
|
+
message: BubbleMessage<string, Record<string, unknown>>;
|
|
2202
|
+
contentIndex?: number;
|
|
2203
|
+
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
|
|
2204
|
+
message: BubbleMessage<string, Record<string, unknown>>;
|
|
2205
|
+
contentIndex?: number;
|
|
2206
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
2207
|
+
Tools: DefineComponent< {
|
|
2208
|
+
message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
|
|
2209
|
+
contentIndex?: number;
|
|
2210
|
+
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
|
|
2211
|
+
message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
|
|
2212
|
+
contentIndex?: number;
|
|
2213
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
2214
|
+
};
|
|
2215
|
+
|
|
2216
|
+
/**
|
|
2217
|
+
* 角色配置
|
|
2218
|
+
* 用于配置不同角色的气泡样式
|
|
2219
|
+
*/
|
|
2220
|
+
export declare type BubbleRoleConfig = Pick<BubbleProps, 'avatar' | 'placement' | 'shape' | 'hidden' | 'fallbackBoxRenderer' | 'fallbackContentRenderer'>;
|
|
2221
|
+
|
|
2222
|
+
declare type BubbleSlotProps = {
|
|
2223
|
+
messages: BubbleMessage[];
|
|
2224
|
+
role?: string;
|
|
2059
2225
|
};
|
|
2060
2226
|
|
|
2061
2227
|
export declare interface BubbleSlots {
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
index?: number;
|
|
2069
|
-
}) => unknown;
|
|
2070
|
-
loading?: (slotProps: {
|
|
2071
|
-
bubbleProps: BubbleProps;
|
|
2072
|
-
index?: number;
|
|
2073
|
-
}) => unknown;
|
|
2074
|
-
trailer?: (slotProps: {
|
|
2075
|
-
bubbleProps: BubbleProps;
|
|
2076
|
-
index?: number;
|
|
2077
|
-
}) => unknown;
|
|
2228
|
+
prefix?: (slotProps: BubbleSlotProps) => VNode | VNode[];
|
|
2229
|
+
suffix?: (slotProps: BubbleSlotProps) => VNode | VNode[];
|
|
2230
|
+
after?: (slotProps: BubbleSlotProps) => VNode | VNode[];
|
|
2231
|
+
'content-footer'?: (slotProps: BubbleSlotProps & {
|
|
2232
|
+
contentIndex?: number;
|
|
2233
|
+
}) => VNode | VNode[];
|
|
2078
2234
|
}
|
|
2079
2235
|
|
|
2080
2236
|
export declare interface ButtonGroupConfig {
|
|
@@ -2083,6 +2239,29 @@ export declare interface ButtonGroupConfig {
|
|
|
2083
2239
|
voice?: VoiceButtonConfig;
|
|
2084
2240
|
}
|
|
2085
2241
|
|
|
2242
|
+
/**
|
|
2243
|
+
* 聊天消息接口(支持 OpenAI 格式)
|
|
2244
|
+
*/
|
|
2245
|
+
declare interface ChatMessage<T extends ChatMessageContent = ChatMessageContent> {
|
|
2246
|
+
role: string;
|
|
2247
|
+
content?: T;
|
|
2248
|
+
reasoning_content?: string;
|
|
2249
|
+
tool_calls?: ToolCall[];
|
|
2250
|
+
tool_call_id?: string;
|
|
2251
|
+
name?: string;
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2254
|
+
export declare type ChatMessageContent = string | ChatMessageContentItem[];
|
|
2255
|
+
|
|
2256
|
+
export declare type ChatMessageContentItem = {
|
|
2257
|
+
type: string;
|
|
2258
|
+
[key: string]: any;
|
|
2259
|
+
};
|
|
2260
|
+
|
|
2261
|
+
declare type ChatMessageWithOptionalRole<T extends ChatMessageContent = ChatMessageContent> = Omit<ChatMessage<T>, 'role'> & {
|
|
2262
|
+
role?: string;
|
|
2263
|
+
};
|
|
2264
|
+
|
|
2086
2265
|
export declare type ColorMode = 'light' | 'dark' | 'auto';
|
|
2087
2266
|
|
|
2088
2267
|
export declare interface ContainerEmits {
|
|
@@ -2189,9 +2368,7 @@ variant: DisplayVariant;
|
|
|
2189
2368
|
|
|
2190
2369
|
declare const _default_18: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
2191
2370
|
|
|
2192
|
-
declare const _default_19:
|
|
2193
|
-
scrollContainerRef: HTMLDivElement;
|
|
2194
|
-
}, HTMLDivElement>;
|
|
2371
|
+
declare const _default_19: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
2195
2372
|
|
|
2196
2373
|
declare const _default_2: typeof _default_17 & {
|
|
2197
2374
|
install: typeof install;
|
|
@@ -2199,15 +2376,15 @@ declare const _default_2: typeof _default_17 & {
|
|
|
2199
2376
|
export { _default_2 as Attachments }
|
|
2200
2377
|
export { _default_2 as TrAttachments }
|
|
2201
2378
|
|
|
2202
|
-
declare const _default_20:
|
|
2379
|
+
declare const _default_20: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
|
|
2203
2380
|
|
|
2204
|
-
declare const _default_21:
|
|
2381
|
+
declare const _default_21: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
|
|
2205
2382
|
|
|
2206
2383
|
declare const _default_22: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
2207
2384
|
|
|
2208
|
-
declare const _default_23:
|
|
2385
|
+
declare const _default_23: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
|
|
2209
2386
|
|
|
2210
|
-
declare const _default_24:
|
|
2387
|
+
declare const _default_24: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
|
|
2211
2388
|
|
|
2212
2389
|
declare const _default_25: DefineComponent<FeedbackProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
2213
2390
|
action: (name: string) => any;
|
|
@@ -2244,7 +2421,7 @@ declare const _default_28: DefineComponent<PromptProps, {}, {}, {}, {}, Componen
|
|
|
2244
2421
|
size: "small" | "medium" | "large";
|
|
2245
2422
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
2246
2423
|
|
|
2247
|
-
declare const _default_29:
|
|
2424
|
+
declare const _default_29: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
|
|
2248
2425
|
|
|
2249
2426
|
declare const _default_3: typeof _default_21 & {
|
|
2250
2427
|
install: typeof install_2;
|
|
@@ -2252,17 +2429,17 @@ declare const _default_3: typeof _default_21 & {
|
|
|
2252
2429
|
export { _default_3 as Container }
|
|
2253
2430
|
export { _default_3 as TrContainer }
|
|
2254
2431
|
|
|
2255
|
-
declare const _default_30:
|
|
2432
|
+
declare const _default_30: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
|
|
2256
2433
|
|
|
2257
|
-
declare const _default_31:
|
|
2434
|
+
declare const _default_31: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
|
|
2258
2435
|
|
|
2259
|
-
declare const _default_32:
|
|
2436
|
+
declare const _default_32: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
|
|
2260
2437
|
|
|
2261
|
-
declare const _default_33:
|
|
2438
|
+
declare const _default_33: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
|
|
2262
2439
|
|
|
2263
|
-
declare const _default_34:
|
|
2440
|
+
declare const _default_34: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
|
|
2264
2441
|
|
|
2265
|
-
declare const _default_35:
|
|
2442
|
+
declare const _default_35: __VLS_WithTemplateSlots_13<typeof __VLS_component_13, __VLS_TemplateResult_13["slots"]>;
|
|
2266
2443
|
|
|
2267
2444
|
declare const _default_36: DefineComponent<__VLS_PublicProps_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
2268
2445
|
"update:visible": (value: boolean) => any;
|
|
@@ -3191,6 +3368,19 @@ export declare type ThemeStorage = Pick<Storage, 'getItem' | 'setItem'>;
|
|
|
3191
3368
|
*/
|
|
3192
3369
|
export declare type ThemeType = 'light' | 'dark';
|
|
3193
3370
|
|
|
3371
|
+
/**
|
|
3372
|
+
* 工具调用接口(支持 OpenAI 格式)
|
|
3373
|
+
*/
|
|
3374
|
+
declare interface ToolCall {
|
|
3375
|
+
id: string;
|
|
3376
|
+
type: 'function' | string;
|
|
3377
|
+
function: {
|
|
3378
|
+
name: string;
|
|
3379
|
+
arguments: string;
|
|
3380
|
+
};
|
|
3381
|
+
[x: string]: any;
|
|
3382
|
+
}
|
|
3383
|
+
|
|
3194
3384
|
declare interface TooltipContentProps {
|
|
3195
3385
|
show?: boolean;
|
|
3196
3386
|
content: string;
|
|
@@ -3209,6 +3399,43 @@ export declare interface UrlAttachment extends BaseAttachment {
|
|
|
3209
3399
|
rawFile?: File;
|
|
3210
3400
|
}
|
|
3211
3401
|
|
|
3402
|
+
/**
|
|
3403
|
+
* 当目标滚动容器 `target` 接近底部时,且源数据 `source` 变化,自动滚动到底部
|
|
3404
|
+
* @param target 目标滚动容器的元素引用
|
|
3405
|
+
* @param source 监听的源数据,当该数据变化时会触发自动滚动
|
|
3406
|
+
* @param options 配置选项
|
|
3407
|
+
* @param options.scrollOnMount 是否在组件挂载时滚动到底部,默认为 true
|
|
3408
|
+
* @param options.bottomThreshold 判断接近底部的阈值(像素),默认为 20
|
|
3409
|
+
* @returns scrollToBottom 手动滚动到底部的方法
|
|
3410
|
+
*/
|
|
3411
|
+
export declare function useAutoScroll(target: MaybeComputedElementRef, source: MaybeRefOrGetter<any>, options?: {
|
|
3412
|
+
scrollOnMount?: boolean;
|
|
3413
|
+
scrollThrottle?: number;
|
|
3414
|
+
bottomThreshold?: number;
|
|
3415
|
+
}): {
|
|
3416
|
+
scrollToBottom: (behavior?: ScrollBehavior) => Promise<void>;
|
|
3417
|
+
};
|
|
3418
|
+
|
|
3419
|
+
export declare function useBubbleBoxRenderer(messages: MaybeRefOrGetter<BubbleMessage[]>, contentIndex?: number): ComputedRef<{
|
|
3420
|
+
renderer: Component;
|
|
3421
|
+
attributes?: Record<string, string>;
|
|
3422
|
+
}>;
|
|
3423
|
+
|
|
3424
|
+
export declare function useBubbleContentRenderer(message: MaybeRefOrGetter<BubbleMessage>, contentIndex?: number): ComputedRef<Component>;
|
|
3425
|
+
|
|
3426
|
+
export declare function useBubbleStateChangeFn(): (key: string, _value: unknown) => void;
|
|
3427
|
+
|
|
3428
|
+
/**
|
|
3429
|
+
* Omit specified fields from message and return computed props
|
|
3430
|
+
* @param props - The original props containing the message
|
|
3431
|
+
* @param fields - Array of field names to omit from the message
|
|
3432
|
+
* @returns An object containing restMessage and restProps computed refs
|
|
3433
|
+
*/
|
|
3434
|
+
export declare function useOmitMessageFields<P extends BubbleContentRendererProps, K extends keyof BubbleMessage>(props: P, fields: K[]): {
|
|
3435
|
+
restMessage: ComputedRef<Omit<BubbleMessage, K>>;
|
|
3436
|
+
restProps: ComputedRef<P>;
|
|
3437
|
+
};
|
|
3438
|
+
|
|
3212
3439
|
export declare type UserItem = UserTextItem | UserTemplateItem;
|
|
3213
3440
|
|
|
3214
3441
|
export declare type UserTemplateItem = Omit<Pick<TemplateItem, 'type' | 'content'>, 'id'> & {
|