@fv-ui/ai-chat 0.4.0 → 0.7.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 CHANGED
@@ -437,8 +437,16 @@ Markdown 渲染(Sanitized by DOMPurify),内置 Prism 代码高亮与 KaTeX。
437
437
  | title | string | '' | 顶栏标题(同时作空态欢迎页名称) |
438
438
  | showHeader | boolean | false | 显示顶栏(标题 + 模型选择器;models 多选选择器在顶栏内,需开启才可见) |
439
439
  | centerWelcome | boolean | true | 空态居中:未开始对话时欢迎内容与输入区整体垂直居中,首条消息后输入区恢复固定底部 |
440
+ | showScrollButton | boolean | true | 显示滚到底部悬浮按钮(透传 AiMessages;距底超过 scrollButtonThreshold 时出现) |
441
+ | scrollButtonThreshold | number | 100 | 滚到底部悬浮按钮显示阈值(px,透传 AiMessages) |
440
442
  | showUserAvatar | boolean | true | 显示用户头像(false 时用户消息不渲染头像;助手头像不受影响) |
441
443
  | showUserName | boolean | true | 显示用户名称(false 时用户消息不渲染头部名称行;助手名称不受影响) |
444
+ | showAssistantAvatar | boolean | true | 显示助手头像(false 时助手消息不渲染头像;用户头像不受影响) |
445
+ | showAssistantName | boolean | true | 显示助手名称(false 时助手消息不渲染头部名称行;用户名称不受影响) |
446
+ | userAvatar | string | '' | 用户头像图片 URL(空串回落内置图标;`user-avatar` 插槽优先) |
447
+ | assistantAvatar | string | '' | 助手头像图片 URL(空串回落内置图标;`assistant-avatar` 插槽优先) |
448
+ | userName | string | '' | 用户名称(空串回落「你」;`user-name` 插槽优先) |
449
+ | assistantName | string | '' | 助手名称(空串回落「助手」;`assistant-name` 插槽优先) |
442
450
  | placeholder | string | '' | 输入框占位 |
443
451
  | senderShadow | boolean | true | 输入区阴影效果(透传 Sender 的 shadow) |
444
452
  | suggestions | AiChatSuggestion[] | [] | 空态建议列表(Prompts 项,key 必填) |
@@ -461,8 +469,12 @@ Markdown 渲染(Sanitized by DOMPurify),内置 Prism 代码高亮与 KaTeX。
461
469
 
462
470
  | Slot | 说明 |
463
471
  | --- | --- |
464
- | message-avatar / message-actions | 透传给 AiMessages(作用域见 AiMessage) |
472
+ | message-avatar / message-actions | 透传给 AiMessages(作用域见 AiMessage;message-avatar 优先于细分头像插槽) |
473
+ | user-avatar / assistant-avatar | 自定义用户/助手头像(无作用域,优先于同名 props) |
474
+ | user-name / assistant-name | 自定义用户/助手名称(作用域 { message },优先于同名 props) |
465
475
  | empty | 覆盖空态整区 |
476
+ | scroll-button | 自定义滚到底部悬浮按钮整块(作用域 { scrollToBottom, awayFromBottom };覆盖后内置按钮与显隐逻辑均由插槽内容接管) |
477
+ | scroll-button-icon | 仅自定义悬浮按钮图标内容(按钮本体/显隐不变) |
466
478
  | sender-prefix | 输入区前缀 |
467
479
 
468
480
  | Ref | 说明 |
@@ -489,10 +501,18 @@ Markdown 渲染(Sanitized by DOMPurify),内置 Prism 代码高亮与 KaTeX。
489
501
  | suggestions | AiMessagesSuggestion[] | [] | 空态建议列表 |
490
502
  | suggestionsTitle | string | '' | 空态建议区标题 |
491
503
  | scrollThreshold | number | 40 | 吸底阈值(px):距底不超过该值才自动跟随 |
504
+ | showScrollButton | boolean | true | 显示滚到底部悬浮按钮(空态不渲染) |
505
+ | scrollButtonThreshold | number | 100 | 距底超过该值(px)才显示滚到底部悬浮按钮 |
492
506
  | showActions | boolean | true | 显示消息操作按钮(复制/重生成) |
493
507
  | showBranchSwitch | boolean | true | 显示分支切换器 |
494
508
  | showUserAvatar | boolean | true | 显示用户头像(助手头像不受影响) |
495
509
  | showUserName | boolean | true | 显示用户名称(助手名称不受影响) |
510
+ | showAssistantAvatar | boolean | true | 显示助手头像(用户头像不受影响) |
511
+ | showAssistantName | boolean | true | 显示助手名称(用户名称不受影响) |
512
+ | userAvatar | string | '' | 用户头像图片 URL(透传 AiMessage) |
513
+ | assistantAvatar | string | '' | 助手头像图片 URL(透传 AiMessage) |
514
+ | userName | string | '' | 用户名称(透传 AiMessage) |
515
+ | assistantName | string | '' | 助手名称(透传 AiMessage) |
496
516
 
497
517
  | Event | 说明 |
498
518
  | --- | --- |
@@ -501,7 +521,11 @@ Markdown 渲染(Sanitized by DOMPurify),内置 Prism 代码高亮与 KaTeX。
501
521
  | Slot | 说明 |
502
522
  | --- | --- |
503
523
  | empty | 覆盖空态整区 |
504
- | message-avatar / message-actions | 透传给每条 AiMessage |
524
+ | scroll-button | 自定义滚到底部悬浮按钮整块(作用域 { scrollToBottom, awayFromBottom };覆盖后内置按钮与显隐逻辑均由插槽内容接管) |
525
+ | scroll-button-icon | 仅自定义悬浮按钮图标内容(按钮本体/显隐不变) |
526
+ | message-avatar / message-actions | 透传给每条 AiMessage(message-avatar 优先于细分头像插槽) |
527
+ | user-avatar / assistant-avatar | 自定义用户/助手头像(无作用域,优先于同名 props) |
528
+ | user-name / assistant-name | 自定义用户/助手名称(作用域 { message },优先于同名 props) |
505
529
 
506
530
  | CSS 变量 | 默认 | 说明 |
507
531
  | --- | --- | --- |
@@ -523,6 +547,12 @@ Markdown 渲染(Sanitized by DOMPurify),内置 Prism 代码高亮与 KaTeX。
523
547
  | showBranchSwitch | boolean | true | 显示分支切换器(branch.count > 1 时) |
524
548
  | showUserAvatar | boolean | true | 显示用户头像(false 时用户消息不渲染头像块) |
525
549
  | showUserName | boolean | true | 显示用户名称(false 时用户消息不渲染头部名称行) |
550
+ | showAssistantAvatar | boolean | true | 显示助手头像(false 时助手消息不渲染头像块) |
551
+ | showAssistantName | boolean | true | 显示助手名称(false 时助手消息不渲染头部名称行) |
552
+ | userAvatar | string | '' | 用户头像图片 URL(空串回落内置图标) |
553
+ | assistantAvatar | string | '' | 助手头像图片 URL(空串回落内置图标) |
554
+ | userName | string | '' | 用户名称(空串回落「你」) |
555
+ | assistantName | string | '' | 助手名称(空串回落「助手」) |
526
556
 
527
557
  > 用户消息操作区:恒渲染复制按钮,默认透明,鼠标移上消息(或键盘聚焦)时浮现(open-webui 交互)。
528
558
  | autoCollapse | boolean | true | Thinking autoCollapse 透传 |
@@ -533,7 +563,11 @@ Markdown 渲染(Sanitized by DOMPurify),内置 Prism 代码高亮与 KaTeX。
533
563
 
534
564
  | Slot | 说明 |
535
565
  | --- | --- |
536
- | message-avatar | 自定义头像(作用域 { message }) |
566
+ | message-avatar | 自定义头像(作用域 { message };优先于细分头像插槽,两条角色消息均生效) |
567
+ | user-avatar | 自定义用户头像(无作用域;优先于 userAvatar props) |
568
+ | assistant-avatar | 自定义助手头像(无作用域;优先于 assistantAvatar props) |
569
+ | user-name | 自定义用户名称(作用域 { message };优先于 userName props) |
570
+ | assistant-name | 自定义助手名称(作用域 { message };优先于 assistantName props) |
537
571
  | message-files | 自定义附件渲染(作用域 { message, files }) |
538
572
  | message-actions | 自定义操作区(作用域 { message }) |
539
573
 
package/dist/index.d.ts CHANGED
@@ -132,7 +132,7 @@ declare var __VLS_1$9: {};
132
132
  declare var __VLS_10$1: {};
133
133
  declare var __VLS_12$1: {};
134
134
  declare var __VLS_14: {};
135
- declare var __VLS_32: {};
135
+ declare var __VLS_32$1: {};
136
136
  type __VLS_Slots$e = {} & {
137
137
  avatar?: (props: typeof __VLS_1$9) => any;
138
138
  } & {
@@ -142,7 +142,7 @@ type __VLS_Slots$e = {} & {
142
142
  } & {
143
143
  content?: (props: typeof __VLS_14) => any;
144
144
  } & {
145
- footer?: (props: typeof __VLS_32) => any;
145
+ footer?: (props: typeof __VLS_32$1) => any;
146
146
  };
147
147
  declare const __VLS_base$e: vue.DefineComponent<__VLS_Props$f, {
148
148
  interrupt: typeof interrupt;
@@ -257,7 +257,7 @@ declare var __VLS_13: {
257
257
  item: BubbleListItemProps;
258
258
  index: number;
259
259
  };
260
- declare var __VLS_16: {
260
+ declare var __VLS_16$1: {
261
261
  item: BubbleListItemProps;
262
262
  index: number;
263
263
  };
@@ -274,7 +274,7 @@ type __VLS_Slots$d = {} & {
274
274
  } & {
275
275
  header?: (props: typeof __VLS_13) => any;
276
276
  } & {
277
- content?: (props: typeof __VLS_16) => any;
277
+ content?: (props: typeof __VLS_16$1) => any;
278
278
  } & {
279
279
  loading?: (props: typeof __VLS_19$1) => any;
280
280
  } & {
@@ -367,7 +367,7 @@ declare function blur$2(): void;
367
367
  declare function openHeader$2(): void;
368
368
  declare function closeHeader$2(): void;
369
369
  declare var __VLS_1$8: {};
370
- declare var __VLS_3$2: {};
370
+ declare var __VLS_3$3: {};
371
371
  declare var __VLS_5: {};
372
372
  declare var __VLS_52: {
373
373
  keyword: string;
@@ -378,7 +378,7 @@ declare var __VLS_134: {};
378
378
  type __VLS_Slots$c = {} & {
379
379
  header?: (props: typeof __VLS_1$8) => any;
380
380
  } & {
381
- 'body-top'?: (props: typeof __VLS_3$2) => any;
381
+ 'body-top'?: (props: typeof __VLS_3$3) => any;
382
382
  } & {
383
383
  prefix?: (props: typeof __VLS_5) => any;
384
384
  } & {
@@ -713,7 +713,7 @@ declare function chatState(): {
713
713
  declare function openHeader(): void;
714
714
  declare function closeHeader(): void;
715
715
  declare var __VLS_1$7: {};
716
- declare var __VLS_3$1: {};
716
+ declare var __VLS_3$2: {};
717
717
  declare var __VLS_19: {
718
718
  nodeId: string;
719
719
  };
@@ -722,7 +722,7 @@ declare var __VLS_80: {};
722
722
  type __VLS_Slots$a = {} & {
723
723
  header?: (props: typeof __VLS_1$7) => any;
724
724
  } & {
725
- prefix?: (props: typeof __VLS_3$1) => any;
725
+ prefix?: (props: typeof __VLS_3$2) => any;
726
726
  } & {
727
727
  'tag-tip'?: (props: typeof __VLS_19) => any;
728
728
  } & {
@@ -820,16 +820,16 @@ type __VLS_Props$a = {
820
820
  /** 切换门控:start 起始态不可切换;thinking 中可展开查看思考流,end/error 后可自由收起展开 */
821
821
  declare function toggle(): void;
822
822
  declare var __VLS_1$6: {};
823
- declare var __VLS_36: {};
824
- declare var __VLS_38: {};
823
+ declare var __VLS_36$1: {};
824
+ declare var __VLS_38$1: {};
825
825
  declare var __VLS_51: {};
826
826
  declare var __VLS_53: {};
827
827
  type __VLS_Slots$9 = {} & {
828
828
  'status-icon'?: (props: typeof __VLS_1$6) => any;
829
829
  } & {
830
- label?: (props: typeof __VLS_36) => any;
830
+ label?: (props: typeof __VLS_36$1) => any;
831
831
  } & {
832
- arrow?: (props: typeof __VLS_38) => any;
832
+ arrow?: (props: typeof __VLS_38$1) => any;
833
833
  } & {
834
834
  error?: (props: typeof __VLS_51) => any;
835
835
  } & {
@@ -876,12 +876,12 @@ type __VLS_Props$9 = {
876
876
  /** 排列方向:vertical 纵向(带连接线)/ horizontal 横向 */
877
877
  direction?: 'vertical' | 'horizontal';
878
878
  };
879
- declare var __VLS_45: {
879
+ declare var __VLS_45$1: {
880
880
  item: ThoughtChainItem;
881
881
  index: number;
882
882
  };
883
883
  type __VLS_Slots$8 = {} & {
884
- content?: (props: typeof __VLS_45) => any;
884
+ content?: (props: typeof __VLS_45$1) => any;
885
885
  };
886
886
  declare const __VLS_base$8: vue.DefineComponent<__VLS_Props$9, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$9> & Readonly<{}>, {
887
887
  items: ThoughtChainItem[];
@@ -1113,19 +1113,19 @@ declare function deleteConfirm(key: string | number): Promise<void>;
1113
1113
  declare var __VLS_1$2: {
1114
1114
  group: string;
1115
1115
  };
1116
- declare var __VLS_3: {
1116
+ declare var __VLS_3$1: {
1117
1117
  item: ConversationItem;
1118
1118
  active: boolean;
1119
1119
  };
1120
- declare var __VLS_31: {
1120
+ declare var __VLS_31$1: {
1121
1121
  item: ConversationItem;
1122
1122
  };
1123
1123
  type __VLS_Slots$3 = {} & {
1124
1124
  'group-title'?: (props: typeof __VLS_1$2) => any;
1125
1125
  } & {
1126
- item?: (props: typeof __VLS_3) => any;
1126
+ item?: (props: typeof __VLS_3$1) => any;
1127
1127
  } & {
1128
- menu?: (props: typeof __VLS_31) => any;
1128
+ menu?: (props: typeof __VLS_31$1) => any;
1129
1129
  };
1130
1130
  declare const __VLS_base$3: vue.DefineComponent<__VLS_Props$4, {
1131
1131
  handleMenuCommand: typeof handleMenuCommand;
@@ -1392,6 +1392,20 @@ interface ChatFile {
1392
1392
  /** 附件类别,缺省按 'file' 处理 */
1393
1393
  type?: 'image' | 'file';
1394
1394
  }
1395
+ /**
1396
+ * 工具调用轨迹步骤(det-oms 风格):流式 tool 事件与历史 tool 行展开后的单步。
1397
+ * status 与 ThoughtChain 链项一致(loading 转圈/success 勾/error 叉)。
1398
+ */
1399
+ interface ToolStepItem {
1400
+ /** 步骤唯一标识(流式 `${toolName}-${序号}`;历史回放由消费方生成) */
1401
+ key: string;
1402
+ /** 展示名(流式经 toolStepLabel 转换后的工具名) */
1403
+ title?: string;
1404
+ /** 步骤状态;缺省视为 loading */
1405
+ status?: 'pending' | 'loading' | 'success' | 'error';
1406
+ /** 补充描述(历史回放的用时/返回量等次要信息) */
1407
+ description?: string;
1408
+ }
1395
1409
  /** 树形消息节点(同构 open-webui 会话消息:parentId/childrenIds 构成分支树) */
1396
1410
  interface MessageNode {
1397
1411
  id: string;
@@ -1399,6 +1413,8 @@ interface MessageNode {
1399
1413
  content: string;
1400
1414
  /** 思考链全文(流式期间由包装层追加) */
1401
1415
  reasoning?: string;
1416
+ /** 工具调用轨迹(det-oms 流式 tool 事件累积/历史 tool 行展开;AiMessage 以 ThoughtChain 渲染) */
1417
+ toolSteps?: ToolStepItem[];
1402
1418
  /** 附件列表 */
1403
1419
  files?: ChatFile[];
1404
1420
  /** 多模型对话中的模型序号(open-webui 语义) */
@@ -1470,6 +1486,10 @@ type __VLS_Props$3 = {
1470
1486
  suggestionsTitle?: string;
1471
1487
  /** 用户上滚免打扰阈值(px):距底不超过该值才自动吸底 */
1472
1488
  scrollThreshold?: number;
1489
+ /** 显示滚到底部悬浮按钮 */
1490
+ showScrollButton?: boolean;
1491
+ /** 距底超过该像素(px)才显示滚到底部悬浮按钮 */
1492
+ scrollButtonThreshold?: number;
1473
1493
  /** 显示消息操作按钮 */
1474
1494
  showActions?: boolean;
1475
1495
  /** 显示分支切换器 */
@@ -1478,6 +1498,18 @@ type __VLS_Props$3 = {
1478
1498
  showUserAvatar?: boolean;
1479
1499
  /** 显示用户名称(助手名称不受影响) */
1480
1500
  showUserName?: boolean;
1501
+ /** 显示助手头像(用户头像不受影响) */
1502
+ showAssistantAvatar?: boolean;
1503
+ /** 显示助手名称(用户名称不受影响) */
1504
+ showAssistantName?: boolean;
1505
+ /** 用户头像图片 URL(透传 AiMessage) */
1506
+ userAvatar?: string;
1507
+ /** 助手头像图片 URL(透传 AiMessage) */
1508
+ assistantAvatar?: string;
1509
+ /** 用户名称(透传 AiMessage) */
1510
+ userName?: string;
1511
+ /** 助手名称(透传 AiMessage) */
1512
+ assistantName?: string;
1481
1513
  };
1482
1514
  declare function scrollToBottom(smooth?: boolean): void;
1483
1515
  /** 回到顶部:与 scrollToBottom 同款 try/catch 回落(happy-dom 旧版 scrollTo(options) 可能缺实现) */
@@ -1486,15 +1518,40 @@ declare var __VLS_1$1: {};
1486
1518
  declare var __VLS_26: {
1487
1519
  message: MessageNode;
1488
1520
  };
1489
- declare var __VLS_29: {
1521
+ declare var __VLS_29$1: {
1490
1522
  message: MessageNode;
1491
1523
  };
1524
+ declare var __VLS_32: {};
1525
+ declare var __VLS_35: {};
1526
+ declare var __VLS_38: {
1527
+ message: MessageNode;
1528
+ };
1529
+ declare var __VLS_41: {
1530
+ message: MessageNode;
1531
+ };
1532
+ declare var __VLS_49: {
1533
+ scrollToBottom: typeof scrollToBottom;
1534
+ awayFromBottom: boolean;
1535
+ };
1536
+ declare var __VLS_65: {};
1492
1537
  type __VLS_Slots$2 = {} & {
1493
1538
  empty?: (props: typeof __VLS_1$1) => any;
1494
1539
  } & {
1495
1540
  'message-avatar'?: (props: typeof __VLS_26) => any;
1496
1541
  } & {
1497
- 'message-actions'?: (props: typeof __VLS_29) => any;
1542
+ 'message-actions'?: (props: typeof __VLS_29$1) => any;
1543
+ } & {
1544
+ 'user-avatar'?: (props: typeof __VLS_32) => any;
1545
+ } & {
1546
+ 'assistant-avatar'?: (props: typeof __VLS_35) => any;
1547
+ } & {
1548
+ 'user-name'?: (props: typeof __VLS_38) => any;
1549
+ } & {
1550
+ 'assistant-name'?: (props: typeof __VLS_41) => any;
1551
+ } & {
1552
+ 'scroll-button'?: (props: typeof __VLS_49) => any;
1553
+ } & {
1554
+ 'scroll-button-icon'?: (props: typeof __VLS_65) => any;
1498
1555
  };
1499
1556
  declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$3, {
1500
1557
  scrollToBottom: typeof scrollToBottom;
@@ -1518,9 +1575,17 @@ declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$3, {
1518
1575
  showBranchSwitch: boolean;
1519
1576
  showUserAvatar: boolean;
1520
1577
  showUserName: boolean;
1578
+ showAssistantAvatar: boolean;
1579
+ showAssistantName: boolean;
1580
+ userAvatar: string;
1581
+ assistantAvatar: string;
1582
+ userName: string;
1583
+ assistantName: string;
1521
1584
  suggestions: AiMessagesSuggestion[];
1522
1585
  suggestionsTitle: string;
1523
1586
  scrollThreshold: number;
1587
+ showScrollButton: boolean;
1588
+ scrollButtonThreshold: number;
1524
1589
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
1525
1590
  declare const __VLS_export$3: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
1526
1591
  declare const _default$3: typeof __VLS_export$3;
@@ -1561,12 +1626,30 @@ type __VLS_Props$2 = {
1561
1626
  showHeader?: boolean;
1562
1627
  /** 空态居中:未开始对话时欢迎内容与输入区整体垂直居中,首条消息后恢复输入区固定底部 */
1563
1628
  centerWelcome?: boolean;
1629
+ /** 显示滚到底部悬浮按钮(透传 AiMessages;距底超过 scrollButtonThreshold 时出现) */
1630
+ showScrollButton?: boolean;
1631
+ /** 滚到底部悬浮按钮显示阈值(px,透传 AiMessages) */
1632
+ scrollButtonThreshold?: number;
1564
1633
  /** 显示用户头像(false 时用户消息不渲染头像;助手头像不受影响) */
1565
1634
  showUserAvatar?: boolean;
1566
1635
  /** 显示用户名称(false 时用户消息不渲染头部名称行;助手名称不受影响) */
1567
1636
  showUserName?: boolean;
1637
+ /** 显示助手头像(false 时助手消息不渲染头像;用户头像不受影响) */
1638
+ showAssistantAvatar?: boolean;
1639
+ /** 显示助手名称(false 时助手消息不渲染头部名称行;用户名称不受影响) */
1640
+ showAssistantName?: boolean;
1641
+ /** 用户头像图片 URL(空串回落内置图标;user-avatar 插槽可整体覆盖) */
1642
+ userAvatar?: string;
1643
+ /** 助手头像图片 URL(空串回落内置图标;assistant-avatar 插槽可整体覆盖) */
1644
+ assistantAvatar?: string;
1645
+ /** 用户名称(空串回落「你」;user-name 插槽可整体覆盖) */
1646
+ userName?: string;
1647
+ /** 助手名称(空串回落「助手」;assistant-name 插槽可整体覆盖) */
1648
+ assistantName?: string;
1568
1649
  /** 输入框占位 */
1569
1650
  placeholder?: string;
1651
+ /** 工具名 → 步骤展示名(透传 useChat toolStepLabel,流式工具轨迹步骤的 title) */
1652
+ toolStepLabel?: (toolName: string) => string;
1570
1653
  /** 输入区阴影效果(透传 Sender;关闭传 false) */
1571
1654
  senderShadow?: boolean;
1572
1655
  /** 空态建议列表 */
@@ -1602,15 +1685,40 @@ declare var __VLS_27: {
1602
1685
  message: MessageNode;
1603
1686
  };
1604
1687
  declare var __VLS_30: {};
1605
- declare var __VLS_66: {};
1688
+ declare var __VLS_33$1: {};
1689
+ declare var __VLS_36: {
1690
+ message: MessageNode;
1691
+ };
1692
+ declare var __VLS_39: {
1693
+ message: MessageNode;
1694
+ };
1695
+ declare var __VLS_42: {};
1696
+ declare var __VLS_45: {
1697
+ scrollToBottom: (smooth?: boolean) => void;
1698
+ awayFromBottom: boolean;
1699
+ };
1700
+ declare var __VLS_48: {};
1701
+ declare var __VLS_84: {};
1606
1702
  type __VLS_Slots$1 = {} & {
1607
1703
  'message-avatar'?: (props: typeof __VLS_24) => any;
1608
1704
  } & {
1609
1705
  'message-actions'?: (props: typeof __VLS_27) => any;
1610
1706
  } & {
1611
- empty?: (props: typeof __VLS_30) => any;
1707
+ 'user-avatar'?: (props: typeof __VLS_30) => any;
1708
+ } & {
1709
+ 'assistant-avatar'?: (props: typeof __VLS_33$1) => any;
1710
+ } & {
1711
+ 'user-name'?: (props: typeof __VLS_36) => any;
1712
+ } & {
1713
+ 'assistant-name'?: (props: typeof __VLS_39) => any;
1714
+ } & {
1715
+ empty?: (props: typeof __VLS_42) => any;
1716
+ } & {
1717
+ 'scroll-button'?: (props: typeof __VLS_45) => any;
1612
1718
  } & {
1613
- 'sender-prefix'?: (props: typeof __VLS_66) => any;
1719
+ 'scroll-button-icon'?: (props: typeof __VLS_48) => any;
1720
+ } & {
1721
+ 'sender-prefix'?: (props: typeof __VLS_84) => any;
1614
1722
  };
1615
1723
  declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
1616
1724
  sendMessage: typeof sendMessage;
@@ -1652,11 +1760,20 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
1652
1760
  messages: MessageNode[];
1653
1761
  showUserAvatar: boolean;
1654
1762
  showUserName: boolean;
1763
+ showAssistantAvatar: boolean;
1764
+ showAssistantName: boolean;
1765
+ userAvatar: string;
1766
+ assistantAvatar: string;
1767
+ userName: string;
1768
+ assistantName: string;
1655
1769
  suggestions: AiChatSuggestion[];
1770
+ showScrollButton: boolean;
1771
+ scrollButtonThreshold: number;
1656
1772
  models: string[];
1657
1773
  adapter: ChatAdapter;
1658
1774
  showHeader: boolean;
1659
1775
  centerWelcome: boolean;
1776
+ toolStepLabel: (toolName: string) => string;
1660
1777
  senderShadow: boolean;
1661
1778
  features: AiChatFeatures;
1662
1779
  allowAttachments: boolean;
@@ -1692,25 +1809,53 @@ type __VLS_Props$1 = {
1692
1809
  showUserAvatar?: boolean;
1693
1810
  /** 显示用户名称(false 时用户消息不渲染头部名称行;助手侧不受影响) */
1694
1811
  showUserName?: boolean;
1812
+ /** 显示助手头像(false 时助手消息不渲染头像块;用户侧不受影响) */
1813
+ showAssistantAvatar?: boolean;
1814
+ /** 显示助手名称(false 时助手消息不渲染头部名称行;用户侧不受影响) */
1815
+ showAssistantName?: boolean;
1816
+ /** 用户头像图片 URL(空串回落内置图标;细分插槽可整体覆盖) */
1817
+ userAvatar?: string;
1818
+ /** 助手头像图片 URL(空串回落内置图标;细分插槽可整体覆盖) */
1819
+ assistantAvatar?: string;
1820
+ /** 用户名称(空串回落「你」;细分插槽可整体覆盖) */
1821
+ userName?: string;
1822
+ /** 助手名称(空串回落「助手」;细分插槽可整体覆盖) */
1823
+ assistantName?: string;
1695
1824
  /** Thinking autoCollapse 透传 */
1696
1825
  autoCollapse?: boolean;
1697
1826
  };
1698
1827
  declare var __VLS_1: {
1699
1828
  message: MessageNode;
1700
1829
  };
1701
- declare var __VLS_25: {
1830
+ declare var __VLS_3: {};
1831
+ declare var __VLS_16: {};
1832
+ declare var __VLS_29: {
1833
+ message: MessageNode;
1834
+ };
1835
+ declare var __VLS_31: {
1836
+ message: MessageNode;
1837
+ };
1838
+ declare var __VLS_33: {
1702
1839
  message: MessageNode;
1703
1840
  files: ChatFile[];
1704
1841
  };
1705
- declare var __VLS_44: {
1842
+ declare var __VLS_57: {
1706
1843
  message: MessageNode;
1707
1844
  };
1708
1845
  type __VLS_Slots = {} & {
1709
1846
  'message-avatar'?: (props: typeof __VLS_1) => any;
1710
1847
  } & {
1711
- 'message-files'?: (props: typeof __VLS_25) => any;
1848
+ 'user-avatar'?: (props: typeof __VLS_3) => any;
1849
+ } & {
1850
+ 'assistant-avatar'?: (props: typeof __VLS_16) => any;
1851
+ } & {
1852
+ 'user-name'?: (props: typeof __VLS_29) => any;
1853
+ } & {
1854
+ 'assistant-name'?: (props: typeof __VLS_31) => any;
1855
+ } & {
1856
+ 'message-files'?: (props: typeof __VLS_33) => any;
1712
1857
  } & {
1713
- 'message-actions'?: (props: typeof __VLS_44) => any;
1858
+ 'message-actions'?: (props: typeof __VLS_57) => any;
1714
1859
  };
1715
1860
  declare const __VLS_base: vue.DefineComponent<__VLS_Props$1, {
1716
1861
  message: vue.ComputedRef<MessageNode>;
@@ -1729,6 +1874,12 @@ declare const __VLS_base: vue.DefineComponent<__VLS_Props$1, {
1729
1874
  showBranchSwitch: boolean;
1730
1875
  showUserAvatar: boolean;
1731
1876
  showUserName: boolean;
1877
+ showAssistantAvatar: boolean;
1878
+ showAssistantName: boolean;
1879
+ userAvatar: string;
1880
+ assistantAvatar: string;
1881
+ userName: string;
1882
+ assistantName: string;
1732
1883
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
1733
1884
  declare const __VLS_export$1: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
1734
1885
  declare const _default$1: typeof __VLS_export$1;
@@ -1893,6 +2044,8 @@ interface UseChatOptions {
1893
2044
  toolName: string;
1894
2045
  status: 'start' | 'done';
1895
2046
  }) => void;
2047
+ /** 工具名 → 步骤展示名(流式 toolSteps 的 title;缺省原样使用 toolName) */
2048
+ toolStepLabel?: (toolName: string) => string;
1896
2049
  }
1897
2050
  /** 待发送队列项 */
1898
2051
  interface QueueItem {
@@ -1942,4 +2095,4 @@ declare function createMessageTree(initial?: {
1942
2095
  declare const version = "0.1.0";
1943
2096
 
1944
2097
  export { DetOmsChatAdapter, DetOmsError, _default as FvAiArtifacts, _default$2 as FvAiChat, _default$1 as FvAiMessage, _default$3 as FvAiMessages, _default$5 as FvAttachments, _default$f as FvBubble, _default$e as FvBubbleList, _default$4 as FvConversations, _default$b as FvEditorSender, _default$6 as FvFilesCard, _default$h as FvMarkdown, _default$c as FvMentionSender, _default$7 as FvPrompts, _default$d as FvSender, _default$a as FvThinking, _default$9 as FvThoughtChain, _default$g as FvTypewriter, _default$8 as FvWelcome, OpenAIAdapter, XRequest, createLocalStorageAdapter, createMemoryAdapter, createMessageTree, createSSEParser, useChat, useMessages, useRecord, useSend, useXStream, version };
1945
- export type { AdapterChatMessage, AiArtifactItem, AiChatFeatures, AiChatSuggestion, AiMessageBranchInfo, AiMessagesSuggestion, BranchDirection, ChatAdapter, ChatAdapterHandlers, ChatAdapterRequest, ChatFile, DetOmsChatAdapterConfig, DetOmsMessage, DetOmsMessagePage, DetOmsSendBody, DetOmsSessionDetail, DetOmsSessionItem, DetOmsToolEvent, MessageNode, MessageNodeInput, MessageRole, MessageStatus, MessageTree, MessageUsage, OpenAIAdapterConfig, QueueItem, RawUsage, SSEEvent, SSEParser, SendOptions, StorageAdapter, ToolCallItem, UseChatOptions, UseChatReturn, UseMessagesReturn, UseRecordReturn, UseSendReturn, UseXStreamReturn };
2098
+ export type { AdapterChatMessage, AiArtifactItem, AiChatFeatures, AiChatSuggestion, AiMessageBranchInfo, AiMessagesSuggestion, BranchDirection, ChatAdapter, ChatAdapterHandlers, ChatAdapterRequest, ChatFile, DetOmsChatAdapterConfig, DetOmsMessage, DetOmsMessagePage, DetOmsSendBody, DetOmsSessionDetail, DetOmsSessionItem, DetOmsToolEvent, MessageNode, MessageNodeInput, MessageRole, MessageStatus, MessageTree, MessageUsage, OpenAIAdapterConfig, QueueItem, RawUsage, SSEEvent, SSEParser, SendOptions, StorageAdapter, ToolCallItem, ToolStepItem, UseChatOptions, UseChatReturn, UseMessagesReturn, UseRecordReturn, UseSendReturn, UseXStreamReturn };