@fv-ui/ai-chat 1.2.0 → 1.3.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
@@ -528,6 +528,7 @@ Markdown 渲染(Sanitized by DOMPurify),内置 Prism 代码高亮与 KaTeX。
528
528
  | update:messages | (MessageNode[]) 全量消息链(去抖后) |
529
529
  | send | (text, files?) 用户发送(allowAttachments 开启时 files 为降维后的 ChatFile[]) |
530
530
  | suggestion-select | (item) 点击空态建议项(先于 send 触发;label 为空的项不发) |
531
+ | followup-select | (item, message) 点击回答尾部追问建议 chip(先于 send 触发;组件内部已接住转 send 开启新一轮,事件仅供消费方可观测/埋点;仅链尾 assistant 消息渲染 chips,流式 message_end 前禁用防误点) |
531
532
  | message-complete | (message) 链尾 assistant 生成完成 |
532
533
  | error | (err, message?) 生成出错 |
533
534
  | branch-change | (dir, message) 分支切换 |
@@ -632,6 +633,7 @@ Markdown 渲染(Sanitized by DOMPurify),内置 Prism 代码高亮与 KaTeX。
632
633
  | --- | --- | --- | --- |
633
634
  | message | MessageNode | —(必填) | 消息节点 |
634
635
  | branch | AiMessageBranchInfo | undefined | 分支元数据 { count, index };缺省视为单分支 |
636
+ | isLast | boolean | false | 是否当前链最后一条消息(由 AiMessages 注入);追问建议 chips 仅链尾消息渲染——此前消息即使留有 suggestions 也不显示 |
635
637
  | showActions | boolean | true | 显示复制/重生成(仅 assistant) |
636
638
  | showBranchSwitch | boolean | true | 显示分支切换器(branch.count > 1 时) |
637
639
  | showUserAvatar | boolean | false | 显示用户头像(默认隐藏;false 时用户消息不渲染头像块) |
@@ -658,6 +660,7 @@ Markdown 渲染(Sanitized by DOMPurify),内置 Prism 代码高亮与 KaTeX。
658
660
  | Event | 说明 |
659
661
  | --- | --- |
660
662
  | copy / regenerate / branch-change | (message) / (message) / (dir, message) |
663
+ | followup-select | (item, message) 点击追问建议 chip(item 为建议文本;仅链尾 assistant 消息渲染 chips,status 落 done 后可点;AiChat 内部已接住转 send,直接用 AiMessage 时的消费方需自行接管发送) |
661
664
 
662
665
  | Slot | 说明 |
663
666
  | --- | --- |
@@ -740,6 +743,7 @@ const adapter = FvCommonAdapter({
740
743
  - 同步段失败(Content-Type 非 `text/event-stream`)按 JSON 错误 `{code,message}` 走 `onError`;命中 `errorMessages` 时用映射文案(带 `code` 的 `FvCommonError`)
741
744
  - `message_end` 的 `messageId`(最终文本行 id)经 `onBackendMessageId` 回填到 `MessageNode.backendId`——多轮工具循环下与 `message_start` 的首轮 id 不同,UI 落库/对账以它为准
742
745
  - `tool` 事件经 `onTool` → `useChat.onToolEvent` → `AiChat @tool-event` 上抛,消费方展示「正在查询库存…」等中间态
746
+ - 追问建议(V58+):`suggestions` 事件(流式收尾 0..1 次,最后一个 delta 后、message_end 前,载荷 `{items: string[]}`)经可选 `onSuggestions` 上抛,`useChat` 回写 `MessageNode.suggestions`,AiMessage 在链尾消息渲染追问 chips;开关关闭/模型未产出/中断/失败无此事件;历史恢复用导出的 `parseSuggestions(raw)` 安全解析 `FvCommonMessage.suggestions`(JSON 数组原文透传,脏数据按无建议)
743
747
  - 配套 DTO 类型:`FvCommonSessionItem` / `FvCommonMessage` / `FvCommonSessionDetail` / `FvCommonMessagePage`(消费方直接调会话管理端点时用)
744
748
 
745
749
  ### useMessages(initial?)
package/dist/index.d.ts CHANGED
@@ -117,6 +117,8 @@ declare const zhCN: {
117
117
  querying: string;
118
118
  queried: string;
119
119
  generateFailed: string;
120
+ /** 追问建议 chips 区 aria 标签 */
121
+ followups: string;
120
122
  loadingPhrases: string[];
121
123
  };
122
124
  aiArtifacts: {
@@ -540,8 +542,8 @@ declare var __VLS_5: {};
540
542
  declare var __VLS_52$1: {
541
543
  keyword: string;
542
544
  };
543
- declare var __VLS_54$1: {};
544
- declare var __VLS_56: {};
545
+ declare var __VLS_54: {};
546
+ declare var __VLS_56$1: {};
545
547
  declare var __VLS_134: {};
546
548
  type __VLS_Slots$c = {} & {
547
549
  header?: (props: typeof __VLS_1$8) => any;
@@ -552,9 +554,9 @@ type __VLS_Slots$c = {} & {
552
554
  } & {
553
555
  trigger?: (props: typeof __VLS_52$1) => any;
554
556
  } & {
555
- 'action-list'?: (props: typeof __VLS_54$1) => any;
557
+ 'action-list'?: (props: typeof __VLS_54) => any;
556
558
  } & {
557
- 'action-left'?: (props: typeof __VLS_56) => any;
559
+ 'action-left'?: (props: typeof __VLS_56$1) => any;
558
560
  } & {
559
561
  footer?: (props: typeof __VLS_134) => any;
560
562
  };
@@ -891,7 +893,7 @@ declare var __VLS_19$2: {
891
893
  nodeId: string;
892
894
  };
893
895
  declare var __VLS_21$2: {};
894
- declare var __VLS_80: {};
896
+ declare var __VLS_80$1: {};
895
897
  type __VLS_Slots$a = {} & {
896
898
  header?: (props: typeof __VLS_1$7) => any;
897
899
  } & {
@@ -901,7 +903,7 @@ type __VLS_Slots$a = {} & {
901
903
  } & {
902
904
  'action-list'?: (props: typeof __VLS_21$2) => any;
903
905
  } & {
904
- footer?: (props: typeof __VLS_80) => any;
906
+ footer?: (props: typeof __VLS_80$1) => any;
905
907
  };
906
908
  declare const __VLS_base$a: vue.DefineComponent<__VLS_Props$b, {
907
909
  getCurrentValue: typeof getCurrentValue;
@@ -997,20 +999,20 @@ type __VLS_Props$a = {
997
999
  /** 切换门控:start 起始态不可切换;thinking 中可展开查看思考流,end/error 后可自由收起展开 */
998
1000
  declare function toggle(): void;
999
1001
  declare var __VLS_1$6: {};
1000
- declare var __VLS_36$1: {};
1002
+ declare var __VLS_36: {};
1001
1003
  declare var __VLS_38: {};
1002
- declare var __VLS_51$1: {};
1003
- declare var __VLS_53: {};
1004
+ declare var __VLS_51: {};
1005
+ declare var __VLS_53$1: {};
1004
1006
  type __VLS_Slots$9 = {} & {
1005
1007
  'status-icon'?: (props: typeof __VLS_1$6) => any;
1006
1008
  } & {
1007
- label?: (props: typeof __VLS_36$1) => any;
1009
+ label?: (props: typeof __VLS_36) => any;
1008
1010
  } & {
1009
1011
  arrow?: (props: typeof __VLS_38) => any;
1010
1012
  } & {
1011
- error?: (props: typeof __VLS_51$1) => any;
1013
+ error?: (props: typeof __VLS_51) => any;
1012
1014
  } & {
1013
- content?: (props: typeof __VLS_53) => any;
1015
+ content?: (props: typeof __VLS_53$1) => any;
1014
1016
  };
1015
1017
  declare const __VLS_base$9: vue.DefineComponent<__VLS_Props$a, {
1016
1018
  modelValue: vue.Ref<boolean, boolean>;
@@ -1073,12 +1075,12 @@ type __VLS_Props$9 = {
1073
1075
  /** 语言包:'zh-CN'/'en-US' 整包或部分文案对象(优先于祖先注入与全局设置) */
1074
1076
  locale?: LocaleInput;
1075
1077
  };
1076
- declare var __VLS_45$1: {
1078
+ declare var __VLS_45: {
1077
1079
  item: ThoughtChainItem;
1078
1080
  index: number;
1079
1081
  };
1080
1082
  type __VLS_Slots$8 = {} & {
1081
- content?: (props: typeof __VLS_45$1) => any;
1083
+ content?: (props: typeof __VLS_45) => any;
1082
1084
  };
1083
1085
  declare const __VLS_base$8: vue.DefineComponent<__VLS_Props$9, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
1084
1086
  typing: () => any;
@@ -1339,7 +1341,7 @@ declare var __VLS_3$1: {
1339
1341
  item: ConversationItem;
1340
1342
  active: boolean;
1341
1343
  };
1342
- declare var __VLS_31: {
1344
+ declare var __VLS_31$1: {
1343
1345
  item: ConversationItem;
1344
1346
  };
1345
1347
  type __VLS_Slots$3 = {} & {
@@ -1347,7 +1349,7 @@ type __VLS_Slots$3 = {} & {
1347
1349
  } & {
1348
1350
  item?: (props: typeof __VLS_3$1) => any;
1349
1351
  } & {
1350
- menu?: (props: typeof __VLS_31) => any;
1352
+ menu?: (props: typeof __VLS_31$1) => any;
1351
1353
  };
1352
1354
  declare const __VLS_base$3: vue.DefineComponent<__VLS_Props$4, {
1353
1355
  handleMenuCommand: typeof handleMenuCommand;
@@ -1432,6 +1434,12 @@ interface ChatAdapterHandlers {
1432
1434
  toolName: string;
1433
1435
  status: 'start' | 'done';
1434
1436
  }): void;
1437
+ /**
1438
+ * 追问建议(可选):Fv 系 V58+ suggestions 事件(流式收尾 0..1 次,必在 message_end
1439
+ * 之前);开关关闭/模型未产出/中断/失败无此事件。开关开启时回答末尾生成可点击
1440
+ * 追问 chips,点击即作为新用户消息发送
1441
+ */
1442
+ onSuggestions?(items: string[]): void;
1435
1443
  /** 正常结束(含非流式) */
1436
1444
  onDone(): void;
1437
1445
  /** 出错(HTTP 非 2xx / 网络 / 中断) */
@@ -1465,7 +1473,8 @@ declare function OpenAIAdapter(config: OpenAIAdapterConfig): ChatAdapter;
1465
1473
  * Fv 系后端通用聊天适配器(`/api/ai-chat/*`):六事件 SSE 协议
1466
1474
  * (message_start / tool / delta / reasoning / message_end / error),POST `/message/send`。
1467
1475
  * 适用于 Fv 各项目组返回此结构的后端;V57 起新增 reasoning 思考事件
1468
- * (载荷 {text} 与 delta 同构,多轮每轮都推,无思考轮不推)。
1476
+ * (载荷 {text} 与 delta 同构,多轮每轮都推,无思考轮不推);
1477
+ * V58 起新增 suggestions 追问建议事件(流式收尾时 0..1 次,必在 message_end 之前)。
1469
1478
  * 本适配器负责协议解析与事件分发,
1470
1479
  * 会话管理(列表/归档/删除等)由消费方直接调后端,不经此适配器。
1471
1480
  */
@@ -1492,7 +1501,7 @@ interface FvCommonSessionItem {
1492
1501
  createdTime?: string;
1493
1502
  updatedTime?: string;
1494
1503
  }
1495
- /** 历史/详情消息行(assistant 行 toolCalls 为 JSON 字符串,消费方自行 JSON.parse) */
1504
+ /** 历史/详情消息行(assistant 行 toolCalls/suggestions 为 JSON 字符串,消费方自行 JSON.parse) */
1496
1505
  interface FvCommonMessage {
1497
1506
  id: string;
1498
1507
  seq: number;
@@ -1506,6 +1515,13 @@ interface FvCommonMessage {
1506
1515
  toolCalls?: string | null;
1507
1516
  toolCallId?: string | null;
1508
1517
  toolName?: string | null;
1518
+ /**
1519
+ * V58+ 追问建议(仅 assistant 行且 status=SUCCESS 的最终回答非 null;user/tool 行、
1520
+ * GENERATING/INTERRUPTED/FAILED 行、开关关闭期间旧行恒 null)。JSON 数组原文透传
1521
+ * (如 '["问题1","问题2","问题3"]'),与 toolCalls 同款约定:消费方 JSON.parse 并
1522
+ * try-catch 包裹,解析失败按 null 处理不渲染(见 parseSuggestions)
1523
+ */
1524
+ suggestions?: string | null;
1509
1525
  status?: 'GENERATING' | 'SUCCESS' | 'FAILED' | 'INTERRUPTED' | null;
1510
1526
  failReason?: string | null;
1511
1527
  promptTokens?: number | null;
@@ -1539,6 +1555,13 @@ declare class FvCommonError extends Error {
1539
1555
  code?: number | string;
1540
1556
  constructor(message: string, code?: number | string);
1541
1557
  }
1558
+ /**
1559
+ * 安全解析历史消息行的追问建议(FvCommonMessage.suggestions,JSON 数组原文透传)。
1560
+ * 与 toolCalls 同款约定:try-catch 包裹,脏数据(非 JSON/非字符串数组/全空)按无建议
1561
+ * 处理返回 undefined。仅 assistant 行且 status=SUCCESS 的最终回答字段非 null,
1562
+ * 但本函数不校验角色/状态(调用方已按行筛选),只做形状容错。
1563
+ */
1564
+ declare function parseSuggestions(raw: string | null | undefined): string[] | undefined;
1542
1565
  /**
1543
1566
  * Fv 系通用聊天适配器:消费六事件 SSE。
1544
1567
  * 同步段失败(会话不存在/单飞行闸/未启用/参数校验)发生在 SSE 建立前,
@@ -1667,6 +1690,12 @@ interface MessageNode {
1667
1690
  model?: string;
1668
1691
  /** 后端消息行 id(Fv 系带会话管理后端):流式 message_end 时回填,UI 落库/对账锚定用 */
1669
1692
  backendId?: string;
1693
+ /**
1694
+ * 追问建议(Fv 系 V58+:回答末尾生成的可点击追问 chips,点击即作为新用户消息发送)。
1695
+ * 流式经 adapter onSuggestions 回写;历史恢复由消费方从 FvCommonMessage.suggestions
1696
+ * (JSON 数组原文)解析灌入。空/缺省不渲染;展示端仅链尾消息渲染 chips
1697
+ */
1698
+ suggestions?: string[];
1670
1699
  /** 中间轮工具调用列表(JSON 字符串或已展开数组;Fv 系 assistant 行 toolCalls 非空即中间轮) */
1671
1700
  toolCalls?: string | ToolCallItem[];
1672
1701
  /** 父节点 id,根消息为 null */
@@ -1805,28 +1834,28 @@ declare var __VLS_10: {};
1805
1834
  declare var __VLS_13: {};
1806
1835
  declare var __VLS_16$1: {};
1807
1836
  declare var __VLS_19: {};
1808
- declare var __VLS_40: {
1837
+ declare var __VLS_41: {
1809
1838
  message: MessageNode;
1810
1839
  };
1811
- declare var __VLS_43: {
1840
+ declare var __VLS_44: {
1812
1841
  message: MessageNode;
1813
1842
  };
1814
- declare var __VLS_46: {};
1815
- declare var __VLS_49: {
1843
+ declare var __VLS_47: {};
1844
+ declare var __VLS_50: {
1816
1845
  status: "thinking" | "error" | "done";
1817
1846
  message: MessageNode;
1818
1847
  };
1819
- declare var __VLS_52: {
1848
+ declare var __VLS_53: {
1820
1849
  message: MessageNode;
1821
1850
  };
1822
- declare var __VLS_55: {
1851
+ declare var __VLS_56: {
1823
1852
  message: MessageNode;
1824
1853
  };
1825
- declare var __VLS_63$1: {
1854
+ declare var __VLS_64$1: {
1826
1855
  scrollToBottom: typeof scrollToBottom;
1827
1856
  awayFromBottom: boolean;
1828
1857
  };
1829
- declare var __VLS_79: {};
1858
+ declare var __VLS_80: {};
1830
1859
  type __VLS_Slots$2 = {} & {
1831
1860
  empty?: (props: typeof __VLS_1$1) => any;
1832
1861
  } & {
@@ -1838,21 +1867,21 @@ type __VLS_Slots$2 = {} & {
1838
1867
  } & {
1839
1868
  'welcome-suggestions'?: (props: typeof __VLS_19) => any;
1840
1869
  } & {
1841
- 'message-avatar'?: (props: typeof __VLS_40) => any;
1870
+ 'message-avatar'?: (props: typeof __VLS_41) => any;
1842
1871
  } & {
1843
- 'message-actions'?: (props: typeof __VLS_43) => any;
1872
+ 'message-actions'?: (props: typeof __VLS_44) => any;
1844
1873
  } & {
1845
- 'user-avatar'?: (props: typeof __VLS_46) => any;
1874
+ 'user-avatar'?: (props: typeof __VLS_47) => any;
1846
1875
  } & {
1847
- 'assistant-avatar'?: (props: typeof __VLS_49) => any;
1876
+ 'assistant-avatar'?: (props: typeof __VLS_50) => any;
1848
1877
  } & {
1849
- 'user-name'?: (props: typeof __VLS_52) => any;
1878
+ 'user-name'?: (props: typeof __VLS_53) => any;
1850
1879
  } & {
1851
- 'assistant-name'?: (props: typeof __VLS_55) => any;
1880
+ 'assistant-name'?: (props: typeof __VLS_56) => any;
1852
1881
  } & {
1853
- 'scroll-button'?: (props: typeof __VLS_63$1) => any;
1882
+ 'scroll-button'?: (props: typeof __VLS_64$1) => any;
1854
1883
  } & {
1855
- 'scroll-button-icon'?: (props: typeof __VLS_79) => any;
1884
+ 'scroll-button-icon'?: (props: typeof __VLS_80) => any;
1856
1885
  };
1857
1886
  declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$3, {
1858
1887
  scrollTo: typeof scrollTo$1;
@@ -1866,12 +1895,14 @@ declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$3, {
1866
1895
  regenerate: (message: MessageNode) => any;
1867
1896
  select: (item: AiMessagesSuggestion) => any;
1868
1897
  "branch-change": (dir: BranchDirection, message: MessageNode) => any;
1898
+ "followup-select": (item: string, message: MessageNode) => any;
1869
1899
  }, string, vue.PublicProps, Readonly<__VLS_Props$3> & Readonly<{
1870
1900
  onScroll?: ((event: Event) => any) | undefined;
1871
1901
  onCopy?: ((message: MessageNode) => any) | undefined;
1872
1902
  onRegenerate?: ((message: MessageNode) => any) | undefined;
1873
1903
  onSelect?: ((item: AiMessagesSuggestion) => any) | undefined;
1874
1904
  "onBranch-change"?: ((dir: BranchDirection, message: MessageNode) => any) | undefined;
1905
+ "onFollowup-select"?: ((item: string, message: MessageNode) => any) | undefined;
1875
1906
  }>, {
1876
1907
  description: string;
1877
1908
  name: string;
@@ -2051,62 +2082,62 @@ declare function expandThoughtChains(): void;
2051
2082
  declare function collapseThoughtChains(): void;
2052
2083
  /** 消息区滚动到指定位置(透传 AiMessages scrollTo;options 同原生 ScrollToOptions) */
2053
2084
  declare function scrollTo(options: ScrollToOptions | number): void;
2054
- declare var __VLS_27: {
2085
+ declare var __VLS_28: {
2055
2086
  message: MessageNode;
2056
2087
  };
2057
- declare var __VLS_30: {
2088
+ declare var __VLS_31: {
2058
2089
  message: MessageNode;
2059
2090
  };
2060
- declare var __VLS_33: {};
2061
- declare var __VLS_36: {
2091
+ declare var __VLS_34: {};
2092
+ declare var __VLS_37: {
2062
2093
  status: "thinking" | "error" | "done";
2063
2094
  message: MessageNode;
2064
2095
  };
2065
- declare var __VLS_39: {
2096
+ declare var __VLS_40: {
2066
2097
  message: MessageNode;
2067
2098
  };
2068
- declare var __VLS_42: {
2099
+ declare var __VLS_43: {
2069
2100
  message: MessageNode;
2070
2101
  };
2071
- declare var __VLS_45: {};
2072
- declare var __VLS_48: {};
2073
- declare var __VLS_51: {};
2074
- declare var __VLS_54: {};
2075
- declare var __VLS_57: {};
2076
- declare var __VLS_60: {
2102
+ declare var __VLS_46: {};
2103
+ declare var __VLS_49: {};
2104
+ declare var __VLS_52: {};
2105
+ declare var __VLS_55: {};
2106
+ declare var __VLS_58: {};
2107
+ declare var __VLS_61: {
2077
2108
  scrollToBottom: (smooth?: boolean) => void;
2078
2109
  awayFromBottom: boolean;
2079
2110
  };
2080
- declare var __VLS_63: {};
2081
- declare var __VLS_99: {};
2111
+ declare var __VLS_64: {};
2112
+ declare var __VLS_100: {};
2082
2113
  type __VLS_Slots$1 = {} & {
2083
- 'message-avatar'?: (props: typeof __VLS_27) => any;
2114
+ 'message-avatar'?: (props: typeof __VLS_28) => any;
2084
2115
  } & {
2085
- 'message-actions'?: (props: typeof __VLS_30) => any;
2116
+ 'message-actions'?: (props: typeof __VLS_31) => any;
2086
2117
  } & {
2087
- 'user-avatar'?: (props: typeof __VLS_33) => any;
2118
+ 'user-avatar'?: (props: typeof __VLS_34) => any;
2088
2119
  } & {
2089
- 'assistant-avatar'?: (props: typeof __VLS_36) => any;
2120
+ 'assistant-avatar'?: (props: typeof __VLS_37) => any;
2090
2121
  } & {
2091
- 'user-name'?: (props: typeof __VLS_39) => any;
2122
+ 'user-name'?: (props: typeof __VLS_40) => any;
2092
2123
  } & {
2093
- 'assistant-name'?: (props: typeof __VLS_42) => any;
2124
+ 'assistant-name'?: (props: typeof __VLS_43) => any;
2094
2125
  } & {
2095
- empty?: (props: typeof __VLS_45) => any;
2126
+ empty?: (props: typeof __VLS_46) => any;
2096
2127
  } & {
2097
- 'welcome-name'?: (props: typeof __VLS_48) => any;
2128
+ 'welcome-name'?: (props: typeof __VLS_49) => any;
2098
2129
  } & {
2099
- 'welcome-description'?: (props: typeof __VLS_51) => any;
2130
+ 'welcome-description'?: (props: typeof __VLS_52) => any;
2100
2131
  } & {
2101
- 'welcome-icon'?: (props: typeof __VLS_54) => any;
2132
+ 'welcome-icon'?: (props: typeof __VLS_55) => any;
2102
2133
  } & {
2103
- 'welcome-suggestions'?: (props: typeof __VLS_57) => any;
2134
+ 'welcome-suggestions'?: (props: typeof __VLS_58) => any;
2104
2135
  } & {
2105
- 'scroll-button'?: (props: typeof __VLS_60) => any;
2136
+ 'scroll-button'?: (props: typeof __VLS_61) => any;
2106
2137
  } & {
2107
- 'scroll-button-icon'?: (props: typeof __VLS_63) => any;
2138
+ 'scroll-button-icon'?: (props: typeof __VLS_64) => any;
2108
2139
  } & {
2109
- 'sender-prefix'?: (props: typeof __VLS_99) => any;
2140
+ 'sender-prefix'?: (props: typeof __VLS_100) => any;
2110
2141
  };
2111
2142
  declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
2112
2143
  sendMessage: typeof sendMessage;
@@ -2124,6 +2155,7 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
2124
2155
  send: (text: string, files?: ChatFile[] | undefined) => any;
2125
2156
  error: (err: Error, message?: MessageNode | undefined) => any;
2126
2157
  "branch-change": (dir: BranchDirection, message: MessageNode) => any;
2158
+ "followup-select": (item: string, message: MessageNode) => any;
2127
2159
  "update:messages": (value: MessageNode[]) => any;
2128
2160
  "suggestion-select": (item: AiChatSuggestion) => any;
2129
2161
  "message-complete": (message: MessageNode) => any;
@@ -2137,6 +2169,7 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
2137
2169
  onSend?: ((text: string, files?: ChatFile[] | undefined) => any) | undefined;
2138
2170
  onError?: ((err: Error, message?: MessageNode | undefined) => any) | undefined;
2139
2171
  "onBranch-change"?: ((dir: BranchDirection, message: MessageNode) => any) | undefined;
2172
+ "onFollowup-select"?: ((item: string, message: MessageNode) => any) | undefined;
2140
2173
  "onUpdate:messages"?: ((value: MessageNode[]) => any) | undefined;
2141
2174
  "onSuggestion-select"?: ((item: AiChatSuggestion) => any) | undefined;
2142
2175
  "onMessage-complete"?: ((message: MessageNode) => any) | undefined;
@@ -2213,6 +2246,11 @@ type __VLS_Props$1 = {
2213
2246
  message: MessageNode;
2214
2247
  /** 同层分支元数据;缺省视为单分支(不渲染切换器) */
2215
2248
  branch?: AiMessageBranchInfo;
2249
+ /**
2250
+ * 是否当前链最后一条消息(由 AiMessages 按链位置判定注入)。
2251
+ * 追问建议 chips 仅链尾消息渲染——此前消息即使留有 suggestions 也不显示
2252
+ */
2253
+ isLast?: boolean;
2216
2254
  /** 显示操作按钮(复制/重生成;仅 assistant) */
2217
2255
  showActions?: boolean;
2218
2256
  /** 显示分支切换器(branch.count > 1 时) */
@@ -2312,11 +2350,13 @@ declare const __VLS_base: vue.DefineComponent<__VLS_Props$1, {
2312
2350
  regenerate: (message: MessageNode) => any;
2313
2351
  typing: () => any;
2314
2352
  "branch-change": (dir: BranchDirection, message: MessageNode) => any;
2353
+ "followup-select": (item: string, message: MessageNode) => any;
2315
2354
  }, string, vue.PublicProps, Readonly<__VLS_Props$1> & Readonly<{
2316
2355
  onCopy?: ((message: MessageNode) => any) | undefined;
2317
2356
  onRegenerate?: ((message: MessageNode) => any) | undefined;
2318
2357
  onTyping?: (() => any) | undefined;
2319
2358
  "onBranch-change"?: ((dir: BranchDirection, message: MessageNode) => any) | undefined;
2359
+ "onFollowup-select"?: ((item: string, message: MessageNode) => any) | undefined;
2320
2360
  }>, {
2321
2361
  typing: boolean | {
2322
2362
  step?: number;
@@ -2326,6 +2366,7 @@ declare const __VLS_base: vue.DefineComponent<__VLS_Props$1, {
2326
2366
  collapsible: boolean;
2327
2367
  showDuration: boolean;
2328
2368
  branch: AiMessageBranchInfo;
2369
+ isLast: boolean;
2329
2370
  showActions: boolean;
2330
2371
  showBranchSwitch: boolean;
2331
2372
  showUserAvatar: boolean;
@@ -2568,5 +2609,5 @@ declare function createMessageTree(initial?: {
2568
2609
 
2569
2610
  declare const version = "0.1.0";
2570
2611
 
2571
- export { _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, FvCommonAdapter, FvCommonError, _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, configureLocale, createLocalStorageAdapter, createMemoryAdapter, createMessageTree, createSSEParser, enUS, useChat, useMessages, useRecord, useSend, useXStream, version, zhCN };
2612
+ export { _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, FvCommonAdapter, FvCommonError, _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, configureLocale, createLocalStorageAdapter, createMemoryAdapter, createMessageTree, createSSEParser, enUS, parseSuggestions, useChat, useMessages, useRecord, useSend, useXStream, version, zhCN };
2572
2613
  export type { AdapterChatMessage, AiArtifactItem, AiChatArtifactsOptions, AiChatFeatures, AiChatSuggestion, AiMessageBranchInfo, AiMessagesSuggestion, BranchDirection, ChatAdapter, ChatAdapterHandlers, ChatAdapterRequest, ChatFile, DeepPartialLocale, FvCommonAdapterConfig, FvCommonMessage, FvCommonMessagePage, FvCommonSendBody, FvCommonSessionDetail, FvCommonSessionItem, FvCommonToolEvent, LocaleInput, LocaleMessages, MessageNode, MessageNodeInput, MessageRole, MessageStatus, MessageTree, MessageUsage, OpenAIAdapterConfig, QueueItem, RawUsage, SSEEvent, SSEParser, SendOptions, StorageAdapter, ToolCallItem, ToolStepItem, UseChatOptions, UseChatReturn, UseMessagesReturn, UseRecordReturn, UseSendReturn, UseXStreamReturn };