@fv-ui/ai-chat 0.14.1 → 1.1.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/README.md +951 -915
- package/dist/index.d.ts +231 -91
- package/dist/style.css +1 -1
- package/es/index.mjs +719 -363
- package/lib/index.js +721 -365
- package/package.json +1 -1
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<{}>, {
|
|
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$
|
|
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$
|
|
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$
|
|
425
|
+
declare var __VLS_16$2: {
|
|
413
426
|
item: BubbleListItemProps;
|
|
414
427
|
index: number;
|
|
415
428
|
};
|
|
416
|
-
declare var __VLS_19$
|
|
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$
|
|
442
|
+
content?: (props: typeof __VLS_16$2) => any;
|
|
430
443
|
} & {
|
|
431
|
-
loading?: (props: typeof __VLS_19$
|
|
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$
|
|
526
|
-
declare var __VLS_5
|
|
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$
|
|
549
|
+
'body-top'?: (props: typeof __VLS_3$3) => any;
|
|
537
550
|
} & {
|
|
538
|
-
prefix?: (props: typeof __VLS_5
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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
|
|
1103
|
-
declare var
|
|
1115
|
+
declare var __VLS_19$1: {};
|
|
1116
|
+
declare var __VLS_21$1: {};
|
|
1117
|
+
declare var __VLS_23: {};
|
|
1104
1118
|
type __VLS_Slots$7 = {} & {
|
|
1105
|
-
|
|
1119
|
+
icon?: (props: typeof __VLS_1$5) => any;
|
|
1120
|
+
} & {
|
|
1121
|
+
name?: (props: typeof __VLS_19$1) => any;
|
|
1106
1122
|
} & {
|
|
1107
|
-
description?: (props: typeof
|
|
1123
|
+
description?: (props: typeof __VLS_21$1) => any;
|
|
1108
1124
|
} & {
|
|
1109
|
-
|
|
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;
|
|
@@ -1659,6 +1678,13 @@ interface MessageNode {
|
|
|
1659
1678
|
error?: string;
|
|
1660
1679
|
/** 创建时间戳(ms) */
|
|
1661
1680
|
createdAt: number;
|
|
1681
|
+
/**
|
|
1682
|
+
* 后端消息行创建时间(Fv 系带会话管理后端,消费方从 FvCommonMessage.createdTime
|
|
1683
|
+
* 原样直灌):不同项目可能返回秒级时间戳(1791427713)、毫秒级时间戳或
|
|
1684
|
+
* ISO 字符串("2026-10-07T20:08:44",亦可能被消费方 JSON 序列化包一层引号成
|
|
1685
|
+
* "\"2026-...\"")。消息时间的展示优先取本字段(自动识别格式),缺省回落 createdAt
|
|
1686
|
+
*/
|
|
1687
|
+
createdTime?: string | number;
|
|
1662
1688
|
usage?: MessageUsage;
|
|
1663
1689
|
}
|
|
1664
1690
|
/** addMessage 入参:id/childrenIds 由树生成;parentId 缺省挂到当前焦点 */
|
|
@@ -1709,6 +1735,8 @@ type __VLS_Props$3 = {
|
|
|
1709
1735
|
suggestions?: AiMessagesSuggestion[];
|
|
1710
1736
|
/** 空态建议区标题 */
|
|
1711
1737
|
suggestionsTitle?: string;
|
|
1738
|
+
/** 空态建议换行模式(默认 true 自动换行;false 不换行,超出横向滚动) */
|
|
1739
|
+
suggestionsWrap?: boolean;
|
|
1712
1740
|
/** 用户上滚免打扰阈值(px):距底不超过该值视为「钉在底部」,流式/完成自动跟随 */
|
|
1713
1741
|
scrollThreshold?: number;
|
|
1714
1742
|
/** 显示滚到底部悬浮按钮 */
|
|
@@ -1719,18 +1747,22 @@ type __VLS_Props$3 = {
|
|
|
1719
1747
|
showActions?: boolean;
|
|
1720
1748
|
/** 显示分支切换器 */
|
|
1721
1749
|
showBranchSwitch?: boolean;
|
|
1722
|
-
/** 显示用户头像(
|
|
1750
|
+
/** 显示用户头像(助手头像不受影响;默认隐藏) */
|
|
1723
1751
|
showUserAvatar?: boolean;
|
|
1724
|
-
/** 显示用户名称(
|
|
1752
|
+
/** 显示用户名称(助手名称不受影响;默认隐藏) */
|
|
1725
1753
|
showUserName?: boolean;
|
|
1726
|
-
/** 显示助手头像(
|
|
1754
|
+
/** 显示助手头像(用户头像不受影响;默认显示) */
|
|
1727
1755
|
showAssistantAvatar?: boolean;
|
|
1728
|
-
/** 显示助手名称(
|
|
1756
|
+
/** 显示助手名称(用户名称不受影响;默认隐藏) */
|
|
1729
1757
|
showAssistantName?: boolean;
|
|
1730
1758
|
/** 用户头像图片 URL(透传 AiMessage) */
|
|
1731
1759
|
userAvatar?: string;
|
|
1732
1760
|
/** 助手头像图片 URL(透传 AiMessage) */
|
|
1733
1761
|
assistantAvatar?: string;
|
|
1762
|
+
/** 助手头像缩放系数(透传 AiMessage;默认 1 不缩放) */
|
|
1763
|
+
assistantAvatarScale?: number;
|
|
1764
|
+
/** 头像圆形模式(透传 AiMessage;默认 true:圆角 50%;--fv-msg-avatar-radius 变量优先) */
|
|
1765
|
+
avatarCircle?: boolean;
|
|
1734
1766
|
/** 用户名称(透传 AiMessage) */
|
|
1735
1767
|
userName?: string;
|
|
1736
1768
|
/** 助手名称(透传 AiMessage) */
|
|
@@ -1747,63 +1779,93 @@ type __VLS_Props$3 = {
|
|
|
1747
1779
|
/** 代码块「预览」触发语言(透传 AiMessage→Markdown;命中语言的代码块右上角注入按钮,
|
|
1748
1780
|
* 点击行为由消费方事件委托实现,如 AiChat 打开 Artifacts 面板) */
|
|
1749
1781
|
codeTriggerLangs?: string[];
|
|
1782
|
+
/** 显示消息时间(透传 AiMessage;默认 true) */
|
|
1783
|
+
showTime?: boolean;
|
|
1784
|
+
/** 消息时间自定义格式化(透传 AiMessage) */
|
|
1785
|
+
timeFormat?: (message: MessageNode, timestamp: number) => string;
|
|
1750
1786
|
/** 语言包:'zh-CN'/'en-US' 整包或部分文案对象(优先于祖先注入与全局设置) */
|
|
1751
1787
|
locale?: LocaleInput;
|
|
1752
1788
|
};
|
|
1753
1789
|
declare function scrollToBottom(smooth?: boolean): void;
|
|
1754
1790
|
/** 回到顶部:与 scrollToBottom 同款 try/catch 回落(happy-dom 旧版 scrollTo(options) 可能缺实现) */
|
|
1755
1791
|
declare function scrollToTop(): void;
|
|
1792
|
+
/**
|
|
1793
|
+
* 滚动到指定位置(原生 scrollTo 透传):top/left/behavior 同 Window.scrollTo options,
|
|
1794
|
+
* 也接受 number(视为 top);供消费方程序化控制阅读位置(AiChat 转发 expose)。
|
|
1795
|
+
* 空态无滚动容器时静默。滚动后同步复核钉底态(真实浏览器程序滚动会触发 scroll
|
|
1796
|
+
* 事件自然重估,此处兜底无布局/测试环境)
|
|
1797
|
+
*/
|
|
1798
|
+
declare function scrollTo$1(options: ScrollToOptions | number): void;
|
|
1799
|
+
declare function expandThoughtChains$1(): void;
|
|
1800
|
+
declare function collapseThoughtChains$1(): void;
|
|
1756
1801
|
declare var __VLS_1$1: {};
|
|
1757
|
-
declare var
|
|
1802
|
+
declare var __VLS_10: {};
|
|
1803
|
+
declare var __VLS_13: {};
|
|
1804
|
+
declare var __VLS_16$1: {};
|
|
1805
|
+
declare var __VLS_19: {};
|
|
1806
|
+
declare var __VLS_40: {
|
|
1758
1807
|
message: MessageNode;
|
|
1759
1808
|
};
|
|
1760
|
-
declare var
|
|
1809
|
+
declare var __VLS_43: {
|
|
1761
1810
|
message: MessageNode;
|
|
1762
1811
|
};
|
|
1763
|
-
declare var
|
|
1764
|
-
declare var
|
|
1812
|
+
declare var __VLS_46: {};
|
|
1813
|
+
declare var __VLS_49: {
|
|
1765
1814
|
status: "thinking" | "error" | "done";
|
|
1766
1815
|
message: MessageNode;
|
|
1767
1816
|
};
|
|
1768
|
-
declare var
|
|
1817
|
+
declare var __VLS_52: {
|
|
1769
1818
|
message: MessageNode;
|
|
1770
1819
|
};
|
|
1771
|
-
declare var
|
|
1820
|
+
declare var __VLS_55: {
|
|
1772
1821
|
message: MessageNode;
|
|
1773
1822
|
};
|
|
1774
|
-
declare var
|
|
1823
|
+
declare var __VLS_63$2: {
|
|
1775
1824
|
scrollToBottom: typeof scrollToBottom;
|
|
1776
1825
|
awayFromBottom: boolean;
|
|
1777
1826
|
};
|
|
1778
|
-
declare var
|
|
1827
|
+
declare var __VLS_79: {};
|
|
1779
1828
|
type __VLS_Slots$2 = {} & {
|
|
1780
1829
|
empty?: (props: typeof __VLS_1$1) => any;
|
|
1781
1830
|
} & {
|
|
1782
|
-
'
|
|
1831
|
+
'welcome-name'?: (props: typeof __VLS_10) => any;
|
|
1832
|
+
} & {
|
|
1833
|
+
'welcome-description'?: (props: typeof __VLS_13) => any;
|
|
1834
|
+
} & {
|
|
1835
|
+
'welcome-icon'?: (props: typeof __VLS_16$1) => any;
|
|
1783
1836
|
} & {
|
|
1784
|
-
'
|
|
1837
|
+
'welcome-suggestions'?: (props: typeof __VLS_19) => any;
|
|
1785
1838
|
} & {
|
|
1786
|
-
'
|
|
1839
|
+
'message-avatar'?: (props: typeof __VLS_40) => any;
|
|
1787
1840
|
} & {
|
|
1788
|
-
'
|
|
1841
|
+
'message-actions'?: (props: typeof __VLS_43) => any;
|
|
1789
1842
|
} & {
|
|
1790
|
-
'user-
|
|
1843
|
+
'user-avatar'?: (props: typeof __VLS_46) => any;
|
|
1791
1844
|
} & {
|
|
1792
|
-
'assistant-
|
|
1845
|
+
'assistant-avatar'?: (props: typeof __VLS_49) => any;
|
|
1793
1846
|
} & {
|
|
1794
|
-
'
|
|
1847
|
+
'user-name'?: (props: typeof __VLS_52) => any;
|
|
1795
1848
|
} & {
|
|
1796
|
-
'
|
|
1849
|
+
'assistant-name'?: (props: typeof __VLS_55) => any;
|
|
1850
|
+
} & {
|
|
1851
|
+
'scroll-button'?: (props: typeof __VLS_63$2) => any;
|
|
1852
|
+
} & {
|
|
1853
|
+
'scroll-button-icon'?: (props: typeof __VLS_79) => any;
|
|
1797
1854
|
};
|
|
1798
1855
|
declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$3, {
|
|
1856
|
+
scrollTo: typeof scrollTo$1;
|
|
1799
1857
|
scrollToBottom: typeof scrollToBottom;
|
|
1800
1858
|
scrollToTop: typeof scrollToTop;
|
|
1859
|
+
expandThoughtChains: typeof expandThoughtChains$1;
|
|
1860
|
+
collapseThoughtChains: typeof collapseThoughtChains$1;
|
|
1801
1861
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
1862
|
+
scroll: (event: Event) => any;
|
|
1802
1863
|
copy: (message: MessageNode) => any;
|
|
1803
1864
|
regenerate: (message: MessageNode) => any;
|
|
1804
1865
|
select: (item: AiMessagesSuggestion) => any;
|
|
1805
1866
|
"branch-change": (dir: BranchDirection, message: MessageNode) => any;
|
|
1806
1867
|
}, string, vue.PublicProps, Readonly<__VLS_Props$3> & Readonly<{
|
|
1868
|
+
onScroll?: ((event: Event) => any) | undefined;
|
|
1807
1869
|
onCopy?: ((message: MessageNode) => any) | undefined;
|
|
1808
1870
|
onRegenerate?: ((message: MessageNode) => any) | undefined;
|
|
1809
1871
|
onSelect?: ((item: AiMessagesSuggestion) => any) | undefined;
|
|
@@ -1811,14 +1873,15 @@ declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$3, {
|
|
|
1811
1873
|
}>, {
|
|
1812
1874
|
description: string;
|
|
1813
1875
|
name: string;
|
|
1876
|
+
icon: string | Component;
|
|
1814
1877
|
typing: boolean | {
|
|
1815
1878
|
step?: number;
|
|
1816
1879
|
interval?: number;
|
|
1817
1880
|
};
|
|
1818
|
-
icon: string | Component;
|
|
1819
1881
|
nodes: Record<string, MessageNode>;
|
|
1820
1882
|
collapsible: boolean;
|
|
1821
1883
|
showDuration: boolean;
|
|
1884
|
+
suggestions: AiMessagesSuggestion[];
|
|
1822
1885
|
showActions: boolean;
|
|
1823
1886
|
showBranchSwitch: boolean;
|
|
1824
1887
|
showUserAvatar: boolean;
|
|
@@ -1827,10 +1890,14 @@ declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$3, {
|
|
|
1827
1890
|
showAssistantName: boolean;
|
|
1828
1891
|
userAvatar: string;
|
|
1829
1892
|
assistantAvatar: string;
|
|
1893
|
+
assistantAvatarScale: number;
|
|
1894
|
+
avatarCircle: boolean;
|
|
1830
1895
|
userName: string;
|
|
1831
1896
|
assistantName: string;
|
|
1832
|
-
|
|
1897
|
+
showTime: boolean;
|
|
1898
|
+
timeFormat: (message: MessageNode, timestamp: number) => string;
|
|
1833
1899
|
suggestionsTitle: string;
|
|
1900
|
+
suggestionsWrap: boolean;
|
|
1834
1901
|
scrollThreshold: number;
|
|
1835
1902
|
showScrollButton: boolean;
|
|
1836
1903
|
scrollButtonThreshold: number;
|
|
@@ -1893,24 +1960,34 @@ type __VLS_Props$2 = {
|
|
|
1893
1960
|
scrollButtonThreshold?: number;
|
|
1894
1961
|
/** 用户上滚免打扰阈值(px,透传 AiMessages):距底不超过该值视为「钉在底部」,流式自动跟随 */
|
|
1895
1962
|
scrollThreshold?: number;
|
|
1896
|
-
/** 显示用户头像(false
|
|
1963
|
+
/** 显示用户头像(false 时用户消息不渲染头像;助手头像不受影响;默认隐藏) */
|
|
1897
1964
|
showUserAvatar?: boolean;
|
|
1898
|
-
/** 显示用户名称(false
|
|
1965
|
+
/** 显示用户名称(false 时用户消息不渲染头部名称行;助手名称不受影响;默认隐藏) */
|
|
1899
1966
|
showUserName?: boolean;
|
|
1900
|
-
/** 显示助手头像(false
|
|
1967
|
+
/** 显示助手头像(false 时助手消息不渲染头像;用户头像不受影响;默认显示) */
|
|
1901
1968
|
showAssistantAvatar?: boolean;
|
|
1902
|
-
/** 显示助手名称(false
|
|
1969
|
+
/** 显示助手名称(false 时助手消息不渲染头部名称行;用户名称不受影响;默认隐藏) */
|
|
1903
1970
|
showAssistantName?: boolean;
|
|
1904
1971
|
/** 用户头像图片 URL(空串回落内置图标;user-avatar 插槽可整体覆盖) */
|
|
1905
1972
|
userAvatar?: string;
|
|
1906
1973
|
/** 助手头像图片 URL(空串回落内置图标;assistant-avatar 插槽可整体覆盖) */
|
|
1907
1974
|
assistantAvatar?: string;
|
|
1975
|
+
/** 助手头像缩放系数(透传 AiMessages→AiMessage;默认 1 不缩放) */
|
|
1976
|
+
assistantAvatarScale?: number;
|
|
1977
|
+
/** 头像圆形模式(透传 AiMessages→AiMessage;默认 true:圆角 50%;false 回落默认圆角;
|
|
1978
|
+
* 亦可用 CSS 变量 --fv-msg-avatar-radius 直接覆盖圆角,变量优先于开关) */
|
|
1979
|
+
avatarCircle?: boolean;
|
|
1908
1980
|
/** 用户名称(空串回落「你」;user-name 插槽可整体覆盖) */
|
|
1909
1981
|
userName?: string;
|
|
1910
1982
|
/** 助手名称(空串回落「助手」;assistant-name 插槽可整体覆盖) */
|
|
1911
1983
|
assistantName?: string;
|
|
1912
1984
|
/** 输入框占位 */
|
|
1913
1985
|
placeholder?: string;
|
|
1986
|
+
/** 输入区自增高(透传 Sender autosize;缺省 3 行起步,内容多时自动加高至最多 7 行) */
|
|
1987
|
+
senderAutosize?: {
|
|
1988
|
+
minRows?: number;
|
|
1989
|
+
maxRows?: number;
|
|
1990
|
+
};
|
|
1914
1991
|
/** 工具名 → 步骤展示名(透传 useChat toolStepLabel,流式工具轨迹步骤的 title) */
|
|
1915
1992
|
toolStepLabel?: (toolName: string) => string;
|
|
1916
1993
|
/** 打字机(透传 AiMessages;仅 assistant 流式期间逐字平滑打出,
|
|
@@ -1924,10 +2001,18 @@ type __VLS_Props$2 = {
|
|
|
1924
2001
|
collapsible?: boolean;
|
|
1925
2002
|
/** 显示工具步用时 description(透传至 ThoughtChain;默认关闭,流式期间不显示用时) */
|
|
1926
2003
|
showDuration?: boolean;
|
|
2004
|
+
/** 显示消息时间(操作区按钮之后;透传 AiMessages;默认 true)。时间源:
|
|
2005
|
+
* message.createdTime(Fv 系后端直灌,秒级/毫秒级时间戳或 ISO 字符串自动识别)优先,
|
|
2006
|
+
* 缺省回落 message.createdAt */
|
|
2007
|
+
showTime?: boolean;
|
|
2008
|
+
/** 消息时间自定义格式化(透传 AiMessage;缺省 'YYYY-MM-DD HH:mm' 本机时区) */
|
|
2009
|
+
timeFormat?: (message: MessageNode, timestamp: number) => string;
|
|
1927
2010
|
/** 输入区阴影效果(透传 Sender;关闭传 false) */
|
|
1928
2011
|
senderShadow?: boolean;
|
|
1929
2012
|
/** 空态建议列表 */
|
|
1930
2013
|
suggestions?: AiChatSuggestion[];
|
|
2014
|
+
/** 空态建议换行模式(透传 AiMessages→Prompts;默认 true 自动换行,false 不换行横向滚动) */
|
|
2015
|
+
suggestionsWrap?: boolean;
|
|
1931
2016
|
/** 特性开关 */
|
|
1932
2017
|
features?: AiChatFeatures;
|
|
1933
2018
|
/** 开启输入区附件上传(输入框上方回形针 + 附件列表,发送时随 @send 上抛 files) */
|
|
@@ -1954,50 +2039,68 @@ declare function clearMessages(): void;
|
|
|
1954
2039
|
declare function exportTxt(): string;
|
|
1955
2040
|
/** 程序化打开某个 artifact(ref 方法) */
|
|
1956
2041
|
declare function openArtifact(key: string): void;
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
2042
|
+
/** 全部展开当前链上消息的思考链(单 item 平铺形态不受控,内容常驻展开) */
|
|
2043
|
+
declare function expandThoughtChains(): void;
|
|
2044
|
+
/** 全部折叠当前链上消息的思考链(user 消息/无思考链消息/单 item 平铺形态不受控) */
|
|
2045
|
+
declare function collapseThoughtChains(): void;
|
|
2046
|
+
/** 消息区滚动到指定位置(透传 AiMessages scrollTo;options 同原生 ScrollToOptions) */
|
|
2047
|
+
declare function scrollTo(options: ScrollToOptions | number): void;
|
|
1960
2048
|
declare var __VLS_27: {
|
|
1961
2049
|
message: MessageNode;
|
|
1962
2050
|
};
|
|
1963
|
-
declare var __VLS_30: {
|
|
1964
|
-
declare var __VLS_33: {
|
|
1965
|
-
status: "thinking" | "error" | "done";
|
|
2051
|
+
declare var __VLS_30: {
|
|
1966
2052
|
message: MessageNode;
|
|
1967
2053
|
};
|
|
2054
|
+
declare var __VLS_33: {};
|
|
1968
2055
|
declare var __VLS_36: {
|
|
2056
|
+
status: "thinking" | "error" | "done";
|
|
1969
2057
|
message: MessageNode;
|
|
1970
2058
|
};
|
|
1971
2059
|
declare var __VLS_39: {
|
|
1972
2060
|
message: MessageNode;
|
|
1973
2061
|
};
|
|
1974
|
-
declare var __VLS_42: {
|
|
1975
|
-
|
|
2062
|
+
declare var __VLS_42: {
|
|
2063
|
+
message: MessageNode;
|
|
2064
|
+
};
|
|
2065
|
+
declare var __VLS_45: {};
|
|
2066
|
+
declare var __VLS_48: {};
|
|
2067
|
+
declare var __VLS_51: {};
|
|
2068
|
+
declare var __VLS_54: {};
|
|
2069
|
+
declare var __VLS_57: {};
|
|
2070
|
+
declare var __VLS_60: {
|
|
1976
2071
|
scrollToBottom: (smooth?: boolean) => void;
|
|
1977
2072
|
awayFromBottom: boolean;
|
|
1978
2073
|
};
|
|
1979
|
-
declare var
|
|
1980
|
-
declare var
|
|
2074
|
+
declare var __VLS_63$1: {};
|
|
2075
|
+
declare var __VLS_99: {};
|
|
1981
2076
|
type __VLS_Slots$1 = {} & {
|
|
1982
|
-
'message-avatar'?: (props: typeof
|
|
2077
|
+
'message-avatar'?: (props: typeof __VLS_27) => any;
|
|
2078
|
+
} & {
|
|
2079
|
+
'message-actions'?: (props: typeof __VLS_30) => any;
|
|
2080
|
+
} & {
|
|
2081
|
+
'user-avatar'?: (props: typeof __VLS_33) => any;
|
|
1983
2082
|
} & {
|
|
1984
|
-
'
|
|
2083
|
+
'assistant-avatar'?: (props: typeof __VLS_36) => any;
|
|
1985
2084
|
} & {
|
|
1986
|
-
'user-
|
|
2085
|
+
'user-name'?: (props: typeof __VLS_39) => any;
|
|
1987
2086
|
} & {
|
|
1988
|
-
'assistant-
|
|
2087
|
+
'assistant-name'?: (props: typeof __VLS_42) => any;
|
|
1989
2088
|
} & {
|
|
1990
|
-
|
|
2089
|
+
empty?: (props: typeof __VLS_45) => any;
|
|
1991
2090
|
} & {
|
|
1992
|
-
'
|
|
2091
|
+
'welcome-name'?: (props: typeof __VLS_48) => any;
|
|
1993
2092
|
} & {
|
|
1994
|
-
|
|
2093
|
+
'welcome-description'?: (props: typeof __VLS_51) => any;
|
|
1995
2094
|
} & {
|
|
1996
|
-
'
|
|
2095
|
+
'welcome-icon'?: (props: typeof __VLS_54) => any;
|
|
1997
2096
|
} & {
|
|
1998
|
-
'
|
|
2097
|
+
'welcome-suggestions'?: (props: typeof __VLS_57) => any;
|
|
1999
2098
|
} & {
|
|
2000
|
-
'
|
|
2099
|
+
'scroll-button'?: (props: typeof __VLS_60) => any;
|
|
2100
|
+
} & {
|
|
2101
|
+
'scroll-button-icon'?: (props: typeof __VLS_63$1) => any;
|
|
2102
|
+
} & {
|
|
2103
|
+
'sender-prefix'?: (props: typeof __VLS_99) => any;
|
|
2001
2104
|
};
|
|
2002
2105
|
declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
|
|
2003
2106
|
sendMessage: typeof sendMessage;
|
|
@@ -2007,11 +2110,16 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
|
|
|
2007
2110
|
clearMessages: typeof clearMessages;
|
|
2008
2111
|
exportTxt: typeof exportTxt;
|
|
2009
2112
|
openArtifact: typeof openArtifact;
|
|
2113
|
+
expandThoughtChains: typeof expandThoughtChains;
|
|
2114
|
+
collapseThoughtChains: typeof collapseThoughtChains;
|
|
2115
|
+
scrollTo: typeof scrollTo;
|
|
2010
2116
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
2117
|
+
scroll: (event: Event) => any;
|
|
2011
2118
|
send: (text: string, files?: ChatFile[] | undefined) => any;
|
|
2012
2119
|
error: (err: Error, message?: MessageNode | undefined) => any;
|
|
2013
2120
|
"branch-change": (dir: BranchDirection, message: MessageNode) => any;
|
|
2014
2121
|
"update:messages": (value: MessageNode[]) => any;
|
|
2122
|
+
"suggestion-select": (item: AiChatSuggestion) => any;
|
|
2015
2123
|
"message-complete": (message: MessageNode) => any;
|
|
2016
2124
|
"attachment-exceed": (file: File) => any;
|
|
2017
2125
|
"tool-event": (ev: {
|
|
@@ -2019,10 +2127,12 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
|
|
|
2019
2127
|
status: "start" | "done";
|
|
2020
2128
|
}) => any;
|
|
2021
2129
|
}, string, vue.PublicProps, Readonly<__VLS_Props$2> & Readonly<{
|
|
2130
|
+
onScroll?: ((event: Event) => any) | undefined;
|
|
2022
2131
|
onSend?: ((text: string, files?: ChatFile[] | undefined) => any) | undefined;
|
|
2023
2132
|
onError?: ((err: Error, message?: MessageNode | undefined) => any) | undefined;
|
|
2024
2133
|
"onBranch-change"?: ((dir: BranchDirection, message: MessageNode) => any) | undefined;
|
|
2025
2134
|
"onUpdate:messages"?: ((value: MessageNode[]) => any) | undefined;
|
|
2135
|
+
"onSuggestion-select"?: ((item: AiChatSuggestion) => any) | undefined;
|
|
2026
2136
|
"onMessage-complete"?: ((message: MessageNode) => any) | undefined;
|
|
2027
2137
|
"onAttachment-exceed"?: ((file: File) => any) | undefined;
|
|
2028
2138
|
"onTool-event"?: ((ev: {
|
|
@@ -2038,6 +2148,7 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
|
|
|
2038
2148
|
placeholder: string;
|
|
2039
2149
|
collapsible: boolean;
|
|
2040
2150
|
showDuration: boolean;
|
|
2151
|
+
suggestions: AiChatSuggestion[];
|
|
2041
2152
|
accept: string;
|
|
2042
2153
|
baseURL: string;
|
|
2043
2154
|
apiKey: string;
|
|
@@ -2049,9 +2160,13 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
|
|
|
2049
2160
|
showAssistantName: boolean;
|
|
2050
2161
|
userAvatar: string;
|
|
2051
2162
|
assistantAvatar: string;
|
|
2163
|
+
assistantAvatarScale: number;
|
|
2164
|
+
avatarCircle: boolean;
|
|
2052
2165
|
userName: string;
|
|
2053
2166
|
assistantName: string;
|
|
2054
|
-
|
|
2167
|
+
showTime: boolean;
|
|
2168
|
+
timeFormat: (message: MessageNode, timestamp: number) => string;
|
|
2169
|
+
suggestionsWrap: boolean;
|
|
2055
2170
|
scrollThreshold: number;
|
|
2056
2171
|
showScrollButton: boolean;
|
|
2057
2172
|
scrollButtonThreshold: number;
|
|
@@ -2059,6 +2174,10 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
|
|
|
2059
2174
|
adapter: ChatAdapter;
|
|
2060
2175
|
showHeader: boolean;
|
|
2061
2176
|
centerWelcome: boolean;
|
|
2177
|
+
senderAutosize: {
|
|
2178
|
+
minRows?: number;
|
|
2179
|
+
maxRows?: number;
|
|
2180
|
+
};
|
|
2062
2181
|
toolStepLabel: (toolName: string) => string;
|
|
2063
2182
|
senderShadow: boolean;
|
|
2064
2183
|
features: AiChatFeatures;
|
|
@@ -2091,18 +2210,23 @@ type __VLS_Props$1 = {
|
|
|
2091
2210
|
showActions?: boolean;
|
|
2092
2211
|
/** 显示分支切换器(branch.count > 1 时) */
|
|
2093
2212
|
showBranchSwitch?: boolean;
|
|
2094
|
-
/** 显示用户头像(false
|
|
2213
|
+
/** 显示用户头像(false 时用户消息不渲染头像块;助手侧不受影响;默认隐藏) */
|
|
2095
2214
|
showUserAvatar?: boolean;
|
|
2096
|
-
/** 显示用户名称(false
|
|
2215
|
+
/** 显示用户名称(false 时用户消息不渲染头部名称行;助手侧不受影响;默认隐藏) */
|
|
2097
2216
|
showUserName?: boolean;
|
|
2098
|
-
/** 显示助手头像(false
|
|
2217
|
+
/** 显示助手头像(false 时助手消息不渲染头像块;用户侧不受影响;默认显示) */
|
|
2099
2218
|
showAssistantAvatar?: boolean;
|
|
2100
|
-
/** 显示助手名称(false
|
|
2219
|
+
/** 显示助手名称(false 时助手消息不渲染头部名称行;用户侧不受影响;默认隐藏) */
|
|
2101
2220
|
showAssistantName?: boolean;
|
|
2102
2221
|
/** 用户头像图片 URL(空串回落内置图标;细分插槽可整体覆盖) */
|
|
2103
2222
|
userAvatar?: string;
|
|
2104
2223
|
/** 助手头像图片 URL(传入则完全覆盖不分状态;空串按状态回落内置 GIF:thinking=fvai-thinking.gif,done/error=fvai-idle.gif;细分插槽可整体覆盖) */
|
|
2105
2224
|
assistantAvatar?: string;
|
|
2225
|
+
/** 助手头像缩放系数(默认 1 不缩放;亦可用 CSS 变量 --fv-msg-avatar-scale 覆盖,prop 优先) */
|
|
2226
|
+
assistantAvatarScale?: number;
|
|
2227
|
+
/** 头像圆形模式(默认 true:圆角 50%;false 回落默认圆角)。亦可用 CSS 变量
|
|
2228
|
+
* --fv-msg-avatar-radius 直接覆盖圆角取值,变量优先于本开关 */
|
|
2229
|
+
avatarCircle?: boolean;
|
|
2106
2230
|
/** 用户名称(空串回落「你」;细分插槽可整体覆盖) */
|
|
2107
2231
|
userName?: string;
|
|
2108
2232
|
/** 助手名称(空串回落「小维」;细分插槽可整体覆盖) */
|
|
@@ -2121,9 +2245,19 @@ type __VLS_Props$1 = {
|
|
|
2121
2245
|
/** 代码块「预览」触发语言(透传 Markdown/Typewriter;命中语言的代码块右上角注入按钮,
|
|
2122
2246
|
* 点击行为由消费方事件委托实现,如 AiChat 打开 Artifacts 面板) */
|
|
2123
2247
|
codeTriggerLangs?: string[];
|
|
2248
|
+
/** 显示消息时间(操作区按钮之后;默认 true)。时间源:message.createdTime
|
|
2249
|
+
* (Fv 系后端直灌,秒级/毫秒级时间戳或 ISO 字符串自动识别)优先,缺省回落
|
|
2250
|
+
* message.createdAt(ms 时间戳);两者皆无则不渲染 */
|
|
2251
|
+
showTime?: boolean;
|
|
2252
|
+
/** 消息时间自定义格式化(透传 message 与已归一为 ms 的时间戳;
|
|
2253
|
+
* 缺省自动识别 + 格式化为 'YYYY-MM-DD HH:mm',本机时区) */
|
|
2254
|
+
timeFormat?: (message: MessageNode, timestamp: number) => string;
|
|
2124
2255
|
/** 语言包:'zh-CN'/'en-US' 整包或部分文案对象(优先于祖先注入与全局设置) */
|
|
2125
2256
|
locale?: LocaleInput;
|
|
2126
2257
|
};
|
|
2258
|
+
/** 展开/折叠本条消息的思考链(user 消息与无思考链消息调用无效) */
|
|
2259
|
+
declare function expandThoughtChain(): void;
|
|
2260
|
+
declare function collapseThoughtChain(): void;
|
|
2127
2261
|
declare var __VLS_1: {
|
|
2128
2262
|
message: MessageNode;
|
|
2129
2263
|
};
|
|
@@ -2162,6 +2296,8 @@ type __VLS_Slots = {} & {
|
|
|
2162
2296
|
};
|
|
2163
2297
|
declare const __VLS_base: vue.DefineComponent<__VLS_Props$1, {
|
|
2164
2298
|
message: vue.ComputedRef<MessageNode>;
|
|
2299
|
+
expandThoughtChain: typeof expandThoughtChain;
|
|
2300
|
+
collapseThoughtChain: typeof collapseThoughtChain;
|
|
2165
2301
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
2166
2302
|
copy: (message: MessageNode) => any;
|
|
2167
2303
|
regenerate: (message: MessageNode) => any;
|
|
@@ -2189,8 +2325,12 @@ declare const __VLS_base: vue.DefineComponent<__VLS_Props$1, {
|
|
|
2189
2325
|
showAssistantName: boolean;
|
|
2190
2326
|
userAvatar: string;
|
|
2191
2327
|
assistantAvatar: string;
|
|
2328
|
+
assistantAvatarScale: number;
|
|
2329
|
+
avatarCircle: boolean;
|
|
2192
2330
|
userName: string;
|
|
2193
2331
|
assistantName: string;
|
|
2332
|
+
showTime: boolean;
|
|
2333
|
+
timeFormat: (message: MessageNode, timestamp: number) => string;
|
|
2194
2334
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
2195
2335
|
declare const __VLS_export$1: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
2196
2336
|
declare const _default$1: typeof __VLS_export$1;
|