@fv-ui/ai-chat 0.14.0 → 1.0.0

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
@@ -13,6 +13,11 @@ interface CreateMarkdownOptions {
13
13
  highlight?: (str: string, lang: string) => string;
14
14
  /** 额外的 markdown-it 插件 */
15
15
  mdPlugins?: MdPlugin[];
16
+ /** 表格工具栏:开启时表格上方注入复制/下载按钮;labels 为 locale 文案 */
17
+ tableToolbar?: {
18
+ copyLabel: string;
19
+ downloadLabel: string;
20
+ };
16
21
  }
17
22
 
18
23
  /**
@@ -36,6 +41,8 @@ declare const zhCN: {
36
41
  fullscreen: string;
37
42
  collapse: string;
38
43
  expand: string;
44
+ /** 复制成功提示(表格工具栏等) */
45
+ copied: string;
39
46
  };
40
47
  thinking: {
41
48
  start: string;
@@ -61,6 +68,8 @@ declare const zhCN: {
61
68
  recordCancel: string;
62
69
  recordConfirm: string;
63
70
  micUnavailable: string;
71
+ /** 输入框占位文案(placeholder prop 未传时的默认) */
72
+ inputPlaceholder: string;
64
73
  };
65
74
  editorSender: {
66
75
  clear: string;
@@ -163,12 +172,16 @@ type __VLS_Props$h = {
163
172
  /** 代码块「预览」触发语言(fence 原始 lang 命中列表时,代码块右上角注入
164
173
  * data-fv-code-trigger 按钮;点击行为由消费方事件委托实现,如 AiChat 打开 Artifacts 面板) */
165
174
  codeTriggerLangs?: string[];
175
+ /** 表格工具栏:默认开启。表格上方注入复制(markdown 源文本)/下载(CSV)单图标按钮 */
176
+ tableToolbar?: boolean;
166
177
  /** 语言包:'zh-CN'/'en-US' 整包或部分文案对象(优先于祖先注入与全局设置) */
167
178
  locale?: LocaleInput;
168
179
  };
169
180
  declare const __VLS_export$h: vue.DefineComponent<__VLS_Props$h, {
170
181
  getHtml: () => string;
171
- }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$h> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
182
+ }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$h> & Readonly<{}>, {
183
+ tableToolbar: boolean;
184
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
172
185
  declare const _default$h: typeof __VLS_export$h;
173
186
 
174
187
  type __VLS_Props$g = {
@@ -279,14 +292,14 @@ declare function continueTy(): void;
279
292
  declare function restart(): void;
280
293
  declare function destroy(): void;
281
294
  declare var __VLS_1$9: {};
282
- declare var __VLS_10$1: {};
295
+ declare var __VLS_10$2: {};
283
296
  declare var __VLS_12$1: {};
284
297
  declare var __VLS_14: {};
285
298
  declare var __VLS_32: {};
286
299
  type __VLS_Slots$e = {} & {
287
300
  avatar?: (props: typeof __VLS_1$9) => any;
288
301
  } & {
289
- header?: (props: typeof __VLS_10$1) => any;
302
+ header?: (props: typeof __VLS_10$2) => any;
290
303
  } & {
291
304
  loading?: (props: typeof __VLS_12$1) => any;
292
305
  } & {
@@ -332,6 +345,7 @@ declare const __VLS_base$e: vue.DefineComponent<__VLS_Props$f, {
332
345
  }>, {
333
346
  loading: boolean;
334
347
  content: string;
348
+ placement: "start" | "end";
335
349
  isMarkdown: boolean;
336
350
  isFog: boolean | {
337
351
  bgColor?: string;
@@ -339,7 +353,6 @@ declare const __VLS_base$e: vue.DefineComponent<__VLS_Props$f, {
339
353
  };
340
354
  typing: boolean | TypingConfig;
341
355
  shape: "round" | "corner";
342
- placement: "start" | "end";
343
356
  variant: "filled" | "borderless" | "outlined" | "shadow";
344
357
  avatar: string;
345
358
  avatarSize: number | "" | "default" | "small" | "large";
@@ -401,19 +414,19 @@ declare function scrollToTop$1(): void;
401
414
  declare function scrollToBottom$1(): void;
402
415
  /** 定位第 index 个气泡到可视区 */
403
416
  declare function scrollToBubble(index: number): void;
404
- declare var __VLS_10: {
417
+ declare var __VLS_10$1: {
405
418
  item: BubbleListItemProps;
406
419
  index: number;
407
420
  };
408
- declare var __VLS_13: {
421
+ declare var __VLS_13$1: {
409
422
  item: BubbleListItemProps;
410
423
  index: number;
411
424
  };
412
- declare var __VLS_16$1: {
425
+ declare var __VLS_16$2: {
413
426
  item: BubbleListItemProps;
414
427
  index: number;
415
428
  };
416
- declare var __VLS_19$1: {
429
+ declare var __VLS_19$3: {
417
430
  item: BubbleListItemProps;
418
431
  index: number;
419
432
  };
@@ -422,13 +435,13 @@ declare var __VLS_22$1: {
422
435
  index: number;
423
436
  };
424
437
  type __VLS_Slots$d = {} & {
425
- avatar?: (props: typeof __VLS_10) => any;
438
+ avatar?: (props: typeof __VLS_10$1) => any;
426
439
  } & {
427
- header?: (props: typeof __VLS_13) => any;
440
+ header?: (props: typeof __VLS_13$1) => any;
428
441
  } & {
429
- content?: (props: typeof __VLS_16$1) => any;
442
+ content?: (props: typeof __VLS_16$2) => any;
430
443
  } & {
431
- loading?: (props: typeof __VLS_19$1) => any;
444
+ loading?: (props: typeof __VLS_19$3) => any;
432
445
  } & {
433
446
  footer?: (props: typeof __VLS_22$1) => any;
434
447
  };
@@ -469,7 +482,7 @@ type __VLS_Props$d = {
469
482
  /** 输入值(v-model) */
470
483
  modelValue?: string;
471
484
  placeholder?: string;
472
- /** 自增高:minRows/maxRows(行高 22px) */
485
+ /** 自增高:minRows/maxRows(行高 22px;默认 3 行起步,内容多时自动加高至最多 7 行后内部滚动) */
473
486
  autosize?: {
474
487
  minRows?: number;
475
488
  maxRows?: number;
@@ -522,24 +535,24 @@ declare function blur$2(): void;
522
535
  declare function openHeader$2(): void;
523
536
  declare function closeHeader$2(): void;
524
537
  declare var __VLS_1$8: {};
525
- declare var __VLS_3$4: {};
526
- declare var __VLS_5$1: {};
527
- declare var __VLS_52: {
538
+ declare var __VLS_3$3: {};
539
+ declare var __VLS_5: {};
540
+ declare var __VLS_52$1: {
528
541
  keyword: string;
529
542
  };
530
- declare var __VLS_54: {};
543
+ declare var __VLS_54$1: {};
531
544
  declare var __VLS_56: {};
532
545
  declare var __VLS_134: {};
533
546
  type __VLS_Slots$c = {} & {
534
547
  header?: (props: typeof __VLS_1$8) => any;
535
548
  } & {
536
- 'body-top'?: (props: typeof __VLS_3$4) => any;
549
+ 'body-top'?: (props: typeof __VLS_3$3) => any;
537
550
  } & {
538
- prefix?: (props: typeof __VLS_5$1) => any;
551
+ prefix?: (props: typeof __VLS_5) => any;
539
552
  } & {
540
- trigger?: (props: typeof __VLS_52) => any;
553
+ trigger?: (props: typeof __VLS_52$1) => any;
541
554
  } & {
542
- 'action-list'?: (props: typeof __VLS_54) => any;
555
+ 'action-list'?: (props: typeof __VLS_54$1) => any;
543
556
  } & {
544
557
  'action-left'?: (props: typeof __VLS_56) => any;
545
558
  } & {
@@ -573,10 +586,10 @@ declare const __VLS_base$c: vue.DefineComponent<__VLS_Props$d, {
573
586
  "onUpdate:triggerPopoverVisible"?: ((value: boolean) => any) | undefined;
574
587
  }>, {
575
588
  loading: boolean;
589
+ disabled: boolean;
576
590
  shadow: boolean;
577
591
  round: boolean;
578
592
  variant: "default" | "updown";
579
- disabled: boolean;
580
593
  modelValue: string;
581
594
  placeholder: string;
582
595
  autosize: {
@@ -649,9 +662,9 @@ declare function setUserTag$1(userId: string): void;
649
662
  /** 程序化插入自定义触发标签(光标处) */
650
663
  declare function setCustomTag$1(prefix: string, id: string): void;
651
664
  declare var __VLS_20$1: string;
652
- declare var __VLS_21$2: any;
665
+ declare var __VLS_21$3: any;
653
666
  type __VLS_Slots$b = {} & {
654
- [K in NonNullable<typeof __VLS_20$1>]?: (props: typeof __VLS_21$2) => any;
667
+ [K in NonNullable<typeof __VLS_20$1>]?: (props: typeof __VLS_21$3) => any;
655
668
  };
656
669
  declare const __VLS_base$b: vue.DefineComponent<__VLS_Props$c, {
657
670
  submit: typeof submit;
@@ -873,20 +886,20 @@ declare function chatState(): {
873
886
  declare function openHeader(): void;
874
887
  declare function closeHeader(): void;
875
888
  declare var __VLS_1$7: {};
876
- declare var __VLS_3$3: {};
877
- declare var __VLS_19: {
889
+ declare var __VLS_3$2: {};
890
+ declare var __VLS_19$2: {
878
891
  nodeId: string;
879
892
  };
880
- declare var __VLS_21$1: {};
893
+ declare var __VLS_21$2: {};
881
894
  declare var __VLS_80: {};
882
895
  type __VLS_Slots$a = {} & {
883
896
  header?: (props: typeof __VLS_1$7) => any;
884
897
  } & {
885
- prefix?: (props: typeof __VLS_3$3) => any;
898
+ prefix?: (props: typeof __VLS_3$2) => any;
886
899
  } & {
887
- 'tag-tip'?: (props: typeof __VLS_19) => any;
900
+ 'tag-tip'?: (props: typeof __VLS_19$2) => any;
888
901
  } & {
889
- 'action-list'?: (props: typeof __VLS_21$1) => any;
902
+ 'action-list'?: (props: typeof __VLS_21$2) => any;
890
903
  } & {
891
904
  footer?: (props: typeof __VLS_80) => any;
892
905
  };
@@ -931,8 +944,8 @@ declare const __VLS_base$a: vue.DefineComponent<__VLS_Props$b, {
931
944
  "onShow-tag-dialog"?: ((visible: boolean) => any) | undefined;
932
945
  }>, {
933
946
  loading: boolean;
934
- variant: "default" | "updown";
935
947
  disabled: boolean;
948
+ variant: "default" | "updown";
936
949
  placeholder: string;
937
950
  submitType: "enter" | "shiftEnter";
938
951
  clearable: boolean;
@@ -984,18 +997,18 @@ type __VLS_Props$a = {
984
997
  /** 切换门控:start 起始态不可切换;thinking 中可展开查看思考流,end/error 后可自由收起展开 */
985
998
  declare function toggle(): void;
986
999
  declare var __VLS_1$6: {};
987
- declare var __VLS_36$2: {};
1000
+ declare var __VLS_36$1: {};
988
1001
  declare var __VLS_38: {};
989
- declare var __VLS_51: {};
1002
+ declare var __VLS_51$1: {};
990
1003
  declare var __VLS_53: {};
991
1004
  type __VLS_Slots$9 = {} & {
992
1005
  'status-icon'?: (props: typeof __VLS_1$6) => any;
993
1006
  } & {
994
- label?: (props: typeof __VLS_36$2) => any;
1007
+ label?: (props: typeof __VLS_36$1) => any;
995
1008
  } & {
996
1009
  arrow?: (props: typeof __VLS_38) => any;
997
1010
  } & {
998
- error?: (props: typeof __VLS_51) => any;
1011
+ error?: (props: typeof __VLS_51$1) => any;
999
1012
  } & {
1000
1013
  content?: (props: typeof __VLS_53) => any;
1001
1014
  };
@@ -1099,14 +1112,17 @@ type __VLS_Props$8 = {
1099
1112
  locale?: LocaleInput;
1100
1113
  };
1101
1114
  declare var __VLS_1$5: {};
1102
- declare var __VLS_3$2: {};
1103
- declare var __VLS_5: {};
1115
+ declare var __VLS_19$1: {};
1116
+ declare var __VLS_21$1: {};
1117
+ declare var __VLS_23: {};
1104
1118
  type __VLS_Slots$7 = {} & {
1105
- name?: (props: typeof __VLS_1$5) => any;
1119
+ icon?: (props: typeof __VLS_1$5) => any;
1120
+ } & {
1121
+ name?: (props: typeof __VLS_19$1) => any;
1106
1122
  } & {
1107
- description?: (props: typeof __VLS_3$2) => any;
1123
+ description?: (props: typeof __VLS_21$1) => any;
1108
1124
  } & {
1109
- icon?: (props: typeof __VLS_5) => any;
1125
+ suggestions?: (props: typeof __VLS_23) => any;
1110
1126
  };
1111
1127
  declare const __VLS_base$7: vue.DefineComponent<__VLS_Props$8, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$8> & Readonly<{}>, {
1112
1128
  description: string;
@@ -1135,6 +1151,8 @@ type __VLS_Props$7 = {
1135
1151
  prompts?: PromptItem[];
1136
1152
  /** 网格标题 */
1137
1153
  title?: string;
1154
+ /** 换行模式(默认 true 自动换行;false 不换行,超出横向滚动) */
1155
+ wrap?: boolean;
1138
1156
  };
1139
1157
  declare var __VLS_1$4: {
1140
1158
  item: PromptItem;
@@ -1150,6 +1168,7 @@ declare const __VLS_base$6: vue.DefineComponent<__VLS_Props$7, {}, {}, {}, {}, v
1150
1168
  }>, {
1151
1169
  title: string;
1152
1170
  prompts: PromptItem[];
1171
+ wrap: boolean;
1153
1172
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
1154
1173
  declare const __VLS_export$7: __VLS_WithSlots$6<typeof __VLS_base$6, __VLS_Slots$6>;
1155
1174
  declare const _default$7: typeof __VLS_export$7;
@@ -1709,6 +1728,8 @@ type __VLS_Props$3 = {
1709
1728
  suggestions?: AiMessagesSuggestion[];
1710
1729
  /** 空态建议区标题 */
1711
1730
  suggestionsTitle?: string;
1731
+ /** 空态建议换行模式(默认 true 自动换行;false 不换行,超出横向滚动) */
1732
+ suggestionsWrap?: boolean;
1712
1733
  /** 用户上滚免打扰阈值(px):距底不超过该值视为「钉在底部」,流式/完成自动跟随 */
1713
1734
  scrollThreshold?: number;
1714
1735
  /** 显示滚到底部悬浮按钮 */
@@ -1731,6 +1752,8 @@ type __VLS_Props$3 = {
1731
1752
  userAvatar?: string;
1732
1753
  /** 助手头像图片 URL(透传 AiMessage) */
1733
1754
  assistantAvatar?: string;
1755
+ /** 助手头像缩放系数(透传 AiMessage;内置 GIF 默认 1.3 裁边,自定义图片默认 1) */
1756
+ assistantAvatarScale?: number;
1734
1757
  /** 用户名称(透传 AiMessage) */
1735
1758
  userName?: string;
1736
1759
  /** 助手名称(透传 AiMessage) */
@@ -1753,57 +1776,83 @@ type __VLS_Props$3 = {
1753
1776
  declare function scrollToBottom(smooth?: boolean): void;
1754
1777
  /** 回到顶部:与 scrollToBottom 同款 try/catch 回落(happy-dom 旧版 scrollTo(options) 可能缺实现) */
1755
1778
  declare function scrollToTop(): void;
1779
+ /**
1780
+ * 滚动到指定位置(原生 scrollTo 透传):top/left/behavior 同 Window.scrollTo options,
1781
+ * 也接受 number(视为 top);供消费方程序化控制阅读位置(AiChat 转发 expose)。
1782
+ * 空态无滚动容器时静默。滚动后同步复核钉底态(真实浏览器程序滚动会触发 scroll
1783
+ * 事件自然重估,此处兜底无布局/测试环境)
1784
+ */
1785
+ declare function scrollTo$1(options: ScrollToOptions | number): void;
1786
+ declare function expandThoughtChains$1(): void;
1787
+ declare function collapseThoughtChains$1(): void;
1756
1788
  declare var __VLS_1$1: {};
1757
- declare var __VLS_27$1: {
1789
+ declare var __VLS_10: {};
1790
+ declare var __VLS_13: {};
1791
+ declare var __VLS_16$1: {};
1792
+ declare var __VLS_19: {};
1793
+ declare var __VLS_40: {
1758
1794
  message: MessageNode;
1759
1795
  };
1760
- declare var __VLS_30$1: {
1796
+ declare var __VLS_43: {
1761
1797
  message: MessageNode;
1762
1798
  };
1763
- declare var __VLS_33$1: {};
1764
- declare var __VLS_36$1: {
1799
+ declare var __VLS_46: {};
1800
+ declare var __VLS_49: {
1765
1801
  status: "thinking" | "error" | "done";
1766
1802
  message: MessageNode;
1767
1803
  };
1768
- declare var __VLS_39$1: {
1804
+ declare var __VLS_52: {
1769
1805
  message: MessageNode;
1770
1806
  };
1771
- declare var __VLS_42$1: {
1807
+ declare var __VLS_55: {
1772
1808
  message: MessageNode;
1773
1809
  };
1774
- declare var __VLS_50: {
1810
+ declare var __VLS_63$2: {
1775
1811
  scrollToBottom: typeof scrollToBottom;
1776
1812
  awayFromBottom: boolean;
1777
1813
  };
1778
- declare var __VLS_66: {};
1814
+ declare var __VLS_79: {};
1779
1815
  type __VLS_Slots$2 = {} & {
1780
1816
  empty?: (props: typeof __VLS_1$1) => any;
1781
1817
  } & {
1782
- 'message-avatar'?: (props: typeof __VLS_27$1) => any;
1818
+ 'welcome-name'?: (props: typeof __VLS_10) => any;
1819
+ } & {
1820
+ 'welcome-description'?: (props: typeof __VLS_13) => any;
1821
+ } & {
1822
+ 'welcome-icon'?: (props: typeof __VLS_16$1) => any;
1823
+ } & {
1824
+ 'welcome-suggestions'?: (props: typeof __VLS_19) => any;
1783
1825
  } & {
1784
- 'message-actions'?: (props: typeof __VLS_30$1) => any;
1826
+ 'message-avatar'?: (props: typeof __VLS_40) => any;
1785
1827
  } & {
1786
- 'user-avatar'?: (props: typeof __VLS_33$1) => any;
1828
+ 'message-actions'?: (props: typeof __VLS_43) => any;
1787
1829
  } & {
1788
- 'assistant-avatar'?: (props: typeof __VLS_36$1) => any;
1830
+ 'user-avatar'?: (props: typeof __VLS_46) => any;
1789
1831
  } & {
1790
- 'user-name'?: (props: typeof __VLS_39$1) => any;
1832
+ 'assistant-avatar'?: (props: typeof __VLS_49) => any;
1791
1833
  } & {
1792
- 'assistant-name'?: (props: typeof __VLS_42$1) => any;
1834
+ 'user-name'?: (props: typeof __VLS_52) => any;
1793
1835
  } & {
1794
- 'scroll-button'?: (props: typeof __VLS_50) => any;
1836
+ 'assistant-name'?: (props: typeof __VLS_55) => any;
1795
1837
  } & {
1796
- 'scroll-button-icon'?: (props: typeof __VLS_66) => any;
1838
+ 'scroll-button'?: (props: typeof __VLS_63$2) => any;
1839
+ } & {
1840
+ 'scroll-button-icon'?: (props: typeof __VLS_79) => any;
1797
1841
  };
1798
1842
  declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$3, {
1843
+ scrollTo: typeof scrollTo$1;
1799
1844
  scrollToBottom: typeof scrollToBottom;
1800
1845
  scrollToTop: typeof scrollToTop;
1846
+ expandThoughtChains: typeof expandThoughtChains$1;
1847
+ collapseThoughtChains: typeof collapseThoughtChains$1;
1801
1848
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
1849
+ scroll: (event: Event) => any;
1802
1850
  copy: (message: MessageNode) => any;
1803
1851
  regenerate: (message: MessageNode) => any;
1804
1852
  select: (item: AiMessagesSuggestion) => any;
1805
1853
  "branch-change": (dir: BranchDirection, message: MessageNode) => any;
1806
1854
  }, string, vue.PublicProps, Readonly<__VLS_Props$3> & Readonly<{
1855
+ onScroll?: ((event: Event) => any) | undefined;
1807
1856
  onCopy?: ((message: MessageNode) => any) | undefined;
1808
1857
  onRegenerate?: ((message: MessageNode) => any) | undefined;
1809
1858
  onSelect?: ((item: AiMessagesSuggestion) => any) | undefined;
@@ -1811,14 +1860,15 @@ declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$3, {
1811
1860
  }>, {
1812
1861
  description: string;
1813
1862
  name: string;
1863
+ icon: string | Component;
1814
1864
  typing: boolean | {
1815
1865
  step?: number;
1816
1866
  interval?: number;
1817
1867
  };
1818
- icon: string | Component;
1819
1868
  nodes: Record<string, MessageNode>;
1820
1869
  collapsible: boolean;
1821
1870
  showDuration: boolean;
1871
+ suggestions: AiMessagesSuggestion[];
1822
1872
  showActions: boolean;
1823
1873
  showBranchSwitch: boolean;
1824
1874
  showUserAvatar: boolean;
@@ -1827,10 +1877,11 @@ declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$3, {
1827
1877
  showAssistantName: boolean;
1828
1878
  userAvatar: string;
1829
1879
  assistantAvatar: string;
1880
+ assistantAvatarScale: number;
1830
1881
  userName: string;
1831
1882
  assistantName: string;
1832
- suggestions: AiMessagesSuggestion[];
1833
1883
  suggestionsTitle: string;
1884
+ suggestionsWrap: boolean;
1834
1885
  scrollThreshold: number;
1835
1886
  showScrollButton: boolean;
1836
1887
  scrollButtonThreshold: number;
@@ -1905,12 +1956,19 @@ type __VLS_Props$2 = {
1905
1956
  userAvatar?: string;
1906
1957
  /** 助手头像图片 URL(空串回落内置图标;assistant-avatar 插槽可整体覆盖) */
1907
1958
  assistantAvatar?: string;
1959
+ /** 助手头像缩放系数(透传 AiMessages→AiMessage;内置 GIF 默认 1.3 裁掉四周留白,自定义图片默认 1) */
1960
+ assistantAvatarScale?: number;
1908
1961
  /** 用户名称(空串回落「你」;user-name 插槽可整体覆盖) */
1909
1962
  userName?: string;
1910
1963
  /** 助手名称(空串回落「助手」;assistant-name 插槽可整体覆盖) */
1911
1964
  assistantName?: string;
1912
1965
  /** 输入框占位 */
1913
1966
  placeholder?: string;
1967
+ /** 输入区自增高(透传 Sender autosize;缺省 3 行起步,内容多时自动加高至最多 7 行) */
1968
+ senderAutosize?: {
1969
+ minRows?: number;
1970
+ maxRows?: number;
1971
+ };
1914
1972
  /** 工具名 → 步骤展示名(透传 useChat toolStepLabel,流式工具轨迹步骤的 title) */
1915
1973
  toolStepLabel?: (toolName: string) => string;
1916
1974
  /** 打字机(透传 AiMessages;仅 assistant 流式期间逐字平滑打出,
@@ -1928,6 +1986,8 @@ type __VLS_Props$2 = {
1928
1986
  senderShadow?: boolean;
1929
1987
  /** 空态建议列表 */
1930
1988
  suggestions?: AiChatSuggestion[];
1989
+ /** 空态建议换行模式(透传 AiMessages→Prompts;默认 true 自动换行,false 不换行横向滚动) */
1990
+ suggestionsWrap?: boolean;
1931
1991
  /** 特性开关 */
1932
1992
  features?: AiChatFeatures;
1933
1993
  /** 开启输入区附件上传(输入框上方回形针 + 附件列表,发送时随 @send 上抛 files) */
@@ -1954,50 +2014,68 @@ declare function clearMessages(): void;
1954
2014
  declare function exportTxt(): string;
1955
2015
  /** 程序化打开某个 artifact(ref 方法) */
1956
2016
  declare function openArtifact(key: string): void;
1957
- declare var __VLS_24: {
1958
- message: MessageNode;
1959
- };
2017
+ /** 全部展开当前链上消息的思考链(单 item 平铺形态不受控,内容常驻展开) */
2018
+ declare function expandThoughtChains(): void;
2019
+ /** 全部折叠当前链上消息的思考链(user 消息/无思考链消息/单 item 平铺形态不受控) */
2020
+ declare function collapseThoughtChains(): void;
2021
+ /** 消息区滚动到指定位置(透传 AiMessages scrollTo;options 同原生 ScrollToOptions) */
2022
+ declare function scrollTo(options: ScrollToOptions | number): void;
1960
2023
  declare var __VLS_27: {
1961
2024
  message: MessageNode;
1962
2025
  };
1963
- declare var __VLS_30: {};
1964
- declare var __VLS_33: {
1965
- status: "thinking" | "error" | "done";
2026
+ declare var __VLS_30: {
1966
2027
  message: MessageNode;
1967
2028
  };
2029
+ declare var __VLS_33: {};
1968
2030
  declare var __VLS_36: {
2031
+ status: "thinking" | "error" | "done";
1969
2032
  message: MessageNode;
1970
2033
  };
1971
2034
  declare var __VLS_39: {
1972
2035
  message: MessageNode;
1973
2036
  };
1974
- declare var __VLS_42: {};
1975
- declare var __VLS_45: {
2037
+ declare var __VLS_42: {
2038
+ message: MessageNode;
2039
+ };
2040
+ declare var __VLS_45: {};
2041
+ declare var __VLS_48: {};
2042
+ declare var __VLS_51: {};
2043
+ declare var __VLS_54: {};
2044
+ declare var __VLS_57: {};
2045
+ declare var __VLS_60: {
1976
2046
  scrollToBottom: (smooth?: boolean) => void;
1977
2047
  awayFromBottom: boolean;
1978
2048
  };
1979
- declare var __VLS_48: {};
1980
- declare var __VLS_84: {};
2049
+ declare var __VLS_63$1: {};
2050
+ declare var __VLS_99: {};
1981
2051
  type __VLS_Slots$1 = {} & {
1982
- 'message-avatar'?: (props: typeof __VLS_24) => any;
2052
+ 'message-avatar'?: (props: typeof __VLS_27) => any;
2053
+ } & {
2054
+ 'message-actions'?: (props: typeof __VLS_30) => any;
2055
+ } & {
2056
+ 'user-avatar'?: (props: typeof __VLS_33) => any;
2057
+ } & {
2058
+ 'assistant-avatar'?: (props: typeof __VLS_36) => any;
1983
2059
  } & {
1984
- 'message-actions'?: (props: typeof __VLS_27) => any;
2060
+ 'user-name'?: (props: typeof __VLS_39) => any;
1985
2061
  } & {
1986
- 'user-avatar'?: (props: typeof __VLS_30) => any;
2062
+ 'assistant-name'?: (props: typeof __VLS_42) => any;
1987
2063
  } & {
1988
- 'assistant-avatar'?: (props: typeof __VLS_33) => any;
2064
+ empty?: (props: typeof __VLS_45) => any;
1989
2065
  } & {
1990
- 'user-name'?: (props: typeof __VLS_36) => any;
2066
+ 'welcome-name'?: (props: typeof __VLS_48) => any;
1991
2067
  } & {
1992
- 'assistant-name'?: (props: typeof __VLS_39) => any;
2068
+ 'welcome-description'?: (props: typeof __VLS_51) => any;
1993
2069
  } & {
1994
- empty?: (props: typeof __VLS_42) => any;
2070
+ 'welcome-icon'?: (props: typeof __VLS_54) => any;
1995
2071
  } & {
1996
- 'scroll-button'?: (props: typeof __VLS_45) => any;
2072
+ 'welcome-suggestions'?: (props: typeof __VLS_57) => any;
1997
2073
  } & {
1998
- 'scroll-button-icon'?: (props: typeof __VLS_48) => any;
2074
+ 'scroll-button'?: (props: typeof __VLS_60) => any;
1999
2075
  } & {
2000
- 'sender-prefix'?: (props: typeof __VLS_84) => any;
2076
+ 'scroll-button-icon'?: (props: typeof __VLS_63$1) => any;
2077
+ } & {
2078
+ 'sender-prefix'?: (props: typeof __VLS_99) => any;
2001
2079
  };
2002
2080
  declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
2003
2081
  sendMessage: typeof sendMessage;
@@ -2007,11 +2085,16 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
2007
2085
  clearMessages: typeof clearMessages;
2008
2086
  exportTxt: typeof exportTxt;
2009
2087
  openArtifact: typeof openArtifact;
2088
+ expandThoughtChains: typeof expandThoughtChains;
2089
+ collapseThoughtChains: typeof collapseThoughtChains;
2090
+ scrollTo: typeof scrollTo;
2010
2091
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
2092
+ scroll: (event: Event) => any;
2011
2093
  send: (text: string, files?: ChatFile[] | undefined) => any;
2012
2094
  error: (err: Error, message?: MessageNode | undefined) => any;
2013
2095
  "branch-change": (dir: BranchDirection, message: MessageNode) => any;
2014
2096
  "update:messages": (value: MessageNode[]) => any;
2097
+ "suggestion-select": (item: AiChatSuggestion) => any;
2015
2098
  "message-complete": (message: MessageNode) => any;
2016
2099
  "attachment-exceed": (file: File) => any;
2017
2100
  "tool-event": (ev: {
@@ -2019,10 +2102,12 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
2019
2102
  status: "start" | "done";
2020
2103
  }) => any;
2021
2104
  }, string, vue.PublicProps, Readonly<__VLS_Props$2> & Readonly<{
2105
+ onScroll?: ((event: Event) => any) | undefined;
2022
2106
  onSend?: ((text: string, files?: ChatFile[] | undefined) => any) | undefined;
2023
2107
  onError?: ((err: Error, message?: MessageNode | undefined) => any) | undefined;
2024
2108
  "onBranch-change"?: ((dir: BranchDirection, message: MessageNode) => any) | undefined;
2025
2109
  "onUpdate:messages"?: ((value: MessageNode[]) => any) | undefined;
2110
+ "onSuggestion-select"?: ((item: AiChatSuggestion) => any) | undefined;
2026
2111
  "onMessage-complete"?: ((message: MessageNode) => any) | undefined;
2027
2112
  "onAttachment-exceed"?: ((file: File) => any) | undefined;
2028
2113
  "onTool-event"?: ((ev: {
@@ -2038,6 +2123,7 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
2038
2123
  placeholder: string;
2039
2124
  collapsible: boolean;
2040
2125
  showDuration: boolean;
2126
+ suggestions: AiChatSuggestion[];
2041
2127
  accept: string;
2042
2128
  baseURL: string;
2043
2129
  apiKey: string;
@@ -2049,9 +2135,10 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
2049
2135
  showAssistantName: boolean;
2050
2136
  userAvatar: string;
2051
2137
  assistantAvatar: string;
2138
+ assistantAvatarScale: number;
2052
2139
  userName: string;
2053
2140
  assistantName: string;
2054
- suggestions: AiChatSuggestion[];
2141
+ suggestionsWrap: boolean;
2055
2142
  scrollThreshold: number;
2056
2143
  showScrollButton: boolean;
2057
2144
  scrollButtonThreshold: number;
@@ -2059,6 +2146,10 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
2059
2146
  adapter: ChatAdapter;
2060
2147
  showHeader: boolean;
2061
2148
  centerWelcome: boolean;
2149
+ senderAutosize: {
2150
+ minRows?: number;
2151
+ maxRows?: number;
2152
+ };
2062
2153
  toolStepLabel: (toolName: string) => string;
2063
2154
  senderShadow: boolean;
2064
2155
  features: AiChatFeatures;
@@ -2103,6 +2194,9 @@ type __VLS_Props$1 = {
2103
2194
  userAvatar?: string;
2104
2195
  /** 助手头像图片 URL(传入则完全覆盖不分状态;空串按状态回落内置 GIF:thinking=fvai-thinking.gif,done/error=fvai-idle.gif;细分插槽可整体覆盖) */
2105
2196
  assistantAvatar?: string;
2197
+ /** 助手头像缩放系数(内置 GIF 四周留白多,默认 1.3 放大裁边;自定义 URL 默认 1;
2198
+ * 亦可用 CSS 变量 --fv-msg-avatar-scale 覆盖,prop 优先) */
2199
+ assistantAvatarScale?: number;
2106
2200
  /** 用户名称(空串回落「你」;细分插槽可整体覆盖) */
2107
2201
  userName?: string;
2108
2202
  /** 助手名称(空串回落「小维」;细分插槽可整体覆盖) */
@@ -2124,6 +2218,9 @@ type __VLS_Props$1 = {
2124
2218
  /** 语言包:'zh-CN'/'en-US' 整包或部分文案对象(优先于祖先注入与全局设置) */
2125
2219
  locale?: LocaleInput;
2126
2220
  };
2221
+ /** 展开/折叠本条消息的思考链(user 消息与无思考链消息调用无效) */
2222
+ declare function expandThoughtChain(): void;
2223
+ declare function collapseThoughtChain(): void;
2127
2224
  declare var __VLS_1: {
2128
2225
  message: MessageNode;
2129
2226
  };
@@ -2162,6 +2259,8 @@ type __VLS_Slots = {} & {
2162
2259
  };
2163
2260
  declare const __VLS_base: vue.DefineComponent<__VLS_Props$1, {
2164
2261
  message: vue.ComputedRef<MessageNode>;
2262
+ expandThoughtChain: typeof expandThoughtChain;
2263
+ collapseThoughtChain: typeof collapseThoughtChain;
2165
2264
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
2166
2265
  copy: (message: MessageNode) => any;
2167
2266
  regenerate: (message: MessageNode) => any;
@@ -2189,6 +2288,7 @@ declare const __VLS_base: vue.DefineComponent<__VLS_Props$1, {
2189
2288
  showAssistantName: boolean;
2190
2289
  userAvatar: string;
2191
2290
  assistantAvatar: string;
2291
+ assistantAvatarScale: number;
2192
2292
  userName: string;
2193
2293
  assistantName: string;
2194
2294
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;