@opentiny/tiny-robot 0.3.1-alpha.7 → 0.3.1-alpha.9

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