@fv-ui/ai-chat 1.1.1 → 1.1.2

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
@@ -485,6 +485,7 @@ Markdown 渲染(Sanitized by DOMPurify),内置 Prism 代码高亮与 KaTeX。
485
485
  | senderAutosize | { minRows?; maxRows? } | { minRows: 3, maxRows: 7 } | 输入区自增高(透传 Sender autosize;默认 3 行起步,内容多时自动加高至最多 7 行后内部滚动) |
486
486
  | toolStepLabel | (toolName) => string | undefined | 工具名 → 步骤展示名(透传 useChat toolStepLabel) |
487
487
  | typing | boolean \| { step?; interval? } | false | 打字机(透传 AiMessages;仅 assistant 流式期间逐字平滑打出,落定/历史消息整段渲染) |
488
+ | autoCollapse | boolean | true | 正文出完自动收起思考链(透传 AiMessage;status 落 done 且正文打完才收;error 不收) |
488
489
  | collapsible | boolean | false | 思考链工具步长文案展开/收起(透传 ThoughtChain;超 3 行截断 + 行尾「展开/收起」) |
489
490
  | showDuration | boolean | false | 显示工具步用时 description(透传 ThoughtChain;默认关闭) |
490
491
  | showTime | boolean | true | 显示消息时间(操作区按钮之后;时间源:`message.createdTime`——Fv 系后端直灌,秒级/毫秒级时间戳或 ISO 字符串自动识别——优先,缺省回落 `message.createdAt`) |
@@ -573,6 +574,7 @@ Markdown 渲染(Sanitized by DOMPurify),内置 Prism 代码高亮与 KaTeX。
573
574
  | assistantName | string | '' | 助手名称(透传 AiMessage;空串回落「小维」) |
574
575
  | showTime | boolean | true | 显示消息时间(透传 AiMessage;时间源 createdTime 优先,缺省回落 createdAt) |
575
576
  | timeFormat | (message, timestamp) => string | undefined | 消息时间自定义格式化(透传 AiMessage) |
577
+ | autoCollapse | boolean | true | 正文出完自动收起思考链(透传 AiMessage;status 落 done 且正文打完才收;error 不收) |
576
578
  | locale | LocaleInput(string \| 对象) | undefined | 语言包:'zh-CN'/'en-US' 整包或部分文案对象(优先于祖先注入与全局设置) |
577
579
 
578
580
  | Event | 说明 |
@@ -621,7 +623,7 @@ Markdown 渲染(Sanitized by DOMPurify),内置 Prism 代码高亮与 KaTeX。
621
623
  | avatarCircle | boolean | true | 头像圆形模式(透传 AiMessage;默认 true:圆角 50%;--fv-msg-avatar-radius 变量优先于开关) |
622
624
  | userName | string | '' | 用户名称(空串回落「你」) |
623
625
  | assistantName | string | '' | 助手名称(空串回落「小维」) |
624
- | autoCollapse | boolean | true | Thinking autoCollapse 透传 |
626
+ | autoCollapse | boolean | true | 正文出完自动收起思考链(status 落 done 且正文打字机不再打字时折叠;error 不收,保留链供排查;历史消息不受影响,仍默认收起) |
625
627
  | typing | boolean \| { step?; interval? } | false | 打字机(透传 Typewriter;仅 assistant 流式期间生效,落定/历史消息整段渲染) |
626
628
  | collapsible | boolean | false | 思考链工具步长文案展开/收起开关(透传 ThoughtChain) |
627
629
  | showDuration | boolean | false | 显示工具步用时 description(透传 ThoughtChain;默认关闭) |
package/dist/index.d.ts CHANGED
@@ -1772,6 +1772,8 @@ type __VLS_Props$3 = {
1772
1772
  step?: number;
1773
1773
  interval?: number;
1774
1774
  };
1775
+ /** 正文出完自动收起思考链(透传 AiMessage;默认开启,落定且正文打完才收;error 不收) */
1776
+ autoCollapse?: boolean;
1775
1777
  /** 思考链长文案展开/收起开关(透传 AiMessage→ThoughtChain;默认关闭) */
1776
1778
  collapsible?: boolean;
1777
1779
  /** 显示工具步用时 description(透传 AiMessage→ThoughtChain showDuration;默认关闭) */
@@ -1820,7 +1822,7 @@ declare var __VLS_52: {
1820
1822
  declare var __VLS_55: {
1821
1823
  message: MessageNode;
1822
1824
  };
1823
- declare var __VLS_63$2: {
1825
+ declare var __VLS_63$1: {
1824
1826
  scrollToBottom: typeof scrollToBottom;
1825
1827
  awayFromBottom: boolean;
1826
1828
  };
@@ -1848,7 +1850,7 @@ type __VLS_Slots$2 = {} & {
1848
1850
  } & {
1849
1851
  'assistant-name'?: (props: typeof __VLS_55) => any;
1850
1852
  } & {
1851
- 'scroll-button'?: (props: typeof __VLS_63$2) => any;
1853
+ 'scroll-button'?: (props: typeof __VLS_63$1) => any;
1852
1854
  } & {
1853
1855
  'scroll-button-icon'?: (props: typeof __VLS_79) => any;
1854
1856
  };
@@ -1879,6 +1881,7 @@ declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$3, {
1879
1881
  interval?: number;
1880
1882
  };
1881
1883
  nodes: Record<string, MessageNode>;
1884
+ autoCollapse: boolean;
1882
1885
  collapsible: boolean;
1883
1886
  showDuration: boolean;
1884
1887
  suggestions: AiMessagesSuggestion[];
@@ -1996,6 +1999,9 @@ type __VLS_Props$2 = {
1996
1999
  step?: number;
1997
2000
  interval?: number;
1998
2001
  };
2002
+ /** 正文出完自动收起思考链(透传 AiMessages→AiMessage;默认开启:
2003
+ * status 落 done 且正文打字机不再打字时折叠;error 不收,保留链供排查) */
2004
+ autoCollapse?: boolean;
1999
2005
  /** 思考链长文案展开/收起开关(透传 AiMessages→AiMessage→ThoughtChain;
2000
2006
  * 默认关闭,超长 title 原样全量展示;开启后超 3 行截断 + 行尾「展开/收起」) */
2001
2007
  collapsible?: boolean;
@@ -2071,7 +2077,7 @@ declare var __VLS_60: {
2071
2077
  scrollToBottom: (smooth?: boolean) => void;
2072
2078
  awayFromBottom: boolean;
2073
2079
  };
2074
- declare var __VLS_63$1: {};
2080
+ declare var __VLS_63: {};
2075
2081
  declare var __VLS_99: {};
2076
2082
  type __VLS_Slots$1 = {} & {
2077
2083
  'message-avatar'?: (props: typeof __VLS_27) => any;
@@ -2098,7 +2104,7 @@ type __VLS_Slots$1 = {} & {
2098
2104
  } & {
2099
2105
  'scroll-button'?: (props: typeof __VLS_60) => any;
2100
2106
  } & {
2101
- 'scroll-button-icon'?: (props: typeof __VLS_63$1) => any;
2107
+ 'scroll-button-icon'?: (props: typeof __VLS_63) => any;
2102
2108
  } & {
2103
2109
  'sender-prefix'?: (props: typeof __VLS_99) => any;
2104
2110
  };
@@ -2146,6 +2152,7 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
2146
2152
  interval?: number;
2147
2153
  };
2148
2154
  placeholder: string;
2155
+ autoCollapse: boolean;
2149
2156
  collapsible: boolean;
2150
2157
  showDuration: boolean;
2151
2158
  suggestions: AiChatSuggestion[];
@@ -2231,7 +2238,8 @@ type __VLS_Props$1 = {
2231
2238
  userName?: string;
2232
2239
  /** 助手名称(空串回落「小维」;细分插槽可整体覆盖) */
2233
2240
  assistantName?: string;
2234
- /** Thinking autoCollapse 透传 */
2241
+ /** 正文出完自动收起思考链(默认开启):status 落 done 且正文打字机不再打字
2242
+ * (未启用打字机则落定即收;仍在播积压则播完即收)时折叠;error 不收(保留链供排查) */
2235
2243
  autoCollapse?: boolean;
2236
2244
  /** 打字机(透传 Typewriter;仅 assistant 流式期间生效,落定/历史消息整段渲染) */
2237
2245
  typing?: boolean | {
@@ -2276,7 +2284,7 @@ declare var __VLS_22: {
2276
2284
  message: MessageNode;
2277
2285
  files: ChatFile[];
2278
2286
  };
2279
- declare var __VLS_63: {
2287
+ declare var __VLS_66: {
2280
2288
  message: MessageNode;
2281
2289
  };
2282
2290
  type __VLS_Slots = {} & {
@@ -2292,7 +2300,7 @@ type __VLS_Slots = {} & {
2292
2300
  } & {
2293
2301
  'message-files'?: (props: typeof __VLS_22) => any;
2294
2302
  } & {
2295
- 'message-actions'?: (props: typeof __VLS_63) => any;
2303
+ 'message-actions'?: (props: typeof __VLS_66) => any;
2296
2304
  };
2297
2305
  declare const __VLS_base: vue.DefineComponent<__VLS_Props$1, {
2298
2306
  message: vue.ComputedRef<MessageNode>;
Binary file