@opentiny/tiny-robot 0.3.1-alpha.8 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -9,73 +9,41 @@ import { ComponentOptionsMixin } from 'vue';
9
9
  import { ComponentProvideOptions } from 'vue';
10
10
  import { ComponentPublicInstance } from 'vue';
11
11
  import { ComputedRef } from 'vue';
12
+ import { Config } from 'dompurify';
12
13
  import { CreateComponentPublicInstanceWithMixins } from 'vue';
13
14
  import { CSSProperties } from 'vue';
14
15
  import { DebuggerEvent } from 'vue';
15
16
  import { DefineComponent } from 'vue';
16
17
  import { Directive } from 'vue';
17
- import { Editor } from '@tiptap/vue-3';
18
- import { Editor as Editor_2 } from '@tiptap/core';
19
- import { Extension } from '@tiptap/core';
18
+ import { ExtractPropTypes } from 'vue';
20
19
  import { GlobalComponents } from 'vue';
21
20
  import { GlobalDirectives } from 'vue';
22
21
  import { MaybeComputedElementRef } from '@vueuse/core';
23
22
  import { MaybeRefOrGetter } from 'vue';
24
23
  import { nextTick } from 'vue';
25
- import { Node as Node_2 } from '@tiptap/core';
26
24
  import { OnCleanup } from '@vue/reactivity';
25
+ import { Options } from 'markdown-it';
26
+ import { PropType } from 'vue';
27
27
  import { PublicProps } from 'vue';
28
28
  import { Ref } from 'vue';
29
+ import { RendererElement } from 'vue';
30
+ import { RendererNode } from 'vue';
29
31
  import { ShallowUnwrapRef } from 'vue';
30
32
  import { Slot } from 'vue';
31
33
  import { TransitionProps } from 'vue';
32
- import { UseFileDialogOptions } from '@vueuse/core';
33
34
  import { VNode } from 'vue';
34
35
  import { VNodeProps } from 'vue';
35
36
  import { WatchOptions } from 'vue';
36
37
  import { WatchStopHandle } from 'vue';
37
38
 
38
- declare const __VLS_component: DefineComponent<BubbleProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
39
- "state-change": (payload: {
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
- }>, {
39
+ declare const __VLS_component: DefineComponent<BubbleProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BubbleProps> & Readonly<{}>, {
40
+ content: string | BubbleContentItem[];
53
41
  placement: "start" | "end";
54
- shape: "corner" | "rounded" | "none";
55
- contentRenderMode: "single" | "split";
42
+ shape: "rounded" | "corner";
43
+ abortedText: string;
56
44
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
57
45
 
58
- declare const __VLS_component_10: DefineComponent<__VLS_PublicProps_3, {
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, {
46
+ declare const __VLS_component_10: DefineComponent<__VLS_PublicProps_4, {
79
47
  update: () => void;
80
48
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
81
49
  "update:selectedGroup": (value: string) => any;
@@ -211,7 +179,7 @@ show?: TooltipContentProps["show"];
211
179
  }>, {}, {}, {}, {}, {}> | null;
212
180
  }, any>;
213
181
 
214
- declare const __VLS_component_12: DefineComponent<__VLS_PublicProps_5, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
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,11 +190,11 @@ targetElement: string;
222
190
  storageKey: string;
223
191
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
224
192
 
225
- declare const __VLS_component_13: DefineComponent<WelcomeProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<WelcomeProps> & Readonly<{}>, {
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 __VLS_component_14: DefineComponent<__VLS_PublicProps_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
197
+ declare const __VLS_component_13: DefineComponent<__VLS_PublicProps_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
230
198
  "update:visible": (value: boolean) => any;
231
199
  } & {
232
200
  refresh: (tab: "installed" | "market") => any;
@@ -277,60 +245,11 @@ allowPluginAdd: boolean;
277
245
  marketLoading: boolean;
278
246
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
279
247
 
280
- declare const __VLS_component_15: DefineComponent<ActionButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ActionButtonProps> & Readonly<{}>, {
281
- disabled: boolean;
282
- active: boolean;
283
- tooltipPlacement: TooltipPlacement;
284
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
285
-
286
- declare const __VLS_component_16: DefineComponent<VoiceButtonProps, {
287
- start: () => void;
288
- stop: () => void;
289
- speechState: SpeechState;
290
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
291
- "speech-start": () => any;
292
- "speech-interim": (transcript: string) => any;
293
- "speech-final": (transcript: string) => any;
294
- "speech-end": (transcript?: string | undefined) => any;
295
- "speech-error": (error: Error) => any;
296
- }, string, PublicProps, Readonly<VoiceButtonProps> & Readonly<{
297
- "onSpeech-start"?: (() => any) | undefined;
298
- "onSpeech-interim"?: ((transcript: string) => any) | undefined;
299
- "onSpeech-final"?: ((transcript: string) => any) | undefined;
300
- "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
301
- "onSpeech-error"?: ((error: Error) => any) | undefined;
302
- }>, {
303
- tooltipPlacement: TooltipPlacement;
304
- autoInsert: boolean;
248
+ declare const __VLS_component_2: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
249
+ contentRenderers: Record<string, BubbleContentRenderer>;
305
250
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
306
251
 
307
- declare const __VLS_component_2: DefineComponent<BubbleListProps, {
308
- scrollToBottom: (behavior?: ScrollBehavior) => Promise<void>;
309
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
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>;
332
-
333
- declare const __VLS_component_4: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
252
+ declare const __VLS_component_3: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
334
253
  "update:show": (value: boolean) => any;
335
254
  "update:fullscreen": (value: boolean | undefined) => any;
336
255
  } & {
@@ -343,9 +262,9 @@ onClose?: (() => any) | undefined;
343
262
  title: string;
344
263
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
345
264
 
346
- declare const __VLS_component_5: DefineComponent<DragOverlayProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<DragOverlayProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
265
+ declare const __VLS_component_4: DefineComponent<DragOverlayProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<DragOverlayProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
347
266
 
348
- declare const __VLS_component_6: DefineComponent<__VLS_PublicProps_2, {
267
+ declare const __VLS_component_5: DefineComponent<__VLS_PublicProps_2, {
349
268
  update: () => void;
350
269
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
351
270
  "update:show": (value: boolean) => any;
@@ -453,20 +372,20 @@ content?: () => VNode[];
453
372
  }) | null;
454
373
  }, any>;
455
374
 
456
- declare const __VLS_component_7: DefineComponent<PromptsProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
375
+ declare const __VLS_component_6: DefineComponent<PromptsProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
457
376
  "item-click": (ev: MouseEvent, item: PromptProps) => any;
458
377
  }, string, PublicProps, Readonly<PromptsProps> & Readonly<{
459
378
  "onItem-click"?: ((ev: MouseEvent, item: PromptProps) => any) | undefined;
460
379
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
461
380
 
462
- declare const __VLS_component_8: DefineComponent<SenderProps_2, {
381
+ declare const __VLS_component_7: DefineComponent<SenderProps, {
463
382
  focus: () => void;
464
383
  blur: () => void;
465
384
  clear: () => void;
466
385
  submit: () => void;
467
- setTemplateData: (templateData: UserTemplateItem[]) => void;
468
386
  startSpeech: () => void;
469
387
  stopSpeech: () => void;
388
+ activateTemplateFirstField: () => void;
470
389
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
471
390
  clear: () => any;
472
391
  blur: (event: FocusEvent) => any;
@@ -474,312 +393,613 @@ cancel: () => any;
474
393
  focus: (event: FocusEvent) => any;
475
394
  submit: (value: string) => any;
476
395
  "update:modelValue": (value: string) => any;
396
+ "update:templateData": (value: UserItem[]) => any;
477
397
  "speech-start": () => any;
478
- "speech-interim": (transcript: string) => any;
479
398
  "speech-end": (transcript?: string | undefined) => any;
399
+ "speech-interim": (transcript: string) => any;
480
400
  "speech-error": (error: Error) => any;
481
- "update:templateData": (value: UserItem[]) => any;
482
401
  "suggestion-select": (value: string) => any;
483
402
  "escape-press": () => any;
484
403
  "reset-template": () => any;
485
404
  "files-selected": (files: File[]) => any;
486
- }, string, PublicProps, Readonly<SenderProps_2> & Readonly<{
405
+ }, string, PublicProps, Readonly<SenderProps> & Readonly<{
487
406
  onClear?: (() => any) | undefined;
488
407
  onBlur?: ((event: FocusEvent) => any) | undefined;
489
408
  onCancel?: (() => any) | undefined;
490
409
  onFocus?: ((event: FocusEvent) => any) | undefined;
491
410
  onSubmit?: ((value: string) => any) | undefined;
492
411
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
412
+ "onUpdate:templateData"?: ((value: UserItem[]) => any) | undefined;
493
413
  "onSpeech-start"?: (() => any) | undefined;
494
- "onSpeech-interim"?: ((transcript: string) => any) | undefined;
495
414
  "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
415
+ "onSpeech-interim"?: ((transcript: string) => any) | undefined;
496
416
  "onSpeech-error"?: ((error: Error) => any) | undefined;
497
- "onUpdate:templateData"?: ((value: UserItem[]) => any) | undefined;
498
417
  "onSuggestion-select"?: ((value: string) => any) | undefined;
499
418
  "onEscape-press"?: (() => any) | undefined;
500
419
  "onReset-template"?: (() => any) | undefined;
501
420
  "onFiles-selected"?: ((files: File[]) => any) | undefined;
502
421
  }>, {
422
+ disabled: boolean;
423
+ modelValue: string;
503
424
  placeholder: string;
504
425
  mode: InputMode;
426
+ loading: boolean;
427
+ autofocus: boolean;
428
+ allowSpeech: boolean;
429
+ allowFiles: boolean;
505
430
  submitType: SubmitTrigger;
431
+ stopText: string;
432
+ autoSize: AutoSize;
433
+ suggestions: ISuggestionItem[];
434
+ clearable: boolean;
435
+ maxLength: number;
436
+ showWordLimit: boolean;
437
+ suggestionPopupWidth: string | number;
438
+ theme: ThemeType;
439
+ templateData: UserItem[];
506
440
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
507
- senderRef: ({
508
- $: ComponentInternalInstance;
509
- $data: {};
510
- $props: {
511
- readonly modelValue?: string | undefined;
512
- readonly defaultValue?: string | undefined;
513
- readonly placeholder?: string | undefined;
514
- readonly disabled?: boolean | undefined;
515
- readonly loading?: boolean | undefined;
516
- readonly autofocus?: boolean | undefined;
517
- readonly mode?: InputMode | undefined;
518
- readonly autoSize?: AutoSize | undefined;
519
- readonly maxLength?: number | undefined;
520
- readonly showWordLimit?: boolean | undefined;
521
- readonly clearable?: boolean | undefined;
522
- readonly extensions?: Extension[] | any[] | undefined;
523
- readonly size?: "normal" | "small" | undefined;
524
- readonly stopText?: string | undefined;
525
- readonly defaultActions?: DefaultActions | undefined;
526
- readonly submitType?: SubmitTrigger | undefined;
527
- readonly onClear?: (() => any) | undefined;
528
- readonly onInput?: ((value: string) => any) | undefined;
529
- readonly onBlur?: ((event: FocusEvent) => any) | undefined;
530
- readonly onCancel?: (() => any) | undefined;
531
- readonly onFocus?: ((event: FocusEvent) => any) | undefined;
532
- readonly onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
533
- readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
534
- } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
535
- $attrs: {
536
- [x: string]: unknown;
537
- };
538
- $refs: {
539
- [x: string]: unknown;
441
+ senderRef: HTMLDivElement;
442
+ inputWrapperRef: HTMLDivElement;
443
+ templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
444
+ modelValue?: UserItem[];
445
+ } & {
446
+ autoSize: boolean | {
447
+ minRows: number;
448
+ maxRows: number;
540
449
  };
541
- $slots: Readonly<{
542
- [name: string]: Slot<any> | undefined;
543
- }>;
544
- $root: ComponentPublicInstance | null;
545
- $parent: ComponentPublicInstance | null;
546
- $host: Element | null;
547
- $emit: ((event: "clear") => void) & ((event: "input", value: string) => void) & ((event: "blur", event: FocusEvent) => void) & ((event: "cancel") => void) & ((event: "focus", event: FocusEvent) => void) & ((event: "submit", textContent: string, structuredData?: StructuredData | undefined) => void) & ((event: "update:modelValue", value: string) => void);
548
- $el: HTMLDivElement;
549
- $options: ComponentOptionsBase<Readonly<SenderProps> & Readonly<{
550
- onClear?: (() => any) | undefined;
551
- onInput?: ((value: string) => any) | undefined;
552
- onBlur?: ((event: FocusEvent) => any) | undefined;
553
- onCancel?: (() => any) | undefined;
554
- onFocus?: ((event: FocusEvent) => any) | undefined;
555
- onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
556
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
450
+ }> & Readonly<{
451
+ onSubmit?: (() => any) | undefined;
452
+ "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
557
453
  }>, {
558
- submit: () => void;
559
- clear: () => void;
560
- cancel: () => void;
561
- focus: () => void;
562
- blur: () => void;
563
- setContent: (content: string) => void;
564
- getContent: () => string;
565
- editor: SenderContext["editor"];
566
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
567
- clear: () => any;
568
- input: (value: string) => any;
569
- blur: (event: FocusEvent) => any;
570
- cancel: () => any;
571
- focus: (event: FocusEvent) => any;
572
- submit: (textContent: string, structuredData?: StructuredData | undefined) => any;
573
- "update:modelValue": (value: string) => any;
574
- }, string, {
575
- size: "normal" | "small";
576
- placeholder: string;
577
- mode: InputMode;
578
- autoSize: AutoSize;
579
- extensions: Extension[] | any[];
580
- submitType: SubmitTrigger;
581
- }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
582
- beforeCreate?: (() => void) | (() => void)[];
583
- created?: (() => void) | (() => void)[];
584
- beforeMount?: (() => void) | (() => void)[];
585
- mounted?: (() => void) | (() => void)[];
586
- beforeUpdate?: (() => void) | (() => void)[];
587
- updated?: (() => void) | (() => void)[];
588
- activated?: (() => void) | (() => void)[];
589
- deactivated?: (() => void) | (() => void)[];
590
- beforeDestroy?: (() => void) | (() => void)[];
591
- beforeUnmount?: (() => void) | (() => void)[];
592
- destroyed?: (() => void) | (() => void)[];
593
- unmounted?: (() => void) | (() => void)[];
594
- renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
595
- renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
596
- errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
597
- };
598
- $forceUpdate: () => void;
599
- $nextTick: nextTick;
600
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
601
- } & Readonly<{
602
- size: "normal" | "small";
603
- placeholder: string;
604
- mode: InputMode;
605
- autoSize: AutoSize;
606
- extensions: Extension[] | any[];
607
- submitType: SubmitTrigger;
608
- }> & Omit<Readonly<SenderProps> & Readonly<{
609
- onClear?: (() => any) | undefined;
610
- onInput?: ((value: string) => any) | undefined;
611
- onBlur?: ((event: FocusEvent) => any) | undefined;
612
- onCancel?: (() => any) | undefined;
613
- onFocus?: ((event: FocusEvent) => any) | undefined;
614
- onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
615
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
616
- }>, "clear" | "blur" | "cancel" | "focus" | "submit" | "editor" | "setContent" | ("size" | "placeholder" | "mode" | "autoSize" | "extensions" | "submitType") | "getContent"> & ShallowUnwrapRef< {
617
- submit: () => void;
618
- clear: () => void;
619
- cancel: () => void;
620
- focus: () => void;
621
- blur: () => void;
622
- setContent: (content: string) => void;
623
- getContent: () => string;
624
- editor: SenderContext["editor"];
625
- }> & {} & ComponentCustomProperties & {} & {
626
- $slots: {
627
- header?(_: {}): any;
628
- header?(_: {}): any;
629
- prefix?(_: {}): any;
630
- prefix?(_: {}): any;
631
- content?(_: {
632
- editor: Editor | undefined;
633
- }): any;
634
- content?(_: {
635
- editor: Ref<Editor | undefined, Editor | undefined>;
636
- }): any;
637
- 'actions-inline'?(_: {}): any;
638
- footer?(_: {}): any;
639
- 'footer-right'?(_: {}): any;
640
- };
641
- }) | null;
642
- voiceRef: ({
643
- $: ComponentInternalInstance;
644
- $data: {};
645
- $props: {
646
- readonly icon?: (VNode | Component) | undefined;
647
- readonly recordingIcon?: (VNode | Component) | undefined;
648
- readonly disabled?: boolean | undefined;
649
- readonly size?: "small" | "normal" | undefined;
650
- readonly tooltip?: TooltipContent | undefined;
651
- readonly tooltipPlacement?: TooltipPlacement | undefined;
652
- readonly speechConfig?: SpeechConfig | undefined;
653
- readonly autoInsert?: boolean | undefined;
654
- readonly onButtonClick?: ((isRecording: boolean, preventDefault: () => void) => void | Promise<void>) | undefined;
655
- readonly "onSpeech-start"?: (() => any) | undefined;
656
- readonly "onSpeech-interim"?: ((transcript: string) => any) | undefined;
657
- readonly "onSpeech-final"?: ((transcript: string) => any) | undefined;
658
- readonly "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
659
- readonly "onSpeech-error"?: ((error: Error) => any) | undefined;
660
- } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
661
- $attrs: {
662
- [x: string]: unknown;
663
- };
664
- $refs: {
665
- [x: string]: unknown;
454
+ clearHistory: () => void;
455
+ activateFirstField: () => void;
456
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
457
+ "update:modelValue": (value: UserItem[]) => any;
458
+ } & {
459
+ submit: () => any;
460
+ }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
461
+ editorRef: HTMLDivElement;
462
+ }, HTMLDivElement, ComponentProvideOptions, {
463
+ P: {};
464
+ B: {};
465
+ D: {};
466
+ C: {};
467
+ M: {};
468
+ Defaults: {};
469
+ }, Readonly<{
470
+ modelValue?: UserItem[];
471
+ } & {
472
+ autoSize: boolean | {
473
+ minRows: number;
474
+ maxRows: number;
666
475
  };
667
- $slots: Readonly<{
668
- [name: string]: Slot<any> | undefined;
669
- }>;
670
- $root: ComponentPublicInstance | null;
671
- $parent: ComponentPublicInstance | null;
672
- $host: Element | null;
673
- $emit: ((event: "speech-start") => void) & ((event: "speech-interim", transcript: string) => void) & ((event: "speech-final", transcript: string) => void) & ((event: "speech-end", transcript?: string | undefined) => void) & ((event: "speech-error", error: Error) => void);
674
- $el: any;
675
- $options: ComponentOptionsBase<Readonly<VoiceButtonProps> & Readonly<{
676
- "onSpeech-start"?: (() => any) | undefined;
677
- "onSpeech-interim"?: ((transcript: string) => any) | undefined;
678
- "onSpeech-final"?: ((transcript: string) => any) | undefined;
679
- "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
680
- "onSpeech-error"?: ((error: Error) => any) | undefined;
476
+ }> & Readonly<{
477
+ onSubmit?: (() => any) | undefined;
478
+ "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
681
479
  }>, {
682
- start: () => void;
683
- stop: () => void;
684
- speechState: SpeechState;
685
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
686
- "speech-start": () => any;
687
- "speech-interim": (transcript: string) => any;
688
- "speech-final": (transcript: string) => any;
689
- "speech-end": (transcript?: string | undefined) => any;
690
- "speech-error": (error: Error) => any;
691
- }, string, {
692
- tooltipPlacement: TooltipPlacement;
693
- autoInsert: boolean;
694
- }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
695
- beforeCreate?: (() => void) | (() => void)[];
696
- created?: (() => void) | (() => void)[];
697
- beforeMount?: (() => void) | (() => void)[];
698
- mounted?: (() => void) | (() => void)[];
699
- beforeUpdate?: (() => void) | (() => void)[];
700
- updated?: (() => void) | (() => void)[];
701
- activated?: (() => void) | (() => void)[];
702
- deactivated?: (() => void) | (() => void)[];
703
- beforeDestroy?: (() => void) | (() => void)[];
704
- beforeUnmount?: (() => void) | (() => void)[];
705
- destroyed?: (() => void) | (() => void)[];
706
- unmounted?: (() => void) | (() => void)[];
707
- renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
708
- renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
709
- errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
710
- };
711
- $forceUpdate: () => void;
712
- $nextTick: nextTick;
713
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
714
- } & Readonly<{
715
- tooltipPlacement: TooltipPlacement;
716
- autoInsert: boolean;
717
- }> & Omit<Readonly<VoiceButtonProps> & Readonly<{
718
- "onSpeech-start"?: (() => any) | undefined;
719
- "onSpeech-interim"?: ((transcript: string) => any) | undefined;
720
- "onSpeech-final"?: ((transcript: string) => any) | undefined;
721
- "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
722
- "onSpeech-error"?: ((error: Error) => any) | undefined;
723
- }>, "stop" | "start" | "speechState" | ("tooltipPlacement" | "autoInsert")> & ShallowUnwrapRef< {
724
- start: () => void;
725
- stop: () => void;
726
- speechState: SpeechState;
727
- }> & {} & ComponentCustomProperties & {} & {
728
- $slots: {
729
- icon?(_: {
730
- isRecording: boolean;
731
- }): any;
732
- 'recording-overlay'?(_: {
733
- isRecording: boolean;
734
- stop: () => void;
735
- }): any;
736
- };
737
- }) | null;
480
+ clearHistory: () => void;
481
+ activateFirstField: () => void;
482
+ }, {}, {}, {}, {}> | null;
483
+ inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
484
+ _constants: {
485
+ type: ObjectConstructor;
486
+ default: () => {
487
+ INPUT_PC: string;
488
+ INPUTGROUP_PC: string;
489
+ INPUT_MOBILE: string;
490
+ INPUTGROUP_MOBILE: string;
491
+ Mode: string;
492
+ inputMode(mode: any): string;
493
+ inputGroupMode(mode: any): string;
494
+ VALIDATE_ICON: {
495
+ Validating: string;
496
+ Success: string;
497
+ Error: string;
498
+ };
499
+ COMPONENT_NAME: {
500
+ FormItem: string;
501
+ };
502
+ MASKSYMBOL: string;
503
+ TEXTAREA_HEIGHT_MOBILE: number;
504
+ };
505
+ };
506
+ name: StringConstructor;
507
+ size: StringConstructor;
508
+ form: StringConstructor;
509
+ label: StringConstructor;
510
+ height: NumberConstructor;
511
+ resize: StringConstructor;
512
+ tabindex: {
513
+ type: StringConstructor;
514
+ default: string;
515
+ };
516
+ disabled: BooleanConstructor;
517
+ readonly: BooleanConstructor;
518
+ hoverExpand: BooleanConstructor;
519
+ mask: BooleanConstructor;
520
+ suffixIcon: (StringConstructor | ObjectConstructor)[];
521
+ prefixIcon: (StringConstructor | ObjectConstructor)[];
522
+ modelValue: PropType<string | number | null>;
523
+ type: {
524
+ type: StringConstructor;
525
+ default: string;
526
+ };
527
+ memorySpace: {
528
+ type: NumberConstructor;
529
+ default: number;
530
+ };
531
+ vertical: {
532
+ type: BooleanConstructor;
533
+ default: boolean;
534
+ };
535
+ selectMenu: {
536
+ type: {
537
+ (arrayLength: number): {
538
+ id: string;
539
+ label: string;
540
+ }[];
541
+ (...items: {
542
+ id: string;
543
+ label: string;
544
+ }[]): {
545
+ id: string;
546
+ label: string;
547
+ }[];
548
+ new (arrayLength: number): {
549
+ id: string;
550
+ label: string;
551
+ }[];
552
+ new (...items: {
553
+ id: string;
554
+ label: string;
555
+ }[]): {
556
+ id: string;
557
+ label: string;
558
+ }[];
559
+ isArray(arg: any): arg is any[];
560
+ readonly prototype: any[];
561
+ from<T>(arrayLike: ArrayLike<T>): T[];
562
+ from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
563
+ from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
564
+ from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
565
+ of<T_4>(...items: T_4[]): T_4[];
566
+ readonly [Symbol.species]: ArrayConstructor;
567
+ };
568
+ default: () => never[];
569
+ };
570
+ ellipsis: {
571
+ type: BooleanConstructor;
572
+ default: boolean;
573
+ };
574
+ contentStyle: {
575
+ type: ObjectConstructor;
576
+ default: () => {};
577
+ };
578
+ isSelect: {
579
+ type: BooleanConstructor;
580
+ default: boolean;
581
+ };
582
+ tips: StringConstructor;
583
+ counter: {
584
+ type: BooleanConstructor;
585
+ default: boolean;
586
+ };
587
+ autosize: {
588
+ type: (BooleanConstructor | ObjectConstructor)[];
589
+ default: boolean;
590
+ };
591
+ clearable: {
592
+ type: BooleanConstructor;
593
+ default: boolean;
594
+ };
595
+ autocomplete: {
596
+ type: StringConstructor;
597
+ default: string;
598
+ };
599
+ showPassword: {
600
+ type: BooleanConstructor;
601
+ default: boolean;
602
+ };
603
+ showWordLimit: {
604
+ type: BooleanConstructor;
605
+ default: boolean;
606
+ };
607
+ showTitle: {
608
+ type: BooleanConstructor;
609
+ default: boolean;
610
+ };
611
+ validateEvent: {
612
+ type: BooleanConstructor;
613
+ default: boolean;
614
+ };
615
+ popupMore: {
616
+ type: BooleanConstructor;
617
+ default: boolean;
618
+ };
619
+ textareaTitle: {
620
+ type: StringConstructor;
621
+ default: string;
622
+ };
623
+ displayOnly: {
624
+ type: BooleanConstructor;
625
+ default: boolean;
626
+ };
627
+ displayOnlyContent: {
628
+ type: StringConstructor;
629
+ default: string;
630
+ };
631
+ customClass: {
632
+ type: StringConstructor;
633
+ default: string;
634
+ };
635
+ frontClearIcon: {
636
+ type: BooleanConstructor;
637
+ default: boolean;
638
+ };
639
+ showEmptyValue: {
640
+ type: BooleanConstructor;
641
+ default: undefined;
642
+ };
643
+ textAlign: {
644
+ type: StringConstructor;
645
+ default: string;
646
+ };
647
+ width: {
648
+ type: PropType<string | number | null>;
649
+ };
650
+ showTooltip: {
651
+ type: BooleanConstructor;
652
+ default: boolean;
653
+ };
654
+ inputBoxType: {
655
+ type: StringConstructor;
656
+ default: string;
657
+ validator: (value: string) => boolean;
658
+ };
659
+ tiny_mode: StringConstructor;
660
+ tiny_mode_root: BooleanConstructor;
661
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
662
+ tiny_renderless: FunctionConstructor;
663
+ tiny_theme: StringConstructor;
664
+ tiny_mcp_config: ObjectConstructor;
665
+ tiny_chart_theme: ObjectConstructor;
666
+ }>>, () => VNode<RendererNode, RendererElement, {
667
+ [key: string]: any;
668
+ }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
669
+ disabled: boolean;
670
+ type: string;
671
+ ellipsis: boolean;
672
+ mask: boolean;
673
+ vertical: boolean;
674
+ customClass: string;
675
+ tiny_mode_root: boolean;
676
+ _constants: Record<string, any>;
677
+ tabindex: string;
678
+ showTitle: boolean;
679
+ readonly: boolean;
680
+ hoverExpand: boolean;
681
+ memorySpace: number;
682
+ selectMenu: {
683
+ id: string;
684
+ label: string;
685
+ }[];
686
+ contentStyle: Record<string, any>;
687
+ isSelect: boolean;
688
+ counter: boolean;
689
+ autosize: boolean | Record<string, any>;
690
+ clearable: boolean;
691
+ autocomplete: string;
692
+ showPassword: boolean;
693
+ showWordLimit: boolean;
694
+ validateEvent: boolean;
695
+ popupMore: boolean;
696
+ textareaTitle: string;
697
+ displayOnly: boolean;
698
+ displayOnlyContent: string;
699
+ frontClearIcon: boolean;
700
+ showEmptyValue: boolean;
701
+ textAlign: string;
702
+ showTooltip: boolean;
703
+ inputBoxType: string;
704
+ }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
705
+ P: {};
706
+ B: {};
707
+ D: {};
708
+ C: {};
709
+ M: {};
710
+ Defaults: {};
711
+ }, Readonly<ExtractPropTypes< {
712
+ _constants: {
713
+ type: ObjectConstructor;
714
+ default: () => {
715
+ INPUT_PC: string;
716
+ INPUTGROUP_PC: string;
717
+ INPUT_MOBILE: string;
718
+ INPUTGROUP_MOBILE: string;
719
+ Mode: string;
720
+ inputMode(mode: any): string;
721
+ inputGroupMode(mode: any): string;
722
+ VALIDATE_ICON: {
723
+ Validating: string;
724
+ Success: string;
725
+ Error: string;
726
+ };
727
+ COMPONENT_NAME: {
728
+ FormItem: string;
729
+ };
730
+ MASKSYMBOL: string;
731
+ TEXTAREA_HEIGHT_MOBILE: number;
732
+ };
733
+ };
734
+ name: StringConstructor;
735
+ size: StringConstructor;
736
+ form: StringConstructor;
737
+ label: StringConstructor;
738
+ height: NumberConstructor;
739
+ resize: StringConstructor;
740
+ tabindex: {
741
+ type: StringConstructor;
742
+ default: string;
743
+ };
744
+ disabled: BooleanConstructor;
745
+ readonly: BooleanConstructor;
746
+ hoverExpand: BooleanConstructor;
747
+ mask: BooleanConstructor;
748
+ suffixIcon: (StringConstructor | ObjectConstructor)[];
749
+ prefixIcon: (StringConstructor | ObjectConstructor)[];
750
+ modelValue: PropType<string | number | null>;
751
+ type: {
752
+ type: StringConstructor;
753
+ default: string;
754
+ };
755
+ memorySpace: {
756
+ type: NumberConstructor;
757
+ default: number;
758
+ };
759
+ vertical: {
760
+ type: BooleanConstructor;
761
+ default: boolean;
762
+ };
763
+ selectMenu: {
764
+ type: {
765
+ (arrayLength: number): {
766
+ id: string;
767
+ label: string;
768
+ }[];
769
+ (...items: {
770
+ id: string;
771
+ label: string;
772
+ }[]): {
773
+ id: string;
774
+ label: string;
775
+ }[];
776
+ new (arrayLength: number): {
777
+ id: string;
778
+ label: string;
779
+ }[];
780
+ new (...items: {
781
+ id: string;
782
+ label: string;
783
+ }[]): {
784
+ id: string;
785
+ label: string;
786
+ }[];
787
+ isArray(arg: any): arg is any[];
788
+ readonly prototype: any[];
789
+ from<T>(arrayLike: ArrayLike<T>): T[];
790
+ from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
791
+ from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
792
+ from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
793
+ of<T_4>(...items: T_4[]): T_4[];
794
+ readonly [Symbol.species]: ArrayConstructor;
795
+ };
796
+ default: () => never[];
797
+ };
798
+ ellipsis: {
799
+ type: BooleanConstructor;
800
+ default: boolean;
801
+ };
802
+ contentStyle: {
803
+ type: ObjectConstructor;
804
+ default: () => {};
805
+ };
806
+ isSelect: {
807
+ type: BooleanConstructor;
808
+ default: boolean;
809
+ };
810
+ tips: StringConstructor;
811
+ counter: {
812
+ type: BooleanConstructor;
813
+ default: boolean;
814
+ };
815
+ autosize: {
816
+ type: (BooleanConstructor | ObjectConstructor)[];
817
+ default: boolean;
818
+ };
819
+ clearable: {
820
+ type: BooleanConstructor;
821
+ default: boolean;
822
+ };
823
+ autocomplete: {
824
+ type: StringConstructor;
825
+ default: string;
826
+ };
827
+ showPassword: {
828
+ type: BooleanConstructor;
829
+ default: boolean;
830
+ };
831
+ showWordLimit: {
832
+ type: BooleanConstructor;
833
+ default: boolean;
834
+ };
835
+ showTitle: {
836
+ type: BooleanConstructor;
837
+ default: boolean;
838
+ };
839
+ validateEvent: {
840
+ type: BooleanConstructor;
841
+ default: boolean;
842
+ };
843
+ popupMore: {
844
+ type: BooleanConstructor;
845
+ default: boolean;
846
+ };
847
+ textareaTitle: {
848
+ type: StringConstructor;
849
+ default: string;
850
+ };
851
+ displayOnly: {
852
+ type: BooleanConstructor;
853
+ default: boolean;
854
+ };
855
+ displayOnlyContent: {
856
+ type: StringConstructor;
857
+ default: string;
858
+ };
859
+ customClass: {
860
+ type: StringConstructor;
861
+ default: string;
862
+ };
863
+ frontClearIcon: {
864
+ type: BooleanConstructor;
865
+ default: boolean;
866
+ };
867
+ showEmptyValue: {
868
+ type: BooleanConstructor;
869
+ default: undefined;
870
+ };
871
+ textAlign: {
872
+ type: StringConstructor;
873
+ default: string;
874
+ };
875
+ width: {
876
+ type: PropType<string | number | null>;
877
+ };
878
+ showTooltip: {
879
+ type: BooleanConstructor;
880
+ default: boolean;
881
+ };
882
+ inputBoxType: {
883
+ type: StringConstructor;
884
+ default: string;
885
+ validator: (value: string) => boolean;
886
+ };
887
+ tiny_mode: StringConstructor;
888
+ tiny_mode_root: BooleanConstructor;
889
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
890
+ tiny_renderless: FunctionConstructor;
891
+ tiny_theme: StringConstructor;
892
+ tiny_mcp_config: ObjectConstructor;
893
+ tiny_chart_theme: ObjectConstructor;
894
+ }>>, () => VNode<RendererNode, RendererElement, {
895
+ [key: string]: any;
896
+ }>, {}, {}, {}, {
897
+ disabled: boolean;
898
+ type: string;
899
+ ellipsis: boolean;
900
+ mask: boolean;
901
+ vertical: boolean;
902
+ customClass: string;
903
+ tiny_mode_root: boolean;
904
+ _constants: Record<string, any>;
905
+ tabindex: string;
906
+ showTitle: boolean;
907
+ readonly: boolean;
908
+ hoverExpand: boolean;
909
+ memorySpace: number;
910
+ selectMenu: {
911
+ id: string;
912
+ label: string;
913
+ }[];
914
+ contentStyle: Record<string, any>;
915
+ isSelect: boolean;
916
+ counter: boolean;
917
+ autosize: boolean | Record<string, any>;
918
+ clearable: boolean;
919
+ autocomplete: string;
920
+ showPassword: boolean;
921
+ showWordLimit: boolean;
922
+ validateEvent: boolean;
923
+ popupMore: boolean;
924
+ textareaTitle: string;
925
+ displayOnly: boolean;
926
+ displayOnlyContent: string;
927
+ frontClearIcon: boolean;
928
+ showEmptyValue: boolean;
929
+ textAlign: string;
930
+ showTooltip: boolean;
931
+ inputBoxType: string;
932
+ }> | null;
933
+ buttonsContainerRef: HTMLDivElement;
738
934
  }, HTMLDivElement>;
739
935
 
740
- declare const __VLS_component_9: DefineComponent<SuggestionPillButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SuggestionPillButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
936
+ declare const __VLS_component_8: DefineComponent<SuggestionPillButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SuggestionPillButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
937
+
938
+ declare const __VLS_component_9: DefineComponent<__VLS_PublicProps_3, {
939
+ children: ComputedRef<(HTMLElement | SVGElement)[]>;
940
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
941
+ "update:showAll": (value: boolean | undefined) => any;
942
+ } & {
943
+ "click-outside": (event: MouseEvent) => any;
944
+ }, string, PublicProps, Readonly<__VLS_PublicProps_3> & Readonly<{
945
+ "onClick-outside"?: ((event: MouseEvent) => any) | undefined;
946
+ "onUpdate:showAll"?: ((value: boolean | undefined) => any) | undefined;
947
+ }>, {
948
+ showAllButtonOn: "hover" | "always";
949
+ overflowMode: "expand" | "scroll";
950
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
951
+ containerWrapperRef: HTMLDivElement;
952
+ containerRef: HTMLDivElement;
953
+ staticMaybeItemRefs: unknown[];
954
+ floatingItemsRef: HTMLDivElement;
955
+ floatingMaybeItemRefs: unknown[];
956
+ }, HTMLDivElement>;
741
957
 
742
958
  declare type __VLS_PrettifyLocal<T> = {
743
959
  [K in keyof T]: T[K];
744
960
  } & {};
745
961
 
746
- declare type __VLS_Props = ContainerProps;
962
+ declare type __VLS_Props = {
963
+ contentRenderers?: Record<string, BubbleContentRenderer>;
964
+ };
965
+
966
+ declare type __VLS_Props_2 = ContainerProps;
747
967
 
748
- declare type __VLS_Props_2 = DropdownMenuProps;
968
+ declare type __VLS_Props_3 = DropdownMenuProps;
749
969
 
750
- declare type __VLS_Props_3 = SuggestionPillsProps;
970
+ declare type __VLS_Props_4 = SuggestionPillsProps;
751
971
 
752
- declare type __VLS_Props_4 = SuggestionPopoverProps;
972
+ declare type __VLS_Props_5 = SuggestionPopoverProps;
753
973
 
754
- declare type __VLS_Props_5 = ThemeProviderProps;
974
+ declare type __VLS_Props_6 = ThemeProviderProps;
755
975
 
756
- declare type __VLS_Props_6 = McpServerPickerProps;
976
+ declare type __VLS_Props_7 = McpServerPickerProps;
757
977
 
758
978
  declare type __VLS_PublicProps = {
759
979
  'show': ContainerProps['show'];
760
980
  'fullscreen'?: ContainerProps['fullscreen'];
761
- } & __VLS_Props;
981
+ } & __VLS_Props_2;
762
982
 
763
983
  declare type __VLS_PublicProps_2 = {
764
984
  'show'?: boolean;
765
- } & __VLS_Props_2;
985
+ } & __VLS_Props_3;
766
986
 
767
987
  declare type __VLS_PublicProps_3 = {
768
988
  'showAll'?: SuggestionPillsProps['showAll'];
769
- } & __VLS_Props_3;
989
+ } & __VLS_Props_4;
770
990
 
771
991
  declare type __VLS_PublicProps_4 = {
772
992
  'selectedGroup'?: string;
773
- } & __VLS_Props_4;
993
+ } & __VLS_Props_5;
774
994
 
775
995
  declare type __VLS_PublicProps_5 = {
776
996
  'theme'?: string;
777
997
  'colorMode'?: ColorMode;
778
- } & __VLS_Props_5;
998
+ } & __VLS_Props_6;
779
999
 
780
1000
  declare type __VLS_PublicProps_6 = {
781
1001
  'visible': boolean;
782
- } & __VLS_Props_6;
1002
+ } & __VLS_Props_7;
783
1003
 
784
1004
  declare function __VLS_template(): {
785
1005
  attrs: Partial<{}>;
@@ -789,19 +1009,6 @@ declare function __VLS_template(): {
789
1009
  };
790
1010
 
791
1011
  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
1012
  attrs: Partial<{}>;
806
1013
  slots: Readonly<SuggestionPopoverSlots> & SuggestionPopoverSlots;
807
1014
  refs: {
@@ -920,7 +1127,7 @@ declare function __VLS_template_11(): {
920
1127
  rootEl: any;
921
1128
  };
922
1129
 
923
- declare function __VLS_template_12(): {
1130
+ declare function __VLS_template_11(): {
924
1131
  attrs: Partial<{}>;
925
1132
  slots: {
926
1133
  default?(_: {}): any;
@@ -929,14 +1136,14 @@ declare function __VLS_template_12(): {
929
1136
  rootEl: any;
930
1137
  };
931
1138
 
932
- declare function __VLS_template_13(): {
1139
+ declare function __VLS_template_12(): {
933
1140
  attrs: Partial<{}>;
934
1141
  slots: Readonly<WelcomeSlots> & WelcomeSlots;
935
1142
  refs: {};
936
1143
  rootEl: HTMLDivElement;
937
1144
  };
938
1145
 
939
- declare function __VLS_template_14(): {
1146
+ declare function __VLS_template_13(): {
940
1147
  attrs: Partial<{}>;
941
1148
  slots: {
942
1149
  'header-actions'?(_: {}): any;
@@ -945,57 +1152,23 @@ declare function __VLS_template_14(): {
945
1152
  rootEl: any;
946
1153
  };
947
1154
 
948
- declare function __VLS_template_15(): {
1155
+ declare function __VLS_template_2(): {
949
1156
  attrs: Partial<{}>;
950
1157
  slots: {
951
- icon?(_: {}): any;
952
- icon?(_: {}): any;
1158
+ default?(_: {}): any;
953
1159
  };
954
1160
  refs: {};
955
1161
  rootEl: any;
956
1162
  };
957
1163
 
958
- declare function __VLS_template_16(): {
1164
+ declare function __VLS_template_3(): {
959
1165
  attrs: Partial<{}>;
960
- slots: {
961
- icon?(_: {
962
- isRecording: boolean;
963
- }): any;
964
- 'recording-overlay'?(_: {
965
- isRecording: boolean;
966
- stop: () => void;
967
- }): any;
968
- };
1166
+ slots: Readonly<ContainerSlots> & ContainerSlots;
969
1167
  refs: {};
970
- rootEl: any;
971
- };
972
-
973
- declare function __VLS_template_2(): {
974
- attrs: Partial<{}>;
975
- slots: Readonly<BubbleListSlots> & BubbleListSlots;
976
- refs: {
977
- listRef: HTMLDivElement;
978
- };
979
1168
  rootEl: HTMLDivElement;
980
1169
  };
981
1170
 
982
- declare function __VLS_template_3(): {
983
- attrs: Partial<{}>;
984
- slots: {
985
- default?(_: {}): any;
986
- };
987
- refs: {};
988
- rootEl: any;
989
- };
990
-
991
1171
  declare function __VLS_template_4(): {
992
- attrs: Partial<{}>;
993
- slots: Readonly<ContainerSlots> & ContainerSlots;
994
- refs: {};
995
- rootEl: HTMLDivElement;
996
- };
997
-
998
- declare function __VLS_template_5(): {
999
1172
  attrs: Partial<{}>;
1000
1173
  slots: {
1001
1174
  overlay?(_: {
@@ -1006,7 +1179,7 @@ declare function __VLS_template_5(): {
1006
1179
  rootEl: any;
1007
1180
  };
1008
1181
 
1009
- declare function __VLS_template_6(): {
1182
+ declare function __VLS_template_5(): {
1010
1183
  attrs: Partial<{}>;
1011
1184
  slots: {
1012
1185
  trigger?(_: {}): any;
@@ -1108,269 +1281,543 @@ declare function __VLS_template_6(): {
1108
1281
  rootEl: any;
1109
1282
  };
1110
1283
 
1111
- declare function __VLS_template_7(): {
1284
+ declare function __VLS_template_6(): {
1112
1285
  attrs: Partial<{}>;
1113
1286
  slots: Readonly<PromptsSlots> & PromptsSlots;
1114
1287
  refs: {};
1115
1288
  rootEl: HTMLDivElement;
1116
1289
  };
1117
1290
 
1118
- declare function __VLS_template_8(): {
1291
+ declare function __VLS_template_7(): {
1119
1292
  attrs: Partial<{}>;
1120
1293
  slots: {
1121
1294
  header?(_: {}): any;
1122
1295
  prefix?(_: {}): any;
1123
- content?(_: {
1124
- editor: Ref<Editor | undefined, Editor | undefined>;
1125
- }): any;
1296
+ content?(_: {}): any;
1297
+ decorativeContent?(_: {}): any;
1126
1298
  actions?(_: {}): any;
1127
1299
  'footer-left'?(_: {}): any;
1128
- footer?(_: {}): any;
1129
1300
  'footer-right'?(_: {}): any;
1301
+ footer?(_: {}): any;
1130
1302
  };
1131
1303
  refs: {
1132
- senderRef: ({
1133
- $: ComponentInternalInstance;
1134
- $data: {};
1135
- $props: {
1136
- readonly modelValue?: string | undefined;
1137
- readonly defaultValue?: string | undefined;
1138
- readonly placeholder?: string | undefined;
1139
- readonly disabled?: boolean | undefined;
1140
- readonly loading?: boolean | undefined;
1141
- readonly autofocus?: boolean | undefined;
1142
- readonly mode?: InputMode | undefined;
1143
- readonly autoSize?: AutoSize | undefined;
1144
- readonly maxLength?: number | undefined;
1145
- readonly showWordLimit?: boolean | undefined;
1146
- readonly clearable?: boolean | undefined;
1147
- readonly extensions?: Extension[] | any[] | undefined;
1148
- readonly size?: "normal" | "small" | undefined;
1149
- readonly stopText?: string | undefined;
1150
- readonly defaultActions?: DefaultActions | undefined;
1151
- readonly submitType?: SubmitTrigger | undefined;
1152
- readonly onClear?: (() => any) | undefined;
1153
- readonly onInput?: ((value: string) => any) | undefined;
1154
- readonly onBlur?: ((event: FocusEvent) => any) | undefined;
1155
- readonly onCancel?: (() => any) | undefined;
1156
- readonly onFocus?: ((event: FocusEvent) => any) | undefined;
1157
- readonly onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
1158
- readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
1159
- } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
1160
- $attrs: {
1161
- [x: string]: unknown;
1162
- };
1163
- $refs: {
1164
- [x: string]: unknown;
1165
- };
1166
- $slots: Readonly<{
1167
- [name: string]: Slot<any> | undefined;
1168
- }>;
1169
- $root: ComponentPublicInstance | null;
1170
- $parent: ComponentPublicInstance | null;
1171
- $host: Element | null;
1172
- $emit: ((event: "clear") => void) & ((event: "input", value: string) => void) & ((event: "blur", event: FocusEvent) => void) & ((event: "cancel") => void) & ((event: "focus", event: FocusEvent) => void) & ((event: "submit", textContent: string, structuredData?: StructuredData | undefined) => void) & ((event: "update:modelValue", value: string) => void);
1173
- $el: HTMLDivElement;
1174
- $options: ComponentOptionsBase<Readonly<SenderProps> & Readonly<{
1175
- onClear?: (() => any) | undefined;
1176
- onInput?: ((value: string) => any) | undefined;
1177
- onBlur?: ((event: FocusEvent) => any) | undefined;
1178
- onCancel?: (() => any) | undefined;
1179
- onFocus?: ((event: FocusEvent) => any) | undefined;
1180
- onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
1181
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
1182
- }>, {
1183
- submit: () => void;
1184
- clear: () => void;
1185
- cancel: () => void;
1186
- focus: () => void;
1187
- blur: () => void;
1188
- setContent: (content: string) => void;
1189
- getContent: () => string;
1190
- editor: SenderContext["editor"];
1191
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1192
- clear: () => any;
1193
- input: (value: string) => any;
1194
- blur: (event: FocusEvent) => any;
1195
- cancel: () => any;
1196
- focus: (event: FocusEvent) => any;
1197
- submit: (textContent: string, structuredData?: StructuredData | undefined) => any;
1198
- "update:modelValue": (value: string) => any;
1199
- }, string, {
1200
- size: "normal" | "small";
1201
- placeholder: string;
1202
- mode: InputMode;
1203
- autoSize: AutoSize;
1204
- extensions: Extension[] | any[];
1205
- submitType: SubmitTrigger;
1206
- }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
1207
- beforeCreate?: (() => void) | (() => void)[];
1208
- created?: (() => void) | (() => void)[];
1209
- beforeMount?: (() => void) | (() => void)[];
1210
- mounted?: (() => void) | (() => void)[];
1211
- beforeUpdate?: (() => void) | (() => void)[];
1212
- updated?: (() => void) | (() => void)[];
1213
- activated?: (() => void) | (() => void)[];
1214
- deactivated?: (() => void) | (() => void)[];
1215
- beforeDestroy?: (() => void) | (() => void)[];
1216
- beforeUnmount?: (() => void) | (() => void)[];
1217
- destroyed?: (() => void) | (() => void)[];
1218
- unmounted?: (() => void) | (() => void)[];
1219
- renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
1220
- renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
1221
- errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
1222
- };
1223
- $forceUpdate: () => void;
1224
- $nextTick: nextTick;
1225
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
1226
- } & Readonly<{
1227
- size: "normal" | "small";
1228
- placeholder: string;
1229
- mode: InputMode;
1230
- autoSize: AutoSize;
1231
- extensions: Extension[] | any[];
1232
- submitType: SubmitTrigger;
1233
- }> & Omit<Readonly<SenderProps> & Readonly<{
1234
- onClear?: (() => any) | undefined;
1235
- onInput?: ((value: string) => any) | undefined;
1236
- onBlur?: ((event: FocusEvent) => any) | undefined;
1237
- onCancel?: (() => any) | undefined;
1238
- onFocus?: ((event: FocusEvent) => any) | undefined;
1239
- onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
1240
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
1241
- }>, "clear" | "blur" | "cancel" | "focus" | "submit" | "editor" | "setContent" | ("size" | "placeholder" | "mode" | "autoSize" | "extensions" | "submitType") | "getContent"> & ShallowUnwrapRef< {
1242
- submit: () => void;
1243
- clear: () => void;
1244
- cancel: () => void;
1245
- focus: () => void;
1246
- blur: () => void;
1247
- setContent: (content: string) => void;
1248
- getContent: () => string;
1249
- editor: SenderContext["editor"];
1250
- }> & {} & ComponentCustomProperties & {} & {
1251
- $slots: {
1252
- header?(_: {}): any;
1253
- header?(_: {}): any;
1254
- prefix?(_: {}): any;
1255
- prefix?(_: {}): any;
1256
- content?(_: {
1257
- editor: Editor | undefined;
1258
- }): any;
1259
- content?(_: {
1260
- editor: Ref<Editor | undefined, Editor | undefined>;
1261
- }): any;
1262
- 'actions-inline'?(_: {}): any;
1263
- footer?(_: {}): any;
1264
- 'footer-right'?(_: {}): any;
1265
- };
1266
- }) | null;
1267
- voiceRef: ({
1268
- $: ComponentInternalInstance;
1269
- $data: {};
1270
- $props: {
1271
- readonly icon?: (VNode | Component) | undefined;
1272
- readonly recordingIcon?: (VNode | Component) | undefined;
1273
- readonly disabled?: boolean | undefined;
1274
- readonly size?: "small" | "normal" | undefined;
1275
- readonly tooltip?: TooltipContent | undefined;
1276
- readonly tooltipPlacement?: TooltipPlacement | undefined;
1277
- readonly speechConfig?: SpeechConfig | undefined;
1278
- readonly autoInsert?: boolean | undefined;
1279
- readonly onButtonClick?: ((isRecording: boolean, preventDefault: () => void) => void | Promise<void>) | undefined;
1280
- readonly "onSpeech-start"?: (() => any) | undefined;
1281
- readonly "onSpeech-interim"?: ((transcript: string) => any) | undefined;
1282
- readonly "onSpeech-final"?: ((transcript: string) => any) | undefined;
1283
- readonly "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
1284
- readonly "onSpeech-error"?: ((error: Error) => any) | undefined;
1285
- } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
1286
- $attrs: {
1287
- [x: string]: unknown;
1288
- };
1289
- $refs: {
1290
- [x: string]: unknown;
1291
- };
1292
- $slots: Readonly<{
1293
- [name: string]: Slot<any> | undefined;
1294
- }>;
1295
- $root: ComponentPublicInstance | null;
1296
- $parent: ComponentPublicInstance | null;
1297
- $host: Element | null;
1298
- $emit: ((event: "speech-start") => void) & ((event: "speech-interim", transcript: string) => void) & ((event: "speech-final", transcript: string) => void) & ((event: "speech-end", transcript?: string | undefined) => void) & ((event: "speech-error", error: Error) => void);
1299
- $el: any;
1300
- $options: ComponentOptionsBase<Readonly<VoiceButtonProps> & Readonly<{
1301
- "onSpeech-start"?: (() => any) | undefined;
1302
- "onSpeech-interim"?: ((transcript: string) => any) | undefined;
1303
- "onSpeech-final"?: ((transcript: string) => any) | undefined;
1304
- "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
1305
- "onSpeech-error"?: ((error: Error) => any) | undefined;
1306
- }>, {
1307
- start: () => void;
1308
- stop: () => void;
1309
- speechState: SpeechState;
1310
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1311
- "speech-start": () => any;
1312
- "speech-interim": (transcript: string) => any;
1313
- "speech-final": (transcript: string) => any;
1314
- "speech-end": (transcript?: string | undefined) => any;
1315
- "speech-error": (error: Error) => any;
1316
- }, string, {
1317
- tooltipPlacement: TooltipPlacement;
1318
- autoInsert: boolean;
1319
- }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
1320
- beforeCreate?: (() => void) | (() => void)[];
1321
- created?: (() => void) | (() => void)[];
1322
- beforeMount?: (() => void) | (() => void)[];
1323
- mounted?: (() => void) | (() => void)[];
1324
- beforeUpdate?: (() => void) | (() => void)[];
1325
- updated?: (() => void) | (() => void)[];
1326
- activated?: (() => void) | (() => void)[];
1327
- deactivated?: (() => void) | (() => void)[];
1328
- beforeDestroy?: (() => void) | (() => void)[];
1329
- beforeUnmount?: (() => void) | (() => void)[];
1330
- destroyed?: (() => void) | (() => void)[];
1331
- unmounted?: (() => void) | (() => void)[];
1332
- renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
1333
- renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
1334
- errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
1335
- };
1336
- $forceUpdate: () => void;
1337
- $nextTick: nextTick;
1338
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
1339
- } & Readonly<{
1340
- tooltipPlacement: TooltipPlacement;
1341
- autoInsert: boolean;
1342
- }> & Omit<Readonly<VoiceButtonProps> & Readonly<{
1343
- "onSpeech-start"?: (() => any) | undefined;
1344
- "onSpeech-interim"?: ((transcript: string) => any) | undefined;
1345
- "onSpeech-final"?: ((transcript: string) => any) | undefined;
1346
- "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
1347
- "onSpeech-error"?: ((error: Error) => any) | undefined;
1348
- }>, "stop" | "start" | "speechState" | ("tooltipPlacement" | "autoInsert")> & ShallowUnwrapRef< {
1349
- start: () => void;
1350
- stop: () => void;
1351
- speechState: SpeechState;
1352
- }> & {} & ComponentCustomProperties & {} & {
1353
- $slots: {
1354
- icon?(_: {
1355
- isRecording: boolean;
1356
- }): any;
1357
- 'recording-overlay'?(_: {
1358
- isRecording: boolean;
1359
- stop: () => void;
1360
- }): any;
1361
- };
1362
- }) | null;
1304
+ senderRef: HTMLDivElement;
1305
+ inputWrapperRef: HTMLDivElement;
1306
+ templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
1307
+ modelValue?: UserItem[];
1308
+ } & {
1309
+ autoSize: boolean | {
1310
+ minRows: number;
1311
+ maxRows: number;
1312
+ };
1313
+ }> & Readonly<{
1314
+ onSubmit?: (() => any) | undefined;
1315
+ "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
1316
+ }>, {
1317
+ clearHistory: () => void;
1318
+ activateFirstField: () => void;
1319
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1320
+ "update:modelValue": (value: UserItem[]) => any;
1321
+ } & {
1322
+ submit: () => any;
1323
+ }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
1324
+ editorRef: HTMLDivElement;
1325
+ }, HTMLDivElement, ComponentProvideOptions, {
1326
+ P: {};
1327
+ B: {};
1328
+ D: {};
1329
+ C: {};
1330
+ M: {};
1331
+ Defaults: {};
1332
+ }, Readonly<{
1333
+ modelValue?: UserItem[];
1334
+ } & {
1335
+ autoSize: boolean | {
1336
+ minRows: number;
1337
+ maxRows: number;
1338
+ };
1339
+ }> & Readonly<{
1340
+ onSubmit?: (() => any) | undefined;
1341
+ "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
1342
+ }>, {
1343
+ clearHistory: () => void;
1344
+ activateFirstField: () => void;
1345
+ }, {}, {}, {}, {}> | null;
1346
+ inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
1347
+ _constants: {
1348
+ type: ObjectConstructor;
1349
+ default: () => {
1350
+ INPUT_PC: string;
1351
+ INPUTGROUP_PC: string;
1352
+ INPUT_MOBILE: string;
1353
+ INPUTGROUP_MOBILE: string;
1354
+ Mode: string;
1355
+ inputMode(mode: any): string;
1356
+ inputGroupMode(mode: any): string;
1357
+ VALIDATE_ICON: {
1358
+ Validating: string;
1359
+ Success: string;
1360
+ Error: string;
1361
+ };
1362
+ COMPONENT_NAME: {
1363
+ FormItem: string;
1364
+ };
1365
+ MASKSYMBOL: string;
1366
+ TEXTAREA_HEIGHT_MOBILE: number;
1367
+ };
1368
+ };
1369
+ name: StringConstructor;
1370
+ size: StringConstructor;
1371
+ form: StringConstructor;
1372
+ label: StringConstructor;
1373
+ height: NumberConstructor;
1374
+ resize: StringConstructor;
1375
+ tabindex: {
1376
+ type: StringConstructor;
1377
+ default: string;
1378
+ };
1379
+ disabled: BooleanConstructor;
1380
+ readonly: BooleanConstructor;
1381
+ hoverExpand: BooleanConstructor;
1382
+ mask: BooleanConstructor;
1383
+ suffixIcon: (StringConstructor | ObjectConstructor)[];
1384
+ prefixIcon: (StringConstructor | ObjectConstructor)[];
1385
+ modelValue: PropType<string | number | null>;
1386
+ type: {
1387
+ type: StringConstructor;
1388
+ default: string;
1389
+ };
1390
+ memorySpace: {
1391
+ type: NumberConstructor;
1392
+ default: number;
1393
+ };
1394
+ vertical: {
1395
+ type: BooleanConstructor;
1396
+ default: boolean;
1397
+ };
1398
+ selectMenu: {
1399
+ type: {
1400
+ (arrayLength: number): {
1401
+ id: string;
1402
+ label: string;
1403
+ }[];
1404
+ (...items: {
1405
+ id: string;
1406
+ label: string;
1407
+ }[]): {
1408
+ id: string;
1409
+ label: string;
1410
+ }[];
1411
+ new (arrayLength: number): {
1412
+ id: string;
1413
+ label: string;
1414
+ }[];
1415
+ new (...items: {
1416
+ id: string;
1417
+ label: string;
1418
+ }[]): {
1419
+ id: string;
1420
+ label: string;
1421
+ }[];
1422
+ isArray(arg: any): arg is any[];
1423
+ readonly prototype: any[];
1424
+ from<T>(arrayLike: ArrayLike<T>): T[];
1425
+ from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
1426
+ from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
1427
+ from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
1428
+ of<T_4>(...items: T_4[]): T_4[];
1429
+ readonly [Symbol.species]: ArrayConstructor;
1430
+ };
1431
+ default: () => never[];
1432
+ };
1433
+ ellipsis: {
1434
+ type: BooleanConstructor;
1435
+ default: boolean;
1436
+ };
1437
+ contentStyle: {
1438
+ type: ObjectConstructor;
1439
+ default: () => {};
1440
+ };
1441
+ isSelect: {
1442
+ type: BooleanConstructor;
1443
+ default: boolean;
1444
+ };
1445
+ tips: StringConstructor;
1446
+ counter: {
1447
+ type: BooleanConstructor;
1448
+ default: boolean;
1449
+ };
1450
+ autosize: {
1451
+ type: (BooleanConstructor | ObjectConstructor)[];
1452
+ default: boolean;
1453
+ };
1454
+ clearable: {
1455
+ type: BooleanConstructor;
1456
+ default: boolean;
1457
+ };
1458
+ autocomplete: {
1459
+ type: StringConstructor;
1460
+ default: string;
1461
+ };
1462
+ showPassword: {
1463
+ type: BooleanConstructor;
1464
+ default: boolean;
1465
+ };
1466
+ showWordLimit: {
1467
+ type: BooleanConstructor;
1468
+ default: boolean;
1469
+ };
1470
+ showTitle: {
1471
+ type: BooleanConstructor;
1472
+ default: boolean;
1473
+ };
1474
+ validateEvent: {
1475
+ type: BooleanConstructor;
1476
+ default: boolean;
1477
+ };
1478
+ popupMore: {
1479
+ type: BooleanConstructor;
1480
+ default: boolean;
1481
+ };
1482
+ textareaTitle: {
1483
+ type: StringConstructor;
1484
+ default: string;
1485
+ };
1486
+ displayOnly: {
1487
+ type: BooleanConstructor;
1488
+ default: boolean;
1489
+ };
1490
+ displayOnlyContent: {
1491
+ type: StringConstructor;
1492
+ default: string;
1493
+ };
1494
+ customClass: {
1495
+ type: StringConstructor;
1496
+ default: string;
1497
+ };
1498
+ frontClearIcon: {
1499
+ type: BooleanConstructor;
1500
+ default: boolean;
1501
+ };
1502
+ showEmptyValue: {
1503
+ type: BooleanConstructor;
1504
+ default: undefined;
1505
+ };
1506
+ textAlign: {
1507
+ type: StringConstructor;
1508
+ default: string;
1509
+ };
1510
+ width: {
1511
+ type: PropType<string | number | null>;
1512
+ };
1513
+ showTooltip: {
1514
+ type: BooleanConstructor;
1515
+ default: boolean;
1516
+ };
1517
+ inputBoxType: {
1518
+ type: StringConstructor;
1519
+ default: string;
1520
+ validator: (value: string) => boolean;
1521
+ };
1522
+ tiny_mode: StringConstructor;
1523
+ tiny_mode_root: BooleanConstructor;
1524
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
1525
+ tiny_renderless: FunctionConstructor;
1526
+ tiny_theme: StringConstructor;
1527
+ tiny_mcp_config: ObjectConstructor;
1528
+ tiny_chart_theme: ObjectConstructor;
1529
+ }>>, () => VNode<RendererNode, RendererElement, {
1530
+ [key: string]: any;
1531
+ }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
1532
+ disabled: boolean;
1533
+ type: string;
1534
+ ellipsis: boolean;
1535
+ mask: boolean;
1536
+ vertical: boolean;
1537
+ customClass: string;
1538
+ tiny_mode_root: boolean;
1539
+ _constants: Record<string, any>;
1540
+ tabindex: string;
1541
+ showTitle: boolean;
1542
+ readonly: boolean;
1543
+ hoverExpand: boolean;
1544
+ memorySpace: number;
1545
+ selectMenu: {
1546
+ id: string;
1547
+ label: string;
1548
+ }[];
1549
+ contentStyle: Record<string, any>;
1550
+ isSelect: boolean;
1551
+ counter: boolean;
1552
+ autosize: boolean | Record<string, any>;
1553
+ clearable: boolean;
1554
+ autocomplete: string;
1555
+ showPassword: boolean;
1556
+ showWordLimit: boolean;
1557
+ validateEvent: boolean;
1558
+ popupMore: boolean;
1559
+ textareaTitle: string;
1560
+ displayOnly: boolean;
1561
+ displayOnlyContent: string;
1562
+ frontClearIcon: boolean;
1563
+ showEmptyValue: boolean;
1564
+ textAlign: string;
1565
+ showTooltip: boolean;
1566
+ inputBoxType: string;
1567
+ }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
1568
+ P: {};
1569
+ B: {};
1570
+ D: {};
1571
+ C: {};
1572
+ M: {};
1573
+ Defaults: {};
1574
+ }, Readonly<ExtractPropTypes< {
1575
+ _constants: {
1576
+ type: ObjectConstructor;
1577
+ default: () => {
1578
+ INPUT_PC: string;
1579
+ INPUTGROUP_PC: string;
1580
+ INPUT_MOBILE: string;
1581
+ INPUTGROUP_MOBILE: string;
1582
+ Mode: string;
1583
+ inputMode(mode: any): string;
1584
+ inputGroupMode(mode: any): string;
1585
+ VALIDATE_ICON: {
1586
+ Validating: string;
1587
+ Success: string;
1588
+ Error: string;
1589
+ };
1590
+ COMPONENT_NAME: {
1591
+ FormItem: string;
1592
+ };
1593
+ MASKSYMBOL: string;
1594
+ TEXTAREA_HEIGHT_MOBILE: number;
1595
+ };
1596
+ };
1597
+ name: StringConstructor;
1598
+ size: StringConstructor;
1599
+ form: StringConstructor;
1600
+ label: StringConstructor;
1601
+ height: NumberConstructor;
1602
+ resize: StringConstructor;
1603
+ tabindex: {
1604
+ type: StringConstructor;
1605
+ default: string;
1606
+ };
1607
+ disabled: BooleanConstructor;
1608
+ readonly: BooleanConstructor;
1609
+ hoverExpand: BooleanConstructor;
1610
+ mask: BooleanConstructor;
1611
+ suffixIcon: (StringConstructor | ObjectConstructor)[];
1612
+ prefixIcon: (StringConstructor | ObjectConstructor)[];
1613
+ modelValue: PropType<string | number | null>;
1614
+ type: {
1615
+ type: StringConstructor;
1616
+ default: string;
1617
+ };
1618
+ memorySpace: {
1619
+ type: NumberConstructor;
1620
+ default: number;
1621
+ };
1622
+ vertical: {
1623
+ type: BooleanConstructor;
1624
+ default: boolean;
1625
+ };
1626
+ selectMenu: {
1627
+ type: {
1628
+ (arrayLength: number): {
1629
+ id: string;
1630
+ label: string;
1631
+ }[];
1632
+ (...items: {
1633
+ id: string;
1634
+ label: string;
1635
+ }[]): {
1636
+ id: string;
1637
+ label: string;
1638
+ }[];
1639
+ new (arrayLength: number): {
1640
+ id: string;
1641
+ label: string;
1642
+ }[];
1643
+ new (...items: {
1644
+ id: string;
1645
+ label: string;
1646
+ }[]): {
1647
+ id: string;
1648
+ label: string;
1649
+ }[];
1650
+ isArray(arg: any): arg is any[];
1651
+ readonly prototype: any[];
1652
+ from<T>(arrayLike: ArrayLike<T>): T[];
1653
+ from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
1654
+ from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
1655
+ from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
1656
+ of<T_4>(...items: T_4[]): T_4[];
1657
+ readonly [Symbol.species]: ArrayConstructor;
1658
+ };
1659
+ default: () => never[];
1660
+ };
1661
+ ellipsis: {
1662
+ type: BooleanConstructor;
1663
+ default: boolean;
1664
+ };
1665
+ contentStyle: {
1666
+ type: ObjectConstructor;
1667
+ default: () => {};
1668
+ };
1669
+ isSelect: {
1670
+ type: BooleanConstructor;
1671
+ default: boolean;
1672
+ };
1673
+ tips: StringConstructor;
1674
+ counter: {
1675
+ type: BooleanConstructor;
1676
+ default: boolean;
1677
+ };
1678
+ autosize: {
1679
+ type: (BooleanConstructor | ObjectConstructor)[];
1680
+ default: boolean;
1681
+ };
1682
+ clearable: {
1683
+ type: BooleanConstructor;
1684
+ default: boolean;
1685
+ };
1686
+ autocomplete: {
1687
+ type: StringConstructor;
1688
+ default: string;
1689
+ };
1690
+ showPassword: {
1691
+ type: BooleanConstructor;
1692
+ default: boolean;
1693
+ };
1694
+ showWordLimit: {
1695
+ type: BooleanConstructor;
1696
+ default: boolean;
1697
+ };
1698
+ showTitle: {
1699
+ type: BooleanConstructor;
1700
+ default: boolean;
1701
+ };
1702
+ validateEvent: {
1703
+ type: BooleanConstructor;
1704
+ default: boolean;
1705
+ };
1706
+ popupMore: {
1707
+ type: BooleanConstructor;
1708
+ default: boolean;
1709
+ };
1710
+ textareaTitle: {
1711
+ type: StringConstructor;
1712
+ default: string;
1713
+ };
1714
+ displayOnly: {
1715
+ type: BooleanConstructor;
1716
+ default: boolean;
1717
+ };
1718
+ displayOnlyContent: {
1719
+ type: StringConstructor;
1720
+ default: string;
1721
+ };
1722
+ customClass: {
1723
+ type: StringConstructor;
1724
+ default: string;
1725
+ };
1726
+ frontClearIcon: {
1727
+ type: BooleanConstructor;
1728
+ default: boolean;
1729
+ };
1730
+ showEmptyValue: {
1731
+ type: BooleanConstructor;
1732
+ default: undefined;
1733
+ };
1734
+ textAlign: {
1735
+ type: StringConstructor;
1736
+ default: string;
1737
+ };
1738
+ width: {
1739
+ type: PropType<string | number | null>;
1740
+ };
1741
+ showTooltip: {
1742
+ type: BooleanConstructor;
1743
+ default: boolean;
1744
+ };
1745
+ inputBoxType: {
1746
+ type: StringConstructor;
1747
+ default: string;
1748
+ validator: (value: string) => boolean;
1749
+ };
1750
+ tiny_mode: StringConstructor;
1751
+ tiny_mode_root: BooleanConstructor;
1752
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
1753
+ tiny_renderless: FunctionConstructor;
1754
+ tiny_theme: StringConstructor;
1755
+ tiny_mcp_config: ObjectConstructor;
1756
+ tiny_chart_theme: ObjectConstructor;
1757
+ }>>, () => VNode<RendererNode, RendererElement, {
1758
+ [key: string]: any;
1759
+ }>, {}, {}, {}, {
1760
+ disabled: boolean;
1761
+ type: string;
1762
+ ellipsis: boolean;
1763
+ mask: boolean;
1764
+ vertical: boolean;
1765
+ customClass: string;
1766
+ tiny_mode_root: boolean;
1767
+ _constants: Record<string, any>;
1768
+ tabindex: string;
1769
+ showTitle: boolean;
1770
+ readonly: boolean;
1771
+ hoverExpand: boolean;
1772
+ memorySpace: number;
1773
+ selectMenu: {
1774
+ id: string;
1775
+ label: string;
1776
+ }[];
1777
+ contentStyle: Record<string, any>;
1778
+ isSelect: boolean;
1779
+ counter: boolean;
1780
+ autosize: boolean | Record<string, any>;
1781
+ clearable: boolean;
1782
+ autocomplete: string;
1783
+ showPassword: boolean;
1784
+ showWordLimit: boolean;
1785
+ validateEvent: boolean;
1786
+ popupMore: boolean;
1787
+ textareaTitle: string;
1788
+ displayOnly: boolean;
1789
+ displayOnlyContent: string;
1790
+ frontClearIcon: boolean;
1791
+ showEmptyValue: boolean;
1792
+ textAlign: string;
1793
+ showTooltip: boolean;
1794
+ inputBoxType: string;
1795
+ }> | null;
1796
+ buttonsContainerRef: HTMLDivElement;
1363
1797
  };
1364
1798
  rootEl: HTMLDivElement;
1365
1799
  };
1366
1800
 
1367
- declare function __VLS_template_9(): {
1801
+ declare function __VLS_template_8(): {
1368
1802
  attrs: Partial<{}>;
1369
1803
  slots: Readonly<SuggestionPillButtonSlots> & SuggestionPillButtonSlots;
1370
1804
  refs: {};
1371
1805
  rootEl: HTMLButtonElement;
1372
1806
  };
1373
1807
 
1808
+ declare function __VLS_template_9(): {
1809
+ attrs: Partial<{}>;
1810
+ slots: Readonly<SuggestionPillsSlots> & SuggestionPillsSlots;
1811
+ refs: {
1812
+ containerWrapperRef: HTMLDivElement;
1813
+ containerRef: HTMLDivElement;
1814
+ staticMaybeItemRefs: unknown[];
1815
+ floatingItemsRef: HTMLDivElement;
1816
+ floatingMaybeItemRefs: unknown[];
1817
+ };
1818
+ rootEl: HTMLDivElement;
1819
+ };
1820
+
1374
1821
  declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
1375
1822
 
1376
1823
  declare type __VLS_TemplateResult_10 = ReturnType<typeof __VLS_template_10>;
@@ -1381,12 +1828,6 @@ declare type __VLS_TemplateResult_12 = ReturnType<typeof __VLS_template_12>;
1381
1828
 
1382
1829
  declare type __VLS_TemplateResult_13 = ReturnType<typeof __VLS_template_13>;
1383
1830
 
1384
- declare type __VLS_TemplateResult_14 = ReturnType<typeof __VLS_template_14>;
1385
-
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
1831
  declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
1391
1832
 
1392
1833
  declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
@@ -1433,24 +1874,6 @@ declare type __VLS_WithTemplateSlots_13<T, S> = T & {
1433
1874
  };
1434
1875
  };
1435
1876
 
1436
- declare type __VLS_WithTemplateSlots_14<T, S> = T & {
1437
- new (): {
1438
- $slots: S;
1439
- };
1440
- };
1441
-
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
1877
  declare type __VLS_WithTemplateSlots_2<T, S> = T & {
1455
1878
  new (): {
1456
1879
  $slots: S;
@@ -1499,43 +1922,29 @@ declare type __VLS_WithTemplateSlots_9<T, S> = T & {
1499
1922
  };
1500
1923
  };
1501
1924
 
1502
- declare interface ActionButton_2 {
1925
+ export declare interface ActionButton {
1503
1926
  type: string;
1504
1927
  label: string;
1505
1928
  handler?: (file: Attachment) => void;
1506
1929
  }
1507
1930
 
1508
- /**
1509
- * ActionButton Props
1510
- *
1511
- * 基础操作按钮的 Props
1512
- */
1513
- export declare interface ActionButtonProps {
1514
- /**
1515
- * 按钮图标
1516
- */
1517
- icon: VNode | Component;
1518
- /**
1519
- * 是否禁用
1520
- */
1931
+ export declare interface ActionButtonsProps {
1932
+ loading?: boolean;
1521
1933
  disabled?: boolean;
1522
- /**
1523
- * 是否激活状态
1524
- */
1525
- active?: boolean;
1526
- /**
1527
- * 工具提示
1528
- */
1529
- tooltip?: TooltipContent;
1530
- /**
1531
- * Tooltip 位置
1532
- */
1533
- tooltipPlacement?: TooltipPlacement;
1534
- /**
1535
- * 按钮大小
1536
- */
1537
- size?: string | number;
1538
- }
1934
+ showClear?: boolean;
1935
+ hasContent?: boolean;
1936
+ buttonGroup?: ButtonGroupConfig;
1937
+ allowSpeech?: boolean;
1938
+ speechStatus?: {
1939
+ isRecording: boolean;
1940
+ isSupported: boolean;
1941
+ };
1942
+ allowFiles?: boolean;
1943
+ submitType?: SubmitTrigger;
1944
+ showShortcuts?: boolean;
1945
+ isOverLimit?: boolean;
1946
+ stopText?: string;
1947
+ }
1539
1948
 
1540
1949
  export declare type AddType = 'form' | 'code';
1541
1950
 
@@ -1548,7 +1957,7 @@ export declare interface AttachmentListEmits {
1548
1957
  (e: 'retry', file: Attachment): void;
1549
1958
  (e: 'preview', event: MouseEvent, file: Attachment): void;
1550
1959
  (e: 'action', payload: {
1551
- action: ActionButton_2;
1960
+ action: ActionButton;
1552
1961
  file: Attachment;
1553
1962
  }): void;
1554
1963
  }
@@ -1558,14 +1967,11 @@ export declare interface AttachmentListProps {
1558
1967
  disabled?: boolean;
1559
1968
  wrap?: boolean;
1560
1969
  fileIcons?: Record<string, Component>;
1561
- actions?: ActionButton_2[];
1970
+ actions?: ActionButton[];
1562
1971
  variant?: DisplayVariant;
1563
1972
  fileMatchers?: FileTypeMatcher[];
1564
1973
  }
1565
1974
 
1566
- /**
1567
- * 自动高度配置
1568
- */
1569
1975
  export declare type AutoSize = boolean | {
1570
1976
  minRows: number;
1571
1977
  maxRows: number;
@@ -1583,41 +1989,73 @@ declare type BaseCardProps = Pick<AttachmentListProps, 'fileIcons' | 'disabled'
1583
1989
 
1584
1990
  export declare type BaseFileType = 'image' | 'pdf' | 'word' | 'excel' | 'ppt' | 'folder' | 'other';
1585
1991
 
1586
- declare const Bubble: typeof _default_25 & {
1992
+ declare interface BaseTextItem {
1993
+ id: string;
1994
+ type: string;
1995
+ content: string;
1996
+ }
1997
+
1998
+ declare const Bubble: typeof _default_18 & {
1587
1999
  install: typeof bubbleInstall;
1588
2000
  };
1589
2001
  export { Bubble }
1590
2002
  export { Bubble as TrBubble }
1591
2003
 
1592
- export declare type BubbleBoxRendererMatch = {
1593
- find: (messages: BubbleMessage[], contentIndex?: number) => boolean;
1594
- renderer: Component<BubbleBoxRendererProps>;
1595
- priority?: number;
1596
- attributes?: Record<string, string>;
1597
- };
2004
+ export declare interface BubbleCommonProps {
2005
+ /**
2006
+ * 气泡对齐位置
2007
+ */
2008
+ placement?: 'start' | 'end';
2009
+ /**
2010
+ * 气泡头像
2011
+ */
2012
+ avatar?: VNode;
2013
+ /**
2014
+ * 气泡形状,默认 'corner'
2015
+ */
2016
+ shape?: 'rounded' | 'corner';
2017
+ /**
2018
+ * 气泡内容渲染器。
2019
+ * 如果 Bubble 中的 content 是长度大于 0 的数组,则 contentRenderer 无效。将会使用 BubbleProvider 中注册的渲染器
2020
+ */
2021
+ contentRenderer?: BubbleContentRenderer;
2022
+ /**
2023
+ * 自定义气泡内容字段。比如 customContentField 设置为 'my-content',则 Bubble 优先渲染 my-content 属性到气泡内容
2024
+ */
2025
+ customContentField?: string;
2026
+ /**
2027
+ * 气泡中止文本
2028
+ */
2029
+ abortedText?: string;
2030
+ /**
2031
+ * 气泡最大宽度
2032
+ */
2033
+ maxWidth?: string | number;
2034
+ }
2035
+
2036
+ export declare abstract class BubbleContentClassRenderer {
2037
+ abstract render(options: {
2038
+ [key: string]: any;
2039
+ }): VNode;
2040
+ }
1598
2041
 
1599
- export declare type BubbleBoxRendererProps = Pick<BubbleProps, 'placement' | 'shape'>;
2042
+ export declare type BubbleContentFunctionRenderer = (options: {
2043
+ [key: string]: any;
2044
+ }) => VNode;
1600
2045
 
1601
- export declare type BubbleContentRendererMatch = {
1602
- find: (message: BubbleMessage, contentIndex?: number) => boolean;
1603
- renderer: Component<BubbleContentRendererProps>;
1604
- priority?: number;
1605
- attributes?: Record<string, string>;
1606
- };
2046
+ export declare interface BubbleContentItem {
2047
+ type: string;
2048
+ [key: string]: any;
2049
+ }
1607
2050
 
1608
- export declare type BubbleContentRendererProps<T extends ChatMessageContent = ChatMessageContent, S extends Record<string, unknown> = Record<string, unknown>> = {
1609
- message: BubbleMessage<T, S>;
1610
- contentIndex?: number;
2051
+ export declare type BubbleContentRenderer = BubbleContentFunctionRenderer | BubbleContentClassRenderer | Component | {
2052
+ component: Component;
2053
+ defaultProps: Record<string, unknown>;
1611
2054
  };
1612
2055
 
1613
- /**
1614
- * 自定义分组函数类型
1615
- */
1616
- declare type BubbleGroupFunction = (messages: BubbleMessage[], dividerRole?: string) => BubbleMessageGroup[];
1617
-
1618
2056
  declare const bubbleInstall: (app: App) => void;
1619
2057
 
1620
- declare const BubbleList: typeof _default_26 & {
2058
+ declare const BubbleList: typeof _default_19 & {
1621
2059
  install: typeof bubbleListInstall;
1622
2060
  };
1623
2061
  export { BubbleList }
@@ -1626,81 +2064,58 @@ export { BubbleList as TrBubbleList }
1626
2064
  declare const bubbleListInstall: (app: App) => void;
1627
2065
 
1628
2066
  export declare interface BubbleListProps {
1629
- messages: BubbleMessage[];
1630
- /**
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;
2067
+ items: (BubbleProps & {
2068
+ slots?: BubbleSlots;
2069
+ })[];
1647
2070
  /**
1648
- * 当消息没有角色或角色为空时,使用此角色
1649
- * @default 'assistant'
2071
+ * 每个角色的默认配置项
1650
2072
  */
1651
- fallbackRole?: string;
2073
+ roles?: Record<string, BubbleRoleConfig>;
1652
2074
  /**
1653
- * 角色配置(头像、位置、形状)
2075
+ * 列表是否加载中
1654
2076
  */
1655
- roleConfigs?: Record<string, BubbleRoleConfig>;
1656
- contentRenderMode?: BubbleProps['contentRenderMode'];
2077
+ loading?: boolean;
1657
2078
  /**
1658
- * 是否自动滚动到底部。需要满足以下条件:
1659
- * - BubbleList 是可滚动容器(需要 scrollHeight > clientHeight)
1660
- * - 滚动容器接近底部
1661
- *
1662
- * @default false
2079
+ * 指定哪个角色可以有加载中状态
1663
2080
  */
2081
+ loadingRole?: string;
1664
2082
  autoScroll?: boolean;
1665
2083
  }
1666
2084
 
1667
- declare type BubbleListSlotProps = BubbleSlotProps & {
1668
- messageIndexes: number[];
1669
- };
2085
+ export declare class BubbleMarkdownContentRenderer extends BubbleContentClassRenderer {
2086
+ readonly mdConfig: Options;
2087
+ readonly dompurifyConfig: Config;
2088
+ readonly sanitizeDisabled: boolean;
2089
+ readonly defaultAttrs: Record<string, unknown>;
2090
+ private md;
2091
+ constructor(options?: BubbleMarkdownRendererOptions);
2092
+ render(options: {
2093
+ content?: string;
2094
+ [key: string]: unknown;
2095
+ }): VNode<RendererNode, RendererElement, {
2096
+ [key: string]: any;
2097
+ }>;
2098
+ }
1670
2099
 
1671
- export declare interface BubbleListSlots {
1672
- prefix?: (slotProps: BubbleListSlotProps) => VNode | VNode[];
1673
- suffix?: (slotProps: BubbleListSlotProps) => VNode | VNode[];
1674
- after?: (slotProps: BubbleListSlotProps) => VNode | VNode[];
1675
- 'content-footer'?: (slotProps: BubbleListSlotProps & {
1676
- contentIndex?: number;
1677
- }) => VNode | VNode[];
2100
+ declare interface BubbleMarkdownRendererOptions {
2101
+ mdConfig?: Options;
2102
+ dompurifyConfig?: Config;
2103
+ sanitizeDisabled?: boolean;
2104
+ defaultAttrs?: Record<string, unknown>;
1678
2105
  }
1679
2106
 
1680
- export declare type BubbleMessage<T extends ChatMessageContent = ChatMessageContent, S extends Record<string, unknown> = Record<string, unknown>> = ChatMessageWithOptionalRole<T> & {
1681
- id?: string;
2107
+ export declare interface BubbleProps extends BubbleCommonProps {
2108
+ /**
2109
+ * 气泡内容
2110
+ */
2111
+ content?: string | BubbleContentItem[];
2112
+ id?: string | number | symbol;
2113
+ role?: string;
1682
2114
  loading?: boolean;
1683
- state?: S;
1684
- };
1685
-
1686
- export declare type BubbleMessageGroup = {
1687
- role: string;
1688
- messages: BubbleMessage[];
1689
- messageIndexes: number[];
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
- };
2115
+ aborted?: boolean;
2116
+ }
1702
2117
 
1703
- declare const BubbleProvider: typeof _default_27 & {
2118
+ declare const BubbleProvider: typeof _default_20 & {
1704
2119
  install: typeof bubbleProviderInstall;
1705
2120
  };
1706
2121
  export { BubbleProvider }
@@ -1708,121 +2123,38 @@ export { BubbleProvider as TrBubbleProvider }
1708
2123
 
1709
2124
  declare const bubbleProviderInstall: (app: App) => void;
1710
2125
 
1711
- export declare interface BubbleProviderProps {
1712
- boxRendererMatches?: BubbleBoxRendererMatch[];
1713
- contentRendererMatches?: BubbleContentRendererMatch[];
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;
2126
+ export declare type BubbleRoleConfig = BubbleCommonProps & {
2127
+ hidden?: boolean;
2128
+ slots?: BubbleSlots;
1772
2129
  };
1773
2130
 
1774
2131
  export declare interface BubbleSlots {
1775
- prefix?: (slotProps: BubbleSlotProps) => VNode | VNode[];
1776
- suffix?: (slotProps: BubbleSlotProps) => VNode | VNode[];
1777
- after?: (slotProps: BubbleSlotProps) => VNode | VNode[];
1778
- 'content-footer'?: (slotProps: BubbleSlotProps & {
1779
- contentIndex?: number;
1780
- }) => VNode | VNode[];
2132
+ default?: (slotProps: {
2133
+ bubbleProps: BubbleProps;
2134
+ index?: number;
2135
+ }) => unknown;
2136
+ footer?: (slotProps: {
2137
+ bubbleProps: BubbleProps;
2138
+ index?: number;
2139
+ }) => unknown;
2140
+ loading?: (slotProps: {
2141
+ bubbleProps: BubbleProps;
2142
+ index?: number;
2143
+ }) => unknown;
2144
+ trailer?: (slotProps: {
2145
+ bubbleProps: BubbleProps;
2146
+ index?: number;
2147
+ }) => unknown;
1781
2148
  }
1782
2149
 
1783
- declare interface ButtonGroupConfig {
2150
+ export declare interface ButtonGroupConfig {
1784
2151
  file?: ControlState & fileUploadConfig;
1785
2152
  submit?: ControlState;
1786
2153
  voice?: VoiceButtonConfig;
1787
2154
  }
1788
2155
 
1789
- /**
1790
- * 聊天消息接口(支持 OpenAI 格式)
1791
- */
1792
- declare interface ChatMessage<T extends ChatMessageContent = ChatMessageContent> {
1793
- role: string;
1794
- content?: T;
1795
- reasoning_content?: string;
1796
- tool_calls?: ToolCall[];
1797
- tool_call_id?: string;
1798
- name?: string;
1799
- }
1800
-
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
2156
  export declare type ColorMode = 'light' | 'dark' | 'auto';
1813
2157
 
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
2158
  export declare interface ContainerEmits {
1827
2159
  (e: 'close'): void;
1828
2160
  }
@@ -1846,7 +2178,7 @@ export declare interface ContainerSlots {
1846
2178
  footer: () => unknown;
1847
2179
  }
1848
2180
 
1849
- declare interface ControlState {
2181
+ export declare interface ControlState {
1850
2182
  tooltips?: string | TooltipRender;
1851
2183
  disabled?: boolean;
1852
2184
  tooltipPlacement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
@@ -1857,103 +2189,56 @@ declare const _default: {
1857
2189
  };
1858
2190
  export default _default;
1859
2191
 
1860
- declare const _default_10: typeof _default_37 & {
2192
+ declare const _default_10: typeof _default_30 & {
1861
2193
  install: typeof install_9;
1862
2194
  };
1863
- export { _default_10 as SenderCompat }
1864
- export { _default_10 as TrSenderCompat }
2195
+ export { _default_10 as Sender }
2196
+ export { _default_10 as TrSender }
1865
2197
 
1866
- declare const _default_11: typeof _default_39 & {
2198
+ declare const _default_11: typeof _default_32 & {
1867
2199
  install: typeof install_10;
1868
2200
  };
1869
2201
  export { _default_11 as SuggestionPills }
1870
2202
  export { _default_11 as TrSuggestionPills }
1871
2203
 
1872
- declare const _default_12: typeof _default_40 & {
2204
+ declare const _default_12: typeof _default_33 & {
1873
2205
  install: typeof install_11;
1874
2206
  };
1875
2207
  export { _default_12 as SuggestionPopover }
1876
2208
  export { _default_12 as TrSuggestionPopover }
1877
2209
 
1878
- declare const _default_13: typeof _default_41 & {
2210
+ declare const _default_13: typeof _default_34 & {
1879
2211
  install: typeof install_12;
1880
2212
  };
1881
2213
  export { _default_13 as ThemeProvider }
1882
2214
  export { _default_13 as TrThemeProvider }
1883
2215
 
1884
- declare const _default_14: typeof _default_42 & {
2216
+ declare const _default_14: typeof _default_35 & {
1885
2217
  install: typeof install_13;
1886
2218
  };
1887
2219
  export { _default_14 as TrWelcome }
1888
2220
  export { _default_14 as Welcome }
1889
2221
 
1890
- declare const _default_15: typeof _default_43 & {
2222
+ declare const _default_15: typeof _default_36 & {
1891
2223
  install: typeof install_14;
1892
2224
  };
1893
2225
  export { _default_15 as McpServerPicker }
1894
2226
  export { _default_15 as TrMcpServerPicker }
1895
2227
 
1896
- declare const _default_16: typeof _default_44 & {
2228
+ declare const _default_16: typeof _default_37 & {
1897
2229
  install: typeof install_15;
1898
2230
  };
1899
2231
  export { _default_16 as McpAddForm }
1900
2232
  export { _default_16 as TrMcpAddForm }
1901
2233
 
1902
- declare const _default_17: __VLS_WithTemplateSlots_15<typeof __VLS_component_15, __VLS_TemplateResult_15["slots"]>;
1903
- export { _default_17 as ActionButton }
1904
- export { _default_17 as TrActionButton }
1905
-
1906
- declare const _default_18: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1907
- export { _default_18 as SubmitButton }
1908
- export { _default_18 as TrSubmitButton }
1909
-
1910
- declare const _default_19: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1911
- export { _default_19 as ClearButton }
1912
- export { _default_19 as TrClearButton }
1913
-
1914
- declare const _default_2: typeof _default_24 & {
1915
- install: typeof install;
1916
- };
1917
- export { _default_2 as Attachments }
1918
- export { _default_2 as TrAttachments }
1919
-
1920
- declare const _default_20: DefineComponent<UploadButtonProps, {
1921
- open: (localOptions?: Partial<UseFileDialogOptions>) => void;
1922
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1923
- error: (error: Error, files?: File[] | undefined) => any;
1924
- select: (files: File[]) => any;
1925
- }, string, PublicProps, Readonly<UploadButtonProps> & Readonly<{
1926
- onError?: ((error: Error, files?: File[] | undefined) => any) | undefined;
1927
- onSelect?: ((files: File[]) => any) | undefined;
1928
- }>, {
1929
- reset: boolean;
1930
- multiple: boolean;
1931
- tooltipPlacement: TooltipPlacement;
1932
- accept: string;
1933
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
1934
- export { _default_20 as TrUploadButton }
1935
- export { _default_20 as UploadButton }
1936
-
1937
- declare const _default_21: __VLS_WithTemplateSlots_16<typeof __VLS_component_16, __VLS_TemplateResult_16["slots"]>;
1938
- export { _default_21 as TrVoiceButton }
1939
- export { _default_21 as VoiceButton }
1940
-
1941
- declare const _default_22: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1942
- export { _default_22 as TrWordCounter }
1943
- export { _default_22 as WordCounter }
1944
-
1945
- declare const _default_23: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
1946
- export { _default_23 as DefaultActionButtons }
1947
- export { _default_23 as TrDefaultActionButtons }
1948
-
1949
- declare const _default_24: DefineComponent<AttachmentListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2234
+ declare const _default_17: DefineComponent<AttachmentListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1950
2235
  "update:items": (items: Attachment[]) => any;
1951
2236
  remove: (file: Attachment) => any;
1952
2237
  download: (event: MouseEvent, file: Attachment) => any;
1953
2238
  retry: (file: Attachment) => any;
1954
2239
  preview: (event: MouseEvent, file: Attachment) => any;
1955
2240
  action: (payload: {
1956
- action: ActionButton_2;
2241
+ action: ActionButton;
1957
2242
  file: Attachment;
1958
2243
  }) => any;
1959
2244
  }, string, PublicProps, Readonly<AttachmentListProps> & Readonly<{
@@ -1963,36 +2248,40 @@ onDownload?: ((event: MouseEvent, file: Attachment) => any) | undefined;
1963
2248
  onRetry?: ((file: Attachment) => any) | undefined;
1964
2249
  onPreview?: ((event: MouseEvent, file: Attachment) => any) | undefined;
1965
2250
  onAction?: ((payload: {
1966
- action: ActionButton_2;
2251
+ action: ActionButton;
1967
2252
  file: Attachment;
1968
2253
  }) => any) | undefined;
1969
2254
  }>, {
1970
- actions: ActionButton_2[];
2255
+ actions: ActionButton[];
1971
2256
  fileMatchers: FileTypeMatcher[];
1972
2257
  variant: DisplayVariant;
1973
2258
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
1974
2259
 
1975
- declare const _default_25: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2260
+ declare const _default_18: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
1976
2261
 
1977
- declare const _default_26: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
2262
+ declare const _default_19: DefineComponent<BubbleListProps, {
2263
+ scrollToBottom: (behavior?: ScrollBehavior) => Promise<void>;
2264
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BubbleListProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
2265
+ scrollContainerRef: HTMLDivElement;
2266
+ }, HTMLDivElement>;
1978
2267
 
1979
- declare const _default_27: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
2268
+ declare const _default_2: typeof _default_17 & {
2269
+ install: typeof install;
2270
+ };
2271
+ export { _default_2 as Attachments }
2272
+ export { _default_2 as TrAttachments }
1980
2273
 
1981
- declare const _default_28: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
2274
+ declare const _default_20: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
1982
2275
 
1983
- declare const _default_29: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
2276
+ declare const _default_21: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
1984
2277
 
1985
- declare const _default_3: typeof _default_28 & {
1986
- install: typeof install_2;
1987
- };
1988
- export { _default_3 as Container }
1989
- export { _default_3 as TrContainer }
2278
+ declare const _default_22: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1990
2279
 
1991
- declare const _default_30: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
2280
+ declare const _default_23: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
1992
2281
 
1993
- declare const _default_31: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
2282
+ declare const _default_24: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
1994
2283
 
1995
- declare const _default_32: DefineComponent<FeedbackProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2284
+ declare const _default_25: DefineComponent<FeedbackProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1996
2285
  action: (name: string) => any;
1997
2286
  operation: (name: string) => any;
1998
2287
  }, string, PublicProps, Readonly<FeedbackProps> & Readonly<{
@@ -2004,7 +2293,7 @@ actionsLimit: number;
2004
2293
  sourcesLinesLimit: number;
2005
2294
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2006
2295
 
2007
- declare const _default_33: <T extends HistoryItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
2296
+ declare const _default_26: <T extends HistoryItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
2008
2297
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
2009
2298
  readonly "onItem-click"?: ((item: T) => any) | undefined;
2010
2299
  readonly "onItem-title-change"?: ((newTitle: string, item: T) => any) | undefined;
@@ -2018,38 +2307,38 @@ declare const _default_33: <T extends HistoryItem>(__VLS_props: NonNullable<Awai
2018
2307
  __ctx?: Awaited<typeof __VLS_setup>;
2019
2308
  };
2020
2309
 
2021
- declare const _default_34: DefineComponent<IconButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IconButtonProps> & Readonly<{}>, {
2310
+ declare const _default_27: DefineComponent<IconButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IconButtonProps> & Readonly<{}>, {
2022
2311
  size: string | number;
2023
2312
  svgSize: string | number;
2024
2313
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
2025
2314
 
2026
- declare const _default_35: DefineComponent<PromptProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PromptProps> & Readonly<{}>, {
2315
+ declare const _default_28: DefineComponent<PromptProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PromptProps> & Readonly<{}>, {
2027
2316
  size: "small" | "medium" | "large";
2028
2317
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2029
2318
 
2030
- declare const _default_36: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
2319
+ declare const _default_29: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
2031
2320
 
2032
- declare const _default_37: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
2321
+ declare const _default_3: typeof _default_21 & {
2322
+ install: typeof install_2;
2323
+ };
2324
+ export { _default_3 as Container }
2325
+ export { _default_3 as TrContainer }
2033
2326
 
2034
- declare const _default_38: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
2327
+ declare const _default_30: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
2035
2328
 
2036
- declare const _default_39: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
2329
+ declare const _default_31: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
2037
2330
 
2038
- declare const _default_4: typeof _default_29 & {
2039
- install: typeof install_3;
2040
- };
2041
- export { _default_4 as Conversations }
2042
- export { _default_4 as TrConversations }
2331
+ declare const _default_32: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
2043
2332
 
2044
- declare const _default_40: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
2333
+ declare const _default_33: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
2045
2334
 
2046
- declare const _default_41: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
2335
+ declare const _default_34: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
2047
2336
 
2048
- declare const _default_42: __VLS_WithTemplateSlots_13<typeof __VLS_component_13, __VLS_TemplateResult_13["slots"]>;
2337
+ declare const _default_35: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
2049
2338
 
2050
- declare const _default_43: __VLS_WithTemplateSlots_14<typeof __VLS_component_14, __VLS_TemplateResult_14["slots"]>;
2339
+ declare const _default_36: __VLS_WithTemplateSlots_13<typeof __VLS_component_13, __VLS_TemplateResult_13["slots"]>;
2051
2340
 
2052
- declare const _default_44: DefineComponent<McpAddFormProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2341
+ declare const _default_37: DefineComponent<McpAddFormProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2053
2342
  cancel: () => any;
2054
2343
  confirm: (type: AddType, data: string | McpAddFormData) => any;
2055
2344
  "update:addType": (value: AddType) => any;
@@ -2061,90 +2350,42 @@ onConfirm?: ((type: AddType, data: string | McpAddFormData) => any) | undefined;
2061
2350
  addType: AddType;
2062
2351
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2063
2352
 
2064
- declare const _default_5: typeof _default_30 & {
2353
+ declare const _default_4: typeof _default_22 & {
2354
+ install: typeof install_3;
2355
+ };
2356
+ export { _default_4 as Conversations }
2357
+ export { _default_4 as TrConversations }
2358
+
2359
+ declare const _default_5: typeof _default_23 & {
2065
2360
  install: typeof install_4;
2066
2361
  };
2067
2362
  export { _default_5 as DragOverlay }
2068
2363
  export { _default_5 as TrDragOverlay }
2069
2364
 
2070
- declare const _default_6: typeof _default_31 & {
2365
+ declare const _default_6: typeof _default_24 & {
2071
2366
  install: typeof install_5;
2072
2367
  };
2073
2368
  export { _default_6 as DropdownMenu }
2074
2369
  export { _default_6 as TrDropdownMenu }
2075
2370
 
2076
- declare const _default_7: typeof _default_32 & {
2371
+ declare const _default_7: typeof _default_25 & {
2077
2372
  install: typeof install_6;
2078
2373
  };
2079
2374
  export { _default_7 as Feedback }
2080
2375
  export { _default_7 as TrFeedback }
2081
2376
 
2082
- declare const _default_8: typeof _default_33 & {
2377
+ declare const _default_8: typeof _default_26 & {
2083
2378
  install: typeof install_7;
2084
2379
  };
2085
2380
  export { _default_8 as History }
2086
2381
  export { _default_8 as TrHistory }
2087
2382
 
2088
- declare const _default_9: typeof _default_34 & {
2383
+ declare const _default_9: typeof _default_27 & {
2089
2384
  install: typeof install_8;
2090
2385
  };
2091
2386
  export { _default_9 as IconButton }
2092
2387
  export { _default_9 as TrIconButton }
2093
2388
 
2094
- /**
2095
- * 默认操作按钮配置
2096
- *
2097
- * 用于统一配置 Sender 的默认按钮(Clear、Submit)
2098
- *
2099
- * @example
2100
- * ```typescript
2101
- * const defaultActions = {
2102
- * submit: { disabled: !isValid, tooltip: '请完善表单' },
2103
- * clear: { tooltip: '清空内容' }
2104
- * }
2105
- * ```
2106
- */
2107
- export declare interface DefaultActions {
2108
- /**
2109
- * 提交按钮配置
2110
- */
2111
- submit?: {
2112
- /**
2113
- * 是否禁用
2114
- */
2115
- disabled?: boolean;
2116
- /**
2117
- * 工具提示
2118
- * - string: 简单文本
2119
- * - () => string | VNode: 渲染函数,支持复杂内容
2120
- */
2121
- tooltip?: TooltipContent;
2122
- /**
2123
- * Tooltip 位置
2124
- */
2125
- tooltipPlacement?: TooltipPlacement;
2126
- };
2127
- /**
2128
- * 清空按钮配置
2129
- */
2130
- clear?: {
2131
- /**
2132
- * 是否禁用
2133
- */
2134
- disabled?: boolean;
2135
- /**
2136
- * 工具提示
2137
- * - string: 简单文本
2138
- * - () => string | VNode: 渲染函数,支持复杂内容
2139
- */
2140
- tooltip?: TooltipContent;
2141
- /**
2142
- * Tooltip 位置
2143
- */
2144
- tooltipPlacement?: TooltipPlacement;
2145
- };
2146
- }
2147
-
2148
2389
  export declare type DisplayVariant = 'picture' | 'card' | 'auto';
2149
2390
 
2150
2391
  declare interface DragAwareElement extends HTMLElement {
@@ -2339,7 +2580,7 @@ export declare interface FileCardEmits {
2339
2580
  (e: 'download', event: MouseEvent, file: Attachment): void;
2340
2581
  (e: 'retry', file: Attachment): void;
2341
2582
  (e: 'action', payload: {
2342
- action: ActionButton_2;
2583
+ action: ActionButton;
2343
2584
  file: Attachment;
2344
2585
  }): void;
2345
2586
  }
@@ -2380,16 +2621,7 @@ export declare interface Handlers {
2380
2621
  handleDrop: (e: DragEvent) => void;
2381
2622
  }
2382
2623
 
2383
- /**
2384
- * 高亮函数类型
2385
- *
2386
- * @param suggestionText - 建议项文本
2387
- * @param inputText - 用户输入文本
2388
- * @returns 包含文本片段和匹配状态的数组
2389
- */
2390
- export declare type HighlightFunction = (suggestionText: string, inputText: string) => SuggestionTextPart[];
2391
-
2392
- declare type HighlightFunction_2 = (suggestionText: string, inputText: string) => SuggestionTextPart_2[];
2624
+ declare type HighlightFunction = (suggestionText: string, inputText: string) => SuggestionTextPart[];
2393
2625
 
2394
2626
  export declare type HistoryData<T extends HistoryItem> = T[] | HistoryGroup<T>[];
2395
2627
 
@@ -2436,11 +2668,12 @@ export declare interface IconButtonProps {
2436
2668
  rounded?: boolean;
2437
2669
  }
2438
2670
 
2439
- /**
2440
- * 输入模式
2441
- * - single: 单行模式,适用于简短输入
2442
- * - multiple: 多行模式,适用于长文本输入
2443
- */
2671
+ export declare interface InputHandler {
2672
+ inputValue: Ref<string>;
2673
+ isComposing: Ref<boolean>;
2674
+ clearInput: () => void;
2675
+ }
2676
+
2444
2677
  export declare type InputMode = 'single' | 'multiple';
2445
2678
 
2446
2679
  declare const install: <T>(app: App<T>) => void;
@@ -2479,18 +2712,14 @@ declare const installPrompt: <T>(app: App<T>) => void;
2479
2712
 
2480
2713
  declare const installPrompts: <T>(app: App<T>) => void;
2481
2714
 
2482
- declare interface ISuggestionItem {
2715
+ export declare interface ISuggestionItem {
2483
2716
  content: string;
2484
- highlights?: string[] | HighlightFunction_2;
2717
+ highlights?: string[] | HighlightFunction;
2485
2718
  }
2486
2719
 
2487
- /**
2488
- * 键盘处理器接口
2489
- */
2490
- export declare interface KeyboardHandlers {
2491
- checkSubmitShortcut: (event: KeyboardEvent) => boolean;
2492
- checkNewlineShortcut: (event: KeyboardEvent) => boolean;
2493
- submit: () => void;
2720
+ export declare interface KeyboardHandler {
2721
+ handleKeyPress: (e: KeyboardEvent) => void;
2722
+ triggerSubmit: () => void;
2494
2723
  }
2495
2724
 
2496
2725
  export declare interface MarketCategoryOption {
@@ -2561,86 +2790,6 @@ export declare interface McpServerPickerProps {
2561
2790
  marketLoading?: boolean;
2562
2791
  }
2563
2792
 
2564
- /**
2565
- * 创建 Mention 扩展的便捷函数
2566
- *
2567
- * @param items - 提及项列表
2568
- * @param char - 触发字符,默认 '@'
2569
- * @param options - 其他配置项
2570
- *
2571
- * @example
2572
- * ```typescript
2573
- * const extensions = [mention(items)]
2574
- * const extensions = [mention(items, '#')]
2575
- * const extensions = [mention(items, '@', { allowSpaces: true })]
2576
- * ```
2577
- */
2578
- declare function mention(items: MentionItem[] | Ref<MentionItem[]>, char?: string, options?: Partial<Omit<MentionOptions, 'items' | 'char'>>): Node_2<MentionOptions, any>;
2579
-
2580
- /**
2581
- * 提及项数据结构(用户侧)
2582
- *
2583
- * 用户传入的数据格式,id 可选,插件会自动生成
2584
- */
2585
- export declare interface MentionItem {
2586
- /**
2587
- * 唯一标识(可选)
2588
- *
2589
- * 如果不提供,插件会自动生成
2590
- */
2591
- id?: string;
2592
- /**
2593
- * 显示名称,如 "小小画家"(必传)
2594
- */
2595
- label: string;
2596
- /**
2597
- * 关联值(必传)
2598
- *
2599
- * 可以是任意字符串值,如 AI 提示词、用户 ID、标签内容等
2600
- */
2601
- value: string;
2602
- /**
2603
- * 图标(可选)
2604
- */
2605
- icon?: string;
2606
- }
2607
-
2608
- /**
2609
- * Mention 配置选项
2610
- */
2611
- declare interface MentionOptions {
2612
- /**
2613
- * 提及项列表
2614
- */
2615
- items: MentionItem[] | Ref<MentionItem[]>;
2616
- /**
2617
- * 触发字符,默认 '@'
2618
- */
2619
- char: string;
2620
- /**
2621
- * 是否允许空格,默认 false
2622
- */
2623
- allowSpaces?: boolean;
2624
- /**
2625
- * HTML 属性
2626
- */
2627
- HTMLAttributes?: Record<string, unknown>;
2628
- }
2629
-
2630
- /**
2631
- * 结构化数据项(提交时返回)
2632
- *
2633
- * 用于表示文本和 mention 的混合结构
2634
- */
2635
- declare type MentionStructuredItem = {
2636
- type: 'text';
2637
- content: string;
2638
- } | {
2639
- type: 'mention';
2640
- content: string;
2641
- value: string;
2642
- };
2643
-
2644
2793
  export declare type PluginAddState = 'idle' | 'loading' | 'added';
2645
2794
 
2646
2795
  export declare interface PluginCardEmits {
@@ -2706,7 +2855,7 @@ export declare interface PopupConfig {
2706
2855
  };
2707
2856
  }
2708
2857
 
2709
- declare const Prompt: typeof _default_35 & {
2858
+ declare const Prompt: typeof _default_28 & {
2710
2859
  install: typeof installPrompt;
2711
2860
  };
2712
2861
  export { Prompt }
@@ -2743,7 +2892,7 @@ export declare interface PromptProps {
2743
2892
  size?: 'small' | 'medium' | 'large';
2744
2893
  }
2745
2894
 
2746
- declare const Prompts: typeof _default_36 & {
2895
+ declare const Prompts: typeof _default_29 & {
2747
2896
  install: typeof installPrompts;
2748
2897
  };
2749
2898
  export { Prompts }
@@ -2794,712 +2943,49 @@ export declare interface RejectionReason {
2794
2943
  message: string;
2795
2944
  }
2796
2945
 
2797
- /**
2798
- * 选择器选项
2799
- */
2800
- export declare interface SelectOption {
2801
- /**
2802
- * 显示文本
2803
- */
2804
- label: string;
2805
- /**
2806
- * 选择后的值
2807
- */
2808
- value: string;
2809
- /**
2810
- * 自定义数据(可选)
2811
- */
2812
- data?: string;
2946
+ export declare type SenderEmits = {
2947
+ (e: 'update:modelValue', value: string): void;
2948
+ (e: 'update:templateData', value: UserItem[]): void;
2949
+ (e: 'submit', value: string): void;
2950
+ (e: 'clear'): void;
2951
+ (e: 'speech-start'): void;
2952
+ (e: 'speech-end', transcript?: string): void;
2953
+ (e: 'speech-interim', transcript: string): void;
2954
+ (e: 'speech-error', error: Error): void;
2955
+ (e: 'suggestion-select', value: string): void;
2956
+ (e: 'focus', event: FocusEvent): void;
2957
+ (e: 'blur', event: FocusEvent): void;
2958
+ (e: 'escape-press'): void;
2959
+ (e: 'cancel'): void;
2960
+ (e: 'reset-template'): void;
2961
+ (e: 'files-selected', files: File[]): void;
2962
+ };
2963
+
2964
+ export declare interface SenderProps {
2965
+ autofocus?: boolean;
2966
+ autoSize?: AutoSize;
2967
+ allowSpeech?: boolean;
2968
+ allowFiles?: boolean;
2969
+ clearable?: boolean;
2970
+ disabled?: boolean;
2971
+ defaultValue?: string | null;
2972
+ loading?: boolean;
2973
+ modelValue?: string;
2974
+ mode?: InputMode;
2975
+ maxLength?: number;
2976
+ buttonGroup?: ButtonGroupConfig;
2977
+ submitType?: SubmitTrigger;
2978
+ speech?: boolean | SpeechConfig;
2979
+ placeholder?: string;
2980
+ showWordLimit?: boolean;
2981
+ suggestions?: ISuggestionItem[];
2982
+ suggestionPopupWidth?: string | number;
2983
+ activeSuggestionKeys?: string[];
2984
+ theme?: ThemeType;
2985
+ templateData?: UserItem[];
2986
+ stopText?: string;
2813
2987
  }
2814
2988
 
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
- /**
2944
- * Context Key
2945
- *
2946
- * 用于 provide/inject 的 key
2947
- */
2948
- export declare const SENDER_CONTEXT_KEY: unique symbol;
2949
-
2950
- /**
2951
- * Sender Context
2952
- *
2953
- * 通过 provide/inject 在组件树中共享的状态和方法
2954
- * 所有子组件都可以通过 inject 获取
2955
- */
2956
- export declare interface SenderContext {
2957
- /**
2958
- * Tiptap 编辑器实例
2959
- * 注意:Tiptap 的 useEditor 返回 ShallowRef<Editor | undefined>
2960
- */
2961
- editor: Ref<Editor | undefined>;
2962
- /**
2963
- * 编辑器 DOM 引用
2964
- */
2965
- editorRef: Ref<HTMLElement | null>;
2966
- /**
2967
- * 当前输入模式
2968
- */
2969
- mode: Ref<InputMode>;
2970
- /**
2971
- * 是否正在自动切换模式
2972
- * 用于控制切换时的过渡动画
2973
- */
2974
- isAutoSwitching: Ref<boolean>;
2975
- /**
2976
- * 是否加载中
2977
- */
2978
- loading: Ref<boolean>;
2979
- /**
2980
- * 是否禁用
2981
- */
2982
- disabled: Ref<boolean>;
2983
- /**
2984
- * 是否有内容
2985
- */
2986
- hasContent: Ref<boolean>;
2987
- /**
2988
- * 是否可以提交
2989
- *
2990
- * 综合判断:
2991
- * - !disabled
2992
- * - !loading
2993
- * - hasContent
2994
- * - !isOverLimit
2995
- * - !defaultActions.submit?.disabled
2996
- */
2997
- canSubmit: Ref<boolean>;
2998
- /**
2999
- * 是否超出字数限制
3000
- */
3001
- isOverLimit: Ref<boolean>;
3002
- /**
3003
- * 当前字符数
3004
- */
3005
- characterCount: Ref<number>;
3006
- /**
3007
- * 最大字符数限制
3008
- */
3009
- maxLength: Ref<number | undefined>;
3010
- /**
3011
- * 组件的尺寸
3012
- */
3013
- size: Ref<'small' | 'normal'>;
3014
- /**
3015
- * 是否显示字数限制
3016
- */
3017
- showWordLimit: Ref<boolean>;
3018
- /**
3019
- * 是否显示清空按钮
3020
- */
3021
- clearable: Ref<boolean>;
3022
- /**
3023
- * 默认操作按钮配置
3024
- */
3025
- defaultActions: Ref<DefaultActions | undefined>;
3026
- /**
3027
- * 提交触发方式
3028
- */
3029
- submitType: Ref<SubmitTrigger>;
3030
- /**
3031
- * 停止按钮文字
3032
- */
3033
- stopText: Ref<string | undefined>;
3034
- /**
3035
- * 提交内容
3036
- */
3037
- submit: () => void;
3038
- /**
3039
- * 清空内容
3040
- */
3041
- clear: () => void;
3042
- /**
3043
- * 取消操作
3044
- *
3045
- * 在 loading 状态下触发,用于取消正在进行的操作
3046
- */
3047
- cancel: () => void;
3048
- /**
3049
- * 聚焦编辑器
3050
- */
3051
- focus: () => void;
3052
- /**
3053
- * 失焦编辑器
3054
- */
3055
- blur: () => void;
3056
- /**
3057
- * 设置编辑器内容
3058
- *
3059
- * @param content - 内容(HTML 或 JSON)
3060
- */
3061
- setContent: (content: string) => void;
3062
- /**
3063
- * 获取编辑器内容
3064
- *
3065
- * @returns 内容(HTML)
3066
- */
3067
- getContent: () => string;
3068
- }
3069
-
3070
- /**
3071
- * Sender 组件 Emits
3072
- */
3073
- export declare interface SenderEmits {
3074
- /**
3075
- * 更新输入内容
3076
- *
3077
- * @param e - 事件名
3078
- * @param value - 新内容
3079
- */
3080
- (e: 'update:modelValue', value: string): void;
3081
- /**
3082
- * 提交内容(增强版)
3083
- *
3084
- * @param e - 事件名
3085
- * @param textContent - 提交的内容(纯文本,如 "帮我分析 @张三 的周报")
3086
- * @param structuredData - 结构化数据(可选)
3087
- *
3088
- * @example
3089
- * ```typescript
3090
- * function handleSubmit(text: string, data?: StructuredData) {
3091
- * console.log('纯文本:', text)
3092
- *
3093
- * if (data?.template) {
3094
- * // Template 场景
3095
- * console.log('模板数据:', data.template)
3096
- * }
3097
- *
3098
- * if (data?.mentions) {
3099
- * // Mention 场景
3100
- * console.log('提及的人:', data.mentions)
3101
- * }
3102
- * }
3103
- * ```
3104
- */
3105
- (e: 'submit', textContent: string, structuredData?: StructuredData): void;
3106
- /**
3107
- * 聚焦事件
3108
- *
3109
- * @param e - 事件名
3110
- * @param event - 原生事件
3111
- */
3112
- (e: 'focus', event: FocusEvent): void;
3113
- /**
3114
- * 失焦事件
3115
- *
3116
- * @param e - 事件名
3117
- * @param event - 原生事件
3118
- */
3119
- (e: 'blur', event: FocusEvent): void;
3120
- /**
3121
- * 清空事件
3122
- *
3123
- * @param e - 事件名
3124
- */
3125
- (e: 'clear'): void;
3126
- /**
3127
- * 取消事件
3128
- *
3129
- * 在 loading 状态下点击停止按钮时触发
3130
- * 用于取消正在进行的操作(如 AI 响应)
3131
- *
3132
- * @param e - 事件名
3133
- */
3134
- (e: 'cancel'): void;
3135
- /**
3136
- * 输入事件
3137
- *
3138
- * @param e - 事件名
3139
- * @param value - 当前内容
3140
- */
3141
- (e: 'input', value: string): void;
3142
- }
3143
-
3144
- /**
3145
- * Sender 组件 Props
3146
- */
3147
- export declare interface SenderProps {
3148
- /**
3149
- * 输入内容(双向绑定)
3150
- *
3151
- * 支持 v-model
3152
- */
3153
- modelValue?: string;
3154
- /**
3155
- * 默认值
3156
- *
3157
- * 仅在初始化时使用
3158
- */
3159
- defaultValue?: string;
3160
- /**
3161
- * 占位符文本
3162
- *
3163
- * @default '请输入内容...'
3164
- */
3165
- placeholder?: string;
3166
- /**
3167
- * 是否禁用
3168
- *
3169
- * @default false
3170
- */
3171
- disabled?: boolean;
3172
- /**
3173
- * 是否加载中
3174
- *
3175
- * 加载状态下显示停止按钮
3176
- *
3177
- * @default false
3178
- */
3179
- loading?: boolean;
3180
- /**
3181
- * 是否自动聚焦
3182
- *
3183
- * @default false
3184
- */
3185
- autofocus?: boolean;
3186
- /**
3187
- * 输入模式
3188
- *
3189
- * - single: 单行模式
3190
- * - multiple: 多行模式
3191
- *
3192
- * @default 'single'
3193
- */
3194
- mode?: InputMode;
3195
- /**
3196
- * 自动调整高度
3197
- *
3198
- * - false: 不自动调整
3199
- * - true: 自动调整(默认 1-3 行)
3200
- * - { minRows, maxRows }: 自定义行数范围
3201
- *
3202
- * 仅在 mode === 'multiple' 时有效
3203
- *
3204
- * @default { minRows: 1, maxRows: 3 }
3205
- */
3206
- autoSize?: AutoSize;
3207
- /**
3208
- * 最大字符数
3209
- *
3210
- * @default Infinity
3211
- */
3212
- maxLength?: number;
3213
- /**
3214
- * 是否显示字数限制
3215
- *
3216
- * 仅在 maxLength 有值时有效
3217
- *
3218
- * @default false
3219
- */
3220
- showWordLimit?: boolean;
3221
- /**
3222
- * 是否显示清空按钮
3223
- *
3224
- * @default false
3225
- */
3226
- clearable?: boolean;
3227
- /**
3228
- * Tiptap 扩展配置
3229
- *
3230
- * 用于添加增强输入能力,如 Template、Mention、Suggestion 等
3231
- *
3232
- * @example 基础使用
3233
- * ```typescript
3234
- * import { Template } from '@tiny-robot/components/sender/extensions'
3235
- *
3236
- * <Sender :extensions="[Template]" />
3237
- * ```
3238
- *
3239
- * @example 带配置的扩展(响应式推荐)
3240
- * ```typescript
3241
- * import { Mention, Suggestion } from '@tiny-robot/components/sender/extensions'
3242
- *
3243
- * const mentions = ref([...])
3244
- * const suggestions = ref([...])
3245
- *
3246
- * const extensions = [
3247
- * Mention.configure({ items: mentions }),
3248
- * Suggestion.configure({ items: suggestions })
3249
- * ]
3250
- *
3251
- * <Sender :extensions="extensions" />
3252
- * ```
3253
- */
3254
- extensions?: Extension[] | any[];
3255
- /**
3256
- * 组件尺寸
3257
- *
3258
- * - normal: 正常尺寸(默认)
3259
- * - small: 紧凑模式,更小的字体、间距和图标
3260
- *
3261
- * @default 'normal'
3262
- */
3263
- size?: 'normal' | 'small';
3264
- /**
3265
- * 停止按钮文字
3266
- *
3267
- * @default '停止响应'
3268
- */
3269
- stopText?: string;
3270
- /**
3271
- * 默认操作按钮配置
3272
- *
3273
- * 用于统一配置默认按钮(Clear、Submit)的状态和提示
3274
- *
3275
- * @example 基础使用
3276
- * ```vue
3277
- * <Sender
3278
- * :actions-config="{
3279
- * submit: { disabled: !isValid, tooltip: '请完善表单' }
3280
- * }"
3281
- * />
3282
- * ```
3283
- *
3284
- * @example 动态配置
3285
- * ```vue
3286
- * <script setup>
3287
- * const defaultActions = computed(() => ({
3288
- * submit: {
3289
- * disabled: !canSubmit.value,
3290
- * tooltip: canSubmit.value ? '发送' : '请输入内容'
3291
- * },
3292
- * clear: { tooltip: '清空输入' }
3293
- * }))
3294
- * </script>
3295
- *
3296
- * <template>
3297
- * <Sender :actions-config="defaultActions" />
3298
- * </template>
3299
- * ```
3300
- *
3301
- * @default undefined
3302
- */
3303
- defaultActions?: DefaultActions;
3304
- /**
3305
- * 提交触发方式
3306
- *
3307
- * @default 'enter'
3308
- */
3309
- submitType?: SubmitTrigger;
3310
- }
3311
-
3312
- declare interface SenderProps_2 {
3313
- autofocus?: boolean;
3314
- autoSize?: AutoSize;
3315
- allowSpeech?: boolean;
3316
- allowFiles?: boolean;
3317
- clearable?: boolean;
3318
- disabled?: boolean;
3319
- defaultValue?: string | null;
3320
- loading?: boolean;
3321
- modelValue?: string;
3322
- mode?: InputMode;
3323
- maxLength?: number;
3324
- buttonGroup?: ButtonGroupConfig;
3325
- submitType?: SubmitTrigger;
3326
- speech?: boolean | SpeechConfig;
3327
- placeholder?: string;
3328
- showWordLimit?: boolean;
3329
- suggestions?: ISuggestionItem[];
3330
- suggestionPopupWidth?: string | number;
3331
- activeSuggestionKeys?: string[];
3332
- theme?: ThemeType;
3333
- templateData?: UserItem[];
3334
- stopText?: string;
3335
- }
3336
-
3337
- /**
3338
- * Sender 组件 Slots
3339
- */
3340
- export declare interface SenderSlots {
3341
- /**
3342
- * 头部插槽
3343
- */
3344
- header?: () => unknown;
3345
- /**
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 - 要追加的内容
3422
- */
3423
- append: (content: string) => void;
3424
- /**
3425
- * 替换编辑器全部内容
3426
- *
3427
- * 适用场景:模板填充、内容重置
3428
- *
3429
- * @param content - 新内容
3430
- */
3431
- replace: (content: string) => void;
3432
- /**
3433
- * 是否禁用
3434
- * 用于控制自定义按钮状态
3435
- */
3436
- disabled: boolean;
3437
- /**
3438
- * 是否加载中
3439
- * 用于控制按钮加载状态和禁用
3440
- */
3441
- loading: boolean;
3442
- /**
3443
- * 是否有内容
3444
- * 用于控制按钮显示/隐藏
3445
- */
3446
- hasContent: boolean;
3447
- }
3448
-
3449
- /**
3450
- * 建议项类型
3451
- *
3452
- * @example
3453
- * ```typescript
3454
- * // 自动匹配
3455
- * { content: 'ECS-云服务器' }
3456
- *
3457
- * // 精确指定高亮
3458
- * {
3459
- * content: 'ECS-云服务器',
3460
- * highlights: ['ECS', '云服务器']
3461
- * }
3462
- *
3463
- * // 自定义高亮函数
3464
- * {
3465
- * content: 'ECS-云服务器',
3466
- * highlights: (text, query) => [
3467
- * { text: 'ECS', isMatch: true },
3468
- * { text: '-云服务器', isMatch: false }
3469
- * ]
3470
- * }
3471
- * ```
3472
- */
3473
- export declare interface SenderSuggestionItem {
3474
- /**
3475
- * 建议项内容(必填)
3476
- */
3477
- content: string;
3478
- /**
3479
- * 显示标签(可选)
3480
- *
3481
- * 默认使用 content
3482
- */
3483
- label?: string;
3484
- /**
3485
- * 高亮方式(可选)
3486
- *
3487
- * - undefined: 自动匹配(默认)
3488
- * - string[]: 精确指定高亮片段
3489
- * - function: 自定义高亮逻辑
3490
- */
3491
- highlights?: string[] | HighlightFunction;
3492
- /**
3493
- * 自定义数据(可选)
3494
- *
3495
- * 用于扩展功能
3496
- */
3497
- data?: Record<string, unknown>;
3498
- }
3499
-
3500
- /**
3501
- * 语音识别相关类型定义
3502
- */
3503
2989
  export declare interface SpeechCallbacks {
3504
2990
  onStart: () => void;
3505
2991
  onInterim: (transcript: string) => void;
@@ -3543,277 +3029,25 @@ export declare interface SpeechState {
3543
3029
  error?: Error;
3544
3030
  }
3545
3031
 
3546
- /**
3547
- * 结构化数据(联合类型)
3548
- *
3549
- * Submit 事件的第二个参数,根据使用的扩展直接返回对应的数据数组
3550
- *
3551
- * **设计理念**:
3552
- * - 第一个参数 `text`:纯文本内容,适用于简单场景
3553
- * - 第二个参数 `data`:结构化数据数组,直接使用无需解包
3554
- *
3555
- * **类型说明**:
3556
- * - `TemplateItem[]`: 使用 Template 扩展时返回(混合结构)
3557
- * - `MentionStructuredItem[]`: 使用 Mention 扩展时返回(混合结构)
3558
- *
3559
- * @example Template 场景
3560
- * ```typescript
3561
- * function handleSubmit(text: string, data?: StructuredData) {
3562
- * // text: "帮我分析 的周报"
3563
- * // data: [
3564
- * // { type: 'text', content: '帮我分析 ' },
3565
- * // { type: 'block', content: '张三' },
3566
- * // { type: 'text', content: ' 的周报' }
3567
- * // ]
3568
- *
3569
- * // 提取模板块(可编辑部分)
3570
- * if (data && data.some(item => item.type === 'block')) {
3571
- * const blocks = data.filter(item => item.type === 'block')
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)
3579
- * }
3580
- * }
3581
- * ```
3582
- *
3583
- * @example Mention 场景
3584
- * ```typescript
3585
- * function handleSubmit(text: string, data?: StructuredData) {
3586
- * // text: "帮我分析 @张三 的周报"
3587
- * // data: [
3588
- * // { type: 'text', content: '帮我分析 ' },
3589
- * // { type: 'mention', content: '张三', value: '...' },
3590
- * // { type: 'text', content: ' 的周报' }
3591
- * // ]
3592
- *
3593
- * // 统一使用 content 属性
3594
- * const allContent = data?.map(item => item.content).join('')
3595
- * console.log('完整内容:', allContent)
3596
- *
3597
- * // 提取 mention(正确的类型守卫)
3598
- * if (data && data.some(item => item.type === 'mention')) {
3599
- * const mentions = data.filter(item => item.type === 'mention')
3600
- * console.log('提及的人:', mentions.map(m => m.content))
3601
- * console.log('关联值:', mentions.map(m => m.value))
3602
- * }
3603
- * }
3604
- * ```
3605
- */
3606
- export declare type StructuredData = TemplateItem[] | MentionStructuredItem[];
3607
-
3608
- /**
3609
- * 提交触发方式
3610
- * - enter: Enter 键提交
3611
- * - ctrlEnter: Ctrl+Enter 提交
3612
- * - shiftEnter: Shift+Enter 提交
3613
- */
3614
3032
  export declare type SubmitTrigger = 'enter' | 'ctrlEnter' | 'shiftEnter';
3615
3033
 
3616
- /**
3617
- * 创建 Suggestion 扩展的便捷函数
3618
- *
3619
- * @param items - 建议项列表
3620
- * @param options - 其他配置项
3621
- *
3622
- * @example
3623
- * ```typescript
3624
- * const extensions = [suggestion(suggestions)]
3625
- * const extensions = [suggestion(suggestions, { popupWidth: 500 })]
3626
- * ```
3627
- */
3628
- declare function suggestion(items: SenderSuggestionItem[] | Ref<SenderSuggestionItem[]>, options?: Partial<Omit<SuggestionOptions, 'items'>>): Extension<SuggestionOptions, any>;
3629
-
3630
3034
  export declare interface SuggestionBaseItem {
3631
3035
  id: string;
3632
3036
  text: string;
3633
3037
  }
3634
3038
 
3635
- export declare type SuggestionData<T = Record<string, unknown>> = (SuggestionItem<T> | SuggestionGroup<T>)[];
3636
-
3637
- export declare interface SuggestionGroup<T = Record<string, unknown>> {
3638
- group: string;
3639
- label: string;
3640
- icon?: VNode | Component;
3641
- items: SuggestionItem<T>[];
3642
- }
3643
-
3644
- export declare type SuggestionItem<T = Record<string, unknown>> = SuggestionBaseItem & T;
3645
-
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
- /**
3699
- * 插件配置选项
3700
- */
3701
- export declare interface SuggestionOptions {
3702
- /**
3703
- * 建议项列表(可选)
3704
- *
3705
- * 不传或传空数组时,建议功能不会显示
3706
- *
3707
- * @default []
3708
- *
3709
- * @example
3710
- * ```typescript
3711
- * const items = ref([
3712
- * { content: 'ECS-云服务器' },
3713
- * { content: 'RDS-数据库' }
3714
- * ])
3715
- * ```
3716
- */
3717
- items?: SenderSuggestionItem[] | Ref<SenderSuggestionItem[]>;
3718
- /**
3719
- * 自定义过滤函数(可选)
3720
- *
3721
- * - 不传:不过滤,直接显示所有项
3722
- * - 传入:使用自定义过滤逻辑
3723
- *
3724
- * @default undefined(不过滤)
3725
- *
3726
- * @example 模糊匹配过滤
3727
- * ```typescript
3728
- * filterFn: (items, query) => {
3729
- * return items.filter(item =>
3730
- * item.content.toLowerCase().includes(query.toLowerCase())
3731
- * )
3732
- * }
3733
- * ```
3734
- *
3735
- * @example 前缀匹配过滤
3736
- * ```typescript
3737
- * filterFn: (items, query) => {
3738
- * return items.filter(item =>
3739
- * item.content.toLowerCase().startsWith(query.toLowerCase())
3740
- * )
3741
- * }
3742
- * ```
3743
- */
3744
- filterFn?: (suggestions: SenderSuggestionItem[], query: string) => SenderSuggestionItem[];
3745
- /**
3746
- * 选中建议项的按键
3747
- *
3748
- * 注意:Tab 键用于自动补全,不受此配置控制
3749
- *
3750
- * @default ['Enter']
3751
- *
3752
- * @example 只允许 Enter 选中
3753
- * ```typescript
3754
- * activeSuggestionKeys: ['Enter']
3755
- * ```
3756
- *
3757
- * @example 允许 Enter 和 Space 选中
3758
- * ```typescript
3759
- * activeSuggestionKeys: ['Enter', ' '] // 注意:空格键是 ' '
3760
- * ```
3761
- *
3762
- * @example 禁用所有选中按键(只能点击)
3763
- * ```typescript
3764
- * activeSuggestionKeys: []
3765
- * ```
3766
- */
3767
- activeSuggestionKeys?: string[];
3768
- /**
3769
- * 弹窗宽度
3770
- *
3771
- * @default 400
3772
- */
3773
- popupWidth?: number | string;
3774
- /**
3775
- * 是否显示自动补全提示
3776
- *
3777
- * @default true
3778
- */
3779
- showAutoComplete?: boolean;
3780
- /**
3781
- * 选中建议项的回调
3782
- *
3783
- * @param item - 选中的建议项(包含完整的 SenderSuggestionItem 信息)
3784
- * @returns 返回 false 可阻止默认回填行为
3785
- *
3786
- * @example 默认行为(自动回填)
3787
- * ```typescript
3788
- * onSelect: (item) => {
3789
- * console.log('Selected:', item)
3790
- * // 不返回 false,内容会自动回填
3791
- * }
3792
- * ```
3793
- *
3794
- * @example 阻止默认行为并自定义回填
3795
- * ```typescript
3796
- * onSelect: (item) => {
3797
- * editor.commands.setContent(`前缀-${item.content}-后缀`)
3798
- * return false // 阻止默认回填
3799
- * }
3800
- * ```
3801
- *
3802
- * @example 条件性阻止
3803
- * ```typescript
3804
- * onSelect: (item) => {
3805
- * if (item.data?.needsValidation) {
3806
- * validateAndFill(item)
3807
- * return false
3808
- * }
3809
- * // 否则使用默认回填
3810
- * }
3811
- * ```
3812
- */
3813
- onSelect?: (item: SenderSuggestionItem) => void | false;
3039
+ export declare type SuggestionData<T = Record<string, unknown>> = (SuggestionItem<T> | SuggestionGroup<T>)[];
3040
+
3041
+ export declare interface SuggestionGroup<T = Record<string, unknown>> {
3042
+ group: string;
3043
+ label: string;
3044
+ icon?: VNode | Component;
3045
+ items: SuggestionItem<T>[];
3814
3046
  }
3815
3047
 
3816
- declare const SuggestionPillButton: typeof _default_38 & {
3048
+ export declare type SuggestionItem<T = Record<string, unknown>> = SuggestionBaseItem & T;
3049
+
3050
+ declare const SuggestionPillButton: typeof _default_31 & {
3817
3051
  install: typeof installPillButton;
3818
3052
  };
3819
3053
  export { SuggestionPillButton }
@@ -3941,184 +3175,19 @@ export declare interface SuggestionPopoverSlots {
3941
3175
  body?: () => VNode | VNode[];
3942
3176
  }
3943
3177
 
3944
- /**
3945
- * 插件状态
3946
- *
3947
- * 管理建议列表的显示、过滤、选中等状态
3948
- */
3949
- export declare interface SuggestionState {
3950
- /**
3951
- * 是否激活(有匹配的建议项)
3952
- */
3953
- active: boolean;
3954
- /**
3955
- * 匹配范围
3956
- *
3957
- * 全局模式:整个文档范围
3958
- * 字符模式:触发字符到光标的范围
3959
- */
3960
- range: {
3961
- from: number;
3962
- to: number;
3963
- } | null;
3964
- /**
3965
- * 查询文本
3966
- *
3967
- * 全局模式:整个输入内容
3968
- * 字符模式:触发字符后的文本
3969
- */
3970
- query: string;
3971
- /**
3972
- * 过滤后的建议项
3973
- */
3974
- filteredSuggestions: SenderSuggestionItem[];
3975
- /**
3976
- * 当前选中的建议项索引
3977
- *
3978
- * -1 表示未选中
3979
- */
3980
- selectedIndex: number;
3981
- /**
3982
- * 自动补全文本
3983
- *
3984
- * 选中项的剩余部分
3985
- */
3986
- autoCompleteText: string;
3987
- /**
3988
- * 是否显示 Tab 提示
3989
- */
3990
- showTabIndicator: boolean;
3991
- }
3992
-
3993
- /**
3994
- * Suggestion 插件类型定义
3995
- *
3996
- * 包含建议项、高亮、插件配置和状态等类型定义
3997
- */
3998
- /**
3999
- * 高亮文本片段
4000
- */
4001
3178
  export declare interface SuggestionTextPart {
4002
3179
  text: string;
4003
3180
  isMatch: boolean;
4004
3181
  }
4005
3182
 
4006
- declare interface SuggestionTextPart_2 {
4007
- text: string;
4008
- isMatch: boolean;
3183
+ declare interface TemplateItem extends BaseTextItem {
3184
+ type: 'template';
3185
+ prefix: string;
3186
+ suffix: string;
4009
3187
  }
4010
3188
 
4011
- /**
4012
- * 创建 Template 扩展的便捷函数
4013
- *
4014
- * @param items - 模板项列表
4015
- * @param options - 其他配置项
4016
- *
4017
- * @example
4018
- * ```typescript
4019
- * const extensions = [template(templates)]
4020
- * const extensions = [template(templates, { HTMLAttributes: { class: 'custom' } })]
4021
- * ```
4022
- */
4023
- declare function template(items: TemplateItem[] | Ref<TemplateItem[]>, options?: Partial<Omit<TemplateOptions, 'items'>>): Extension<TemplateOptions, any>;
4024
-
4025
- /**
4026
- * 模板项(用户侧)
4027
- *
4028
- * 用户传入的模板数据格式
4029
- * 组件内部会转换为 Tiptap 节点格式
4030
- */
4031
- export declare type TemplateItem = {
4032
- /**
4033
- * 模板 ID,可选
4034
- * 如果不提供,组件会自动生成
4035
- */
4036
- id?: string;
4037
- /**
4038
- * 类型:普通文本
4039
- */
3189
+ declare interface TextItem extends BaseTextItem {
4040
3190
  type: 'text';
4041
- /**
4042
- * 内容
4043
- */
4044
- content: string;
4045
- } | {
4046
- /**
4047
- * 模板 ID,可选
4048
- * 如果不提供,组件会自动生成
4049
- */
4050
- id?: string;
4051
- /**
4052
- * 类型:模板块(可编辑)
4053
- */
4054
- type: 'block';
4055
- /**
4056
- * 内容
4057
- */
4058
- content: string;
4059
- } | {
4060
- /**
4061
- * 模板 ID,可选
4062
- * 如果不提供,组件会自动生成
4063
- */
4064
- id?: string;
4065
- /**
4066
- * 类型:选择器
4067
- */
4068
- type: 'select';
4069
- /**
4070
- * 内容(选中的值)
4071
- */
4072
- content: string;
4073
- /**
4074
- * 占位文字(未选择时显示)
4075
- */
4076
- placeholder?: string;
4077
- /**
4078
- * 选项列表
4079
- */
4080
- options?: SelectOption[];
4081
- /**
4082
- * 当前选中的值
4083
- */
4084
- value?: string;
4085
- };
4086
-
4087
- /**
4088
- * Template 配置选项
4089
- */
4090
- declare interface TemplateOptions {
4091
- /**
4092
- * 模板数据列表(推荐使用 ref 实现响应式)
4093
- *
4094
- * 支持两种配置方式:
4095
- * 1. 传入 ref(推荐):自动双向绑定,解决时序问题
4096
- * 2. 传入数组:仅用于静态初始化
4097
- *
4098
- * @example 响应式配置(推荐)
4099
- * ```typescript
4100
- * const items = ref<TemplateItem[]>([
4101
- * { type: 'text', content: '帮我分析' },
4102
- * { type: 'template', content: '' }
4103
- * ])
4104
- * Template.configure({ items }) // 传入 ref,自动双向绑定
4105
- * ```
4106
- *
4107
- * @example 静态配置
4108
- * ```typescript
4109
- * Template.configure({
4110
- * items: [
4111
- * { type: 'text', content: '帮我分析' },
4112
- * { type: 'template', content: '' }
4113
- * ]
4114
- * })
4115
- * ```
4116
- */
4117
- items?: TemplateItem[] | Ref<TemplateItem[]>;
4118
- /**
4119
- * HTML 属性
4120
- */
4121
- HTMLAttributes?: Record<string, unknown>;
4122
3191
  }
4123
3192
 
4124
3193
  export declare interface ThemeProviderProps {
@@ -4140,27 +3209,10 @@ export declare interface ThemeProviderProps {
4140
3209
 
4141
3210
  export declare type ThemeStorage = Pick<Storage, 'getItem' | 'setItem'>;
4142
3211
 
4143
- declare type ThemeType = 'light' | 'dark';
4144
-
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
3212
  /**
4159
- * Tooltip 内容类型
4160
- * - string: 简单文本
4161
- * - () => string | VNode: 渲染函数,支持复杂内容
3213
+ * 组件核心类型定义
4162
3214
  */
4163
- export declare type TooltipContent = string | (() => string | VNode);
3215
+ export declare type ThemeType = 'light' | 'dark';
4164
3216
 
4165
3217
  declare interface TooltipContentProps {
4166
3218
  show?: boolean;
@@ -4172,71 +3224,7 @@ declare interface TooltipContentProps {
4172
3224
  delayClose?: number;
4173
3225
  }
4174
3226
 
4175
- /**
4176
- * Tooltip 位置
4177
- *
4178
- * 支持 TinyTooltip 的所有位置选项
4179
- */
4180
- export declare type TooltipPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
4181
-
4182
- declare type TooltipRender = () => VNode | string;
4183
-
4184
- export declare interface UploadButtonEmits {
4185
- /**
4186
- * 文件选择
4187
- */
4188
- (e: 'select', files: File[]): void;
4189
- /**
4190
- * 文件验证失败
4191
- */
4192
- (e: 'error', error: Error, files?: File[]): void;
4193
- }
4194
-
4195
- export declare interface UploadButtonProps {
4196
- /**
4197
- * 是否禁用
4198
- */
4199
- disabled?: boolean;
4200
- /**
4201
- * 接受的文件类型
4202
- * @default '*'
4203
- */
4204
- accept?: string;
4205
- /**
4206
- * 是否支持多选
4207
- * @default false
4208
- */
4209
- multiple?: boolean;
4210
- /**
4211
- * 是否在选择文件后重置 input
4212
- * @default true
4213
- */
4214
- reset?: boolean;
4215
- /**
4216
- * 文件大小限制(MB)
4217
- */
4218
- maxSize?: number;
4219
- /**
4220
- * 最大文件数量
4221
- */
4222
- maxCount?: number;
4223
- /**
4224
- * 按钮提示文本
4225
- */
4226
- tooltip?: TooltipContent;
4227
- /**
4228
- * 按钮尺寸
4229
- */
4230
- size?: number | string;
4231
- /**
4232
- * 自定义图标
4233
- */
4234
- icon?: Component;
4235
- /**
4236
- * Tooltip 位置
4237
- */
4238
- tooltipPlacement?: TooltipPlacement;
4239
- }
3227
+ export declare type TooltipRender = () => VNode | string;
4240
3228
 
4241
3229
  export declare interface UrlAttachment extends BaseAttachment {
4242
3230
  url: string;
@@ -4261,164 +3249,16 @@ export declare function useAutoScroll(target: MaybeComputedElementRef, source: M
4261
3249
  scrollToBottom: (behavior?: ScrollBehavior) => Promise<void>;
4262
3250
  };
4263
3251
 
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
- declare type UserItem = UserTextItem | UserTemplateItem;
3252
+ export declare type UserItem = UserTextItem | UserTemplateItem;
4347
3253
 
4348
- declare type UserTemplateItem = Omit<Pick<CompatTemplateItem, 'type' | 'content'>, 'id'> & {
4349
- id?: CompatTemplateItem['id'];
3254
+ export declare type UserTemplateItem = Omit<Pick<TemplateItem, 'type' | 'content'>, 'id'> & {
3255
+ id?: TemplateItem['id'];
4350
3256
  };
4351
3257
 
4352
- declare type UserTextItem = Omit<CompatTextItem, 'id'> & {
4353
- id?: CompatTextItem['id'];
3258
+ export declare type UserTextItem = Omit<TextItem, 'id'> & {
3259
+ id?: TextItem['id'];
4354
3260
  };
4355
3261
 
4356
- /**
4357
- * 获取 Sender Context
4358
- */
4359
- export declare function useSenderContext(): SenderContext;
4360
-
4361
- /**
4362
- * useSenderContext 返回类型
4363
- */
4364
- export declare type UseSenderContextReturn = SenderContext;
4365
-
4366
- /**
4367
- * useSuggestion 返回类型
4368
- */
4369
- export declare interface UseSuggestionReturn {
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
- }
4421
-
4422
3262
  export declare const useTheme: () => {
4423
3263
  theme: Ref<string, string> | undefined;
4424
3264
  colorMode: Ref<ColorMode, ColorMode> | undefined;
@@ -4444,74 +3284,6 @@ declare interface VoiceButtonConfig {
4444
3284
  icon?: VNode | Component;
4445
3285
  }
4446
3286
 
4447
- /**
4448
- * VoiceButton 组件 Emits
4449
- */
4450
- export declare interface VoiceButtonEmits {
4451
- (e: 'speech-start'): void;
4452
- (e: 'speech-interim', transcript: string): void;
4453
- (e: 'speech-final', transcript: string): void;
4454
- (e: 'speech-end', transcript?: string): void;
4455
- (e: 'speech-error', error: Error): void;
4456
- }
4457
-
4458
- /**
4459
- * VoiceButton 组件 Props
4460
- */
4461
- export declare interface VoiceButtonProps {
4462
- /**
4463
- * 自定义未录音状态的图标
4464
- *
4465
- * @default IconVoice
4466
- *
4467
- * @example 基础使用
4468
- * ```vue
4469
- * <VoiceButton :icon="IconMicrophone" />
4470
- * ```
4471
- */
4472
- 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
- /**
4485
- * 是否禁用(会与 Context 的 disabled 合并)
4486
- */
4487
- disabled?: boolean;
4488
- /**
4489
- * 按钮尺寸
4490
- */
4491
- size?: 'small' | 'normal';
4492
- /**
4493
- * Tooltip 文本
4494
- */
4495
- tooltip?: TooltipContent;
4496
- /**
4497
- * Tooltip 位置
4498
- */
4499
- tooltipPlacement?: TooltipPlacement;
4500
- /**
4501
- * 语音配置
4502
- */
4503
- speechConfig?: SpeechConfig;
4504
- /**
4505
- * 是否自动插入识别结果到编辑器
4506
- * @default true
4507
- */
4508
- autoInsert?: boolean;
4509
- /**
4510
- * 按钮点击拦截器(用于自定义 UI)
4511
- */
4512
- onButtonClick?: (isRecording: boolean, preventDefault: () => void) => void | Promise<void>;
4513
- }
4514
-
4515
3287
  export declare interface WelcomeProps {
4516
3288
  title: string;
4517
3289
  description: string;
@@ -4523,72 +3295,4 @@ export declare interface WelcomeSlots {
4523
3295
  footer: () => unknown;
4524
3296
  }
4525
3297
 
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
3298
  export { }
4545
-
4546
-
4547
- /**
4548
- * 扩展 Tiptap Commands 接口
4549
- *
4550
- * 使 TypeScript 能够识别自定义命令
4551
- */
4552
- declare module '@tiptap/core' {
4553
- interface Commands<ReturnType> {
4554
- mention: {
4555
- /**
4556
- * 插入 mention 节点
4557
- */
4558
- insertMention: (attrs: Partial<MentionAttrs>) => ReturnType;
4559
- /**
4560
- * 删除 mention 节点
4561
- */
4562
- deleteMention: (id: string) => ReturnType;
4563
- };
4564
- }
4565
- }
4566
-
4567
-
4568
- /**
4569
- * 扩展 Tiptap Commands 接口
4570
- *
4571
- * 使 TypeScript 能够识别自定义命令
4572
- */
4573
- declare module '@tiptap/core' {
4574
- interface Commands<ReturnType> {
4575
- template: {
4576
- /**
4577
- * 设置模板数据(批量)
4578
- */
4579
- setTemplateData: (items: TemplateItem[]) => ReturnType;
4580
- /**
4581
- * 插入模板块
4582
- */
4583
- insertTemplate: (attrs: Partial<TemplateAttrs>) => ReturnType;
4584
- /**
4585
- * 聚焦到第一个模板块
4586
- */
4587
- focusFirstTemplate: () => ReturnType;
4588
- /**
4589
- * 插入选择器
4590
- */
4591
- insertTemplateSelect: (attrs: Partial<TemplateSelectAttrs>) => ReturnType;
4592
- };
4593
- }
4594
- }