@opentiny/tiny-robot 0.3.1-alpha.3 → 0.3.1-alpha.5

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
@@ -15,13 +15,15 @@ import { CSSProperties } from 'vue';
15
15
  import { DebuggerEvent } from 'vue';
16
16
  import { DefineComponent } from 'vue';
17
17
  import { Directive } from 'vue';
18
- import { ExtractPropTypes } from 'vue';
18
+ import { Editor } from '@tiptap/vue-3';
19
+ import { Editor as Editor_2 } from '@tiptap/core';
20
+ import { Extension } from '@tiptap/core';
19
21
  import { GlobalComponents } from 'vue';
20
22
  import { GlobalDirectives } from 'vue';
21
23
  import { nextTick } from 'vue';
24
+ import { Node as Node_2 } from '@tiptap/core';
22
25
  import { OnCleanup } from '@vue/reactivity';
23
26
  import { Options } from 'markdown-it';
24
- import { PropType } from 'vue';
25
27
  import { PublicProps } from 'vue';
26
28
  import { Ref } from 'vue';
27
29
  import { RendererElement } from 'vue';
@@ -29,6 +31,7 @@ import { RendererNode } from 'vue';
29
31
  import { ShallowUnwrapRef } from 'vue';
30
32
  import { Slot } from 'vue';
31
33
  import { TransitionProps } from 'vue';
34
+ import { UseFileDialogOptions } from '@vueuse/core';
32
35
  import { VNode } from 'vue';
33
36
  import { VNodeProps } from 'vue';
34
37
  import { WatchOptions } from 'vue';
@@ -192,55 +195,32 @@ declare const __VLS_component_12: DefineComponent<WelcomeProps, {}, {}, {}, {},
192
195
  align: "left" | "center" | "right" | string;
193
196
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
194
197
 
195
- declare const __VLS_component_13: DefineComponent<__VLS_PublicProps_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
196
- "update:visible": (value: boolean) => any;
197
- } & {
198
- refresh: (tab: "installed" | "market") => any;
199
- "update:visible": (visible: boolean) => any;
200
- "market-category-change": (category: string) => any;
201
- "tab-change": (activeTab: "installed" | "market") => any;
202
- "plugin-toggle": (plugin: PluginInfo, enabled: boolean) => any;
203
- "plugin-delete": (plugin: PluginInfo) => any;
204
- "plugin-add": (plugin: PluginInfo) => any;
205
- "plugin-create": (type: "code" | "form", data: PluginCreationData) => any;
206
- "tool-toggle": (plugin: PluginInfo, toolId: string, enabled: boolean) => any;
207
- "update:activeCount": (count: number) => any;
208
- }, string, PublicProps, Readonly<__VLS_PublicProps_6> & Readonly<{
209
- onRefresh?: ((tab: "installed" | "market") => any) | undefined;
210
- "onUpdate:visible"?: ((value: boolean) => any) | undefined;
211
- "onMarket-category-change"?: ((category: string) => any) | undefined;
212
- "onTab-change"?: ((activeTab: "installed" | "market") => any) | undefined;
213
- "onPlugin-toggle"?: ((plugin: PluginInfo, enabled: boolean) => any) | undefined;
214
- "onPlugin-delete"?: ((plugin: PluginInfo) => any) | undefined;
215
- "onPlugin-add"?: ((plugin: PluginInfo) => any) | undefined;
216
- "onPlugin-create"?: ((type: "code" | "form", data: PluginCreationData) => any) | undefined;
217
- "onTool-toggle"?: ((plugin: PluginInfo, toolId: string, enabled: boolean) => any) | undefined;
218
- "onUpdate:activeCount"?: ((count: number) => any) | undefined;
198
+ declare const __VLS_component_13: DefineComponent<ActionButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ActionButtonProps> & Readonly<{}>, {
199
+ size: string | number;
200
+ disabled: boolean;
201
+ active: boolean;
202
+ tooltipPlacement: TooltipPlacement;
203
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
204
+
205
+ declare const __VLS_component_14: DefineComponent<VoiceButtonProps, {
206
+ start: () => void;
207
+ stop: () => void;
208
+ speechState: SpeechState;
209
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
210
+ "speech-start": () => any;
211
+ "speech-interim": (transcript: string) => any;
212
+ "speech-final": (transcript: string) => any;
213
+ "speech-end": (transcript?: string | undefined) => any;
214
+ "speech-error": (error: Error) => any;
215
+ }, string, PublicProps, Readonly<VoiceButtonProps> & Readonly<{
216
+ "onSpeech-start"?: (() => any) | undefined;
217
+ "onSpeech-interim"?: ((transcript: string) => any) | undefined;
218
+ "onSpeech-final"?: ((transcript: string) => any) | undefined;
219
+ "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
220
+ "onSpeech-error"?: ((error: Error) => any) | undefined;
219
221
  }>, {
220
- title: string;
221
- loading: boolean;
222
- installedPlugins: PluginInfo[];
223
- marketPlugins: PluginInfo[];
224
- searchPlaceholder: string;
225
- enableSearch: boolean;
226
- installedSearchFn: (query: string, item: PluginInfo) => boolean;
227
- marketSearchFn: (query: string, item: PluginInfo) => boolean;
228
- marketCategoryOptions: MarketCategoryOption[];
229
- marketCategoryPlaceholder: string;
230
- enableMarketCategoryFilter: boolean;
231
- defaultActiveTab: "installed" | "market";
232
- showInstalledTab: boolean;
233
- showMarketTab: boolean;
234
- popupConfig: PopupConfig;
235
- installedTabTitle: string;
236
- marketTabTitle: string;
237
- showCustomAddButton: boolean;
238
- customAddButtonText: string;
239
- allowPluginToggle: boolean;
240
- allowToolToggle: boolean;
241
- allowPluginDelete: boolean;
242
- allowPluginAdd: boolean;
243
- marketLoading: boolean;
222
+ tooltipPlacement: TooltipPlacement;
223
+ autoInsert: boolean;
244
224
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
245
225
 
246
226
  declare const __VLS_component_2: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
@@ -376,581 +356,278 @@ declare const __VLS_component_6: DefineComponent<PromptsProps, {}, {}, {}, {}, C
376
356
  "onItem-click"?: ((ev: MouseEvent, item: PromptProps) => any) | undefined;
377
357
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
378
358
 
379
- declare const __VLS_component_7: DefineComponent<SenderProps, {
359
+ declare const __VLS_component_7: DefineComponent<SenderProps_2, {
380
360
  focus: () => void;
381
361
  blur: () => void;
382
362
  clear: () => void;
383
363
  submit: () => void;
364
+ setTemplateData: (templateData: UserTemplateItem[]) => void;
384
365
  startSpeech: () => void;
385
366
  stopSpeech: () => void;
386
- activateTemplateFirstField: () => void;
387
367
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
388
368
  clear: () => any;
389
369
  blur: (event: FocusEvent) => any;
390
370
  cancel: () => any;
391
371
  focus: (event: FocusEvent) => any;
392
- submit: (value: string, templateData?: UserItem[] | undefined) => any;
372
+ submit: (value: string) => any;
393
373
  "update:modelValue": (value: string) => any;
394
- "update:templateData": (value: UserItem[]) => any;
395
374
  "speech-start": () => any;
396
- "speech-end": (transcript?: string | undefined) => any;
397
375
  "speech-interim": (transcript: string) => any;
376
+ "speech-end": (transcript?: string | undefined) => any;
398
377
  "speech-error": (error: Error) => any;
378
+ "update:templateData": (value: UserItem[]) => any;
399
379
  "suggestion-select": (value: string) => any;
400
380
  "escape-press": () => any;
401
381
  "reset-template": () => any;
402
382
  "files-selected": (files: File[]) => any;
403
- "trigger-char": (char: string, position: {
404
- top: number;
405
- left: number;
406
- }) => any;
407
- }, string, PublicProps, Readonly<SenderProps> & Readonly<{
383
+ }, string, PublicProps, Readonly<SenderProps_2> & Readonly<{
408
384
  onClear?: (() => any) | undefined;
409
385
  onBlur?: ((event: FocusEvent) => any) | undefined;
410
386
  onCancel?: (() => any) | undefined;
411
387
  onFocus?: ((event: FocusEvent) => any) | undefined;
412
- onSubmit?: ((value: string, templateData?: UserItem[] | undefined) => any) | undefined;
388
+ onSubmit?: ((value: string) => any) | undefined;
413
389
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
414
- "onUpdate:templateData"?: ((value: UserItem[]) => any) | undefined;
415
390
  "onSpeech-start"?: (() => any) | undefined;
416
- "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
417
391
  "onSpeech-interim"?: ((transcript: string) => any) | undefined;
392
+ "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
418
393
  "onSpeech-error"?: ((error: Error) => any) | undefined;
394
+ "onUpdate:templateData"?: ((value: UserItem[]) => any) | undefined;
419
395
  "onSuggestion-select"?: ((value: string) => any) | undefined;
420
396
  "onEscape-press"?: (() => any) | undefined;
421
397
  "onReset-template"?: (() => any) | undefined;
422
398
  "onFiles-selected"?: ((files: File[]) => any) | undefined;
423
- "onTrigger-char"?: ((char: string, position: {
424
- top: number;
425
- left: number;
426
- }) => any) | undefined;
427
399
  }>, {
428
- disabled: boolean;
429
- modelValue: string;
400
+ placeholder: string;
401
+ mode: InputMode_2;
402
+ submitType: SubmitTrigger_2;
403
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
404
+ chatInputRef: ({
405
+ $: ComponentInternalInstance;
406
+ $data: {};
407
+ $props: {
408
+ readonly modelValue?: string | undefined;
409
+ readonly defaultValue?: string | undefined;
410
+ readonly placeholder?: string | undefined;
411
+ readonly disabled?: boolean | undefined;
412
+ readonly loading?: boolean | undefined;
413
+ readonly autofocus?: boolean | undefined;
414
+ readonly mode?: InputMode | undefined;
415
+ readonly autoSize?: AutoSize | undefined;
416
+ readonly maxLength?: number | undefined;
417
+ readonly showWordLimit?: boolean | undefined;
418
+ readonly clearable?: boolean | undefined;
419
+ readonly extensions?: Extension[] | any[] | undefined;
420
+ readonly size?: "normal" | "small" | undefined;
421
+ readonly stopText?: string | undefined;
422
+ readonly defaultActions?: DefaultActions | undefined;
423
+ readonly submitType?: SubmitTrigger | undefined;
424
+ readonly onClear?: (() => any) | undefined;
425
+ readonly onInput?: ((value: string) => any) | undefined;
426
+ readonly onBlur?: ((event: FocusEvent) => any) | undefined;
427
+ readonly onCancel?: (() => any) | undefined;
428
+ readonly onFocus?: ((event: FocusEvent) => any) | undefined;
429
+ readonly onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
430
+ readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
431
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
432
+ $attrs: {
433
+ [x: string]: unknown;
434
+ };
435
+ $refs: {
436
+ [x: string]: unknown;
437
+ };
438
+ $slots: Readonly<{
439
+ [name: string]: Slot<any> | undefined;
440
+ }>;
441
+ $root: ComponentPublicInstance | null;
442
+ $parent: ComponentPublicInstance | null;
443
+ $host: Element | null;
444
+ $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);
445
+ $el: HTMLDivElement;
446
+ $options: ComponentOptionsBase<Readonly<SenderProps> & Readonly<{
447
+ onClear?: (() => any) | undefined;
448
+ onInput?: ((value: string) => any) | undefined;
449
+ onBlur?: ((event: FocusEvent) => any) | undefined;
450
+ onCancel?: (() => any) | undefined;
451
+ onFocus?: ((event: FocusEvent) => any) | undefined;
452
+ onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
453
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
454
+ }>, {
455
+ submit: () => void;
456
+ clear: () => void;
457
+ cancel: () => void;
458
+ focus: () => void;
459
+ blur: () => void;
460
+ setContent: (content: string) => void;
461
+ getContent: () => string;
462
+ editor: SenderContext["editor"];
463
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
464
+ clear: () => any;
465
+ input: (value: string) => any;
466
+ blur: (event: FocusEvent) => any;
467
+ cancel: () => any;
468
+ focus: (event: FocusEvent) => any;
469
+ submit: (textContent: string, structuredData?: StructuredData | undefined) => any;
470
+ "update:modelValue": (value: string) => any;
471
+ }, string, {
472
+ size: "normal" | "small";
430
473
  placeholder: string;
431
474
  mode: InputMode;
432
- loading: boolean;
433
- autofocus: boolean;
434
- allowSpeech: boolean;
435
- allowFiles: boolean;
475
+ autoSize: AutoSize;
476
+ extensions: Extension[] | any[];
436
477
  submitType: SubmitTrigger;
437
- stopText: string;
478
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
479
+ beforeCreate?: (() => void) | (() => void)[];
480
+ created?: (() => void) | (() => void)[];
481
+ beforeMount?: (() => void) | (() => void)[];
482
+ mounted?: (() => void) | (() => void)[];
483
+ beforeUpdate?: (() => void) | (() => void)[];
484
+ updated?: (() => void) | (() => void)[];
485
+ activated?: (() => void) | (() => void)[];
486
+ deactivated?: (() => void) | (() => void)[];
487
+ beforeDestroy?: (() => void) | (() => void)[];
488
+ beforeUnmount?: (() => void) | (() => void)[];
489
+ destroyed?: (() => void) | (() => void)[];
490
+ unmounted?: (() => void) | (() => void)[];
491
+ renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
492
+ renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
493
+ errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
494
+ };
495
+ $forceUpdate: () => void;
496
+ $nextTick: nextTick;
497
+ $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;
498
+ } & Readonly<{
499
+ size: "normal" | "small";
500
+ placeholder: string;
501
+ mode: InputMode;
438
502
  autoSize: AutoSize;
439
- suggestions: ISuggestionItem[];
440
- clearable: boolean;
441
- maxLength: number;
442
- showWordLimit: boolean;
443
- suggestionPopupWidth: string | number;
444
- theme: ThemeType;
445
- templateData: UserItem[];
446
- }, {}, {}, {}, string, ComponentProvideOptions, false, {
447
- senderRef: HTMLDivElement;
448
- inputWrapperRef: HTMLDivElement;
449
- templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
450
- modelValue?: UserItem[];
451
- } & {
452
- autoSize: boolean | {
453
- minRows: number;
454
- maxRows: number;
455
- };
456
- }> & Readonly<{
457
- onSubmit?: (() => any) | undefined;
458
- "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
459
- "onTrigger-char"?: ((char: string, position: {
460
- top: number;
461
- left: number;
462
- }) => any) | undefined;
463
- }>, {
464
- clearHistory: () => void;
465
- activateFirstField: () => void;
466
- focusToEnd: () => void;
467
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
468
- "update:modelValue": (value: UserItem[]) => any;
469
- } & {
470
- submit: () => any;
471
- "trigger-char": (char: string, position: {
472
- top: number;
473
- left: number;
474
- }) => any;
475
- }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
476
- editorRef: HTMLDivElement;
477
- }, HTMLDivElement, ComponentProvideOptions, {
478
- P: {};
479
- B: {};
480
- D: {};
481
- C: {};
482
- M: {};
483
- Defaults: {};
484
- }, Readonly<{
485
- modelValue?: UserItem[];
486
- } & {
487
- autoSize: boolean | {
488
- minRows: number;
489
- maxRows: number;
490
- };
491
- }> & Readonly<{
492
- onSubmit?: (() => any) | undefined;
493
- "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
494
- "onTrigger-char"?: ((char: string, position: {
495
- top: number;
496
- left: number;
497
- }) => any) | undefined;
503
+ extensions: Extension[] | any[];
504
+ submitType: SubmitTrigger;
505
+ }> & Omit<Readonly<SenderProps> & Readonly<{
506
+ onClear?: (() => any) | undefined;
507
+ onInput?: ((value: string) => any) | undefined;
508
+ onBlur?: ((event: FocusEvent) => any) | undefined;
509
+ onCancel?: (() => any) | undefined;
510
+ onFocus?: ((event: FocusEvent) => any) | undefined;
511
+ onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
512
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
513
+ }>, "clear" | "blur" | "cancel" | "focus" | "submit" | "editor" | "setContent" | ("size" | "placeholder" | "mode" | "autoSize" | "extensions" | "submitType") | "getContent"> & ShallowUnwrapRef< {
514
+ submit: () => void;
515
+ clear: () => void;
516
+ cancel: () => void;
517
+ focus: () => void;
518
+ blur: () => void;
519
+ setContent: (content: string) => void;
520
+ getContent: () => string;
521
+ editor: SenderContext["editor"];
522
+ }> & {} & ComponentCustomProperties & {} & {
523
+ $slots: {
524
+ header?(_: {}): any;
525
+ header?(_: {}): any;
526
+ prefix?(_: {}): any;
527
+ prefix?(_: {}): any;
528
+ content?(_: {
529
+ editor: Ref<Editor | undefined, Editor | undefined>;
530
+ }): any;
531
+ content?(_: {
532
+ editor: Ref<Editor | undefined, Editor | undefined>;
533
+ }): any;
534
+ 'actions-inline'?(_: {}): any;
535
+ footer?(_: {}): any;
536
+ 'footer-right'?(_: {}): any;
537
+ };
538
+ }) | null;
539
+ voiceRef: ({
540
+ $: ComponentInternalInstance;
541
+ $data: {};
542
+ $props: {
543
+ readonly icon?: (VNode | Component) | undefined;
544
+ readonly disabled?: boolean | undefined;
545
+ readonly size?: "small" | "normal" | undefined;
546
+ readonly tooltip?: TooltipContent | undefined;
547
+ readonly tooltipPlacement?: TooltipPlacement | undefined;
548
+ readonly speechConfig?: SpeechConfig | undefined;
549
+ readonly autoInsert?: boolean | undefined;
550
+ readonly onButtonClick?: ((isRecording: boolean, preventDefault: () => void) => void | Promise<void>) | undefined;
551
+ readonly "onSpeech-start"?: (() => any) | undefined;
552
+ readonly "onSpeech-interim"?: ((transcript: string) => any) | undefined;
553
+ readonly "onSpeech-final"?: ((transcript: string) => any) | undefined;
554
+ readonly "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
555
+ readonly "onSpeech-error"?: ((error: Error) => any) | undefined;
556
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
557
+ $attrs: {
558
+ [x: string]: unknown;
559
+ };
560
+ $refs: {
561
+ [x: string]: unknown;
562
+ };
563
+ $slots: Readonly<{
564
+ [name: string]: Slot<any> | undefined;
565
+ }>;
566
+ $root: ComponentPublicInstance | null;
567
+ $parent: ComponentPublicInstance | null;
568
+ $host: Element | null;
569
+ $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);
570
+ $el: any;
571
+ $options: ComponentOptionsBase<Readonly<VoiceButtonProps> & Readonly<{
572
+ "onSpeech-start"?: (() => any) | undefined;
573
+ "onSpeech-interim"?: ((transcript: string) => any) | undefined;
574
+ "onSpeech-final"?: ((transcript: string) => any) | undefined;
575
+ "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
576
+ "onSpeech-error"?: ((error: Error) => any) | undefined;
498
577
  }>, {
499
- clearHistory: () => void;
500
- activateFirstField: () => void;
501
- focusToEnd: () => void;
502
- }, {}, {}, {}, {}> | null;
503
- inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
504
- _constants: {
505
- type: ObjectConstructor;
506
- default: () => {
507
- INPUT_PC: string;
508
- INPUTGROUP_PC: string;
509
- INPUT_MOBILE: string;
510
- INPUTGROUP_MOBILE: string;
511
- Mode: string;
512
- inputMode(mode: any): string;
513
- inputGroupMode(mode: any): string;
514
- VALIDATE_ICON: {
515
- Validating: string;
516
- Success: string;
517
- Error: string;
518
- };
519
- COMPONENT_NAME: {
520
- FormItem: string;
521
- };
522
- MASKSYMBOL: string;
523
- TEXTAREA_HEIGHT_MOBILE: number;
524
- };
525
- };
526
- name: StringConstructor;
527
- size: StringConstructor;
528
- form: StringConstructor;
529
- label: StringConstructor;
530
- height: NumberConstructor;
531
- resize: StringConstructor;
532
- tabindex: {
533
- type: StringConstructor;
534
- default: string;
535
- };
536
- disabled: BooleanConstructor;
537
- readonly: BooleanConstructor;
538
- hoverExpand: BooleanConstructor;
539
- mask: BooleanConstructor;
540
- suffixIcon: (StringConstructor | ObjectConstructor)[];
541
- prefixIcon: (StringConstructor | ObjectConstructor)[];
542
- modelValue: PropType<string | number | null>;
543
- type: {
544
- type: StringConstructor;
545
- default: string;
546
- };
547
- memorySpace: {
548
- type: NumberConstructor;
549
- default: number;
550
- };
551
- vertical: {
552
- type: BooleanConstructor;
553
- default: boolean;
554
- };
555
- selectMenu: {
556
- type: {
557
- (arrayLength: number): {
558
- id: string;
559
- label: string;
560
- }[];
561
- (...items: {
562
- id: string;
563
- label: string;
564
- }[]): {
565
- id: string;
566
- label: string;
567
- }[];
568
- new (arrayLength: number): {
569
- id: string;
570
- label: string;
571
- }[];
572
- new (...items: {
573
- id: string;
574
- label: string;
575
- }[]): {
576
- id: string;
577
- label: string;
578
- }[];
579
- isArray(arg: any): arg is any[];
580
- readonly prototype: any[];
581
- from<T>(arrayLike: ArrayLike<T>): T[];
582
- from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
583
- from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
584
- from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
585
- of<T_4>(...items: T_4[]): T_4[];
586
- readonly [Symbol.species]: ArrayConstructor;
587
- };
588
- default: () => never[];
589
- };
590
- ellipsis: {
591
- type: BooleanConstructor;
592
- default: boolean;
593
- };
594
- contentStyle: {
595
- type: ObjectConstructor;
596
- default: () => {};
597
- };
598
- isSelect: {
599
- type: BooleanConstructor;
600
- default: boolean;
601
- };
602
- tips: StringConstructor;
603
- counter: {
604
- type: BooleanConstructor;
605
- default: boolean;
606
- };
607
- autosize: {
608
- type: (BooleanConstructor | ObjectConstructor)[];
609
- default: boolean;
610
- };
611
- clearable: {
612
- type: BooleanConstructor;
613
- default: boolean;
614
- };
615
- autocomplete: {
616
- type: StringConstructor;
617
- default: string;
618
- };
619
- showPassword: {
620
- type: BooleanConstructor;
621
- default: boolean;
622
- };
623
- showWordLimit: {
624
- type: BooleanConstructor;
625
- default: boolean;
626
- };
627
- showTitle: {
628
- type: BooleanConstructor;
629
- default: boolean;
630
- };
631
- validateEvent: {
632
- type: BooleanConstructor;
633
- default: boolean;
634
- };
635
- popupMore: {
636
- type: BooleanConstructor;
637
- default: boolean;
638
- };
639
- textareaTitle: {
640
- type: StringConstructor;
641
- default: string;
642
- };
643
- displayOnly: {
644
- type: BooleanConstructor;
645
- default: boolean;
646
- };
647
- displayOnlyContent: {
648
- type: StringConstructor;
649
- default: string;
650
- };
651
- customClass: {
652
- type: StringConstructor;
653
- default: string;
654
- };
655
- frontClearIcon: {
656
- type: BooleanConstructor;
657
- default: boolean;
658
- };
659
- showEmptyValue: {
660
- type: BooleanConstructor;
661
- default: undefined;
662
- };
663
- textAlign: {
664
- type: StringConstructor;
665
- default: string;
666
- };
667
- width: {
668
- type: PropType<string | number | null>;
669
- };
670
- showTooltip: {
671
- type: BooleanConstructor;
672
- default: boolean;
673
- };
674
- inputBoxType: {
675
- type: StringConstructor;
676
- default: string;
677
- validator: (value: string) => boolean;
678
- };
679
- tiny_mode: StringConstructor;
680
- tiny_mode_root: BooleanConstructor;
681
- tiny_template: (ObjectConstructor | FunctionConstructor)[];
682
- tiny_renderless: FunctionConstructor;
683
- tiny_theme: StringConstructor;
684
- tiny_mcp_config: ObjectConstructor;
685
- tiny_chart_theme: ObjectConstructor;
686
- }>>, () => VNode<RendererNode, RendererElement, {
687
- [key: string]: any;
688
- }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
689
- disabled: boolean;
690
- type: string;
691
- ellipsis: boolean;
692
- mask: boolean;
693
- vertical: boolean;
694
- customClass: string;
695
- tiny_mode_root: boolean;
696
- _constants: Record<string, any>;
697
- tabindex: string;
698
- showTitle: boolean;
699
- readonly: boolean;
700
- hoverExpand: boolean;
701
- memorySpace: number;
702
- selectMenu: {
703
- id: string;
704
- label: string;
705
- }[];
706
- contentStyle: Record<string, any>;
707
- isSelect: boolean;
708
- counter: boolean;
709
- autosize: boolean | Record<string, any>;
710
- clearable: boolean;
711
- autocomplete: string;
712
- showPassword: boolean;
713
- showWordLimit: boolean;
714
- validateEvent: boolean;
715
- popupMore: boolean;
716
- textareaTitle: string;
717
- displayOnly: boolean;
718
- displayOnlyContent: string;
719
- frontClearIcon: boolean;
720
- showEmptyValue: boolean;
721
- textAlign: string;
722
- showTooltip: boolean;
723
- inputBoxType: string;
724
- }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
725
- P: {};
726
- B: {};
727
- D: {};
728
- C: {};
729
- M: {};
730
- Defaults: {};
731
- }, Readonly<ExtractPropTypes< {
732
- _constants: {
733
- type: ObjectConstructor;
734
- default: () => {
735
- INPUT_PC: string;
736
- INPUTGROUP_PC: string;
737
- INPUT_MOBILE: string;
738
- INPUTGROUP_MOBILE: string;
739
- Mode: string;
740
- inputMode(mode: any): string;
741
- inputGroupMode(mode: any): string;
742
- VALIDATE_ICON: {
743
- Validating: string;
744
- Success: string;
745
- Error: string;
746
- };
747
- COMPONENT_NAME: {
748
- FormItem: string;
749
- };
750
- MASKSYMBOL: string;
751
- TEXTAREA_HEIGHT_MOBILE: number;
752
- };
753
- };
754
- name: StringConstructor;
755
- size: StringConstructor;
756
- form: StringConstructor;
757
- label: StringConstructor;
758
- height: NumberConstructor;
759
- resize: StringConstructor;
760
- tabindex: {
761
- type: StringConstructor;
762
- default: string;
763
- };
764
- disabled: BooleanConstructor;
765
- readonly: BooleanConstructor;
766
- hoverExpand: BooleanConstructor;
767
- mask: BooleanConstructor;
768
- suffixIcon: (StringConstructor | ObjectConstructor)[];
769
- prefixIcon: (StringConstructor | ObjectConstructor)[];
770
- modelValue: PropType<string | number | null>;
771
- type: {
772
- type: StringConstructor;
773
- default: string;
774
- };
775
- memorySpace: {
776
- type: NumberConstructor;
777
- default: number;
778
- };
779
- vertical: {
780
- type: BooleanConstructor;
781
- default: boolean;
782
- };
783
- selectMenu: {
784
- type: {
785
- (arrayLength: number): {
786
- id: string;
787
- label: string;
788
- }[];
789
- (...items: {
790
- id: string;
791
- label: string;
792
- }[]): {
793
- id: string;
794
- label: string;
795
- }[];
796
- new (arrayLength: number): {
797
- id: string;
798
- label: string;
799
- }[];
800
- new (...items: {
801
- id: string;
802
- label: string;
803
- }[]): {
804
- id: string;
805
- label: string;
806
- }[];
807
- isArray(arg: any): arg is any[];
808
- readonly prototype: any[];
809
- from<T>(arrayLike: ArrayLike<T>): T[];
810
- from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
811
- from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
812
- from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
813
- of<T_4>(...items: T_4[]): T_4[];
814
- readonly [Symbol.species]: ArrayConstructor;
815
- };
816
- default: () => never[];
817
- };
818
- ellipsis: {
819
- type: BooleanConstructor;
820
- default: boolean;
821
- };
822
- contentStyle: {
823
- type: ObjectConstructor;
824
- default: () => {};
825
- };
826
- isSelect: {
827
- type: BooleanConstructor;
828
- default: boolean;
829
- };
830
- tips: StringConstructor;
831
- counter: {
832
- type: BooleanConstructor;
833
- default: boolean;
834
- };
835
- autosize: {
836
- type: (BooleanConstructor | ObjectConstructor)[];
837
- default: boolean;
838
- };
839
- clearable: {
840
- type: BooleanConstructor;
841
- default: boolean;
842
- };
843
- autocomplete: {
844
- type: StringConstructor;
845
- default: string;
846
- };
847
- showPassword: {
848
- type: BooleanConstructor;
849
- default: boolean;
850
- };
851
- showWordLimit: {
852
- type: BooleanConstructor;
853
- default: boolean;
854
- };
855
- showTitle: {
856
- type: BooleanConstructor;
857
- default: boolean;
858
- };
859
- validateEvent: {
860
- type: BooleanConstructor;
861
- default: boolean;
862
- };
863
- popupMore: {
864
- type: BooleanConstructor;
865
- default: boolean;
866
- };
867
- textareaTitle: {
868
- type: StringConstructor;
869
- default: string;
870
- };
871
- displayOnly: {
872
- type: BooleanConstructor;
873
- default: boolean;
874
- };
875
- displayOnlyContent: {
876
- type: StringConstructor;
877
- default: string;
878
- };
879
- customClass: {
880
- type: StringConstructor;
881
- default: string;
882
- };
883
- frontClearIcon: {
884
- type: BooleanConstructor;
885
- default: boolean;
886
- };
887
- showEmptyValue: {
888
- type: BooleanConstructor;
889
- default: undefined;
890
- };
891
- textAlign: {
892
- type: StringConstructor;
893
- default: string;
894
- };
895
- width: {
896
- type: PropType<string | number | null>;
897
- };
898
- showTooltip: {
899
- type: BooleanConstructor;
900
- default: boolean;
901
- };
902
- inputBoxType: {
903
- type: StringConstructor;
904
- default: string;
905
- validator: (value: string) => boolean;
906
- };
907
- tiny_mode: StringConstructor;
908
- tiny_mode_root: BooleanConstructor;
909
- tiny_template: (ObjectConstructor | FunctionConstructor)[];
910
- tiny_renderless: FunctionConstructor;
911
- tiny_theme: StringConstructor;
912
- tiny_mcp_config: ObjectConstructor;
913
- tiny_chart_theme: ObjectConstructor;
914
- }>>, () => VNode<RendererNode, RendererElement, {
915
- [key: string]: any;
916
- }>, {}, {}, {}, {
917
- disabled: boolean;
918
- type: string;
919
- ellipsis: boolean;
920
- mask: boolean;
921
- vertical: boolean;
922
- customClass: string;
923
- tiny_mode_root: boolean;
924
- _constants: Record<string, any>;
925
- tabindex: string;
926
- showTitle: boolean;
927
- readonly: boolean;
928
- hoverExpand: boolean;
929
- memorySpace: number;
930
- selectMenu: {
931
- id: string;
932
- label: string;
933
- }[];
934
- contentStyle: Record<string, any>;
935
- isSelect: boolean;
936
- counter: boolean;
937
- autosize: boolean | Record<string, any>;
938
- clearable: boolean;
939
- autocomplete: string;
940
- showPassword: boolean;
941
- showWordLimit: boolean;
942
- validateEvent: boolean;
943
- popupMore: boolean;
944
- textareaTitle: string;
945
- displayOnly: boolean;
946
- displayOnlyContent: string;
947
- frontClearIcon: boolean;
948
- showEmptyValue: boolean;
949
- textAlign: string;
950
- showTooltip: boolean;
951
- inputBoxType: string;
952
- }> | null;
953
- buttonsContainerRef: HTMLDivElement;
578
+ start: () => void;
579
+ stop: () => void;
580
+ speechState: SpeechState;
581
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
582
+ "speech-start": () => any;
583
+ "speech-interim": (transcript: string) => any;
584
+ "speech-final": (transcript: string) => any;
585
+ "speech-end": (transcript?: string | undefined) => any;
586
+ "speech-error": (error: Error) => any;
587
+ }, string, {
588
+ tooltipPlacement: TooltipPlacement;
589
+ autoInsert: boolean;
590
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
591
+ beforeCreate?: (() => void) | (() => void)[];
592
+ created?: (() => void) | (() => void)[];
593
+ beforeMount?: (() => void) | (() => void)[];
594
+ mounted?: (() => void) | (() => void)[];
595
+ beforeUpdate?: (() => void) | (() => void)[];
596
+ updated?: (() => void) | (() => void)[];
597
+ activated?: (() => void) | (() => void)[];
598
+ deactivated?: (() => void) | (() => void)[];
599
+ beforeDestroy?: (() => void) | (() => void)[];
600
+ beforeUnmount?: (() => void) | (() => void)[];
601
+ destroyed?: (() => void) | (() => void)[];
602
+ unmounted?: (() => void) | (() => void)[];
603
+ renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
604
+ renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
605
+ errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
606
+ };
607
+ $forceUpdate: () => void;
608
+ $nextTick: nextTick;
609
+ $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;
610
+ } & Readonly<{
611
+ tooltipPlacement: TooltipPlacement;
612
+ autoInsert: boolean;
613
+ }> & Omit<Readonly<VoiceButtonProps> & Readonly<{
614
+ "onSpeech-start"?: (() => any) | undefined;
615
+ "onSpeech-interim"?: ((transcript: string) => any) | undefined;
616
+ "onSpeech-final"?: ((transcript: string) => any) | undefined;
617
+ "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
618
+ "onSpeech-error"?: ((error: Error) => any) | undefined;
619
+ }>, "stop" | "start" | "speechState" | ("tooltipPlacement" | "autoInsert")> & ShallowUnwrapRef< {
620
+ start: () => void;
621
+ stop: () => void;
622
+ speechState: SpeechState;
623
+ }> & {} & ComponentCustomProperties & {} & {
624
+ $slots: {
625
+ 'recording-overlay'?(_: {
626
+ isRecording: boolean;
627
+ stop: () => void;
628
+ }): any;
629
+ };
630
+ }) | null;
954
631
  }, HTMLDivElement>;
955
632
 
956
633
  declare const __VLS_component_8: DefineComponent<SuggestionPillButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SuggestionPillButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
@@ -1166,7 +843,20 @@ declare function __VLS_template_12(): {
1166
843
  declare function __VLS_template_13(): {
1167
844
  attrs: Partial<{}>;
1168
845
  slots: {
1169
- 'header-actions'?(_: {}): any;
846
+ icon?(_: {}): any;
847
+ icon?(_: {}): any;
848
+ };
849
+ refs: {};
850
+ rootEl: any;
851
+ };
852
+
853
+ declare function __VLS_template_14(): {
854
+ attrs: Partial<{}>;
855
+ slots: {
856
+ 'recording-overlay'?(_: {
857
+ isRecording: boolean;
858
+ stop: () => void;
859
+ }): any;
1170
860
  };
1171
861
  refs: {};
1172
862
  rootEl: any;
@@ -1313,521 +1003,242 @@ declare function __VLS_template_7(): {
1313
1003
  slots: {
1314
1004
  header?(_: {}): any;
1315
1005
  prefix?(_: {}): any;
1316
- content?(_: {}): any;
1317
- decorativeContent?(_: {}): any;
1006
+ content?(_: {
1007
+ editor: Ref<Editor | undefined, Editor | undefined>;
1008
+ }): any;
1318
1009
  actions?(_: {}): any;
1319
1010
  'footer-left'?(_: {}): any;
1320
- 'footer-right'?(_: {}): any;
1321
1011
  footer?(_: {}): any;
1012
+ 'footer-right'?(_: {}): any;
1322
1013
  };
1323
1014
  refs: {
1324
- senderRef: HTMLDivElement;
1325
- inputWrapperRef: HTMLDivElement;
1326
- templateEditorRef: CreateComponentPublicInstanceWithMixins<Readonly<{
1327
- modelValue?: UserItem[];
1328
- } & {
1329
- autoSize: boolean | {
1330
- minRows: number;
1331
- maxRows: number;
1332
- };
1333
- }> & Readonly<{
1334
- onSubmit?: (() => any) | undefined;
1335
- "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
1336
- "onTrigger-char"?: ((char: string, position: {
1337
- top: number;
1338
- left: number;
1339
- }) => any) | undefined;
1340
- }>, {
1341
- clearHistory: () => void;
1342
- activateFirstField: () => void;
1343
- focusToEnd: () => void;
1344
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1345
- "update:modelValue": (value: UserItem[]) => any;
1346
- } & {
1347
- submit: () => any;
1348
- "trigger-char": (char: string, position: {
1349
- top: number;
1350
- left: number;
1351
- }) => any;
1352
- }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
1353
- editorRef: HTMLDivElement;
1354
- }, HTMLDivElement, ComponentProvideOptions, {
1355
- P: {};
1356
- B: {};
1357
- D: {};
1358
- C: {};
1359
- M: {};
1360
- Defaults: {};
1361
- }, Readonly<{
1362
- modelValue?: UserItem[];
1363
- } & {
1364
- autoSize: boolean | {
1365
- minRows: number;
1366
- maxRows: number;
1367
- };
1368
- }> & Readonly<{
1369
- onSubmit?: (() => any) | undefined;
1370
- "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
1371
- "onTrigger-char"?: ((char: string, position: {
1372
- top: number;
1373
- left: number;
1374
- }) => any) | undefined;
1375
- }>, {
1376
- clearHistory: () => void;
1377
- activateFirstField: () => void;
1378
- focusToEnd: () => void;
1379
- }, {}, {}, {}, {}> | null;
1380
- inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
1381
- _constants: {
1382
- type: ObjectConstructor;
1383
- default: () => {
1384
- INPUT_PC: string;
1385
- INPUTGROUP_PC: string;
1386
- INPUT_MOBILE: string;
1387
- INPUTGROUP_MOBILE: string;
1388
- Mode: string;
1389
- inputMode(mode: any): string;
1390
- inputGroupMode(mode: any): string;
1391
- VALIDATE_ICON: {
1392
- Validating: string;
1393
- Success: string;
1394
- Error: string;
1395
- };
1396
- COMPONENT_NAME: {
1397
- FormItem: string;
1398
- };
1399
- MASKSYMBOL: string;
1400
- TEXTAREA_HEIGHT_MOBILE: number;
1401
- };
1402
- };
1403
- name: StringConstructor;
1404
- size: StringConstructor;
1405
- form: StringConstructor;
1406
- label: StringConstructor;
1407
- height: NumberConstructor;
1408
- resize: StringConstructor;
1409
- tabindex: {
1410
- type: StringConstructor;
1411
- default: string;
1412
- };
1413
- disabled: BooleanConstructor;
1414
- readonly: BooleanConstructor;
1415
- hoverExpand: BooleanConstructor;
1416
- mask: BooleanConstructor;
1417
- suffixIcon: (StringConstructor | ObjectConstructor)[];
1418
- prefixIcon: (StringConstructor | ObjectConstructor)[];
1419
- modelValue: PropType<string | number | null>;
1420
- type: {
1421
- type: StringConstructor;
1422
- default: string;
1423
- };
1424
- memorySpace: {
1425
- type: NumberConstructor;
1426
- default: number;
1427
- };
1428
- vertical: {
1429
- type: BooleanConstructor;
1430
- default: boolean;
1431
- };
1432
- selectMenu: {
1433
- type: {
1434
- (arrayLength: number): {
1435
- id: string;
1436
- label: string;
1437
- }[];
1438
- (...items: {
1439
- id: string;
1440
- label: string;
1441
- }[]): {
1442
- id: string;
1443
- label: string;
1444
- }[];
1445
- new (arrayLength: number): {
1446
- id: string;
1447
- label: string;
1448
- }[];
1449
- new (...items: {
1450
- id: string;
1451
- label: string;
1452
- }[]): {
1453
- id: string;
1454
- label: string;
1455
- }[];
1456
- isArray(arg: any): arg is any[];
1457
- readonly prototype: any[];
1458
- from<T>(arrayLike: ArrayLike<T>): T[];
1459
- from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
1460
- from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
1461
- from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
1462
- of<T_4>(...items: T_4[]): T_4[];
1463
- readonly [Symbol.species]: ArrayConstructor;
1464
- };
1465
- default: () => never[];
1466
- };
1467
- ellipsis: {
1468
- type: BooleanConstructor;
1469
- default: boolean;
1470
- };
1471
- contentStyle: {
1472
- type: ObjectConstructor;
1473
- default: () => {};
1474
- };
1475
- isSelect: {
1476
- type: BooleanConstructor;
1477
- default: boolean;
1478
- };
1479
- tips: StringConstructor;
1480
- counter: {
1481
- type: BooleanConstructor;
1482
- default: boolean;
1483
- };
1484
- autosize: {
1485
- type: (BooleanConstructor | ObjectConstructor)[];
1486
- default: boolean;
1487
- };
1488
- clearable: {
1489
- type: BooleanConstructor;
1490
- default: boolean;
1491
- };
1492
- autocomplete: {
1493
- type: StringConstructor;
1494
- default: string;
1495
- };
1496
- showPassword: {
1497
- type: BooleanConstructor;
1498
- default: boolean;
1499
- };
1500
- showWordLimit: {
1501
- type: BooleanConstructor;
1502
- default: boolean;
1503
- };
1504
- showTitle: {
1505
- type: BooleanConstructor;
1506
- default: boolean;
1507
- };
1508
- validateEvent: {
1509
- type: BooleanConstructor;
1510
- default: boolean;
1511
- };
1512
- popupMore: {
1513
- type: BooleanConstructor;
1514
- default: boolean;
1515
- };
1516
- textareaTitle: {
1517
- type: StringConstructor;
1518
- default: string;
1519
- };
1520
- displayOnly: {
1521
- type: BooleanConstructor;
1522
- default: boolean;
1523
- };
1524
- displayOnlyContent: {
1525
- type: StringConstructor;
1526
- default: string;
1527
- };
1528
- customClass: {
1529
- type: StringConstructor;
1530
- default: string;
1531
- };
1532
- frontClearIcon: {
1533
- type: BooleanConstructor;
1534
- default: boolean;
1535
- };
1536
- showEmptyValue: {
1537
- type: BooleanConstructor;
1538
- default: undefined;
1539
- };
1540
- textAlign: {
1541
- type: StringConstructor;
1542
- default: string;
1543
- };
1544
- width: {
1545
- type: PropType<string | number | null>;
1546
- };
1547
- showTooltip: {
1548
- type: BooleanConstructor;
1549
- default: boolean;
1550
- };
1551
- inputBoxType: {
1552
- type: StringConstructor;
1553
- default: string;
1554
- validator: (value: string) => boolean;
1555
- };
1556
- tiny_mode: StringConstructor;
1557
- tiny_mode_root: BooleanConstructor;
1558
- tiny_template: (ObjectConstructor | FunctionConstructor)[];
1559
- tiny_renderless: FunctionConstructor;
1560
- tiny_theme: StringConstructor;
1561
- tiny_mcp_config: ObjectConstructor;
1562
- tiny_chart_theme: ObjectConstructor;
1563
- }>>, () => VNode<RendererNode, RendererElement, {
1564
- [key: string]: any;
1565
- }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
1566
- disabled: boolean;
1567
- type: string;
1568
- ellipsis: boolean;
1569
- mask: boolean;
1570
- vertical: boolean;
1571
- customClass: string;
1572
- tiny_mode_root: boolean;
1573
- _constants: Record<string, any>;
1574
- tabindex: string;
1575
- showTitle: boolean;
1576
- readonly: boolean;
1577
- hoverExpand: boolean;
1578
- memorySpace: number;
1579
- selectMenu: {
1580
- id: string;
1581
- label: string;
1582
- }[];
1583
- contentStyle: Record<string, any>;
1584
- isSelect: boolean;
1585
- counter: boolean;
1586
- autosize: boolean | Record<string, any>;
1587
- clearable: boolean;
1588
- autocomplete: string;
1589
- showPassword: boolean;
1590
- showWordLimit: boolean;
1591
- validateEvent: boolean;
1592
- popupMore: boolean;
1593
- textareaTitle: string;
1594
- displayOnly: boolean;
1595
- displayOnlyContent: string;
1596
- frontClearIcon: boolean;
1597
- showEmptyValue: boolean;
1598
- textAlign: string;
1599
- showTooltip: boolean;
1600
- inputBoxType: string;
1601
- }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
1602
- P: {};
1603
- B: {};
1604
- D: {};
1605
- C: {};
1606
- M: {};
1607
- Defaults: {};
1608
- }, Readonly<ExtractPropTypes< {
1609
- _constants: {
1610
- type: ObjectConstructor;
1611
- default: () => {
1612
- INPUT_PC: string;
1613
- INPUTGROUP_PC: string;
1614
- INPUT_MOBILE: string;
1615
- INPUTGROUP_MOBILE: string;
1616
- Mode: string;
1617
- inputMode(mode: any): string;
1618
- inputGroupMode(mode: any): string;
1619
- VALIDATE_ICON: {
1620
- Validating: string;
1621
- Success: string;
1622
- Error: string;
1623
- };
1624
- COMPONENT_NAME: {
1625
- FormItem: string;
1626
- };
1627
- MASKSYMBOL: string;
1628
- TEXTAREA_HEIGHT_MOBILE: number;
1629
- };
1630
- };
1631
- name: StringConstructor;
1632
- size: StringConstructor;
1633
- form: StringConstructor;
1634
- label: StringConstructor;
1635
- height: NumberConstructor;
1636
- resize: StringConstructor;
1637
- tabindex: {
1638
- type: StringConstructor;
1639
- default: string;
1640
- };
1641
- disabled: BooleanConstructor;
1642
- readonly: BooleanConstructor;
1643
- hoverExpand: BooleanConstructor;
1644
- mask: BooleanConstructor;
1645
- suffixIcon: (StringConstructor | ObjectConstructor)[];
1646
- prefixIcon: (StringConstructor | ObjectConstructor)[];
1647
- modelValue: PropType<string | number | null>;
1648
- type: {
1649
- type: StringConstructor;
1650
- default: string;
1651
- };
1652
- memorySpace: {
1653
- type: NumberConstructor;
1654
- default: number;
1655
- };
1656
- vertical: {
1657
- type: BooleanConstructor;
1658
- default: boolean;
1659
- };
1660
- selectMenu: {
1661
- type: {
1662
- (arrayLength: number): {
1663
- id: string;
1664
- label: string;
1665
- }[];
1666
- (...items: {
1667
- id: string;
1668
- label: string;
1669
- }[]): {
1670
- id: string;
1671
- label: string;
1672
- }[];
1673
- new (arrayLength: number): {
1674
- id: string;
1675
- label: string;
1676
- }[];
1677
- new (...items: {
1678
- id: string;
1679
- label: string;
1680
- }[]): {
1681
- id: string;
1682
- label: string;
1683
- }[];
1684
- isArray(arg: any): arg is any[];
1685
- readonly prototype: any[];
1686
- from<T>(arrayLike: ArrayLike<T>): T[];
1687
- from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
1688
- from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
1689
- from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
1690
- of<T_4>(...items: T_4[]): T_4[];
1691
- readonly [Symbol.species]: ArrayConstructor;
1692
- };
1693
- default: () => never[];
1694
- };
1695
- ellipsis: {
1696
- type: BooleanConstructor;
1697
- default: boolean;
1698
- };
1699
- contentStyle: {
1700
- type: ObjectConstructor;
1701
- default: () => {};
1702
- };
1703
- isSelect: {
1704
- type: BooleanConstructor;
1705
- default: boolean;
1706
- };
1707
- tips: StringConstructor;
1708
- counter: {
1709
- type: BooleanConstructor;
1710
- default: boolean;
1711
- };
1712
- autosize: {
1713
- type: (BooleanConstructor | ObjectConstructor)[];
1714
- default: boolean;
1715
- };
1716
- clearable: {
1717
- type: BooleanConstructor;
1718
- default: boolean;
1719
- };
1720
- autocomplete: {
1721
- type: StringConstructor;
1722
- default: string;
1723
- };
1724
- showPassword: {
1725
- type: BooleanConstructor;
1726
- default: boolean;
1727
- };
1728
- showWordLimit: {
1729
- type: BooleanConstructor;
1730
- default: boolean;
1731
- };
1732
- showTitle: {
1733
- type: BooleanConstructor;
1734
- default: boolean;
1735
- };
1736
- validateEvent: {
1737
- type: BooleanConstructor;
1738
- default: boolean;
1739
- };
1740
- popupMore: {
1741
- type: BooleanConstructor;
1742
- default: boolean;
1743
- };
1744
- textareaTitle: {
1745
- type: StringConstructor;
1746
- default: string;
1747
- };
1748
- displayOnly: {
1749
- type: BooleanConstructor;
1750
- default: boolean;
1751
- };
1752
- displayOnlyContent: {
1753
- type: StringConstructor;
1754
- default: string;
1755
- };
1756
- customClass: {
1757
- type: StringConstructor;
1758
- default: string;
1759
- };
1760
- frontClearIcon: {
1761
- type: BooleanConstructor;
1762
- default: boolean;
1763
- };
1764
- showEmptyValue: {
1765
- type: BooleanConstructor;
1766
- default: undefined;
1767
- };
1768
- textAlign: {
1769
- type: StringConstructor;
1770
- default: string;
1771
- };
1772
- width: {
1773
- type: PropType<string | number | null>;
1774
- };
1775
- showTooltip: {
1776
- type: BooleanConstructor;
1777
- default: boolean;
1778
- };
1779
- inputBoxType: {
1780
- type: StringConstructor;
1781
- default: string;
1782
- validator: (value: string) => boolean;
1783
- };
1784
- tiny_mode: StringConstructor;
1785
- tiny_mode_root: BooleanConstructor;
1786
- tiny_template: (ObjectConstructor | FunctionConstructor)[];
1787
- tiny_renderless: FunctionConstructor;
1788
- tiny_theme: StringConstructor;
1789
- tiny_mcp_config: ObjectConstructor;
1790
- tiny_chart_theme: ObjectConstructor;
1791
- }>>, () => VNode<RendererNode, RendererElement, {
1792
- [key: string]: any;
1793
- }>, {}, {}, {}, {
1794
- disabled: boolean;
1795
- type: string;
1796
- ellipsis: boolean;
1797
- mask: boolean;
1798
- vertical: boolean;
1799
- customClass: string;
1800
- tiny_mode_root: boolean;
1801
- _constants: Record<string, any>;
1802
- tabindex: string;
1803
- showTitle: boolean;
1804
- readonly: boolean;
1805
- hoverExpand: boolean;
1806
- memorySpace: number;
1807
- selectMenu: {
1808
- id: string;
1809
- label: string;
1810
- }[];
1811
- contentStyle: Record<string, any>;
1812
- isSelect: boolean;
1813
- counter: boolean;
1814
- autosize: boolean | Record<string, any>;
1815
- clearable: boolean;
1816
- autocomplete: string;
1817
- showPassword: boolean;
1818
- showWordLimit: boolean;
1819
- validateEvent: boolean;
1820
- popupMore: boolean;
1821
- textareaTitle: string;
1822
- displayOnly: boolean;
1823
- displayOnlyContent: string;
1824
- frontClearIcon: boolean;
1825
- showEmptyValue: boolean;
1826
- textAlign: string;
1827
- showTooltip: boolean;
1828
- inputBoxType: string;
1829
- }> | null;
1830
- buttonsContainerRef: HTMLDivElement;
1015
+ chatInputRef: ({
1016
+ $: ComponentInternalInstance;
1017
+ $data: {};
1018
+ $props: {
1019
+ readonly modelValue?: string | undefined;
1020
+ readonly defaultValue?: string | undefined;
1021
+ readonly placeholder?: string | undefined;
1022
+ readonly disabled?: boolean | undefined;
1023
+ readonly loading?: boolean | undefined;
1024
+ readonly autofocus?: boolean | undefined;
1025
+ readonly mode?: InputMode | undefined;
1026
+ readonly autoSize?: AutoSize | undefined;
1027
+ readonly maxLength?: number | undefined;
1028
+ readonly showWordLimit?: boolean | undefined;
1029
+ readonly clearable?: boolean | undefined;
1030
+ readonly extensions?: Extension[] | any[] | undefined;
1031
+ readonly size?: "normal" | "small" | undefined;
1032
+ readonly stopText?: string | undefined;
1033
+ readonly defaultActions?: DefaultActions | undefined;
1034
+ readonly submitType?: SubmitTrigger | undefined;
1035
+ readonly onClear?: (() => any) | undefined;
1036
+ readonly onInput?: ((value: string) => any) | undefined;
1037
+ readonly onBlur?: ((event: FocusEvent) => any) | undefined;
1038
+ readonly onCancel?: (() => any) | undefined;
1039
+ readonly onFocus?: ((event: FocusEvent) => any) | undefined;
1040
+ readonly onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
1041
+ readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
1042
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
1043
+ $attrs: {
1044
+ [x: string]: unknown;
1045
+ };
1046
+ $refs: {
1047
+ [x: string]: unknown;
1048
+ };
1049
+ $slots: Readonly<{
1050
+ [name: string]: Slot<any> | undefined;
1051
+ }>;
1052
+ $root: ComponentPublicInstance | null;
1053
+ $parent: ComponentPublicInstance | null;
1054
+ $host: Element | null;
1055
+ $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);
1056
+ $el: HTMLDivElement;
1057
+ $options: ComponentOptionsBase<Readonly<SenderProps> & Readonly<{
1058
+ onClear?: (() => any) | undefined;
1059
+ onInput?: ((value: string) => any) | undefined;
1060
+ onBlur?: ((event: FocusEvent) => any) | undefined;
1061
+ onCancel?: (() => any) | undefined;
1062
+ onFocus?: ((event: FocusEvent) => any) | undefined;
1063
+ onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
1064
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
1065
+ }>, {
1066
+ submit: () => void;
1067
+ clear: () => void;
1068
+ cancel: () => void;
1069
+ focus: () => void;
1070
+ blur: () => void;
1071
+ setContent: (content: string) => void;
1072
+ getContent: () => string;
1073
+ editor: SenderContext["editor"];
1074
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1075
+ clear: () => any;
1076
+ input: (value: string) => any;
1077
+ blur: (event: FocusEvent) => any;
1078
+ cancel: () => any;
1079
+ focus: (event: FocusEvent) => any;
1080
+ submit: (textContent: string, structuredData?: StructuredData | undefined) => any;
1081
+ "update:modelValue": (value: string) => any;
1082
+ }, string, {
1083
+ size: "normal" | "small";
1084
+ placeholder: string;
1085
+ mode: InputMode;
1086
+ autoSize: AutoSize;
1087
+ extensions: Extension[] | any[];
1088
+ submitType: SubmitTrigger;
1089
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
1090
+ beforeCreate?: (() => void) | (() => void)[];
1091
+ created?: (() => void) | (() => void)[];
1092
+ beforeMount?: (() => void) | (() => void)[];
1093
+ mounted?: (() => void) | (() => void)[];
1094
+ beforeUpdate?: (() => void) | (() => void)[];
1095
+ updated?: (() => void) | (() => void)[];
1096
+ activated?: (() => void) | (() => void)[];
1097
+ deactivated?: (() => void) | (() => void)[];
1098
+ beforeDestroy?: (() => void) | (() => void)[];
1099
+ beforeUnmount?: (() => void) | (() => void)[];
1100
+ destroyed?: (() => void) | (() => void)[];
1101
+ unmounted?: (() => void) | (() => void)[];
1102
+ renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
1103
+ renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
1104
+ errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
1105
+ };
1106
+ $forceUpdate: () => void;
1107
+ $nextTick: nextTick;
1108
+ $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;
1109
+ } & Readonly<{
1110
+ size: "normal" | "small";
1111
+ placeholder: string;
1112
+ mode: InputMode;
1113
+ autoSize: AutoSize;
1114
+ extensions: Extension[] | any[];
1115
+ submitType: SubmitTrigger;
1116
+ }> & Omit<Readonly<SenderProps> & Readonly<{
1117
+ onClear?: (() => any) | undefined;
1118
+ onInput?: ((value: string) => any) | undefined;
1119
+ onBlur?: ((event: FocusEvent) => any) | undefined;
1120
+ onCancel?: (() => any) | undefined;
1121
+ onFocus?: ((event: FocusEvent) => any) | undefined;
1122
+ onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
1123
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
1124
+ }>, "clear" | "blur" | "cancel" | "focus" | "submit" | "editor" | "setContent" | ("size" | "placeholder" | "mode" | "autoSize" | "extensions" | "submitType") | "getContent"> & ShallowUnwrapRef< {
1125
+ submit: () => void;
1126
+ clear: () => void;
1127
+ cancel: () => void;
1128
+ focus: () => void;
1129
+ blur: () => void;
1130
+ setContent: (content: string) => void;
1131
+ getContent: () => string;
1132
+ editor: SenderContext["editor"];
1133
+ }> & {} & ComponentCustomProperties & {} & {
1134
+ $slots: {
1135
+ header?(_: {}): any;
1136
+ header?(_: {}): any;
1137
+ prefix?(_: {}): any;
1138
+ prefix?(_: {}): any;
1139
+ content?(_: {
1140
+ editor: Ref<Editor | undefined, Editor | undefined>;
1141
+ }): any;
1142
+ content?(_: {
1143
+ editor: Ref<Editor | undefined, Editor | undefined>;
1144
+ }): any;
1145
+ 'actions-inline'?(_: {}): any;
1146
+ footer?(_: {}): any;
1147
+ 'footer-right'?(_: {}): any;
1148
+ };
1149
+ }) | null;
1150
+ voiceRef: ({
1151
+ $: ComponentInternalInstance;
1152
+ $data: {};
1153
+ $props: {
1154
+ readonly icon?: (VNode | Component) | undefined;
1155
+ readonly disabled?: boolean | undefined;
1156
+ readonly size?: "small" | "normal" | undefined;
1157
+ readonly tooltip?: TooltipContent | undefined;
1158
+ readonly tooltipPlacement?: TooltipPlacement | undefined;
1159
+ readonly speechConfig?: SpeechConfig | undefined;
1160
+ readonly autoInsert?: boolean | undefined;
1161
+ readonly onButtonClick?: ((isRecording: boolean, preventDefault: () => void) => void | Promise<void>) | undefined;
1162
+ readonly "onSpeech-start"?: (() => any) | undefined;
1163
+ readonly "onSpeech-interim"?: ((transcript: string) => any) | undefined;
1164
+ readonly "onSpeech-final"?: ((transcript: string) => any) | undefined;
1165
+ readonly "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
1166
+ readonly "onSpeech-error"?: ((error: Error) => any) | undefined;
1167
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
1168
+ $attrs: {
1169
+ [x: string]: unknown;
1170
+ };
1171
+ $refs: {
1172
+ [x: string]: unknown;
1173
+ };
1174
+ $slots: Readonly<{
1175
+ [name: string]: Slot<any> | undefined;
1176
+ }>;
1177
+ $root: ComponentPublicInstance | null;
1178
+ $parent: ComponentPublicInstance | null;
1179
+ $host: Element | null;
1180
+ $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);
1181
+ $el: any;
1182
+ $options: ComponentOptionsBase<Readonly<VoiceButtonProps> & Readonly<{
1183
+ "onSpeech-start"?: (() => any) | undefined;
1184
+ "onSpeech-interim"?: ((transcript: string) => any) | undefined;
1185
+ "onSpeech-final"?: ((transcript: string) => any) | undefined;
1186
+ "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
1187
+ "onSpeech-error"?: ((error: Error) => any) | undefined;
1188
+ }>, {
1189
+ start: () => void;
1190
+ stop: () => void;
1191
+ speechState: SpeechState;
1192
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1193
+ "speech-start": () => any;
1194
+ "speech-interim": (transcript: string) => any;
1195
+ "speech-final": (transcript: string) => any;
1196
+ "speech-end": (transcript?: string | undefined) => any;
1197
+ "speech-error": (error: Error) => any;
1198
+ }, string, {
1199
+ tooltipPlacement: TooltipPlacement;
1200
+ autoInsert: boolean;
1201
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
1202
+ beforeCreate?: (() => void) | (() => void)[];
1203
+ created?: (() => void) | (() => void)[];
1204
+ beforeMount?: (() => void) | (() => void)[];
1205
+ mounted?: (() => void) | (() => void)[];
1206
+ beforeUpdate?: (() => void) | (() => void)[];
1207
+ updated?: (() => void) | (() => void)[];
1208
+ activated?: (() => void) | (() => void)[];
1209
+ deactivated?: (() => void) | (() => void)[];
1210
+ beforeDestroy?: (() => void) | (() => void)[];
1211
+ beforeUnmount?: (() => void) | (() => void)[];
1212
+ destroyed?: (() => void) | (() => void)[];
1213
+ unmounted?: (() => void) | (() => void)[];
1214
+ renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
1215
+ renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
1216
+ errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
1217
+ };
1218
+ $forceUpdate: () => void;
1219
+ $nextTick: nextTick;
1220
+ $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;
1221
+ } & Readonly<{
1222
+ tooltipPlacement: TooltipPlacement;
1223
+ autoInsert: boolean;
1224
+ }> & Omit<Readonly<VoiceButtonProps> & Readonly<{
1225
+ "onSpeech-start"?: (() => any) | undefined;
1226
+ "onSpeech-interim"?: ((transcript: string) => any) | undefined;
1227
+ "onSpeech-final"?: ((transcript: string) => any) | undefined;
1228
+ "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
1229
+ "onSpeech-error"?: ((error: Error) => any) | undefined;
1230
+ }>, "stop" | "start" | "speechState" | ("tooltipPlacement" | "autoInsert")> & ShallowUnwrapRef< {
1231
+ start: () => void;
1232
+ stop: () => void;
1233
+ speechState: SpeechState;
1234
+ }> & {} & ComponentCustomProperties & {} & {
1235
+ $slots: {
1236
+ 'recording-overlay'?(_: {
1237
+ isRecording: boolean;
1238
+ stop: () => void;
1239
+ }): any;
1240
+ };
1241
+ }) | null;
1831
1242
  };
1832
1243
  rootEl: HTMLDivElement;
1833
1244
  };
@@ -1862,6 +1273,8 @@ declare type __VLS_TemplateResult_12 = ReturnType<typeof __VLS_template_12>;
1862
1273
 
1863
1274
  declare type __VLS_TemplateResult_13 = ReturnType<typeof __VLS_template_13>;
1864
1275
 
1276
+ declare type __VLS_TemplateResult_14 = ReturnType<typeof __VLS_template_14>;
1277
+
1865
1278
  declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
1866
1279
 
1867
1280
  declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
@@ -1908,6 +1321,12 @@ declare type __VLS_WithTemplateSlots_13<T, S> = T & {
1908
1321
  };
1909
1322
  };
1910
1323
 
1324
+ declare type __VLS_WithTemplateSlots_14<T, S> = T & {
1325
+ new (): {
1326
+ $slots: S;
1327
+ };
1328
+ };
1329
+
1911
1330
  declare type __VLS_WithTemplateSlots_2<T, S> = T & {
1912
1331
  new (): {
1913
1332
  $slots: S;
@@ -1956,28 +1375,42 @@ declare type __VLS_WithTemplateSlots_9<T, S> = T & {
1956
1375
  };
1957
1376
  };
1958
1377
 
1959
- export declare interface ActionButton {
1378
+ declare interface ActionButton_2 {
1960
1379
  type: string;
1961
1380
  label: string;
1962
1381
  handler?: (file: Attachment) => void;
1963
1382
  }
1964
1383
 
1965
- export declare interface ActionButtonsProps {
1966
- loading?: boolean;
1384
+ /**
1385
+ * ActionButton Props
1386
+ *
1387
+ * 基础操作按钮的 Props
1388
+ */
1389
+ export declare interface ActionButtonProps {
1390
+ /**
1391
+ * 按钮图标
1392
+ */
1393
+ icon: VNode | Component;
1394
+ /**
1395
+ * 是否禁用
1396
+ */
1967
1397
  disabled?: boolean;
1968
- showClear?: boolean;
1969
- hasContent?: boolean;
1970
- buttonGroup?: ButtonGroupConfig;
1971
- allowSpeech?: boolean;
1972
- speechStatus?: {
1973
- isRecording: boolean;
1974
- isSupported: boolean;
1975
- };
1976
- allowFiles?: boolean;
1977
- submitType?: SubmitTrigger;
1978
- showShortcuts?: boolean;
1979
- isOverLimit?: boolean;
1980
- stopText?: string;
1398
+ /**
1399
+ * 是否激活状态
1400
+ */
1401
+ active?: boolean;
1402
+ /**
1403
+ * 工具提示
1404
+ */
1405
+ tooltip?: TooltipContent;
1406
+ /**
1407
+ * Tooltip 位置
1408
+ */
1409
+ tooltipPlacement?: TooltipPlacement;
1410
+ /**
1411
+ * 按钮大小
1412
+ */
1413
+ size?: string | number;
1981
1414
  }
1982
1415
 
1983
1416
  export declare type AddType = 'form' | 'code';
@@ -1991,7 +1424,7 @@ export declare interface AttachmentListEmits {
1991
1424
  (e: 'retry', file: Attachment): void;
1992
1425
  (e: 'preview', event: MouseEvent, file: Attachment): void;
1993
1426
  (e: 'action', payload: {
1994
- action: ActionButton;
1427
+ action: ActionButton_2;
1995
1428
  file: Attachment;
1996
1429
  }): void;
1997
1430
  }
@@ -2001,16 +1434,24 @@ export declare interface AttachmentListProps {
2001
1434
  disabled?: boolean;
2002
1435
  wrap?: boolean;
2003
1436
  fileIcons?: Record<string, Component>;
2004
- actions?: ActionButton[];
1437
+ actions?: ActionButton_2[];
2005
1438
  variant?: DisplayVariant;
2006
1439
  fileMatchers?: FileTypeMatcher[];
2007
1440
  }
2008
1441
 
1442
+ /**
1443
+ * 自动高度配置
1444
+ */
2009
1445
  export declare type AutoSize = boolean | {
2010
1446
  minRows: number;
2011
1447
  maxRows: number;
2012
1448
  };
2013
1449
 
1450
+ declare type AutoSize_2 = boolean | {
1451
+ minRows: number;
1452
+ maxRows: number;
1453
+ };
1454
+
2014
1455
  export declare interface BaseAttachment {
2015
1456
  id?: string;
2016
1457
  name?: string;
@@ -2023,12 +1464,7 @@ declare type BaseCardProps = Pick<AttachmentListProps, 'fileIcons' | 'disabled'
2023
1464
 
2024
1465
  export declare type BaseFileType = 'image' | 'pdf' | 'word' | 'excel' | 'ppt' | 'folder' | 'other';
2025
1466
 
2026
- declare interface BaseItem {
2027
- id: string;
2028
- readonly?: boolean;
2029
- }
2030
-
2031
- declare const Bubble: typeof _default_18 & {
1467
+ declare const Bubble: typeof _default_25 & {
2032
1468
  install: typeof bubbleInstall;
2033
1469
  };
2034
1470
  export { Bubble }
@@ -2088,7 +1524,7 @@ export declare type BubbleContentRenderer = BubbleContentFunctionRenderer | Bubb
2088
1524
 
2089
1525
  declare const bubbleInstall: (app: App) => void;
2090
1526
 
2091
- declare const BubbleList: typeof _default_19 & {
1527
+ declare const BubbleList: typeof _default_26 & {
2092
1528
  install: typeof bubbleListInstall;
2093
1529
  };
2094
1530
  export { BubbleList }
@@ -2148,7 +1584,7 @@ export declare interface BubbleProps extends BubbleCommonProps {
2148
1584
  aborted?: boolean;
2149
1585
  }
2150
1586
 
2151
- declare const BubbleProvider: typeof _default_20 & {
1587
+ declare const BubbleProvider: typeof _default_27 & {
2152
1588
  install: typeof bubbleProviderInstall;
2153
1589
  };
2154
1590
  export { BubbleProvider }
@@ -2180,12 +1616,205 @@ export declare interface BubbleSlots {
2180
1616
  }) => unknown;
2181
1617
  }
2182
1618
 
2183
- export declare interface ButtonGroupConfig {
1619
+ declare interface ButtonGroupConfig {
2184
1620
  file?: ControlState & fileUploadConfig;
2185
1621
  submit?: ControlState;
2186
1622
  voice?: VoiceButtonConfig;
2187
1623
  }
2188
1624
 
1625
+ declare const ChatInput: {
1626
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<SenderProps> & Readonly<{
1627
+ onClear?: (() => any) | undefined;
1628
+ onInput?: ((value: string) => any) | undefined;
1629
+ onBlur?: ((event: FocusEvent) => any) | undefined;
1630
+ onCancel?: (() => any) | undefined;
1631
+ onFocus?: ((event: FocusEvent) => any) | undefined;
1632
+ onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
1633
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
1634
+ }>, {
1635
+ submit: () => void;
1636
+ clear: () => void;
1637
+ cancel: () => void;
1638
+ focus: () => void;
1639
+ blur: () => void;
1640
+ setContent: (content: string) => void;
1641
+ getContent: () => string;
1642
+ editor: SenderContext["editor"];
1643
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1644
+ clear: () => any;
1645
+ input: (value: string) => any;
1646
+ blur: (event: FocusEvent) => any;
1647
+ cancel: () => any;
1648
+ focus: (event: FocusEvent) => any;
1649
+ submit: (textContent: string, structuredData?: StructuredData | undefined) => any;
1650
+ "update:modelValue": (value: string) => any;
1651
+ }, PublicProps, {
1652
+ size: "normal" | "small";
1653
+ placeholder: string;
1654
+ mode: InputMode;
1655
+ autoSize: AutoSize;
1656
+ extensions: Extension[] | any[];
1657
+ submitType: SubmitTrigger;
1658
+ }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
1659
+ P: {};
1660
+ B: {};
1661
+ D: {};
1662
+ C: {};
1663
+ M: {};
1664
+ Defaults: {};
1665
+ }, Readonly<SenderProps> & Readonly<{
1666
+ onClear?: (() => any) | undefined;
1667
+ onInput?: ((value: string) => any) | undefined;
1668
+ onBlur?: ((event: FocusEvent) => any) | undefined;
1669
+ onCancel?: (() => any) | undefined;
1670
+ onFocus?: ((event: FocusEvent) => any) | undefined;
1671
+ onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
1672
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
1673
+ }>, {
1674
+ submit: () => void;
1675
+ clear: () => void;
1676
+ cancel: () => void;
1677
+ focus: () => void;
1678
+ blur: () => void;
1679
+ setContent: (content: string) => void;
1680
+ getContent: () => string;
1681
+ editor: SenderContext["editor"];
1682
+ }, {}, {}, {}, {
1683
+ size: "normal" | "small";
1684
+ placeholder: string;
1685
+ mode: InputMode;
1686
+ autoSize: AutoSize;
1687
+ extensions: Extension[] | any[];
1688
+ submitType: SubmitTrigger;
1689
+ }>;
1690
+ __isFragment?: never;
1691
+ __isTeleport?: never;
1692
+ __isSuspense?: never;
1693
+ } & ComponentOptionsBase<Readonly<SenderProps> & Readonly<{
1694
+ onClear?: (() => any) | undefined;
1695
+ onInput?: ((value: string) => any) | undefined;
1696
+ onBlur?: ((event: FocusEvent) => any) | undefined;
1697
+ onCancel?: (() => any) | undefined;
1698
+ onFocus?: ((event: FocusEvent) => any) | undefined;
1699
+ onSubmit?: ((textContent: string, structuredData?: StructuredData | undefined) => any) | undefined;
1700
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
1701
+ }>, {
1702
+ submit: () => void;
1703
+ clear: () => void;
1704
+ cancel: () => void;
1705
+ focus: () => void;
1706
+ blur: () => void;
1707
+ setContent: (content: string) => void;
1708
+ getContent: () => string;
1709
+ editor: SenderContext["editor"];
1710
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1711
+ clear: () => any;
1712
+ input: (value: string) => any;
1713
+ blur: (event: FocusEvent) => any;
1714
+ cancel: () => any;
1715
+ focus: (event: FocusEvent) => any;
1716
+ submit: (textContent: string, structuredData?: StructuredData | undefined) => any;
1717
+ "update:modelValue": (value: string) => any;
1718
+ }, string, {
1719
+ size: "normal" | "small";
1720
+ placeholder: string;
1721
+ mode: InputMode;
1722
+ autoSize: AutoSize;
1723
+ extensions: Extension[] | any[];
1724
+ submitType: SubmitTrigger;
1725
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
1726
+ $slots: {
1727
+ header?(_: {}): any;
1728
+ header?(_: {}): any;
1729
+ prefix?(_: {}): any;
1730
+ prefix?(_: {}): any;
1731
+ content?(_: {
1732
+ editor: Ref<Editor | undefined, Editor | undefined>;
1733
+ }): any;
1734
+ content?(_: {
1735
+ editor: Ref<Editor | undefined, Editor | undefined>;
1736
+ }): any;
1737
+ 'actions-inline'?(_: {}): any;
1738
+ footer?(_: {}): any;
1739
+ 'footer-right'?(_: {}): any;
1740
+ };
1741
+ }) & {
1742
+ install: <T>(app: App<T>) => void;
1743
+ Mention: Node_2<MentionOptions, any>;
1744
+ Suggestion: Extension<SuggestionOptions, any>;
1745
+ Template: Extension<TemplateOptions, any>;
1746
+ mention: typeof mention;
1747
+ suggestion: typeof suggestion;
1748
+ template: typeof template;
1749
+ };
1750
+
1751
+ /**
1752
+ * ChatInput 插槽作用域
1753
+ *
1754
+ * 通过插槽作用域暴露给外部组件的状态和方法
1755
+ * 主要为增强按钮(Upload、Voice 等)提供便捷的操作方法
1756
+ */
1757
+ declare interface ChatInputSlotScope {
1758
+ /**
1759
+ * Tiptap 编辑器实例
1760
+ * 用于高级操作
1761
+ */
1762
+ editor: Editor_2 | undefined;
1763
+ /**
1764
+ * 聚焦编辑器
1765
+ */
1766
+ focus: () => void;
1767
+ /**
1768
+ * 失焦编辑器
1769
+ */
1770
+ blur: () => void;
1771
+ /**
1772
+ * 插入内容到当前光标位置
1773
+ *
1774
+ * 适用场景:语音输入、快捷短语插入
1775
+ *
1776
+ * @param content - 要插入的内容
1777
+ * @example
1778
+ * ```vue
1779
+ * <template #actions-inline="{ insert }">
1780
+ * <VoiceButton @speech-final="insert" />
1781
+ * </template>
1782
+ * ```
1783
+ */
1784
+ insert: (content: string) => void;
1785
+ /**
1786
+ * 追加内容到编辑器末尾
1787
+ *
1788
+ * 适用场景:连续语音输入、批量添加内容
1789
+ *
1790
+ * @param content - 要追加的内容
1791
+ */
1792
+ append: (content: string) => void;
1793
+ /**
1794
+ * 替换编辑器全部内容
1795
+ *
1796
+ * 适用场景:模板填充、内容重置
1797
+ *
1798
+ * @param content - 新内容
1799
+ */
1800
+ replace: (content: string) => void;
1801
+ /**
1802
+ * 是否禁用
1803
+ * 用于控制自定义按钮状态
1804
+ */
1805
+ disabled: boolean;
1806
+ /**
1807
+ * 是否加载中
1808
+ * 用于控制按钮加载状态和禁用
1809
+ */
1810
+ loading: boolean;
1811
+ /**
1812
+ * 是否有内容
1813
+ * 用于控制按钮显示/隐藏
1814
+ */
1815
+ hasContent: boolean;
1816
+ }
1817
+
2189
1818
  export declare type ColorMode = 'light' | 'dark' | 'auto';
2190
1819
 
2191
1820
  export declare interface ContainerEmits {
@@ -2211,7 +1840,7 @@ export declare interface ContainerSlots {
2211
1840
  footer: () => unknown;
2212
1841
  }
2213
1842
 
2214
- export declare interface ControlState {
1843
+ declare interface ControlState {
2215
1844
  tooltips?: string | TooltipRender;
2216
1845
  disabled?: boolean;
2217
1846
  tooltipPlacement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
@@ -2222,56 +1851,103 @@ declare const _default: {
2222
1851
  };
2223
1852
  export default _default;
2224
1853
 
2225
- declare const _default_10: typeof _default_30 & {
1854
+ declare const _default_10: typeof _default_37 & {
2226
1855
  install: typeof install_9;
2227
1856
  };
2228
- export { _default_10 as Sender }
2229
- export { _default_10 as TrSender }
1857
+ export { _default_10 as SenderCompat }
1858
+ export { _default_10 as TrSenderCompat }
2230
1859
 
2231
- declare const _default_11: typeof _default_32 & {
1860
+ declare const _default_11: typeof _default_39 & {
2232
1861
  install: typeof install_10;
2233
1862
  };
2234
1863
  export { _default_11 as SuggestionPills }
2235
1864
  export { _default_11 as TrSuggestionPills }
2236
1865
 
2237
- declare const _default_12: typeof _default_33 & {
1866
+ declare const _default_12: typeof _default_40 & {
2238
1867
  install: typeof install_11;
2239
1868
  };
2240
1869
  export { _default_12 as SuggestionPopover }
2241
1870
  export { _default_12 as TrSuggestionPopover }
2242
1871
 
2243
- declare const _default_13: typeof _default_34 & {
1872
+ declare const _default_13: typeof _default_41 & {
2244
1873
  install: typeof install_12;
2245
1874
  };
2246
1875
  export { _default_13 as ThemeProvider }
2247
1876
  export { _default_13 as TrThemeProvider }
2248
1877
 
2249
- declare const _default_14: typeof _default_35 & {
1878
+ declare const _default_14: typeof _default_42 & {
2250
1879
  install: typeof install_13;
2251
1880
  };
2252
1881
  export { _default_14 as TrWelcome }
2253
1882
  export { _default_14 as Welcome }
2254
1883
 
2255
- declare const _default_15: typeof _default_36 & {
1884
+ declare const _default_15: typeof _default_43 & {
2256
1885
  install: typeof install_14;
2257
1886
  };
2258
1887
  export { _default_15 as McpServerPicker }
2259
1888
  export { _default_15 as TrMcpServerPicker }
2260
1889
 
2261
- declare const _default_16: typeof _default_37 & {
1890
+ declare const _default_16: typeof _default_44 & {
2262
1891
  install: typeof install_15;
2263
1892
  };
2264
1893
  export { _default_16 as McpAddForm }
2265
1894
  export { _default_16 as TrMcpAddForm }
2266
1895
 
2267
- declare const _default_17: DefineComponent<AttachmentListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1896
+ declare const _default_17: __VLS_WithTemplateSlots_13<typeof __VLS_component_13, __VLS_TemplateResult_13["slots"]>;
1897
+ export { _default_17 as ActionButton }
1898
+ export { _default_17 as TrActionButton }
1899
+
1900
+ declare const _default_18: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1901
+ export { _default_18 as SubmitButton }
1902
+ export { _default_18 as TrSubmitButton }
1903
+
1904
+ declare const _default_19: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1905
+ export { _default_19 as ClearButton }
1906
+ export { _default_19 as TrClearButton }
1907
+
1908
+ declare const _default_2: typeof _default_24 & {
1909
+ install: typeof install;
1910
+ };
1911
+ export { _default_2 as Attachments }
1912
+ export { _default_2 as TrAttachments }
1913
+
1914
+ declare const _default_20: DefineComponent<UploadButtonProps, {
1915
+ open: (localOptions?: Partial<UseFileDialogOptions>) => void;
1916
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1917
+ error: (error: Error, file?: File | undefined) => any;
1918
+ select: (files: File[]) => any;
1919
+ }, string, PublicProps, Readonly<UploadButtonProps> & Readonly<{
1920
+ onError?: ((error: Error, file?: File | undefined) => any) | undefined;
1921
+ onSelect?: ((files: File[]) => any) | undefined;
1922
+ }>, {
1923
+ reset: boolean;
1924
+ multiple: boolean;
1925
+ tooltipPlacement: TooltipPlacement;
1926
+ accept: string;
1927
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
1928
+ export { _default_20 as TrUploadButton }
1929
+ export { _default_20 as UploadButton }
1930
+
1931
+ declare const _default_21: __VLS_WithTemplateSlots_14<typeof __VLS_component_14, __VLS_TemplateResult_14["slots"]>;
1932
+ export { _default_21 as TrVoiceButton }
1933
+ export { _default_21 as VoiceButton }
1934
+
1935
+ declare const _default_22: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1936
+ export { _default_22 as TrWordCounter }
1937
+ export { _default_22 as WordCounter }
1938
+
1939
+ declare const _default_23: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
1940
+ export { _default_23 as DefaultActionButtons }
1941
+ export { _default_23 as TrDefaultActionButtons }
1942
+
1943
+ declare const _default_24: DefineComponent<AttachmentListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2268
1944
  "update:items": (items: Attachment[]) => any;
2269
1945
  remove: (file: Attachment) => any;
2270
1946
  download: (event: MouseEvent, file: Attachment) => any;
2271
1947
  retry: (file: Attachment) => any;
2272
1948
  preview: (event: MouseEvent, file: Attachment) => any;
2273
1949
  action: (payload: {
2274
- action: ActionButton;
1950
+ action: ActionButton_2;
2275
1951
  file: Attachment;
2276
1952
  }) => any;
2277
1953
  }, string, PublicProps, Readonly<AttachmentListProps> & Readonly<{
@@ -2281,38 +1957,38 @@ onDownload?: ((event: MouseEvent, file: Attachment) => any) | undefined;
2281
1957
  onRetry?: ((file: Attachment) => any) | undefined;
2282
1958
  onPreview?: ((event: MouseEvent, file: Attachment) => any) | undefined;
2283
1959
  onAction?: ((payload: {
2284
- action: ActionButton;
1960
+ action: ActionButton_2;
2285
1961
  file: Attachment;
2286
1962
  }) => any) | undefined;
2287
1963
  }>, {
2288
- actions: ActionButton[];
1964
+ actions: ActionButton_2[];
2289
1965
  fileMatchers: FileTypeMatcher[];
2290
1966
  variant: DisplayVariant;
2291
1967
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2292
1968
 
2293
- declare const _default_18: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
1969
+ declare const _default_25: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2294
1970
 
2295
- declare const _default_19: DefineComponent<BubbleListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BubbleListProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
1971
+ declare const _default_26: DefineComponent<BubbleListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<BubbleListProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
2296
1972
  scrollContainerRef: HTMLDivElement;
2297
1973
  }, HTMLDivElement>;
2298
1974
 
2299
- declare const _default_2: typeof _default_17 & {
2300
- install: typeof install;
2301
- };
2302
- export { _default_2 as Attachments }
2303
- export { _default_2 as TrAttachments }
1975
+ declare const _default_27: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
2304
1976
 
2305
- declare const _default_20: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
1977
+ declare const _default_28: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
2306
1978
 
2307
- declare const _default_21: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
1979
+ declare const _default_29: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
2308
1980
 
2309
- declare const _default_22: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1981
+ declare const _default_3: typeof _default_28 & {
1982
+ install: typeof install_2;
1983
+ };
1984
+ export { _default_3 as Container }
1985
+ export { _default_3 as TrContainer }
2310
1986
 
2311
- declare const _default_23: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
1987
+ declare const _default_30: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
2312
1988
 
2313
- declare const _default_24: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
1989
+ declare const _default_31: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
2314
1990
 
2315
- declare const _default_25: DefineComponent<FeedbackProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1991
+ declare const _default_32: DefineComponent<FeedbackProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2316
1992
  action: (name: string) => any;
2317
1993
  operation: (name: string) => any;
2318
1994
  }, string, PublicProps, Readonly<FeedbackProps> & Readonly<{
@@ -2324,7 +2000,7 @@ actionsLimit: number;
2324
2000
  sourcesLinesLimit: number;
2325
2001
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2326
2002
 
2327
- 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<{
2003
+ 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<{
2328
2004
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
2329
2005
  readonly "onItem-click"?: ((item: T) => any) | undefined;
2330
2006
  readonly "onItem-title-change"?: ((newTitle: string, item: T) => any) | undefined;
@@ -2338,96 +2014,193 @@ declare const _default_26: <T extends HistoryItem>(__VLS_props: NonNullable<Awai
2338
2014
  __ctx?: Awaited<typeof __VLS_setup>;
2339
2015
  };
2340
2016
 
2341
- declare const _default_27: DefineComponent<IconButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IconButtonProps> & Readonly<{}>, {
2017
+ declare const _default_34: DefineComponent<IconButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IconButtonProps> & Readonly<{}>, {
2342
2018
  size: string | number;
2343
2019
  svgSize: string | number;
2344
2020
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
2345
2021
 
2346
- declare const _default_28: DefineComponent<PromptProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PromptProps> & Readonly<{}>, {
2022
+ declare const _default_35: DefineComponent<PromptProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PromptProps> & Readonly<{}>, {
2347
2023
  size: "small" | "medium" | "large";
2348
2024
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2349
2025
 
2350
- declare const _default_29: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
2351
-
2352
- declare const _default_3: typeof _default_21 & {
2353
- install: typeof install_2;
2354
- };
2355
- export { _default_3 as Container }
2356
- export { _default_3 as TrContainer }
2357
-
2358
- declare const _default_30: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
2359
-
2360
- declare const _default_31: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
2361
-
2362
- declare const _default_32: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
2363
-
2364
- declare const _default_33: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
2026
+ declare const _default_36: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
2365
2027
 
2366
- declare const _default_34: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
2028
+ declare const _default_37: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
2367
2029
 
2368
- declare const _default_35: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
2030
+ declare const _default_38: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
2369
2031
 
2370
- declare const _default_36: __VLS_WithTemplateSlots_13<typeof __VLS_component_13, __VLS_TemplateResult_13["slots"]>;
2371
-
2372
- declare const _default_37: DefineComponent<McpAddFormProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2373
- cancel: () => any;
2374
- confirm: (type: AddType, data: string | McpAddFormData) => any;
2375
- "update:addType": (value: AddType) => any;
2376
- }, string, PublicProps, Readonly<McpAddFormProps> & Readonly<{
2377
- onCancel?: (() => any) | undefined;
2378
- onConfirm?: ((type: AddType, data: string | McpAddFormData) => any) | undefined;
2379
- "onUpdate:addType"?: ((value: AddType) => any) | undefined;
2380
- }>, {
2381
- addType: AddType;
2382
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2032
+ declare const _default_39: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
2383
2033
 
2384
- declare const _default_4: typeof _default_22 & {
2034
+ declare const _default_4: typeof _default_29 & {
2385
2035
  install: typeof install_3;
2386
2036
  };
2387
2037
  export { _default_4 as Conversations }
2388
2038
  export { _default_4 as TrConversations }
2389
2039
 
2390
- declare const _default_5: typeof _default_23 & {
2391
- install: typeof install_4;
2392
- };
2393
- export { _default_5 as DragOverlay }
2394
- export { _default_5 as TrDragOverlay }
2395
-
2396
- declare const _default_6: typeof _default_24 & {
2397
- install: typeof install_5;
2398
- };
2399
- export { _default_6 as DropdownMenu }
2400
- export { _default_6 as TrDropdownMenu }
2401
-
2402
- declare const _default_7: typeof _default_25 & {
2403
- install: typeof install_6;
2404
- };
2405
- export { _default_7 as Feedback }
2406
- export { _default_7 as TrFeedback }
2407
-
2408
- declare const _default_8: typeof _default_26 & {
2409
- install: typeof install_7;
2410
- };
2411
- export { _default_8 as History }
2412
- export { _default_8 as TrHistory }
2413
-
2414
- declare const _default_9: typeof _default_27 & {
2415
- install: typeof install_8;
2416
- };
2417
- export { _default_9 as IconButton }
2418
- export { _default_9 as TrIconButton }
2419
-
2420
- export declare type DisplayVariant = 'picture' | 'card' | 'auto';
2040
+ declare const _default_40: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
2421
2041
 
2422
- declare interface DragAwareElement extends HTMLElement {
2423
- __vDropzoneHandlers__?: Handlers;
2424
- __vDropzoneOptions__?: DragAwareOptions;
2425
- }
2042
+ declare const _default_41: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
2426
2043
 
2427
- declare type DragAwareOptions = Omit<DropzoneBinding, 'onDraggingChange'>;
2044
+ declare const _default_42: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
2428
2045
 
2429
- /**
2430
- * 拖拽上传组件的属性
2046
+ declare const _default_43: DefineComponent<__VLS_PublicProps_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2047
+ "update:visible": (value: boolean) => any;
2048
+ } & {
2049
+ refresh: (tab: "installed" | "market") => any;
2050
+ "update:visible": (visible: boolean) => any;
2051
+ "market-category-change": (category: string) => any;
2052
+ "tab-change": (activeTab: "installed" | "market") => any;
2053
+ "plugin-toggle": (plugin: PluginInfo, enabled: boolean) => any;
2054
+ "plugin-delete": (plugin: PluginInfo) => any;
2055
+ "plugin-add": (plugin: PluginInfo) => any;
2056
+ "plugin-create": (type: "code" | "form", data: PluginCreationData) => any;
2057
+ "tool-toggle": (plugin: PluginInfo, toolId: string, enabled: boolean) => any;
2058
+ "update:activeCount": (count: number) => any;
2059
+ }, string, PublicProps, Readonly<__VLS_PublicProps_6> & Readonly<{
2060
+ onRefresh?: ((tab: "installed" | "market") => any) | undefined;
2061
+ "onUpdate:visible"?: ((value: boolean) => any) | undefined;
2062
+ "onMarket-category-change"?: ((category: string) => any) | undefined;
2063
+ "onTab-change"?: ((activeTab: "installed" | "market") => any) | undefined;
2064
+ "onPlugin-toggle"?: ((plugin: PluginInfo, enabled: boolean) => any) | undefined;
2065
+ "onPlugin-delete"?: ((plugin: PluginInfo) => any) | undefined;
2066
+ "onPlugin-add"?: ((plugin: PluginInfo) => any) | undefined;
2067
+ "onPlugin-create"?: ((type: "code" | "form", data: PluginCreationData) => any) | undefined;
2068
+ "onTool-toggle"?: ((plugin: PluginInfo, toolId: string, enabled: boolean) => any) | undefined;
2069
+ "onUpdate:activeCount"?: ((count: number) => any) | undefined;
2070
+ }>, {
2071
+ title: string;
2072
+ loading: boolean;
2073
+ installedPlugins: PluginInfo[];
2074
+ marketPlugins: PluginInfo[];
2075
+ searchPlaceholder: string;
2076
+ enableSearch: boolean;
2077
+ installedSearchFn: (query: string, item: PluginInfo) => boolean;
2078
+ marketSearchFn: (query: string, item: PluginInfo) => boolean;
2079
+ marketCategoryOptions: MarketCategoryOption[];
2080
+ marketCategoryPlaceholder: string;
2081
+ enableMarketCategoryFilter: boolean;
2082
+ defaultActiveTab: "installed" | "market";
2083
+ showInstalledTab: boolean;
2084
+ showMarketTab: boolean;
2085
+ popupConfig: PopupConfig;
2086
+ installedTabTitle: string;
2087
+ marketTabTitle: string;
2088
+ showCustomAddButton: boolean;
2089
+ customAddButtonText: string;
2090
+ allowPluginToggle: boolean;
2091
+ allowToolToggle: boolean;
2092
+ allowPluginDelete: boolean;
2093
+ allowPluginAdd: boolean;
2094
+ marketLoading: boolean;
2095
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
2096
+
2097
+ declare const _default_44: DefineComponent<McpAddFormProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2098
+ cancel: () => any;
2099
+ confirm: (type: AddType, data: string | McpAddFormData) => any;
2100
+ "update:addType": (value: AddType) => any;
2101
+ }, string, PublicProps, Readonly<McpAddFormProps> & Readonly<{
2102
+ onCancel?: (() => any) | undefined;
2103
+ onConfirm?: ((type: AddType, data: string | McpAddFormData) => any) | undefined;
2104
+ "onUpdate:addType"?: ((value: AddType) => any) | undefined;
2105
+ }>, {
2106
+ addType: AddType;
2107
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2108
+
2109
+ declare const _default_5: typeof _default_30 & {
2110
+ install: typeof install_4;
2111
+ };
2112
+ export { _default_5 as DragOverlay }
2113
+ export { _default_5 as TrDragOverlay }
2114
+
2115
+ declare const _default_6: typeof _default_31 & {
2116
+ install: typeof install_5;
2117
+ };
2118
+ export { _default_6 as DropdownMenu }
2119
+ export { _default_6 as TrDropdownMenu }
2120
+
2121
+ declare const _default_7: typeof _default_32 & {
2122
+ install: typeof install_6;
2123
+ };
2124
+ export { _default_7 as Feedback }
2125
+ export { _default_7 as TrFeedback }
2126
+
2127
+ declare const _default_8: typeof _default_33 & {
2128
+ install: typeof install_7;
2129
+ };
2130
+ export { _default_8 as History }
2131
+ export { _default_8 as TrHistory }
2132
+
2133
+ declare const _default_9: typeof _default_34 & {
2134
+ install: typeof install_8;
2135
+ };
2136
+ export { _default_9 as IconButton }
2137
+ export { _default_9 as TrIconButton }
2138
+
2139
+ /**
2140
+ * 默认操作按钮配置
2141
+ *
2142
+ * 用于统一配置 ChatInput 的默认按钮(Clear、Submit)
2143
+ *
2144
+ * @example
2145
+ * ```typescript
2146
+ * const defaultActions = {
2147
+ * submit: { disabled: !isValid, tooltip: '请完善表单' },
2148
+ * clear: { tooltip: '清空内容' }
2149
+ * }
2150
+ * ```
2151
+ */
2152
+ export declare interface DefaultActions {
2153
+ /**
2154
+ * 提交按钮配置
2155
+ */
2156
+ submit?: {
2157
+ /**
2158
+ * 是否禁用
2159
+ */
2160
+ disabled?: boolean;
2161
+ /**
2162
+ * 工具提示
2163
+ * - string: 简单文本
2164
+ * - () => string | VNode: 渲染函数,支持复杂内容
2165
+ */
2166
+ tooltip?: TooltipContent;
2167
+ /**
2168
+ * Tooltip 位置
2169
+ */
2170
+ tooltipPlacement?: TooltipPlacement;
2171
+ };
2172
+ /**
2173
+ * 清空按钮配置
2174
+ */
2175
+ clear?: {
2176
+ /**
2177
+ * 是否禁用
2178
+ */
2179
+ disabled?: boolean;
2180
+ /**
2181
+ * 工具提示
2182
+ * - string: 简单文本
2183
+ * - () => string | VNode: 渲染函数,支持复杂内容
2184
+ */
2185
+ tooltip?: TooltipContent;
2186
+ /**
2187
+ * Tooltip 位置
2188
+ */
2189
+ tooltipPlacement?: TooltipPlacement;
2190
+ };
2191
+ }
2192
+
2193
+ export declare type DisplayVariant = 'picture' | 'card' | 'auto';
2194
+
2195
+ declare interface DragAwareElement extends HTMLElement {
2196
+ __vDropzoneHandlers__?: Handlers;
2197
+ __vDropzoneOptions__?: DragAwareOptions;
2198
+ }
2199
+
2200
+ declare type DragAwareOptions = Omit<DropzoneBinding, 'onDraggingChange'>;
2201
+
2202
+ /**
2203
+ * 拖拽上传组件的属性
2431
2204
  */
2432
2205
  export declare interface DragOverlayProps {
2433
2206
  /**
@@ -2611,7 +2384,7 @@ export declare interface FileCardEmits {
2611
2384
  (e: 'download', event: MouseEvent, file: Attachment): void;
2612
2385
  (e: 'retry', file: Attachment): void;
2613
2386
  (e: 'action', payload: {
2614
- action: ActionButton;
2387
+ action: ActionButton_2;
2615
2388
  file: Attachment;
2616
2389
  }): void;
2617
2390
  }
@@ -2652,7 +2425,16 @@ export declare interface Handlers {
2652
2425
  handleDrop: (e: DragEvent) => void;
2653
2426
  }
2654
2427
 
2655
- declare type HighlightFunction = (suggestionText: string, inputText: string) => SuggestionTextPart[];
2428
+ /**
2429
+ * 高亮函数类型
2430
+ *
2431
+ * @param suggestionText - 建议项文本
2432
+ * @param inputText - 用户输入文本
2433
+ * @returns 包含文本片段和匹配状态的数组
2434
+ */
2435
+ export declare type HighlightFunction = (suggestionText: string, inputText: string) => SuggestionTextPart[];
2436
+
2437
+ declare type HighlightFunction_2 = (suggestionText: string, inputText: string) => SuggestionTextPart_2[];
2656
2438
 
2657
2439
  export declare type HistoryData<T extends HistoryItem> = T[] | HistoryGroup<T>[];
2658
2440
 
@@ -2699,14 +2481,15 @@ export declare interface IconButtonProps {
2699
2481
  rounded?: boolean;
2700
2482
  }
2701
2483
 
2702
- export declare interface InputHandler {
2703
- inputValue: Ref<string>;
2704
- isComposing: Ref<boolean>;
2705
- clearInput: () => void;
2706
- }
2707
-
2484
+ /**
2485
+ * 输入模式
2486
+ * - single: 单行模式,适用于简短输入
2487
+ * - multiple: 多行模式,适用于长文本输入
2488
+ */
2708
2489
  export declare type InputMode = 'single' | 'multiple';
2709
2490
 
2491
+ declare type InputMode_2 = 'single' | 'multiple';
2492
+
2710
2493
  declare const install: <T>(app: App<T>) => void;
2711
2494
 
2712
2495
  declare const install_10: <T>(app: App<T>) => void;
@@ -2743,14 +2526,9 @@ declare const installPrompt: <T>(app: App<T>) => void;
2743
2526
 
2744
2527
  declare const installPrompts: <T>(app: App<T>) => void;
2745
2528
 
2746
- export declare interface ISuggestionItem {
2529
+ declare interface ISuggestionItem {
2747
2530
  content: string;
2748
- highlights?: string[] | HighlightFunction;
2749
- }
2750
-
2751
- export declare interface KeyboardHandler {
2752
- handleKeyPress: (e: KeyboardEvent) => void;
2753
- triggerSubmit: () => void;
2531
+ highlights?: string[] | HighlightFunction_2;
2754
2532
  }
2755
2533
 
2756
2534
  export declare interface MarketCategoryOption {
@@ -2821,6 +2599,106 @@ export declare interface McpServerPickerProps {
2821
2599
  marketLoading?: boolean;
2822
2600
  }
2823
2601
 
2602
+ /**
2603
+ * 创建 Mention 扩展的便捷函数
2604
+ *
2605
+ * @param items - 提及项列表
2606
+ * @param char - 触发字符,默认 '@'
2607
+ * @param options - 其他配置项
2608
+ *
2609
+ * @example
2610
+ * ```typescript
2611
+ * const extensions = [mention(items)]
2612
+ * const extensions = [mention(items, '#')]
2613
+ * const extensions = [mention(items, '@', { allowSpaces: true })]
2614
+ * ```
2615
+ */
2616
+ declare function mention(items: MentionItem[] | Ref<MentionItem[]>, char?: string, options?: Partial<Omit<MentionOptions, 'items' | 'char'>>): Node_2<MentionOptions, any>;
2617
+
2618
+ /**
2619
+ * Mention 节点属性(内部使用)
2620
+ *
2621
+ * ProseMirror 节点的属性,id 必填(由插件保证)
2622
+ */
2623
+ export declare interface MentionAttrs {
2624
+ /**
2625
+ * 唯一标识(必填)
2626
+ *
2627
+ * 由插件自动生成或使用用户提供的值
2628
+ */
2629
+ id: string;
2630
+ /**
2631
+ * 显示名称
2632
+ */
2633
+ label: string;
2634
+ /**
2635
+ * 预设内容(可选)
2636
+ */
2637
+ preset?: string;
2638
+ }
2639
+
2640
+ /**
2641
+ * 提及项数据结构(用户侧)
2642
+ *
2643
+ * 用户传入的数据格式,id 可选,插件会自动生成
2644
+ */
2645
+ export declare interface MentionItem {
2646
+ /**
2647
+ * 唯一标识(可选)
2648
+ *
2649
+ * 如果不提供,插件会自动生成
2650
+ */
2651
+ id?: string;
2652
+ /**
2653
+ * 显示名称,如 "小小画家"(必传)
2654
+ */
2655
+ label: string;
2656
+ /**
2657
+ * 预设内容(必传)
2658
+ */
2659
+ preset: string;
2660
+ /**
2661
+ * 图标(可选)
2662
+ */
2663
+ icon?: string;
2664
+ }
2665
+
2666
+ /**
2667
+ * Mention 配置选项
2668
+ */
2669
+ export declare interface MentionOptions {
2670
+ /**
2671
+ * 提及项列表
2672
+ */
2673
+ items: MentionItem[] | Ref<MentionItem[]>;
2674
+ /**
2675
+ * 触发字符,默认 '@'
2676
+ */
2677
+ char: string;
2678
+ /**
2679
+ * 是否允许空格,默认 false
2680
+ */
2681
+ allowSpaces?: boolean;
2682
+ /**
2683
+ * HTML 属性
2684
+ */
2685
+ HTMLAttributes?: Record<string, unknown>;
2686
+ }
2687
+
2688
+ /**
2689
+ * 结构化数据项(提交时返回)
2690
+ *
2691
+ * 用于表示文本和 mention 的混合结构
2692
+ */
2693
+ export declare type MentionStructuredItem = {
2694
+ type: 'text';
2695
+ content: string;
2696
+ } | {
2697
+ type: 'mention';
2698
+ content: string;
2699
+ preset: string;
2700
+ };
2701
+
2824
2702
  export declare type PluginAddState = 'idle' | 'loading' | 'added';
2825
2703
 
2826
2704
  export declare interface PluginCardEmits {
@@ -2886,7 +2764,7 @@ export declare interface PopupConfig {
2886
2764
  };
2887
2765
  }
2888
2766
 
2889
- declare const Prompt: typeof _default_28 & {
2767
+ declare const Prompt: typeof _default_35 & {
2890
2768
  install: typeof installPrompt;
2891
2769
  };
2892
2770
  export { Prompt }
@@ -2923,7 +2801,7 @@ export declare interface PromptProps {
2923
2801
  size?: 'small' | 'medium' | 'large';
2924
2802
  }
2925
2803
 
2926
- declare const Prompts: typeof _default_29 & {
2804
+ declare const Prompts: typeof _default_36 & {
2927
2805
  install: typeof installPrompts;
2928
2806
  };
2929
2807
  export { Prompts }
@@ -2974,98 +2852,677 @@ export declare interface RejectionReason {
2974
2852
  message: string;
2975
2853
  }
2976
2854
 
2977
- export declare type SenderEmits = {
2978
- (e: 'update:modelValue', value: string): void;
2979
- (e: 'update:templateData', value: UserItem[]): void;
2980
- (e: 'submit', value: string, templateData?: UserItem[]): void;
2981
- (e: 'clear'): void;
2982
- (e: 'speech-start'): void;
2983
- (e: 'speech-end', transcript?: string): void;
2984
- (e: 'speech-interim', transcript: string): void;
2985
- (e: 'speech-error', error: Error): void;
2986
- (e: 'suggestion-select', value: string): void;
2987
- (e: 'focus', event: FocusEvent): void;
2988
- (e: 'blur', event: FocusEvent): void;
2989
- (e: 'escape-press'): void;
2990
- (e: 'cancel'): void;
2991
- (e: 'reset-template'): void;
2992
- (e: 'files-selected', files: File[]): void;
2993
- (e: 'trigger-char', char: string, position: {
2994
- top: number;
2995
- left: number;
2996
- }): void;
2997
- };
2998
-
2999
- export declare interface SenderProps {
3000
- autofocus?: boolean;
3001
- autoSize?: AutoSize;
3002
- allowSpeech?: boolean;
3003
- allowFiles?: boolean;
3004
- clearable?: boolean;
3005
- disabled?: boolean;
3006
- defaultValue?: string | null;
3007
- loading?: boolean;
3008
- modelValue?: string;
3009
- mode?: InputMode;
3010
- maxLength?: number;
3011
- buttonGroup?: ButtonGroupConfig;
3012
- submitType?: SubmitTrigger;
3013
- speech?: boolean | SpeechConfig;
3014
- placeholder?: string;
3015
- showWordLimit?: boolean;
3016
- suggestions?: ISuggestionItem[];
3017
- suggestionPopupWidth?: string | number;
3018
- activeSuggestionKeys?: string[];
3019
- theme?: ThemeType;
3020
- templateData?: UserItem[];
3021
- stopText?: string;
3022
- }
3023
-
3024
- export declare interface SpeechCallbacks {
3025
- onStart: () => void;
3026
- onInterim: (transcript: string) => void;
3027
- onFinal: (transcript: string) => void;
3028
- onEnd: (transcript?: string) => void;
3029
- onError: (error: Error) => void;
3030
- }
3031
-
3032
- export declare interface SpeechConfig {
3033
- customHandler?: SpeechHandler;
3034
- lang?: string;
3035
- continuous?: boolean;
3036
- interimResults?: boolean;
3037
- autoReplace?: boolean;
3038
- onVoiceButtonClick?: (isRecording: boolean, preventDefault: () => void) => void | Promise<void>;
3039
- }
3040
-
3041
- export declare interface SpeechHandler {
3042
- start: (callbacks: SpeechCallbacks) => Promise<void> | void;
3043
- stop: () => Promise<void> | void;
3044
- isSupported: () => boolean;
2855
+ /**
2856
+ * 选择器选项
2857
+ */
2858
+ export declare interface SelectOption {
2859
+ /**
2860
+ * 显示文本
2861
+ */
2862
+ label: string;
2863
+ /**
2864
+ * 选择后的值
2865
+ */
2866
+ value: string;
2867
+ /**
2868
+ * 自定义数据(可选)
2869
+ */
2870
+ data?: string;
3045
2871
  }
3046
2872
 
3047
- export declare interface SpeechHandlerResult {
3048
- speechState: SpeechState;
3049
- start: () => void;
3050
- stop: () => void;
2873
+ /**
2874
+ * 选择器选项
2875
+ */
2876
+ declare interface SelectOption_2 {
2877
+ /**
2878
+ * 显示文本
2879
+ */
2880
+ label: string;
2881
+ /**
2882
+ * 选择后的值
2883
+ */
2884
+ value: string;
2885
+ /**
2886
+ * 自定义数据(可选)
2887
+ */
2888
+ data?: string;
3051
2889
  }
3052
2890
 
3053
- export declare interface SpeechHookOptions extends SpeechConfig {
3054
- onStart?: () => void;
3055
- onEnd?: (transcript?: string) => void;
3056
- onInterim?: (transcript: string) => void;
3057
- onFinal?: (transcript: string) => void;
3058
- onError?: (error: Error) => void;
3059
- }
2891
+ declare const Sender: typeof ChatInput;
2892
+ export { Sender }
2893
+ export { Sender as TrSender }
3060
2894
 
3061
- export declare interface SpeechState {
2895
+ /**
2896
+ * Chat-Input Context
2897
+ *
2898
+ * 通过 provide/inject 在组件树中共享的状态和方法
2899
+ * 所有子组件都可以通过 inject 获取
2900
+ */
2901
+ export declare interface SenderContext {
2902
+ /**
2903
+ * Tiptap 编辑器实例
2904
+ * 注意:Tiptap 的 useEditor 返回 ShallowRef<Editor | undefined>
2905
+ */
2906
+ editor: Ref<Editor | undefined>;
2907
+ /**
2908
+ * 编辑器 DOM 引用
2909
+ */
2910
+ editorRef: Ref<HTMLElement | null>;
2911
+ /**
2912
+ * 当前输入模式
2913
+ */
2914
+ mode: Ref<InputMode>;
2915
+ /**
2916
+ * 是否正在自动切换模式
2917
+ * 用于控制切换时的过渡动画
2918
+ */
2919
+ isAutoSwitching: Ref<boolean>;
2920
+ /**
2921
+ * 是否加载中
2922
+ */
2923
+ loading: Ref<boolean>;
2924
+ /**
2925
+ * 是否禁用
2926
+ */
2927
+ disabled: Ref<boolean>;
2928
+ /**
2929
+ * 是否有内容
2930
+ */
2931
+ hasContent: Ref<boolean>;
2932
+ /**
2933
+ * 是否可以提交
2934
+ *
2935
+ * 综合判断:
2936
+ * - !disabled
2937
+ * - !loading
2938
+ * - hasContent
2939
+ * - !isOverLimit
2940
+ * - !defaultActions.submit?.disabled
2941
+ */
2942
+ canSubmit: Ref<boolean>;
2943
+ /**
2944
+ * 是否超出字数限制
2945
+ */
2946
+ isOverLimit: Ref<boolean>;
2947
+ /**
2948
+ * 当前字符数
2949
+ */
2950
+ characterCount: Ref<number>;
2951
+ /**
2952
+ * 最大字符数限制
2953
+ */
2954
+ maxLength: Ref<number | undefined>;
2955
+ /**
2956
+ * 组件的尺寸
2957
+ */
2958
+ size: Ref<'small' | 'normal'>;
2959
+ /**
2960
+ * 是否显示字数限制
2961
+ */
2962
+ showWordLimit: Ref<boolean>;
2963
+ /**
2964
+ * 是否显示清空按钮
2965
+ */
2966
+ clearable: Ref<boolean>;
2967
+ /**
2968
+ * 默认操作按钮配置
2969
+ */
2970
+ defaultActions: Ref<DefaultActions | undefined>;
2971
+ /**
2972
+ * 提交触发方式
2973
+ */
2974
+ submitType: Ref<SubmitTrigger>;
2975
+ /**
2976
+ * 停止按钮文字
2977
+ */
2978
+ stopText: Ref<string | undefined>;
2979
+ /**
2980
+ * 提交内容
2981
+ */
2982
+ submit: () => void;
2983
+ /**
2984
+ * 清空内容
2985
+ */
2986
+ clear: () => void;
2987
+ /**
2988
+ * 取消操作
2989
+ *
2990
+ * 在 loading 状态下触发,用于取消正在进行的操作
2991
+ */
2992
+ cancel: () => void;
2993
+ /**
2994
+ * 聚焦编辑器
2995
+ */
2996
+ focus: () => void;
2997
+ /**
2998
+ * 失焦编辑器
2999
+ */
3000
+ blur: () => void;
3001
+ /**
3002
+ * 设置编辑器内容
3003
+ *
3004
+ * @param content - 内容(HTML 或 JSON)
3005
+ */
3006
+ setContent: (content: string) => void;
3007
+ /**
3008
+ * 获取编辑器内容
3009
+ *
3010
+ * @returns 内容(HTML)
3011
+ */
3012
+ getContent: () => string;
3013
+ }
3014
+
3015
+ /**
3016
+ * Chat-Input 组件 Emits
3017
+ */
3018
+ export declare interface SenderEmits {
3019
+ /**
3020
+ * 更新输入内容
3021
+ *
3022
+ * @param e - 事件名
3023
+ * @param value - 新内容
3024
+ */
3025
+ (e: 'update:modelValue', value: string): void;
3026
+ /**
3027
+ * 提交内容(增强版)
3028
+ *
3029
+ * @param e - 事件名
3030
+ * @param textContent - 提交的内容(纯文本,如 "帮我分析 @张三 的周报")
3031
+ * @param structuredData - 结构化数据(可选)
3032
+ *
3033
+ * @example
3034
+ * ```typescript
3035
+ * function handleSubmit(text: string, data?: StructuredData) {
3036
+ * console.log('纯文本:', text)
3037
+ *
3038
+ * if (data?.template) {
3039
+ * // Template 场景
3040
+ * console.log('模板数据:', data.template)
3041
+ * }
3042
+ *
3043
+ * if (data?.mentions) {
3044
+ * // Mention 场景
3045
+ * console.log('提及的人:', data.mentions)
3046
+ * }
3047
+ * }
3048
+ * ```
3049
+ */
3050
+ (e: 'submit', textContent: string, structuredData?: StructuredData): void;
3051
+ /**
3052
+ * 聚焦事件
3053
+ *
3054
+ * @param e - 事件名
3055
+ * @param event - 原生事件
3056
+ */
3057
+ (e: 'focus', event: FocusEvent): void;
3058
+ /**
3059
+ * 失焦事件
3060
+ *
3061
+ * @param e - 事件名
3062
+ * @param event - 原生事件
3063
+ */
3064
+ (e: 'blur', event: FocusEvent): void;
3065
+ /**
3066
+ * 清空事件
3067
+ *
3068
+ * @param e - 事件名
3069
+ */
3070
+ (e: 'clear'): void;
3071
+ /**
3072
+ * 取消事件
3073
+ *
3074
+ * 在 loading 状态下点击停止按钮时触发
3075
+ * 用于取消正在进行的操作(如 AI 响应)
3076
+ *
3077
+ * @param e - 事件名
3078
+ */
3079
+ (e: 'cancel'): void;
3080
+ /**
3081
+ * 输入事件
3082
+ *
3083
+ * @param e - 事件名
3084
+ * @param value - 当前内容
3085
+ */
3086
+ (e: 'input', value: string): void;
3087
+ }
3088
+
3089
+ /**
3090
+ * Chat-Input 组件 Props
3091
+ */
3092
+ export declare interface SenderProps {
3093
+ /**
3094
+ * 输入内容(双向绑定)
3095
+ *
3096
+ * 支持 v-model
3097
+ */
3098
+ modelValue?: string;
3099
+ /**
3100
+ * 默认值
3101
+ *
3102
+ * 仅在初始化时使用
3103
+ */
3104
+ defaultValue?: string;
3105
+ /**
3106
+ * 占位符文本
3107
+ *
3108
+ * @default '请输入内容...'
3109
+ */
3110
+ placeholder?: string;
3111
+ /**
3112
+ * 是否禁用
3113
+ *
3114
+ * @default false
3115
+ */
3116
+ disabled?: boolean;
3117
+ /**
3118
+ * 是否加载中
3119
+ *
3120
+ * 加载状态下显示停止按钮
3121
+ *
3122
+ * @default false
3123
+ */
3124
+ loading?: boolean;
3125
+ /**
3126
+ * 是否自动聚焦
3127
+ *
3128
+ * @default false
3129
+ */
3130
+ autofocus?: boolean;
3131
+ /**
3132
+ * 输入模式
3133
+ *
3134
+ * - single: 单行模式
3135
+ * - multiple: 多行模式
3136
+ *
3137
+ * @default 'single'
3138
+ */
3139
+ mode?: InputMode;
3140
+ /**
3141
+ * 自动调整高度
3142
+ *
3143
+ * - false: 不自动调整
3144
+ * - true: 自动调整(默认 1-3 行)
3145
+ * - { minRows, maxRows }: 自定义行数范围
3146
+ *
3147
+ * 仅在 mode === 'multiple' 时有效
3148
+ *
3149
+ * @default { minRows: 1, maxRows: 3 }
3150
+ */
3151
+ autoSize?: AutoSize;
3152
+ /**
3153
+ * 最大字符数
3154
+ *
3155
+ * @default Infinity
3156
+ */
3157
+ maxLength?: number;
3158
+ /**
3159
+ * 是否显示字数限制
3160
+ *
3161
+ * 仅在 maxLength 有值时有效
3162
+ *
3163
+ * @default false
3164
+ */
3165
+ showWordLimit?: boolean;
3166
+ /**
3167
+ * 是否显示清空按钮
3168
+ *
3169
+ * @default false
3170
+ */
3171
+ clearable?: boolean;
3172
+ /**
3173
+ * Tiptap 扩展配置
3174
+ *
3175
+ * 用于添加增强输入能力,如 Template、Mention、Suggestion 等
3176
+ *
3177
+ * @example 基础使用
3178
+ * ```typescript
3179
+ * import { Template } from '@tiny-robot/components/chat-input/extensions'
3180
+ *
3181
+ * <ChatInput :extensions="[Template]" />
3182
+ * ```
3183
+ *
3184
+ * @example 带配置的扩展(响应式推荐)
3185
+ * ```typescript
3186
+ * import { Mention, Suggestion } from '@tiny-robot/components/chat-input/extensions'
3187
+ *
3188
+ * const mentions = ref([...])
3189
+ * const suggestions = ref([...])
3190
+ *
3191
+ * const extensions = [
3192
+ * Mention.configure({ items: mentions }),
3193
+ * Suggestion.configure({ items: suggestions })
3194
+ * ]
3195
+ *
3196
+ * <ChatInput :extensions="extensions" />
3197
+ * ```
3198
+ */
3199
+ extensions?: Extension[] | any[];
3200
+ /**
3201
+ * 组件尺寸
3202
+ *
3203
+ * - normal: 正常尺寸(默认)
3204
+ * - small: 紧凑模式,更小的字体、间距和图标
3205
+ *
3206
+ * @default 'normal'
3207
+ */
3208
+ size?: 'normal' | 'small';
3209
+ /**
3210
+ * 停止按钮文字
3211
+ *
3212
+ * @default '停止响应'
3213
+ */
3214
+ stopText?: string;
3215
+ /**
3216
+ * 默认操作按钮配置
3217
+ *
3218
+ * 用于统一配置默认按钮(Clear、Submit)的状态和提示
3219
+ *
3220
+ * @example 基础使用
3221
+ * ```vue
3222
+ * <ChatInput
3223
+ * :actions-config="{
3224
+ * submit: { disabled: !isValid, tooltip: '请完善表单' }
3225
+ * }"
3226
+ * />
3227
+ * ```
3228
+ *
3229
+ * @example 动态配置
3230
+ * ```vue
3231
+ * <script setup>
3232
+ * const defaultActions = computed(() => ({
3233
+ * submit: {
3234
+ * disabled: !canSubmit.value,
3235
+ * tooltip: canSubmit.value ? '发送' : '请输入内容'
3236
+ * },
3237
+ * clear: { tooltip: '清空输入' }
3238
+ * }))
3239
+ * </script>
3240
+ *
3241
+ * <template>
3242
+ * <ChatInput :actions-config="defaultActions" />
3243
+ * </template>
3244
+ * ```
3245
+ *
3246
+ * @default undefined
3247
+ */
3248
+ defaultActions?: DefaultActions;
3249
+ /**
3250
+ * 提交触发方式
3251
+ *
3252
+ * @default 'enter'
3253
+ */
3254
+ submitType?: SubmitTrigger;
3255
+ }
3256
+
3257
+ declare interface SenderProps_2 {
3258
+ autofocus?: boolean;
3259
+ autoSize?: AutoSize_2;
3260
+ allowSpeech?: boolean;
3261
+ allowFiles?: boolean;
3262
+ clearable?: boolean;
3263
+ disabled?: boolean;
3264
+ defaultValue?: string | null;
3265
+ loading?: boolean;
3266
+ modelValue?: string;
3267
+ mode?: InputMode_2;
3268
+ maxLength?: number;
3269
+ buttonGroup?: ButtonGroupConfig;
3270
+ submitType?: SubmitTrigger_2;
3271
+ speech?: boolean | SpeechConfig_2;
3272
+ placeholder?: string;
3273
+ showWordLimit?: boolean;
3274
+ suggestions?: ISuggestionItem[];
3275
+ suggestionPopupWidth?: string | number;
3276
+ activeSuggestionKeys?: string[];
3277
+ theme?: ThemeType;
3278
+ templateData?: UserItem[];
3279
+ stopText?: string;
3280
+ }
3281
+
3282
+ /**
3283
+ * Chat-Input 组件 Slots
3284
+ */
3285
+ export declare interface SenderSlots {
3286
+ /**
3287
+ * 头部插槽
3288
+ */
3289
+ header?: () => unknown;
3290
+ /**
3291
+ * 前缀插槽
3292
+ */
3293
+ prefix?: () => unknown;
3294
+ /**
3295
+ * 内容插槽
3296
+ *
3297
+ * @param props - 插槽属性
3298
+ * @param props.editor - 编辑器实例
3299
+ */
3300
+ content?: (props: {
3301
+ editor: unknown;
3302
+ }) => unknown;
3303
+ /**
3304
+ * 单行模式内联操作按钮插槽
3305
+ *
3306
+ * @example
3307
+ * ```vue
3308
+ * <chat-input>
3309
+ * <template #actions-inline="{ insert, focus, disabled }">
3310
+ * <voice-input @result="insert" :disabled="disabled" />
3311
+ * <file-upload @select="handleFiles" />
3312
+ * </template>
3313
+ * </chat-input>
3314
+ * ```
3315
+ */
3316
+ 'actions-inline'?: (scope: ChatInputSlotScope) => unknown;
3317
+ /**
3318
+ * 底部插槽(多行模式)
3319
+ */
3320
+ footer?: (scope: ChatInputSlotScope) => unknown;
3321
+ /**
3322
+ * 底部右侧插槽(多行模式)
3323
+ */
3324
+ 'footer-right'?: (scope: ChatInputSlotScope) => unknown;
3325
+ }
3326
+
3327
+ /**
3328
+ * 建议项类型
3329
+ *
3330
+ * @example
3331
+ * ```typescript
3332
+ * // 自动匹配
3333
+ * { content: 'ECS-云服务器' }
3334
+ *
3335
+ * // 精确指定高亮
3336
+ * {
3337
+ * content: 'ECS-云服务器',
3338
+ * highlights: ['ECS', '云服务器']
3339
+ * }
3340
+ *
3341
+ * // 自定义高亮函数
3342
+ * {
3343
+ * content: 'ECS-云服务器',
3344
+ * highlights: (text, query) => [
3345
+ * { text: 'ECS', isMatch: true },
3346
+ * { text: '-云服务器', isMatch: false }
3347
+ * ]
3348
+ * }
3349
+ * ```
3350
+ */
3351
+ export declare interface SenderSuggestionItem {
3352
+ /**
3353
+ * 建议项内容(必填)
3354
+ */
3355
+ content: string;
3356
+ /**
3357
+ * 显示标签(可选)
3358
+ *
3359
+ * 默认使用 content
3360
+ */
3361
+ label?: string;
3362
+ /**
3363
+ * 高亮方式(可选)
3364
+ *
3365
+ * - undefined: 自动匹配(默认)
3366
+ * - string[]: 精确指定高亮片段
3367
+ * - function: 自定义高亮逻辑
3368
+ */
3369
+ highlights?: string[] | HighlightFunction;
3370
+ /**
3371
+ * 自定义数据(可选)
3372
+ *
3373
+ * 用于扩展功能
3374
+ */
3375
+ data?: Record<string, unknown>;
3376
+ }
3377
+
3378
+ /**
3379
+ * 语音识别相关类型定义
3380
+ */
3381
+ export declare interface SpeechCallbacks {
3382
+ onStart: () => void;
3383
+ onInterim: (transcript: string) => void;
3384
+ onFinal: (transcript: string) => void;
3385
+ onEnd: (transcript?: string) => void;
3386
+ onError: (error: Error) => void;
3387
+ }
3388
+
3389
+ declare interface SpeechCallbacks_2 {
3390
+ onStart: () => void;
3391
+ onInterim: (transcript: string) => void;
3392
+ onFinal: (transcript: string) => void;
3393
+ onEnd: (transcript?: string) => void;
3394
+ onError: (error: Error) => void;
3395
+ }
3396
+
3397
+ export declare interface SpeechConfig {
3398
+ customHandler?: SpeechHandler;
3399
+ lang?: string;
3400
+ continuous?: boolean;
3401
+ interimResults?: boolean;
3402
+ autoReplace?: boolean;
3403
+ onVoiceButtonClick?: (isRecording: boolean, preventDefault: () => void) => void | Promise<void>;
3404
+ }
3405
+
3406
+ declare interface SpeechConfig_2 {
3407
+ customHandler?: SpeechHandler_2;
3408
+ lang?: string;
3409
+ continuous?: boolean;
3410
+ interimResults?: boolean;
3411
+ autoReplace?: boolean;
3412
+ onVoiceButtonClick?: (isRecording: boolean, preventDefault: () => void) => void | Promise<void>;
3413
+ }
3414
+
3415
+ export declare interface SpeechHandler {
3416
+ start: (callbacks: SpeechCallbacks) => Promise<void> | void;
3417
+ stop: () => Promise<void> | void;
3418
+ isSupported: () => boolean;
3419
+ }
3420
+
3421
+ declare interface SpeechHandler_2 {
3422
+ start: (callbacks: SpeechCallbacks_2) => Promise<void> | void;
3423
+ stop: () => Promise<void> | void;
3424
+ isSupported: () => boolean;
3425
+ }
3426
+
3427
+ export declare interface SpeechHandlerResult {
3428
+ speechState: SpeechState;
3429
+ start: () => void;
3430
+ stop: () => void;
3431
+ }
3432
+
3433
+ export declare interface SpeechHookOptions extends SpeechConfig {
3434
+ onStart?: () => void;
3435
+ onEnd?: (transcript?: string) => void;
3436
+ onInterim?: (transcript: string) => void;
3437
+ onFinal?: (transcript: string) => void;
3438
+ onError?: (error: Error) => void;
3439
+ }
3440
+
3441
+ export declare interface SpeechState {
3062
3442
  isRecording: boolean;
3063
3443
  isSupported: boolean;
3064
3444
  error?: Error;
3065
3445
  }
3066
3446
 
3447
+ /**
3448
+ * 结构化数据(联合类型)
3449
+ *
3450
+ * Submit 事件的第二个参数,根据使用的扩展直接返回对应的数据数组
3451
+ *
3452
+ * **设计理念**:
3453
+ * - 第一个参数 `text`:纯文本内容,适用于简单场景
3454
+ * - 第二个参数 `data`:结构化数据数组,直接使用无需解包
3455
+ *
3456
+ * **类型说明**:
3457
+ * - `TemplateItem[]`: 使用 Template 扩展时返回(混合结构)
3458
+ * - `MentionStructuredItem[]`: 使用 Mention 扩展时返回(混合结构)
3459
+ *
3460
+ * @example Template 场景
3461
+ * ```typescript
3462
+ * function handleSubmit(text: string, data?: StructuredData) {
3463
+ * // text: "帮我分析 的周报"
3464
+ * // data: [
3465
+ * // { type: 'text', content: '帮我分析 ' },
3466
+ * // { type: 'template', content: '张三' },
3467
+ * // { type: 'text', content: ' 的周报' }
3468
+ * // ]
3469
+ *
3470
+ * if (data && data[0]?.type === 'template') {
3471
+ * const templates = data.filter(item => item.type === 'template')
3472
+ * console.log('模板变量:', templates)
3473
+ * }
3474
+ * }
3475
+ * ```
3476
+ *
3477
+ * @example Mention 场景
3478
+ * ```typescript
3479
+ * function handleSubmit(text: string, data?: StructuredData) {
3480
+ * // text: "帮我分析 @张三 的周报"
3481
+ * // data: [
3482
+ * // { type: 'text', content: '帮我分析 ' },
3483
+ * // { type: 'mention', content: '张三', preset: '...' },
3484
+ * // { type: 'text', content: ' 的周报' }
3485
+ * // ]
3486
+ *
3487
+ * // 统一使用 content 属性
3488
+ * const allContent = data?.map(item => item.content).join('')
3489
+ * console.log('完整内容:', allContent)
3490
+ *
3491
+ * // 提取 mention
3492
+ * if (data && data[0]?.type === 'mention') {
3493
+ * const mentions = data.filter(item => item.type === 'mention')
3494
+ * console.log('提及的人:', mentions.map(m => m.content))
3495
+ * console.log('预设内容:', mentions.map(m => m.preset))
3496
+ * }
3497
+ * }
3498
+ * ```
3499
+ */
3500
+ export declare type StructuredData = TemplateItem[] | MentionStructuredItem[];
3501
+
3502
+ /**
3503
+ * 提交触发方式
3504
+ * - enter: Enter 键提交
3505
+ * - ctrlEnter: Ctrl+Enter 提交
3506
+ * - shiftEnter: Shift+Enter 提交
3507
+ */
3067
3508
  export declare type SubmitTrigger = 'enter' | 'ctrlEnter' | 'shiftEnter';
3068
3509
 
3510
+ declare type SubmitTrigger_2 = 'enter' | 'ctrlEnter' | 'shiftEnter';
3511
+
3512
+ /**
3513
+ * 创建 Suggestion 扩展的便捷函数
3514
+ *
3515
+ * @param items - 建议项列表
3516
+ * @param options - 其他配置项
3517
+ *
3518
+ * @example
3519
+ * ```typescript
3520
+ * const extensions = [suggestion(suggestions)]
3521
+ * const extensions = [suggestion(suggestions, { popupWidth: 500 })]
3522
+ * ```
3523
+ */
3524
+ declare function suggestion(items: SenderSuggestionItem[] | Ref<SenderSuggestionItem[]>, options?: Partial<Omit<SuggestionOptions, 'items'>>): Extension<SuggestionOptions, any>;
3525
+
3069
3526
  export declare interface SuggestionBaseItem {
3070
3527
  id: string;
3071
3528
  text: string;
@@ -3082,7 +3539,121 @@ export declare interface SuggestionGroup<T = Record<string, unknown>> {
3082
3539
 
3083
3540
  export declare type SuggestionItem<T = Record<string, unknown>> = SuggestionBaseItem & T;
3084
3541
 
3085
- declare const SuggestionPillButton: typeof _default_31 & {
3542
+ /**
3543
+ * 插件配置选项
3544
+ */
3545
+ export declare interface SuggestionOptions {
3546
+ /**
3547
+ * 建议项列表(必填)
3548
+ *
3549
+ * @example
3550
+ * ```typescript
3551
+ * const items = ref([
3552
+ * { content: 'ECS-云服务器' },
3553
+ * { content: 'RDS-数据库' }
3554
+ * ])
3555
+ * ```
3556
+ */
3557
+ items?: SenderSuggestionItem[] | Ref<SenderSuggestionItem[]>;
3558
+ /**
3559
+ * 自定义过滤函数(可选)
3560
+ *
3561
+ * - 不传:不过滤,直接显示所有项
3562
+ * - 传入:使用自定义过滤逻辑
3563
+ *
3564
+ * @default undefined(不过滤)
3565
+ *
3566
+ * @example 模糊匹配过滤
3567
+ * ```typescript
3568
+ * filterFn: (items, query) => {
3569
+ * return items.filter(item =>
3570
+ * item.content.toLowerCase().includes(query.toLowerCase())
3571
+ * )
3572
+ * }
3573
+ * ```
3574
+ *
3575
+ * @example 前缀匹配过滤
3576
+ * ```typescript
3577
+ * filterFn: (items, query) => {
3578
+ * return items.filter(item =>
3579
+ * item.content.toLowerCase().startsWith(query.toLowerCase())
3580
+ * )
3581
+ * }
3582
+ * ```
3583
+ */
3584
+ filterFn?: (suggestions: SenderSuggestionItem[], query: string) => SenderSuggestionItem[];
3585
+ /**
3586
+ * 选中建议项的按键
3587
+ *
3588
+ * 注意:Tab 键用于自动补全,不受此配置控制
3589
+ *
3590
+ * @default ['Enter']
3591
+ *
3592
+ * @example 只允许 Enter 选中
3593
+ * ```typescript
3594
+ * activeSuggestionKeys: ['Enter']
3595
+ * ```
3596
+ *
3597
+ * @example 允许 Enter 和 Space 选中
3598
+ * ```typescript
3599
+ * activeSuggestionKeys: ['Enter', ' '] // 注意:空格键是 ' '
3600
+ * ```
3601
+ *
3602
+ * @example 禁用所有选中按键(只能点击)
3603
+ * ```typescript
3604
+ * activeSuggestionKeys: []
3605
+ * ```
3606
+ */
3607
+ activeSuggestionKeys?: string[];
3608
+ /**
3609
+ * 弹窗宽度
3610
+ *
3611
+ * @default 400
3612
+ */
3613
+ popupWidth?: number | string;
3614
+ /**
3615
+ * 是否显示自动补全提示
3616
+ *
3617
+ * @default true
3618
+ */
3619
+ showAutoComplete?: boolean;
3620
+ /**
3621
+ * 选中建议项的回调
3622
+ *
3623
+ * @param item - 选中的建议项(包含完整的 SuggestionItem 信息)
3624
+ * @returns 返回 false 可阻止默认回填行为
3625
+ *
3626
+ * @example 默认行为(自动回填)
3627
+ * ```typescript
3628
+ * onSelect: (item) => {
3629
+ * console.log('Selected:', item)
3630
+ * // 不返回 false,内容会自动回填
3631
+ * }
3632
+ * ```
3633
+ *
3634
+ * @example 阻止默认行为并自定义回填
3635
+ * ```typescript
3636
+ * onSelect: (item) => {
3637
+ * editor.commands.setContent(`前缀-${item.content}-后缀`)
3638
+ * return false // 阻止默认回填
3639
+ * }
3640
+ * ```
3641
+ *
3642
+ * @example 条件性阻止
3643
+ * ```typescript
3644
+ * onSelect: (item) => {
3645
+ * if (item.data?.needsValidation) {
3646
+ * validateAndFill(item)
3647
+ * return false
3648
+ * }
3649
+ * // 否则使用默认回填
3650
+ * }
3651
+ * ```
3652
+ */
3653
+ onSelect?: (item: SenderSuggestionItem) => void | false;
3654
+ }
3655
+
3656
+ declare const SuggestionPillButton: typeof _default_38 & {
3086
3657
  install: typeof installPillButton;
3087
3658
  };
3088
3659
  export { SuggestionPillButton }
@@ -3210,19 +3781,230 @@ export declare interface SuggestionPopoverSlots {
3210
3781
  body?: () => VNode | VNode[];
3211
3782
  }
3212
3783
 
3784
+ /**
3785
+ * 插件状态
3786
+ *
3787
+ * 管理建议列表的显示、过滤、选中等状态
3788
+ */
3789
+ export declare interface SuggestionState {
3790
+ /**
3791
+ * 是否激活(有匹配的建议项)
3792
+ */
3793
+ active: boolean;
3794
+ /**
3795
+ * 匹配范围
3796
+ *
3797
+ * 全局模式:整个文档范围
3798
+ * 字符模式:触发字符到光标的范围
3799
+ */
3800
+ range: {
3801
+ from: number;
3802
+ to: number;
3803
+ } | null;
3804
+ /**
3805
+ * 查询文本
3806
+ *
3807
+ * 全局模式:整个输入内容
3808
+ * 字符模式:触发字符后的文本
3809
+ */
3810
+ query: string;
3811
+ /**
3812
+ * 过滤后的建议项
3813
+ */
3814
+ filteredSuggestions: SenderSuggestionItem[];
3815
+ /**
3816
+ * 当前选中的建议项索引
3817
+ *
3818
+ * -1 表示未选中
3819
+ */
3820
+ selectedIndex: number;
3821
+ /**
3822
+ * 自动补全文本
3823
+ *
3824
+ * 选中项的剩余部分
3825
+ */
3826
+ autoCompleteText: string;
3827
+ /**
3828
+ * 是否显示 Tab 提示
3829
+ */
3830
+ showTabIndicator: boolean;
3831
+ }
3832
+
3833
+ /**
3834
+ * Suggestion 插件类型定义
3835
+ *
3836
+ * 包含建议项、高亮、插件配置和状态等类型定义
3837
+ */
3838
+ /**
3839
+ * 高亮文本片段
3840
+ */
3213
3841
  export declare interface SuggestionTextPart {
3214
3842
  text: string;
3215
3843
  isMatch: boolean;
3216
3844
  }
3217
3845
 
3218
- declare interface TemplateItem extends BaseItem {
3219
- type: 'template';
3846
+ declare interface SuggestionTextPart_2 {
3847
+ text: string;
3848
+ isMatch: boolean;
3849
+ }
3850
+
3851
+ /**
3852
+ * 创建 Template 扩展的便捷函数
3853
+ *
3854
+ * @param items - 模板项列表
3855
+ * @param options - 其他配置项
3856
+ *
3857
+ * @example
3858
+ * ```typescript
3859
+ * const extensions = [template(templates)]
3860
+ * const extensions = [template(templates, { HTMLAttributes: { class: 'custom' } })]
3861
+ * ```
3862
+ */
3863
+ declare function template(items: TemplateItem[] | Ref<TemplateItem[]>, options?: Partial<Omit<TemplateOptions, 'items'>>): Extension<TemplateOptions, any>;
3864
+
3865
+ /**
3866
+ * Template 节点属性
3867
+ */
3868
+ export declare interface TemplateAttrs {
3869
+ /**
3870
+ * 模板块 ID
3871
+ */
3872
+ id: string;
3873
+ /**
3874
+ * 模板块内容
3875
+ */
3876
+ content: string;
3877
+ }
3878
+
3879
+ /**
3880
+ * 模板项(用户侧)
3881
+ *
3882
+ * 用户传入的模板数据格式
3883
+ * 组件内部会转换为 Tiptap 节点格式
3884
+ */
3885
+ export declare type TemplateItem = {
3886
+ /**
3887
+ * 模板 ID,可选
3888
+ * 如果不提供,组件会自动生成
3889
+ */
3890
+ id?: string;
3891
+ /**
3892
+ * 类型:普通文本
3893
+ */
3894
+ type: 'text';
3895
+ /**
3896
+ * 内容
3897
+ */
3898
+ content: string;
3899
+ } | {
3900
+ /**
3901
+ * 模板 ID,可选
3902
+ * 如果不提供,组件会自动生成
3903
+ */
3904
+ id?: string;
3905
+ /**
3906
+ * 类型:模板块(可编辑)
3907
+ */
3908
+ type: 'block';
3909
+ /**
3910
+ * 内容
3911
+ */
3220
3912
  content: string;
3221
- prefix: string;
3222
- suffix: string;
3913
+ } | {
3914
+ /**
3915
+ * 模板 ID,可选
3916
+ * 如果不提供,组件会自动生成
3917
+ */
3918
+ id?: string;
3919
+ /**
3920
+ * 类型:选择器
3921
+ */
3922
+ type: 'select';
3923
+ /**
3924
+ * 内容(选中的值)
3925
+ */
3926
+ content: string;
3927
+ /**
3928
+ * 占位文字(未选择时显示)
3929
+ */
3930
+ placeholder?: string;
3931
+ /**
3932
+ * 选项列表
3933
+ */
3934
+ options?: SelectOption[];
3935
+ /**
3936
+ * 当前选中的值
3937
+ */
3938
+ value?: string;
3939
+ };
3940
+
3941
+ declare interface TemplateItem_2 {
3942
+ id: string;
3943
+ type: 'template' | 'block';
3944
+ content: string;
3945
+ }
3946
+
3947
+ /**
3948
+ * Template 配置选项
3949
+ */
3950
+ export declare interface TemplateOptions {
3951
+ /**
3952
+ * 模板数据列表(推荐使用 ref 实现响应式)
3953
+ *
3954
+ * 支持两种配置方式:
3955
+ * 1. 传入 ref(推荐):自动双向绑定,解决时序问题
3956
+ * 2. 传入数组:仅用于静态初始化
3957
+ *
3958
+ * @example 响应式配置(推荐)
3959
+ * ```typescript
3960
+ * const items = ref<TemplateItem[]>([
3961
+ * { type: 'text', content: '帮我分析' },
3962
+ * { type: 'template', content: '' }
3963
+ * ])
3964
+ * Template.configure({ items }) // 传入 ref,自动双向绑定
3965
+ * ```
3966
+ *
3967
+ * @example 静态配置
3968
+ * ```typescript
3969
+ * Template.configure({
3970
+ * items: [
3971
+ * { type: 'text', content: '帮我分析' },
3972
+ * { type: 'template', content: '' }
3973
+ * ]
3974
+ * })
3975
+ * ```
3976
+ */
3977
+ items?: TemplateItem[] | Ref<TemplateItem[], TemplateItem[]>;
3978
+ /**
3979
+ * HTML 属性
3980
+ */
3981
+ HTMLAttributes?: Record<string, unknown>;
3982
+ }
3983
+
3984
+ /**
3985
+ * TemplateSelect 节点属性
3986
+ */
3987
+ export declare interface TemplateSelectAttrs {
3988
+ /**
3989
+ * 唯一标识
3990
+ */
3991
+ id: string;
3992
+ /**
3993
+ * 占位文字(未选择时显示)
3994
+ */
3995
+ placeholder: string;
3996
+ /**
3997
+ * 选项列表
3998
+ */
3999
+ options: SelectOption_2[];
4000
+ /**
4001
+ * 当前选中的值(可选)
4002
+ */
4003
+ value?: string;
3223
4004
  }
3224
4005
 
3225
- declare interface TextItem extends BaseItem {
4006
+ declare interface TextItem {
4007
+ id: string;
3226
4008
  type: 'text';
3227
4009
  content: string;
3228
4010
  }
@@ -3246,10 +4028,14 @@ export declare interface ThemeProviderProps {
3246
4028
 
3247
4029
  export declare type ThemeStorage = Pick<Storage, 'getItem' | 'setItem'>;
3248
4030
 
4031
+ declare type ThemeType = 'light' | 'dark';
4032
+
3249
4033
  /**
3250
- * 组件核心类型定义
4034
+ * Tooltip 内容类型
4035
+ * - string: 简单文本
4036
+ * - () => string | VNode: 渲染函数,支持复杂内容
3251
4037
  */
3252
- export declare type ThemeType = 'light' | 'dark';
4038
+ export declare type TooltipContent = string | (() => string | VNode);
3253
4039
 
3254
4040
  declare interface TooltipContentProps {
3255
4041
  show?: boolean;
@@ -3261,7 +4047,71 @@ declare interface TooltipContentProps {
3261
4047
  delayClose?: number;
3262
4048
  }
3263
4049
 
3264
- export declare type TooltipRender = () => VNode | string;
4050
+ /**
4051
+ * Tooltip 位置
4052
+ *
4053
+ * 支持 TinyTooltip 的所有位置选项
4054
+ */
4055
+ export declare type TooltipPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
4056
+
4057
+ declare type TooltipRender = () => VNode | string;
4058
+
4059
+ export declare interface UploadButtonEmits {
4060
+ /**
4061
+ * 文件选择
4062
+ */
4063
+ (e: 'select', files: File[]): void;
4064
+ /**
4065
+ * 文件验证失败
4066
+ */
4067
+ (e: 'error', error: Error, file?: File): void;
4068
+ }
4069
+
4070
+ export declare interface UploadButtonProps {
4071
+ /**
4072
+ * 是否禁用
4073
+ */
4074
+ disabled?: boolean;
4075
+ /**
4076
+ * 接受的文件类型
4077
+ * @default '*'
4078
+ */
4079
+ accept?: string;
4080
+ /**
4081
+ * 是否支持多选
4082
+ * @default false
4083
+ */
4084
+ multiple?: boolean;
4085
+ /**
4086
+ * 是否在选择文件后重置 input
4087
+ * @default true
4088
+ */
4089
+ reset?: boolean;
4090
+ /**
4091
+ * 文件大小限制(MB)
4092
+ */
4093
+ maxSize?: number;
4094
+ /**
4095
+ * 最大文件数量
4096
+ */
4097
+ maxCount?: number;
4098
+ /**
4099
+ * 按钮提示文本
4100
+ */
4101
+ tooltip?: TooltipContent;
4102
+ /**
4103
+ * 按钮尺寸
4104
+ */
4105
+ size?: number | string;
4106
+ /**
4107
+ * 自定义图标
4108
+ */
4109
+ icon?: Component;
4110
+ /**
4111
+ * Tooltip 位置
4112
+ */
4113
+ tooltipPlacement?: TooltipPlacement;
4114
+ }
3265
4115
 
3266
4116
  export declare interface UrlAttachment extends BaseAttachment {
3267
4117
  url: string;
@@ -3269,23 +4119,31 @@ export declare interface UrlAttachment extends BaseAttachment {
3269
4119
  rawFile?: File;
3270
4120
  }
3271
4121
 
3272
- export declare type UserItem = UserTextItem | UserTemplateItem | UserSkillItem;
3273
-
3274
- export declare type UserSkillItem = {
3275
- id?: string;
3276
- type: 'skill';
3277
- label: string;
3278
- value: string;
3279
- };
4122
+ declare type UserItem = UserTextItem | UserTemplateItem;
3280
4123
 
3281
- export declare type UserTemplateItem = Omit<Pick<TemplateItem, 'type' | 'content'>, 'id'> & {
3282
- id?: TemplateItem['id'];
4124
+ declare type UserTemplateItem = Omit<Pick<TemplateItem_2, 'type' | 'content'>, 'id'> & {
4125
+ id?: TemplateItem_2['id'];
3283
4126
  };
3284
4127
 
3285
- export declare type UserTextItem = Omit<TextItem, 'id'> & {
4128
+ declare type UserTextItem = Omit<TextItem, 'id'> & {
3286
4129
  id?: TextItem['id'];
3287
4130
  };
3288
4131
 
4132
+ /**
4133
+ * 获取 ChatInput Context
4134
+ */
4135
+ export declare function useSenderContext(): SenderContext;
4136
+
4137
+ /**
4138
+ * 语音识别处理 Hook
4139
+ * 支持内置 Web Speech API 和自定义语音处理器
4140
+ * 通过 customHandler 参数切换实现,默认使用内置的 Web Speech API
4141
+ *
4142
+ * @param options 语音识别配置
4143
+ * @returns 语音识别控制器
4144
+ */
4145
+ export declare function useSpeechHandler(options: SpeechHookOptions): SpeechHandlerResult;
4146
+
3289
4147
  export declare const useTheme: () => {
3290
4148
  theme: Ref<string, string> | undefined;
3291
4149
  colorMode: Ref<ColorMode, ColorMode> | undefined;
@@ -3311,6 +4169,96 @@ declare interface VoiceButtonConfig {
3311
4169
  icon?: VNode | Component;
3312
4170
  }
3313
4171
 
4172
+ /**
4173
+ * VoiceButton 组件 Emits
4174
+ */
4175
+ export declare interface VoiceButtonEmits {
4176
+ (e: 'speech-start'): void;
4177
+ (e: 'speech-interim', transcript: string): void;
4178
+ (e: 'speech-final', transcript: string): void;
4179
+ (e: 'speech-end', transcript?: string): void;
4180
+ (e: 'speech-error', error: Error): void;
4181
+ }
4182
+
4183
+ /**
4184
+ * VoiceButton 组件 Props
4185
+ */
4186
+ export declare interface VoiceButtonProps {
4187
+ /**
4188
+ * 自定义图标
4189
+ */
4190
+ icon?: VNode | Component;
4191
+ /**
4192
+ * 是否禁用(会与 Context 的 disabled 合并)
4193
+ */
4194
+ disabled?: boolean;
4195
+ /**
4196
+ * 按钮尺寸
4197
+ */
4198
+ size?: 'small' | 'normal';
4199
+ /**
4200
+ * Tooltip 文本
4201
+ */
4202
+ tooltip?: TooltipContent;
4203
+ /**
4204
+ * Tooltip 位置
4205
+ */
4206
+ tooltipPlacement?: TooltipPlacement;
4207
+ /**
4208
+ * 语音配置
4209
+ */
4210
+ speechConfig?: SpeechConfig;
4211
+ /**
4212
+ * 是否自动插入识别结果到编辑器
4213
+ * @default true
4214
+ */
4215
+ autoInsert?: boolean;
4216
+ /**
4217
+ * 按钮点击拦截器(用于自定义 UI)
4218
+ */
4219
+ onButtonClick?: (isRecording: boolean, preventDefault: () => void) => void | Promise<void>;
4220
+ }
4221
+
4222
+ /**
4223
+ * 内置 Web Speech API 处理器
4224
+ * 基于浏览器原生 Web Speech API 实现的语音识别
4225
+ */
4226
+ export declare class WebSpeechHandler implements SpeechHandler {
4227
+ private recognition?;
4228
+ private options;
4229
+ /**
4230
+ * 初始化语音识别实例
4231
+ */
4232
+ private initialize;
4233
+ constructor(options: SpeechConfig);
4234
+ /**
4235
+ * 检查浏览器是否支持 Web Speech API
4236
+ */
4237
+ static isSupported(): boolean;
4238
+ /**
4239
+ * 检查浏览器是否支持 Web Speech API(实例方法)
4240
+ */
4241
+ isSupported(): boolean;
4242
+ /**
4243
+ * 设置语音识别事件处理器
4244
+ * @param callbacks 语音识别回调函数集合
4245
+ */
4246
+ private setupEventHandlers;
4247
+ /**
4248
+ * 清理事件监听器
4249
+ */
4250
+ private cleanup;
4251
+ /**
4252
+ * 开始语音识别
4253
+ * @param callbacks 语音识别回调函数集合
4254
+ */
4255
+ start(callbacks: SpeechCallbacks): void;
4256
+ /**
4257
+ * 停止语音识别并清理资源
4258
+ */
4259
+ stop(): void;
4260
+ }
4261
+
3314
4262
  export declare interface WelcomeProps {
3315
4263
  title: string;
3316
4264
  description: string;
@@ -3323,3 +4271,53 @@ export declare interface WelcomeSlots {
3323
4271
  }
3324
4272
 
3325
4273
  export { }
4274
+
4275
+
4276
+ /**
4277
+ * 扩展 Tiptap Commands 接口
4278
+ *
4279
+ * 使 TypeScript 能够识别自定义命令
4280
+ */
4281
+ declare module '@tiptap/core' {
4282
+ interface Commands<ReturnType> {
4283
+ mention: {
4284
+ /**
4285
+ * 插入 mention 节点
4286
+ */
4287
+ insertMention: (attrs: Partial<MentionAttrs>) => ReturnType;
4288
+ /**
4289
+ * 删除 mention 节点
4290
+ */
4291
+ deleteMention: (id: string) => ReturnType;
4292
+ };
4293
+ }
4294
+ }
4295
+
4296
+
4297
+ /**
4298
+ * 扩展 Tiptap Commands 接口
4299
+ *
4300
+ * 使 TypeScript 能够识别自定义命令
4301
+ */
4302
+ declare module '@tiptap/core' {
4303
+ interface Commands<ReturnType> {
4304
+ template: {
4305
+ /**
4306
+ * 设置模板数据(批量)
4307
+ */
4308
+ setTemplateData: (items: TemplateItem[]) => ReturnType;
4309
+ /**
4310
+ * 插入模板块
4311
+ */
4312
+ insertTemplate: (attrs: Partial<TemplateAttrs>) => ReturnType;
4313
+ /**
4314
+ * 聚焦到第一个模板块
4315
+ */
4316
+ focusFirstTemplate: () => ReturnType;
4317
+ /**
4318
+ * 插入选择器
4319
+ */
4320
+ insertTemplateSelect: (attrs: Partial<TemplateSelectAttrs>) => ReturnType;
4321
+ };
4322
+ }
4323
+ }