@fv-ui/ai-chat 1.11.0 → 2.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
@@ -1,5 +1,9 @@
1
1
  import * as vue from 'vue';
2
- import { Component, Ref, ComputedRef } from 'vue';
2
+ import { Component, Ref } from 'vue';
3
+ import * as _fv_ui_ai_chat_core from '@fv-ui/ai-chat-core';
4
+ import { LocaleInput, FvAiFolder, MessageNode, ChatFile, ActionCardPayload, ActionCardResult, BranchDirection, ActionCardStatus, ChatAdapter, ActionCardOption, FvAiSessionService, FvAiSearchHit } from '@fv-ui/ai-chat-core';
5
+ export * from '@fv-ui/ai-chat-core';
6
+ export { ActionCardExecuteFn, ActionCardOption, ActionCardPayload, ActionCardResult, ActionCardStatus, ActionPairItem, ActionRowContent, AdapterChatMessage, AiChatT, BranchDirection, ChatAdapter, ChatAdapterHandlers, ChatAdapterRequest, ChatFile, DRAFT_SESSION_ID, DeepPartialLocale, FvAiFolder, FvAiFolderListResult, FvAiHistoryQuery, FvAiMessagePage, FvAiSessionListQuery, FvAiSessionPage, FvAiSessionService, FvCommonAdapter, FvCommonAdapterConfig, FvCommonError, FvCommonMessage, FvCommonMessagePage, FvCommonSendBody, FvCommonSessionDetail, FvCommonSessionItem, FvCommonToolEvent, LocaleCode, LocaleInput, LocaleMessages, MessageFeedback, MessageNode, MessageNodeInput, MessageRole, MessageStatus, MessageTree, MessageUsage, OpenAIAdapter, OpenAIAdapterConfig, PlanRowContent, QueueItem, RawUsage, SSEEvent, SSEParser, SendOptions, StorageAdapter, ToolStepItem, UseChatOptions, UseChatReturn, UseMessagesReturn, UseRecordReturn, UseSendReturn, UseXStreamReturn, XRequest, actionItemsToMessageNodes, buildPlanRowAnchorMap, configureLocale, createLocalStorageAdapter, createMemoryAdapter, createMessageTree, createSSEParser, en, ko, mapHistoryToNodes, normalizeHistoryQuery, parseActionRowContent, parsePlanRowContent, parseSuggestions, resolveActionHistoryPairing, sanitizeActionCard, sessionToConversationItem, useChat, useMessages, useRecord, useSend, useXStream, vi, zhCN, zhHK } from '@fv-ui/ai-chat-core';
3
7
  import { ElAvatar, ElPopover } from 'element-plus';
4
8
 
5
9
  /**
@@ -20,1209 +24,7 @@ interface CreateMarkdownOptions {
20
24
  };
21
25
  }
22
26
 
23
- /**
24
- * zh-CN 语言包(默认语言)。
25
- * 值与各组件历史硬编码文案逐字一致(全角标点、省略号均保持),保证零配置升级无任何视觉变化。
26
- * 结构即 LocaleMessages 源型;en/ko/vi/zh-HK 以类型注解同构对齐。
27
- */
28
- declare const zhCN: {
29
- common: {
30
- copy: string;
31
- delete: string;
32
- confirm: string;
33
- cancel: string;
34
- retry: string;
35
- close: string;
36
- preview: string;
37
- clear: string;
38
- stop: string;
39
- send: string;
40
- download: string;
41
- fullscreen: string;
42
- collapse: string;
43
- expand: string;
44
- /** 复制成功提示(表格工具栏等) */
45
- copied: string;
46
- };
47
- thinking: {
48
- start: string;
49
- thinking: string;
50
- end: string;
51
- /** 用户中断(useChat.stop()):思考链头文案,与 error(真实出错)区分 */
52
- interrupted: string;
53
- error: string;
54
- /** 多 item 总折叠头汇总文案(落定态,带工具次数;{n} = 工具步数量) */
55
- endWithTools: string;
56
- /** 多 item 总折叠头汇总文案(用户中断态,带工具次数;{n} = 工具步数量) */
57
- interruptedWithTools: string;
58
- /** 思考链 text 步标题(进行中/已完结) */
59
- thinkingItem: string;
60
- thoughtDoneItem: string;
61
- };
62
- welcome: {
63
- greetingPrefix: string;
64
- greetingName: string;
65
- description: string;
66
- /** 空态建议区「换一批」按钮默认文案 */
67
- refreshSuggestions: string;
68
- };
69
- sender: {
70
- clear: string;
71
- stop: string;
72
- send: string;
73
- speech: string;
74
- recordCancel: string;
75
- recordConfirm: string;
76
- micUnavailable: string;
77
- /** 输入框占位文案(placeholder prop 未传时的默认) */
78
- inputPlaceholder: string;
79
- };
80
- editorSender: {
81
- clear: string;
82
- stop: string;
83
- send: string;
84
- inputPlaceholder: string;
85
- selectTagTitle: string;
86
- loading: string;
87
- tagTip: string;
88
- };
89
- attachments: {
90
- add: string;
91
- retry: string;
92
- /** 上传中状态角标文案(loading 态 files 卡片辅助提示) */
93
- uploading: string;
94
- };
95
- filesCard: {
96
- remove: string;
97
- /** 下载按钮(onDownload 注入时渲染,aria 标签) */
98
- download: string;
99
- };
100
- conversations: {
101
- menuLabel: string;
102
- rename: string;
103
- delete: string;
104
- renameTitle: string;
105
- renamePrompt: string;
106
- renamePlaceholder: string;
107
- deleteTitle: string;
108
- deleteConfirm: string;
109
- };
110
- sessionSidebar: {
111
- newChat: string;
112
- searchPlaceholder: string;
113
- collapse: string;
114
- expand: string;
115
- activeTab: string;
116
- archivedTab: string;
117
- today: string;
118
- earlier: string;
119
- archived: string;
120
- restore: string;
121
- archive: string;
122
- renamed: string;
123
- deleted: string;
124
- archivedDone: string;
125
- restored: string;
126
- operationFailed: string;
127
- listLoading: string;
128
- };
129
- aiChatPanel: {
130
- loadEarlier: string;
131
- createFailed: string;
132
- generateFailed: string;
133
- /** 悬浮面板头部关闭按钮 aria */
134
- close: string;
135
- /** 悬浮面板头部模式切换按钮:当前抽屉态,点击切悬窗 */
136
- floatMode: string;
137
- /** 悬浮面板头部模式切换按钮:当前悬窗态,点击切回抽屉 */
138
- drawerMode: string;
139
- /** 悬浮面板头部最大化按钮:点击进最大化(占满视口 + 侧栏 + 大屏欢迎页) */
140
- maximize: string;
141
- /** 悬浮面板头部最大化按钮:最大化态,点击还原原形态 */
142
- restore: string;
143
- /** 悬浮面板头部历史会话按钮(下拉覆盖层) */
144
- history: string;
145
- /** 历史会话下拉空态文案 */
146
- historyEmpty: string;
147
- /** 历史会话下拉层「返回」按钮(收起下拉层,露出对话区) */
148
- back: string;
149
- /** 悬浮入口按钮 aria */
150
- launcher: string;
151
- };
152
- /** 历史回放状态文案(historyMapper 以中文原文为 key 查表,miss 回落 key 原文) */
153
- historyMapper: {
154
- 回复生成中断: string;
155
- 回复失败: string;
156
- 回复已中断: string;
157
- '\u56DE\u590D\u5DF2\u4E2D\u65AD\uFF0C\u4EE5\u4E0A\u4E3A\u5DF2\u751F\u6210\u90E8\u5206': string;
158
- '\u7528\u65F6 {s}': string;
159
- 已归档: string;
160
- /** plan_ 前缀工具步统一展示名(流式与历史回放同口径) */
161
- 操作预案: string;
162
- };
163
- scroll: {
164
- toBottom: string;
165
- };
166
- aiChat: {
167
- modelPlaceholder: string;
168
- adapterMissing: string;
169
- generateFailed: string;
170
- exportUser: string;
171
- exportAssistant: string;
172
- };
173
- aiMessage: {
174
- copy: string;
175
- regenerate: string;
176
- prevBranch: string;
177
- nextBranch: string;
178
- defaultUserName: string;
179
- defaultAssistantName: string;
180
- querying: string;
181
- queried: string;
182
- generateFailed: string;
183
- /** 追问建议 chips 区 aria 标签 */
184
- followups: string;
185
- /** 追问建议区标题(list 样式:分隔线下方灰色标题) */
186
- followupsTitle: string;
187
- loadingPhrases: string[];
188
- /** 消息评价(点赞/点踩) */
189
- feedback: {
190
- like: string;
191
- dislike: string;
192
- /** 点踩弹窗标题({name} = AI 名称,渲染时替换为 assistantName,空串回落 defaultAssistantName) */
193
- dislikeTitle: string;
194
- /** 点踩附言输入占位(选填 ≤500 字) */
195
- dislikePlaceholder: string;
196
- /** 附言提交按钮(不带原因直接点踩) */
197
- submit: string;
198
- /** 附言跳过按钮 */
199
- skip: string;
200
- /** 评价提交失败(钩子 reject/返回错误文案时 toast) */
201
- failed: string;
202
- /** 已取消评价 toast(CLEAR 成功后提示) */
203
- cleared: string;
204
- };
205
- };
206
- aiArtifacts: {
207
- copy: string;
208
- download: string;
209
- fullscreen: string;
210
- close: string;
211
- };
212
- /** 写操作确认卡(V59+「预案-确认-执行」):预案摘要原样渲染服务端文案,本组仅卡片壳文案 */
213
- actionCard: {
214
- /** 卡片标题(待确认态) */
215
- pendingTitle: string;
216
- /** 确认执行按钮(点击后进入 loading,服务端内调最坏 ~35s) */
217
- confirm: string;
218
- /** 取消按钮(点击即转「已取消」终态) */
219
- cancel: string;
220
- /** 过期倒计时(剩余 m 分 s 秒;客户端时钟可能漂移,归零仅作 UI 预判) */
221
- expiresIn: string;
222
- /** 确认执行中(loading 态按钮文案;期间禁用取消) */
223
- executing: string;
224
- /** 成功终态标签 */
225
- successTitle: string;
226
- /** 失败终态标签(令牌已消费,无重试入口) */
227
- failedTitle: string;
228
- /** 已取消终态标签(用户主动取消,cancel success=false 非错误) */
229
- cancelledTitle: string;
230
- /** 已过期未执行终态标签(expiresAt 归零或服务端 30019) */
231
- expiredTitle: string;
232
- /** 已失效终态标签(30017 令牌无效/已消费/他人令牌;30021 功能未开启) */
233
- invalidTitle: string;
234
- /** 内调返回明细折叠区标题(默认收起) */
235
- detailTitle: string;
236
- /** 失败终态引导文案(令牌一次性失败不退,须重新发起对话) */
237
- failedHint: string;
238
- };
239
- chat: {
240
- fileTag: string;
241
- fileImageTag: string;
242
- filesSystemPrompt: string;
243
- toolDuration: string;
244
- continuePrompt: string;
245
- };
246
- errors: {
247
- requestFailed: string;
248
- sessionIdMissing: string;
249
- noBody: string;
250
- generateFailed: string;
251
- recordUnsupported: string;
252
- speechError: string;
253
- /** 附件类型拦截提示({name} = 文件名;accept 白名单外文件入列前 toast) */
254
- attachmentRejected: string;
255
- };
256
- };
257
-
258
- /**
259
- * 语言包类型:以 zh-CN 为源型推导(单一事实来源,勿手写接口——新增 key 只改 zh-CN,其余包编译期报缺)。
260
- */
261
- type LocaleMessages = typeof zhCN;
262
-
263
- /** en 语言包(LocaleMessages 类型注解:key 集合与 zh-CN 编译期对齐) */
264
- declare const en: LocaleMessages;
265
-
266
- /** ko(한국어)语言包(LocaleMessages 类型注解:key 集合与 zh-CN 编译期对齐) */
267
- declare const ko: LocaleMessages;
268
-
269
- /** vi(Tiếng Việt)语言包(LocaleMessages 类型注解:key 集合与 zh-CN 编译期对齐) */
270
- declare const vi: LocaleMessages;
271
-
272
- /** zh-HK(香港繁體)语言包(LocaleMessages 类型注解:key 集合与 zh-CN 编译期对齐;港式用词:檔案/資料/支援/上載/傳送) */
273
- declare const zhHK: LocaleMessages;
274
-
275
- /** 递归深 Partial:数组/叶子保持原样(与 deepMerge 覆盖语义对齐),对象层级逐层可选 */
276
- type DeepPartial<T> = T extends readonly (infer _)[] ? T : T extends object ? {
277
- [K in keyof T]?: DeepPartial<T[K]>;
278
- } : T;
279
- /** 组件 locale prop 对象形态:任意层级均可部分覆盖(如仅覆盖 aiMessage.feedback.dislikeTitle) */
280
- type DeepPartialLocale = DeepPartial<LocaleMessages>;
281
- /** 组件 locale prop 形态:内置语言名字符串(整包切换)或部分文案对象(在基底上深合并) */
282
- type LocaleInput = string | DeepPartialLocale;
283
- /** 内置语言包注册表(configureLocale 字符串形态查这里);zh-HK 系繁体需与简体区分故保留区域码,其余用短码 */
284
- declare const PACKS: {
285
- readonly 'zh-CN': {
286
- common: {
287
- copy: string;
288
- delete: string;
289
- confirm: string;
290
- cancel: string;
291
- retry: string;
292
- close: string;
293
- preview: string;
294
- clear: string;
295
- stop: string;
296
- send: string;
297
- download: string;
298
- fullscreen: string;
299
- collapse: string;
300
- expand: string;
301
- copied: string;
302
- };
303
- thinking: {
304
- start: string;
305
- thinking: string;
306
- end: string;
307
- interrupted: string;
308
- error: string;
309
- endWithTools: string;
310
- interruptedWithTools: string;
311
- thinkingItem: string;
312
- thoughtDoneItem: string;
313
- };
314
- welcome: {
315
- greetingPrefix: string;
316
- greetingName: string;
317
- description: string;
318
- refreshSuggestions: string;
319
- };
320
- sender: {
321
- clear: string;
322
- stop: string;
323
- send: string;
324
- speech: string;
325
- recordCancel: string;
326
- recordConfirm: string;
327
- micUnavailable: string;
328
- inputPlaceholder: string;
329
- };
330
- editorSender: {
331
- clear: string;
332
- stop: string;
333
- send: string;
334
- inputPlaceholder: string;
335
- selectTagTitle: string;
336
- loading: string;
337
- tagTip: string;
338
- };
339
- attachments: {
340
- add: string;
341
- retry: string;
342
- uploading: string;
343
- };
344
- filesCard: {
345
- remove: string;
346
- download: string;
347
- };
348
- conversations: {
349
- menuLabel: string;
350
- rename: string;
351
- delete: string;
352
- renameTitle: string;
353
- renamePrompt: string;
354
- renamePlaceholder: string;
355
- deleteTitle: string;
356
- deleteConfirm: string;
357
- };
358
- sessionSidebar: {
359
- newChat: string;
360
- searchPlaceholder: string;
361
- collapse: string;
362
- expand: string;
363
- activeTab: string;
364
- archivedTab: string;
365
- today: string;
366
- earlier: string;
367
- archived: string;
368
- restore: string;
369
- archive: string;
370
- renamed: string;
371
- deleted: string;
372
- archivedDone: string;
373
- restored: string;
374
- operationFailed: string;
375
- listLoading: string;
376
- };
377
- aiChatPanel: {
378
- loadEarlier: string;
379
- createFailed: string;
380
- generateFailed: string;
381
- close: string;
382
- floatMode: string;
383
- drawerMode: string;
384
- maximize: string;
385
- restore: string;
386
- history: string;
387
- historyEmpty: string;
388
- back: string;
389
- launcher: string;
390
- };
391
- historyMapper: {
392
- 回复生成中断: string;
393
- 回复失败: string;
394
- 回复已中断: string;
395
- '\u56DE\u590D\u5DF2\u4E2D\u65AD\uFF0C\u4EE5\u4E0A\u4E3A\u5DF2\u751F\u6210\u90E8\u5206': string;
396
- '\u7528\u65F6 {s}': string;
397
- 已归档: string;
398
- 操作预案: string;
399
- };
400
- scroll: {
401
- toBottom: string;
402
- };
403
- aiChat: {
404
- modelPlaceholder: string;
405
- adapterMissing: string;
406
- generateFailed: string;
407
- exportUser: string;
408
- exportAssistant: string;
409
- };
410
- aiMessage: {
411
- copy: string;
412
- regenerate: string;
413
- prevBranch: string;
414
- nextBranch: string;
415
- defaultUserName: string;
416
- defaultAssistantName: string;
417
- querying: string;
418
- queried: string;
419
- generateFailed: string;
420
- followups: string;
421
- followupsTitle: string;
422
- loadingPhrases: string[];
423
- feedback: {
424
- like: string;
425
- dislike: string;
426
- dislikeTitle: string;
427
- dislikePlaceholder: string;
428
- submit: string;
429
- skip: string;
430
- failed: string;
431
- cleared: string;
432
- };
433
- };
434
- aiArtifacts: {
435
- copy: string;
436
- download: string;
437
- fullscreen: string;
438
- close: string;
439
- };
440
- actionCard: {
441
- pendingTitle: string;
442
- confirm: string;
443
- cancel: string;
444
- expiresIn: string;
445
- executing: string;
446
- successTitle: string;
447
- failedTitle: string;
448
- cancelledTitle: string;
449
- expiredTitle: string;
450
- invalidTitle: string;
451
- detailTitle: string;
452
- failedHint: string;
453
- };
454
- chat: {
455
- fileTag: string;
456
- fileImageTag: string;
457
- filesSystemPrompt: string;
458
- toolDuration: string;
459
- continuePrompt: string;
460
- };
461
- errors: {
462
- requestFailed: string;
463
- sessionIdMissing: string;
464
- noBody: string;
465
- generateFailed: string;
466
- recordUnsupported: string;
467
- speechError: string;
468
- attachmentRejected: string;
469
- };
470
- };
471
- readonly en: {
472
- common: {
473
- copy: string;
474
- delete: string;
475
- confirm: string;
476
- cancel: string;
477
- retry: string;
478
- close: string;
479
- preview: string;
480
- clear: string;
481
- stop: string;
482
- send: string;
483
- download: string;
484
- fullscreen: string;
485
- collapse: string;
486
- expand: string;
487
- copied: string;
488
- };
489
- thinking: {
490
- start: string;
491
- thinking: string;
492
- end: string;
493
- interrupted: string;
494
- error: string;
495
- endWithTools: string;
496
- interruptedWithTools: string;
497
- thinkingItem: string;
498
- thoughtDoneItem: string;
499
- };
500
- welcome: {
501
- greetingPrefix: string;
502
- greetingName: string;
503
- description: string;
504
- refreshSuggestions: string;
505
- };
506
- sender: {
507
- clear: string;
508
- stop: string;
509
- send: string;
510
- speech: string;
511
- recordCancel: string;
512
- recordConfirm: string;
513
- micUnavailable: string;
514
- inputPlaceholder: string;
515
- };
516
- editorSender: {
517
- clear: string;
518
- stop: string;
519
- send: string;
520
- inputPlaceholder: string;
521
- selectTagTitle: string;
522
- loading: string;
523
- tagTip: string;
524
- };
525
- attachments: {
526
- add: string;
527
- retry: string;
528
- uploading: string;
529
- };
530
- filesCard: {
531
- remove: string;
532
- download: string;
533
- };
534
- conversations: {
535
- menuLabel: string;
536
- rename: string;
537
- delete: string;
538
- renameTitle: string;
539
- renamePrompt: string;
540
- renamePlaceholder: string;
541
- deleteTitle: string;
542
- deleteConfirm: string;
543
- };
544
- sessionSidebar: {
545
- newChat: string;
546
- searchPlaceholder: string;
547
- collapse: string;
548
- expand: string;
549
- activeTab: string;
550
- archivedTab: string;
551
- today: string;
552
- earlier: string;
553
- archived: string;
554
- restore: string;
555
- archive: string;
556
- renamed: string;
557
- deleted: string;
558
- archivedDone: string;
559
- restored: string;
560
- operationFailed: string;
561
- listLoading: string;
562
- };
563
- aiChatPanel: {
564
- loadEarlier: string;
565
- createFailed: string;
566
- generateFailed: string;
567
- close: string;
568
- floatMode: string;
569
- drawerMode: string;
570
- maximize: string;
571
- restore: string;
572
- history: string;
573
- historyEmpty: string;
574
- back: string;
575
- launcher: string;
576
- };
577
- historyMapper: {
578
- 回复生成中断: string;
579
- 回复失败: string;
580
- 回复已中断: string;
581
- '\u56DE\u590D\u5DF2\u4E2D\u65AD\uFF0C\u4EE5\u4E0A\u4E3A\u5DF2\u751F\u6210\u90E8\u5206': string;
582
- '\u7528\u65F6 {s}': string;
583
- 已归档: string;
584
- 操作预案: string;
585
- };
586
- scroll: {
587
- toBottom: string;
588
- };
589
- aiChat: {
590
- modelPlaceholder: string;
591
- adapterMissing: string;
592
- generateFailed: string;
593
- exportUser: string;
594
- exportAssistant: string;
595
- };
596
- aiMessage: {
597
- copy: string;
598
- regenerate: string;
599
- prevBranch: string;
600
- nextBranch: string;
601
- defaultUserName: string;
602
- defaultAssistantName: string;
603
- querying: string;
604
- queried: string;
605
- generateFailed: string;
606
- followups: string;
607
- followupsTitle: string;
608
- loadingPhrases: string[];
609
- feedback: {
610
- like: string;
611
- dislike: string;
612
- dislikeTitle: string;
613
- dislikePlaceholder: string;
614
- submit: string;
615
- skip: string;
616
- failed: string;
617
- cleared: string;
618
- };
619
- };
620
- aiArtifacts: {
621
- copy: string;
622
- download: string;
623
- fullscreen: string;
624
- close: string;
625
- };
626
- actionCard: {
627
- pendingTitle: string;
628
- confirm: string;
629
- cancel: string;
630
- expiresIn: string;
631
- executing: string;
632
- successTitle: string;
633
- failedTitle: string;
634
- cancelledTitle: string;
635
- expiredTitle: string;
636
- invalidTitle: string;
637
- detailTitle: string;
638
- failedHint: string;
639
- };
640
- chat: {
641
- fileTag: string;
642
- fileImageTag: string;
643
- filesSystemPrompt: string;
644
- toolDuration: string;
645
- continuePrompt: string;
646
- };
647
- errors: {
648
- requestFailed: string;
649
- sessionIdMissing: string;
650
- noBody: string;
651
- generateFailed: string;
652
- recordUnsupported: string;
653
- speechError: string;
654
- attachmentRejected: string;
655
- };
656
- };
657
- readonly ko: {
658
- common: {
659
- copy: string;
660
- delete: string;
661
- confirm: string;
662
- cancel: string;
663
- retry: string;
664
- close: string;
665
- preview: string;
666
- clear: string;
667
- stop: string;
668
- send: string;
669
- download: string;
670
- fullscreen: string;
671
- collapse: string;
672
- expand: string;
673
- copied: string;
674
- };
675
- thinking: {
676
- start: string;
677
- thinking: string;
678
- end: string;
679
- interrupted: string;
680
- error: string;
681
- endWithTools: string;
682
- interruptedWithTools: string;
683
- thinkingItem: string;
684
- thoughtDoneItem: string;
685
- };
686
- welcome: {
687
- greetingPrefix: string;
688
- greetingName: string;
689
- description: string;
690
- refreshSuggestions: string;
691
- };
692
- sender: {
693
- clear: string;
694
- stop: string;
695
- send: string;
696
- speech: string;
697
- recordCancel: string;
698
- recordConfirm: string;
699
- micUnavailable: string;
700
- inputPlaceholder: string;
701
- };
702
- editorSender: {
703
- clear: string;
704
- stop: string;
705
- send: string;
706
- inputPlaceholder: string;
707
- selectTagTitle: string;
708
- loading: string;
709
- tagTip: string;
710
- };
711
- attachments: {
712
- add: string;
713
- retry: string;
714
- uploading: string;
715
- };
716
- filesCard: {
717
- remove: string;
718
- download: string;
719
- };
720
- conversations: {
721
- menuLabel: string;
722
- rename: string;
723
- delete: string;
724
- renameTitle: string;
725
- renamePrompt: string;
726
- renamePlaceholder: string;
727
- deleteTitle: string;
728
- deleteConfirm: string;
729
- };
730
- sessionSidebar: {
731
- newChat: string;
732
- searchPlaceholder: string;
733
- collapse: string;
734
- expand: string;
735
- activeTab: string;
736
- archivedTab: string;
737
- today: string;
738
- earlier: string;
739
- archived: string;
740
- restore: string;
741
- archive: string;
742
- renamed: string;
743
- deleted: string;
744
- archivedDone: string;
745
- restored: string;
746
- operationFailed: string;
747
- listLoading: string;
748
- };
749
- aiChatPanel: {
750
- loadEarlier: string;
751
- createFailed: string;
752
- generateFailed: string;
753
- close: string;
754
- floatMode: string;
755
- drawerMode: string;
756
- maximize: string;
757
- restore: string;
758
- history: string;
759
- historyEmpty: string;
760
- back: string;
761
- launcher: string;
762
- };
763
- historyMapper: {
764
- 回复生成中断: string;
765
- 回复失败: string;
766
- 回复已中断: string;
767
- '\u56DE\u590D\u5DF2\u4E2D\u65AD\uFF0C\u4EE5\u4E0A\u4E3A\u5DF2\u751F\u6210\u90E8\u5206': string;
768
- '\u7528\u65F6 {s}': string;
769
- 已归档: string;
770
- 操作预案: string;
771
- };
772
- scroll: {
773
- toBottom: string;
774
- };
775
- aiChat: {
776
- modelPlaceholder: string;
777
- adapterMissing: string;
778
- generateFailed: string;
779
- exportUser: string;
780
- exportAssistant: string;
781
- };
782
- aiMessage: {
783
- copy: string;
784
- regenerate: string;
785
- prevBranch: string;
786
- nextBranch: string;
787
- defaultUserName: string;
788
- defaultAssistantName: string;
789
- querying: string;
790
- queried: string;
791
- generateFailed: string;
792
- followups: string;
793
- followupsTitle: string;
794
- loadingPhrases: string[];
795
- feedback: {
796
- like: string;
797
- dislike: string;
798
- dislikeTitle: string;
799
- dislikePlaceholder: string;
800
- submit: string;
801
- skip: string;
802
- failed: string;
803
- cleared: string;
804
- };
805
- };
806
- aiArtifacts: {
807
- copy: string;
808
- download: string;
809
- fullscreen: string;
810
- close: string;
811
- };
812
- actionCard: {
813
- pendingTitle: string;
814
- confirm: string;
815
- cancel: string;
816
- expiresIn: string;
817
- executing: string;
818
- successTitle: string;
819
- failedTitle: string;
820
- cancelledTitle: string;
821
- expiredTitle: string;
822
- invalidTitle: string;
823
- detailTitle: string;
824
- failedHint: string;
825
- };
826
- chat: {
827
- fileTag: string;
828
- fileImageTag: string;
829
- filesSystemPrompt: string;
830
- toolDuration: string;
831
- continuePrompt: string;
832
- };
833
- errors: {
834
- requestFailed: string;
835
- sessionIdMissing: string;
836
- noBody: string;
837
- generateFailed: string;
838
- recordUnsupported: string;
839
- speechError: string;
840
- attachmentRejected: string;
841
- };
842
- };
843
- readonly vi: {
844
- common: {
845
- copy: string;
846
- delete: string;
847
- confirm: string;
848
- cancel: string;
849
- retry: string;
850
- close: string;
851
- preview: string;
852
- clear: string;
853
- stop: string;
854
- send: string;
855
- download: string;
856
- fullscreen: string;
857
- collapse: string;
858
- expand: string;
859
- copied: string;
860
- };
861
- thinking: {
862
- start: string;
863
- thinking: string;
864
- end: string;
865
- interrupted: string;
866
- error: string;
867
- endWithTools: string;
868
- interruptedWithTools: string;
869
- thinkingItem: string;
870
- thoughtDoneItem: string;
871
- };
872
- welcome: {
873
- greetingPrefix: string;
874
- greetingName: string;
875
- description: string;
876
- refreshSuggestions: string;
877
- };
878
- sender: {
879
- clear: string;
880
- stop: string;
881
- send: string;
882
- speech: string;
883
- recordCancel: string;
884
- recordConfirm: string;
885
- micUnavailable: string;
886
- inputPlaceholder: string;
887
- };
888
- editorSender: {
889
- clear: string;
890
- stop: string;
891
- send: string;
892
- inputPlaceholder: string;
893
- selectTagTitle: string;
894
- loading: string;
895
- tagTip: string;
896
- };
897
- attachments: {
898
- add: string;
899
- retry: string;
900
- uploading: string;
901
- };
902
- filesCard: {
903
- remove: string;
904
- download: string;
905
- };
906
- conversations: {
907
- menuLabel: string;
908
- rename: string;
909
- delete: string;
910
- renameTitle: string;
911
- renamePrompt: string;
912
- renamePlaceholder: string;
913
- deleteTitle: string;
914
- deleteConfirm: string;
915
- };
916
- sessionSidebar: {
917
- newChat: string;
918
- searchPlaceholder: string;
919
- collapse: string;
920
- expand: string;
921
- activeTab: string;
922
- archivedTab: string;
923
- today: string;
924
- earlier: string;
925
- archived: string;
926
- restore: string;
927
- archive: string;
928
- renamed: string;
929
- deleted: string;
930
- archivedDone: string;
931
- restored: string;
932
- operationFailed: string;
933
- listLoading: string;
934
- };
935
- aiChatPanel: {
936
- loadEarlier: string;
937
- createFailed: string;
938
- generateFailed: string;
939
- close: string;
940
- floatMode: string;
941
- drawerMode: string;
942
- maximize: string;
943
- restore: string;
944
- history: string;
945
- historyEmpty: string;
946
- back: string;
947
- launcher: string;
948
- };
949
- historyMapper: {
950
- 回复生成中断: string;
951
- 回复失败: string;
952
- 回复已中断: string;
953
- '\u56DE\u590D\u5DF2\u4E2D\u65AD\uFF0C\u4EE5\u4E0A\u4E3A\u5DF2\u751F\u6210\u90E8\u5206': string;
954
- '\u7528\u65F6 {s}': string;
955
- 已归档: string;
956
- 操作预案: string;
957
- };
958
- scroll: {
959
- toBottom: string;
960
- };
961
- aiChat: {
962
- modelPlaceholder: string;
963
- adapterMissing: string;
964
- generateFailed: string;
965
- exportUser: string;
966
- exportAssistant: string;
967
- };
968
- aiMessage: {
969
- copy: string;
970
- regenerate: string;
971
- prevBranch: string;
972
- nextBranch: string;
973
- defaultUserName: string;
974
- defaultAssistantName: string;
975
- querying: string;
976
- queried: string;
977
- generateFailed: string;
978
- followups: string;
979
- followupsTitle: string;
980
- loadingPhrases: string[];
981
- feedback: {
982
- like: string;
983
- dislike: string;
984
- dislikeTitle: string;
985
- dislikePlaceholder: string;
986
- submit: string;
987
- skip: string;
988
- failed: string;
989
- cleared: string;
990
- };
991
- };
992
- aiArtifacts: {
993
- copy: string;
994
- download: string;
995
- fullscreen: string;
996
- close: string;
997
- };
998
- actionCard: {
999
- pendingTitle: string;
1000
- confirm: string;
1001
- cancel: string;
1002
- expiresIn: string;
1003
- executing: string;
1004
- successTitle: string;
1005
- failedTitle: string;
1006
- cancelledTitle: string;
1007
- expiredTitle: string;
1008
- invalidTitle: string;
1009
- detailTitle: string;
1010
- failedHint: string;
1011
- };
1012
- chat: {
1013
- fileTag: string;
1014
- fileImageTag: string;
1015
- filesSystemPrompt: string;
1016
- toolDuration: string;
1017
- continuePrompt: string;
1018
- };
1019
- errors: {
1020
- requestFailed: string;
1021
- sessionIdMissing: string;
1022
- noBody: string;
1023
- generateFailed: string;
1024
- recordUnsupported: string;
1025
- speechError: string;
1026
- attachmentRejected: string;
1027
- };
1028
- };
1029
- readonly 'zh-HK': {
1030
- common: {
1031
- copy: string;
1032
- delete: string;
1033
- confirm: string;
1034
- cancel: string;
1035
- retry: string;
1036
- close: string;
1037
- preview: string;
1038
- clear: string;
1039
- stop: string;
1040
- send: string;
1041
- download: string;
1042
- fullscreen: string;
1043
- collapse: string;
1044
- expand: string;
1045
- copied: string;
1046
- };
1047
- thinking: {
1048
- start: string;
1049
- thinking: string;
1050
- end: string;
1051
- interrupted: string;
1052
- error: string;
1053
- endWithTools: string;
1054
- interruptedWithTools: string;
1055
- thinkingItem: string;
1056
- thoughtDoneItem: string;
1057
- };
1058
- welcome: {
1059
- greetingPrefix: string;
1060
- greetingName: string;
1061
- description: string;
1062
- refreshSuggestions: string;
1063
- };
1064
- sender: {
1065
- clear: string;
1066
- stop: string;
1067
- send: string;
1068
- speech: string;
1069
- recordCancel: string;
1070
- recordConfirm: string;
1071
- micUnavailable: string;
1072
- inputPlaceholder: string;
1073
- };
1074
- editorSender: {
1075
- clear: string;
1076
- stop: string;
1077
- send: string;
1078
- inputPlaceholder: string;
1079
- selectTagTitle: string;
1080
- loading: string;
1081
- tagTip: string;
1082
- };
1083
- attachments: {
1084
- add: string;
1085
- retry: string;
1086
- uploading: string;
1087
- };
1088
- filesCard: {
1089
- remove: string;
1090
- download: string;
1091
- };
1092
- conversations: {
1093
- menuLabel: string;
1094
- rename: string;
1095
- delete: string;
1096
- renameTitle: string;
1097
- renamePrompt: string;
1098
- renamePlaceholder: string;
1099
- deleteTitle: string;
1100
- deleteConfirm: string;
1101
- };
1102
- sessionSidebar: {
1103
- newChat: string;
1104
- searchPlaceholder: string;
1105
- collapse: string;
1106
- expand: string;
1107
- activeTab: string;
1108
- archivedTab: string;
1109
- today: string;
1110
- earlier: string;
1111
- archived: string;
1112
- restore: string;
1113
- archive: string;
1114
- renamed: string;
1115
- deleted: string;
1116
- archivedDone: string;
1117
- restored: string;
1118
- operationFailed: string;
1119
- listLoading: string;
1120
- };
1121
- aiChatPanel: {
1122
- loadEarlier: string;
1123
- createFailed: string;
1124
- generateFailed: string;
1125
- close: string;
1126
- floatMode: string;
1127
- drawerMode: string;
1128
- maximize: string;
1129
- restore: string;
1130
- history: string;
1131
- historyEmpty: string;
1132
- back: string;
1133
- launcher: string;
1134
- };
1135
- historyMapper: {
1136
- 回复生成中断: string;
1137
- 回复失败: string;
1138
- 回复已中断: string;
1139
- '\u56DE\u590D\u5DF2\u4E2D\u65AD\uFF0C\u4EE5\u4E0A\u4E3A\u5DF2\u751F\u6210\u90E8\u5206': string;
1140
- '\u7528\u65F6 {s}': string;
1141
- 已归档: string;
1142
- 操作预案: string;
1143
- };
1144
- scroll: {
1145
- toBottom: string;
1146
- };
1147
- aiChat: {
1148
- modelPlaceholder: string;
1149
- adapterMissing: string;
1150
- generateFailed: string;
1151
- exportUser: string;
1152
- exportAssistant: string;
1153
- };
1154
- aiMessage: {
1155
- copy: string;
1156
- regenerate: string;
1157
- prevBranch: string;
1158
- nextBranch: string;
1159
- defaultUserName: string;
1160
- defaultAssistantName: string;
1161
- querying: string;
1162
- queried: string;
1163
- generateFailed: string;
1164
- followups: string;
1165
- followupsTitle: string;
1166
- loadingPhrases: string[];
1167
- feedback: {
1168
- like: string;
1169
- dislike: string;
1170
- dislikeTitle: string;
1171
- dislikePlaceholder: string;
1172
- submit: string;
1173
- skip: string;
1174
- failed: string;
1175
- cleared: string;
1176
- };
1177
- };
1178
- aiArtifacts: {
1179
- copy: string;
1180
- download: string;
1181
- fullscreen: string;
1182
- close: string;
1183
- };
1184
- actionCard: {
1185
- pendingTitle: string;
1186
- confirm: string;
1187
- cancel: string;
1188
- expiresIn: string;
1189
- executing: string;
1190
- successTitle: string;
1191
- failedTitle: string;
1192
- cancelledTitle: string;
1193
- expiredTitle: string;
1194
- invalidTitle: string;
1195
- detailTitle: string;
1196
- failedHint: string;
1197
- };
1198
- chat: {
1199
- fileTag: string;
1200
- fileImageTag: string;
1201
- filesSystemPrompt: string;
1202
- toolDuration: string;
1203
- continuePrompt: string;
1204
- };
1205
- errors: {
1206
- requestFailed: string;
1207
- sessionIdMissing: string;
1208
- noBody: string;
1209
- generateFailed: string;
1210
- recordUnsupported: string;
1211
- speechError: string;
1212
- attachmentRejected: string;
1213
- };
1214
- };
1215
- };
1216
- /** 内置语言名(字符串形态 locale/configureLocale 的合法取值) */
1217
- type LocaleCode = keyof typeof PACKS;
1218
- /**
1219
- * 全局语言设置。
1220
- * 字符串选内置包(未知回落 zh-CN);对象视为**完整语言包**(消费方自建语言的主入口,
1221
- * 与组件 prop 的"部分覆盖"语义有意不同:全局是定基准,prop 是在基准上微调)。
1222
- */
1223
- declare function configureLocale(locale: LocaleCode | LocaleMessages): void;
1224
-
1225
- type __VLS_Props$o = {
27
+ type __VLS_Props$p = {
1226
28
  content: string;
1227
29
  mdPlugins?: CreateMarkdownOptions['mdPlugins'];
1228
30
  highlight?: (str: string, lang: string) => string;
@@ -1236,14 +38,14 @@ type __VLS_Props$o = {
1236
38
  /** 语言包:'zh-CN'/'en'/'ko'/'vi'/'zh-HK' 整包或部分文案对象(优先于祖先注入与全局设置) */
1237
39
  locale?: LocaleInput;
1238
40
  };
1239
- declare const __VLS_export$o: vue.DefineComponent<__VLS_Props$o, {
41
+ declare const __VLS_export$p: vue.DefineComponent<__VLS_Props$p, {
1240
42
  getHtml: () => string;
1241
- }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$o> & Readonly<{}>, {
43
+ }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$p> & Readonly<{}>, {
1242
44
  tableToolbar: boolean;
1243
45
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
1244
- declare const _default$o: typeof __VLS_export$o;
46
+ declare const _default$p: typeof __VLS_export$p;
1245
47
 
1246
- type __VLS_Props$n = {
48
+ type __VLS_Props$o = {
1247
49
  content: string;
1248
50
  isMarkdown?: boolean;
1249
51
  isFog?: boolean | {
@@ -1266,7 +68,7 @@ declare function interrupt$1(): void;
1266
68
  declare function continueTy$1(): void;
1267
69
  declare function restart$1(): void;
1268
70
  declare function destroy$1(): void;
1269
- declare const __VLS_export$n: vue.DefineComponent<__VLS_Props$n, {
71
+ declare const __VLS_export$o: vue.DefineComponent<__VLS_Props$o, {
1270
72
  interrupt: typeof interrupt$1;
1271
73
  continue: typeof continueTy$1;
1272
74
  restart: typeof restart$1;
@@ -1278,7 +80,7 @@ declare const __VLS_export$n: vue.DefineComponent<__VLS_Props$n, {
1278
80
  start: () => any;
1279
81
  finish: () => any;
1280
82
  writing: () => any;
1281
- }, string, vue.PublicProps, Readonly<__VLS_Props$n> & Readonly<{
83
+ }, string, vue.PublicProps, Readonly<__VLS_Props$o> & Readonly<{
1282
84
  onStart?: (() => any) | undefined;
1283
85
  onFinish?: (() => any) | undefined;
1284
86
  onWriting?: (() => any) | undefined;
@@ -1294,7 +96,7 @@ declare const __VLS_export$n: vue.DefineComponent<__VLS_Props$n, {
1294
96
  suffix?: string;
1295
97
  };
1296
98
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
1297
- declare const _default$n: typeof __VLS_export$n;
99
+ declare const _default$o: typeof __VLS_export$o;
1298
100
 
1299
101
  /** Typewriter 对外实例形态(defineExpose 经 proxyRefs 已自动解包,宽松兼容 Ref | 值) */
1300
102
  interface TypewriterExposed {
@@ -1311,7 +113,7 @@ type TypingConfig = {
1311
113
  interval?: number;
1312
114
  suffix?: string;
1313
115
  };
1314
- type __VLS_Props$m = {
116
+ type __VLS_Props$n = {
1315
117
  /** 气泡内容 */
1316
118
  content?: string;
1317
119
  /** 对齐:start 靠左 / end 靠右(end 时头像随 row-reverse 翻转到右侧) */
@@ -1366,7 +168,7 @@ type __VLS_Slots$j = {} & {
1366
168
  } & {
1367
169
  footer?: (props: typeof __VLS_32) => any;
1368
170
  };
1369
- declare const __VLS_base$j: vue.DefineComponent<__VLS_Props$m, {
171
+ declare const __VLS_base$j: vue.DefineComponent<__VLS_Props$n, {
1370
172
  interrupt: typeof interrupt;
1371
173
  continue: typeof continueTy;
1372
174
  restart: typeof restart;
@@ -1396,13 +198,12 @@ declare const __VLS_base$j: vue.DefineComponent<__VLS_Props$m, {
1396
198
  finish: () => any;
1397
199
  writing: () => any;
1398
200
  "avatar-error": (event: Event) => any;
1399
- }, string, vue.PublicProps, Readonly<__VLS_Props$m> & Readonly<{
201
+ }, string, vue.PublicProps, Readonly<__VLS_Props$n> & Readonly<{
1400
202
  onStart?: (() => any) | undefined;
1401
203
  onFinish?: (() => any) | undefined;
1402
204
  onWriting?: (() => any) | undefined;
1403
205
  "onAvatar-error"?: ((event: Event) => any) | undefined;
1404
206
  }>, {
1405
- loading: boolean;
1406
207
  content: string;
1407
208
  placement: "start" | "end";
1408
209
  isMarkdown: boolean;
@@ -1412,6 +213,7 @@ declare const __VLS_base$j: vue.DefineComponent<__VLS_Props$m, {
1412
213
  };
1413
214
  typing: boolean | TypingConfig;
1414
215
  shape: "round" | "corner";
216
+ loading: boolean;
1415
217
  variant: "filled" | "borderless" | "outlined" | "shadow";
1416
218
  avatar: string;
1417
219
  avatarSize: number | "" | "default" | "small" | "large";
@@ -1423,8 +225,8 @@ declare const __VLS_base$j: vue.DefineComponent<__VLS_Props$m, {
1423
225
  noPadding: boolean;
1424
226
  noStyle: boolean;
1425
227
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
1426
- declare const __VLS_export$m: __VLS_WithSlots$j<typeof __VLS_base$j, __VLS_Slots$j>;
1427
- declare const _default$m: typeof __VLS_export$m;
228
+ declare const __VLS_export$n: __VLS_WithSlots$j<typeof __VLS_base$j, __VLS_Slots$j>;
229
+ declare const _default$n: typeof __VLS_export$n;
1428
230
 
1429
231
  type __VLS_WithSlots$j<T, S> = T & {
1430
232
  new (): {
@@ -1437,7 +239,7 @@ interface BubbleListItemProps {
1437
239
  key: string | number;
1438
240
  [prop: string]: unknown;
1439
241
  }
1440
- type __VLS_Props$l = {
242
+ type __VLS_Props$m = {
1441
243
  /** 气泡列表 */
1442
244
  list: BubbleListItemProps[];
1443
245
  /** 滚动容器最大高度(如 '350px'/'60vh') */
@@ -1504,13 +306,13 @@ type __VLS_Slots$i = {} & {
1504
306
  } & {
1505
307
  footer?: (props: typeof __VLS_22) => any;
1506
308
  };
1507
- declare const __VLS_base$i: vue.DefineComponent<__VLS_Props$l, {
309
+ declare const __VLS_base$i: vue.DefineComponent<__VLS_Props$m, {
1508
310
  scrollToTop: typeof scrollToTop$1;
1509
311
  scrollToBottom: typeof scrollToBottom$1;
1510
312
  scrollToBubble: typeof scrollToBubble;
1511
313
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
1512
314
  complete: (instance: unknown, index: number) => any;
1513
- }, string, vue.PublicProps, Readonly<__VLS_Props$l> & Readonly<{
315
+ }, string, vue.PublicProps, Readonly<__VLS_Props$m> & Readonly<{
1514
316
  onComplete?: ((instance: unknown, index: number) => any) | undefined;
1515
317
  }>, {
1516
318
  locale: LocaleInput;
@@ -1528,8 +330,8 @@ declare const __VLS_base$i: vue.DefineComponent<__VLS_Props$l, {
1528
330
  btnIconSize: number;
1529
331
  triggerIndices: "only-last" | "all" | number[];
1530
332
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
1531
- declare const __VLS_export$l: __VLS_WithSlots$i<typeof __VLS_base$i, __VLS_Slots$i>;
1532
- declare const _default$l: typeof __VLS_export$l;
333
+ declare const __VLS_export$m: __VLS_WithSlots$i<typeof __VLS_base$i, __VLS_Slots$i>;
334
+ declare const _default$m: typeof __VLS_export$m;
1533
335
 
1534
336
  type __VLS_WithSlots$i<T, S> = T & {
1535
337
  new (): {
@@ -1537,7 +339,7 @@ type __VLS_WithSlots$i<T, S> = T & {
1537
339
  };
1538
340
  };
1539
341
 
1540
- type __VLS_Props$k = {
342
+ type __VLS_Props$l = {
1541
343
  /** 输入值(v-model) */
1542
344
  modelValue?: string;
1543
345
  placeholder?: string;
@@ -1582,6 +384,12 @@ type __VLS_Props$k = {
1582
384
  allowSpeech?: boolean;
1583
385
  /** 允许空内容提交(附件场景:只发文件不输文字时提交按钮保持可点) */
1584
386
  allowEmptySubmit?: boolean;
387
+ /**
388
+ * 允许拖拽文件到输入区:dragover 悬停染色提示,drop 上抛 @paste-file
389
+ * (与粘贴共用事件,去重/白名单/数量上限校验均由宿主/AiChat 层在统一
390
+ * 入列路径完成)。缺省 false 不启用
391
+ */
392
+ allowDrop?: boolean;
1585
393
  /** 语言包:'zh-CN'/'en'/'ko'/'vi'/'zh-HK' 整包或部分文案对象(优先于祖先注入与全局设置) */
1586
394
  locale?: LocaleInput;
1587
395
  };
@@ -1594,30 +402,30 @@ declare function blur$2(): void;
1594
402
  declare function openHeader$2(): void;
1595
403
  declare function closeHeader$2(): void;
1596
404
  declare var __VLS_1$7: {};
1597
- declare var __VLS_3$2: {};
405
+ declare var __VLS_3$1: {};
1598
406
  declare var __VLS_5: {};
1599
407
  declare var __VLS_52: {
1600
408
  keyword: string;
1601
409
  };
1602
- declare var __VLS_54$2: {};
410
+ declare var __VLS_54$3: {};
1603
411
  declare var __VLS_56: {};
1604
- declare var __VLS_134: {};
412
+ declare var __VLS_134$1: {};
1605
413
  type __VLS_Slots$h = {} & {
1606
414
  header?: (props: typeof __VLS_1$7) => any;
1607
415
  } & {
1608
- 'body-top'?: (props: typeof __VLS_3$2) => any;
416
+ 'body-top'?: (props: typeof __VLS_3$1) => any;
1609
417
  } & {
1610
418
  prefix?: (props: typeof __VLS_5) => any;
1611
419
  } & {
1612
420
  trigger?: (props: typeof __VLS_52) => any;
1613
421
  } & {
1614
- 'action-list'?: (props: typeof __VLS_54$2) => any;
422
+ 'action-list'?: (props: typeof __VLS_54$3) => any;
1615
423
  } & {
1616
424
  'action-left'?: (props: typeof __VLS_56) => any;
1617
425
  } & {
1618
- footer?: (props: typeof __VLS_134) => any;
426
+ footer?: (props: typeof __VLS_134$1) => any;
1619
427
  };
1620
- declare const __VLS_base$h: vue.DefineComponent<__VLS_Props$k, {
428
+ declare const __VLS_base$h: vue.DefineComponent<__VLS_Props$l, {
1621
429
  submit: typeof submit$1;
1622
430
  cancel: typeof cancel$1;
1623
431
  clear: typeof clear$2;
@@ -1626,28 +434,28 @@ declare const __VLS_base$h: vue.DefineComponent<__VLS_Props$k, {
1626
434
  openHeader: typeof openHeader$2;
1627
435
  closeHeader: typeof closeHeader$2;
1628
436
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
1629
- cancel: () => any;
1630
437
  submit: (value: string) => any;
1631
438
  trigger: (keyword: string, visible: boolean) => any;
1632
439
  "update:modelValue": (value: string) => any;
440
+ cancel: () => any;
1633
441
  change: (value: string) => any;
1634
442
  "recording-change": (recording: boolean) => any;
1635
443
  "paste-file": (file: File) => any;
1636
444
  "update:triggerPopoverVisible": (value: boolean) => any;
1637
- }, string, vue.PublicProps, Readonly<__VLS_Props$k> & Readonly<{
1638
- onCancel?: (() => any) | undefined;
445
+ }, string, vue.PublicProps, Readonly<__VLS_Props$l> & Readonly<{
1639
446
  onSubmit?: ((value: string) => any) | undefined;
1640
447
  onTrigger?: ((keyword: string, visible: boolean) => any) | undefined;
1641
448
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
449
+ onCancel?: (() => any) | undefined;
1642
450
  onChange?: ((value: string) => any) | undefined;
1643
451
  "onRecording-change"?: ((recording: boolean) => any) | undefined;
1644
452
  "onPaste-file"?: ((file: File) => any) | undefined;
1645
453
  "onUpdate:triggerPopoverVisible"?: ((value: boolean) => any) | undefined;
1646
454
  }>, {
1647
- loading: boolean;
1648
455
  disabled: boolean;
1649
456
  shadow: boolean;
1650
457
  round: boolean;
458
+ loading: boolean;
1651
459
  variant: "default" | "updown";
1652
460
  modelValue: string;
1653
461
  placeholder: string;
@@ -1669,9 +477,10 @@ declare const __VLS_base$h: vue.DefineComponent<__VLS_Props$k, {
1669
477
  triggerPopoverPlacement: InstanceType<typeof ElPopover>["placement"];
1670
478
  allowSpeech: boolean;
1671
479
  allowEmptySubmit: boolean;
480
+ allowDrop: boolean;
1672
481
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
1673
- declare const __VLS_export$k: __VLS_WithSlots$h<typeof __VLS_base$h, __VLS_Slots$h>;
1674
- declare const _default$k: typeof __VLS_export$k;
482
+ declare const __VLS_export$l: __VLS_WithSlots$h<typeof __VLS_base$h, __VLS_Slots$h>;
483
+ declare const _default$l: typeof __VLS_export$l;
1675
484
 
1676
485
  type __VLS_WithSlots$h<T, S> = T & {
1677
486
  new (): {
@@ -1696,7 +505,7 @@ interface MentionCustomTrigger {
1696
505
  pinyin?: string;
1697
506
  }>;
1698
507
  }
1699
- type __VLS_Props$j = {
508
+ type __VLS_Props$k = {
1700
509
  /** 输入值(v-model) */
1701
510
  modelValue?: string;
1702
511
  /** @ 触发的候选用户列表 */
@@ -1725,7 +534,7 @@ declare var __VLS_21$4: any;
1725
534
  type __VLS_Slots$g = {} & {
1726
535
  [K in NonNullable<typeof __VLS_20>]?: (props: typeof __VLS_21$4) => any;
1727
536
  };
1728
- declare const __VLS_base$g: vue.DefineComponent<__VLS_Props$j, {
537
+ declare const __VLS_base$g: vue.DefineComponent<__VLS_Props$k, {
1729
538
  submit: typeof submit;
1730
539
  cancel: typeof cancel;
1731
540
  clear: typeof clear$1;
@@ -1736,20 +545,20 @@ declare const __VLS_base$g: vue.DefineComponent<__VLS_Props$j, {
1736
545
  setUserTag: typeof setUserTag$1;
1737
546
  setCustomTag: typeof setCustomTag$1;
1738
547
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
1739
- cancel: () => any;
1740
548
  submit: (value: string) => any;
1741
549
  trigger: (keyword: string, visible: boolean) => any;
1742
550
  "update:modelValue": (value: string) => any;
551
+ cancel: () => any;
1743
552
  change: (value: string) => any;
1744
553
  "recording-change": (recording: boolean) => any;
1745
554
  "paste-file": (file: File) => any;
1746
555
  "update:triggerPopoverVisible": (value: boolean) => any;
1747
556
  "show-at-dialog": (visible: boolean) => any;
1748
- }, string, vue.PublicProps, Readonly<__VLS_Props$j> & Readonly<{
1749
- onCancel?: (() => any) | undefined;
557
+ }, string, vue.PublicProps, Readonly<__VLS_Props$k> & Readonly<{
1750
558
  onSubmit?: ((value: string) => any) | undefined;
1751
559
  onTrigger?: ((keyword: string, visible: boolean) => any) | undefined;
1752
560
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
561
+ onCancel?: (() => any) | undefined;
1753
562
  onChange?: ((value: string) => any) | undefined;
1754
563
  "onRecording-change"?: ((recording: boolean) => any) | undefined;
1755
564
  "onPaste-file"?: ((file: File) => any) | undefined;
@@ -1762,8 +571,8 @@ declare const __VLS_base$g: vue.DefineComponent<__VLS_Props$j, {
1762
571
  customTrigger: MentionCustomTrigger[];
1763
572
  asyncMatchFun: (search: string) => Promise<MentionUserInfo[]>;
1764
573
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
1765
- declare const __VLS_export$j: __VLS_WithSlots$g<typeof __VLS_base$g, __VLS_Slots$g>;
1766
- declare const _default$j: typeof __VLS_export$j;
574
+ declare const __VLS_export$k: __VLS_WithSlots$g<typeof __VLS_base$g, __VLS_Slots$g>;
575
+ declare const _default$k: typeof __VLS_export$k;
1767
576
 
1768
577
  type __VLS_WithSlots$g<T, S> = T & {
1769
578
  new (): {
@@ -1858,7 +667,7 @@ type MixTag = {
1858
667
  type: 'text';
1859
668
  value: string;
1860
669
  };
1861
- type __VLS_Props$i = {
670
+ type __VLS_Props$j = {
1862
671
  placeholder?: string;
1863
672
  /** 设备形态:仅影响样式(pc 默认 / h5 紧凑) */
1864
673
  device?: 'pc' | 'h5';
@@ -1945,7 +754,7 @@ declare function chatState(): {
1945
754
  declare function openHeader(): void;
1946
755
  declare function closeHeader(): void;
1947
756
  declare var __VLS_1$6: {};
1948
- declare var __VLS_3$1: {};
757
+ declare var __VLS_3: {};
1949
758
  declare var __VLS_19$2: {
1950
759
  nodeId: string;
1951
760
  };
@@ -1954,7 +763,7 @@ declare var __VLS_80: {};
1954
763
  type __VLS_Slots$f = {} & {
1955
764
  header?: (props: typeof __VLS_1$6) => any;
1956
765
  } & {
1957
- prefix?: (props: typeof __VLS_3$1) => any;
766
+ prefix?: (props: typeof __VLS_3) => any;
1958
767
  } & {
1959
768
  'tag-tip'?: (props: typeof __VLS_19$2) => any;
1960
769
  } & {
@@ -1962,7 +771,7 @@ type __VLS_Slots$f = {} & {
1962
771
  } & {
1963
772
  footer?: (props: typeof __VLS_80) => any;
1964
773
  };
1965
- declare const __VLS_base$f: vue.DefineComponent<__VLS_Props$i, {
774
+ declare const __VLS_base$f: vue.DefineComponent<__VLS_Props$j, {
1966
775
  getCurrentValue: typeof getCurrentValue;
1967
776
  focusToStart: typeof focusToStart;
1968
777
  focusToEnd: typeof placeCursorEnd;
@@ -1988,22 +797,22 @@ declare const __VLS_base$f: vue.DefineComponent<__VLS_Props$i, {
1988
797
  opNode: typeof opNode;
1989
798
  chatState: typeof chatState;
1990
799
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
1991
- cancel: () => any;
1992
800
  submit: (payload: SubmitResult) => any;
801
+ cancel: () => any;
1993
802
  change: (payload: SubmitResult) => any;
1994
803
  "show-at-dialog": (visible: boolean) => any;
1995
804
  "show-select-dialog": (visible: boolean) => any;
1996
805
  "show-tag-dialog": (visible: boolean) => any;
1997
- }, string, vue.PublicProps, Readonly<__VLS_Props$i> & Readonly<{
1998
- onCancel?: (() => any) | undefined;
806
+ }, string, vue.PublicProps, Readonly<__VLS_Props$j> & Readonly<{
1999
807
  onSubmit?: ((payload: SubmitResult) => any) | undefined;
808
+ onCancel?: (() => any) | undefined;
2000
809
  onChange?: ((payload: SubmitResult) => any) | undefined;
2001
810
  "onShow-at-dialog"?: ((visible: boolean) => any) | undefined;
2002
811
  "onShow-select-dialog"?: ((visible: boolean) => any) | undefined;
2003
812
  "onShow-tag-dialog"?: ((visible: boolean) => any) | undefined;
2004
813
  }>, {
2005
- loading: boolean;
2006
814
  disabled: boolean;
815
+ loading: boolean;
2007
816
  variant: "default" | "updown";
2008
817
  placeholder: string;
2009
818
  submitType: "enter" | "shiftEnter";
@@ -2019,8 +828,8 @@ declare const __VLS_base$f: vue.DefineComponent<__VLS_Props$i, {
2019
828
  headerAnimationTimer: number;
2020
829
  customDialog: boolean;
2021
830
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
2022
- declare const __VLS_export$i: __VLS_WithSlots$f<typeof __VLS_base$f, __VLS_Slots$f>;
2023
- declare const _default$i: typeof __VLS_export$i;
831
+ declare const __VLS_export$j: __VLS_WithSlots$f<typeof __VLS_base$f, __VLS_Slots$f>;
832
+ declare const _default$j: typeof __VLS_export$j;
2024
833
 
2025
834
  type __VLS_WithSlots$f<T, S> = T & {
2026
835
  new (): {
@@ -2029,7 +838,7 @@ type __VLS_WithSlots$f<T, S> = T & {
2029
838
  };
2030
839
 
2031
840
  type ThinkingStatus = 'start' | 'thinking' | 'end' | 'interrupted' | 'error';
2032
- type __VLS_Props$h = {
841
+ type __VLS_Props$i = {
2033
842
  /** 展开/收起(v-model) */
2034
843
  modelValue?: boolean;
2035
844
  /** 思考内容(#content 插槽常嵌 FvMarkdown/Typewriter 渲染思考流) */
@@ -2059,7 +868,7 @@ declare var __VLS_1$5: {};
2059
868
  declare var __VLS_47: {};
2060
869
  declare var __VLS_49: {};
2061
870
  declare var __VLS_62: {};
2062
- declare var __VLS_64: {};
871
+ declare var __VLS_64$1: {};
2063
872
  type __VLS_Slots$e = {} & {
2064
873
  'status-icon'?: (props: typeof __VLS_1$5) => any;
2065
874
  } & {
@@ -2069,14 +878,14 @@ type __VLS_Slots$e = {} & {
2069
878
  } & {
2070
879
  error?: (props: typeof __VLS_62) => any;
2071
880
  } & {
2072
- content?: (props: typeof __VLS_64) => any;
881
+ content?: (props: typeof __VLS_64$1) => any;
2073
882
  };
2074
- declare const __VLS_base$e: vue.DefineComponent<__VLS_Props$h, {
883
+ declare const __VLS_base$e: vue.DefineComponent<__VLS_Props$i, {
2075
884
  modelValue: vue.Ref<boolean, boolean>;
2076
885
  toggle: typeof toggle;
2077
886
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
2078
887
  "update:modelValue": (value: boolean) => any;
2079
- }, string, vue.PublicProps, Readonly<__VLS_Props$h> & Readonly<{
888
+ }, string, vue.PublicProps, Readonly<__VLS_Props$i> & Readonly<{
2080
889
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
2081
890
  }>, {
2082
891
  content: string;
@@ -2090,8 +899,8 @@ declare const __VLS_base$e: vue.DefineComponent<__VLS_Props$h, {
2090
899
  maxWidth: string;
2091
900
  backgroundColor: string;
2092
901
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
2093
- declare const __VLS_export$h: __VLS_WithSlots$e<typeof __VLS_base$e, __VLS_Slots$e>;
2094
- declare const _default$h: typeof __VLS_export$h;
902
+ declare const __VLS_export$i: __VLS_WithSlots$e<typeof __VLS_base$e, __VLS_Slots$e>;
903
+ declare const _default$i: typeof __VLS_export$i;
2095
904
 
2096
905
  type __VLS_WithSlots$e<T, S> = T & {
2097
906
  new (): {
@@ -2120,7 +929,7 @@ interface ThoughtChainItem {
2120
929
  * 该步后续不再增长;仍在打字时剩余文字直接冲刷出完(一次性回落静态) */
2121
930
  closed?: boolean;
2122
931
  }
2123
- type __VLS_Props$g = {
932
+ type __VLS_Props$h = {
2124
933
  /** 步骤列表 */
2125
934
  items: ThoughtChainItem[];
2126
935
  /** 排列方向:vertical 纵向(带连接线)/ horizontal 横向 */
@@ -2139,9 +948,9 @@ declare var __VLS_45$2: {
2139
948
  type __VLS_Slots$d = {} & {
2140
949
  content?: (props: typeof __VLS_45$2) => any;
2141
950
  };
2142
- declare const __VLS_base$d: vue.DefineComponent<__VLS_Props$g, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
951
+ declare const __VLS_base$d: vue.DefineComponent<__VLS_Props$h, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
2143
952
  typing: () => any;
2144
- }, string, vue.PublicProps, Readonly<__VLS_Props$g> & Readonly<{
953
+ }, string, vue.PublicProps, Readonly<__VLS_Props$h> & Readonly<{
2145
954
  onTyping?: (() => any) | undefined;
2146
955
  }>, {
2147
956
  items: ThoughtChainItem[];
@@ -2149,8 +958,8 @@ declare const __VLS_base$d: vue.DefineComponent<__VLS_Props$g, {}, {}, {}, {}, v
2149
958
  collapsible: boolean;
2150
959
  showDuration: boolean;
2151
960
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
2152
- declare const __VLS_export$g: __VLS_WithSlots$d<typeof __VLS_base$d, __VLS_Slots$d>;
2153
- declare const _default$g: typeof __VLS_export$g;
961
+ declare const __VLS_export$h: __VLS_WithSlots$d<typeof __VLS_base$d, __VLS_Slots$d>;
962
+ declare const _default$h: typeof __VLS_export$h;
2154
963
 
2155
964
  type __VLS_WithSlots$d<T, S> = T & {
2156
965
  new (): {
@@ -2158,7 +967,7 @@ type __VLS_WithSlots$d<T, S> = T & {
2158
967
  };
2159
968
  };
2160
969
 
2161
- type __VLS_Props$f = {
970
+ type __VLS_Props$g = {
2162
971
  /** 图标:字符串为图片地址;也可传组件;缺省渲染内置品牌动图 */
2163
972
  icon?: string | Component;
2164
973
  /** 名称(未传回落内置问候语「你好,我是 Gizmo」) */
@@ -2183,14 +992,14 @@ type __VLS_Slots$c = {} & {
2183
992
  } & {
2184
993
  suggestions?: (props: typeof __VLS_23) => any;
2185
994
  };
2186
- declare const __VLS_base$c: vue.DefineComponent<__VLS_Props$f, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$f> & Readonly<{}>, {
2187
- description: string;
995
+ declare const __VLS_base$c: vue.DefineComponent<__VLS_Props$g, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$g> & Readonly<{}>, {
2188
996
  name: string;
2189
997
  icon: string | Component;
998
+ description: string;
2190
999
  layout: "vertical" | "horizontal";
2191
1000
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
2192
- declare const __VLS_export$f: __VLS_WithSlots$c<typeof __VLS_base$c, __VLS_Slots$c>;
2193
- declare const _default$f: typeof __VLS_export$f;
1001
+ declare const __VLS_export$g: __VLS_WithSlots$c<typeof __VLS_base$c, __VLS_Slots$c>;
1002
+ declare const _default$g: typeof __VLS_export$g;
2194
1003
 
2195
1004
  type __VLS_WithSlots$c<T, S> = T & {
2196
1005
  new (): {
@@ -2205,7 +1014,7 @@ interface PromptItem {
2205
1014
  icon?: string | Component;
2206
1015
  disabled?: boolean;
2207
1016
  }
2208
- type __VLS_Props$e = {
1017
+ type __VLS_Props$f = {
2209
1018
  /** 建议 prompt 列表 */
2210
1019
  prompts?: PromptItem[];
2211
1020
  /** 网格标题 */
@@ -2223,17 +1032,17 @@ type __VLS_Slots$b = {} & {
2223
1032
  } & {
2224
1033
  footer?: (props: typeof __VLS_14) => any;
2225
1034
  };
2226
- declare const __VLS_base$b: vue.DefineComponent<__VLS_Props$e, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
1035
+ declare const __VLS_base$b: vue.DefineComponent<__VLS_Props$f, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
2227
1036
  select: (item: PromptItem) => any;
2228
- }, string, vue.PublicProps, Readonly<__VLS_Props$e> & Readonly<{
1037
+ }, string, vue.PublicProps, Readonly<__VLS_Props$f> & Readonly<{
2229
1038
  onSelect?: ((item: PromptItem) => any) | undefined;
2230
1039
  }>, {
2231
1040
  title: string;
2232
1041
  prompts: PromptItem[];
2233
1042
  wrap: boolean;
2234
1043
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
2235
- declare const __VLS_export$e: __VLS_WithSlots$b<typeof __VLS_base$b, __VLS_Slots$b>;
2236
- declare const _default$e: typeof __VLS_export$e;
1044
+ declare const __VLS_export$f: __VLS_WithSlots$b<typeof __VLS_base$b, __VLS_Slots$b>;
1045
+ declare const _default$f: typeof __VLS_export$f;
2237
1046
 
2238
1047
  type __VLS_WithSlots$b<T, S> = T & {
2239
1048
  new (): {
@@ -2241,7 +1050,7 @@ type __VLS_WithSlots$b<T, S> = T & {
2241
1050
  };
2242
1051
  };
2243
1052
 
2244
- type __VLS_Props$d = {
1053
+ type __VLS_Props$e = {
2245
1054
  /** 文件名 */
2246
1055
  name: string;
2247
1056
  /** 文件形态:image 渲染缩略图,file 渲染文档图标卡 */
@@ -2267,7 +1076,7 @@ declare var __VLS_1$2: {};
2267
1076
  type __VLS_Slots$a = {} & {
2268
1077
  image?: (props: typeof __VLS_1$2) => any;
2269
1078
  };
2270
- declare const __VLS_base$a: vue.DefineComponent<__VLS_Props$d, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$d> & Readonly<{}>, {
1079
+ declare const __VLS_base$a: vue.DefineComponent<__VLS_Props$e, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$e> & Readonly<{}>, {
2271
1080
  url: string;
2272
1081
  name: string;
2273
1082
  locale: LocaleInput;
@@ -2279,8 +1088,8 @@ declare const __VLS_base$a: vue.DefineComponent<__VLS_Props$d, {}, {}, {}, {}, v
2279
1088
  onDelete: () => void;
2280
1089
  onDownload: () => void;
2281
1090
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
2282
- declare const __VLS_export$d: __VLS_WithSlots$a<typeof __VLS_base$a, __VLS_Slots$a>;
2283
- declare const _default$d: typeof __VLS_export$d;
1091
+ declare const __VLS_export$e: __VLS_WithSlots$a<typeof __VLS_base$a, __VLS_Slots$a>;
1092
+ declare const _default$e: typeof __VLS_export$e;
2284
1093
 
2285
1094
  type __VLS_WithSlots$a<T, S> = T & {
2286
1095
  new (): {
@@ -2305,7 +1114,7 @@ interface AttachmentItem {
2305
1114
  * 可重传。缺省不调(纯本地待发列表,向后兼容)
2306
1115
  */
2307
1116
  type AttachmentUpload = (file: File, item: AttachmentItem) => Promise<Partial<AttachmentItem> | undefined | void> | Partial<AttachmentItem> | undefined | void;
2308
- type __VLS_Props$c = {
1117
+ type __VLS_Props$d = {
2309
1118
  /** 附件列表(v-model) */
2310
1119
  modelValue?: object[];
2311
1120
  /** input[type=file] accept 属性,如 'image/*' */
@@ -2341,7 +1150,7 @@ type __VLS_Slots$9 = {} & {
2341
1150
  } & {
2342
1151
  'list-thumb'?: (props: typeof __VLS_21$1) => any;
2343
1152
  };
2344
- declare const __VLS_base$9: vue.DefineComponent<__VLS_Props$c, {
1153
+ declare const __VLS_base$9: vue.DefineComponent<__VLS_Props$d, {
2345
1154
  openSelect: typeof openSelect;
2346
1155
  retry: typeof retry;
2347
1156
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
@@ -2350,7 +1159,7 @@ declare const __VLS_base$9: vue.DefineComponent<__VLS_Props$c, {
2350
1159
  change: (list: object[]) => any;
2351
1160
  exceed: (file: File) => any;
2352
1161
  uploaded: (item: AttachmentItem, result?: Partial<AttachmentItem> | undefined) => any;
2353
- }, string, vue.PublicProps, Readonly<__VLS_Props$c> & Readonly<{
1162
+ }, string, vue.PublicProps, Readonly<__VLS_Props$d> & Readonly<{
2354
1163
  onDelete?: ((item: object) => any) | undefined;
2355
1164
  "onUpdate:modelValue"?: ((list: object[]) => any) | undefined;
2356
1165
  onChange?: ((list: object[]) => any) | undefined;
@@ -2367,8 +1176,8 @@ declare const __VLS_base$9: vue.DefineComponent<__VLS_Props$c, {
2367
1176
  beforeUpload: (file: File) => boolean | Promise<boolean>;
2368
1177
  upload: AttachmentUpload;
2369
1178
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
2370
- declare const __VLS_export$c: __VLS_WithSlots$9<typeof __VLS_base$9, __VLS_Slots$9>;
2371
- declare const _default$c: typeof __VLS_export$c;
1179
+ declare const __VLS_export$d: __VLS_WithSlots$9<typeof __VLS_base$9, __VLS_Slots$9>;
1180
+ declare const _default$d: typeof __VLS_export$d;
2372
1181
 
2373
1182
  type __VLS_WithSlots$9<T, S> = T & {
2374
1183
  new (): {
@@ -2381,16 +1190,19 @@ interface ConversationItem {
2381
1190
  key: string | number;
2382
1191
  label: string;
2383
1192
  group?: string;
1193
+ /** 稳定分组 id(组间排序/去重用;group 仍是显示名,可为 locale 文案) */
1194
+ groupKey?: string;
2384
1195
  disabled?: boolean;
2385
1196
  }
2386
1197
  /** 分组结构:groupable 比较器作用于该对象 */
2387
1198
  interface ConversationGroup {
2388
1199
  group?: string;
1200
+ groupKey?: string;
2389
1201
  items: ConversationItem[];
2390
1202
  }
2391
1203
  /** 内置菜单指令 */
2392
1204
  type MenuCommand = 'rename' | 'delete';
2393
- type __VLS_Props$b = {
1205
+ type __VLS_Props$c = {
2394
1206
  /** 会话列表(按 group 字段分组,保持插入顺序) */
2395
1207
  items: ConversationItem[];
2396
1208
  /** 当前激活会话 key(v-model:active) */
@@ -2399,10 +1211,21 @@ type __VLS_Props$b = {
2399
1211
  showBuiltInMenuType?: 'hover' | 'always';
2400
1212
  /** 分组排序比较器(定制分组顺序;缺省保持插入顺序) */
2401
1213
  groupable?: (a: ConversationGroup, b: ConversationGroup) => number;
1214
+ /** 多选批量模式(行首复选框;点击行主体 = 切换勾选,不切换当前会话) */
1215
+ selectable?: boolean;
2402
1216
  /** 下一页加载中(分页场景;loading 时滚动到底不再触发 load-more) */
2403
1217
  loading?: boolean;
2404
1218
  /** 是否还有更早分页(缺省 false 表示一次性全量,不触发 load-more) */
2405
1219
  hasMore?: boolean;
1220
+ /** 行高(总渲染高度 = 行数 × 行高;虚拟滚动据此裁剪视口外行) */
1221
+ rowHeight?: number;
1222
+ /** 虚拟滚动视口内缓冲行数(视口上下各多渲染的行;缺省 8) */
1223
+ virtualThreshold?: number;
1224
+ /** 是否启用虚拟滚动(超长列表裁剪视口外行,保持 DOM 精简)。
1225
+ * 缺省 false(opt-in):消费方把滚动交给外层容器(如 el-scrollbar)时
1226
+ * 根节点不滚动,scroll 事件永不触发,列表会被永久截断——须显式开启并
1227
+ * 保证组件根自身可滚动(或 height 受限) */
1228
+ virtualDisabled?: boolean;
2406
1229
  /** 语言配置:内置语言名(如 'en')或部分文案对象(深合并覆盖) */
2407
1230
  locale?: LocaleInput;
2408
1231
  };
@@ -2414,28 +1237,52 @@ declare function handleMenuCommand(cmd: {
2414
1237
  declare function renamePrompt(key: string | number): Promise<void>;
2415
1238
  /** deleteConfirm(key):弹确认框,确认后 emit menu-command {command:'delete'} */
2416
1239
  declare function deleteConfirm(key: string | number): Promise<void>;
1240
+ type __VLS_ModelProps = {
1241
+ 'selectedKeys'?: (string | number)[];
1242
+ };
1243
+ type __VLS_PublicProps = __VLS_Props$c & __VLS_ModelProps;
2417
1244
  declare var __VLS_1$1: {
1245
+ group: string | undefined;
1246
+ groupKey: string | undefined;
1247
+ };
1248
+ declare var __VLS_11: {
1249
+ item: ConversationItem;
1250
+ active: boolean;
1251
+ };
1252
+ declare var __VLS_40: {
1253
+ item: ConversationItem;
1254
+ };
1255
+ declare var __VLS_54$2: {
2418
1256
  group: string;
1257
+ groupKey: string | undefined;
2419
1258
  };
2420
- declare var __VLS_3: {
1259
+ declare var __VLS_64: {
2421
1260
  item: ConversationItem;
2422
1261
  active: boolean;
2423
1262
  };
2424
- declare var __VLS_31: {
1263
+ declare var __VLS_93$2: {
2425
1264
  item: ConversationItem;
2426
1265
  };
2427
1266
  type __VLS_Slots$8 = {} & {
2428
1267
  'group-title'?: (props: typeof __VLS_1$1) => any;
2429
1268
  } & {
2430
- item?: (props: typeof __VLS_3) => any;
1269
+ item?: (props: typeof __VLS_11) => any;
2431
1270
  } & {
2432
- menu?: (props: typeof __VLS_31) => any;
1271
+ menu?: (props: typeof __VLS_40) => any;
1272
+ } & {
1273
+ 'group-title'?: (props: typeof __VLS_54$2) => any;
1274
+ } & {
1275
+ item?: (props: typeof __VLS_64) => any;
1276
+ } & {
1277
+ menu?: (props: typeof __VLS_93$2) => any;
2433
1278
  };
2434
- declare const __VLS_base$8: vue.DefineComponent<__VLS_Props$b, {
1279
+ declare const __VLS_base$8: vue.DefineComponent<__VLS_PublicProps, {
2435
1280
  handleMenuCommand: typeof handleMenuCommand;
2436
1281
  renamePrompt: typeof renamePrompt;
2437
1282
  deleteConfirm: typeof deleteConfirm;
2438
- }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
1283
+ }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
1284
+ "update:selectedKeys": (value: (string | number)[]) => any;
1285
+ } & {
2439
1286
  change: (item: ConversationItem) => any;
2440
1287
  "update:active": (key: string | number) => any;
2441
1288
  "menu-command": (cmd: {
@@ -2444,7 +1291,8 @@ declare const __VLS_base$8: vue.DefineComponent<__VLS_Props$b, {
2444
1291
  value?: string;
2445
1292
  }) => any;
2446
1293
  "load-more": () => any;
2447
- }, string, vue.PublicProps, Readonly<__VLS_Props$b> & Readonly<{
1294
+ "update:selectedKeys": (keys: (string | number)[]) => any;
1295
+ }, string, vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
2448
1296
  onChange?: ((item: ConversationItem) => any) | undefined;
2449
1297
  "onUpdate:active"?: ((key: string | number) => any) | undefined;
2450
1298
  "onMenu-command"?: ((cmd: {
@@ -2453,17 +1301,22 @@ declare const __VLS_base$8: vue.DefineComponent<__VLS_Props$b, {
2453
1301
  value?: string;
2454
1302
  }) => any) | undefined;
2455
1303
  "onLoad-more"?: (() => any) | undefined;
1304
+ "onUpdate:selectedKeys"?: ((value: (string | number)[]) => any) | undefined;
2456
1305
  }>, {
2457
- loading: boolean;
2458
1306
  locale: LocaleInput;
1307
+ loading: boolean;
2459
1308
  items: ConversationItem[];
2460
1309
  active: string | number;
2461
1310
  showBuiltInMenuType: "hover" | "always";
2462
1311
  groupable: (a: ConversationGroup, b: ConversationGroup) => number;
1312
+ selectable: boolean;
2463
1313
  hasMore: boolean;
1314
+ rowHeight: number;
1315
+ virtualThreshold: number;
1316
+ virtualDisabled: boolean;
2464
1317
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
2465
- declare const __VLS_export$b: __VLS_WithSlots$8<typeof __VLS_base$8, __VLS_Slots$8>;
2466
- declare const _default$b: typeof __VLS_export$b;
1318
+ declare const __VLS_export$c: __VLS_WithSlots$8<typeof __VLS_base$8, __VLS_Slots$8>;
1319
+ declare const _default$c: typeof __VLS_export$c;
2467
1320
 
2468
1321
  type __VLS_WithSlots$8<T, S> = T & {
2469
1322
  new (): {
@@ -2471,6 +1324,39 @@ type __VLS_WithSlots$8<T, S> = T & {
2471
1324
  };
2472
1325
  };
2473
1326
 
1327
+ type __VLS_Props$b = {
1328
+ mode: 'name' | 'move';
1329
+ visible: boolean;
1330
+ /** move 模式候选文件夹(未分组恒在列,不在此数组) */
1331
+ folders?: FvAiFolder[];
1332
+ /** 弹窗标题(缺省按 mode 取 locale:createFolderTitle / moveToFolder) */
1333
+ title?: string;
1334
+ /** name 模式回显值(重命名时传当前名) */
1335
+ initialName?: string;
1336
+ locale?: LocaleInput;
1337
+ };
1338
+ declare const __VLS_export$b: vue.DefineComponent<__VLS_Props$b, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
1339
+ "update:visible": (v: boolean) => any;
1340
+ confirm: (payload: {
1341
+ name: string;
1342
+ } | {
1343
+ folderId: string | null;
1344
+ }) => any;
1345
+ }, string, vue.PublicProps, Readonly<__VLS_Props$b> & Readonly<{
1346
+ "onUpdate:visible"?: ((v: boolean) => any) | undefined;
1347
+ onConfirm?: ((payload: {
1348
+ name: string;
1349
+ } | {
1350
+ folderId: string | null;
1351
+ }) => any) | undefined;
1352
+ }>, {
1353
+ locale: LocaleInput;
1354
+ title: string;
1355
+ folders: FvAiFolder[];
1356
+ initialName: string;
1357
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
1358
+ declare const _default$b: typeof __VLS_export$b;
1359
+
2474
1360
  /** 色板槽位项:色值字符串(透明度走全局 props)或对象(可按色覆盖透明度/渐变/缩放) */
2475
1361
  interface FvBlobHaloColor {
2476
1362
  /** 色值(CSS 任意色:变量/16 进制/rgba;缺省保留默认色,纯调 scale/透明度时可省) */
@@ -2508,636 +1394,15 @@ type __VLS_Props$a = {
2508
1394
  };
2509
1395
  declare const __VLS_export$a: vue.DefineComponent<__VLS_Props$a, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$a> & Readonly<{}>, {
2510
1396
  size: number;
2511
- paused: boolean;
2512
1397
  colors: (string | FvBlobHaloColor | null | undefined)[];
2513
1398
  scale: number;
2514
1399
  opacity: number;
2515
1400
  altOpacity: number;
2516
1401
  rotateDuration: number;
1402
+ paused: boolean;
2517
1403
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
2518
1404
  declare const _default$a: typeof __VLS_export$a;
2519
1405
 
2520
- /**
2521
- * adapter 层透传的附件描述(结构兼容 types.ChatFile:消费方 ChatFile[] 可直传)。
2522
- * 先传后发架构下 id 即消费方上传端点返回的附件标识,由 adapter 拼进 send 入参
2523
- */
2524
- interface AdapterChatFile {
2525
- /** 附件标识(先传后发场景为服务端附件 id) */
2526
- id: string;
2527
- name?: string;
2528
- url?: string;
2529
- type?: 'image' | 'file';
2530
- size?: number;
2531
- }
2532
- /** adapter 层透传的 OpenAI 风格消息 */
2533
- interface AdapterChatMessage {
2534
- role: 'user' | 'assistant' | 'system' | string;
2535
- content: string;
2536
- /** 本条消息携带的附件(user 行;缺省无附件) */
2537
- files?: AdapterChatFile[];
2538
- }
2539
- /** 发送请求体 */
2540
- interface ChatAdapterRequest {
2541
- /** 对话消息(时间正序) */
2542
- messages: Array<AdapterChatMessage>;
2543
- /** 覆盖配置中的模型 */
2544
- model?: string;
2545
- /** 是否流式,默认 true */
2546
- stream?: boolean;
2547
- /** 外部中止信号(与 adapter 内部 abort 合并生效) */
2548
- signal?: AbortSignal;
2549
- }
2550
- /** 服务端原始 usage(snake_case,按 OpenAI 规范原样回调) */
2551
- interface RawUsage {
2552
- prompt_tokens?: number;
2553
- completion_tokens?: number;
2554
- total_tokens?: number;
2555
- }
2556
- /** 流式/响应过程回调集合 */
2557
- interface ChatAdapterHandlers {
2558
- /** 正文增量 */
2559
- onDelta(text: string): void;
2560
- /** 思考链增量(reasoning_content) */
2561
- onReasoning(text: string): void;
2562
- /** token 用量(部分服务端在最后一帧携带) */
2563
- onUsage(u: RawUsage): void;
2564
- /**
2565
- * 后端消息行 id 锚定(可选):流式 message_end 时携带的最终文本行 id,
2566
- * 与 message_start 的首轮 GENERATING 行 id 可能不同(多轮工具循环),UI 落库/对账以它为准
2567
- */
2568
- onBackendMessageId?(id: string): void;
2569
- /** 工具调用轨迹事件(可选):Fv 系通用 tool{status:start|done} */
2570
- onTool?(ev: {
2571
- toolName: string;
2572
- status: 'start' | 'done';
2573
- }): void;
2574
- /**
2575
- * 追问建议(可选):Fv 系 V58+ suggestions 事件(流式收尾 0..1 次,必在 message_end
2576
- * 之前);开关关闭/模型未产出/中断/失败无此事件。开关开启时回答末尾生成可点击
2577
- * 追问 chips,点击即作为新用户消息发送
2578
- */
2579
- onSuggestions?(items: string[]): void;
2580
- /**
2581
- * 写操作确认卡(可选,Fv 系 V59+「预案-确认-执行」):SSE action_card 事件
2582
- * (message_end 前,一 turn 0..N 次,与正文渲染互不阻塞)。载荷四键全为字符串/
2583
- * 数字,前端原样渲染 planSummary,不加工;卡片确认/取消走独立 HTTP 端点(带外),
2584
- * 由消费方注入 actionCardOption 执行,执行结果经 action-result 事件回灌或刷新
2585
- * 历史恢复。开关关闭(ai-chat.action.enabled=false)时无此事件,消费方无须探测
2586
- */
2587
- onActionCard?(payload: {
2588
- confirmToken: string;
2589
- action: string;
2590
- planSummary: string;
2591
- expiresAt: number;
2592
- }): void;
2593
- /**
2594
- * 正常结束(含非流式)。中止后是否回调本接口协议不保证——useChat 侧以中断轮
2595
- * 登记表防御(adapter.abort 后迟到的 onDone 不会清掉中断哨兵),自定义 adapter
2596
- * 无需在 abort 后刻意静默,但也不得在 onDone 后继续回调其它 handlers
2597
- */
2598
- onDone(): void;
2599
- /** 出错(HTTP 非 2xx / 网络 / 中断) */
2600
- onError(e: Error): void;
2601
- }
2602
- /**
2603
- * 聊天后端适配器:一次 send 对应一次完整生成(流式到 onDone 或出错进 onError)。
2604
- * Task 17 useChat 消费该接口,可替换为自研后端/Ollama 等实现。
2605
- */
2606
- interface ChatAdapter {
2607
- send(req: ChatAdapterRequest, handlers: ChatAdapterHandlers): Promise<void>;
2608
- /** 中止全部进行中的请求(并发 send 各自独立可中止;已完成的请求不受影响) */
2609
- abort(): void;
2610
- }
2611
- /** OpenAI 兼容服务配置 */
2612
- interface OpenAIAdapterConfig {
2613
- /** 服务根地址,如 https://api.openai.com/v1,内部拼接 /chat/completions */
2614
- baseURL: string;
2615
- /** Bearer Token 密钥 */
2616
- apiKey?: string;
2617
- /** 默认模型,可被 req.model 覆盖 */
2618
- model?: string;
2619
- }
2620
- /**
2621
- * OpenAI 兼容 ChatAdapter(/v1/chat/completions)。
2622
- * 流式走 Task 2 的 createSSEParser 解析 SSE,兼容 deepseek 风格 reasoning_content。
2623
- */
2624
- declare function OpenAIAdapter(config: OpenAIAdapterConfig): ChatAdapter;
2625
-
2626
- /**
2627
- * Fv 系后端通用聊天适配器(`/api/ai-chat/*`):八事件 SSE 协议
2628
- * (message_start / tool / delta / reasoning / suggestions / action_card /
2629
- * message_end / error),POST `/message/send`。
2630
- * 适用于 Fv 各项目组返回此结构的后端;V57 起新增 reasoning 思考事件
2631
- * (载荷 {text} 与 delta 同构,多轮每轮都推,无思考轮不推);
2632
- * V58 起新增 suggestions 追问建议事件(流式收尾时 0..1 次,必在 message_end 之前);
2633
- * V59 起新增 action_card 写操作确认卡事件(message_end 前 0..N 次,载荷四键,
2634
- * 脏帧经 sanitizeActionCard 容错丢弃)。
2635
- * 本适配器负责协议解析与事件分发,
2636
- * 会话管理(列表/归档/删除等)由消费方直接调后端,不经此适配器。
2637
- */
2638
- /** send 请求体(sessionId 由工厂按当前会话惰性注入) */
2639
- interface FvCommonSendBody {
2640
- sessionId: string;
2641
- content: string;
2642
- }
2643
- /** 工具事件载荷(SSE `tool` 事件 data) */
2644
- interface FvCommonToolEvent {
2645
- toolName: string;
2646
- status: 'start' | 'done';
2647
- }
2648
- /** 写操作确认卡事件载荷(SSE `action_card` 事件 data,Fv 系 V59+) */
2649
- interface FvActionCardEvent {
2650
- /** 一次性确认令牌(64 位 hex,按字符串处理) */
2651
- confirmToken: string;
2652
- /** 动作名(如 plan_void_cloth_tickets) */
2653
- action: string;
2654
- /** 预案摘要(服务端预检实查口径,原样渲染,不加工) */
2655
- planSummary: string;
2656
- /** 过期时间(epoch millis) */
2657
- expiresAt: number;
2658
- }
2659
- /** 会话列表项(`/session/list` records 行;total 等 IPage 字段为字符串需 parseInt) */
2660
- interface FvCommonSessionItem {
2661
- id: string;
2662
- title: string;
2663
- titleSource?: 'AUTO' | 'MANUAL';
2664
- status?: 'ACTIVE' | 'ARCHIVED';
2665
- archivedTime?: string | null;
2666
- messageCount?: number;
2667
- lastMessageExcerpt?: string | null;
2668
- lastMessageTime?: string | null;
2669
- createdTime?: string;
2670
- updatedTime?: string;
2671
- }
2672
- /** 历史/详情消息行(assistant 行 toolCalls/suggestions 为 JSON 字符串,消费方自行 JSON.parse;
2673
- * V59+ 新增 role='action' 结果行——写操作执行终态,content 为 JSON 字符串五键
2674
- * {confirmToken, action, planSummary, result, detail},与 plan 工具行按 confirmToken 配对) */
2675
- interface FvCommonMessage {
2676
- id: string;
2677
- seq: number;
2678
- role: 'user' | 'assistant' | 'tool' | 'action';
2679
- content: string | null;
2680
- /**
2681
- * V1.1+ 消息附件(仅 user 行非 null;旧数据/无附件恒 null,判空容错)。
2682
- * 元素与上传端点出参同构(AiChatAttachmentDTO:id/originalName/type/suffix/
2683
- * sizeBytes/downloadUrl),但**不含 createdTime**(快照 JSON 无该键,勿依赖)。
2684
- * 消费方映射为 MessageNode.files 渲染 chips(downloadUrl 需鉴权取流时配
2685
- * AiChat 的 resolveFileUrl 钩子)
2686
- */
2687
- attachments?: Array<{
2688
- id: string;
2689
- originalName: string;
2690
- type: 'IMAGE' | 'DOCUMENT' | string;
2691
- suffix?: string;
2692
- sizeBytes?: number;
2693
- downloadUrl?: string;
2694
- [k: string]: unknown;
2695
- }> | null;
2696
- /**
2697
- * V57 思考留底(仅 assistant 最终行;null=GENERATING 未回写/user/tool 行恒 null,
2698
- * 空串=该轮无思考)——判空须用 !!r && r.length > 0,勿用 != null
2699
- */
2700
- reasoningContent?: string | null;
2701
- toolCalls?: string | null;
2702
- toolCallId?: string | null;
2703
- toolName?: string | null;
2704
- /**
2705
- * V58+ 追问建议(仅 assistant 行且 status=SUCCESS 的最终回答非 null;user/tool 行、
2706
- * GENERATING/INTERRUPTED/FAILED 行、开关关闭期间旧行恒 null)。JSON 数组原文透传
2707
- * (如 '["问题1","问题2","问题3"]'),与 toolCalls 同款约定:消费方 JSON.parse 并
2708
- * try-catch 包裹,解析失败按 null 处理不渲染(见 parseSuggestions)
2709
- */
2710
- suggestions?: string | null;
2711
- /**
2712
- * V58+ 消息评价(仅 assistant 最终回答行;未评价/旧数据恒 null,判空容错)。
2713
- * LIKE 点赞 / DISLIKE 点踩;配套 feedbackComment(附言 ≤500 字)、feedbackTime
2714
- * (评价落库时间)同款容错。消费方映射为 MessageNode.feedback 灌入展示,
2715
- * 评价提交走独立端点(POST /message/feedback),不经本适配器
2716
- */
2717
- feedback?: 'LIKE' | 'DISLIKE' | null;
2718
- feedbackComment?: string | null;
2719
- feedbackTime?: string | null;
2720
- status?: 'GENERATING' | 'SUCCESS' | 'FAILED' | 'INTERRUPTED' | null;
2721
- failReason?: string | null;
2722
- promptTokens?: number | null;
2723
- completionTokens?: number | null;
2724
- /** Long 全局转字符串 */
2725
- elapsedMs?: string | null;
2726
- createdTime?: string;
2727
- }
2728
- /** 会话详情出参(`/session/detail`) */
2729
- interface FvCommonSessionDetail {
2730
- session: FvCommonSessionItem;
2731
- messages: FvCommonMessage[];
2732
- }
2733
- /** 消息 history 分页出参(`/message/history`) */
2734
- interface FvCommonMessagePage {
2735
- messages: FvCommonMessage[];
2736
- hasMore: boolean;
2737
- }
2738
- interface FvCommonAdapterConfig {
2739
- /** 服务根地址,如 https://host 或 /api(内部拼接 /ai-chat/message/send) */
2740
- baseURL: string;
2741
- /** 请求头(如 { Authorization: 'Bearer ' + token }),每次 send 惰性取用 */
2742
- headers?: Record<string, string> | (() => Record<string, string>);
2743
- /** 当前会话 id(工厂惰性取用:切换会话后下一次 send 即生效) */
2744
- sessionId: string | (() => string);
2745
- /** 业务错误码 → 提示文案映射(如 { 90602: '已有进行中的对话' });命中时 onError 的 message 用映射文案 */
2746
- errorMessages?: Record<number, string>;
2747
- }
2748
- /** 带业务码的错误:同步段 JSON 错误(90601/90602/90603/90105)与 SSE error 事件统一走此形态 */
2749
- declare class FvCommonError extends Error {
2750
- code?: number | string;
2751
- constructor(message: string, code?: number | string);
2752
- }
2753
- /**
2754
- * 安全解析历史消息行的追问建议(FvCommonMessage.suggestions,JSON 数组原文透传)。
2755
- * 与 toolCalls 同款约定:try-catch 包裹,脏数据(非 JSON/非字符串数组/全空)按无建议
2756
- * 处理返回 undefined。仅 assistant 行且 status=SUCCESS 的最终回答字段非 null,
2757
- * 但本函数不校验角色/状态(调用方已按行筛选),只做形状容错。
2758
- */
2759
- declare function parseSuggestions(raw: string | null | undefined): string[] | undefined;
2760
- /**
2761
- * Fv 系通用聊天适配器:消费六事件 SSE。
2762
- * 同步段失败(会话不存在/单飞行闸/未启用/参数校验)发生在 SSE 建立前,
2763
- * 响应是普通 JSON 错误——此处按 Content-Type 分流,命中 errorMessages 时用映射文案。
2764
- * 消息三角色里的 tool 行(toolCallId 配对)是会话管理端的落库形态,
2765
- * 流式期间只有 tool{status} 事件(无 tool 行),由 onTool 上抛给消费方展示工具状态。
2766
- */
2767
- declare function FvCommonAdapter(config: FvCommonAdapterConfig): ChatAdapter;
2768
-
2769
- /**
2770
- * 会话/消息持久化适配器。
2771
- * Task 17 useChat 用它保存会话列表与 messageTree 序列化结果,
2772
- * 接口为 async 以便未来替换为 IndexedDB/后端存储而不改调用方。
2773
- */
2774
- interface StorageAdapter {
2775
- get<T>(key: string): Promise<T | undefined>;
2776
- set<T>(key: string, val: T): Promise<void>;
2777
- remove(key: string): Promise<void>;
2778
- }
2779
- /**
2780
- * localStorage 存储适配器。
2781
- * mock/SSR 环境探测失败时自动降级为内存实现(数据不持久化,但不崩)。
2782
- */
2783
- declare function createLocalStorageAdapter(): StorageAdapter;
2784
- /** 纯内存存储适配器(测试/降级用,页面刷新即失) */
2785
- declare function createMemoryAdapter(): StorageAdapter;
2786
-
2787
- interface SSEEvent {
2788
- event?: string;
2789
- data: string;
2790
- }
2791
- interface SSEParser {
2792
- push(chunk: string): void;
2793
- end(): void;
2794
- }
2795
- declare function createSSEParser(onEvent: (ev: SSEEvent) => void, options?: {
2796
- streamSeparator?: string;
2797
- partSeparator?: string;
2798
- kvSeparator?: string;
2799
- }): SSEParser;
2800
-
2801
- /**
2802
- * @fv-ui/ai-chat 公共类型汇聚出口。
2803
- * 标量/树形消息等基础类型在本文件直接定义(单一事实来源,消除 messageTree ↔ types 循环引用);
2804
- * core 其余模块(adapter/storage/sse)的类型在此汇聚再导出,
2805
- * 消费方 `import type { MessageNode, ChatAdapter, ... } from '@fv-ui/ai-chat'`。
2806
- */
2807
- /**
2808
- * 消息评价(Fv 系 V58+ 消息反馈):assistant 最终回答行的点赞/点踩留底。
2809
- * action 为 null 表示未评价(缺省等同未评价);comment 随每次评价整体覆盖
2810
- * (CLEAR 时一并清空)。历史恢复由消费方从 FvCommonMessage.feedback/
2811
- * feedbackComment 灌入;流式新生成的回答初始未评价
2812
- */
2813
- interface MessageFeedback {
2814
- /** 当前评价态;null=未评价 */
2815
- action: 'LIKE' | 'DISLIKE' | null;
2816
- /** 评价附言(点踩原因等,≤500 字;随评价整体覆盖,无则 undefined) */
2817
- comment?: string;
2818
- }
2819
- /** 消息角色 */
2820
- type MessageRole = 'user' | 'assistant' | 'action';
2821
- /** 消息生命周期状态 */
2822
- type MessageStatus = 'pending' | 'streaming' | 'done' | 'error';
2823
- /**
2824
- * 写操作确认卡状态(Fv 系 V59+「预案-确认-执行」):
2825
- * - pending: 待确认(可交互:确认执行/取消 + 过期倒计时)
2826
- * - loading: 确认执行在途(服务端内调,最长 ~35s)
2827
- * - success: 执行成功终态
2828
- * - failed: 执行失败终态(令牌已消费,无重试入口,引导重新发起对话)
2829
- * - expired: 已过期未执行终态(expiresAt 归零或服务端 30019)
2830
- * - cancelled: 用户取消终态(cancel 端点成功返回)
2831
- * - invalid: 令牌已失效终态(30017:已消费/他人令牌;30021:功能未开启)
2832
- */
2833
- type ActionCardStatus = 'pending' | 'loading' | 'success' | 'failed' | 'expired' | 'cancelled' | 'invalid';
2834
- /**
2835
- * 确认卡载荷(SSE action_card 事件 data / 历史回放 plan 工具行 content 同构)。
2836
- * 四键全为字符串/数字:卡片数字来自服务端预检实查,前端原样渲染 planSummary,
2837
- * 不解析、不加工、不请求补充数据
2838
- */
2839
- interface ActionCardPayload {
2840
- /** 一次性确认令牌(64 位 hex;消费/过期即失效,按字符串处理) */
2841
- confirmToken: string;
2842
- /** 动作名(如 plan_void_cloth_tickets) */
2843
- action: string;
2844
- /** 预案摘要(服务端预检实查口径,原样渲染) */
2845
- planSummary: string;
2846
- /** 过期时间(epoch millis;客户端时钟可能漂移,归零仅作 UI 预判,权威是服务端 30019) */
2847
- expiresAt: number;
2848
- }
2849
- /** 确认卡执行结果(confirm/cancel 端点返回 data 同构;流式执行经 action-result 事件透传) */
2850
- interface ActionCardResult {
2851
- /** 动作名(回显) */
2852
- action: string;
2853
- /** 预案摘要(回显) */
2854
- planSummary: string;
2855
- /** true=执行成功;false=执行失败(confirm)或用户取消(cancel) */
2856
- success: boolean;
2857
- /** 成功为概要文案;失败为业务失败原因原文(本地化文案,直接展示) */
2858
- message: string;
2859
- /** 内调返回明细(可 null,≤2000 字;可折叠展示,默认收起) */
2860
- detail?: string | null;
2861
- /** 落库的 role=action 消息行 id(字符串),与历史回放的行对应 */
2862
- messageId?: string;
2863
- }
2864
- /**
2865
- * 工具调用轨迹项(Fv 系通用):assistant 行 toolCalls 展开后的单个工具调用。
2866
- * 兼容 OpenAI function calling 形状(type/function.name/function.arguments)。
2867
- */
2868
- interface ToolCallItem {
2869
- id: string;
2870
- type?: string;
2871
- function?: {
2872
- name?: string;
2873
- arguments?: string;
2874
- };
2875
- [k: string]: unknown;
2876
- }
2877
- /** token 用量(camelCase;adapter 层 snake_case 的 RawUsage 到此的映射责任在包装层) */
2878
- interface MessageUsage {
2879
- promptTokens?: number;
2880
- completionTokens?: number;
2881
- totalTokens?: number;
2882
- }
2883
- /** 消息附件文件描述(序列化安全:只含可 JSON 化字段,不含 File 原始对象) */
2884
- interface ChatFile {
2885
- /** 附件唯一标识(先传后发架构下为服务端附件 id) */
2886
- id: string;
2887
- /** 文件名 */
2888
- name: string;
2889
- /** 体积(字节) */
2890
- size?: number;
2891
- /**
2892
- * 预览/下载地址(data URL、本地 objectURL 或远程地址)。
2893
- * 远程地址需鉴权取流时经 AiChat 的 resolveFileUrl 换可渲染地址,
2894
- * 此时本字段存原始远程地址(供解析函数取用)
2895
- */
2896
- url?: string;
2897
- /** 附件类别,缺省按 'file' 处理 */
2898
- type?: 'image' | 'file';
2899
- }
2900
- /**
2901
- * 工具调用轨迹步骤(Fv 系通用):流式 tool 事件与历史 tool 行展开后的单步。
2902
- * status 与 ThoughtChain 链项一致(loading 转圈/success 勾/error 叉)。
2903
- */
2904
- interface ToolStepItem {
2905
- /** 步骤唯一标识(流式 `${toolName}-${序号}`;历史回放由消费方生成) */
2906
- key: string;
2907
- /** 展示名(流式经 toolStepLabel 转换后的工具名;text 步为思考/过渡文案原文) */
2908
- title?: string;
2909
- /** 步骤状态;缺省视为 loading */
2910
- status?: 'pending' | 'loading' | 'success' | 'error';
2911
- /** 补充描述(历史回放的用时/返回量等次要信息) */
2912
- description?: string;
2913
- /**
2914
- * 步骤种类(缺省 'tool'):tool 工具调用步 / text 思考链中的思考·过渡文案步。
2915
- * text 步呈现原始文案(不加「已查询」前缀、无 loading 态),节点图标固定对话气泡,
2916
- * 供流式 reasoning 增量与历史回放把思考文本按发生顺序织入思考链
2917
- */
2918
- kind?: 'tool' | 'text';
2919
- /**
2920
- * 思考段步是否已完结(text 步专用,流式内部状态):tool 事件/正文 delta 到达时
2921
- * 置位,之后到达的 reasoning 增量新开一段——即「每轮思考一段」的轮间分隔标记。
2922
- * 历史回放灌入的步天然完结(留底是聚合文本),不依赖此字段
2923
- */
2924
- closed?: boolean;
2925
- /** 工具步计时起点(ms;流式 start 记录,done 算差回写 description,之后无消费方) */
2926
- startedAt?: number;
2927
- }
2928
- /** 树形消息节点(同构 open-webui 会话消息:parentId/childrenIds 构成分支树) */
2929
- interface MessageNode {
2930
- id: string;
2931
- role: MessageRole;
2932
- content: string;
2933
- /** 思考链全文(流式期间由包装层追加) */
2934
- reasoning?: string;
2935
- /** 工具调用轨迹(Fv 系流式 tool 事件累积/历史 tool 行展开;AiMessage 以 ThoughtChain 渲染) */
2936
- toolSteps?: ToolStepItem[];
2937
- /** 附件列表 */
2938
- files?: ChatFile[];
2939
- /** 多模型对话中的模型序号(open-webui 语义) */
2940
- modelIdx?: number;
2941
- /** 生成模型名 */
2942
- model?: string;
2943
- /** 后端消息行 id(Fv 系带会话管理后端):流式 message_end 时回填,UI 落库/对账锚定用 */
2944
- backendId?: string;
2945
- /**
2946
- * 追问建议(Fv 系 V58+:回答末尾生成的可点击追问 chips,点击即作为新用户消息发送)。
2947
- * 流式经 adapter onSuggestions 回写;历史恢复由消费方从 FvCommonMessage.suggestions
2948
- * (JSON 数组原文)解析灌入。空/缺省不渲染;展示端仅链尾消息渲染 chips
2949
- */
2950
- suggestions?: string[];
2951
- /**
2952
- * 消息评价(Fv 系 V58+):点赞/点踩当前态与附言。历史恢复由消费方从
2953
- * FvCommonMessage.feedback/feedbackComment 灌入;点击按钮经 feedbackHandler
2954
- * 钩子上报,乐观更新失败回滚。仅 assistant 最终回答行有意义
2955
- */
2956
- feedback?: MessageFeedback;
2957
- /**
2958
- * 写操作确认卡(Fv 系 V59+「预案-确认-执行」):role='action' 节点的卡片载荷
2959
- * 与当前状态。流式经 SSE action_card 事件就地建卡(SSE 直推,不经 onTool);
2960
- * 历史回放由消费方按 confirmToken 配对 plan 工具行 ↔ action 结果行恢复终态;
2961
- * anchorId 指向所属 assistant 消息行 id(卡片渲染在其下,缺省回落消息流末尾)
2962
- */
2963
- action?: {
2964
- card: ActionCardPayload;
2965
- status: ActionCardStatus;
2966
- result?: ActionCardResult;
2967
- anchorId?: string;
2968
- };
2969
- /** 中间轮工具调用列表(JSON 字符串或已展开数组;Fv 系 assistant 行 toolCalls 非空即中间轮) */
2970
- toolCalls?: string | ToolCallItem[];
2971
- /** 父节点 id,根消息为 null */
2972
- parentId: string | null;
2973
- /** 子节点 id 列表(多个子节点即多个分支回答) */
2974
- childrenIds: string[];
2975
- status?: MessageStatus;
2976
- /** status 为 'error' 时的错误描述 */
2977
- error?: string;
2978
- /** 创建时间戳(ms) */
2979
- createdAt: number;
2980
- /**
2981
- * 后端消息行创建时间(Fv 系带会话管理后端,消费方从 FvCommonMessage.createdTime
2982
- * 原样直灌):不同项目可能返回秒级时间戳(1791427713)、毫秒级时间戳或
2983
- * ISO 字符串("2026-10-07T20:08:44",亦可能被消费方 JSON 序列化包一层引号成
2984
- * "\"2026-...\"")。消息时间的展示优先取本字段(自动识别格式),缺省回落 createdAt
2985
- */
2986
- createdTime?: string | number;
2987
- usage?: MessageUsage;
2988
- }
2989
- /** addMessage 入参:id/childrenIds 由树生成;parentId 缺省挂到当前焦点 */
2990
- type MessageNodeInput = Omit<MessageNode, 'id' | 'parentId' | 'childrenIds' | 'createdAt'> & {
2991
- /** 挂载父节点;undefined 挂到当前焦点,null 强制为根消息 */
2992
- parentId?: string | null;
2993
- /** 创建时间戳;缺省 Date.now() */
2994
- createdAt?: number;
2995
- };
2996
- /** 分支导航方向 */
2997
- type BranchDirection = 'prev' | 'next';
2998
- /** 树形消息数据结构(纯函数对象,非响应式;useMessages 包装 reactive 驱动视图) */
2999
- interface MessageTree {
3000
- messages: Record<string, MessageNode>;
3001
- currentId: string | null;
3002
- addMessage(node: MessageNodeInput): string;
3003
- deleteMessage(id: string): void;
3004
- editMessage(id: string, patch: Partial<MessageNode>): void;
3005
- appendContent(id: string, text: string): void;
3006
- navigateBranch(id: string, dir: BranchDirection): string | null;
3007
- setCurrent(id: string): void;
3008
- getCurrentChain(): MessageNode[];
3009
- getSiblings(id: string): MessageNode[];
3010
- toJSON(): string;
3011
- fromJSON(s: string): void;
3012
- }
3013
-
3014
- /** useMessages 返回体 */
3015
- interface UseMessagesReturn {
3016
- /** 全量节点表(深层响应式;新增/删除键与节点字段变更均可被追踪) */
3017
- messages: Ref<Record<string, MessageNode>>;
3018
- /** 当前焦点节点 id(根到焦点构成当前链) */
3019
- currentId: Ref<string | null>;
3020
- /** 当前链(根 → 焦点,时间正序) */
3021
- chain: ComputedRef<MessageNode[]>;
3022
- /** 新增节点,parentId 缺省挂到当前焦点;返回带真实 id 的节点 */
3023
- add(node: MessageNodeInput): MessageNode;
3024
- /** 删除节点(子节点升级接替其在父 children 中的位置) */
3025
- remove(id: string): void;
3026
- /** 浅合并补丁(id/parentId/childrenIds 不可改) */
3027
- edit(id: string, patch: Partial<MessageNode>): void;
3028
- /** 追加正文 */
3029
- appendContent(id: string, text: string): void;
3030
- /** 分支导航,返回目标 id(越界返回 null);id 缺省取当前焦点 */
3031
- navigate(id?: string, dir?: BranchDirection): string | null;
3032
- /** 同步设置焦点节点(ref 写法经 watch 异步生效,此方法立即同步树内部状态) */
3033
- setCurrent(id: string): void;
3034
- /** 绑定/切换持久化适配器(不立即写盘;此后树变更自动去抖落盘) */
3035
- setStorage(adapter?: StorageAdapter): void;
3036
- /** 从存储恢复会话(覆盖当前树;无存储/无数据时保持原状) */
3037
- load(): Promise<void>;
3038
- /** 立即落盘(树变更后已自动调度,此为手动兜底,主要用于测试) */
3039
- flush(): Promise<void>;
3040
- /** 序列化整树({messages, currentId} JSON) */
3041
- toJSON(): string;
3042
- }
3043
- /**
3044
- * 聊天应用层状态中枢:把 Task 16 的纯数据 MessageTree 包装成响应式。
3045
- *
3046
- * 响应式策略:
3047
- * - messages 用深层 ref 容器,其 .value(reactive 代理)注入树 —— 树内增删/字段写全部经由代理,可被追踪
3048
- * - currentId 用 ref,与树内部 getter/setter 双向同步(watch 回写树,包装方法后拉取树)
3049
- * - chain 为 computed,依赖上两者;节点对象本身是代理,消费方读 content 等字段同样响应
3050
- *
3051
- * @param initial 初始节点表/焦点(恢复会话时传入)
3052
- */
3053
- declare function useMessages(initial?: {
3054
- messages?: Record<string, MessageNode>;
3055
- currentId?: string | null;
3056
- }): UseMessagesReturn;
3057
-
3058
- /** 写操作确认卡执行器(消费方注入;与 ActionCard 组件 executor 同构) */
3059
- type ActionCardExecuteFn = (card: ActionCardPayload, kind: 'confirm' | 'cancel') => Promise<ActionCardResult | void>;
3060
- /** 写操作确认卡选项(V59+「预案-确认-执行」) */
3061
- interface ActionCardOption {
3062
- /**
3063
- * 确认/取消执行器(带外独立 HTTP 端点,非 SSE;confirm 服务端内调最坏 ~30s,
3064
- * 读超时须 ≥35s 由消费方请求层保证)。缺省待确认卡按钮禁用(纯只读)。
3065
- * 终态落定通知走 AiChat 的 action-card-settled 事件(单一通道)
3066
- */
3067
- execute?: ActionCardExecuteFn;
3068
- }
3069
- /** useChat 配置 */
3070
- interface UseChatOptions {
3071
- /** 聊天适配器实例或工厂(工厂每次 send 惰性求值,便于按会话切模型) */
3072
- adapter: ChatAdapter | (() => ChatAdapter);
3073
- /** 选中模型列表(多模型生成多个 assistant;缺省单模型)。支持工厂函数,每次 send 惰性取用(顶栏切换模型即时生效) */
3074
- models?: string[] | (() => string[]);
3075
- /** 初始消息表/焦点(恢复会话时传入;透传 useMessages) */
3076
- initial?: {
3077
- messages?: Record<string, MessageNode>;
3078
- currentId?: string | null;
3079
- };
3080
- /**
3081
- * 初始确认卡表(历史回放恢复):独立于消息树灌入 actionCards(anchorId 指向
3082
- * 所属 assistant 节点 id 锚定渲染,缺省/未命中回落消息流末尾)。
3083
- * 仅 setup 时一次性生效(半受控,与 messages 同语义)
3084
- */
3085
- initialActionCards?: MessageNode[];
3086
- /** 工具调用轨迹事件透传(Fv 系通用 tool{status}):展示「正在查询库存…」等中间态 */
3087
- onToolEvent?: (ev: {
3088
- toolName: string;
3089
- status: 'start' | 'done';
3090
- }) => void;
3091
- /** 工具名 → 步骤展示名(流式 toolSteps 的 title;缺省原样使用 toolName) */
3092
- toolStepLabel?: (toolName: string) => string;
3093
- /** 写操作确认卡(V59+「预案-确认-执行」):SSE action_card 事件就地建卡,
3094
- * 确认/取消经 execute 走带外端点;**未传 execute 即整特性关闭**——SSE 卡片帧
3095
- * 容错丢弃不建卡(无执行器的待确认卡按钮禁用是纯负担),历史回放卡经
3096
- * AiChat actionCards prop 由宿主自行控制 */
3097
- actionCard?: ActionCardOption;
3098
- /** 语言包工厂(惰性取用,与 toolStepLabel 同语义;附件 system prompt/工具用时/续写 prompt
3099
- * 在产生时取值——语言切换只影响之后的请求,已落库数据不回溯);缺省读全局 */
3100
- locale?: () => LocaleMessages;
3101
- }
3102
- /** 待发送队列项 */
3103
- interface QueueItem {
3104
- text: string;
3105
- files?: ChatFile[];
3106
- }
3107
- /** useChat 返回体 */
3108
- interface UseChatReturn {
3109
- /** 发送用户消息并生成回复;生成中再调用被拒(需要排队的走 enqueue) */
3110
- send(text: string, files?: ChatFile[]): Promise<void>;
3111
- /** 中止当前生成:adapter.abort + 在途消息置 done(保留已生成内容) */
3112
- stop(): void;
3113
- /** 重新生成:焦点回退到末 assistant 的父节点重发生成新分支(旧回答保留在树上);可指定消息 id */
3114
- regenerate(messageId?: string): Promise<void>;
3115
- /** 继续生成:以目标 assistant 既有内容为前缀再次请求,增量追加到同一节点 */
3116
- continueGenerate(messageId?: string): Promise<void>;
3117
- /** 待发送队列(生成中入队,完成后自动 flush 队首) */
3118
- queue: Ref<Array<QueueItem>>;
3119
- /** 生成中入队;空闲时直接发送 */
3120
- enqueue(text: string, files?: ChatFile[]): void;
3121
- /** 是否有生成在途 */
3122
- isLoading: Ref<boolean>;
3123
- /** 在途确认卡(SSE action_card 事件就地建卡,0..N 张):AiMessages 渲染——anchorId 命中的挂在所属 assistant 下,缺省/未命中回落消息流末尾 */
3124
- actionCards: Ref<MessageNode[]>;
3125
- /** 清空在途确认卡(整框重置/会话切换;锚定节点被删或分支切换的残留由渲染层按锚有效性隐藏) */
3126
- clearActionCards(): void;
3127
- /** 底层消息树读写面(appendToMessage/clearMessages 等整框层操作经此) */
3128
- msgs: UseMessagesReturn;
3129
- /** 全量节点表(ref;分支信息/遍历等场景直查,AiChat 整框 v-model 同步用) */
3130
- messages: UseMessagesReturn['messages'];
3131
- currentId: UseMessagesReturn['currentId'];
3132
- chain: UseMessagesReturn['chain'];
3133
- }
3134
- /**
3135
- * 聊天应用层编排:在 useMessages 树状态之上驱动"发送 → 流式回填 → 队列/重生成/续写"生命周期。
3136
- * 消息形态同构 open-webui:user 消息挂树后追加 pending assistant 节点,adapter 回调增量回填,结束置 done。
3137
- * 多模型(models 数组/modelIdx 字段)接口形状已对齐,各模型 assistant 挂 user 下互为兄弟分支并发回填。
3138
- */
3139
- declare function useChat(options: UseChatOptions): UseChatReturn;
3140
-
3141
1406
  /** 写操作确认卡节点执行器(回调收 (card, kind);AiMessages/AiChat 透传) */
3142
1407
  type MessageActionCardExecutor = (card: ActionCardPayload, kind: 'confirm' | 'cancel') => Promise<ActionCardResult | void>;
3143
1408
  /**
@@ -3241,6 +1506,9 @@ type __VLS_Props$9 = {
3241
1506
  * 执行结果写回节点终态并上抛 action-card-settled)。缺省待确认卡按钮禁用
3242
1507
  */
3243
1508
  actionCardExecutor?: MessageActionCardExecutor;
1509
+ /** 定位标记:当前要高亮的消息 id(内容搜索定位场景);命中本消息时根节点加
1510
+ * is-located class(主题色描边 + 淡底色 + 自动褪去动画) */
1511
+ locateMessageId?: string;
3244
1512
  /** 语言包:'zh-CN'/'en'/'ko'/'vi'/'zh-HK' 整包或部分文案对象(优先于祖先注入与全局设置) */
3245
1513
  locale?: LocaleInput;
3246
1514
  };
@@ -3329,9 +1597,9 @@ declare const __VLS_base$7: vue.DefineComponent<__VLS_Props$9, {
3329
1597
  expandThoughtChain: typeof expandThoughtChain;
3330
1598
  collapseThoughtChain: typeof collapseThoughtChain;
3331
1599
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
1600
+ typing: () => any;
3332
1601
  copy: (message: MessageNode) => any;
3333
1602
  regenerate: (message: MessageNode) => any;
3334
- typing: () => any;
3335
1603
  "branch-change": (dir: BranchDirection, message: MessageNode) => any;
3336
1604
  "followup-select": (item: string, message: MessageNode) => any;
3337
1605
  "file-click": (file: ChatFile, message: MessageNode) => any;
@@ -3343,9 +1611,9 @@ declare const __VLS_base$7: vue.DefineComponent<__VLS_Props$9, {
3343
1611
  result?: ActionCardResult;
3344
1612
  }) => any;
3345
1613
  }, string, vue.PublicProps, Readonly<__VLS_Props$9> & Readonly<{
1614
+ onTyping?: (() => any) | undefined;
3346
1615
  onCopy?: ((message: MessageNode) => any) | undefined;
3347
1616
  onRegenerate?: ((message: MessageNode) => any) | undefined;
3348
- onTyping?: (() => any) | undefined;
3349
1617
  "onBranch-change"?: ((dir: BranchDirection, message: MessageNode) => any) | undefined;
3350
1618
  "onFollowup-select"?: ((item: string, message: MessageNode) => any) | undefined;
3351
1619
  "onFile-click"?: ((file: ChatFile, message: MessageNode) => any) | undefined;
@@ -3385,6 +1653,7 @@ declare const __VLS_base$7: vue.DefineComponent<__VLS_Props$9, {
3385
1653
  resolveFileUrl: (file: ChatFile) => Promise<string> | string;
3386
1654
  feedbackHandler: FeedbackHandler;
3387
1655
  actionCardExecutor: MessageActionCardExecutor;
1656
+ locateMessageId: string;
3388
1657
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
3389
1658
  declare const __VLS_export$9: __VLS_WithSlots$7<typeof __VLS_base$7, __VLS_Slots$7>;
3390
1659
  declare const _default$9: typeof __VLS_export$9;
@@ -3494,6 +1763,8 @@ type __VLS_Props$8 = {
3494
1763
  feedbackHandler?: FeedbackHandler;
3495
1764
  /** 写操作确认卡执行器(透传 AiMessage→ActionCard;仅 role='action' 节点消费) */
3496
1765
  actionCardExecutor?: MessageActionCardExecutor;
1766
+ /** 定位标记消息 id(透传 AiMessage;内容搜索定位场景,命中消息加 is-located 高亮) */
1767
+ locateMessageId?: string;
3497
1768
  /**
3498
1769
  * 在途确认卡(流式 SSE 建卡 + 历史回放灌入):默认渲染在所属 assistant 下
3499
1770
  * (action.anchorId 指向的节点,多轮写操作各自贴在对应回答下方;anchorId 缺省/
@@ -3542,68 +1813,68 @@ declare var __VLS_108: {
3542
1813
  message: MessageNode;
3543
1814
  };
3544
1815
  declare var __VLS_120: {
3545
- card: ActionCardPayload;
3546
- status: ActionCardStatus;
3547
- result?: ActionCardResult;
1816
+ card: _fv_ui_ai_chat_core.ActionCardPayload;
1817
+ status: _fv_ui_ai_chat_core.ActionCardStatus;
1818
+ result?: _fv_ui_ai_chat_core.ActionCardResult;
3548
1819
  execute: (kind: "confirm" | "cancel") => void;
3549
1820
  };
3550
1821
  declare var __VLS_123: {
3551
- card: ActionCardPayload;
3552
- status: ActionCardStatus;
3553
- result?: ActionCardResult;
1822
+ card: _fv_ui_ai_chat_core.ActionCardPayload;
1823
+ status: _fv_ui_ai_chat_core.ActionCardStatus;
1824
+ result?: _fv_ui_ai_chat_core.ActionCardResult;
3554
1825
  };
3555
1826
  declare var __VLS_126: {
3556
- card: ActionCardPayload;
3557
- status: ActionCardStatus;
3558
- result?: ActionCardResult;
1827
+ card: _fv_ui_ai_chat_core.ActionCardPayload;
1828
+ status: _fv_ui_ai_chat_core.ActionCardStatus;
1829
+ result?: _fv_ui_ai_chat_core.ActionCardResult;
3559
1830
  };
3560
1831
  declare var __VLS_129: {
3561
- card: ActionCardPayload;
3562
- status: ActionCardStatus;
3563
- result?: ActionCardResult;
1832
+ card: _fv_ui_ai_chat_core.ActionCardPayload;
1833
+ status: _fv_ui_ai_chat_core.ActionCardStatus;
1834
+ result?: _fv_ui_ai_chat_core.ActionCardResult;
3564
1835
  };
3565
- declare var __VLS_132: {
3566
- card: ActionCardPayload;
3567
- status: ActionCardStatus;
1836
+ declare var __VLS_132$1: {
1837
+ card: _fv_ui_ai_chat_core.ActionCardPayload;
1838
+ status: _fv_ui_ai_chat_core.ActionCardStatus;
3568
1839
  execute: (kind: "confirm" | "cancel") => void;
3569
1840
  executing: boolean;
3570
1841
  };
3571
1842
  declare var __VLS_135: {
3572
- card: ActionCardPayload;
3573
- status: ActionCardStatus;
3574
- result?: ActionCardResult;
1843
+ card: _fv_ui_ai_chat_core.ActionCardPayload;
1844
+ status: _fv_ui_ai_chat_core.ActionCardStatus;
1845
+ result?: _fv_ui_ai_chat_core.ActionCardResult;
3575
1846
  };
3576
1847
  declare var __VLS_146: {
3577
- card: ActionCardPayload;
3578
- status: ActionCardStatus;
3579
- result?: ActionCardResult;
1848
+ card: _fv_ui_ai_chat_core.ActionCardPayload;
1849
+ status: _fv_ui_ai_chat_core.ActionCardStatus;
1850
+ result?: _fv_ui_ai_chat_core.ActionCardResult;
3580
1851
  execute: (kind: "confirm" | "cancel") => void;
3581
1852
  };
3582
1853
  declare var __VLS_149: {
3583
- card: ActionCardPayload;
3584
- status: ActionCardStatus;
3585
- result?: ActionCardResult;
1854
+ card: _fv_ui_ai_chat_core.ActionCardPayload;
1855
+ status: _fv_ui_ai_chat_core.ActionCardStatus;
1856
+ result?: _fv_ui_ai_chat_core.ActionCardResult;
3586
1857
  };
3587
1858
  declare var __VLS_152: {
3588
- card: ActionCardPayload;
3589
- status: ActionCardStatus;
3590
- result?: ActionCardResult;
1859
+ card: _fv_ui_ai_chat_core.ActionCardPayload;
1860
+ status: _fv_ui_ai_chat_core.ActionCardStatus;
1861
+ result?: _fv_ui_ai_chat_core.ActionCardResult;
3591
1862
  };
3592
- declare var __VLS_155$1: {
3593
- card: ActionCardPayload;
3594
- status: ActionCardStatus;
3595
- result?: ActionCardResult;
1863
+ declare var __VLS_155: {
1864
+ card: _fv_ui_ai_chat_core.ActionCardPayload;
1865
+ status: _fv_ui_ai_chat_core.ActionCardStatus;
1866
+ result?: _fv_ui_ai_chat_core.ActionCardResult;
3596
1867
  };
3597
1868
  declare var __VLS_158: {
3598
- card: ActionCardPayload;
3599
- status: ActionCardStatus;
1869
+ card: _fv_ui_ai_chat_core.ActionCardPayload;
1870
+ status: _fv_ui_ai_chat_core.ActionCardStatus;
3600
1871
  execute: (kind: "confirm" | "cancel") => void;
3601
1872
  executing: boolean;
3602
1873
  };
3603
1874
  declare var __VLS_161: {
3604
- card: ActionCardPayload;
3605
- status: ActionCardStatus;
3606
- result?: ActionCardResult;
1875
+ card: _fv_ui_ai_chat_core.ActionCardPayload;
1876
+ status: _fv_ui_ai_chat_core.ActionCardStatus;
1877
+ result?: _fv_ui_ai_chat_core.ActionCardResult;
3607
1878
  };
3608
1879
  declare var __VLS_169: {
3609
1880
  scrollToBottom: typeof scrollToBottom;
@@ -3649,7 +1920,7 @@ type __VLS_Slots$6 = {} & {
3649
1920
  } & {
3650
1921
  'action-card-summary'?: (props: typeof __VLS_129) => any;
3651
1922
  } & {
3652
- 'action-card-actions'?: (props: typeof __VLS_132) => any;
1923
+ 'action-card-actions'?: (props: typeof __VLS_132$1) => any;
3653
1924
  } & {
3654
1925
  'action-card-result'?: (props: typeof __VLS_135) => any;
3655
1926
  } & {
@@ -3659,7 +1930,7 @@ type __VLS_Slots$6 = {} & {
3659
1930
  } & {
3660
1931
  'action-card-title'?: (props: typeof __VLS_152) => any;
3661
1932
  } & {
3662
- 'action-card-summary'?: (props: typeof __VLS_155$1) => any;
1933
+ 'action-card-summary'?: (props: typeof __VLS_155) => any;
3663
1934
  } & {
3664
1935
  'action-card-actions'?: (props: typeof __VLS_158) => any;
3665
1936
  } & {
@@ -3677,9 +1948,9 @@ declare const __VLS_base$6: vue.DefineComponent<__VLS_Props$8, {
3677
1948
  collapseThoughtChains: typeof collapseThoughtChains$1;
3678
1949
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
3679
1950
  scroll: (event: Event) => any;
1951
+ select: (item: AiMessagesSuggestion) => any;
3680
1952
  copy: (message: MessageNode) => any;
3681
1953
  regenerate: (message: MessageNode) => any;
3682
- select: (item: AiMessagesSuggestion) => any;
3683
1954
  "branch-change": (dir: BranchDirection, message: MessageNode) => any;
3684
1955
  "followup-select": (item: string, message: MessageNode) => any;
3685
1956
  "feedback-change": (message: MessageNode, action: "LIKE" | "DISLIKE" | "CLEAR") => any;
@@ -3693,9 +1964,9 @@ declare const __VLS_base$6: vue.DefineComponent<__VLS_Props$8, {
3693
1964
  "refresh-suggestions": () => any;
3694
1965
  }, string, vue.PublicProps, Readonly<__VLS_Props$8> & Readonly<{
3695
1966
  onScroll?: ((event: Event) => any) | undefined;
1967
+ onSelect?: ((item: AiMessagesSuggestion) => any) | undefined;
3696
1968
  onCopy?: ((message: MessageNode) => any) | undefined;
3697
1969
  onRegenerate?: ((message: MessageNode) => any) | undefined;
3698
- onSelect?: ((item: AiMessagesSuggestion) => any) | undefined;
3699
1970
  "onBranch-change"?: ((dir: BranchDirection, message: MessageNode) => any) | undefined;
3700
1971
  "onFollowup-select"?: ((item: string, message: MessageNode) => any) | undefined;
3701
1972
  "onFeedback-change"?: ((message: MessageNode, action: "LIKE" | "DISLIKE" | "CLEAR") => any) | undefined;
@@ -3708,7 +1979,6 @@ declare const __VLS_base$6: vue.DefineComponent<__VLS_Props$8, {
3708
1979
  "onMessage-file-click"?: ((file: ChatFile, message: MessageNode) => any) | undefined;
3709
1980
  "onRefresh-suggestions"?: (() => any) | undefined;
3710
1981
  }>, {
3711
- description: string;
3712
1982
  name: string;
3713
1983
  icon: string | Component;
3714
1984
  typing: boolean | {
@@ -3719,6 +1989,7 @@ declare const __VLS_base$6: vue.DefineComponent<__VLS_Props$8, {
3719
1989
  autoCollapse: boolean;
3720
1990
  collapsible: boolean;
3721
1991
  showDuration: boolean;
1992
+ description: string;
3722
1993
  suggestions: AiMessagesSuggestion[];
3723
1994
  followupStyle: "list" | "chips";
3724
1995
  showActions: boolean;
@@ -3739,6 +2010,7 @@ declare const __VLS_base$6: vue.DefineComponent<__VLS_Props$8, {
3739
2010
  resolveFileUrl: (file: ChatFile) => Promise<string> | string;
3740
2011
  feedbackHandler: FeedbackHandler;
3741
2012
  actionCardExecutor: MessageActionCardExecutor;
2013
+ locateMessageId: string;
3742
2014
  suggestionsTitle: string;
3743
2015
  suggestionsWrap: boolean;
3744
2016
  welcomeLayout: "horizontal" | "vertical";
@@ -3897,6 +2169,15 @@ type __VLS_Props$7 = {
3897
2169
  accept?: string;
3898
2170
  /** 附件数量上限(透传 Attachments,0 不限) */
3899
2171
  attachmentLimit?: number;
2172
+ /**
2173
+ * 附件去重开关(默认 false 不限制):true 时同一次问话内 name+size 相同的
2174
+ * 附件直接忽略(防误拖重复文件);error 项不拦截同名新文件(新入列即视为重试)
2175
+ */
2176
+ attachmentDedup?: boolean;
2177
+ /** 拖拽遮罩主说明文案(默认走语言包 dropToUpload;支持 \n 换行) */
2178
+ dropMainText?: string;
2179
+ /** 拖拽遮罩次说明文案(默认空串不渲染;比主说明字号小、颜色浅;支持 \n 换行) */
2180
+ dropSubText?: string;
3900
2181
  /**
3901
2182
  * 附件上传钩子(先传后发):选文件即调,成功返回附件描述(id/name/type 等回填列表项,
3902
2183
  * id 随发送进入 adapter 的 user 消息 files);返回错误文案串/抛错置 error 可重传。
@@ -3933,6 +2214,8 @@ type __VLS_Props$7 = {
3933
2214
  actionCards?: MessageNode[];
3934
2215
  /** 主题:light/dark/auto(注入 html dark class) */
3935
2216
  theme?: 'light' | 'dark' | 'auto';
2217
+ /** 定位标记消息 id(透传 AiMessages→AiMessage;内容搜索定位场景,命中气泡加主题色描边+淡底+褪去动画) */
2218
+ locateMessageId?: string;
3936
2219
  /** 语言包:'zh-CN'/'en'/'ko'/'vi'/'zh-HK' 整包或部分文案对象;解析后向整框后代注入(后代仍可用自身 locale prop 覆盖) */
3937
2220
  locale?: LocaleInput;
3938
2221
  };
@@ -3975,7 +2258,7 @@ declare var __VLS_48$1: {
3975
2258
  declare var __VLS_51$1: {};
3976
2259
  declare var __VLS_54$1: {};
3977
2260
  declare var __VLS_57$1: {};
3978
- declare var __VLS_60: {};
2261
+ declare var __VLS_60$1: {};
3979
2262
  declare var __VLS_63: {};
3980
2263
  declare var __VLS_66: {};
3981
2264
  declare var __VLS_69: {};
@@ -4016,7 +2299,8 @@ declare var __VLS_93: {
4016
2299
  status: ActionCardStatus;
4017
2300
  result?: ActionCardResult;
4018
2301
  };
4019
- declare var __VLS_131: {};
2302
+ declare var __VLS_132: {};
2303
+ declare var __VLS_134: {};
4020
2304
  type __VLS_Slots$5 = {} & {
4021
2305
  'message-avatar'?: (props: typeof __VLS_33$1) => any;
4022
2306
  } & {
@@ -4036,7 +2320,7 @@ type __VLS_Slots$5 = {} & {
4036
2320
  } & {
4037
2321
  'welcome-description'?: (props: typeof __VLS_57$1) => any;
4038
2322
  } & {
4039
- 'welcome-icon'?: (props: typeof __VLS_60) => any;
2323
+ 'welcome-icon'?: (props: typeof __VLS_60$1) => any;
4040
2324
  } & {
4041
2325
  'welcome-suggestions'?: (props: typeof __VLS_63) => any;
4042
2326
  } & {
@@ -4060,7 +2344,9 @@ type __VLS_Slots$5 = {} & {
4060
2344
  } & {
4061
2345
  'action-card-result'?: (props: typeof __VLS_93) => any;
4062
2346
  } & {
4063
- 'sender-prefix'?: (props: typeof __VLS_131) => any;
2347
+ 'sender-prefix'?: (props: typeof __VLS_132) => any;
2348
+ } & {
2349
+ 'drop-mask'?: (props: typeof __VLS_134) => any;
4064
2350
  };
4065
2351
  declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$7, {
4066
2352
  sendMessage: typeof sendMessage;
@@ -4075,9 +2361,8 @@ declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$7, {
4075
2361
  scrollTo: typeof scrollTo;
4076
2362
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
4077
2363
  scroll: (event: Event) => any;
4078
- copy: (message: MessageNode) => any;
4079
- send: (text: string, files?: ChatFile[] | undefined) => any;
4080
2364
  error: (err: Error, message?: MessageNode | undefined) => any;
2365
+ copy: (message: MessageNode) => any;
4081
2366
  "branch-change": (dir: BranchDirection, message: MessageNode) => any;
4082
2367
  "followup-select": (item: string, message: MessageNode) => any;
4083
2368
  "feedback-change": (message: MessageNode, action: "LIKE" | "DISLIKE" | "CLEAR") => any;
@@ -4090,6 +2375,7 @@ declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$7, {
4090
2375
  "message-file-click": (file: ChatFile, message: MessageNode) => any;
4091
2376
  "refresh-suggestions": () => any;
4092
2377
  "update:messages": (value: MessageNode[]) => any;
2378
+ send: (text: string, files?: ChatFile[] | undefined) => any;
4093
2379
  "suggestion-select": (item: AiChatSuggestion) => any;
4094
2380
  "message-complete": (message: MessageNode) => any;
4095
2381
  "attachment-exceed": (file: File) => any;
@@ -4104,9 +2390,8 @@ declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$7, {
4104
2390
  }) => any;
4105
2391
  }, string, vue.PublicProps, Readonly<__VLS_Props$7> & Readonly<{
4106
2392
  onScroll?: ((event: Event) => any) | undefined;
4107
- onCopy?: ((message: MessageNode) => any) | undefined;
4108
- onSend?: ((text: string, files?: ChatFile[] | undefined) => any) | undefined;
4109
2393
  onError?: ((err: Error, message?: MessageNode | undefined) => any) | undefined;
2394
+ onCopy?: ((message: MessageNode) => any) | undefined;
4110
2395
  "onBranch-change"?: ((dir: BranchDirection, message: MessageNode) => any) | undefined;
4111
2396
  "onFollowup-select"?: ((item: string, message: MessageNode) => any) | undefined;
4112
2397
  "onFeedback-change"?: ((message: MessageNode, action: "LIKE" | "DISLIKE" | "CLEAR") => any) | undefined;
@@ -4119,6 +2404,7 @@ declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$7, {
4119
2404
  "onMessage-file-click"?: ((file: ChatFile, message: MessageNode) => any) | undefined;
4120
2405
  "onRefresh-suggestions"?: (() => any) | undefined;
4121
2406
  "onUpdate:messages"?: ((value: MessageNode[]) => any) | undefined;
2407
+ onSend?: ((text: string, files?: ChatFile[] | undefined) => any) | undefined;
4122
2408
  "onSuggestion-select"?: ((item: AiChatSuggestion) => any) | undefined;
4123
2409
  "onMessage-complete"?: ((message: MessageNode) => any) | undefined;
4124
2410
  "onAttachment-exceed"?: ((file: File) => any) | undefined;
@@ -4143,10 +2429,6 @@ declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$7, {
4143
2429
  showDuration: boolean;
4144
2430
  suggestions: AiChatSuggestion[];
4145
2431
  accept: string;
4146
- baseURL: string;
4147
- apiKey: string;
4148
- model: string;
4149
- messages: MessageNode[];
4150
2432
  followupStyle: "list" | "chips";
4151
2433
  copyToClipboard: boolean;
4152
2434
  showUserAvatar: boolean;
@@ -4163,7 +2445,9 @@ declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$7, {
4163
2445
  timeFormat: (message: MessageNode, timestamp: number) => string;
4164
2446
  resolveFileUrl: (file: ChatFile) => Promise<string> | string;
4165
2447
  feedbackHandler: FeedbackHandler;
2448
+ locateMessageId: string;
4166
2449
  showHeader: boolean;
2450
+ messages: MessageNode[];
4167
2451
  suggestionsWrap: boolean;
4168
2452
  welcomeLayout: "horizontal" | "vertical";
4169
2453
  showRefreshSuggestions: boolean;
@@ -4172,7 +2456,10 @@ declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$7, {
4172
2456
  showScrollButton: boolean;
4173
2457
  scrollButtonThreshold: number;
4174
2458
  actionCards: MessageNode[];
2459
+ model: string;
4175
2460
  models: string[];
2461
+ baseURL: string;
2462
+ apiKey: string;
4176
2463
  adapter: ChatAdapter;
4177
2464
  centerWelcome: boolean;
4178
2465
  welcomeTransitionDuration: number;
@@ -4185,6 +2472,9 @@ declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$7, {
4185
2472
  features: AiChatFeatures;
4186
2473
  allowAttachments: boolean;
4187
2474
  attachmentLimit: number;
2475
+ attachmentDedup: boolean;
2476
+ dropMainText: string;
2477
+ dropSubText: string;
4188
2478
  uploadAttachment: (file: File, item: AttachmentItem) => Promise<Partial<AttachmentItem> | string | undefined | void> | Partial<AttachmentItem> | string | undefined | void;
4189
2479
  actionCardOption: ActionCardOption;
4190
2480
  theme: "light" | "dark" | "auto";
@@ -4309,12 +2599,12 @@ declare const __VLS_export$5: vue.DefineComponent<__VLS_Props$5, {
4309
2599
  open: typeof open$1;
4310
2600
  close: typeof close$1;
4311
2601
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
4312
- close: () => any;
4313
2602
  change: (key: string) => any;
2603
+ close: () => any;
4314
2604
  navigate: (href: string) => any;
4315
2605
  }, string, vue.PublicProps, Readonly<__VLS_Props$5> & Readonly<{
4316
- onClose?: (() => any) | undefined;
4317
2606
  onChange?: ((key: string) => any) | undefined;
2607
+ onClose?: (() => any) | undefined;
4318
2608
  onNavigate?: ((href: string) => any) | undefined;
4319
2609
  }>, {
4320
2610
  width: string;
@@ -4325,57 +2615,6 @@ declare const __VLS_export$5: vue.DefineComponent<__VLS_Props$5, {
4325
2615
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
4326
2616
  declare const _default$5: typeof __VLS_export$5;
4327
2617
 
4328
- /**
4329
- * 草稿会话哨兵:进入模块/新建/删除当前会话即切草稿态,不调 service.create;
4330
- * 首条消息发出时由 FvAiChatPanel 的懒创建包装 adapter 调 service.create 后
4331
- * 上抛 session-created 换真实 id(与参考项目宿主侧哨兵同值,迁移零成本)。
4332
- */
4333
- declare const DRAFT_SESSION_ID = "__draft__";
4334
- /** 会话列表查询(分页 + 状态筛选 + 关键字,正交同传) */
4335
- interface FvAiSessionListQuery {
4336
- pageNum: number;
4337
- pageSize: number;
4338
- status?: 'ACTIVE' | 'ARCHIVED';
4339
- keyword?: string;
4340
- }
4341
- /** 列表页归一化形状(宿主 IPage 格式由胶水转换) */
4342
- interface FvAiSessionPage {
4343
- items: FvCommonSessionItem[];
4344
- hasMore: boolean;
4345
- }
4346
- /** 加载更早消息页归一化形状 */
4347
- interface FvAiMessagePage {
4348
- messages: FvCommonMessage[];
4349
- hasMore: boolean;
4350
- }
4351
- /**
4352
- * AI 会话数据服务接口:宿主实现后经 prop 注入 FvAiSessionSidebar/FvAiChatPanel/
4353
- * FvAiChatWidget。库内不内置网络实现;错误提示(toast)由宿主胶水层统一承担,
4354
- * 库对 service 失败静默(侧栏)/空态重建(面板)。
4355
- */
4356
- interface FvAiSessionService {
4357
- /** 会话列表(分页,updatedTime DESC) */
4358
- list(q: FvAiSessionListQuery): Promise<FvAiSessionPage>;
4359
- /** 新建会话,返回新会话 id */
4360
- create(): Promise<string>;
4361
- /** 会话详情消息(尾部 limit 条,seq 升序) */
4362
- detail(sessionId: string, limit?: number): Promise<FvCommonMessage[]>;
4363
- /** 加载更早消息(beforeSeq 游标) */
4364
- history(sessionId: string, beforeSeq: number, limit?: number): Promise<FvAiMessagePage>;
4365
- /** 重命名 */
4366
- rename(args: {
4367
- sessionId: string;
4368
- title: string;
4369
- }): Promise<void>;
4370
- /** 删除 */
4371
- remove(sessionId: string): Promise<void>;
4372
- /** 归档/恢复(可选;未实现时侧栏隐藏归档 tab 与菜单项) */
4373
- archive?(args: {
4374
- sessionId: string;
4375
- archived: boolean;
4376
- }): Promise<void>;
4377
- }
4378
-
4379
2618
  interface __VLS_ConversationItem {
4380
2619
  key: string | number;
4381
2620
  label: string;
@@ -4400,6 +2639,19 @@ type __VLS_Props$4 = {
4400
2639
  collapsed?: boolean;
4401
2640
  /** 语言配置:内置语言名(如 'en-US')或部分文案对象(深合并覆盖) */
4402
2641
  locale?: LocaleInput;
2642
+ /** 启用内容搜索(默认 true):入口为按钮,点击弹窗搜索标题+会话内容(grouped)。
2643
+ * 宿主 service 未实现 search 时自动降级为纯标题搜索(原输入框) */
2644
+ searchContent?: boolean;
2645
+ /** 列表搜索框 placeholder(仅未启用内容搜索的输入框形态;缺省回落 locale) */
2646
+ searchPlaceholder?: string;
2647
+ /** 内容搜索弹窗输入框 placeholder(缺省回落 locale.sessionSidebar.contentPlaceholder) */
2648
+ searchContentPlaceholder?: string;
2649
+ /** 是否启用搜索历史功能(默认 true) */
2650
+ searchHistoryEnabled?: boolean;
2651
+ /** 搜索历史 localStorage 存储 key(默认 'fv-ai-search-history') */
2652
+ searchHistoryKey?: string;
2653
+ /** 搜索历史是否常驻弹窗底部(默认 false;true 时输入也展示在底部, false 时仅输入为空才展示) */
2654
+ searchHistoryPinned?: boolean;
4403
2655
  };
4404
2656
 
4405
2657
  declare var __VLS_brand: {};
@@ -4425,16 +2677,19 @@ type __VLS_Slots$3 = {} & {
4425
2677
  declare const __VLS_base$3: vue.DefineComponent<__VLS_Props$4, {
4426
2678
  refresh: () => Promise<void>;
4427
2679
  reload: () => Promise<void>;
2680
+ closeSearch: () => void;
4428
2681
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
4429
2682
  'update:collapsed': (collapsed: boolean) => any;
4430
2683
  select: (sessionId: string, status?: 'ACTIVE' | 'ARCHIVED') => any;
4431
2684
  'new-chat': () => any;
4432
2685
  removed: (sessionId: string) => any;
2686
+ 'content-select': (hit: FvAiSearchHit) => any;
4433
2687
  }, string, vue.PublicProps, Readonly<__VLS_Props$4> & Readonly<{
4434
2688
  "onUpdate:collapsed"?: ((collapsed: boolean) => any) | undefined;
4435
2689
  onSelect?: ((sessionId: string, status?: 'ACTIVE' | 'ARCHIVED') => any) | undefined;
4436
2690
  "onNew-chat"?: (() => any) | undefined;
4437
2691
  onRemoved?: ((sessionId: string) => any) | undefined;
2692
+ "onContent-select"?: ((hit: FvAiSearchHit) => any) | undefined;
4438
2693
  }>, {
4439
2694
  locale: LocaleInput;
4440
2695
  activeId: string;
@@ -4444,6 +2699,12 @@ declare const __VLS_base$3: vue.DefineComponent<__VLS_Props$4, {
4444
2699
  brandName: string;
4445
2700
  brandIcon: string;
4446
2701
  collapsed: boolean;
2702
+ searchContent: boolean;
2703
+ searchPlaceholder: string;
2704
+ searchContentPlaceholder: string;
2705
+ searchHistoryEnabled: boolean;
2706
+ searchHistoryKey: string;
2707
+ searchHistoryPinned: boolean;
4447
2708
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
4448
2709
 
4449
2710
  declare const __VLS_export$4: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
@@ -4502,6 +2763,12 @@ type __VLS_Props$3 = {
4502
2763
  accept?: string;
4503
2764
  /** 附件数量上限(透传 FvAiChat) */
4504
2765
  attachmentLimit?: number;
2766
+ /** 附件去重开关(透传 FvAiChat;默认 false 不限制) */
2767
+ attachmentDedup?: boolean;
2768
+ /** 拖拽遮罩主说明文案(透传 FvAiChat;支持 \n 换行) */
2769
+ dropMainText?: string;
2770
+ /** 拖拽遮罩次说明文案(透传 FvAiChat;默认空串不渲染) */
2771
+ dropSubText?: string;
4505
2772
  /** 附件上传钩子(透传 FvAiChat;草稿态懒创建由面板包装层承担) */
4506
2773
  uploadAttachment?: (file: File, item: AttachmentItem) => Promise<Partial<AttachmentItem> | string | undefined | void> | Partial<AttachmentItem> | string | undefined | void;
4507
2774
  /** 附件地址解析钩子(透传 FvAiChat) */
@@ -4526,6 +2793,13 @@ type __VLS_Props$3 = {
4526
2793
  * 父层经此方法让整框重建(viewKey 自增),动画从头跑一遍
4527
2794
  */
4528
2795
  declare function replayWelcome(): void;
2796
+ /**
2797
+ * 定位到指定消息并做视觉标记。
2798
+ * @param messageId 后端消息行 id(=FvCommonMessage.id);在当前窗口内直接滚动+标记
2799
+ * @param seq 后端消息序号(aroundSeq 游标);窗口不含 messageId 时经 service.historyAround 重建
2800
+ * 首屏后再定位。锚点行可能已不在(续聊/数据变更)→ 静默落在窗口中部,不弹错。
2801
+ */
2802
+ declare function locateToSeq(messageId: string, seq?: number): Promise<void>;
4529
2803
  /**
4530
2804
  * 直通刷新(spec §6.2):对当前会话重新拉 detail 并重建视图。
4531
2805
  * 复用 watch(sessionId) 的加载路径(含过期响应守卫);草稿态 no-op。
@@ -4540,10 +2814,16 @@ declare function refresh$1(): Promise<void> | undefined;
4540
2814
  * 对齐视口顶端;高度差公式(新增高-旧高+旧 scrollTop)兜底。
4541
2815
  */
4542
2816
  declare function loadEarlier(): Promise<void>;
2817
+ /**
2818
+ * 加载更新历史(afterSeq 游标,与 loadEarlier 对称):追加到 sourceMessages 尾部,
2819
+ * 重建整框后锚点回补(旧窗口首条)防滚动跳变;hasNewer=false 时停翻隐藏按钮。
2820
+ * 游标=当前末行 seq(seq 不连续,勿做算术)。
2821
+ */
2822
+ declare function loadLater(): Promise<void>;
4543
2823
  declare var __VLS_18$1: {};
4544
2824
  declare var __VLS_21: {};
4545
- declare var __VLS_24$1: {};
4546
- declare var __VLS_27: {};
2825
+ declare var __VLS_24: {};
2826
+ declare var __VLS_27$1: {};
4547
2827
  declare var __VLS_30: {};
4548
2828
  declare var __VLS_33: {};
4549
2829
  declare var __VLS_36: {};
@@ -4565,14 +2845,15 @@ declare var __VLS_54: {
4565
2845
  message: MessageNode;
4566
2846
  };
4567
2847
  declare var __VLS_57: {};
2848
+ declare var __VLS_60: {};
4568
2849
  type __VLS_Slots$2 = {} & {
4569
2850
  empty?: (props: typeof __VLS_18$1) => any;
4570
2851
  } & {
4571
2852
  'welcome-name'?: (props: typeof __VLS_21) => any;
4572
2853
  } & {
4573
- 'welcome-description'?: (props: typeof __VLS_24$1) => any;
2854
+ 'welcome-description'?: (props: typeof __VLS_24) => any;
4574
2855
  } & {
4575
- 'welcome-icon'?: (props: typeof __VLS_27) => any;
2856
+ 'welcome-icon'?: (props: typeof __VLS_27$1) => any;
4576
2857
  } & {
4577
2858
  'welcome-suggestions'?: (props: typeof __VLS_30) => any;
4578
2859
  } & {
@@ -4593,11 +2874,15 @@ type __VLS_Slots$2 = {} & {
4593
2874
  'message-actions'?: (props: typeof __VLS_54) => any;
4594
2875
  } & {
4595
2876
  'sender-prefix'?: (props: typeof __VLS_57) => any;
2877
+ } & {
2878
+ 'drop-mask'?: (props: typeof __VLS_60) => any;
4596
2879
  };
4597
2880
  declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$3, {
4598
2881
  replayWelcome: typeof replayWelcome;
4599
2882
  loadEarlier: typeof loadEarlier;
2883
+ loadLater: typeof loadLater;
4600
2884
  refresh: typeof refresh$1;
2885
+ locateToSeq: typeof locateToSeq;
4601
2886
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
4602
2887
  error: (err: Error) => any;
4603
2888
  "feedback-change": (message: MessageNode, action: "LIKE" | "DISLIKE" | "CLEAR") => any;
@@ -4659,6 +2944,9 @@ declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$3, {
4659
2944
  toolStepLabel: (toolName: string) => string;
4660
2945
  allowAttachments: boolean;
4661
2946
  attachmentLimit: number;
2947
+ attachmentDedup: boolean;
2948
+ dropMainText: string;
2949
+ dropSubText: string;
4662
2950
  uploadAttachment: (file: File, item: AttachmentItem) => Promise<Partial<AttachmentItem> | string | undefined | void> | Partial<AttachmentItem> | string | undefined | void;
4663
2951
  actionCardOption: ActionCardOption;
4664
2952
  theme: "light" | "dark" | "auto";
@@ -4755,6 +3043,12 @@ type __VLS_Props$2 = {
4755
3043
  theme?: 'light' | 'dark' | 'auto';
4756
3044
  /** 语言配置(透传 Panel/Sidebar 与头部文案) */
4757
3045
  locale?: LocaleInput;
3046
+ /** 开启侧栏内容搜索(透传 Sidebar;默认 true,宿主未实现 service.search 时自动降级) */
3047
+ searchContent?: boolean;
3048
+ /** 列表搜索框 placeholder(最大化态侧栏纯标题搜索时生效;缺省回落 locale) */
3049
+ searchPlaceholder?: string;
3050
+ /** 内容搜索弹窗 placeholder(最大化态侧栏与非最大化态头部搜索共用;缺省回落 locale) */
3051
+ searchContentPlaceholder?: string;
4758
3052
  /** 工具名 → 步骤展示名(透传 Panel) */
4759
3053
  toolStepLabel?: (toolName: string) => string;
4760
3054
  /** 开启输入区附件上传(透传 Panel) */
@@ -4763,6 +3057,12 @@ type __VLS_Props$2 = {
4763
3057
  accept?: string;
4764
3058
  /** 附件数量上限(透传 Panel) */
4765
3059
  attachmentLimit?: number;
3060
+ /** 附件去重开关(透传 Panel;默认 false 不限制) */
3061
+ attachmentDedup?: boolean;
3062
+ /** 拖拽遮罩主说明文案(透传 Panel;支持 \n 换行) */
3063
+ dropMainText?: string;
3064
+ /** 拖拽遮罩次说明文案(透传 Panel;默认空串不渲染) */
3065
+ dropSubText?: string;
4766
3066
  /** 附件上传钩子(透传 Panel) */
4767
3067
  uploadAttachment?: (file: File, item: AttachmentItem) => Promise<Partial<AttachmentItem> | string | undefined | void> | Partial<AttachmentItem> | string | undefined | void;
4768
3068
  /** 附件地址解析钩子(透传 Panel) */
@@ -4776,6 +3076,13 @@ type __VLS_Props$2 = {
4776
3076
  /** 「加载更早」每次拉取条数(透传 Panel,默认 50) */
4777
3077
  historyLimit?: number;
4778
3078
  };
3079
+ /**
3080
+ * 打开指定会话并定位到消息(内容搜索定位场景)。
3081
+ * @param sessionId 目标会话 id
3082
+ * @param messageId 后端消息行 id(=MessageNode.backendId),定位锚 key
3083
+ * @param seq 后端消息序号(aroundSeq 游标);当前窗口不含 messageId 时经 service.historyAround 重建
3084
+ */
3085
+ declare function openSessionAndLocate(sessionId: string, messageId: string, seq?: number): Promise<void>;
4779
3086
  declare function toggleMaximize(): void;
4780
3087
  declare function toggleMode(): void;
4781
3088
  /** 编程式开合(与 v-model 等价) */
@@ -4791,19 +3098,19 @@ declare function refresh(): Promise<void> | undefined;
4791
3098
  * DESC)取首个非草稿且非当前项,即「继续上次对话」;都无则 no-op 返回 false
4792
3099
  */
4793
3100
  declare function switchToPrevious(): boolean;
4794
- declare var __VLS_24: {};
4795
- declare var __VLS_26: {};
4796
- declare var __VLS_28: {};
4797
- declare var __VLS_154: string;
4798
- declare var __VLS_155: any;
3101
+ declare var __VLS_25: {};
3102
+ declare var __VLS_27: {};
3103
+ declare var __VLS_29: {};
3104
+ declare var __VLS_350: string;
3105
+ declare var __VLS_351: any;
4799
3106
  type __VLS_Slots$1 = {} & {
4800
- [K in NonNullable<typeof __VLS_154>]?: (props: typeof __VLS_155) => any;
3107
+ [K in NonNullable<typeof __VLS_350>]?: (props: typeof __VLS_351) => any;
4801
3108
  } & {
4802
- 'header-avatar'?: (props: typeof __VLS_24) => any;
3109
+ 'header-avatar'?: (props: typeof __VLS_25) => any;
4803
3110
  } & {
4804
- 'header-title'?: (props: typeof __VLS_26) => any;
3111
+ 'header-title'?: (props: typeof __VLS_27) => any;
4805
3112
  } & {
4806
- 'header-actions'?: (props: typeof __VLS_28) => any;
3113
+ 'header-actions'?: (props: typeof __VLS_29) => any;
4807
3114
  };
4808
3115
  declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
4809
3116
  open: typeof open;
@@ -4813,11 +3120,12 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
4813
3120
  newChat: typeof newChat;
4814
3121
  switchToPrevious: typeof switchToPrevious;
4815
3122
  refresh: typeof refresh;
3123
+ openSessionAndLocate: typeof openSessionAndLocate;
4816
3124
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
4817
- close: () => any;
4818
3125
  error: (err: Error) => any;
4819
3126
  open: () => any;
4820
3127
  "update:modelValue": (v: boolean) => any;
3128
+ close: () => any;
4821
3129
  "feedback-change": (message: MessageNode, action: "LIKE" | "DISLIKE" | "CLEAR") => any;
4822
3130
  "feedback-error": (message: string) => any;
4823
3131
  "action-card-settled": (info: {
@@ -4837,10 +3145,10 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
4837
3145
  "round-complete": () => any;
4838
3146
  "session-change": (sessionId: string) => any;
4839
3147
  }, string, vue.PublicProps, Readonly<__VLS_Props$2> & Readonly<{
4840
- onClose?: (() => any) | undefined;
4841
3148
  onError?: ((err: Error) => any) | undefined;
4842
3149
  onOpen?: (() => any) | undefined;
4843
3150
  "onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
3151
+ onClose?: (() => any) | undefined;
4844
3152
  "onFeedback-change"?: ((message: MessageNode, action: "LIKE" | "DISLIKE" | "CLEAR") => any) | undefined;
4845
3153
  "onFeedback-error"?: ((message: string) => any) | undefined;
4846
3154
  "onAction-card-settled"?: ((info: {
@@ -4876,7 +3184,6 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
4876
3184
  collapsible: boolean;
4877
3185
  suggestions: AiChatSuggestion[];
4878
3186
  accept: string;
4879
- sessionId: string;
4880
3187
  showTime: boolean;
4881
3188
  resolveFileUrl: (file: ChatFile) => Promise<string> | string;
4882
3189
  feedbackHandler: FeedbackHandler;
@@ -4888,9 +3195,16 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
4888
3195
  toolStepLabel: (toolName: string) => string;
4889
3196
  allowAttachments: boolean;
4890
3197
  attachmentLimit: number;
3198
+ attachmentDedup: boolean;
3199
+ dropMainText: string;
3200
+ dropSubText: string;
4891
3201
  uploadAttachment: (file: File, item: AttachmentItem) => Promise<Partial<AttachmentItem> | string | undefined | void> | Partial<AttachmentItem> | string | undefined | void;
4892
3202
  actionCardOption: ActionCardOption;
4893
3203
  theme: "light" | "dark" | "auto";
3204
+ sessionId: string;
3205
+ searchContent: boolean;
3206
+ searchPlaceholder: string;
3207
+ searchContentPlaceholder: string;
4894
3208
  detailLimit: number;
4895
3209
  historyLimit: number;
4896
3210
  offsetTop: number;
@@ -5062,204 +3376,11 @@ declare const _default: typeof __VLS_export;
5062
3376
  /** name(文件名去扩展名)→ svg 源文本 */
5063
3377
  declare const iconRegistry: Record<string, string>;
5064
3378
 
5065
- interface UseXStreamReturn {
5066
- startStream(options: {
5067
- readableStream: ReadableStream<Uint8Array>;
5068
- transformStream?: TransformStream<any, any>;
5069
- }): Promise<void>;
5070
- cancel(): void;
5071
- data: Ref<SSEEvent[]>;
5072
- error: Ref<Error | null>;
5073
- isLoading: Ref<boolean>;
5074
- }
5075
- declare function useXStream(): UseXStreamReturn;
5076
-
5077
- /** send 请求参数 */
5078
- interface SendOptions {
5079
- /** 请求地址 */
5080
- url: string;
5081
- /** 请求方法,默认 POST */
5082
- method?: string;
5083
- /** 请求头 */
5084
- headers?: Record<string, string>;
5085
- /** 请求体对象(内部 JSON.stringify) */
5086
- body?: object;
5087
- /** 可选转换流,接在 TextDecoderStream 之后(如协议转换) */
5088
- transformStream?: TransformStream<any, any>;
5089
- /** 全部 SSE 事件透传(含 event 名;tool/message_start 等非 content 事件不再被吞) */
5090
- onEvent?: (ev: SSEEvent) => void;
5091
- /** 内容分片回调:SSE data 为 JSON 且含字符串 content 时逐块触发 */
5092
- onChunk?: (text: string) => void;
5093
- }
5094
- interface UseSendReturn {
5095
- /** 发起请求并消费 SSE 流(逐块回调 onChunk) */
5096
- send: (options: SendOptions) => Promise<void>;
5097
- /** 中止当前请求/流消费 */
5098
- abort: () => void;
5099
- loading: Ref<boolean>;
5100
- error: Ref<Error | null>;
5101
- }
5102
- declare function useSend(): UseSendReturn;
5103
- /**
5104
- * XRequest:Promise 化的流式请求,resolve 累计全文。
5105
- * options 同 SendOptions(url 由首参覆盖),onChunk 透传照常触发。
5106
- */
5107
- declare function XRequest(url: string, options?: Omit<SendOptions, 'url'>): Promise<string>;
5108
-
5109
- interface UseRecordReturn {
5110
- /** 开始录音(+实时转写);失败不抛出,写入 error */
5111
- start: () => Promise<void>;
5112
- /** 停止录音与转写,合成 audioUrl */
5113
- stop: () => void;
5114
- isRecording: Ref<boolean>;
5115
- /** 实时转写文本(最终结果 + 中间结果拼接) */
5116
- text: Ref<string>;
5117
- /** 录音成品地址(Blob URL),stop 后生成,下次 start 前回收 */
5118
- audioUrl: Ref<string | null>;
5119
- error: Ref<Error | null>;
5120
- }
5121
- declare function useRecord(): UseRecordReturn;
5122
-
5123
- /**
5124
- * 创建树形消息数据结构。
5125
- * 纯函数对象、非响应式;useMessages/useChat 包装 reactive 以驱动视图。
5126
- * @param initial 初始节点表(恢复会话时传入),currentId 缺省取最后一个无子节点节点
5127
- */
5128
- declare function createMessageTree(initial?: {
5129
- messages?: Record<string, MessageNode>;
5130
- currentId?: string | null;
5131
- }): MessageTree;
5132
-
5133
- /** 翻译函数形态(vue-i18n t 的结构子类型,便于纯函数测试注入桩);文案 key 为库 locale 平面 key */
5134
- type AiChatT = (key: string, named?: Record<string, string>) => string;
5135
- /**
5136
- * FvCommonMessage[](seq 升序)→ MessageNode[](线性链,无分支)。
5137
- * 分组状态机:user 开新轮;assistant(toolCalls) 起工具段收集 tool 行,多轮循环
5138
- * 顺序累积(中间轮过渡文案以 text 步织入,保持发生顺序);下一个非 tool 行(最终
5139
- * assistant / 下一轮 user)时把收集到的全部工具段作为 toolSteps 挂给本轮最终
5140
- * assistant(若无最终行则丢弃——异常残留)。
5141
- *
5142
- * 附件(V1.1+):user 行 attachments(AiChatAttachmentDTO[],旧数据/无附件 null)
5143
- * → MessageNode.files(chips 渲染;id=附件 id,name=originalName,type IMAGE→image)。
5144
- * user 行 content 为服务端物化文本(图片占位行 + 文档解析块 + 用户输入),原样展示
5145
- * 不与 chips 互斥——content 是正文留底,files 是附件入口。
5146
- *
5147
- * role=action 结果行(V59+「预案-确认-执行」)不经本状态机——由消费方经
5148
- * resolveActionHistoryPairing(plan 工具行 ↔ action 行按 confirmToken 配对)
5149
- * 单独产出确认卡节点,经独立 actionCards 通道渲染(见 AiChatPanel.buildHistoryNodes)。
5150
- */
5151
- declare function mapHistoryToNodes(messages: FvCommonMessage[], t?: AiChatT): MessageNode[];
5152
- /**
5153
- * 会话列表项 → FvConversations item(key=id;group 仅作归档兜底分组,
5154
- * 展示分组由消费方按「今天/以往」覆写;disabled 供草稿占位等禁用态)
5155
- */
5156
- declare function sessionToConversationItem(s: FvCommonSessionItem, t?: AiChatT): {
5157
- key: string;
5158
- label: string;
5159
- group?: string;
5160
- disabled?: boolean;
5161
- };
5162
-
5163
- /**
5164
- * 写操作确认卡(Fv 系 V59+「预案-确认-执行」)纯函数层:
5165
- * - sanitizeActionCard: SSE action_card 载荷形状容错(脏帧不上抛)
5166
- * - parseActionRowContent: role=action 历史行 content 五键 JSON 安全解析
5167
- * - resolveActionHistoryPairing: plan 工具行 ↔ action 结果行按 confirmToken 配对,
5168
- * 输出可直接渲染的确认卡节点(待确认/成功/失败/已取消/已过期)
5169
- *
5170
- * 协议要点(对接文档):卡片数字来自服务端预检实查,前端原样渲染 planSummary,
5171
- * 不解析、不加工、不请求补充数据;令牌一次性,TTL 10 分钟;网络层超时/断线 ≠
5172
- * 执行失败——结果以刷新历史看到的 role=action 行为准。
5173
- */
5174
- /** 历史回放 plan 工具行 content 五键(备忘 note 不参与配对,仅留底) */
5175
- interface PlanRowContent {
5176
- action: string;
5177
- planSummary: string;
5178
- confirmToken: string;
5179
- expiresAt: number;
5180
- note?: string;
5181
- }
5182
- /** 历史回放 action 结果行 content 五键(result 恒为 SUCCESS/FAILED 大写) */
5183
- interface ActionRowContent {
5184
- confirmToken: string;
5185
- action: string;
5186
- planSummary: string;
5187
- result: 'SUCCESS' | 'FAILED' | string;
5188
- detail?: string | null;
5189
- }
5190
- /** SSE action_card 载荷形状容错:四键齐备且类型合法才上抛,脏数据返回 undefined */
5191
- declare function sanitizeActionCard(raw: unknown): ActionCardPayload | undefined;
5192
- /** 安全解析 plan 工具行 content(脏数据按无效行处理) */
5193
- declare function parsePlanRowContent(raw: string | null | undefined): PlanRowContent | undefined;
5194
- /** 安全解析 action 结果行 content(脏数据按无效行处理) */
5195
- declare function parseActionRowContent(raw: string | null | undefined): ActionRowContent | undefined;
5196
- /** 确认卡节点的最小形状(ActionCard 组件消费;与 MessageNode 对齐的字段子集) */
5197
- interface ActionCardNodeData {
5198
- id: string;
5199
- role: 'action';
5200
- parentId: string | null;
5201
- childrenIds: string[];
5202
- createdAt: number;
5203
- action: {
5204
- card: ActionCardPayload;
5205
- status: ActionCardStatus;
5206
- result?: ActionCardResult;
5207
- };
5208
- }
5209
- interface PairSourceRow {
5210
- id: string;
5211
- seq?: number;
5212
- role: string;
5213
- toolName?: string | null;
5214
- status?: string | null;
5215
- failReason?: string | null;
5216
- createdTime?: string;
5217
- content?: string | null;
5218
- }
5219
- interface ActionPairItem {
5220
- /** 卡片节点(终态:成功/失败/已取消/已过期;或流中断窗口的待确认卡) */
5221
- node: ActionCardNodeData;
5222
- /** 配对命中的 action 结果行 id(待确认/已过期未配对为 undefined) */
5223
- actionRowId?: string;
5224
- }
5225
- /**
5226
- * 历史回放配对(对接文档 §7):plan 工具行(role=tool 且 toolName 以 plan_ 开头)
5227
- * ↔ action 结果行(role=action),按 content.confirmToken 匹配。
5228
- *
5229
- * 1. 收集 plan 行按 confirmToken 建索引;
5230
- * 2. 遍历 action 行:命中索引 → 该卡渲染终态(成功/失败/已取消),并从索引移除
5231
- * (一卡一行,令牌一次性);
5232
- * 3. 剩余未配对 plan 行:expiresAt 已过 → 已过期未执行终态;未过(仅流进行中刷新
5233
- * 的窗口)→ 待确认卡(可交互);
5234
- * 4. 配对在同一会话内进行(调用方按会话拉取,跨会话行不参与);
5235
- * 5. 未配对的 action 行单独成卡兜底渲染(异常残留,防丢终态)。
5236
- *
5237
- * @param now 当前 epoch millis(调用方传入,便于测试;缺省 Date.now())
5238
- * @returns 按消息 seq 升序的卡片列表(直接追加渲染于消息流尾部)
5239
- */
5240
- declare function resolveActionHistoryPairing(messages: ReadonlyArray<PairSourceRow>, now?: number): ActionPairItem[];
5241
- /** MessageNode 形态适配(action 节点字段是 ActionCardNodeData 的超集) */
5242
- declare function actionItemsToMessageNodes(items: ActionPairItem[]): MessageNode[];
5243
- /**
5244
- * plan_ 工具行 id → 所属轮最终 assistant 行 id 锚定映射(历史回放 §7 恢复算法)。
5245
- * 从**原始 FvCommonMessage 行**做状态机扫描(展示节点不含 toolCalls,映射不可
5246
- * 在映射后的链上建立):assistant 中间轮开工具段 → plan_ tool 行登记待锚定 →
5247
- * 本轮最终 assistant 行(toolCalls 解析为空)落地时统一锚定到该行;下一个
5248
- * user 行清空未锚定集合(轮中断无最终行,对应卡回落消息流末尾渲染)。
5249
- * 键为 tool 行自身 id(与 resolveActionHistoryPairing 产卡 id `action-${plan行id}` 对应)。
5250
- */
5251
- declare function buildPlanRowAnchorMap(messages: ReadonlyArray<{
5252
- id: string;
5253
- role: string;
5254
- toolCalls?: string | null;
5255
- toolName?: string | null;
5256
- }>): Map<string, string>;
5257
-
5258
- declare const version = "0.1.0";
3379
+ declare const version = "1.11.1";
5259
3380
 
5260
3381
  declare const FvSparkleIcon: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
5261
3382
  [key: string]: any;
5262
3383
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
5263
3384
 
5264
- export { DRAFT_SESSION_ID, _default$6 as FvAiActionCard, _default$5 as FvAiArtifacts, _default$7 as FvAiChat, _default$1 as FvAiChatLauncher, _default$3 as FvAiChatPanel, _default$2 as FvAiChatWidget, _default$9 as FvAiMessage, _default$8 as FvAiMessages, _default$4 as FvAiSessionSidebar, _default$c as FvAttachments, _default$a as FvBlobHalo, _default$m as FvBubble, _default$l as FvBubbleList, FvCommonAdapter, FvCommonError, _default$b as FvConversations, _default$i as FvEditorSender, _default$d as FvFilesCard, _default$o as FvMarkdown, _default$j as FvMentionSender, _default$e as FvPrompts, _default$k as FvSender, FvSparkleIcon, _default as FvSvgIcon, _default$h as FvThinking, _default$g as FvThoughtChain, _default$n as FvTypewriter, _default$f as FvWelcome, OpenAIAdapter, XRequest, actionItemsToMessageNodes, buildPlanRowAnchorMap, configureLocale, createLocalStorageAdapter, createMemoryAdapter, createMessageTree, createSSEParser, en, iconRegistry, ko, mapHistoryToNodes, parseActionRowContent, parsePlanRowContent, parseSuggestions, resolveActionHistoryPairing, sanitizeActionCard, sessionToConversationItem, useChat, useMessages, useRecord, useSend, useXStream, version, vi, zhCN, zhHK };
5265
- export type { ActionCardExecuteFn, ActionCardExecutor, ActionCardOption, ActionCardPayload, ActionCardResult, ActionCardStatus, ActionPairItem, ActionRowContent, AdapterChatFile, AdapterChatMessage, AiArtifactItem, AiChatArtifactsOptions, AiChatFeatures, AiChatSuggestion, AiChatT, AiMessageBranchInfo, AiMessagesSuggestion, AttachmentItem, AttachmentUpload, BranchDirection, ChatAdapter, ChatAdapterHandlers, ChatAdapterRequest, ChatFile, DeepPartialLocale, FeedbackHandler, FvActionCardEvent, FvAiMessagePage, FvAiSessionListQuery, FvAiSessionPage, FvAiSessionService, FvBlobHaloColor, FvCommonAdapterConfig, FvCommonMessage, FvCommonMessagePage, FvCommonSendBody, FvCommonSessionDetail, FvCommonSessionItem, FvCommonToolEvent, LocaleCode, LocaleInput, LocaleMessages, MessageActionCardExecutor, MessageFeedback, MessageNode, MessageNodeInput, MessageRole, MessageStatus, MessageTree, MessageUsage, OpenAIAdapterConfig, PlanRowContent, QueueItem, RawUsage, SSEEvent, SSEParser, SendOptions, StorageAdapter, ToolCallItem, ToolStepItem, UseChatOptions, UseChatReturn, UseMessagesReturn, UseRecordReturn, UseSendReturn, UseXStreamReturn };
3385
+ export { _default$6 as FvAiActionCard, _default$5 as FvAiArtifacts, _default$7 as FvAiChat, _default$1 as FvAiChatLauncher, _default$3 as FvAiChatPanel, _default$2 as FvAiChatWidget, _default$b as FvAiFolderDialog, _default$9 as FvAiMessage, _default$8 as FvAiMessages, _default$4 as FvAiSessionSidebar, _default$d as FvAttachments, _default$a as FvBlobHalo, _default$n as FvBubble, _default$m as FvBubbleList, _default$c as FvConversations, _default$j as FvEditorSender, _default$e as FvFilesCard, _default$p as FvMarkdown, _default$k as FvMentionSender, _default$f as FvPrompts, _default$l as FvSender, FvSparkleIcon, _default as FvSvgIcon, _default$i as FvThinking, _default$h as FvThoughtChain, _default$o as FvTypewriter, _default$g as FvWelcome, iconRegistry, version };
3386
+ export type { ActionCardExecutor, AiArtifactItem, AiChatArtifactsOptions, AiChatFeatures, AiChatSuggestion, AiMessageBranchInfo, AiMessagesSuggestion, AttachmentItem, AttachmentUpload, FeedbackHandler, FvBlobHaloColor, MessageActionCardExecutor };