@opentiny/tiny-robot 0.3.1-alpha.8 → 0.3.1-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base-popper/index.js +1 -1
- package/dist/bubble/index.js +4017 -11
- package/dist/chat-input/index.js +3154 -0
- package/dist/dropdown-menu/index.js +1 -1
- package/dist/history/index.js +1 -1
- package/dist/index.d.ts +684 -968
- package/dist/index.js +104 -108
- package/dist/index2.js +90 -90
- package/dist/index3.js +150 -155
- package/dist/index4.js +295 -319
- package/dist/index5.js +279 -507
- package/dist/index6.js +146 -286
- package/dist/loading.js +4 -0
- package/dist/mcp-server-picker/index.js +57 -58
- package/dist/sender/index.js +6 -3261
- package/dist/sender-compat/index.js +109 -105
- package/dist/style.css +1 -1
- package/dist/suggestion-popover/index.js +185 -184
- package/package.json +17 -17
- package/dist/index7.js +0 -161
- /package/dist/{sender-actions → chat-input-actions}/index.js +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AllowedComponentProps } from 'vue';
|
|
2
2
|
import { App } from 'vue';
|
|
3
|
+
import { Attrs } from 'vue';
|
|
3
4
|
import { Component } from 'vue';
|
|
4
5
|
import { ComponentCustomProperties } from 'vue';
|
|
5
6
|
import { ComponentCustomProps } from 'vue';
|
|
@@ -9,6 +10,7 @@ import { ComponentOptionsMixin } from 'vue';
|
|
|
9
10
|
import { ComponentProvideOptions } from 'vue';
|
|
10
11
|
import { ComponentPublicInstance } from 'vue';
|
|
11
12
|
import { ComputedRef } from 'vue';
|
|
13
|
+
import { Config } from 'dompurify';
|
|
12
14
|
import { CreateComponentPublicInstanceWithMixins } from 'vue';
|
|
13
15
|
import { CSSProperties } from 'vue';
|
|
14
16
|
import { DebuggerEvent } from 'vue';
|
|
@@ -19,13 +21,14 @@ import { Editor as Editor_2 } from '@tiptap/core';
|
|
|
19
21
|
import { Extension } from '@tiptap/core';
|
|
20
22
|
import { GlobalComponents } from 'vue';
|
|
21
23
|
import { GlobalDirectives } from 'vue';
|
|
22
|
-
import { MaybeComputedElementRef } from '@vueuse/core';
|
|
23
|
-
import { MaybeRefOrGetter } from 'vue';
|
|
24
24
|
import { nextTick } from 'vue';
|
|
25
25
|
import { Node as Node_2 } from '@tiptap/core';
|
|
26
26
|
import { OnCleanup } from '@vue/reactivity';
|
|
27
|
+
import { Options } from 'markdown-it';
|
|
27
28
|
import { PublicProps } from 'vue';
|
|
28
29
|
import { Ref } from 'vue';
|
|
30
|
+
import { RendererElement } from 'vue';
|
|
31
|
+
import { RendererNode } from 'vue';
|
|
29
32
|
import { ShallowUnwrapRef } from 'vue';
|
|
30
33
|
import { Slot } from 'vue';
|
|
31
34
|
import { TransitionProps } from 'vue';
|
|
@@ -35,47 +38,14 @@ import { VNodeProps } from 'vue';
|
|
|
35
38
|
import { WatchOptions } from 'vue';
|
|
36
39
|
import { WatchStopHandle } from 'vue';
|
|
37
40
|
|
|
38
|
-
declare const __VLS_component: DefineComponent<BubbleProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
39
|
-
|
|
40
|
-
key: string;
|
|
41
|
-
value: unknown;
|
|
42
|
-
messageIndex: number;
|
|
43
|
-
contentIndex?: number;
|
|
44
|
-
}) => any;
|
|
45
|
-
}, string, PublicProps, Readonly<BubbleProps> & Readonly<{
|
|
46
|
-
"onState-change"?: ((payload: {
|
|
47
|
-
key: string;
|
|
48
|
-
value: unknown;
|
|
49
|
-
messageIndex: number;
|
|
50
|
-
contentIndex?: number;
|
|
51
|
-
}) => any) | undefined;
|
|
52
|
-
}>, {
|
|
41
|
+
declare const __VLS_component: DefineComponent<BubbleProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BubbleProps> & Readonly<{}>, {
|
|
42
|
+
content: string | BubbleContentItem[];
|
|
53
43
|
placement: "start" | "end";
|
|
54
|
-
shape: "
|
|
55
|
-
|
|
44
|
+
shape: "rounded" | "corner";
|
|
45
|
+
abortedText: string;
|
|
56
46
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
57
47
|
|
|
58
|
-
declare const __VLS_component_10: DefineComponent<
|
|
59
|
-
children: ComputedRef<(HTMLElement | SVGElement)[]>;
|
|
60
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
61
|
-
"update:showAll": (value: boolean | undefined) => any;
|
|
62
|
-
} & {
|
|
63
|
-
"click-outside": (event: MouseEvent) => any;
|
|
64
|
-
}, string, PublicProps, Readonly<__VLS_PublicProps_3> & Readonly<{
|
|
65
|
-
"onClick-outside"?: ((event: MouseEvent) => any) | undefined;
|
|
66
|
-
"onUpdate:showAll"?: ((value: boolean | undefined) => any) | undefined;
|
|
67
|
-
}>, {
|
|
68
|
-
showAllButtonOn: "hover" | "always";
|
|
69
|
-
overflowMode: "expand" | "scroll";
|
|
70
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
71
|
-
containerWrapperRef: HTMLDivElement;
|
|
72
|
-
containerRef: HTMLDivElement;
|
|
73
|
-
staticMaybeItemRefs: unknown[];
|
|
74
|
-
floatingItemsRef: HTMLDivElement;
|
|
75
|
-
floatingMaybeItemRefs: unknown[];
|
|
76
|
-
}, HTMLDivElement>;
|
|
77
|
-
|
|
78
|
-
declare const __VLS_component_11: DefineComponent<__VLS_PublicProps_4, {
|
|
48
|
+
declare const __VLS_component_10: DefineComponent<__VLS_PublicProps_4, {
|
|
79
49
|
update: () => void;
|
|
80
50
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
81
51
|
"update:selectedGroup": (value: string) => any;
|
|
@@ -113,9 +83,7 @@ readonly show?: boolean | undefined;
|
|
|
113
83
|
readonly transitionProps?: TransitionProps | undefined;
|
|
114
84
|
readonly triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>> | undefined;
|
|
115
85
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
116
|
-
$attrs:
|
|
117
|
-
[x: string]: unknown;
|
|
118
|
-
};
|
|
86
|
+
$attrs: Attrs;
|
|
119
87
|
$refs: {
|
|
120
88
|
[x: string]: unknown;
|
|
121
89
|
};
|
|
@@ -211,7 +179,7 @@ show?: TooltipContentProps["show"];
|
|
|
211
179
|
}>, {}, {}, {}, {}, {}> | null;
|
|
212
180
|
}, any>;
|
|
213
181
|
|
|
214
|
-
declare const
|
|
182
|
+
declare const __VLS_component_11: DefineComponent<__VLS_PublicProps_5, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
215
183
|
"update:theme": (value: string) => any;
|
|
216
184
|
"update:colorMode": (value: ColorMode) => any;
|
|
217
185
|
}, string, PublicProps, Readonly<__VLS_PublicProps_5> & Readonly<{
|
|
@@ -222,68 +190,18 @@ targetElement: string;
|
|
|
222
190
|
storageKey: string;
|
|
223
191
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
224
192
|
|
|
225
|
-
declare const
|
|
193
|
+
declare const __VLS_component_12: DefineComponent<WelcomeProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<WelcomeProps> & Readonly<{}>, {
|
|
226
194
|
align: "left" | "center" | "right" | string;
|
|
227
195
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
228
196
|
|
|
229
|
-
declare const
|
|
230
|
-
|
|
231
|
-
} & {
|
|
232
|
-
refresh: (tab: "installed" | "market") => any;
|
|
233
|
-
"update:visible": (visible: boolean) => any;
|
|
234
|
-
"market-category-change": (category: string) => any;
|
|
235
|
-
"tab-change": (activeTab: "installed" | "market") => any;
|
|
236
|
-
"plugin-toggle": (plugin: PluginInfo, enabled: boolean) => any;
|
|
237
|
-
"plugin-delete": (plugin: PluginInfo) => any;
|
|
238
|
-
"plugin-add": (plugin: PluginInfo) => any;
|
|
239
|
-
"plugin-create": (type: "code" | "form", data: PluginCreationData) => any;
|
|
240
|
-
"tool-toggle": (plugin: PluginInfo, toolId: string, enabled: boolean) => any;
|
|
241
|
-
"update:activeCount": (count: number) => any;
|
|
242
|
-
}, string, PublicProps, Readonly<__VLS_PublicProps_6> & Readonly<{
|
|
243
|
-
onRefresh?: ((tab: "installed" | "market") => any) | undefined;
|
|
244
|
-
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
245
|
-
"onMarket-category-change"?: ((category: string) => any) | undefined;
|
|
246
|
-
"onTab-change"?: ((activeTab: "installed" | "market") => any) | undefined;
|
|
247
|
-
"onPlugin-toggle"?: ((plugin: PluginInfo, enabled: boolean) => any) | undefined;
|
|
248
|
-
"onPlugin-delete"?: ((plugin: PluginInfo) => any) | undefined;
|
|
249
|
-
"onPlugin-add"?: ((plugin: PluginInfo) => any) | undefined;
|
|
250
|
-
"onPlugin-create"?: ((type: "code" | "form", data: PluginCreationData) => any) | undefined;
|
|
251
|
-
"onTool-toggle"?: ((plugin: PluginInfo, toolId: string, enabled: boolean) => any) | undefined;
|
|
252
|
-
"onUpdate:activeCount"?: ((count: number) => any) | undefined;
|
|
253
|
-
}>, {
|
|
254
|
-
title: string;
|
|
255
|
-
loading: boolean;
|
|
256
|
-
installedPlugins: PluginInfo[];
|
|
257
|
-
marketPlugins: PluginInfo[];
|
|
258
|
-
searchPlaceholder: string;
|
|
259
|
-
enableSearch: boolean;
|
|
260
|
-
installedSearchFn: (query: string, item: PluginInfo) => boolean;
|
|
261
|
-
marketSearchFn: (query: string, item: PluginInfo) => boolean;
|
|
262
|
-
marketCategoryOptions: MarketCategoryOption[];
|
|
263
|
-
marketCategoryPlaceholder: string;
|
|
264
|
-
enableMarketCategoryFilter: boolean;
|
|
265
|
-
defaultActiveTab: "installed" | "market";
|
|
266
|
-
showInstalledTab: boolean;
|
|
267
|
-
showMarketTab: boolean;
|
|
268
|
-
popupConfig: PopupConfig;
|
|
269
|
-
installedTabTitle: string;
|
|
270
|
-
marketTabTitle: string;
|
|
271
|
-
showCustomAddButton: boolean;
|
|
272
|
-
customAddButtonText: string;
|
|
273
|
-
allowPluginToggle: boolean;
|
|
274
|
-
allowToolToggle: boolean;
|
|
275
|
-
allowPluginDelete: boolean;
|
|
276
|
-
allowPluginAdd: boolean;
|
|
277
|
-
marketLoading: boolean;
|
|
278
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
279
|
-
|
|
280
|
-
declare const __VLS_component_15: DefineComponent<ActionButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ActionButtonProps> & Readonly<{}>, {
|
|
197
|
+
declare const __VLS_component_13: DefineComponent<ActionButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ActionButtonProps> & Readonly<{}>, {
|
|
198
|
+
size: string | number;
|
|
281
199
|
disabled: boolean;
|
|
282
200
|
active: boolean;
|
|
283
201
|
tooltipPlacement: TooltipPlacement;
|
|
284
202
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
285
203
|
|
|
286
|
-
declare const
|
|
204
|
+
declare const __VLS_component_14: DefineComponent<VoiceButtonProps, {
|
|
287
205
|
start: () => void;
|
|
288
206
|
stop: () => void;
|
|
289
207
|
speechState: SpeechState;
|
|
@@ -304,33 +222,11 @@ tooltipPlacement: TooltipPlacement;
|
|
|
304
222
|
autoInsert: boolean;
|
|
305
223
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
306
224
|
|
|
307
|
-
declare const __VLS_component_2: DefineComponent<
|
|
308
|
-
|
|
309
|
-
}, {}, {}, {},
|
|
310
|
-
"state-change": (payload: {
|
|
311
|
-
key: string;
|
|
312
|
-
value: unknown;
|
|
313
|
-
messageIndex: number;
|
|
314
|
-
contentIndex?: number;
|
|
315
|
-
}) => any;
|
|
316
|
-
}, string, PublicProps, Readonly<BubbleListProps> & Readonly<{
|
|
317
|
-
"onState-change"?: ((payload: {
|
|
318
|
-
key: string;
|
|
319
|
-
value: unknown;
|
|
320
|
-
messageIndex: number;
|
|
321
|
-
contentIndex?: number;
|
|
322
|
-
}) => any) | undefined;
|
|
323
|
-
}>, {
|
|
324
|
-
groupStrategy: "consecutive" | "divider" | ((messages: BubbleMessage[], dividerRole?: string) => BubbleMessageGroup[]);
|
|
325
|
-
dividerRole: string;
|
|
326
|
-
fallbackRole: string;
|
|
327
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
328
|
-
listRef: HTMLDivElement;
|
|
329
|
-
}, HTMLDivElement>;
|
|
330
|
-
|
|
331
|
-
declare const __VLS_component_3: DefineComponent<BubbleProviderProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BubbleProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
225
|
+
declare const __VLS_component_2: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
226
|
+
contentRenderers: Record<string, BubbleContentRenderer>;
|
|
227
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
332
228
|
|
|
333
|
-
declare const
|
|
229
|
+
declare const __VLS_component_3: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
334
230
|
"update:show": (value: boolean) => any;
|
|
335
231
|
"update:fullscreen": (value: boolean | undefined) => any;
|
|
336
232
|
} & {
|
|
@@ -343,9 +239,9 @@ onClose?: (() => any) | undefined;
|
|
|
343
239
|
title: string;
|
|
344
240
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
345
241
|
|
|
346
|
-
declare const
|
|
242
|
+
declare const __VLS_component_4: DefineComponent<DragOverlayProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<DragOverlayProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
347
243
|
|
|
348
|
-
declare const
|
|
244
|
+
declare const __VLS_component_5: DefineComponent<__VLS_PublicProps_2, {
|
|
349
245
|
update: () => void;
|
|
350
246
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
351
247
|
"update:show": (value: boolean) => any;
|
|
@@ -374,9 +270,7 @@ readonly show?: boolean | undefined;
|
|
|
374
270
|
readonly transitionProps?: TransitionProps | undefined;
|
|
375
271
|
readonly triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>> | undefined;
|
|
376
272
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
377
|
-
$attrs:
|
|
378
|
-
[x: string]: unknown;
|
|
379
|
-
};
|
|
273
|
+
$attrs: Attrs;
|
|
380
274
|
$refs: {
|
|
381
275
|
[x: string]: unknown;
|
|
382
276
|
};
|
|
@@ -453,13 +347,13 @@ content?: () => VNode[];
|
|
|
453
347
|
}) | null;
|
|
454
348
|
}, any>;
|
|
455
349
|
|
|
456
|
-
declare const
|
|
350
|
+
declare const __VLS_component_6: DefineComponent<PromptsProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
457
351
|
"item-click": (ev: MouseEvent, item: PromptProps) => any;
|
|
458
352
|
}, string, PublicProps, Readonly<PromptsProps> & Readonly<{
|
|
459
353
|
"onItem-click"?: ((ev: MouseEvent, item: PromptProps) => any) | undefined;
|
|
460
354
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
461
355
|
|
|
462
|
-
declare const
|
|
356
|
+
declare const __VLS_component_7: DefineComponent<SenderProps_2, {
|
|
463
357
|
focus: () => void;
|
|
464
358
|
blur: () => void;
|
|
465
359
|
clear: () => void;
|
|
@@ -501,10 +395,10 @@ onSubmit?: ((value: string) => any) | undefined;
|
|
|
501
395
|
"onFiles-selected"?: ((files: File[]) => any) | undefined;
|
|
502
396
|
}>, {
|
|
503
397
|
placeholder: string;
|
|
504
|
-
mode:
|
|
505
|
-
submitType:
|
|
398
|
+
mode: InputMode_2;
|
|
399
|
+
submitType: SubmitTrigger_2;
|
|
506
400
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
507
|
-
|
|
401
|
+
chatInputRef: ({
|
|
508
402
|
$: ComponentInternalInstance;
|
|
509
403
|
$data: {};
|
|
510
404
|
$props: {
|
|
@@ -532,9 +426,7 @@ readonly onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
|
532
426
|
readonly onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
|
|
533
427
|
readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
534
428
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
535
|
-
$attrs:
|
|
536
|
-
[x: string]: unknown;
|
|
537
|
-
};
|
|
429
|
+
$attrs: Attrs;
|
|
538
430
|
$refs: {
|
|
539
431
|
[x: string]: unknown;
|
|
540
432
|
};
|
|
@@ -629,7 +521,7 @@ header?(_: {}): any;
|
|
|
629
521
|
prefix?(_: {}): any;
|
|
630
522
|
prefix?(_: {}): any;
|
|
631
523
|
content?(_: {
|
|
632
|
-
editor: Editor | undefined
|
|
524
|
+
editor: Ref<Editor | undefined, Editor | undefined>;
|
|
633
525
|
}): any;
|
|
634
526
|
content?(_: {
|
|
635
527
|
editor: Ref<Editor | undefined, Editor | undefined>;
|
|
@@ -644,7 +536,6 @@ $: ComponentInternalInstance;
|
|
|
644
536
|
$data: {};
|
|
645
537
|
$props: {
|
|
646
538
|
readonly icon?: (VNode | Component) | undefined;
|
|
647
|
-
readonly recordingIcon?: (VNode | Component) | undefined;
|
|
648
539
|
readonly disabled?: boolean | undefined;
|
|
649
540
|
readonly size?: "small" | "normal" | undefined;
|
|
650
541
|
readonly tooltip?: TooltipContent | undefined;
|
|
@@ -658,9 +549,7 @@ readonly "onSpeech-final"?: ((transcript: string) => any) | undefined;
|
|
|
658
549
|
readonly "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
|
|
659
550
|
readonly "onSpeech-error"?: ((error: Error) => any) | undefined;
|
|
660
551
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
661
|
-
$attrs:
|
|
662
|
-
[x: string]: unknown;
|
|
663
|
-
};
|
|
552
|
+
$attrs: Attrs;
|
|
664
553
|
$refs: {
|
|
665
554
|
[x: string]: unknown;
|
|
666
555
|
};
|
|
@@ -726,9 +615,6 @@ stop: () => void;
|
|
|
726
615
|
speechState: SpeechState;
|
|
727
616
|
}> & {} & ComponentCustomProperties & {} & {
|
|
728
617
|
$slots: {
|
|
729
|
-
icon?(_: {
|
|
730
|
-
isRecording: boolean;
|
|
731
|
-
}): any;
|
|
732
618
|
'recording-overlay'?(_: {
|
|
733
619
|
isRecording: boolean;
|
|
734
620
|
stop: () => void;
|
|
@@ -737,49 +623,73 @@ stop: () => void;
|
|
|
737
623
|
}) | null;
|
|
738
624
|
}, HTMLDivElement>;
|
|
739
625
|
|
|
740
|
-
declare const
|
|
626
|
+
declare const __VLS_component_8: DefineComponent<SuggestionPillButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SuggestionPillButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
627
|
+
|
|
628
|
+
declare const __VLS_component_9: DefineComponent<__VLS_PublicProps_3, {
|
|
629
|
+
children: ComputedRef<(HTMLElement | SVGElement)[]>;
|
|
630
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
631
|
+
"update:showAll": (value: boolean | undefined) => any;
|
|
632
|
+
} & {
|
|
633
|
+
"click-outside": (event: MouseEvent) => any;
|
|
634
|
+
}, string, PublicProps, Readonly<__VLS_PublicProps_3> & Readonly<{
|
|
635
|
+
"onClick-outside"?: ((event: MouseEvent) => any) | undefined;
|
|
636
|
+
"onUpdate:showAll"?: ((value: boolean | undefined) => any) | undefined;
|
|
637
|
+
}>, {
|
|
638
|
+
showAllButtonOn: "hover" | "always";
|
|
639
|
+
overflowMode: "expand" | "scroll";
|
|
640
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
641
|
+
containerWrapperRef: HTMLDivElement;
|
|
642
|
+
containerRef: HTMLDivElement;
|
|
643
|
+
staticMaybeItemRefs: unknown[];
|
|
644
|
+
floatingItemsRef: HTMLDivElement;
|
|
645
|
+
floatingMaybeItemRefs: unknown[];
|
|
646
|
+
}, HTMLDivElement>;
|
|
741
647
|
|
|
742
648
|
declare type __VLS_PrettifyLocal<T> = {
|
|
743
649
|
[K in keyof T]: T[K];
|
|
744
650
|
} & {};
|
|
745
651
|
|
|
746
|
-
declare type __VLS_Props =
|
|
652
|
+
declare type __VLS_Props = {
|
|
653
|
+
contentRenderers?: Record<string, BubbleContentRenderer>;
|
|
654
|
+
};
|
|
655
|
+
|
|
656
|
+
declare type __VLS_Props_2 = ContainerProps;
|
|
747
657
|
|
|
748
|
-
declare type
|
|
658
|
+
declare type __VLS_Props_3 = DropdownMenuProps;
|
|
749
659
|
|
|
750
|
-
declare type
|
|
660
|
+
declare type __VLS_Props_4 = SuggestionPillsProps;
|
|
751
661
|
|
|
752
|
-
declare type
|
|
662
|
+
declare type __VLS_Props_5 = SuggestionPopoverProps;
|
|
753
663
|
|
|
754
|
-
declare type
|
|
664
|
+
declare type __VLS_Props_6 = ThemeProviderProps;
|
|
755
665
|
|
|
756
|
-
declare type
|
|
666
|
+
declare type __VLS_Props_7 = McpServerPickerProps;
|
|
757
667
|
|
|
758
668
|
declare type __VLS_PublicProps = {
|
|
759
669
|
'show': ContainerProps['show'];
|
|
760
670
|
'fullscreen'?: ContainerProps['fullscreen'];
|
|
761
|
-
} &
|
|
671
|
+
} & __VLS_Props_2;
|
|
762
672
|
|
|
763
673
|
declare type __VLS_PublicProps_2 = {
|
|
764
674
|
'show'?: boolean;
|
|
765
|
-
} &
|
|
675
|
+
} & __VLS_Props_3;
|
|
766
676
|
|
|
767
677
|
declare type __VLS_PublicProps_3 = {
|
|
768
678
|
'showAll'?: SuggestionPillsProps['showAll'];
|
|
769
|
-
} &
|
|
679
|
+
} & __VLS_Props_4;
|
|
770
680
|
|
|
771
681
|
declare type __VLS_PublicProps_4 = {
|
|
772
682
|
'selectedGroup'?: string;
|
|
773
|
-
} &
|
|
683
|
+
} & __VLS_Props_5;
|
|
774
684
|
|
|
775
685
|
declare type __VLS_PublicProps_5 = {
|
|
776
686
|
'theme'?: string;
|
|
777
687
|
'colorMode'?: ColorMode;
|
|
778
|
-
} &
|
|
688
|
+
} & __VLS_Props_6;
|
|
779
689
|
|
|
780
690
|
declare type __VLS_PublicProps_6 = {
|
|
781
691
|
'visible': boolean;
|
|
782
|
-
} &
|
|
692
|
+
} & __VLS_Props_7;
|
|
783
693
|
|
|
784
694
|
declare function __VLS_template(): {
|
|
785
695
|
attrs: Partial<{}>;
|
|
@@ -789,19 +699,6 @@ declare function __VLS_template(): {
|
|
|
789
699
|
};
|
|
790
700
|
|
|
791
701
|
declare function __VLS_template_10(): {
|
|
792
|
-
attrs: Partial<{}>;
|
|
793
|
-
slots: Readonly<SuggestionPillsSlots> & SuggestionPillsSlots;
|
|
794
|
-
refs: {
|
|
795
|
-
containerWrapperRef: HTMLDivElement;
|
|
796
|
-
containerRef: HTMLDivElement;
|
|
797
|
-
staticMaybeItemRefs: unknown[];
|
|
798
|
-
floatingItemsRef: HTMLDivElement;
|
|
799
|
-
floatingMaybeItemRefs: unknown[];
|
|
800
|
-
};
|
|
801
|
-
rootEl: HTMLDivElement;
|
|
802
|
-
};
|
|
803
|
-
|
|
804
|
-
declare function __VLS_template_11(): {
|
|
805
702
|
attrs: Partial<{}>;
|
|
806
703
|
slots: Readonly<SuggestionPopoverSlots> & SuggestionPopoverSlots;
|
|
807
704
|
refs: {
|
|
@@ -820,9 +717,7 @@ declare function __VLS_template_11(): {
|
|
|
820
717
|
readonly transitionProps?: TransitionProps | undefined;
|
|
821
718
|
readonly triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>> | undefined;
|
|
822
719
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
823
|
-
$attrs:
|
|
824
|
-
[x: string]: unknown;
|
|
825
|
-
};
|
|
720
|
+
$attrs: Attrs;
|
|
826
721
|
$refs: {
|
|
827
722
|
[x: string]: unknown;
|
|
828
723
|
};
|
|
@@ -920,7 +815,7 @@ declare function __VLS_template_11(): {
|
|
|
920
815
|
rootEl: any;
|
|
921
816
|
};
|
|
922
817
|
|
|
923
|
-
declare function
|
|
818
|
+
declare function __VLS_template_11(): {
|
|
924
819
|
attrs: Partial<{}>;
|
|
925
820
|
slots: {
|
|
926
821
|
default?(_: {}): any;
|
|
@@ -929,23 +824,14 @@ declare function __VLS_template_12(): {
|
|
|
929
824
|
rootEl: any;
|
|
930
825
|
};
|
|
931
826
|
|
|
932
|
-
declare function
|
|
827
|
+
declare function __VLS_template_12(): {
|
|
933
828
|
attrs: Partial<{}>;
|
|
934
829
|
slots: Readonly<WelcomeSlots> & WelcomeSlots;
|
|
935
830
|
refs: {};
|
|
936
831
|
rootEl: HTMLDivElement;
|
|
937
832
|
};
|
|
938
833
|
|
|
939
|
-
declare function
|
|
940
|
-
attrs: Partial<{}>;
|
|
941
|
-
slots: {
|
|
942
|
-
'header-actions'?(_: {}): any;
|
|
943
|
-
};
|
|
944
|
-
refs: {};
|
|
945
|
-
rootEl: any;
|
|
946
|
-
};
|
|
947
|
-
|
|
948
|
-
declare function __VLS_template_15(): {
|
|
834
|
+
declare function __VLS_template_13(): {
|
|
949
835
|
attrs: Partial<{}>;
|
|
950
836
|
slots: {
|
|
951
837
|
icon?(_: {}): any;
|
|
@@ -955,12 +841,9 @@ declare function __VLS_template_15(): {
|
|
|
955
841
|
rootEl: any;
|
|
956
842
|
};
|
|
957
843
|
|
|
958
|
-
declare function
|
|
844
|
+
declare function __VLS_template_14(): {
|
|
959
845
|
attrs: Partial<{}>;
|
|
960
846
|
slots: {
|
|
961
|
-
icon?(_: {
|
|
962
|
-
isRecording: boolean;
|
|
963
|
-
}): any;
|
|
964
847
|
'recording-overlay'?(_: {
|
|
965
848
|
isRecording: boolean;
|
|
966
849
|
stop: () => void;
|
|
@@ -971,15 +854,6 @@ declare function __VLS_template_16(): {
|
|
|
971
854
|
};
|
|
972
855
|
|
|
973
856
|
declare function __VLS_template_2(): {
|
|
974
|
-
attrs: Partial<{}>;
|
|
975
|
-
slots: Readonly<BubbleListSlots> & BubbleListSlots;
|
|
976
|
-
refs: {
|
|
977
|
-
listRef: HTMLDivElement;
|
|
978
|
-
};
|
|
979
|
-
rootEl: HTMLDivElement;
|
|
980
|
-
};
|
|
981
|
-
|
|
982
|
-
declare function __VLS_template_3(): {
|
|
983
857
|
attrs: Partial<{}>;
|
|
984
858
|
slots: {
|
|
985
859
|
default?(_: {}): any;
|
|
@@ -988,14 +862,14 @@ declare function __VLS_template_3(): {
|
|
|
988
862
|
rootEl: any;
|
|
989
863
|
};
|
|
990
864
|
|
|
991
|
-
declare function
|
|
865
|
+
declare function __VLS_template_3(): {
|
|
992
866
|
attrs: Partial<{}>;
|
|
993
867
|
slots: Readonly<ContainerSlots> & ContainerSlots;
|
|
994
868
|
refs: {};
|
|
995
869
|
rootEl: HTMLDivElement;
|
|
996
870
|
};
|
|
997
871
|
|
|
998
|
-
declare function
|
|
872
|
+
declare function __VLS_template_4(): {
|
|
999
873
|
attrs: Partial<{}>;
|
|
1000
874
|
slots: {
|
|
1001
875
|
overlay?(_: {
|
|
@@ -1006,7 +880,7 @@ declare function __VLS_template_5(): {
|
|
|
1006
880
|
rootEl: any;
|
|
1007
881
|
};
|
|
1008
882
|
|
|
1009
|
-
declare function
|
|
883
|
+
declare function __VLS_template_5(): {
|
|
1010
884
|
attrs: Partial<{}>;
|
|
1011
885
|
slots: {
|
|
1012
886
|
trigger?(_: {}): any;
|
|
@@ -1027,9 +901,7 @@ declare function __VLS_template_6(): {
|
|
|
1027
901
|
readonly transitionProps?: TransitionProps | undefined;
|
|
1028
902
|
readonly triggerEvents?: Partial<Record<`on${Capitalize<string>}`, (...args: any[]) => void>> | undefined;
|
|
1029
903
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
1030
|
-
$attrs:
|
|
1031
|
-
[x: string]: unknown;
|
|
1032
|
-
};
|
|
904
|
+
$attrs: Attrs;
|
|
1033
905
|
$refs: {
|
|
1034
906
|
[x: string]: unknown;
|
|
1035
907
|
};
|
|
@@ -1108,14 +980,14 @@ declare function __VLS_template_6(): {
|
|
|
1108
980
|
rootEl: any;
|
|
1109
981
|
};
|
|
1110
982
|
|
|
1111
|
-
declare function
|
|
983
|
+
declare function __VLS_template_6(): {
|
|
1112
984
|
attrs: Partial<{}>;
|
|
1113
985
|
slots: Readonly<PromptsSlots> & PromptsSlots;
|
|
1114
986
|
refs: {};
|
|
1115
987
|
rootEl: HTMLDivElement;
|
|
1116
988
|
};
|
|
1117
989
|
|
|
1118
|
-
declare function
|
|
990
|
+
declare function __VLS_template_7(): {
|
|
1119
991
|
attrs: Partial<{}>;
|
|
1120
992
|
slots: {
|
|
1121
993
|
header?(_: {}): any;
|
|
@@ -1129,7 +1001,7 @@ declare function __VLS_template_8(): {
|
|
|
1129
1001
|
'footer-right'?(_: {}): any;
|
|
1130
1002
|
};
|
|
1131
1003
|
refs: {
|
|
1132
|
-
|
|
1004
|
+
chatInputRef: ({
|
|
1133
1005
|
$: ComponentInternalInstance;
|
|
1134
1006
|
$data: {};
|
|
1135
1007
|
$props: {
|
|
@@ -1157,9 +1029,7 @@ declare function __VLS_template_8(): {
|
|
|
1157
1029
|
readonly onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
|
|
1158
1030
|
readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
1159
1031
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
1160
|
-
$attrs:
|
|
1161
|
-
[x: string]: unknown;
|
|
1162
|
-
};
|
|
1032
|
+
$attrs: Attrs;
|
|
1163
1033
|
$refs: {
|
|
1164
1034
|
[x: string]: unknown;
|
|
1165
1035
|
};
|
|
@@ -1254,7 +1124,7 @@ declare function __VLS_template_8(): {
|
|
|
1254
1124
|
prefix?(_: {}): any;
|
|
1255
1125
|
prefix?(_: {}): any;
|
|
1256
1126
|
content?(_: {
|
|
1257
|
-
editor: Editor | undefined
|
|
1127
|
+
editor: Ref<Editor | undefined, Editor | undefined>;
|
|
1258
1128
|
}): any;
|
|
1259
1129
|
content?(_: {
|
|
1260
1130
|
editor: Ref<Editor | undefined, Editor | undefined>;
|
|
@@ -1269,7 +1139,6 @@ declare function __VLS_template_8(): {
|
|
|
1269
1139
|
$data: {};
|
|
1270
1140
|
$props: {
|
|
1271
1141
|
readonly icon?: (VNode | Component) | undefined;
|
|
1272
|
-
readonly recordingIcon?: (VNode | Component) | undefined;
|
|
1273
1142
|
readonly disabled?: boolean | undefined;
|
|
1274
1143
|
readonly size?: "small" | "normal" | undefined;
|
|
1275
1144
|
readonly tooltip?: TooltipContent | undefined;
|
|
@@ -1283,9 +1152,7 @@ declare function __VLS_template_8(): {
|
|
|
1283
1152
|
readonly "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
|
|
1284
1153
|
readonly "onSpeech-error"?: ((error: Error) => any) | undefined;
|
|
1285
1154
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
1286
|
-
$attrs:
|
|
1287
|
-
[x: string]: unknown;
|
|
1288
|
-
};
|
|
1155
|
+
$attrs: Attrs;
|
|
1289
1156
|
$refs: {
|
|
1290
1157
|
[x: string]: unknown;
|
|
1291
1158
|
};
|
|
@@ -1351,9 +1218,6 @@ declare function __VLS_template_8(): {
|
|
|
1351
1218
|
speechState: SpeechState;
|
|
1352
1219
|
}> & {} & ComponentCustomProperties & {} & {
|
|
1353
1220
|
$slots: {
|
|
1354
|
-
icon?(_: {
|
|
1355
|
-
isRecording: boolean;
|
|
1356
|
-
}): any;
|
|
1357
1221
|
'recording-overlay'?(_: {
|
|
1358
1222
|
isRecording: boolean;
|
|
1359
1223
|
stop: () => void;
|
|
@@ -1364,13 +1228,26 @@ declare function __VLS_template_8(): {
|
|
|
1364
1228
|
rootEl: HTMLDivElement;
|
|
1365
1229
|
};
|
|
1366
1230
|
|
|
1367
|
-
declare function
|
|
1231
|
+
declare function __VLS_template_8(): {
|
|
1368
1232
|
attrs: Partial<{}>;
|
|
1369
1233
|
slots: Readonly<SuggestionPillButtonSlots> & SuggestionPillButtonSlots;
|
|
1370
1234
|
refs: {};
|
|
1371
1235
|
rootEl: HTMLButtonElement;
|
|
1372
1236
|
};
|
|
1373
1237
|
|
|
1238
|
+
declare function __VLS_template_9(): {
|
|
1239
|
+
attrs: Partial<{}>;
|
|
1240
|
+
slots: Readonly<SuggestionPillsSlots> & SuggestionPillsSlots;
|
|
1241
|
+
refs: {
|
|
1242
|
+
containerWrapperRef: HTMLDivElement;
|
|
1243
|
+
containerRef: HTMLDivElement;
|
|
1244
|
+
staticMaybeItemRefs: unknown[];
|
|
1245
|
+
floatingItemsRef: HTMLDivElement;
|
|
1246
|
+
floatingMaybeItemRefs: unknown[];
|
|
1247
|
+
};
|
|
1248
|
+
rootEl: HTMLDivElement;
|
|
1249
|
+
};
|
|
1250
|
+
|
|
1374
1251
|
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
1375
1252
|
|
|
1376
1253
|
declare type __VLS_TemplateResult_10 = ReturnType<typeof __VLS_template_10>;
|
|
@@ -1383,10 +1260,6 @@ declare type __VLS_TemplateResult_13 = ReturnType<typeof __VLS_template_13>;
|
|
|
1383
1260
|
|
|
1384
1261
|
declare type __VLS_TemplateResult_14 = ReturnType<typeof __VLS_template_14>;
|
|
1385
1262
|
|
|
1386
|
-
declare type __VLS_TemplateResult_15 = ReturnType<typeof __VLS_template_15>;
|
|
1387
|
-
|
|
1388
|
-
declare type __VLS_TemplateResult_16 = ReturnType<typeof __VLS_template_16>;
|
|
1389
|
-
|
|
1390
1263
|
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
|
|
1391
1264
|
|
|
1392
1265
|
declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
|
|
@@ -1439,18 +1312,6 @@ declare type __VLS_WithTemplateSlots_14<T, S> = T & {
|
|
|
1439
1312
|
};
|
|
1440
1313
|
};
|
|
1441
1314
|
|
|
1442
|
-
declare type __VLS_WithTemplateSlots_15<T, S> = T & {
|
|
1443
|
-
new (): {
|
|
1444
|
-
$slots: S;
|
|
1445
|
-
};
|
|
1446
|
-
};
|
|
1447
|
-
|
|
1448
|
-
declare type __VLS_WithTemplateSlots_16<T, S> = T & {
|
|
1449
|
-
new (): {
|
|
1450
|
-
$slots: S;
|
|
1451
|
-
};
|
|
1452
|
-
};
|
|
1453
|
-
|
|
1454
1315
|
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
1455
1316
|
new (): {
|
|
1456
1317
|
$slots: S;
|
|
@@ -1571,6 +1432,11 @@ export declare type AutoSize = boolean | {
|
|
|
1571
1432
|
maxRows: number;
|
|
1572
1433
|
};
|
|
1573
1434
|
|
|
1435
|
+
declare type AutoSize_2 = boolean | {
|
|
1436
|
+
minRows: number;
|
|
1437
|
+
maxRows: number;
|
|
1438
|
+
};
|
|
1439
|
+
|
|
1574
1440
|
export declare interface BaseAttachment {
|
|
1575
1441
|
id?: string;
|
|
1576
1442
|
name?: string;
|
|
@@ -1589,31 +1455,57 @@ declare const Bubble: typeof _default_25 & {
|
|
|
1589
1455
|
export { Bubble }
|
|
1590
1456
|
export { Bubble as TrBubble }
|
|
1591
1457
|
|
|
1592
|
-
export declare
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1458
|
+
export declare interface BubbleCommonProps {
|
|
1459
|
+
/**
|
|
1460
|
+
* 气泡对齐位置
|
|
1461
|
+
*/
|
|
1462
|
+
placement?: 'start' | 'end';
|
|
1463
|
+
/**
|
|
1464
|
+
* 气泡头像
|
|
1465
|
+
*/
|
|
1466
|
+
avatar?: VNode;
|
|
1467
|
+
/**
|
|
1468
|
+
* 气泡形状,默认 'corner'
|
|
1469
|
+
*/
|
|
1470
|
+
shape?: 'rounded' | 'corner';
|
|
1471
|
+
/**
|
|
1472
|
+
* 气泡内容渲染器。
|
|
1473
|
+
* 如果 Bubble 中的 content 是长度大于 0 的数组,则 contentRenderer 无效。将会使用 BubbleProvider 中注册的渲染器
|
|
1474
|
+
*/
|
|
1475
|
+
contentRenderer?: BubbleContentRenderer;
|
|
1476
|
+
/**
|
|
1477
|
+
* 自定义气泡内容字段。比如 customContentField 设置为 'my-content',则 Bubble 优先渲染 my-content 属性到气泡内容
|
|
1478
|
+
*/
|
|
1479
|
+
customContentField?: string;
|
|
1480
|
+
/**
|
|
1481
|
+
* 气泡中止文本
|
|
1482
|
+
*/
|
|
1483
|
+
abortedText?: string;
|
|
1484
|
+
/**
|
|
1485
|
+
* 气泡最大宽度
|
|
1486
|
+
*/
|
|
1487
|
+
maxWidth?: string | number;
|
|
1488
|
+
}
|
|
1598
1489
|
|
|
1599
|
-
export declare
|
|
1490
|
+
export declare abstract class BubbleContentClassRenderer {
|
|
1491
|
+
abstract render(options: {
|
|
1492
|
+
[key: string]: any;
|
|
1493
|
+
}): VNode;
|
|
1494
|
+
}
|
|
1600
1495
|
|
|
1601
|
-
export declare type
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
priority?: number;
|
|
1605
|
-
attributes?: Record<string, string>;
|
|
1606
|
-
};
|
|
1496
|
+
export declare type BubbleContentFunctionRenderer = (options: {
|
|
1497
|
+
[key: string]: any;
|
|
1498
|
+
}) => VNode;
|
|
1607
1499
|
|
|
1608
|
-
export declare
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
}
|
|
1500
|
+
export declare interface BubbleContentItem {
|
|
1501
|
+
type: string;
|
|
1502
|
+
[key: string]: any;
|
|
1503
|
+
}
|
|
1612
1504
|
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1505
|
+
export declare type BubbleContentRenderer = BubbleContentFunctionRenderer | BubbleContentClassRenderer | Component | {
|
|
1506
|
+
component: Component;
|
|
1507
|
+
defaultProps: Record<string, unknown>;
|
|
1508
|
+
};
|
|
1617
1509
|
|
|
1618
1510
|
declare const bubbleInstall: (app: App) => void;
|
|
1619
1511
|
|
|
@@ -1626,79 +1518,56 @@ export { BubbleList as TrBubbleList }
|
|
|
1626
1518
|
declare const bubbleListInstall: (app: App) => void;
|
|
1627
1519
|
|
|
1628
1520
|
export declare interface BubbleListProps {
|
|
1629
|
-
|
|
1521
|
+
items: (BubbleProps & {
|
|
1522
|
+
slots?: BubbleSlots;
|
|
1523
|
+
})[];
|
|
1630
1524
|
/**
|
|
1631
|
-
*
|
|
1632
|
-
* - 'consecutive': 连续相同角色的消息合并为一组
|
|
1633
|
-
* - 'divider': 按分割角色分组(连续的分割角色在一组,其他消息在另一组)
|
|
1634
|
-
* - 自定义函数: (messages, dividerRole) => BubbleMessageGroup[]
|
|
1635
|
-
*
|
|
1636
|
-
* 特殊情况:
|
|
1637
|
-
* - 当 message 的 content 为数组时,该 message 会被单独作为一个独立分组
|
|
1638
|
-
* - 该独立分组会被"密封",后续的消息(即使角色相同)也不会被添加到这个分组中
|
|
1639
|
-
*/
|
|
1640
|
-
groupStrategy?: 'consecutive' | 'divider' | BubbleGroupFunction;
|
|
1641
|
-
/**
|
|
1642
|
-
* 'divider' 策略的分割角色
|
|
1643
|
-
* 具有此角色的消息将作为分割线
|
|
1644
|
-
* @default 'user'
|
|
1645
|
-
*/
|
|
1646
|
-
dividerRole?: string;
|
|
1647
|
-
/**
|
|
1648
|
-
* 当消息没有角色或角色为空时,使用此角色
|
|
1649
|
-
* @default 'assistant'
|
|
1525
|
+
* 每个角色的默认配置项
|
|
1650
1526
|
*/
|
|
1651
|
-
|
|
1527
|
+
roles?: Record<string, BubbleRoleConfig>;
|
|
1652
1528
|
/**
|
|
1653
|
-
*
|
|
1529
|
+
* 列表是否加载中
|
|
1654
1530
|
*/
|
|
1655
|
-
|
|
1656
|
-
contentRenderMode?: BubbleProps['contentRenderMode'];
|
|
1531
|
+
loading?: boolean;
|
|
1657
1532
|
/**
|
|
1658
|
-
*
|
|
1659
|
-
* - BubbleList 是可滚动容器(需要 scrollHeight > clientHeight)
|
|
1660
|
-
* - 滚动容器接近底部
|
|
1661
|
-
*
|
|
1662
|
-
* @default false
|
|
1533
|
+
* 指定哪个角色可以有加载中状态
|
|
1663
1534
|
*/
|
|
1535
|
+
loadingRole?: string;
|
|
1664
1536
|
autoScroll?: boolean;
|
|
1665
1537
|
}
|
|
1666
1538
|
|
|
1667
|
-
declare
|
|
1668
|
-
|
|
1669
|
-
|
|
1539
|
+
export declare class BubbleMarkdownContentRenderer extends BubbleContentClassRenderer {
|
|
1540
|
+
readonly mdConfig: Options;
|
|
1541
|
+
readonly dompurifyConfig: Config;
|
|
1542
|
+
readonly sanitizeDisabled: boolean;
|
|
1543
|
+
readonly defaultAttrs: Record<string, unknown>;
|
|
1544
|
+
private md;
|
|
1545
|
+
constructor(options?: BubbleMarkdownRendererOptions);
|
|
1546
|
+
render(options: {
|
|
1547
|
+
content?: string;
|
|
1548
|
+
[key: string]: unknown;
|
|
1549
|
+
}): VNode<RendererNode, RendererElement, {
|
|
1550
|
+
[key: string]: any;
|
|
1551
|
+
}>;
|
|
1552
|
+
}
|
|
1670
1553
|
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
contentIndex?: number;
|
|
1677
|
-
}) => VNode | VNode[];
|
|
1554
|
+
declare interface BubbleMarkdownRendererOptions {
|
|
1555
|
+
mdConfig?: Options;
|
|
1556
|
+
dompurifyConfig?: Config;
|
|
1557
|
+
sanitizeDisabled?: boolean;
|
|
1558
|
+
defaultAttrs?: Record<string, unknown>;
|
|
1678
1559
|
}
|
|
1679
1560
|
|
|
1680
|
-
export declare
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
startIndex: number;
|
|
1691
|
-
};
|
|
1692
|
-
|
|
1693
|
-
export declare type BubbleProps = BubbleMessage & {
|
|
1694
|
-
hidden?: boolean;
|
|
1695
|
-
avatar?: VNode | Component;
|
|
1696
|
-
placement?: 'start' | 'end';
|
|
1697
|
-
shape?: 'corner' | 'rounded' | 'none';
|
|
1698
|
-
contentRenderMode?: 'single' | 'split';
|
|
1699
|
-
fallbackBoxRenderer?: Component<BubbleBoxRendererProps>;
|
|
1700
|
-
fallbackContentRenderer?: Component<BubbleContentRendererProps>;
|
|
1701
|
-
};
|
|
1561
|
+
export declare interface BubbleProps extends BubbleCommonProps {
|
|
1562
|
+
/**
|
|
1563
|
+
* 气泡内容
|
|
1564
|
+
*/
|
|
1565
|
+
content?: string | BubbleContentItem[];
|
|
1566
|
+
id?: string | number | symbol;
|
|
1567
|
+
role?: string;
|
|
1568
|
+
loading?: boolean;
|
|
1569
|
+
aborted?: boolean;
|
|
1570
|
+
}
|
|
1702
1571
|
|
|
1703
1572
|
declare const BubbleProvider: typeof _default_27 & {
|
|
1704
1573
|
install: typeof bubbleProviderInstall;
|
|
@@ -1708,76 +1577,28 @@ export { BubbleProvider as TrBubbleProvider }
|
|
|
1708
1577
|
|
|
1709
1578
|
declare const bubbleProviderInstall: (app: App) => void;
|
|
1710
1579
|
|
|
1711
|
-
export declare
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
fallbackBoxRenderer?: Component<BubbleBoxRendererProps>;
|
|
1715
|
-
fallbackContentRenderer?: Component<BubbleContentRendererProps>;
|
|
1716
|
-
store?: Record<string, unknown>;
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
/**
|
|
1720
|
-
* 气泡渲染器匹配优先级常量
|
|
1721
|
-
*
|
|
1722
|
-
* 用于定义不同类型渲染器的匹配优先级,数值越小优先级越高
|
|
1723
|
-
*
|
|
1724
|
-
* - LOADING: 通常基于 message.loading 判断。比如: `{ loading: true }`
|
|
1725
|
-
* - NORMAL: 普通渲染器的默认优先级
|
|
1726
|
-
* - CONTENT: 通常基于 message.content 判断。比如: `{ content: [{ type: 'image_url', image_url: 'xxx' }] }`
|
|
1727
|
-
* - ROLE: 通常基于 message.role 判断。比如: `{ role: 'tool' }`
|
|
1728
|
-
*/
|
|
1729
|
-
export declare const BubbleRendererMatchPriority: {
|
|
1730
|
-
readonly LOADING: -1;
|
|
1731
|
-
readonly NORMAL: 0;
|
|
1732
|
-
readonly CONTENT: 10;
|
|
1733
|
-
readonly ROLE: 20;
|
|
1734
|
-
};
|
|
1735
|
-
|
|
1736
|
-
export declare const BubbleRenderers: {
|
|
1737
|
-
Box: {
|
|
1738
|
-
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<BubbleBoxRendererProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
|
|
1739
|
-
P: {};
|
|
1740
|
-
B: {};
|
|
1741
|
-
D: {};
|
|
1742
|
-
C: {};
|
|
1743
|
-
M: {};
|
|
1744
|
-
Defaults: {};
|
|
1745
|
-
}, Readonly<BubbleBoxRendererProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
1746
|
-
__isFragment?: never;
|
|
1747
|
-
__isTeleport?: never;
|
|
1748
|
-
__isSuspense?: never;
|
|
1749
|
-
} & ComponentOptionsBase<Readonly<BubbleBoxRendererProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
1750
|
-
$slots: {
|
|
1751
|
-
default?(_: {}): any;
|
|
1752
|
-
};
|
|
1753
|
-
});
|
|
1754
|
-
Text: DefineComponent< {
|
|
1755
|
-
message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
|
|
1756
|
-
contentIndex?: number;
|
|
1757
|
-
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
|
|
1758
|
-
message: BubbleMessage<ChatMessageContent, Record<string, unknown>>;
|
|
1759
|
-
contentIndex?: number;
|
|
1760
|
-
}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
1761
|
-
};
|
|
1762
|
-
|
|
1763
|
-
/**
|
|
1764
|
-
* 角色配置
|
|
1765
|
-
* 用于配置不同角色的气泡样式
|
|
1766
|
-
*/
|
|
1767
|
-
export declare type BubbleRoleConfig = Pick<BubbleProps, 'avatar' | 'placement' | 'shape' | 'hidden' | 'fallbackBoxRenderer' | 'fallbackContentRenderer'>;
|
|
1768
|
-
|
|
1769
|
-
declare type BubbleSlotProps = {
|
|
1770
|
-
messages: BubbleMessage[];
|
|
1771
|
-
role?: string;
|
|
1580
|
+
export declare type BubbleRoleConfig = BubbleCommonProps & {
|
|
1581
|
+
hidden?: boolean;
|
|
1582
|
+
slots?: BubbleSlots;
|
|
1772
1583
|
};
|
|
1773
1584
|
|
|
1774
1585
|
export declare interface BubbleSlots {
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1586
|
+
default?: (slotProps: {
|
|
1587
|
+
bubbleProps: BubbleProps;
|
|
1588
|
+
index?: number;
|
|
1589
|
+
}) => unknown;
|
|
1590
|
+
footer?: (slotProps: {
|
|
1591
|
+
bubbleProps: BubbleProps;
|
|
1592
|
+
index?: number;
|
|
1593
|
+
}) => unknown;
|
|
1594
|
+
loading?: (slotProps: {
|
|
1595
|
+
bubbleProps: BubbleProps;
|
|
1596
|
+
index?: number;
|
|
1597
|
+
}) => unknown;
|
|
1598
|
+
trailer?: (slotProps: {
|
|
1599
|
+
bubbleProps: BubbleProps;
|
|
1600
|
+
index?: number;
|
|
1601
|
+
}) => unknown;
|
|
1781
1602
|
}
|
|
1782
1603
|
|
|
1783
1604
|
declare interface ButtonGroupConfig {
|
|
@@ -1786,43 +1607,201 @@ declare interface ButtonGroupConfig {
|
|
|
1786
1607
|
voice?: VoiceButtonConfig;
|
|
1787
1608
|
}
|
|
1788
1609
|
|
|
1610
|
+
declare const ChatInput: {
|
|
1611
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<SenderProps> & Readonly<{
|
|
1612
|
+
onClear?: (() => any) | undefined;
|
|
1613
|
+
onInput?: ((value: string) => any) | undefined;
|
|
1614
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
1615
|
+
onCancel?: (() => any) | undefined;
|
|
1616
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
1617
|
+
onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
|
|
1618
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
1619
|
+
}>, {
|
|
1620
|
+
submit: () => void;
|
|
1621
|
+
clear: () => void;
|
|
1622
|
+
cancel: () => void;
|
|
1623
|
+
focus: () => void;
|
|
1624
|
+
blur: () => void;
|
|
1625
|
+
setContent: (content: string) => void;
|
|
1626
|
+
getContent: () => string;
|
|
1627
|
+
editor: SenderContext["editor"];
|
|
1628
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
1629
|
+
clear: () => any;
|
|
1630
|
+
input: (value: string) => any;
|
|
1631
|
+
blur: (event: FocusEvent) => any;
|
|
1632
|
+
cancel: () => any;
|
|
1633
|
+
focus: (event: FocusEvent) => any;
|
|
1634
|
+
submit: (textContent: string, structuredData?: StructuredData | undefined) => any;
|
|
1635
|
+
"update:modelValue": (value: string) => any;
|
|
1636
|
+
}, PublicProps, {
|
|
1637
|
+
size: "normal" | "small";
|
|
1638
|
+
placeholder: string;
|
|
1639
|
+
mode: InputMode;
|
|
1640
|
+
autoSize: AutoSize;
|
|
1641
|
+
extensions: Extension[] | any[];
|
|
1642
|
+
submitType: SubmitTrigger;
|
|
1643
|
+
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
|
|
1644
|
+
P: {};
|
|
1645
|
+
B: {};
|
|
1646
|
+
D: {};
|
|
1647
|
+
C: {};
|
|
1648
|
+
M: {};
|
|
1649
|
+
Defaults: {};
|
|
1650
|
+
}, Readonly<SenderProps> & Readonly<{
|
|
1651
|
+
onClear?: (() => any) | undefined;
|
|
1652
|
+
onInput?: ((value: string) => any) | undefined;
|
|
1653
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
1654
|
+
onCancel?: (() => any) | undefined;
|
|
1655
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
1656
|
+
onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
|
|
1657
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
1658
|
+
}>, {
|
|
1659
|
+
submit: () => void;
|
|
1660
|
+
clear: () => void;
|
|
1661
|
+
cancel: () => void;
|
|
1662
|
+
focus: () => void;
|
|
1663
|
+
blur: () => void;
|
|
1664
|
+
setContent: (content: string) => void;
|
|
1665
|
+
getContent: () => string;
|
|
1666
|
+
editor: SenderContext["editor"];
|
|
1667
|
+
}, {}, {}, {}, {
|
|
1668
|
+
size: "normal" | "small";
|
|
1669
|
+
placeholder: string;
|
|
1670
|
+
mode: InputMode;
|
|
1671
|
+
autoSize: AutoSize;
|
|
1672
|
+
extensions: Extension[] | any[];
|
|
1673
|
+
submitType: SubmitTrigger;
|
|
1674
|
+
}>;
|
|
1675
|
+
__isFragment?: never;
|
|
1676
|
+
__isTeleport?: never;
|
|
1677
|
+
__isSuspense?: never;
|
|
1678
|
+
} & ComponentOptionsBase<Readonly<SenderProps> & Readonly<{
|
|
1679
|
+
onClear?: (() => any) | undefined;
|
|
1680
|
+
onInput?: ((value: string) => any) | undefined;
|
|
1681
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
1682
|
+
onCancel?: (() => any) | undefined;
|
|
1683
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
1684
|
+
onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
|
|
1685
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
1686
|
+
}>, {
|
|
1687
|
+
submit: () => void;
|
|
1688
|
+
clear: () => void;
|
|
1689
|
+
cancel: () => void;
|
|
1690
|
+
focus: () => void;
|
|
1691
|
+
blur: () => void;
|
|
1692
|
+
setContent: (content: string) => void;
|
|
1693
|
+
getContent: () => string;
|
|
1694
|
+
editor: SenderContext["editor"];
|
|
1695
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
1696
|
+
clear: () => any;
|
|
1697
|
+
input: (value: string) => any;
|
|
1698
|
+
blur: (event: FocusEvent) => any;
|
|
1699
|
+
cancel: () => any;
|
|
1700
|
+
focus: (event: FocusEvent) => any;
|
|
1701
|
+
submit: (textContent: string, structuredData?: StructuredData | undefined) => any;
|
|
1702
|
+
"update:modelValue": (value: string) => any;
|
|
1703
|
+
}, string, {
|
|
1704
|
+
size: "normal" | "small";
|
|
1705
|
+
placeholder: string;
|
|
1706
|
+
mode: InputMode;
|
|
1707
|
+
autoSize: AutoSize;
|
|
1708
|
+
extensions: Extension[] | any[];
|
|
1709
|
+
submitType: SubmitTrigger;
|
|
1710
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
1711
|
+
$slots: {
|
|
1712
|
+
header?(_: {}): any;
|
|
1713
|
+
header?(_: {}): any;
|
|
1714
|
+
prefix?(_: {}): any;
|
|
1715
|
+
prefix?(_: {}): any;
|
|
1716
|
+
content?(_: {
|
|
1717
|
+
editor: Ref<Editor | undefined, Editor | undefined>;
|
|
1718
|
+
}): any;
|
|
1719
|
+
content?(_: {
|
|
1720
|
+
editor: Ref<Editor | undefined, Editor | undefined>;
|
|
1721
|
+
}): any;
|
|
1722
|
+
'actions-inline'?(_: {}): any;
|
|
1723
|
+
footer?(_: {}): any;
|
|
1724
|
+
'footer-right'?(_: {}): any;
|
|
1725
|
+
};
|
|
1726
|
+
}) & {
|
|
1727
|
+
install: <T>(app: App<T>) => void;
|
|
1728
|
+
Mention: Node_2<MentionOptions, any>;
|
|
1729
|
+
Suggestion: Extension<SuggestionOptions, any>;
|
|
1730
|
+
Template: Extension<TemplateOptions, any>;
|
|
1731
|
+
mention: typeof mention;
|
|
1732
|
+
suggestion: typeof suggestion;
|
|
1733
|
+
template: typeof template;
|
|
1734
|
+
};
|
|
1735
|
+
|
|
1789
1736
|
/**
|
|
1790
|
-
*
|
|
1737
|
+
* ChatInput 插槽作用域
|
|
1738
|
+
*
|
|
1739
|
+
* 通过插槽作用域暴露给外部组件的状态和方法
|
|
1740
|
+
* 主要为增强按钮(Upload、Voice 等)提供便捷的操作方法
|
|
1791
1741
|
*/
|
|
1792
|
-
declare interface
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1742
|
+
declare interface ChatInputSlotScope {
|
|
1743
|
+
/**
|
|
1744
|
+
* Tiptap 编辑器实例
|
|
1745
|
+
* 用于高级操作
|
|
1746
|
+
*/
|
|
1747
|
+
editor: Editor_2 | undefined;
|
|
1748
|
+
/**
|
|
1749
|
+
* 聚焦编辑器
|
|
1750
|
+
*/
|
|
1751
|
+
focus: () => void;
|
|
1752
|
+
/**
|
|
1753
|
+
* 失焦编辑器
|
|
1754
|
+
*/
|
|
1755
|
+
blur: () => void;
|
|
1756
|
+
/**
|
|
1757
|
+
* 插入内容到当前光标位置
|
|
1758
|
+
*
|
|
1759
|
+
* 适用场景:语音输入、快捷短语插入
|
|
1760
|
+
*
|
|
1761
|
+
* @param content - 要插入的内容
|
|
1762
|
+
* @example
|
|
1763
|
+
* ```vue
|
|
1764
|
+
* <template #actions-inline="{ insert }">
|
|
1765
|
+
* <VoiceButton @speech-final="insert" />
|
|
1766
|
+
* </template>
|
|
1767
|
+
* ```
|
|
1768
|
+
*/
|
|
1769
|
+
insert: (content: string) => void;
|
|
1770
|
+
/**
|
|
1771
|
+
* 追加内容到编辑器末尾
|
|
1772
|
+
*
|
|
1773
|
+
* 适用场景:连续语音输入、批量添加内容
|
|
1774
|
+
*
|
|
1775
|
+
* @param content - 要追加的内容
|
|
1776
|
+
*/
|
|
1777
|
+
append: (content: string) => void;
|
|
1778
|
+
/**
|
|
1779
|
+
* 替换编辑器全部内容
|
|
1780
|
+
*
|
|
1781
|
+
* 适用场景:模板填充、内容重置
|
|
1782
|
+
*
|
|
1783
|
+
* @param content - 新内容
|
|
1784
|
+
*/
|
|
1785
|
+
replace: (content: string) => void;
|
|
1786
|
+
/**
|
|
1787
|
+
* 是否禁用
|
|
1788
|
+
* 用于控制自定义按钮状态
|
|
1789
|
+
*/
|
|
1790
|
+
disabled: boolean;
|
|
1791
|
+
/**
|
|
1792
|
+
* 是否加载中
|
|
1793
|
+
* 用于控制按钮加载状态和禁用
|
|
1794
|
+
*/
|
|
1795
|
+
loading: boolean;
|
|
1796
|
+
/**
|
|
1797
|
+
* 是否有内容
|
|
1798
|
+
* 用于控制按钮显示/隐藏
|
|
1799
|
+
*/
|
|
1800
|
+
hasContent: boolean;
|
|
1799
1801
|
}
|
|
1800
1802
|
|
|
1801
|
-
export declare type ChatMessageContent = string | ChatMessageContentItem[];
|
|
1802
|
-
|
|
1803
|
-
export declare type ChatMessageContentItem = {
|
|
1804
|
-
type: string;
|
|
1805
|
-
[key: string]: any;
|
|
1806
|
-
};
|
|
1807
|
-
|
|
1808
|
-
declare type ChatMessageWithOptionalRole<T extends ChatMessageContent = ChatMessageContent> = Omit<ChatMessage<T>, 'role'> & {
|
|
1809
|
-
role?: string;
|
|
1810
|
-
};
|
|
1811
|
-
|
|
1812
1803
|
export declare type ColorMode = 'light' | 'dark' | 'auto';
|
|
1813
1804
|
|
|
1814
|
-
declare interface CompatTemplateItem {
|
|
1815
|
-
id: string;
|
|
1816
|
-
type: 'template' | 'block';
|
|
1817
|
-
content: string;
|
|
1818
|
-
}
|
|
1819
|
-
|
|
1820
|
-
declare interface CompatTextItem {
|
|
1821
|
-
id: string;
|
|
1822
|
-
type: 'text';
|
|
1823
|
-
content: string;
|
|
1824
|
-
}
|
|
1825
|
-
|
|
1826
1805
|
export declare interface ContainerEmits {
|
|
1827
1806
|
(e: 'close'): void;
|
|
1828
1807
|
}
|
|
@@ -1899,7 +1878,7 @@ declare const _default_16: typeof _default_44 & {
|
|
|
1899
1878
|
export { _default_16 as McpAddForm }
|
|
1900
1879
|
export { _default_16 as TrMcpAddForm }
|
|
1901
1880
|
|
|
1902
|
-
declare const _default_17:
|
|
1881
|
+
declare const _default_17: __VLS_WithTemplateSlots_13<typeof __VLS_component_13, __VLS_TemplateResult_13["slots"]>;
|
|
1903
1882
|
export { _default_17 as ActionButton }
|
|
1904
1883
|
export { _default_17 as TrActionButton }
|
|
1905
1884
|
|
|
@@ -1920,10 +1899,10 @@ export { _default_2 as TrAttachments }
|
|
|
1920
1899
|
declare const _default_20: DefineComponent<UploadButtonProps, {
|
|
1921
1900
|
open: (localOptions?: Partial<UseFileDialogOptions>) => void;
|
|
1922
1901
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
1923
|
-
error: (error: Error,
|
|
1902
|
+
error: (error: Error, file?: File | undefined) => any;
|
|
1924
1903
|
select: (files: File[]) => any;
|
|
1925
1904
|
}, string, PublicProps, Readonly<UploadButtonProps> & Readonly<{
|
|
1926
|
-
onError?: ((error: Error,
|
|
1905
|
+
onError?: ((error: Error, file?: File | undefined) => any) | undefined;
|
|
1927
1906
|
onSelect?: ((files: File[]) => any) | undefined;
|
|
1928
1907
|
}>, {
|
|
1929
1908
|
reset: boolean;
|
|
@@ -1934,7 +1913,7 @@ accept: string;
|
|
|
1934
1913
|
export { _default_20 as TrUploadButton }
|
|
1935
1914
|
export { _default_20 as UploadButton }
|
|
1936
1915
|
|
|
1937
|
-
declare const _default_21:
|
|
1916
|
+
declare const _default_21: __VLS_WithTemplateSlots_14<typeof __VLS_component_14, __VLS_TemplateResult_14["slots"]>;
|
|
1938
1917
|
export { _default_21 as TrVoiceButton }
|
|
1939
1918
|
export { _default_21 as VoiceButton }
|
|
1940
1919
|
|
|
@@ -1974,11 +1953,13 @@ variant: DisplayVariant;
|
|
|
1974
1953
|
|
|
1975
1954
|
declare const _default_25: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
1976
1955
|
|
|
1977
|
-
declare const _default_26:
|
|
1956
|
+
declare const _default_26: DefineComponent<BubbleListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BubbleListProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
1957
|
+
scrollContainerRef: HTMLDivElement;
|
|
1958
|
+
}, HTMLDivElement>;
|
|
1978
1959
|
|
|
1979
|
-
declare const _default_27:
|
|
1960
|
+
declare const _default_27: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|
|
1980
1961
|
|
|
1981
|
-
declare const _default_28:
|
|
1962
|
+
declare const _default_28: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
|
|
1982
1963
|
|
|
1983
1964
|
declare const _default_29: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
1984
1965
|
|
|
@@ -1988,9 +1969,9 @@ declare const _default_3: typeof _default_28 & {
|
|
|
1988
1969
|
export { _default_3 as Container }
|
|
1989
1970
|
export { _default_3 as TrContainer }
|
|
1990
1971
|
|
|
1991
|
-
declare const _default_30:
|
|
1972
|
+
declare const _default_30: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
|
|
1992
1973
|
|
|
1993
|
-
declare const _default_31:
|
|
1974
|
+
declare const _default_31: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
|
|
1994
1975
|
|
|
1995
1976
|
declare const _default_32: DefineComponent<FeedbackProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
1996
1977
|
action: (name: string) => any;
|
|
@@ -2027,13 +2008,13 @@ declare const _default_35: DefineComponent<PromptProps, {}, {}, {}, {}, Componen
|
|
|
2027
2008
|
size: "small" | "medium" | "large";
|
|
2028
2009
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
2029
2010
|
|
|
2030
|
-
declare const _default_36:
|
|
2011
|
+
declare const _default_36: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
|
|
2031
2012
|
|
|
2032
|
-
declare const _default_37:
|
|
2013
|
+
declare const _default_37: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
|
|
2033
2014
|
|
|
2034
|
-
declare const _default_38:
|
|
2015
|
+
declare const _default_38: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
|
|
2035
2016
|
|
|
2036
|
-
declare const _default_39:
|
|
2017
|
+
declare const _default_39: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
|
|
2037
2018
|
|
|
2038
2019
|
declare const _default_4: typeof _default_29 & {
|
|
2039
2020
|
install: typeof install_3;
|
|
@@ -2041,13 +2022,62 @@ declare const _default_4: typeof _default_29 & {
|
|
|
2041
2022
|
export { _default_4 as Conversations }
|
|
2042
2023
|
export { _default_4 as TrConversations }
|
|
2043
2024
|
|
|
2044
|
-
declare const _default_40:
|
|
2025
|
+
declare const _default_40: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
|
|
2045
2026
|
|
|
2046
|
-
declare const _default_41:
|
|
2027
|
+
declare const _default_41: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
|
|
2047
2028
|
|
|
2048
|
-
declare const _default_42:
|
|
2029
|
+
declare const _default_42: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
|
|
2049
2030
|
|
|
2050
|
-
declare const _default_43:
|
|
2031
|
+
declare const _default_43: DefineComponent<__VLS_PublicProps_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
2032
|
+
"update:visible": (value: boolean) => any;
|
|
2033
|
+
} & {
|
|
2034
|
+
refresh: (tab: "installed" | "market") => any;
|
|
2035
|
+
"update:visible": (visible: boolean) => any;
|
|
2036
|
+
"market-category-change": (category: string) => any;
|
|
2037
|
+
"tab-change": (activeTab: "installed" | "market") => any;
|
|
2038
|
+
"plugin-toggle": (plugin: PluginInfo, enabled: boolean) => any;
|
|
2039
|
+
"plugin-delete": (plugin: PluginInfo) => any;
|
|
2040
|
+
"plugin-add": (plugin: PluginInfo) => any;
|
|
2041
|
+
"plugin-create": (type: "code" | "form", data: PluginCreationData) => any;
|
|
2042
|
+
"tool-toggle": (plugin: PluginInfo, toolId: string, enabled: boolean) => any;
|
|
2043
|
+
"update:activeCount": (count: number) => any;
|
|
2044
|
+
}, string, PublicProps, Readonly<__VLS_PublicProps_6> & Readonly<{
|
|
2045
|
+
onRefresh?: ((tab: "installed" | "market") => any) | undefined;
|
|
2046
|
+
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
2047
|
+
"onMarket-category-change"?: ((category: string) => any) | undefined;
|
|
2048
|
+
"onTab-change"?: ((activeTab: "installed" | "market") => any) | undefined;
|
|
2049
|
+
"onPlugin-toggle"?: ((plugin: PluginInfo, enabled: boolean) => any) | undefined;
|
|
2050
|
+
"onPlugin-delete"?: ((plugin: PluginInfo) => any) | undefined;
|
|
2051
|
+
"onPlugin-add"?: ((plugin: PluginInfo) => any) | undefined;
|
|
2052
|
+
"onPlugin-create"?: ((type: "code" | "form", data: PluginCreationData) => any) | undefined;
|
|
2053
|
+
"onTool-toggle"?: ((plugin: PluginInfo, toolId: string, enabled: boolean) => any) | undefined;
|
|
2054
|
+
"onUpdate:activeCount"?: ((count: number) => any) | undefined;
|
|
2055
|
+
}>, {
|
|
2056
|
+
title: string;
|
|
2057
|
+
loading: boolean;
|
|
2058
|
+
installedPlugins: PluginInfo[];
|
|
2059
|
+
marketPlugins: PluginInfo[];
|
|
2060
|
+
searchPlaceholder: string;
|
|
2061
|
+
enableSearch: boolean;
|
|
2062
|
+
installedSearchFn: (query: string, item: PluginInfo) => boolean;
|
|
2063
|
+
marketSearchFn: (query: string, item: PluginInfo) => boolean;
|
|
2064
|
+
marketCategoryOptions: MarketCategoryOption[];
|
|
2065
|
+
marketCategoryPlaceholder: string;
|
|
2066
|
+
enableMarketCategoryFilter: boolean;
|
|
2067
|
+
defaultActiveTab: "installed" | "market";
|
|
2068
|
+
showInstalledTab: boolean;
|
|
2069
|
+
showMarketTab: boolean;
|
|
2070
|
+
popupConfig: PopupConfig;
|
|
2071
|
+
installedTabTitle: string;
|
|
2072
|
+
marketTabTitle: string;
|
|
2073
|
+
showCustomAddButton: boolean;
|
|
2074
|
+
customAddButtonText: string;
|
|
2075
|
+
allowPluginToggle: boolean;
|
|
2076
|
+
allowToolToggle: boolean;
|
|
2077
|
+
allowPluginDelete: boolean;
|
|
2078
|
+
allowPluginAdd: boolean;
|
|
2079
|
+
marketLoading: boolean;
|
|
2080
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
2051
2081
|
|
|
2052
2082
|
declare const _default_44: DefineComponent<McpAddFormProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
2053
2083
|
cancel: () => any;
|
|
@@ -2094,7 +2124,7 @@ export { _default_9 as TrIconButton }
|
|
|
2094
2124
|
/**
|
|
2095
2125
|
* 默认操作按钮配置
|
|
2096
2126
|
*
|
|
2097
|
-
* 用于统一配置
|
|
2127
|
+
* 用于统一配置 ChatInput 的默认按钮(Clear、Submit)
|
|
2098
2128
|
*
|
|
2099
2129
|
* @example
|
|
2100
2130
|
* ```typescript
|
|
@@ -2443,6 +2473,8 @@ export declare interface IconButtonProps {
|
|
|
2443
2473
|
*/
|
|
2444
2474
|
export declare type InputMode = 'single' | 'multiple';
|
|
2445
2475
|
|
|
2476
|
+
declare type InputMode_2 = 'single' | 'multiple';
|
|
2477
|
+
|
|
2446
2478
|
declare const install: <T>(app: App<T>) => void;
|
|
2447
2479
|
|
|
2448
2480
|
declare const install_10: <T>(app: App<T>) => void;
|
|
@@ -2484,15 +2516,6 @@ declare interface ISuggestionItem {
|
|
|
2484
2516
|
highlights?: string[] | HighlightFunction_2;
|
|
2485
2517
|
}
|
|
2486
2518
|
|
|
2487
|
-
/**
|
|
2488
|
-
* 键盘处理器接口
|
|
2489
|
-
*/
|
|
2490
|
-
export declare interface KeyboardHandlers {
|
|
2491
|
-
checkSubmitShortcut: (event: KeyboardEvent) => boolean;
|
|
2492
|
-
checkNewlineShortcut: (event: KeyboardEvent) => boolean;
|
|
2493
|
-
submit: () => void;
|
|
2494
|
-
}
|
|
2495
|
-
|
|
2496
2519
|
export declare interface MarketCategoryOption {
|
|
2497
2520
|
value: string;
|
|
2498
2521
|
label: string;
|
|
@@ -2577,6 +2600,28 @@ export declare interface McpServerPickerProps {
|
|
|
2577
2600
|
*/
|
|
2578
2601
|
declare function mention(items: MentionItem[] | Ref<MentionItem[]>, char?: string, options?: Partial<Omit<MentionOptions, 'items' | 'char'>>): Node_2<MentionOptions, any>;
|
|
2579
2602
|
|
|
2603
|
+
/**
|
|
2604
|
+
* Mention 节点属性(内部使用)
|
|
2605
|
+
*
|
|
2606
|
+
* ProseMirror 节点的属性,id 必填(由插件保证)
|
|
2607
|
+
*/
|
|
2608
|
+
export declare interface MentionAttrs {
|
|
2609
|
+
/**
|
|
2610
|
+
* 唯一标识(必填)
|
|
2611
|
+
*
|
|
2612
|
+
* 由插件自动生成或使用用户提供的值
|
|
2613
|
+
*/
|
|
2614
|
+
id: string;
|
|
2615
|
+
/**
|
|
2616
|
+
* 显示名称
|
|
2617
|
+
*/
|
|
2618
|
+
label: string;
|
|
2619
|
+
/**
|
|
2620
|
+
* 关联值(可选)
|
|
2621
|
+
*/
|
|
2622
|
+
value?: string;
|
|
2623
|
+
}
|
|
2624
|
+
|
|
2580
2625
|
/**
|
|
2581
2626
|
* 提及项数据结构(用户侧)
|
|
2582
2627
|
*
|
|
@@ -2608,7 +2653,7 @@ export declare interface MentionItem {
|
|
|
2608
2653
|
/**
|
|
2609
2654
|
* Mention 配置选项
|
|
2610
2655
|
*/
|
|
2611
|
-
declare interface MentionOptions {
|
|
2656
|
+
export declare interface MentionOptions {
|
|
2612
2657
|
/**
|
|
2613
2658
|
* 提及项列表
|
|
2614
2659
|
*/
|
|
@@ -2632,7 +2677,7 @@ declare interface MentionOptions {
|
|
|
2632
2677
|
*
|
|
2633
2678
|
* 用于表示文本和 mention 的混合结构
|
|
2634
2679
|
*/
|
|
2635
|
-
declare type MentionStructuredItem = {
|
|
2680
|
+
export declare type MentionStructuredItem = {
|
|
2636
2681
|
type: 'text';
|
|
2637
2682
|
content: string;
|
|
2638
2683
|
} | {
|
|
@@ -2812,143 +2857,30 @@ export declare interface SelectOption {
|
|
|
2812
2857
|
data?: string;
|
|
2813
2858
|
}
|
|
2814
2859
|
|
|
2815
|
-
declare const Sender: {
|
|
2816
|
-
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<SenderProps> & Readonly<{
|
|
2817
|
-
onClear?: (() => any) | undefined;
|
|
2818
|
-
onInput?: ((value: string) => any) | undefined;
|
|
2819
|
-
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
2820
|
-
onCancel?: (() => any) | undefined;
|
|
2821
|
-
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
2822
|
-
onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
|
|
2823
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
2824
|
-
}>, {
|
|
2825
|
-
submit: () => void;
|
|
2826
|
-
clear: () => void;
|
|
2827
|
-
cancel: () => void;
|
|
2828
|
-
focus: () => void;
|
|
2829
|
-
blur: () => void;
|
|
2830
|
-
setContent: (content: string) => void;
|
|
2831
|
-
getContent: () => string;
|
|
2832
|
-
editor: SenderContext["editor"];
|
|
2833
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
2834
|
-
clear: () => any;
|
|
2835
|
-
input: (value: string) => any;
|
|
2836
|
-
blur: (event: FocusEvent) => any;
|
|
2837
|
-
cancel: () => any;
|
|
2838
|
-
focus: (event: FocusEvent) => any;
|
|
2839
|
-
submit: (textContent: string, structuredData?: StructuredData | undefined) => any;
|
|
2840
|
-
"update:modelValue": (value: string) => any;
|
|
2841
|
-
}, PublicProps, {
|
|
2842
|
-
size: "normal" | "small";
|
|
2843
|
-
placeholder: string;
|
|
2844
|
-
mode: InputMode;
|
|
2845
|
-
autoSize: AutoSize;
|
|
2846
|
-
extensions: Extension[] | any[];
|
|
2847
|
-
submitType: SubmitTrigger;
|
|
2848
|
-
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
|
|
2849
|
-
P: {};
|
|
2850
|
-
B: {};
|
|
2851
|
-
D: {};
|
|
2852
|
-
C: {};
|
|
2853
|
-
M: {};
|
|
2854
|
-
Defaults: {};
|
|
2855
|
-
}, Readonly<SenderProps> & Readonly<{
|
|
2856
|
-
onClear?: (() => any) | undefined;
|
|
2857
|
-
onInput?: ((value: string) => any) | undefined;
|
|
2858
|
-
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
2859
|
-
onCancel?: (() => any) | undefined;
|
|
2860
|
-
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
2861
|
-
onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
|
|
2862
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
2863
|
-
}>, {
|
|
2864
|
-
submit: () => void;
|
|
2865
|
-
clear: () => void;
|
|
2866
|
-
cancel: () => void;
|
|
2867
|
-
focus: () => void;
|
|
2868
|
-
blur: () => void;
|
|
2869
|
-
setContent: (content: string) => void;
|
|
2870
|
-
getContent: () => string;
|
|
2871
|
-
editor: SenderContext["editor"];
|
|
2872
|
-
}, {}, {}, {}, {
|
|
2873
|
-
size: "normal" | "small";
|
|
2874
|
-
placeholder: string;
|
|
2875
|
-
mode: InputMode;
|
|
2876
|
-
autoSize: AutoSize;
|
|
2877
|
-
extensions: Extension[] | any[];
|
|
2878
|
-
submitType: SubmitTrigger;
|
|
2879
|
-
}>;
|
|
2880
|
-
__isFragment?: never;
|
|
2881
|
-
__isTeleport?: never;
|
|
2882
|
-
__isSuspense?: never;
|
|
2883
|
-
} & ComponentOptionsBase<Readonly<SenderProps> & Readonly<{
|
|
2884
|
-
onClear?: (() => any) | undefined;
|
|
2885
|
-
onInput?: ((value: string) => any) | undefined;
|
|
2886
|
-
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
2887
|
-
onCancel?: (() => any) | undefined;
|
|
2888
|
-
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
2889
|
-
onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
|
|
2890
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
2891
|
-
}>, {
|
|
2892
|
-
submit: () => void;
|
|
2893
|
-
clear: () => void;
|
|
2894
|
-
cancel: () => void;
|
|
2895
|
-
focus: () => void;
|
|
2896
|
-
blur: () => void;
|
|
2897
|
-
setContent: (content: string) => void;
|
|
2898
|
-
getContent: () => string;
|
|
2899
|
-
editor: SenderContext["editor"];
|
|
2900
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
2901
|
-
clear: () => any;
|
|
2902
|
-
input: (value: string) => any;
|
|
2903
|
-
blur: (event: FocusEvent) => any;
|
|
2904
|
-
cancel: () => any;
|
|
2905
|
-
focus: (event: FocusEvent) => any;
|
|
2906
|
-
submit: (textContent: string, structuredData?: StructuredData | undefined) => any;
|
|
2907
|
-
"update:modelValue": (value: string) => any;
|
|
2908
|
-
}, string, {
|
|
2909
|
-
size: "normal" | "small";
|
|
2910
|
-
placeholder: string;
|
|
2911
|
-
mode: InputMode;
|
|
2912
|
-
autoSize: AutoSize;
|
|
2913
|
-
extensions: Extension[] | any[];
|
|
2914
|
-
submitType: SubmitTrigger;
|
|
2915
|
-
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
2916
|
-
$slots: {
|
|
2917
|
-
header?(_: {}): any;
|
|
2918
|
-
header?(_: {}): any;
|
|
2919
|
-
prefix?(_: {}): any;
|
|
2920
|
-
prefix?(_: {}): any;
|
|
2921
|
-
content?(_: {
|
|
2922
|
-
editor: Editor | undefined;
|
|
2923
|
-
}): any;
|
|
2924
|
-
content?(_: {
|
|
2925
|
-
editor: Ref<Editor | undefined, Editor | undefined>;
|
|
2926
|
-
}): any;
|
|
2927
|
-
'actions-inline'?(_: {}): any;
|
|
2928
|
-
footer?(_: {}): any;
|
|
2929
|
-
'footer-right'?(_: {}): any;
|
|
2930
|
-
};
|
|
2931
|
-
}) & {
|
|
2932
|
-
install: <T>(app: App<T>) => void;
|
|
2933
|
-
Mention: Node_2<MentionOptions, any>;
|
|
2934
|
-
Suggestion: Extension<SuggestionOptions, any>;
|
|
2935
|
-
Template: Extension<TemplateOptions, any>;
|
|
2936
|
-
mention: typeof mention;
|
|
2937
|
-
suggestion: typeof suggestion;
|
|
2938
|
-
template: typeof template;
|
|
2939
|
-
};
|
|
2940
|
-
export { Sender }
|
|
2941
|
-
export { Sender as TrSender }
|
|
2942
|
-
|
|
2943
2860
|
/**
|
|
2944
|
-
*
|
|
2945
|
-
*
|
|
2946
|
-
* 用于 provide/inject 的 key
|
|
2861
|
+
* 选择器选项
|
|
2947
2862
|
*/
|
|
2948
|
-
|
|
2863
|
+
declare interface SelectOption_2 {
|
|
2864
|
+
/**
|
|
2865
|
+
* 显示文本
|
|
2866
|
+
*/
|
|
2867
|
+
label: string;
|
|
2868
|
+
/**
|
|
2869
|
+
* 选择后的值
|
|
2870
|
+
*/
|
|
2871
|
+
value: string;
|
|
2872
|
+
/**
|
|
2873
|
+
* 自定义数据(可选)
|
|
2874
|
+
*/
|
|
2875
|
+
data?: string;
|
|
2876
|
+
}
|
|
2877
|
+
|
|
2878
|
+
declare const Sender: typeof ChatInput;
|
|
2879
|
+
export { Sender }
|
|
2880
|
+
export { Sender as TrSender }
|
|
2949
2881
|
|
|
2950
2882
|
/**
|
|
2951
|
-
*
|
|
2883
|
+
* Chat-Input Context
|
|
2952
2884
|
*
|
|
2953
2885
|
* 通过 provide/inject 在组件树中共享的状态和方法
|
|
2954
2886
|
* 所有子组件都可以通过 inject 获取
|
|
@@ -3068,7 +3000,7 @@ export declare interface SenderContext {
|
|
|
3068
3000
|
}
|
|
3069
3001
|
|
|
3070
3002
|
/**
|
|
3071
|
-
*
|
|
3003
|
+
* Chat-Input 组件 Emits
|
|
3072
3004
|
*/
|
|
3073
3005
|
export declare interface SenderEmits {
|
|
3074
3006
|
/**
|
|
@@ -3142,7 +3074,7 @@ export declare interface SenderEmits {
|
|
|
3142
3074
|
}
|
|
3143
3075
|
|
|
3144
3076
|
/**
|
|
3145
|
-
*
|
|
3077
|
+
* Chat-Input 组件 Props
|
|
3146
3078
|
*/
|
|
3147
3079
|
export declare interface SenderProps {
|
|
3148
3080
|
/**
|
|
@@ -3231,14 +3163,14 @@ export declare interface SenderProps {
|
|
|
3231
3163
|
*
|
|
3232
3164
|
* @example 基础使用
|
|
3233
3165
|
* ```typescript
|
|
3234
|
-
* import { Template } from '@tiny-robot/components/
|
|
3166
|
+
* import { Template } from '@tiny-robot/components/chat-input/extensions'
|
|
3235
3167
|
*
|
|
3236
|
-
* <
|
|
3168
|
+
* <ChatInput :extensions="[Template]" />
|
|
3237
3169
|
* ```
|
|
3238
3170
|
*
|
|
3239
3171
|
* @example 带配置的扩展(响应式推荐)
|
|
3240
3172
|
* ```typescript
|
|
3241
|
-
* import { Mention, Suggestion } from '@tiny-robot/components/
|
|
3173
|
+
* import { Mention, Suggestion } from '@tiny-robot/components/chat-input/extensions'
|
|
3242
3174
|
*
|
|
3243
3175
|
* const mentions = ref([...])
|
|
3244
3176
|
* const suggestions = ref([...])
|
|
@@ -3248,7 +3180,7 @@ export declare interface SenderProps {
|
|
|
3248
3180
|
* Suggestion.configure({ items: suggestions })
|
|
3249
3181
|
* ]
|
|
3250
3182
|
*
|
|
3251
|
-
* <
|
|
3183
|
+
* <ChatInput :extensions="extensions" />
|
|
3252
3184
|
* ```
|
|
3253
3185
|
*/
|
|
3254
3186
|
extensions?: Extension[] | any[];
|
|
@@ -3274,7 +3206,7 @@ export declare interface SenderProps {
|
|
|
3274
3206
|
*
|
|
3275
3207
|
* @example 基础使用
|
|
3276
3208
|
* ```vue
|
|
3277
|
-
* <
|
|
3209
|
+
* <ChatInput
|
|
3278
3210
|
* :actions-config="{
|
|
3279
3211
|
* submit: { disabled: !isValid, tooltip: '请完善表单' }
|
|
3280
3212
|
* }"
|
|
@@ -3294,7 +3226,7 @@ export declare interface SenderProps {
|
|
|
3294
3226
|
* </script>
|
|
3295
3227
|
*
|
|
3296
3228
|
* <template>
|
|
3297
|
-
* <
|
|
3229
|
+
* <ChatInput :actions-config="defaultActions" />
|
|
3298
3230
|
* </template>
|
|
3299
3231
|
* ```
|
|
3300
3232
|
*
|
|
@@ -3311,7 +3243,7 @@ export declare interface SenderProps {
|
|
|
3311
3243
|
|
|
3312
3244
|
declare interface SenderProps_2 {
|
|
3313
3245
|
autofocus?: boolean;
|
|
3314
|
-
autoSize?:
|
|
3246
|
+
autoSize?: AutoSize_2;
|
|
3315
3247
|
allowSpeech?: boolean;
|
|
3316
3248
|
allowFiles?: boolean;
|
|
3317
3249
|
clearable?: boolean;
|
|
@@ -3319,11 +3251,11 @@ declare interface SenderProps_2 {
|
|
|
3319
3251
|
defaultValue?: string | null;
|
|
3320
3252
|
loading?: boolean;
|
|
3321
3253
|
modelValue?: string;
|
|
3322
|
-
mode?:
|
|
3254
|
+
mode?: InputMode_2;
|
|
3323
3255
|
maxLength?: number;
|
|
3324
3256
|
buttonGroup?: ButtonGroupConfig;
|
|
3325
|
-
submitType?:
|
|
3326
|
-
speech?: boolean |
|
|
3257
|
+
submitType?: SubmitTrigger_2;
|
|
3258
|
+
speech?: boolean | SpeechConfig_2;
|
|
3327
3259
|
placeholder?: string;
|
|
3328
3260
|
showWordLimit?: boolean;
|
|
3329
3261
|
suggestions?: ISuggestionItem[];
|
|
@@ -3335,7 +3267,7 @@ declare interface SenderProps_2 {
|
|
|
3335
3267
|
}
|
|
3336
3268
|
|
|
3337
3269
|
/**
|
|
3338
|
-
*
|
|
3270
|
+
* Chat-Input 组件 Slots
|
|
3339
3271
|
*/
|
|
3340
3272
|
export declare interface SenderSlots {
|
|
3341
3273
|
/**
|
|
@@ -3343,107 +3275,40 @@ export declare interface SenderSlots {
|
|
|
3343
3275
|
*/
|
|
3344
3276
|
header?: () => unknown;
|
|
3345
3277
|
/**
|
|
3346
|
-
* 前缀插槽
|
|
3347
|
-
*/
|
|
3348
|
-
prefix?: () => unknown;
|
|
3349
|
-
/**
|
|
3350
|
-
* 内容插槽
|
|
3351
|
-
*
|
|
3352
|
-
* @param props - 插槽属性
|
|
3353
|
-
* @param props.editor - 编辑器实例
|
|
3354
|
-
*/
|
|
3355
|
-
content?: (props: {
|
|
3356
|
-
editor: unknown;
|
|
3357
|
-
}) => unknown;
|
|
3358
|
-
/**
|
|
3359
|
-
* 单行模式内联操作按钮插槽
|
|
3360
|
-
*
|
|
3361
|
-
* @example
|
|
3362
|
-
* ```vue
|
|
3363
|
-
* <sender>
|
|
3364
|
-
* <template #actions-inline="{ insert, focus, disabled }">
|
|
3365
|
-
* <voice-input @result="insert" :disabled="disabled" />
|
|
3366
|
-
* <file-upload @select="handleFiles" />
|
|
3367
|
-
* </template>
|
|
3368
|
-
* </sender>
|
|
3369
|
-
* ```
|
|
3370
|
-
*/
|
|
3371
|
-
'actions-inline'?: (scope: SenderSlotScope) => unknown;
|
|
3372
|
-
/**
|
|
3373
|
-
* 底部插槽(多行模式)
|
|
3374
|
-
*/
|
|
3375
|
-
footer?: (scope: SenderSlotScope) => unknown;
|
|
3376
|
-
/**
|
|
3377
|
-
* 底部右侧插槽(多行模式)
|
|
3378
|
-
*/
|
|
3379
|
-
'footer-right'?: (scope: SenderSlotScope) => unknown;
|
|
3380
|
-
}
|
|
3381
|
-
|
|
3382
|
-
/**
|
|
3383
|
-
* Sender 插槽作用域
|
|
3384
|
-
*
|
|
3385
|
-
* 通过插槽作用域暴露给外部组件的状态和方法
|
|
3386
|
-
* 主要为增强按钮(Upload、Voice 等)提供便捷的操作方法
|
|
3387
|
-
*/
|
|
3388
|
-
export declare interface SenderSlotScope {
|
|
3389
|
-
/**
|
|
3390
|
-
* Tiptap 编辑器实例
|
|
3391
|
-
* 用于高级操作
|
|
3392
|
-
*/
|
|
3393
|
-
editor: Editor_2 | undefined;
|
|
3394
|
-
/**
|
|
3395
|
-
* 聚焦编辑器
|
|
3396
|
-
*/
|
|
3397
|
-
focus: () => void;
|
|
3398
|
-
/**
|
|
3399
|
-
* 失焦编辑器
|
|
3400
|
-
*/
|
|
3401
|
-
blur: () => void;
|
|
3402
|
-
/**
|
|
3403
|
-
* 插入内容到当前光标位置
|
|
3404
|
-
*
|
|
3405
|
-
* 适用场景:语音输入、快捷短语插入
|
|
3406
|
-
*
|
|
3407
|
-
* @param content - 要插入的内容
|
|
3408
|
-
* @example
|
|
3409
|
-
* ```vue
|
|
3410
|
-
* <template #actions-inline="{ insert }">
|
|
3411
|
-
* <VoiceButton @speech-final="insert" />
|
|
3412
|
-
* </template>
|
|
3413
|
-
* ```
|
|
3414
|
-
*/
|
|
3415
|
-
insert: (content: string) => void;
|
|
3416
|
-
/**
|
|
3417
|
-
* 追加内容到编辑器末尾
|
|
3418
|
-
*
|
|
3419
|
-
* 适用场景:连续语音输入、批量添加内容
|
|
3420
|
-
*
|
|
3421
|
-
* @param content - 要追加的内容
|
|
3278
|
+
* 前缀插槽
|
|
3422
3279
|
*/
|
|
3423
|
-
|
|
3280
|
+
prefix?: () => unknown;
|
|
3424
3281
|
/**
|
|
3425
|
-
*
|
|
3426
|
-
*
|
|
3427
|
-
* 适用场景:模板填充、内容重置
|
|
3282
|
+
* 内容插槽
|
|
3428
3283
|
*
|
|
3429
|
-
* @param
|
|
3284
|
+
* @param props - 插槽属性
|
|
3285
|
+
* @param props.editor - 编辑器实例
|
|
3430
3286
|
*/
|
|
3431
|
-
|
|
3287
|
+
content?: (props: {
|
|
3288
|
+
editor: unknown;
|
|
3289
|
+
}) => unknown;
|
|
3432
3290
|
/**
|
|
3433
|
-
*
|
|
3434
|
-
*
|
|
3291
|
+
* 单行模式内联操作按钮插槽
|
|
3292
|
+
*
|
|
3293
|
+
* @example
|
|
3294
|
+
* ```vue
|
|
3295
|
+
* <chat-input>
|
|
3296
|
+
* <template #actions-inline="{ insert, focus, disabled }">
|
|
3297
|
+
* <voice-input @result="insert" :disabled="disabled" />
|
|
3298
|
+
* <file-upload @select="handleFiles" />
|
|
3299
|
+
* </template>
|
|
3300
|
+
* </chat-input>
|
|
3301
|
+
* ```
|
|
3435
3302
|
*/
|
|
3436
|
-
|
|
3303
|
+
'actions-inline'?: (scope: ChatInputSlotScope) => unknown;
|
|
3437
3304
|
/**
|
|
3438
|
-
*
|
|
3439
|
-
* 用于控制按钮加载状态和禁用
|
|
3305
|
+
* 底部插槽(多行模式)
|
|
3440
3306
|
*/
|
|
3441
|
-
|
|
3307
|
+
footer?: (scope: ChatInputSlotScope) => unknown;
|
|
3442
3308
|
/**
|
|
3443
|
-
*
|
|
3444
|
-
* 用于控制按钮显示/隐藏
|
|
3309
|
+
* 底部右侧插槽(多行模式)
|
|
3445
3310
|
*/
|
|
3446
|
-
|
|
3311
|
+
'footer-right'?: (scope: ChatInputSlotScope) => unknown;
|
|
3447
3312
|
}
|
|
3448
3313
|
|
|
3449
3314
|
/**
|
|
@@ -3508,6 +3373,14 @@ export declare interface SpeechCallbacks {
|
|
|
3508
3373
|
onError: (error: Error) => void;
|
|
3509
3374
|
}
|
|
3510
3375
|
|
|
3376
|
+
declare interface SpeechCallbacks_2 {
|
|
3377
|
+
onStart: () => void;
|
|
3378
|
+
onInterim: (transcript: string) => void;
|
|
3379
|
+
onFinal: (transcript: string) => void;
|
|
3380
|
+
onEnd: (transcript?: string) => void;
|
|
3381
|
+
onError: (error: Error) => void;
|
|
3382
|
+
}
|
|
3383
|
+
|
|
3511
3384
|
export declare interface SpeechConfig {
|
|
3512
3385
|
customHandler?: SpeechHandler;
|
|
3513
3386
|
lang?: string;
|
|
@@ -3517,12 +3390,27 @@ export declare interface SpeechConfig {
|
|
|
3517
3390
|
onVoiceButtonClick?: (isRecording: boolean, preventDefault: () => void) => void | Promise<void>;
|
|
3518
3391
|
}
|
|
3519
3392
|
|
|
3393
|
+
declare interface SpeechConfig_2 {
|
|
3394
|
+
customHandler?: SpeechHandler_2;
|
|
3395
|
+
lang?: string;
|
|
3396
|
+
continuous?: boolean;
|
|
3397
|
+
interimResults?: boolean;
|
|
3398
|
+
autoReplace?: boolean;
|
|
3399
|
+
onVoiceButtonClick?: (isRecording: boolean, preventDefault: () => void) => void | Promise<void>;
|
|
3400
|
+
}
|
|
3401
|
+
|
|
3520
3402
|
export declare interface SpeechHandler {
|
|
3521
3403
|
start: (callbacks: SpeechCallbacks) => Promise<void> | void;
|
|
3522
3404
|
stop: () => Promise<void> | void;
|
|
3523
3405
|
isSupported: () => boolean;
|
|
3524
3406
|
}
|
|
3525
3407
|
|
|
3408
|
+
declare interface SpeechHandler_2 {
|
|
3409
|
+
start: (callbacks: SpeechCallbacks_2) => Promise<void> | void;
|
|
3410
|
+
stop: () => Promise<void> | void;
|
|
3411
|
+
isSupported: () => boolean;
|
|
3412
|
+
}
|
|
3413
|
+
|
|
3526
3414
|
export declare interface SpeechHandlerResult {
|
|
3527
3415
|
speechState: SpeechState;
|
|
3528
3416
|
start: () => void;
|
|
@@ -3562,20 +3450,13 @@ export declare interface SpeechState {
|
|
|
3562
3450
|
* // text: "帮我分析 的周报"
|
|
3563
3451
|
* // data: [
|
|
3564
3452
|
* // { type: 'text', content: '帮我分析 ' },
|
|
3565
|
-
* // { type: '
|
|
3453
|
+
* // { type: 'template', content: '张三' },
|
|
3566
3454
|
* // { type: 'text', content: ' 的周报' }
|
|
3567
3455
|
* // ]
|
|
3568
3456
|
*
|
|
3569
|
-
*
|
|
3570
|
-
*
|
|
3571
|
-
*
|
|
3572
|
-
* console.log('模板块:', blocks)
|
|
3573
|
-
* }
|
|
3574
|
-
*
|
|
3575
|
-
* // 提取选择器
|
|
3576
|
-
* if (data && data.some(item => item.type === 'select')) {
|
|
3577
|
-
* const selects = data.filter(item => item.type === 'select')
|
|
3578
|
-
* console.log('选择器:', selects)
|
|
3457
|
+
* if (data && data[0]?.type === 'template') {
|
|
3458
|
+
* const templates = data.filter(item => item.type === 'template')
|
|
3459
|
+
* console.log('模板变量:', templates)
|
|
3579
3460
|
* }
|
|
3580
3461
|
* }
|
|
3581
3462
|
* ```
|
|
@@ -3594,8 +3475,8 @@ export declare interface SpeechState {
|
|
|
3594
3475
|
* const allContent = data?.map(item => item.content).join('')
|
|
3595
3476
|
* console.log('完整内容:', allContent)
|
|
3596
3477
|
*
|
|
3597
|
-
* // 提取 mention
|
|
3598
|
-
* if (data && data
|
|
3478
|
+
* // 提取 mention
|
|
3479
|
+
* if (data && data[0]?.type === 'mention') {
|
|
3599
3480
|
* const mentions = data.filter(item => item.type === 'mention')
|
|
3600
3481
|
* console.log('提及的人:', mentions.map(m => m.content))
|
|
3601
3482
|
* console.log('关联值:', mentions.map(m => m.value))
|
|
@@ -3613,6 +3494,8 @@ export declare type StructuredData = TemplateItem[] | MentionStructuredItem[];
|
|
|
3613
3494
|
*/
|
|
3614
3495
|
export declare type SubmitTrigger = 'enter' | 'ctrlEnter' | 'shiftEnter';
|
|
3615
3496
|
|
|
3497
|
+
declare type SubmitTrigger_2 = 'enter' | 'ctrlEnter' | 'shiftEnter';
|
|
3498
|
+
|
|
3616
3499
|
/**
|
|
3617
3500
|
* 创建 Suggestion 扩展的便捷函数
|
|
3618
3501
|
*
|
|
@@ -3643,68 +3526,12 @@ export declare interface SuggestionGroup<T = Record<string, unknown>> {
|
|
|
3643
3526
|
|
|
3644
3527
|
export declare type SuggestionItem<T = Record<string, unknown>> = SuggestionBaseItem & T;
|
|
3645
3528
|
|
|
3646
|
-
/**
|
|
3647
|
-
* SuggestionList Emits
|
|
3648
|
-
*/
|
|
3649
|
-
export declare interface SuggestionListEmits {
|
|
3650
|
-
/**
|
|
3651
|
-
* 选择建议
|
|
3652
|
-
*
|
|
3653
|
-
* @param suggestion - 建议内容
|
|
3654
|
-
*/
|
|
3655
|
-
(e: 'select', suggestion: string): void;
|
|
3656
|
-
/**
|
|
3657
|
-
* 鼠标进入
|
|
3658
|
-
*
|
|
3659
|
-
* @param index - 索引
|
|
3660
|
-
*/
|
|
3661
|
-
(e: 'mouse-enter', index: number): void;
|
|
3662
|
-
/**
|
|
3663
|
-
* 鼠标离开
|
|
3664
|
-
*/
|
|
3665
|
-
(e: 'mouse-leave'): void;
|
|
3666
|
-
}
|
|
3667
|
-
|
|
3668
|
-
/**
|
|
3669
|
-
* SuggestionList Props
|
|
3670
|
-
*/
|
|
3671
|
-
export declare interface SuggestionListProps {
|
|
3672
|
-
/**
|
|
3673
|
-
* 是否显示
|
|
3674
|
-
*/
|
|
3675
|
-
show: boolean;
|
|
3676
|
-
/**
|
|
3677
|
-
* 建议列表
|
|
3678
|
-
*/
|
|
3679
|
-
suggestions: SenderSuggestionItem[];
|
|
3680
|
-
/**
|
|
3681
|
-
* 键盘激活索引
|
|
3682
|
-
*/
|
|
3683
|
-
activeKeyboardIndex: number;
|
|
3684
|
-
/**
|
|
3685
|
-
* 鼠标激活索引
|
|
3686
|
-
*/
|
|
3687
|
-
activeMouseIndex: number;
|
|
3688
|
-
/**
|
|
3689
|
-
* 输入值
|
|
3690
|
-
*/
|
|
3691
|
-
inputValue: string;
|
|
3692
|
-
/**
|
|
3693
|
-
* 弹窗样式
|
|
3694
|
-
*/
|
|
3695
|
-
popupStyle?: Record<string, string | number>;
|
|
3696
|
-
}
|
|
3697
|
-
|
|
3698
3529
|
/**
|
|
3699
3530
|
* 插件配置选项
|
|
3700
3531
|
*/
|
|
3701
3532
|
export declare interface SuggestionOptions {
|
|
3702
3533
|
/**
|
|
3703
|
-
*
|
|
3704
|
-
*
|
|
3705
|
-
* 不传或传空数组时,建议功能不会显示
|
|
3706
|
-
*
|
|
3707
|
-
* @default []
|
|
3534
|
+
* 建议项列表(必填)
|
|
3708
3535
|
*
|
|
3709
3536
|
* @example
|
|
3710
3537
|
* ```typescript
|
|
@@ -3780,7 +3607,7 @@ export declare interface SuggestionOptions {
|
|
|
3780
3607
|
/**
|
|
3781
3608
|
* 选中建议项的回调
|
|
3782
3609
|
*
|
|
3783
|
-
* @param item - 选中的建议项(包含完整的
|
|
3610
|
+
* @param item - 选中的建议项(包含完整的 SuggestionItem 信息)
|
|
3784
3611
|
* @returns 返回 false 可阻止默认回填行为
|
|
3785
3612
|
*
|
|
3786
3613
|
* @example 默认行为(自动回填)
|
|
@@ -4022,6 +3849,20 @@ declare interface SuggestionTextPart_2 {
|
|
|
4022
3849
|
*/
|
|
4023
3850
|
declare function template(items: TemplateItem[] | Ref<TemplateItem[]>, options?: Partial<Omit<TemplateOptions, 'items'>>): Extension<TemplateOptions, any>;
|
|
4024
3851
|
|
|
3852
|
+
/**
|
|
3853
|
+
* Template 节点属性
|
|
3854
|
+
*/
|
|
3855
|
+
export declare interface TemplateAttrs {
|
|
3856
|
+
/**
|
|
3857
|
+
* 模板块 ID
|
|
3858
|
+
*/
|
|
3859
|
+
id: string;
|
|
3860
|
+
/**
|
|
3861
|
+
* 模板块内容
|
|
3862
|
+
*/
|
|
3863
|
+
content: string;
|
|
3864
|
+
}
|
|
3865
|
+
|
|
4025
3866
|
/**
|
|
4026
3867
|
* 模板项(用户侧)
|
|
4027
3868
|
*
|
|
@@ -4084,10 +3925,16 @@ export declare type TemplateItem = {
|
|
|
4084
3925
|
value?: string;
|
|
4085
3926
|
};
|
|
4086
3927
|
|
|
3928
|
+
declare interface TemplateItem_2 {
|
|
3929
|
+
id: string;
|
|
3930
|
+
type: 'template' | 'block';
|
|
3931
|
+
content: string;
|
|
3932
|
+
}
|
|
3933
|
+
|
|
4087
3934
|
/**
|
|
4088
3935
|
* Template 配置选项
|
|
4089
3936
|
*/
|
|
4090
|
-
declare interface TemplateOptions {
|
|
3937
|
+
export declare interface TemplateOptions {
|
|
4091
3938
|
/**
|
|
4092
3939
|
* 模板数据列表(推荐使用 ref 实现响应式)
|
|
4093
3940
|
*
|
|
@@ -4114,13 +3961,41 @@ declare interface TemplateOptions {
|
|
|
4114
3961
|
* })
|
|
4115
3962
|
* ```
|
|
4116
3963
|
*/
|
|
4117
|
-
items?: TemplateItem[] | Ref<TemplateItem[]>;
|
|
3964
|
+
items?: TemplateItem[] | Ref<TemplateItem[], TemplateItem[]>;
|
|
4118
3965
|
/**
|
|
4119
3966
|
* HTML 属性
|
|
4120
3967
|
*/
|
|
4121
3968
|
HTMLAttributes?: Record<string, unknown>;
|
|
4122
3969
|
}
|
|
4123
3970
|
|
|
3971
|
+
/**
|
|
3972
|
+
* TemplateSelect 节点属性
|
|
3973
|
+
*/
|
|
3974
|
+
export declare interface TemplateSelectAttrs {
|
|
3975
|
+
/**
|
|
3976
|
+
* 唯一标识
|
|
3977
|
+
*/
|
|
3978
|
+
id: string;
|
|
3979
|
+
/**
|
|
3980
|
+
* 占位文字(未选择时显示)
|
|
3981
|
+
*/
|
|
3982
|
+
placeholder: string;
|
|
3983
|
+
/**
|
|
3984
|
+
* 选项列表
|
|
3985
|
+
*/
|
|
3986
|
+
options: SelectOption_2[];
|
|
3987
|
+
/**
|
|
3988
|
+
* 当前选中的值(可选)
|
|
3989
|
+
*/
|
|
3990
|
+
value?: string;
|
|
3991
|
+
}
|
|
3992
|
+
|
|
3993
|
+
declare interface TextItem {
|
|
3994
|
+
id: string;
|
|
3995
|
+
type: 'text';
|
|
3996
|
+
content: string;
|
|
3997
|
+
}
|
|
3998
|
+
|
|
4124
3999
|
export declare interface ThemeProviderProps {
|
|
4125
4000
|
/**
|
|
4126
4001
|
* 颜色模式(v-model:colorMode),可选值:light、dark、auto,默认值:auto
|
|
@@ -4142,19 +4017,6 @@ export declare type ThemeStorage = Pick<Storage, 'getItem' | 'setItem'>;
|
|
|
4142
4017
|
|
|
4143
4018
|
declare type ThemeType = 'light' | 'dark';
|
|
4144
4019
|
|
|
4145
|
-
/**
|
|
4146
|
-
* 工具调用接口(支持 OpenAI 格式)
|
|
4147
|
-
*/
|
|
4148
|
-
declare interface ToolCall {
|
|
4149
|
-
id: string;
|
|
4150
|
-
type: 'function' | string;
|
|
4151
|
-
function: {
|
|
4152
|
-
name: string;
|
|
4153
|
-
arguments: string;
|
|
4154
|
-
};
|
|
4155
|
-
[x: string]: any;
|
|
4156
|
-
}
|
|
4157
|
-
|
|
4158
4020
|
/**
|
|
4159
4021
|
* Tooltip 内容类型
|
|
4160
4022
|
* - string: 简单文本
|
|
@@ -4189,7 +4051,7 @@ export declare interface UploadButtonEmits {
|
|
|
4189
4051
|
/**
|
|
4190
4052
|
* 文件验证失败
|
|
4191
4053
|
*/
|
|
4192
|
-
(e: 'error', error: Error,
|
|
4054
|
+
(e: 'error', error: Error, file?: File): void;
|
|
4193
4055
|
}
|
|
4194
4056
|
|
|
4195
4057
|
export declare interface UploadButtonProps {
|
|
@@ -4244,180 +4106,30 @@ export declare interface UrlAttachment extends BaseAttachment {
|
|
|
4244
4106
|
rawFile?: File;
|
|
4245
4107
|
}
|
|
4246
4108
|
|
|
4247
|
-
/**
|
|
4248
|
-
* 当目标滚动容器 `target` 接近底部时,且源数据 `source` 变化,自动滚动到底部
|
|
4249
|
-
* @param target 目标滚动容器的元素引用
|
|
4250
|
-
* @param source 监听的源数据,当该数据变化时会触发自动滚动
|
|
4251
|
-
* @param options 配置选项
|
|
4252
|
-
* @param options.scrollOnMount 是否在组件挂载时滚动到底部,默认为 true
|
|
4253
|
-
* @param options.bottomThreshold 判断接近底部的阈值(像素),默认为 20
|
|
4254
|
-
* @returns scrollToBottom 手动滚动到底部的方法
|
|
4255
|
-
*/
|
|
4256
|
-
export declare function useAutoScroll(target: MaybeComputedElementRef, source: MaybeRefOrGetter<any>, options?: {
|
|
4257
|
-
scrollOnMount?: boolean;
|
|
4258
|
-
scrollThrottle?: number;
|
|
4259
|
-
bottomThreshold?: number;
|
|
4260
|
-
}): {
|
|
4261
|
-
scrollToBottom: (behavior?: ScrollBehavior) => Promise<void>;
|
|
4262
|
-
};
|
|
4263
|
-
|
|
4264
|
-
export declare function useBubbleBoxRenderer(messages: MaybeRefOrGetter<BubbleMessage[]>, contentIndex?: number): ComputedRef<{
|
|
4265
|
-
renderer: Component;
|
|
4266
|
-
attributes?: Record<string, string>;
|
|
4267
|
-
}>;
|
|
4268
|
-
|
|
4269
|
-
export declare function useBubbleContentRenderer(message: MaybeRefOrGetter<BubbleMessage>, contentIndex?: number): ComputedRef<Component>;
|
|
4270
|
-
|
|
4271
|
-
export declare function useBubbleStateChangeFn(): (key: string, _value: unknown) => void;
|
|
4272
|
-
|
|
4273
|
-
/**
|
|
4274
|
-
* useEditor 返回类型
|
|
4275
|
-
*/
|
|
4276
|
-
export declare interface UseEditorReturn {
|
|
4277
|
-
/**
|
|
4278
|
-
* 编辑器实例
|
|
4279
|
-
* 注意:Tiptap 的 useEditor 返回 ShallowRef<Editor | undefined>
|
|
4280
|
-
*/
|
|
4281
|
-
editor: Ref<Editor | undefined>;
|
|
4282
|
-
/**
|
|
4283
|
-
* 编辑器 DOM 引用
|
|
4284
|
-
*/
|
|
4285
|
-
editorRef: Ref<HTMLElement | null>;
|
|
4286
|
-
}
|
|
4287
|
-
|
|
4288
|
-
/**
|
|
4289
|
-
* useKeyboardShortcuts Hook 参数
|
|
4290
|
-
*/
|
|
4291
|
-
export declare interface UseKeyboardShortcutsParams {
|
|
4292
|
-
submitType: Ref<SubmitTrigger>;
|
|
4293
|
-
canSubmit: Ref<boolean>;
|
|
4294
|
-
mode: Ref<InputMode>;
|
|
4295
|
-
submit: () => void;
|
|
4296
|
-
setMode: (mode: InputMode) => void;
|
|
4297
|
-
}
|
|
4298
|
-
|
|
4299
|
-
/**
|
|
4300
|
-
* useKeyboardShortcuts Hook 返回值
|
|
4301
|
-
*/
|
|
4302
|
-
export declare interface UseKeyboardShortcutsReturn {
|
|
4303
|
-
checkSubmitShortcut: (event: KeyboardEvent) => boolean;
|
|
4304
|
-
checkNewlineShortcut: (event: KeyboardEvent) => boolean;
|
|
4305
|
-
}
|
|
4306
|
-
|
|
4307
|
-
export declare const useMessageContent: <T = string | ChatMessageContentItem | undefined>(message: MaybeRefOrGetter<BubbleMessage>, contentIndex?: number) => ComputedRef<T>;
|
|
4308
|
-
|
|
4309
|
-
/**
|
|
4310
|
-
* useModeSwitch 返回类型
|
|
4311
|
-
*/
|
|
4312
|
-
export declare interface UseModeSwitchReturn {
|
|
4313
|
-
/**
|
|
4314
|
-
* 当前模式
|
|
4315
|
-
*/
|
|
4316
|
-
currentMode: Ref<InputMode>;
|
|
4317
|
-
/**
|
|
4318
|
-
* 是否正在自动切换
|
|
4319
|
-
*/
|
|
4320
|
-
isAutoSwitching: Ref<boolean>;
|
|
4321
|
-
/**
|
|
4322
|
-
* 设置模式
|
|
4323
|
-
*
|
|
4324
|
-
* @param mode - 输入模式
|
|
4325
|
-
*/
|
|
4326
|
-
setMode: (mode: InputMode) => void;
|
|
4327
|
-
/**
|
|
4328
|
-
* 检查内容溢出
|
|
4329
|
-
*
|
|
4330
|
-
* 用于自动切换模式
|
|
4331
|
-
*/
|
|
4332
|
-
checkOverflow: () => void;
|
|
4333
|
-
}
|
|
4334
|
-
|
|
4335
|
-
/**
|
|
4336
|
-
* Omit specified fields from message and return computed props
|
|
4337
|
-
* @param props - The original props containing the message
|
|
4338
|
-
* @param fields - Array of field names to omit from the message
|
|
4339
|
-
* @returns An object containing restMessage and restProps computed refs
|
|
4340
|
-
*/
|
|
4341
|
-
export declare function useOmitMessageFields<P extends BubbleContentRendererProps, K extends keyof BubbleMessage>(props: P, fields: K[]): {
|
|
4342
|
-
restMessage: ComputedRef<Omit<BubbleMessage, K>>;
|
|
4343
|
-
restProps: ComputedRef<P>;
|
|
4344
|
-
};
|
|
4345
|
-
|
|
4346
4109
|
declare type UserItem = UserTextItem | UserTemplateItem;
|
|
4347
4110
|
|
|
4348
|
-
declare type UserTemplateItem = Omit<Pick<
|
|
4349
|
-
id?:
|
|
4111
|
+
declare type UserTemplateItem = Omit<Pick<TemplateItem_2, 'type' | 'content'>, 'id'> & {
|
|
4112
|
+
id?: TemplateItem_2['id'];
|
|
4350
4113
|
};
|
|
4351
4114
|
|
|
4352
|
-
declare type UserTextItem = Omit<
|
|
4353
|
-
id?:
|
|
4115
|
+
declare type UserTextItem = Omit<TextItem, 'id'> & {
|
|
4116
|
+
id?: TextItem['id'];
|
|
4354
4117
|
};
|
|
4355
4118
|
|
|
4356
4119
|
/**
|
|
4357
|
-
* 获取
|
|
4120
|
+
* 获取 ChatInput Context
|
|
4358
4121
|
*/
|
|
4359
4122
|
export declare function useSenderContext(): SenderContext;
|
|
4360
4123
|
|
|
4361
4124
|
/**
|
|
4362
|
-
*
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
*
|
|
4125
|
+
* 语音识别处理 Hook
|
|
4126
|
+
* 支持内置 Web Speech API 和自定义语音处理器
|
|
4127
|
+
* 通过 customHandler 参数切换实现,默认使用内置的 Web Speech API
|
|
4128
|
+
*
|
|
4129
|
+
* @param options 语音识别配置
|
|
4130
|
+
* @returns 语音识别控制器
|
|
4368
4131
|
*/
|
|
4369
|
-
export declare
|
|
4370
|
-
/**
|
|
4371
|
-
* 弹窗是否可见
|
|
4372
|
-
*/
|
|
4373
|
-
isPopupVisible: Ref<boolean>;
|
|
4374
|
-
/**
|
|
4375
|
-
* 当前激活的建议
|
|
4376
|
-
*/
|
|
4377
|
-
activeSuggestion: Ref<string>;
|
|
4378
|
-
/**
|
|
4379
|
-
* 键盘导航的激活索引
|
|
4380
|
-
*/
|
|
4381
|
-
activeKeyboardIndex: Ref<number>;
|
|
4382
|
-
/**
|
|
4383
|
-
* 鼠标悬停的激活索引
|
|
4384
|
-
*/
|
|
4385
|
-
activeMouseIndex: Ref<number>;
|
|
4386
|
-
/**
|
|
4387
|
-
* 自动补全文本
|
|
4388
|
-
*/
|
|
4389
|
-
autoCompleteText: Ref<string>;
|
|
4390
|
-
/**
|
|
4391
|
-
* 是否显示 Tab 提示器
|
|
4392
|
-
*/
|
|
4393
|
-
showTabIndicator: Ref<boolean>;
|
|
4394
|
-
/**
|
|
4395
|
-
* 应用建议
|
|
4396
|
-
*
|
|
4397
|
-
* @param suggestion - 建议内容
|
|
4398
|
-
*/
|
|
4399
|
-
applySuggestion: (suggestion: string) => void;
|
|
4400
|
-
/**
|
|
4401
|
-
* 键盘导航
|
|
4402
|
-
*
|
|
4403
|
-
* @param direction - 方向(上/下)
|
|
4404
|
-
*/
|
|
4405
|
-
navigateWithKeyboard: (direction: 'up' | 'down') => void;
|
|
4406
|
-
/**
|
|
4407
|
-
* 鼠标进入
|
|
4408
|
-
*
|
|
4409
|
-
* @param index - 建议项索引
|
|
4410
|
-
*/
|
|
4411
|
-
handleMouseEnter: (index: number) => void;
|
|
4412
|
-
/**
|
|
4413
|
-
* 鼠标离开
|
|
4414
|
-
*/
|
|
4415
|
-
handleMouseLeave: () => void;
|
|
4416
|
-
/**
|
|
4417
|
-
* 关闭弹窗
|
|
4418
|
-
*/
|
|
4419
|
-
closePopup: () => void;
|
|
4420
|
-
}
|
|
4132
|
+
export declare function useSpeechHandler(options: SpeechHookOptions): SpeechHandlerResult;
|
|
4421
4133
|
|
|
4422
4134
|
export declare const useTheme: () => {
|
|
4423
4135
|
theme: Ref<string, string> | undefined;
|
|
@@ -4460,27 +4172,9 @@ export declare interface VoiceButtonEmits {
|
|
|
4460
4172
|
*/
|
|
4461
4173
|
export declare interface VoiceButtonProps {
|
|
4462
4174
|
/**
|
|
4463
|
-
*
|
|
4464
|
-
*
|
|
4465
|
-
* @default IconVoice
|
|
4466
|
-
*
|
|
4467
|
-
* @example 基础使用
|
|
4468
|
-
* ```vue
|
|
4469
|
-
* <VoiceButton :icon="IconMicrophone" />
|
|
4470
|
-
* ```
|
|
4175
|
+
* 自定义图标
|
|
4471
4176
|
*/
|
|
4472
4177
|
icon?: VNode | Component;
|
|
4473
|
-
/**
|
|
4474
|
-
* 自定义录音中状态的图标
|
|
4475
|
-
*
|
|
4476
|
-
* @default IconRecordingWave
|
|
4477
|
-
*
|
|
4478
|
-
* @example 自定义录音中图标
|
|
4479
|
-
* ```vue
|
|
4480
|
-
* <VoiceButton :recording-icon="MyRecordingIcon" />
|
|
4481
|
-
* ```
|
|
4482
|
-
*/
|
|
4483
|
-
recordingIcon?: VNode | Component;
|
|
4484
4178
|
/**
|
|
4485
4179
|
* 是否禁用(会与 Context 的 disabled 合并)
|
|
4486
4180
|
*/
|
|
@@ -4512,6 +4206,46 @@ export declare interface VoiceButtonProps {
|
|
|
4512
4206
|
onButtonClick?: (isRecording: boolean, preventDefault: () => void) => void | Promise<void>;
|
|
4513
4207
|
}
|
|
4514
4208
|
|
|
4209
|
+
/**
|
|
4210
|
+
* 内置 Web Speech API 处理器
|
|
4211
|
+
* 基于浏览器原生 Web Speech API 实现的语音识别
|
|
4212
|
+
*/
|
|
4213
|
+
export declare class WebSpeechHandler implements SpeechHandler {
|
|
4214
|
+
private recognition?;
|
|
4215
|
+
private options;
|
|
4216
|
+
/**
|
|
4217
|
+
* 初始化语音识别实例
|
|
4218
|
+
*/
|
|
4219
|
+
private initialize;
|
|
4220
|
+
constructor(options: SpeechConfig);
|
|
4221
|
+
/**
|
|
4222
|
+
* 检查浏览器是否支持 Web Speech API
|
|
4223
|
+
*/
|
|
4224
|
+
static isSupported(): boolean;
|
|
4225
|
+
/**
|
|
4226
|
+
* 检查浏览器是否支持 Web Speech API(实例方法)
|
|
4227
|
+
*/
|
|
4228
|
+
isSupported(): boolean;
|
|
4229
|
+
/**
|
|
4230
|
+
* 设置语音识别事件处理器
|
|
4231
|
+
* @param callbacks 语音识别回调函数集合
|
|
4232
|
+
*/
|
|
4233
|
+
private setupEventHandlers;
|
|
4234
|
+
/**
|
|
4235
|
+
* 清理事件监听器
|
|
4236
|
+
*/
|
|
4237
|
+
private cleanup;
|
|
4238
|
+
/**
|
|
4239
|
+
* 开始语音识别
|
|
4240
|
+
* @param callbacks 语音识别回调函数集合
|
|
4241
|
+
*/
|
|
4242
|
+
start(callbacks: SpeechCallbacks): void;
|
|
4243
|
+
/**
|
|
4244
|
+
* 停止语音识别并清理资源
|
|
4245
|
+
*/
|
|
4246
|
+
stop(): void;
|
|
4247
|
+
}
|
|
4248
|
+
|
|
4515
4249
|
export declare interface WelcomeProps {
|
|
4516
4250
|
title: string;
|
|
4517
4251
|
description: string;
|
|
@@ -4523,24 +4257,6 @@ export declare interface WelcomeSlots {
|
|
|
4523
4257
|
footer: () => unknown;
|
|
4524
4258
|
}
|
|
4525
4259
|
|
|
4526
|
-
/**
|
|
4527
|
-
* WordCounter Props
|
|
4528
|
-
*/
|
|
4529
|
-
export declare interface WordCounterProps {
|
|
4530
|
-
/**
|
|
4531
|
-
* 当前字符数
|
|
4532
|
-
*/
|
|
4533
|
-
current: number;
|
|
4534
|
-
/**
|
|
4535
|
-
* 最大字符数
|
|
4536
|
-
*/
|
|
4537
|
-
max: number;
|
|
4538
|
-
/**
|
|
4539
|
-
* 是否超出限制
|
|
4540
|
-
*/
|
|
4541
|
-
isOverLimit: boolean;
|
|
4542
|
-
}
|
|
4543
|
-
|
|
4544
4260
|
export { }
|
|
4545
4261
|
|
|
4546
4262
|
|