@fv-ui/ai-chat 1.10.3 → 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/README.md +148 -11
- package/dist/index.d.ts +894 -2117
- package/dist/style.css +1 -1
- package/es/index.mjs +8133 -3685
- package/lib/index.js +8169 -3701
- package/package.json +81 -80
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import { Component, Ref
|
|
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,1105 +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
|
-
};
|
|
161
|
-
scroll: {
|
|
162
|
-
toBottom: string;
|
|
163
|
-
};
|
|
164
|
-
aiChat: {
|
|
165
|
-
modelPlaceholder: string;
|
|
166
|
-
adapterMissing: string;
|
|
167
|
-
generateFailed: string;
|
|
168
|
-
exportUser: string;
|
|
169
|
-
exportAssistant: string;
|
|
170
|
-
};
|
|
171
|
-
aiMessage: {
|
|
172
|
-
copy: string;
|
|
173
|
-
regenerate: string;
|
|
174
|
-
prevBranch: string;
|
|
175
|
-
nextBranch: string;
|
|
176
|
-
defaultUserName: string;
|
|
177
|
-
defaultAssistantName: string;
|
|
178
|
-
querying: string;
|
|
179
|
-
queried: string;
|
|
180
|
-
generateFailed: string;
|
|
181
|
-
/** 追问建议 chips 区 aria 标签 */
|
|
182
|
-
followups: string;
|
|
183
|
-
/** 追问建议区标题(list 样式:分隔线下方灰色标题) */
|
|
184
|
-
followupsTitle: string;
|
|
185
|
-
loadingPhrases: string[];
|
|
186
|
-
/** 消息评价(点赞/点踩) */
|
|
187
|
-
feedback: {
|
|
188
|
-
like: string;
|
|
189
|
-
dislike: string;
|
|
190
|
-
/** 点踩弹窗标题({name} = AI 名称,渲染时替换为 assistantName,空串回落 defaultAssistantName) */
|
|
191
|
-
dislikeTitle: string;
|
|
192
|
-
/** 点踩附言输入占位(选填 ≤500 字) */
|
|
193
|
-
dislikePlaceholder: string;
|
|
194
|
-
/** 附言提交按钮(不带原因直接点踩) */
|
|
195
|
-
submit: string;
|
|
196
|
-
/** 附言跳过按钮 */
|
|
197
|
-
skip: string;
|
|
198
|
-
/** 评价提交失败(钩子 reject/返回错误文案时 toast) */
|
|
199
|
-
failed: string;
|
|
200
|
-
/** 已取消评价 toast(CLEAR 成功后提示) */
|
|
201
|
-
cleared: string;
|
|
202
|
-
};
|
|
203
|
-
};
|
|
204
|
-
aiArtifacts: {
|
|
205
|
-
copy: string;
|
|
206
|
-
download: string;
|
|
207
|
-
fullscreen: string;
|
|
208
|
-
close: string;
|
|
209
|
-
};
|
|
210
|
-
chat: {
|
|
211
|
-
fileTag: string;
|
|
212
|
-
fileImageTag: string;
|
|
213
|
-
filesSystemPrompt: string;
|
|
214
|
-
toolDuration: string;
|
|
215
|
-
continuePrompt: string;
|
|
216
|
-
};
|
|
217
|
-
errors: {
|
|
218
|
-
requestFailed: string;
|
|
219
|
-
sessionIdMissing: string;
|
|
220
|
-
noBody: string;
|
|
221
|
-
generateFailed: string;
|
|
222
|
-
recordUnsupported: string;
|
|
223
|
-
speechError: string;
|
|
224
|
-
/** 附件类型拦截提示({name} = 文件名;accept 白名单外文件入列前 toast) */
|
|
225
|
-
attachmentRejected: string;
|
|
226
|
-
};
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* 语言包类型:以 zh-CN 为源型推导(单一事实来源,勿手写接口——新增 key 只改 zh-CN,其余包编译期报缺)。
|
|
231
|
-
*/
|
|
232
|
-
type LocaleMessages = typeof zhCN;
|
|
233
|
-
|
|
234
|
-
/** en 语言包(LocaleMessages 类型注解:key 集合与 zh-CN 编译期对齐) */
|
|
235
|
-
declare const en: LocaleMessages;
|
|
236
|
-
|
|
237
|
-
/** ko(한국어)语言包(LocaleMessages 类型注解:key 集合与 zh-CN 编译期对齐) */
|
|
238
|
-
declare const ko: LocaleMessages;
|
|
239
|
-
|
|
240
|
-
/** vi(Tiếng Việt)语言包(LocaleMessages 类型注解:key 集合与 zh-CN 编译期对齐) */
|
|
241
|
-
declare const vi: LocaleMessages;
|
|
242
|
-
|
|
243
|
-
/** zh-HK(香港繁體)语言包(LocaleMessages 类型注解:key 集合与 zh-CN 编译期对齐;港式用词:檔案/資料/支援/上載/傳送) */
|
|
244
|
-
declare const zhHK: LocaleMessages;
|
|
245
|
-
|
|
246
|
-
/** 递归深 Partial:数组/叶子保持原样(与 deepMerge 覆盖语义对齐),对象层级逐层可选 */
|
|
247
|
-
type DeepPartial<T> = T extends readonly (infer _)[] ? T : T extends object ? {
|
|
248
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
|
249
|
-
} : T;
|
|
250
|
-
/** 组件 locale prop 对象形态:任意层级均可部分覆盖(如仅覆盖 aiMessage.feedback.dislikeTitle) */
|
|
251
|
-
type DeepPartialLocale = DeepPartial<LocaleMessages>;
|
|
252
|
-
/** 组件 locale prop 形态:内置语言名字符串(整包切换)或部分文案对象(在基底上深合并) */
|
|
253
|
-
type LocaleInput = string | DeepPartialLocale;
|
|
254
|
-
/** 内置语言包注册表(configureLocale 字符串形态查这里);zh-HK 系繁体需与简体区分故保留区域码,其余用短码 */
|
|
255
|
-
declare const PACKS: {
|
|
256
|
-
readonly 'zh-CN': {
|
|
257
|
-
common: {
|
|
258
|
-
copy: string;
|
|
259
|
-
delete: string;
|
|
260
|
-
confirm: string;
|
|
261
|
-
cancel: string;
|
|
262
|
-
retry: string;
|
|
263
|
-
close: string;
|
|
264
|
-
preview: string;
|
|
265
|
-
clear: string;
|
|
266
|
-
stop: string;
|
|
267
|
-
send: string;
|
|
268
|
-
download: string;
|
|
269
|
-
fullscreen: string;
|
|
270
|
-
collapse: string;
|
|
271
|
-
expand: string;
|
|
272
|
-
copied: string;
|
|
273
|
-
};
|
|
274
|
-
thinking: {
|
|
275
|
-
start: string;
|
|
276
|
-
thinking: string;
|
|
277
|
-
end: string;
|
|
278
|
-
interrupted: string;
|
|
279
|
-
error: string;
|
|
280
|
-
endWithTools: string;
|
|
281
|
-
interruptedWithTools: string;
|
|
282
|
-
thinkingItem: string;
|
|
283
|
-
thoughtDoneItem: string;
|
|
284
|
-
};
|
|
285
|
-
welcome: {
|
|
286
|
-
greetingPrefix: string;
|
|
287
|
-
greetingName: string;
|
|
288
|
-
description: string;
|
|
289
|
-
refreshSuggestions: string;
|
|
290
|
-
};
|
|
291
|
-
sender: {
|
|
292
|
-
clear: string;
|
|
293
|
-
stop: string;
|
|
294
|
-
send: string;
|
|
295
|
-
speech: string;
|
|
296
|
-
recordCancel: string;
|
|
297
|
-
recordConfirm: string;
|
|
298
|
-
micUnavailable: string;
|
|
299
|
-
inputPlaceholder: string;
|
|
300
|
-
};
|
|
301
|
-
editorSender: {
|
|
302
|
-
clear: string;
|
|
303
|
-
stop: string;
|
|
304
|
-
send: string;
|
|
305
|
-
inputPlaceholder: string;
|
|
306
|
-
selectTagTitle: string;
|
|
307
|
-
loading: string;
|
|
308
|
-
tagTip: string;
|
|
309
|
-
};
|
|
310
|
-
attachments: {
|
|
311
|
-
add: string;
|
|
312
|
-
retry: string;
|
|
313
|
-
uploading: string;
|
|
314
|
-
};
|
|
315
|
-
filesCard: {
|
|
316
|
-
remove: string;
|
|
317
|
-
download: string;
|
|
318
|
-
};
|
|
319
|
-
conversations: {
|
|
320
|
-
menuLabel: string;
|
|
321
|
-
rename: string;
|
|
322
|
-
delete: string;
|
|
323
|
-
renameTitle: string;
|
|
324
|
-
renamePrompt: string;
|
|
325
|
-
renamePlaceholder: string;
|
|
326
|
-
deleteTitle: string;
|
|
327
|
-
deleteConfirm: string;
|
|
328
|
-
};
|
|
329
|
-
sessionSidebar: {
|
|
330
|
-
newChat: string;
|
|
331
|
-
searchPlaceholder: string;
|
|
332
|
-
collapse: string;
|
|
333
|
-
expand: string;
|
|
334
|
-
activeTab: string;
|
|
335
|
-
archivedTab: string;
|
|
336
|
-
today: string;
|
|
337
|
-
earlier: string;
|
|
338
|
-
archived: string;
|
|
339
|
-
restore: string;
|
|
340
|
-
archive: string;
|
|
341
|
-
renamed: string;
|
|
342
|
-
deleted: string;
|
|
343
|
-
archivedDone: string;
|
|
344
|
-
restored: string;
|
|
345
|
-
operationFailed: string;
|
|
346
|
-
listLoading: string;
|
|
347
|
-
};
|
|
348
|
-
aiChatPanel: {
|
|
349
|
-
loadEarlier: string;
|
|
350
|
-
createFailed: string;
|
|
351
|
-
generateFailed: string;
|
|
352
|
-
close: string;
|
|
353
|
-
floatMode: string;
|
|
354
|
-
drawerMode: string;
|
|
355
|
-
maximize: string;
|
|
356
|
-
restore: string;
|
|
357
|
-
history: string;
|
|
358
|
-
historyEmpty: string;
|
|
359
|
-
back: string;
|
|
360
|
-
launcher: string;
|
|
361
|
-
};
|
|
362
|
-
historyMapper: {
|
|
363
|
-
回复生成中断: string;
|
|
364
|
-
回复失败: string;
|
|
365
|
-
回复已中断: string;
|
|
366
|
-
'\u56DE\u590D\u5DF2\u4E2D\u65AD\uFF0C\u4EE5\u4E0A\u4E3A\u5DF2\u751F\u6210\u90E8\u5206': string;
|
|
367
|
-
'\u7528\u65F6 {s}': string;
|
|
368
|
-
已归档: string;
|
|
369
|
-
};
|
|
370
|
-
scroll: {
|
|
371
|
-
toBottom: string;
|
|
372
|
-
};
|
|
373
|
-
aiChat: {
|
|
374
|
-
modelPlaceholder: string;
|
|
375
|
-
adapterMissing: string;
|
|
376
|
-
generateFailed: string;
|
|
377
|
-
exportUser: string;
|
|
378
|
-
exportAssistant: string;
|
|
379
|
-
};
|
|
380
|
-
aiMessage: {
|
|
381
|
-
copy: string;
|
|
382
|
-
regenerate: string;
|
|
383
|
-
prevBranch: string;
|
|
384
|
-
nextBranch: string;
|
|
385
|
-
defaultUserName: string;
|
|
386
|
-
defaultAssistantName: string;
|
|
387
|
-
querying: string;
|
|
388
|
-
queried: string;
|
|
389
|
-
generateFailed: string;
|
|
390
|
-
followups: string;
|
|
391
|
-
followupsTitle: string;
|
|
392
|
-
loadingPhrases: string[];
|
|
393
|
-
feedback: {
|
|
394
|
-
like: string;
|
|
395
|
-
dislike: string;
|
|
396
|
-
dislikeTitle: string;
|
|
397
|
-
dislikePlaceholder: string;
|
|
398
|
-
submit: string;
|
|
399
|
-
skip: string;
|
|
400
|
-
failed: string;
|
|
401
|
-
cleared: string;
|
|
402
|
-
};
|
|
403
|
-
};
|
|
404
|
-
aiArtifacts: {
|
|
405
|
-
copy: string;
|
|
406
|
-
download: string;
|
|
407
|
-
fullscreen: string;
|
|
408
|
-
close: string;
|
|
409
|
-
};
|
|
410
|
-
chat: {
|
|
411
|
-
fileTag: string;
|
|
412
|
-
fileImageTag: string;
|
|
413
|
-
filesSystemPrompt: string;
|
|
414
|
-
toolDuration: string;
|
|
415
|
-
continuePrompt: string;
|
|
416
|
-
};
|
|
417
|
-
errors: {
|
|
418
|
-
requestFailed: string;
|
|
419
|
-
sessionIdMissing: string;
|
|
420
|
-
noBody: string;
|
|
421
|
-
generateFailed: string;
|
|
422
|
-
recordUnsupported: string;
|
|
423
|
-
speechError: string;
|
|
424
|
-
attachmentRejected: string;
|
|
425
|
-
};
|
|
426
|
-
};
|
|
427
|
-
readonly en: {
|
|
428
|
-
common: {
|
|
429
|
-
copy: string;
|
|
430
|
-
delete: string;
|
|
431
|
-
confirm: string;
|
|
432
|
-
cancel: string;
|
|
433
|
-
retry: string;
|
|
434
|
-
close: string;
|
|
435
|
-
preview: string;
|
|
436
|
-
clear: string;
|
|
437
|
-
stop: string;
|
|
438
|
-
send: string;
|
|
439
|
-
download: string;
|
|
440
|
-
fullscreen: string;
|
|
441
|
-
collapse: string;
|
|
442
|
-
expand: string;
|
|
443
|
-
copied: string;
|
|
444
|
-
};
|
|
445
|
-
thinking: {
|
|
446
|
-
start: string;
|
|
447
|
-
thinking: string;
|
|
448
|
-
end: string;
|
|
449
|
-
interrupted: string;
|
|
450
|
-
error: string;
|
|
451
|
-
endWithTools: string;
|
|
452
|
-
interruptedWithTools: string;
|
|
453
|
-
thinkingItem: string;
|
|
454
|
-
thoughtDoneItem: string;
|
|
455
|
-
};
|
|
456
|
-
welcome: {
|
|
457
|
-
greetingPrefix: string;
|
|
458
|
-
greetingName: string;
|
|
459
|
-
description: string;
|
|
460
|
-
refreshSuggestions: string;
|
|
461
|
-
};
|
|
462
|
-
sender: {
|
|
463
|
-
clear: string;
|
|
464
|
-
stop: string;
|
|
465
|
-
send: string;
|
|
466
|
-
speech: string;
|
|
467
|
-
recordCancel: string;
|
|
468
|
-
recordConfirm: string;
|
|
469
|
-
micUnavailable: string;
|
|
470
|
-
inputPlaceholder: string;
|
|
471
|
-
};
|
|
472
|
-
editorSender: {
|
|
473
|
-
clear: string;
|
|
474
|
-
stop: string;
|
|
475
|
-
send: string;
|
|
476
|
-
inputPlaceholder: string;
|
|
477
|
-
selectTagTitle: string;
|
|
478
|
-
loading: string;
|
|
479
|
-
tagTip: string;
|
|
480
|
-
};
|
|
481
|
-
attachments: {
|
|
482
|
-
add: string;
|
|
483
|
-
retry: string;
|
|
484
|
-
uploading: string;
|
|
485
|
-
};
|
|
486
|
-
filesCard: {
|
|
487
|
-
remove: string;
|
|
488
|
-
download: string;
|
|
489
|
-
};
|
|
490
|
-
conversations: {
|
|
491
|
-
menuLabel: string;
|
|
492
|
-
rename: string;
|
|
493
|
-
delete: string;
|
|
494
|
-
renameTitle: string;
|
|
495
|
-
renamePrompt: string;
|
|
496
|
-
renamePlaceholder: string;
|
|
497
|
-
deleteTitle: string;
|
|
498
|
-
deleteConfirm: string;
|
|
499
|
-
};
|
|
500
|
-
sessionSidebar: {
|
|
501
|
-
newChat: string;
|
|
502
|
-
searchPlaceholder: string;
|
|
503
|
-
collapse: string;
|
|
504
|
-
expand: string;
|
|
505
|
-
activeTab: string;
|
|
506
|
-
archivedTab: string;
|
|
507
|
-
today: string;
|
|
508
|
-
earlier: string;
|
|
509
|
-
archived: string;
|
|
510
|
-
restore: string;
|
|
511
|
-
archive: string;
|
|
512
|
-
renamed: string;
|
|
513
|
-
deleted: string;
|
|
514
|
-
archivedDone: string;
|
|
515
|
-
restored: string;
|
|
516
|
-
operationFailed: string;
|
|
517
|
-
listLoading: string;
|
|
518
|
-
};
|
|
519
|
-
aiChatPanel: {
|
|
520
|
-
loadEarlier: string;
|
|
521
|
-
createFailed: string;
|
|
522
|
-
generateFailed: string;
|
|
523
|
-
close: string;
|
|
524
|
-
floatMode: string;
|
|
525
|
-
drawerMode: string;
|
|
526
|
-
maximize: string;
|
|
527
|
-
restore: string;
|
|
528
|
-
history: string;
|
|
529
|
-
historyEmpty: string;
|
|
530
|
-
back: string;
|
|
531
|
-
launcher: string;
|
|
532
|
-
};
|
|
533
|
-
historyMapper: {
|
|
534
|
-
回复生成中断: string;
|
|
535
|
-
回复失败: string;
|
|
536
|
-
回复已中断: string;
|
|
537
|
-
'\u56DE\u590D\u5DF2\u4E2D\u65AD\uFF0C\u4EE5\u4E0A\u4E3A\u5DF2\u751F\u6210\u90E8\u5206': string;
|
|
538
|
-
'\u7528\u65F6 {s}': string;
|
|
539
|
-
已归档: string;
|
|
540
|
-
};
|
|
541
|
-
scroll: {
|
|
542
|
-
toBottom: string;
|
|
543
|
-
};
|
|
544
|
-
aiChat: {
|
|
545
|
-
modelPlaceholder: string;
|
|
546
|
-
adapterMissing: string;
|
|
547
|
-
generateFailed: string;
|
|
548
|
-
exportUser: string;
|
|
549
|
-
exportAssistant: string;
|
|
550
|
-
};
|
|
551
|
-
aiMessage: {
|
|
552
|
-
copy: string;
|
|
553
|
-
regenerate: string;
|
|
554
|
-
prevBranch: string;
|
|
555
|
-
nextBranch: string;
|
|
556
|
-
defaultUserName: string;
|
|
557
|
-
defaultAssistantName: string;
|
|
558
|
-
querying: string;
|
|
559
|
-
queried: string;
|
|
560
|
-
generateFailed: string;
|
|
561
|
-
followups: string;
|
|
562
|
-
followupsTitle: string;
|
|
563
|
-
loadingPhrases: string[];
|
|
564
|
-
feedback: {
|
|
565
|
-
like: string;
|
|
566
|
-
dislike: string;
|
|
567
|
-
dislikeTitle: string;
|
|
568
|
-
dislikePlaceholder: string;
|
|
569
|
-
submit: string;
|
|
570
|
-
skip: string;
|
|
571
|
-
failed: string;
|
|
572
|
-
cleared: string;
|
|
573
|
-
};
|
|
574
|
-
};
|
|
575
|
-
aiArtifacts: {
|
|
576
|
-
copy: string;
|
|
577
|
-
download: string;
|
|
578
|
-
fullscreen: string;
|
|
579
|
-
close: string;
|
|
580
|
-
};
|
|
581
|
-
chat: {
|
|
582
|
-
fileTag: string;
|
|
583
|
-
fileImageTag: string;
|
|
584
|
-
filesSystemPrompt: string;
|
|
585
|
-
toolDuration: string;
|
|
586
|
-
continuePrompt: string;
|
|
587
|
-
};
|
|
588
|
-
errors: {
|
|
589
|
-
requestFailed: string;
|
|
590
|
-
sessionIdMissing: string;
|
|
591
|
-
noBody: string;
|
|
592
|
-
generateFailed: string;
|
|
593
|
-
recordUnsupported: string;
|
|
594
|
-
speechError: string;
|
|
595
|
-
attachmentRejected: string;
|
|
596
|
-
};
|
|
597
|
-
};
|
|
598
|
-
readonly ko: {
|
|
599
|
-
common: {
|
|
600
|
-
copy: string;
|
|
601
|
-
delete: string;
|
|
602
|
-
confirm: string;
|
|
603
|
-
cancel: string;
|
|
604
|
-
retry: string;
|
|
605
|
-
close: string;
|
|
606
|
-
preview: string;
|
|
607
|
-
clear: string;
|
|
608
|
-
stop: string;
|
|
609
|
-
send: string;
|
|
610
|
-
download: string;
|
|
611
|
-
fullscreen: string;
|
|
612
|
-
collapse: string;
|
|
613
|
-
expand: string;
|
|
614
|
-
copied: string;
|
|
615
|
-
};
|
|
616
|
-
thinking: {
|
|
617
|
-
start: string;
|
|
618
|
-
thinking: string;
|
|
619
|
-
end: string;
|
|
620
|
-
interrupted: string;
|
|
621
|
-
error: string;
|
|
622
|
-
endWithTools: string;
|
|
623
|
-
interruptedWithTools: string;
|
|
624
|
-
thinkingItem: string;
|
|
625
|
-
thoughtDoneItem: string;
|
|
626
|
-
};
|
|
627
|
-
welcome: {
|
|
628
|
-
greetingPrefix: string;
|
|
629
|
-
greetingName: string;
|
|
630
|
-
description: string;
|
|
631
|
-
refreshSuggestions: string;
|
|
632
|
-
};
|
|
633
|
-
sender: {
|
|
634
|
-
clear: string;
|
|
635
|
-
stop: string;
|
|
636
|
-
send: string;
|
|
637
|
-
speech: string;
|
|
638
|
-
recordCancel: string;
|
|
639
|
-
recordConfirm: string;
|
|
640
|
-
micUnavailable: string;
|
|
641
|
-
inputPlaceholder: string;
|
|
642
|
-
};
|
|
643
|
-
editorSender: {
|
|
644
|
-
clear: string;
|
|
645
|
-
stop: string;
|
|
646
|
-
send: string;
|
|
647
|
-
inputPlaceholder: string;
|
|
648
|
-
selectTagTitle: string;
|
|
649
|
-
loading: string;
|
|
650
|
-
tagTip: string;
|
|
651
|
-
};
|
|
652
|
-
attachments: {
|
|
653
|
-
add: string;
|
|
654
|
-
retry: string;
|
|
655
|
-
uploading: string;
|
|
656
|
-
};
|
|
657
|
-
filesCard: {
|
|
658
|
-
remove: string;
|
|
659
|
-
download: string;
|
|
660
|
-
};
|
|
661
|
-
conversations: {
|
|
662
|
-
menuLabel: string;
|
|
663
|
-
rename: string;
|
|
664
|
-
delete: string;
|
|
665
|
-
renameTitle: string;
|
|
666
|
-
renamePrompt: string;
|
|
667
|
-
renamePlaceholder: string;
|
|
668
|
-
deleteTitle: string;
|
|
669
|
-
deleteConfirm: string;
|
|
670
|
-
};
|
|
671
|
-
sessionSidebar: {
|
|
672
|
-
newChat: string;
|
|
673
|
-
searchPlaceholder: string;
|
|
674
|
-
collapse: string;
|
|
675
|
-
expand: string;
|
|
676
|
-
activeTab: string;
|
|
677
|
-
archivedTab: string;
|
|
678
|
-
today: string;
|
|
679
|
-
earlier: string;
|
|
680
|
-
archived: string;
|
|
681
|
-
restore: string;
|
|
682
|
-
archive: string;
|
|
683
|
-
renamed: string;
|
|
684
|
-
deleted: string;
|
|
685
|
-
archivedDone: string;
|
|
686
|
-
restored: string;
|
|
687
|
-
operationFailed: string;
|
|
688
|
-
listLoading: string;
|
|
689
|
-
};
|
|
690
|
-
aiChatPanel: {
|
|
691
|
-
loadEarlier: string;
|
|
692
|
-
createFailed: string;
|
|
693
|
-
generateFailed: string;
|
|
694
|
-
close: string;
|
|
695
|
-
floatMode: string;
|
|
696
|
-
drawerMode: string;
|
|
697
|
-
maximize: string;
|
|
698
|
-
restore: string;
|
|
699
|
-
history: string;
|
|
700
|
-
historyEmpty: string;
|
|
701
|
-
back: string;
|
|
702
|
-
launcher: string;
|
|
703
|
-
};
|
|
704
|
-
historyMapper: {
|
|
705
|
-
回复生成中断: string;
|
|
706
|
-
回复失败: string;
|
|
707
|
-
回复已中断: string;
|
|
708
|
-
'\u56DE\u590D\u5DF2\u4E2D\u65AD\uFF0C\u4EE5\u4E0A\u4E3A\u5DF2\u751F\u6210\u90E8\u5206': string;
|
|
709
|
-
'\u7528\u65F6 {s}': string;
|
|
710
|
-
已归档: string;
|
|
711
|
-
};
|
|
712
|
-
scroll: {
|
|
713
|
-
toBottom: string;
|
|
714
|
-
};
|
|
715
|
-
aiChat: {
|
|
716
|
-
modelPlaceholder: string;
|
|
717
|
-
adapterMissing: string;
|
|
718
|
-
generateFailed: string;
|
|
719
|
-
exportUser: string;
|
|
720
|
-
exportAssistant: string;
|
|
721
|
-
};
|
|
722
|
-
aiMessage: {
|
|
723
|
-
copy: string;
|
|
724
|
-
regenerate: string;
|
|
725
|
-
prevBranch: string;
|
|
726
|
-
nextBranch: string;
|
|
727
|
-
defaultUserName: string;
|
|
728
|
-
defaultAssistantName: string;
|
|
729
|
-
querying: string;
|
|
730
|
-
queried: string;
|
|
731
|
-
generateFailed: string;
|
|
732
|
-
followups: string;
|
|
733
|
-
followupsTitle: string;
|
|
734
|
-
loadingPhrases: string[];
|
|
735
|
-
feedback: {
|
|
736
|
-
like: string;
|
|
737
|
-
dislike: string;
|
|
738
|
-
dislikeTitle: string;
|
|
739
|
-
dislikePlaceholder: string;
|
|
740
|
-
submit: string;
|
|
741
|
-
skip: string;
|
|
742
|
-
failed: string;
|
|
743
|
-
cleared: string;
|
|
744
|
-
};
|
|
745
|
-
};
|
|
746
|
-
aiArtifacts: {
|
|
747
|
-
copy: string;
|
|
748
|
-
download: string;
|
|
749
|
-
fullscreen: string;
|
|
750
|
-
close: string;
|
|
751
|
-
};
|
|
752
|
-
chat: {
|
|
753
|
-
fileTag: string;
|
|
754
|
-
fileImageTag: string;
|
|
755
|
-
filesSystemPrompt: string;
|
|
756
|
-
toolDuration: string;
|
|
757
|
-
continuePrompt: string;
|
|
758
|
-
};
|
|
759
|
-
errors: {
|
|
760
|
-
requestFailed: string;
|
|
761
|
-
sessionIdMissing: string;
|
|
762
|
-
noBody: string;
|
|
763
|
-
generateFailed: string;
|
|
764
|
-
recordUnsupported: string;
|
|
765
|
-
speechError: string;
|
|
766
|
-
attachmentRejected: string;
|
|
767
|
-
};
|
|
768
|
-
};
|
|
769
|
-
readonly vi: {
|
|
770
|
-
common: {
|
|
771
|
-
copy: string;
|
|
772
|
-
delete: string;
|
|
773
|
-
confirm: string;
|
|
774
|
-
cancel: string;
|
|
775
|
-
retry: string;
|
|
776
|
-
close: string;
|
|
777
|
-
preview: string;
|
|
778
|
-
clear: string;
|
|
779
|
-
stop: string;
|
|
780
|
-
send: string;
|
|
781
|
-
download: string;
|
|
782
|
-
fullscreen: string;
|
|
783
|
-
collapse: string;
|
|
784
|
-
expand: string;
|
|
785
|
-
copied: string;
|
|
786
|
-
};
|
|
787
|
-
thinking: {
|
|
788
|
-
start: string;
|
|
789
|
-
thinking: string;
|
|
790
|
-
end: string;
|
|
791
|
-
interrupted: string;
|
|
792
|
-
error: string;
|
|
793
|
-
endWithTools: string;
|
|
794
|
-
interruptedWithTools: string;
|
|
795
|
-
thinkingItem: string;
|
|
796
|
-
thoughtDoneItem: string;
|
|
797
|
-
};
|
|
798
|
-
welcome: {
|
|
799
|
-
greetingPrefix: string;
|
|
800
|
-
greetingName: string;
|
|
801
|
-
description: string;
|
|
802
|
-
refreshSuggestions: string;
|
|
803
|
-
};
|
|
804
|
-
sender: {
|
|
805
|
-
clear: string;
|
|
806
|
-
stop: string;
|
|
807
|
-
send: string;
|
|
808
|
-
speech: string;
|
|
809
|
-
recordCancel: string;
|
|
810
|
-
recordConfirm: string;
|
|
811
|
-
micUnavailable: string;
|
|
812
|
-
inputPlaceholder: string;
|
|
813
|
-
};
|
|
814
|
-
editorSender: {
|
|
815
|
-
clear: string;
|
|
816
|
-
stop: string;
|
|
817
|
-
send: string;
|
|
818
|
-
inputPlaceholder: string;
|
|
819
|
-
selectTagTitle: string;
|
|
820
|
-
loading: string;
|
|
821
|
-
tagTip: string;
|
|
822
|
-
};
|
|
823
|
-
attachments: {
|
|
824
|
-
add: string;
|
|
825
|
-
retry: string;
|
|
826
|
-
uploading: string;
|
|
827
|
-
};
|
|
828
|
-
filesCard: {
|
|
829
|
-
remove: string;
|
|
830
|
-
download: string;
|
|
831
|
-
};
|
|
832
|
-
conversations: {
|
|
833
|
-
menuLabel: string;
|
|
834
|
-
rename: string;
|
|
835
|
-
delete: string;
|
|
836
|
-
renameTitle: string;
|
|
837
|
-
renamePrompt: string;
|
|
838
|
-
renamePlaceholder: string;
|
|
839
|
-
deleteTitle: string;
|
|
840
|
-
deleteConfirm: string;
|
|
841
|
-
};
|
|
842
|
-
sessionSidebar: {
|
|
843
|
-
newChat: string;
|
|
844
|
-
searchPlaceholder: string;
|
|
845
|
-
collapse: string;
|
|
846
|
-
expand: string;
|
|
847
|
-
activeTab: string;
|
|
848
|
-
archivedTab: string;
|
|
849
|
-
today: string;
|
|
850
|
-
earlier: string;
|
|
851
|
-
archived: string;
|
|
852
|
-
restore: string;
|
|
853
|
-
archive: string;
|
|
854
|
-
renamed: string;
|
|
855
|
-
deleted: string;
|
|
856
|
-
archivedDone: string;
|
|
857
|
-
restored: string;
|
|
858
|
-
operationFailed: string;
|
|
859
|
-
listLoading: string;
|
|
860
|
-
};
|
|
861
|
-
aiChatPanel: {
|
|
862
|
-
loadEarlier: string;
|
|
863
|
-
createFailed: string;
|
|
864
|
-
generateFailed: string;
|
|
865
|
-
close: string;
|
|
866
|
-
floatMode: string;
|
|
867
|
-
drawerMode: string;
|
|
868
|
-
maximize: string;
|
|
869
|
-
restore: string;
|
|
870
|
-
history: string;
|
|
871
|
-
historyEmpty: string;
|
|
872
|
-
back: string;
|
|
873
|
-
launcher: string;
|
|
874
|
-
};
|
|
875
|
-
historyMapper: {
|
|
876
|
-
回复生成中断: string;
|
|
877
|
-
回复失败: string;
|
|
878
|
-
回复已中断: string;
|
|
879
|
-
'\u56DE\u590D\u5DF2\u4E2D\u65AD\uFF0C\u4EE5\u4E0A\u4E3A\u5DF2\u751F\u6210\u90E8\u5206': string;
|
|
880
|
-
'\u7528\u65F6 {s}': string;
|
|
881
|
-
已归档: string;
|
|
882
|
-
};
|
|
883
|
-
scroll: {
|
|
884
|
-
toBottom: string;
|
|
885
|
-
};
|
|
886
|
-
aiChat: {
|
|
887
|
-
modelPlaceholder: string;
|
|
888
|
-
adapterMissing: string;
|
|
889
|
-
generateFailed: string;
|
|
890
|
-
exportUser: string;
|
|
891
|
-
exportAssistant: string;
|
|
892
|
-
};
|
|
893
|
-
aiMessage: {
|
|
894
|
-
copy: string;
|
|
895
|
-
regenerate: string;
|
|
896
|
-
prevBranch: string;
|
|
897
|
-
nextBranch: string;
|
|
898
|
-
defaultUserName: string;
|
|
899
|
-
defaultAssistantName: string;
|
|
900
|
-
querying: string;
|
|
901
|
-
queried: string;
|
|
902
|
-
generateFailed: string;
|
|
903
|
-
followups: string;
|
|
904
|
-
followupsTitle: string;
|
|
905
|
-
loadingPhrases: string[];
|
|
906
|
-
feedback: {
|
|
907
|
-
like: string;
|
|
908
|
-
dislike: string;
|
|
909
|
-
dislikeTitle: string;
|
|
910
|
-
dislikePlaceholder: string;
|
|
911
|
-
submit: string;
|
|
912
|
-
skip: string;
|
|
913
|
-
failed: string;
|
|
914
|
-
cleared: string;
|
|
915
|
-
};
|
|
916
|
-
};
|
|
917
|
-
aiArtifacts: {
|
|
918
|
-
copy: string;
|
|
919
|
-
download: string;
|
|
920
|
-
fullscreen: string;
|
|
921
|
-
close: string;
|
|
922
|
-
};
|
|
923
|
-
chat: {
|
|
924
|
-
fileTag: string;
|
|
925
|
-
fileImageTag: string;
|
|
926
|
-
filesSystemPrompt: string;
|
|
927
|
-
toolDuration: string;
|
|
928
|
-
continuePrompt: string;
|
|
929
|
-
};
|
|
930
|
-
errors: {
|
|
931
|
-
requestFailed: string;
|
|
932
|
-
sessionIdMissing: string;
|
|
933
|
-
noBody: string;
|
|
934
|
-
generateFailed: string;
|
|
935
|
-
recordUnsupported: string;
|
|
936
|
-
speechError: string;
|
|
937
|
-
attachmentRejected: string;
|
|
938
|
-
};
|
|
939
|
-
};
|
|
940
|
-
readonly 'zh-HK': {
|
|
941
|
-
common: {
|
|
942
|
-
copy: string;
|
|
943
|
-
delete: string;
|
|
944
|
-
confirm: string;
|
|
945
|
-
cancel: string;
|
|
946
|
-
retry: string;
|
|
947
|
-
close: string;
|
|
948
|
-
preview: string;
|
|
949
|
-
clear: string;
|
|
950
|
-
stop: string;
|
|
951
|
-
send: string;
|
|
952
|
-
download: string;
|
|
953
|
-
fullscreen: string;
|
|
954
|
-
collapse: string;
|
|
955
|
-
expand: string;
|
|
956
|
-
copied: string;
|
|
957
|
-
};
|
|
958
|
-
thinking: {
|
|
959
|
-
start: string;
|
|
960
|
-
thinking: string;
|
|
961
|
-
end: string;
|
|
962
|
-
interrupted: string;
|
|
963
|
-
error: string;
|
|
964
|
-
endWithTools: string;
|
|
965
|
-
interruptedWithTools: string;
|
|
966
|
-
thinkingItem: string;
|
|
967
|
-
thoughtDoneItem: string;
|
|
968
|
-
};
|
|
969
|
-
welcome: {
|
|
970
|
-
greetingPrefix: string;
|
|
971
|
-
greetingName: string;
|
|
972
|
-
description: string;
|
|
973
|
-
refreshSuggestions: string;
|
|
974
|
-
};
|
|
975
|
-
sender: {
|
|
976
|
-
clear: string;
|
|
977
|
-
stop: string;
|
|
978
|
-
send: string;
|
|
979
|
-
speech: string;
|
|
980
|
-
recordCancel: string;
|
|
981
|
-
recordConfirm: string;
|
|
982
|
-
micUnavailable: string;
|
|
983
|
-
inputPlaceholder: string;
|
|
984
|
-
};
|
|
985
|
-
editorSender: {
|
|
986
|
-
clear: string;
|
|
987
|
-
stop: string;
|
|
988
|
-
send: string;
|
|
989
|
-
inputPlaceholder: string;
|
|
990
|
-
selectTagTitle: string;
|
|
991
|
-
loading: string;
|
|
992
|
-
tagTip: string;
|
|
993
|
-
};
|
|
994
|
-
attachments: {
|
|
995
|
-
add: string;
|
|
996
|
-
retry: string;
|
|
997
|
-
uploading: string;
|
|
998
|
-
};
|
|
999
|
-
filesCard: {
|
|
1000
|
-
remove: string;
|
|
1001
|
-
download: string;
|
|
1002
|
-
};
|
|
1003
|
-
conversations: {
|
|
1004
|
-
menuLabel: string;
|
|
1005
|
-
rename: string;
|
|
1006
|
-
delete: string;
|
|
1007
|
-
renameTitle: string;
|
|
1008
|
-
renamePrompt: string;
|
|
1009
|
-
renamePlaceholder: string;
|
|
1010
|
-
deleteTitle: string;
|
|
1011
|
-
deleteConfirm: string;
|
|
1012
|
-
};
|
|
1013
|
-
sessionSidebar: {
|
|
1014
|
-
newChat: string;
|
|
1015
|
-
searchPlaceholder: string;
|
|
1016
|
-
collapse: string;
|
|
1017
|
-
expand: string;
|
|
1018
|
-
activeTab: string;
|
|
1019
|
-
archivedTab: string;
|
|
1020
|
-
today: string;
|
|
1021
|
-
earlier: string;
|
|
1022
|
-
archived: string;
|
|
1023
|
-
restore: string;
|
|
1024
|
-
archive: string;
|
|
1025
|
-
renamed: string;
|
|
1026
|
-
deleted: string;
|
|
1027
|
-
archivedDone: string;
|
|
1028
|
-
restored: string;
|
|
1029
|
-
operationFailed: string;
|
|
1030
|
-
listLoading: string;
|
|
1031
|
-
};
|
|
1032
|
-
aiChatPanel: {
|
|
1033
|
-
loadEarlier: string;
|
|
1034
|
-
createFailed: string;
|
|
1035
|
-
generateFailed: string;
|
|
1036
|
-
close: string;
|
|
1037
|
-
floatMode: string;
|
|
1038
|
-
drawerMode: string;
|
|
1039
|
-
maximize: string;
|
|
1040
|
-
restore: string;
|
|
1041
|
-
history: string;
|
|
1042
|
-
historyEmpty: string;
|
|
1043
|
-
back: string;
|
|
1044
|
-
launcher: string;
|
|
1045
|
-
};
|
|
1046
|
-
historyMapper: {
|
|
1047
|
-
回复生成中断: string;
|
|
1048
|
-
回复失败: string;
|
|
1049
|
-
回复已中断: string;
|
|
1050
|
-
'\u56DE\u590D\u5DF2\u4E2D\u65AD\uFF0C\u4EE5\u4E0A\u4E3A\u5DF2\u751F\u6210\u90E8\u5206': string;
|
|
1051
|
-
'\u7528\u65F6 {s}': string;
|
|
1052
|
-
已归档: string;
|
|
1053
|
-
};
|
|
1054
|
-
scroll: {
|
|
1055
|
-
toBottom: string;
|
|
1056
|
-
};
|
|
1057
|
-
aiChat: {
|
|
1058
|
-
modelPlaceholder: string;
|
|
1059
|
-
adapterMissing: string;
|
|
1060
|
-
generateFailed: string;
|
|
1061
|
-
exportUser: string;
|
|
1062
|
-
exportAssistant: string;
|
|
1063
|
-
};
|
|
1064
|
-
aiMessage: {
|
|
1065
|
-
copy: string;
|
|
1066
|
-
regenerate: string;
|
|
1067
|
-
prevBranch: string;
|
|
1068
|
-
nextBranch: string;
|
|
1069
|
-
defaultUserName: string;
|
|
1070
|
-
defaultAssistantName: string;
|
|
1071
|
-
querying: string;
|
|
1072
|
-
queried: string;
|
|
1073
|
-
generateFailed: string;
|
|
1074
|
-
followups: string;
|
|
1075
|
-
followupsTitle: string;
|
|
1076
|
-
loadingPhrases: string[];
|
|
1077
|
-
feedback: {
|
|
1078
|
-
like: string;
|
|
1079
|
-
dislike: string;
|
|
1080
|
-
dislikeTitle: string;
|
|
1081
|
-
dislikePlaceholder: string;
|
|
1082
|
-
submit: string;
|
|
1083
|
-
skip: string;
|
|
1084
|
-
failed: string;
|
|
1085
|
-
cleared: string;
|
|
1086
|
-
};
|
|
1087
|
-
};
|
|
1088
|
-
aiArtifacts: {
|
|
1089
|
-
copy: string;
|
|
1090
|
-
download: string;
|
|
1091
|
-
fullscreen: string;
|
|
1092
|
-
close: string;
|
|
1093
|
-
};
|
|
1094
|
-
chat: {
|
|
1095
|
-
fileTag: string;
|
|
1096
|
-
fileImageTag: string;
|
|
1097
|
-
filesSystemPrompt: string;
|
|
1098
|
-
toolDuration: string;
|
|
1099
|
-
continuePrompt: string;
|
|
1100
|
-
};
|
|
1101
|
-
errors: {
|
|
1102
|
-
requestFailed: string;
|
|
1103
|
-
sessionIdMissing: string;
|
|
1104
|
-
noBody: string;
|
|
1105
|
-
generateFailed: string;
|
|
1106
|
-
recordUnsupported: string;
|
|
1107
|
-
speechError: string;
|
|
1108
|
-
attachmentRejected: string;
|
|
1109
|
-
};
|
|
1110
|
-
};
|
|
1111
|
-
};
|
|
1112
|
-
/** 内置语言名(字符串形态 locale/configureLocale 的合法取值) */
|
|
1113
|
-
type LocaleCode = keyof typeof PACKS;
|
|
1114
|
-
/**
|
|
1115
|
-
* 全局语言设置。
|
|
1116
|
-
* 字符串选内置包(未知回落 zh-CN);对象视为**完整语言包**(消费方自建语言的主入口,
|
|
1117
|
-
* 与组件 prop 的"部分覆盖"语义有意不同:全局是定基准,prop 是在基准上微调)。
|
|
1118
|
-
*/
|
|
1119
|
-
declare function configureLocale(locale: LocaleCode | LocaleMessages): void;
|
|
1120
|
-
|
|
1121
|
-
type __VLS_Props$n = {
|
|
27
|
+
type __VLS_Props$p = {
|
|
1122
28
|
content: string;
|
|
1123
29
|
mdPlugins?: CreateMarkdownOptions['mdPlugins'];
|
|
1124
30
|
highlight?: (str: string, lang: string) => string;
|
|
@@ -1132,14 +38,14 @@ type __VLS_Props$n = {
|
|
|
1132
38
|
/** 语言包:'zh-CN'/'en'/'ko'/'vi'/'zh-HK' 整包或部分文案对象(优先于祖先注入与全局设置) */
|
|
1133
39
|
locale?: LocaleInput;
|
|
1134
40
|
};
|
|
1135
|
-
declare const __VLS_export$
|
|
41
|
+
declare const __VLS_export$p: vue.DefineComponent<__VLS_Props$p, {
|
|
1136
42
|
getHtml: () => string;
|
|
1137
|
-
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
43
|
+
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$p> & Readonly<{}>, {
|
|
1138
44
|
tableToolbar: boolean;
|
|
1139
45
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1140
|
-
declare const _default$
|
|
46
|
+
declare const _default$p: typeof __VLS_export$p;
|
|
1141
47
|
|
|
1142
|
-
type __VLS_Props$
|
|
48
|
+
type __VLS_Props$o = {
|
|
1143
49
|
content: string;
|
|
1144
50
|
isMarkdown?: boolean;
|
|
1145
51
|
isFog?: boolean | {
|
|
@@ -1162,7 +68,7 @@ declare function interrupt$1(): void;
|
|
|
1162
68
|
declare function continueTy$1(): void;
|
|
1163
69
|
declare function restart$1(): void;
|
|
1164
70
|
declare function destroy$1(): void;
|
|
1165
|
-
declare const __VLS_export$
|
|
71
|
+
declare const __VLS_export$o: vue.DefineComponent<__VLS_Props$o, {
|
|
1166
72
|
interrupt: typeof interrupt$1;
|
|
1167
73
|
continue: typeof continueTy$1;
|
|
1168
74
|
restart: typeof restart$1;
|
|
@@ -1174,7 +80,7 @@ declare const __VLS_export$m: vue.DefineComponent<__VLS_Props$m, {
|
|
|
1174
80
|
start: () => any;
|
|
1175
81
|
finish: () => any;
|
|
1176
82
|
writing: () => any;
|
|
1177
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
83
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$o> & Readonly<{
|
|
1178
84
|
onStart?: (() => any) | undefined;
|
|
1179
85
|
onFinish?: (() => any) | undefined;
|
|
1180
86
|
onWriting?: (() => any) | undefined;
|
|
@@ -1190,7 +96,7 @@ declare const __VLS_export$m: vue.DefineComponent<__VLS_Props$m, {
|
|
|
1190
96
|
suffix?: string;
|
|
1191
97
|
};
|
|
1192
98
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1193
|
-
declare const _default$
|
|
99
|
+
declare const _default$o: typeof __VLS_export$o;
|
|
1194
100
|
|
|
1195
101
|
/** Typewriter 对外实例形态(defineExpose 经 proxyRefs 已自动解包,宽松兼容 Ref | 值) */
|
|
1196
102
|
interface TypewriterExposed {
|
|
@@ -1207,7 +113,7 @@ type TypingConfig = {
|
|
|
1207
113
|
interval?: number;
|
|
1208
114
|
suffix?: string;
|
|
1209
115
|
};
|
|
1210
|
-
type __VLS_Props$
|
|
116
|
+
type __VLS_Props$n = {
|
|
1211
117
|
/** 气泡内容 */
|
|
1212
118
|
content?: string;
|
|
1213
119
|
/** 对齐:start 靠左 / end 靠右(end 时头像随 row-reverse 翻转到右侧) */
|
|
@@ -1246,13 +152,13 @@ declare function interrupt(): void;
|
|
|
1246
152
|
declare function continueTy(): void;
|
|
1247
153
|
declare function restart(): void;
|
|
1248
154
|
declare function destroy(): void;
|
|
1249
|
-
declare var __VLS_1$
|
|
155
|
+
declare var __VLS_1$8: {};
|
|
1250
156
|
declare var __VLS_10$2: {};
|
|
1251
157
|
declare var __VLS_12$1: {};
|
|
1252
158
|
declare var __VLS_14$1: {};
|
|
1253
|
-
declare var __VLS_32
|
|
1254
|
-
type __VLS_Slots$
|
|
1255
|
-
avatar?: (props: typeof __VLS_1$
|
|
159
|
+
declare var __VLS_32: {};
|
|
160
|
+
type __VLS_Slots$j = {} & {
|
|
161
|
+
avatar?: (props: typeof __VLS_1$8) => any;
|
|
1256
162
|
} & {
|
|
1257
163
|
header?: (props: typeof __VLS_10$2) => any;
|
|
1258
164
|
} & {
|
|
@@ -1260,9 +166,9 @@ type __VLS_Slots$i = {} & {
|
|
|
1260
166
|
} & {
|
|
1261
167
|
content?: (props: typeof __VLS_14$1) => any;
|
|
1262
168
|
} & {
|
|
1263
|
-
footer?: (props: typeof __VLS_32
|
|
169
|
+
footer?: (props: typeof __VLS_32) => any;
|
|
1264
170
|
};
|
|
1265
|
-
declare const __VLS_base$
|
|
171
|
+
declare const __VLS_base$j: vue.DefineComponent<__VLS_Props$n, {
|
|
1266
172
|
interrupt: typeof interrupt;
|
|
1267
173
|
continue: typeof continueTy;
|
|
1268
174
|
restart: typeof restart;
|
|
@@ -1292,13 +198,12 @@ declare const __VLS_base$i: vue.DefineComponent<__VLS_Props$l, {
|
|
|
1292
198
|
finish: () => any;
|
|
1293
199
|
writing: () => any;
|
|
1294
200
|
"avatar-error": (event: Event) => any;
|
|
1295
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
201
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$n> & Readonly<{
|
|
1296
202
|
onStart?: (() => any) | undefined;
|
|
1297
203
|
onFinish?: (() => any) | undefined;
|
|
1298
204
|
onWriting?: (() => any) | undefined;
|
|
1299
205
|
"onAvatar-error"?: ((event: Event) => any) | undefined;
|
|
1300
206
|
}>, {
|
|
1301
|
-
loading: boolean;
|
|
1302
207
|
content: string;
|
|
1303
208
|
placement: "start" | "end";
|
|
1304
209
|
isMarkdown: boolean;
|
|
@@ -1308,6 +213,7 @@ declare const __VLS_base$i: vue.DefineComponent<__VLS_Props$l, {
|
|
|
1308
213
|
};
|
|
1309
214
|
typing: boolean | TypingConfig;
|
|
1310
215
|
shape: "round" | "corner";
|
|
216
|
+
loading: boolean;
|
|
1311
217
|
variant: "filled" | "borderless" | "outlined" | "shadow";
|
|
1312
218
|
avatar: string;
|
|
1313
219
|
avatarSize: number | "" | "default" | "small" | "large";
|
|
@@ -1319,10 +225,10 @@ declare const __VLS_base$i: vue.DefineComponent<__VLS_Props$l, {
|
|
|
1319
225
|
noPadding: boolean;
|
|
1320
226
|
noStyle: boolean;
|
|
1321
227
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1322
|
-
declare const __VLS_export$
|
|
1323
|
-
declare const _default$
|
|
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;
|
|
1324
230
|
|
|
1325
|
-
type __VLS_WithSlots$
|
|
231
|
+
type __VLS_WithSlots$j<T, S> = T & {
|
|
1326
232
|
new (): {
|
|
1327
233
|
$slots: S;
|
|
1328
234
|
};
|
|
@@ -1333,7 +239,7 @@ interface BubbleListItemProps {
|
|
|
1333
239
|
key: string | number;
|
|
1334
240
|
[prop: string]: unknown;
|
|
1335
241
|
}
|
|
1336
|
-
type __VLS_Props$
|
|
242
|
+
type __VLS_Props$m = {
|
|
1337
243
|
/** 气泡列表 */
|
|
1338
244
|
list: BubbleListItemProps[];
|
|
1339
245
|
/** 滚动容器最大高度(如 '350px'/'60vh') */
|
|
@@ -1377,7 +283,7 @@ declare var __VLS_13$1: {
|
|
|
1377
283
|
item: BubbleListItemProps;
|
|
1378
284
|
index: number;
|
|
1379
285
|
};
|
|
1380
|
-
declare var __VLS_16$
|
|
286
|
+
declare var __VLS_16$2: {
|
|
1381
287
|
item: BubbleListItemProps;
|
|
1382
288
|
index: number;
|
|
1383
289
|
};
|
|
@@ -1385,28 +291,28 @@ declare var __VLS_19$3: {
|
|
|
1385
291
|
item: BubbleListItemProps;
|
|
1386
292
|
index: number;
|
|
1387
293
|
};
|
|
1388
|
-
declare var __VLS_22
|
|
294
|
+
declare var __VLS_22: {
|
|
1389
295
|
item: BubbleListItemProps;
|
|
1390
296
|
index: number;
|
|
1391
297
|
};
|
|
1392
|
-
type __VLS_Slots$
|
|
298
|
+
type __VLS_Slots$i = {} & {
|
|
1393
299
|
avatar?: (props: typeof __VLS_10$1) => any;
|
|
1394
300
|
} & {
|
|
1395
301
|
header?: (props: typeof __VLS_13$1) => any;
|
|
1396
302
|
} & {
|
|
1397
|
-
content?: (props: typeof __VLS_16$
|
|
303
|
+
content?: (props: typeof __VLS_16$2) => any;
|
|
1398
304
|
} & {
|
|
1399
305
|
loading?: (props: typeof __VLS_19$3) => any;
|
|
1400
306
|
} & {
|
|
1401
|
-
footer?: (props: typeof __VLS_22
|
|
307
|
+
footer?: (props: typeof __VLS_22) => any;
|
|
1402
308
|
};
|
|
1403
|
-
declare const __VLS_base$
|
|
309
|
+
declare const __VLS_base$i: vue.DefineComponent<__VLS_Props$m, {
|
|
1404
310
|
scrollToTop: typeof scrollToTop$1;
|
|
1405
311
|
scrollToBottom: typeof scrollToBottom$1;
|
|
1406
312
|
scrollToBubble: typeof scrollToBubble;
|
|
1407
313
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
1408
314
|
complete: (instance: unknown, index: number) => any;
|
|
1409
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
315
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$m> & Readonly<{
|
|
1410
316
|
onComplete?: ((instance: unknown, index: number) => any) | undefined;
|
|
1411
317
|
}>, {
|
|
1412
318
|
locale: LocaleInput;
|
|
@@ -1424,16 +330,16 @@ declare const __VLS_base$h: vue.DefineComponent<__VLS_Props$k, {
|
|
|
1424
330
|
btnIconSize: number;
|
|
1425
331
|
triggerIndices: "only-last" | "all" | number[];
|
|
1426
332
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1427
|
-
declare const __VLS_export$
|
|
1428
|
-
declare const _default$
|
|
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;
|
|
1429
335
|
|
|
1430
|
-
type __VLS_WithSlots$
|
|
336
|
+
type __VLS_WithSlots$i<T, S> = T & {
|
|
1431
337
|
new (): {
|
|
1432
338
|
$slots: S;
|
|
1433
339
|
};
|
|
1434
340
|
};
|
|
1435
341
|
|
|
1436
|
-
type __VLS_Props$
|
|
342
|
+
type __VLS_Props$l = {
|
|
1437
343
|
/** 输入值(v-model) */
|
|
1438
344
|
modelValue?: string;
|
|
1439
345
|
placeholder?: string;
|
|
@@ -1478,6 +384,12 @@ type __VLS_Props$j = {
|
|
|
1478
384
|
allowSpeech?: boolean;
|
|
1479
385
|
/** 允许空内容提交(附件场景:只发文件不输文字时提交按钮保持可点) */
|
|
1480
386
|
allowEmptySubmit?: boolean;
|
|
387
|
+
/**
|
|
388
|
+
* 允许拖拽文件到输入区:dragover 悬停染色提示,drop 上抛 @paste-file
|
|
389
|
+
* (与粘贴共用事件,去重/白名单/数量上限校验均由宿主/AiChat 层在统一
|
|
390
|
+
* 入列路径完成)。缺省 false 不启用
|
|
391
|
+
*/
|
|
392
|
+
allowDrop?: boolean;
|
|
1481
393
|
/** 语言包:'zh-CN'/'en'/'ko'/'vi'/'zh-HK' 整包或部分文案对象(优先于祖先注入与全局设置) */
|
|
1482
394
|
locale?: LocaleInput;
|
|
1483
395
|
};
|
|
@@ -1489,31 +401,31 @@ declare function focus$1(pos?: 'all' | 'start' | 'end'): void;
|
|
|
1489
401
|
declare function blur$2(): void;
|
|
1490
402
|
declare function openHeader$2(): void;
|
|
1491
403
|
declare function closeHeader$2(): void;
|
|
1492
|
-
declare var __VLS_1$
|
|
1493
|
-
declare var __VLS_3$
|
|
404
|
+
declare var __VLS_1$7: {};
|
|
405
|
+
declare var __VLS_3$1: {};
|
|
1494
406
|
declare var __VLS_5: {};
|
|
1495
407
|
declare var __VLS_52: {
|
|
1496
408
|
keyword: string;
|
|
1497
409
|
};
|
|
1498
|
-
declare var __VLS_54: {};
|
|
1499
|
-
declare var __VLS_56
|
|
1500
|
-
declare var __VLS_134: {};
|
|
1501
|
-
type __VLS_Slots$
|
|
1502
|
-
header?: (props: typeof __VLS_1$
|
|
410
|
+
declare var __VLS_54$3: {};
|
|
411
|
+
declare var __VLS_56: {};
|
|
412
|
+
declare var __VLS_134$1: {};
|
|
413
|
+
type __VLS_Slots$h = {} & {
|
|
414
|
+
header?: (props: typeof __VLS_1$7) => any;
|
|
1503
415
|
} & {
|
|
1504
|
-
'body-top'?: (props: typeof __VLS_3$
|
|
416
|
+
'body-top'?: (props: typeof __VLS_3$1) => any;
|
|
1505
417
|
} & {
|
|
1506
418
|
prefix?: (props: typeof __VLS_5) => any;
|
|
1507
419
|
} & {
|
|
1508
420
|
trigger?: (props: typeof __VLS_52) => any;
|
|
1509
421
|
} & {
|
|
1510
|
-
'action-list'?: (props: typeof __VLS_54) => any;
|
|
422
|
+
'action-list'?: (props: typeof __VLS_54$3) => any;
|
|
1511
423
|
} & {
|
|
1512
|
-
'action-left'?: (props: typeof __VLS_56
|
|
424
|
+
'action-left'?: (props: typeof __VLS_56) => any;
|
|
1513
425
|
} & {
|
|
1514
|
-
footer?: (props: typeof __VLS_134) => any;
|
|
426
|
+
footer?: (props: typeof __VLS_134$1) => any;
|
|
1515
427
|
};
|
|
1516
|
-
declare const __VLS_base$
|
|
428
|
+
declare const __VLS_base$h: vue.DefineComponent<__VLS_Props$l, {
|
|
1517
429
|
submit: typeof submit$1;
|
|
1518
430
|
cancel: typeof cancel$1;
|
|
1519
431
|
clear: typeof clear$2;
|
|
@@ -1522,28 +434,28 @@ declare const __VLS_base$g: vue.DefineComponent<__VLS_Props$j, {
|
|
|
1522
434
|
openHeader: typeof openHeader$2;
|
|
1523
435
|
closeHeader: typeof closeHeader$2;
|
|
1524
436
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
1525
|
-
cancel: () => any;
|
|
1526
437
|
submit: (value: string) => any;
|
|
1527
438
|
trigger: (keyword: string, visible: boolean) => any;
|
|
1528
439
|
"update:modelValue": (value: string) => any;
|
|
440
|
+
cancel: () => any;
|
|
1529
441
|
change: (value: string) => any;
|
|
1530
442
|
"recording-change": (recording: boolean) => any;
|
|
1531
443
|
"paste-file": (file: File) => any;
|
|
1532
444
|
"update:triggerPopoverVisible": (value: boolean) => any;
|
|
1533
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
1534
|
-
onCancel?: (() => any) | undefined;
|
|
445
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$l> & Readonly<{
|
|
1535
446
|
onSubmit?: ((value: string) => any) | undefined;
|
|
1536
447
|
onTrigger?: ((keyword: string, visible: boolean) => any) | undefined;
|
|
1537
448
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
449
|
+
onCancel?: (() => any) | undefined;
|
|
1538
450
|
onChange?: ((value: string) => any) | undefined;
|
|
1539
451
|
"onRecording-change"?: ((recording: boolean) => any) | undefined;
|
|
1540
452
|
"onPaste-file"?: ((file: File) => any) | undefined;
|
|
1541
453
|
"onUpdate:triggerPopoverVisible"?: ((value: boolean) => any) | undefined;
|
|
1542
454
|
}>, {
|
|
1543
|
-
loading: boolean;
|
|
1544
455
|
disabled: boolean;
|
|
1545
456
|
shadow: boolean;
|
|
1546
457
|
round: boolean;
|
|
458
|
+
loading: boolean;
|
|
1547
459
|
variant: "default" | "updown";
|
|
1548
460
|
modelValue: string;
|
|
1549
461
|
placeholder: string;
|
|
@@ -1565,11 +477,12 @@ declare const __VLS_base$g: vue.DefineComponent<__VLS_Props$j, {
|
|
|
1565
477
|
triggerPopoverPlacement: InstanceType<typeof ElPopover>["placement"];
|
|
1566
478
|
allowSpeech: boolean;
|
|
1567
479
|
allowEmptySubmit: boolean;
|
|
480
|
+
allowDrop: boolean;
|
|
1568
481
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1569
|
-
declare const __VLS_export$
|
|
1570
|
-
declare const _default$
|
|
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;
|
|
1571
484
|
|
|
1572
|
-
type __VLS_WithSlots$
|
|
485
|
+
type __VLS_WithSlots$h<T, S> = T & {
|
|
1573
486
|
new (): {
|
|
1574
487
|
$slots: S;
|
|
1575
488
|
};
|
|
@@ -1592,7 +505,7 @@ interface MentionCustomTrigger {
|
|
|
1592
505
|
pinyin?: string;
|
|
1593
506
|
}>;
|
|
1594
507
|
}
|
|
1595
|
-
type __VLS_Props$
|
|
508
|
+
type __VLS_Props$k = {
|
|
1596
509
|
/** 输入值(v-model) */
|
|
1597
510
|
modelValue?: string;
|
|
1598
511
|
/** @ 触发的候选用户列表 */
|
|
@@ -1616,12 +529,12 @@ declare function closeHeader$1(): void;
|
|
|
1616
529
|
declare function setUserTag$1(userId: string): void;
|
|
1617
530
|
/** 程序化插入自定义触发标签(光标处) */
|
|
1618
531
|
declare function setCustomTag$1(prefix: string, id: string): void;
|
|
1619
|
-
declare var __VLS_20
|
|
1620
|
-
declare var __VLS_21$
|
|
1621
|
-
type __VLS_Slots$
|
|
1622
|
-
[K in NonNullable<typeof __VLS_20
|
|
532
|
+
declare var __VLS_20: string;
|
|
533
|
+
declare var __VLS_21$4: any;
|
|
534
|
+
type __VLS_Slots$g = {} & {
|
|
535
|
+
[K in NonNullable<typeof __VLS_20>]?: (props: typeof __VLS_21$4) => any;
|
|
1623
536
|
};
|
|
1624
|
-
declare const __VLS_base$
|
|
537
|
+
declare const __VLS_base$g: vue.DefineComponent<__VLS_Props$k, {
|
|
1625
538
|
submit: typeof submit;
|
|
1626
539
|
cancel: typeof cancel;
|
|
1627
540
|
clear: typeof clear$1;
|
|
@@ -1632,20 +545,20 @@ declare const __VLS_base$f: vue.DefineComponent<__VLS_Props$i, {
|
|
|
1632
545
|
setUserTag: typeof setUserTag$1;
|
|
1633
546
|
setCustomTag: typeof setCustomTag$1;
|
|
1634
547
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
1635
|
-
cancel: () => any;
|
|
1636
548
|
submit: (value: string) => any;
|
|
1637
549
|
trigger: (keyword: string, visible: boolean) => any;
|
|
1638
550
|
"update:modelValue": (value: string) => any;
|
|
551
|
+
cancel: () => any;
|
|
1639
552
|
change: (value: string) => any;
|
|
1640
553
|
"recording-change": (recording: boolean) => any;
|
|
1641
554
|
"paste-file": (file: File) => any;
|
|
1642
555
|
"update:triggerPopoverVisible": (value: boolean) => any;
|
|
1643
556
|
"show-at-dialog": (visible: boolean) => any;
|
|
1644
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
1645
|
-
onCancel?: (() => any) | undefined;
|
|
557
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$k> & Readonly<{
|
|
1646
558
|
onSubmit?: ((value: string) => any) | undefined;
|
|
1647
559
|
onTrigger?: ((keyword: string, visible: boolean) => any) | undefined;
|
|
1648
560
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
561
|
+
onCancel?: (() => any) | undefined;
|
|
1649
562
|
onChange?: ((value: string) => any) | undefined;
|
|
1650
563
|
"onRecording-change"?: ((recording: boolean) => any) | undefined;
|
|
1651
564
|
"onPaste-file"?: ((file: File) => any) | undefined;
|
|
@@ -1658,10 +571,10 @@ declare const __VLS_base$f: vue.DefineComponent<__VLS_Props$i, {
|
|
|
1658
571
|
customTrigger: MentionCustomTrigger[];
|
|
1659
572
|
asyncMatchFun: (search: string) => Promise<MentionUserInfo[]>;
|
|
1660
573
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1661
|
-
declare const __VLS_export$
|
|
1662
|
-
declare const _default$
|
|
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;
|
|
1663
576
|
|
|
1664
|
-
type __VLS_WithSlots$
|
|
577
|
+
type __VLS_WithSlots$g<T, S> = T & {
|
|
1665
578
|
new (): {
|
|
1666
579
|
$slots: S;
|
|
1667
580
|
};
|
|
@@ -1754,7 +667,7 @@ type MixTag = {
|
|
|
1754
667
|
type: 'text';
|
|
1755
668
|
value: string;
|
|
1756
669
|
};
|
|
1757
|
-
type __VLS_Props$
|
|
670
|
+
type __VLS_Props$j = {
|
|
1758
671
|
placeholder?: string;
|
|
1759
672
|
/** 设备形态:仅影响样式(pc 默认 / h5 紧凑) */
|
|
1760
673
|
device?: 'pc' | 'h5';
|
|
@@ -1840,25 +753,25 @@ declare function chatState(): {
|
|
|
1840
753
|
};
|
|
1841
754
|
declare function openHeader(): void;
|
|
1842
755
|
declare function closeHeader(): void;
|
|
1843
|
-
declare var __VLS_1$
|
|
1844
|
-
declare var __VLS_3
|
|
756
|
+
declare var __VLS_1$6: {};
|
|
757
|
+
declare var __VLS_3: {};
|
|
1845
758
|
declare var __VLS_19$2: {
|
|
1846
759
|
nodeId: string;
|
|
1847
760
|
};
|
|
1848
|
-
declare var __VLS_21$
|
|
1849
|
-
declare var __VLS_80
|
|
1850
|
-
type __VLS_Slots$
|
|
1851
|
-
header?: (props: typeof __VLS_1$
|
|
761
|
+
declare var __VLS_21$3: {};
|
|
762
|
+
declare var __VLS_80: {};
|
|
763
|
+
type __VLS_Slots$f = {} & {
|
|
764
|
+
header?: (props: typeof __VLS_1$6) => any;
|
|
1852
765
|
} & {
|
|
1853
|
-
prefix?: (props: typeof __VLS_3
|
|
766
|
+
prefix?: (props: typeof __VLS_3) => any;
|
|
1854
767
|
} & {
|
|
1855
768
|
'tag-tip'?: (props: typeof __VLS_19$2) => any;
|
|
1856
769
|
} & {
|
|
1857
|
-
'action-list'?: (props: typeof __VLS_21$
|
|
770
|
+
'action-list'?: (props: typeof __VLS_21$3) => any;
|
|
1858
771
|
} & {
|
|
1859
|
-
footer?: (props: typeof __VLS_80
|
|
772
|
+
footer?: (props: typeof __VLS_80) => any;
|
|
1860
773
|
};
|
|
1861
|
-
declare const __VLS_base$
|
|
774
|
+
declare const __VLS_base$f: vue.DefineComponent<__VLS_Props$j, {
|
|
1862
775
|
getCurrentValue: typeof getCurrentValue;
|
|
1863
776
|
focusToStart: typeof focusToStart;
|
|
1864
777
|
focusToEnd: typeof placeCursorEnd;
|
|
@@ -1884,22 +797,22 @@ declare const __VLS_base$e: vue.DefineComponent<__VLS_Props$h, {
|
|
|
1884
797
|
opNode: typeof opNode;
|
|
1885
798
|
chatState: typeof chatState;
|
|
1886
799
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
1887
|
-
cancel: () => any;
|
|
1888
800
|
submit: (payload: SubmitResult) => any;
|
|
801
|
+
cancel: () => any;
|
|
1889
802
|
change: (payload: SubmitResult) => any;
|
|
1890
803
|
"show-at-dialog": (visible: boolean) => any;
|
|
1891
804
|
"show-select-dialog": (visible: boolean) => any;
|
|
1892
805
|
"show-tag-dialog": (visible: boolean) => any;
|
|
1893
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
1894
|
-
onCancel?: (() => any) | undefined;
|
|
806
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$j> & Readonly<{
|
|
1895
807
|
onSubmit?: ((payload: SubmitResult) => any) | undefined;
|
|
808
|
+
onCancel?: (() => any) | undefined;
|
|
1896
809
|
onChange?: ((payload: SubmitResult) => any) | undefined;
|
|
1897
810
|
"onShow-at-dialog"?: ((visible: boolean) => any) | undefined;
|
|
1898
811
|
"onShow-select-dialog"?: ((visible: boolean) => any) | undefined;
|
|
1899
812
|
"onShow-tag-dialog"?: ((visible: boolean) => any) | undefined;
|
|
1900
813
|
}>, {
|
|
1901
|
-
loading: boolean;
|
|
1902
814
|
disabled: boolean;
|
|
815
|
+
loading: boolean;
|
|
1903
816
|
variant: "default" | "updown";
|
|
1904
817
|
placeholder: string;
|
|
1905
818
|
submitType: "enter" | "shiftEnter";
|
|
@@ -1915,17 +828,17 @@ declare const __VLS_base$e: vue.DefineComponent<__VLS_Props$h, {
|
|
|
1915
828
|
headerAnimationTimer: number;
|
|
1916
829
|
customDialog: boolean;
|
|
1917
830
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1918
|
-
declare const __VLS_export$
|
|
1919
|
-
declare const _default$
|
|
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;
|
|
1920
833
|
|
|
1921
|
-
type __VLS_WithSlots$
|
|
834
|
+
type __VLS_WithSlots$f<T, S> = T & {
|
|
1922
835
|
new (): {
|
|
1923
836
|
$slots: S;
|
|
1924
837
|
};
|
|
1925
838
|
};
|
|
1926
839
|
|
|
1927
840
|
type ThinkingStatus = 'start' | 'thinking' | 'end' | 'interrupted' | 'error';
|
|
1928
|
-
type __VLS_Props$
|
|
841
|
+
type __VLS_Props$i = {
|
|
1929
842
|
/** 展开/收起(v-model) */
|
|
1930
843
|
modelValue?: boolean;
|
|
1931
844
|
/** 思考内容(#content 插槽常嵌 FvMarkdown/Typewriter 渲染思考流) */
|
|
@@ -1951,28 +864,28 @@ type __VLS_Props$g = {
|
|
|
1951
864
|
};
|
|
1952
865
|
/** 切换门控:start 起始态不可切换;thinking 中可展开查看思考流,end/interrupted/error 后可自由收起展开 */
|
|
1953
866
|
declare function toggle(): void;
|
|
1954
|
-
declare var __VLS_1$
|
|
1955
|
-
declare var __VLS_47
|
|
867
|
+
declare var __VLS_1$5: {};
|
|
868
|
+
declare var __VLS_47: {};
|
|
1956
869
|
declare var __VLS_49: {};
|
|
1957
|
-
declare var __VLS_62
|
|
1958
|
-
declare var __VLS_64: {};
|
|
1959
|
-
type __VLS_Slots$
|
|
1960
|
-
'status-icon'?: (props: typeof __VLS_1$
|
|
870
|
+
declare var __VLS_62: {};
|
|
871
|
+
declare var __VLS_64$1: {};
|
|
872
|
+
type __VLS_Slots$e = {} & {
|
|
873
|
+
'status-icon'?: (props: typeof __VLS_1$5) => any;
|
|
1961
874
|
} & {
|
|
1962
|
-
label?: (props: typeof __VLS_47
|
|
875
|
+
label?: (props: typeof __VLS_47) => any;
|
|
1963
876
|
} & {
|
|
1964
877
|
arrow?: (props: typeof __VLS_49) => any;
|
|
1965
878
|
} & {
|
|
1966
|
-
error?: (props: typeof __VLS_62
|
|
879
|
+
error?: (props: typeof __VLS_62) => any;
|
|
1967
880
|
} & {
|
|
1968
|
-
content?: (props: typeof __VLS_64) => any;
|
|
881
|
+
content?: (props: typeof __VLS_64$1) => any;
|
|
1969
882
|
};
|
|
1970
|
-
declare const __VLS_base$
|
|
883
|
+
declare const __VLS_base$e: vue.DefineComponent<__VLS_Props$i, {
|
|
1971
884
|
modelValue: vue.Ref<boolean, boolean>;
|
|
1972
885
|
toggle: typeof toggle;
|
|
1973
886
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
1974
887
|
"update:modelValue": (value: boolean) => any;
|
|
1975
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
888
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$i> & Readonly<{
|
|
1976
889
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
1977
890
|
}>, {
|
|
1978
891
|
content: string;
|
|
@@ -1986,10 +899,10 @@ declare const __VLS_base$d: vue.DefineComponent<__VLS_Props$g, {
|
|
|
1986
899
|
maxWidth: string;
|
|
1987
900
|
backgroundColor: string;
|
|
1988
901
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1989
|
-
declare const __VLS_export$
|
|
1990
|
-
declare const _default$
|
|
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;
|
|
1991
904
|
|
|
1992
|
-
type __VLS_WithSlots$
|
|
905
|
+
type __VLS_WithSlots$e<T, S> = T & {
|
|
1993
906
|
new (): {
|
|
1994
907
|
$slots: S;
|
|
1995
908
|
};
|
|
@@ -2016,7 +929,7 @@ interface ThoughtChainItem {
|
|
|
2016
929
|
* 该步后续不再增长;仍在打字时剩余文字直接冲刷出完(一次性回落静态) */
|
|
2017
930
|
closed?: boolean;
|
|
2018
931
|
}
|
|
2019
|
-
type __VLS_Props$
|
|
932
|
+
type __VLS_Props$h = {
|
|
2020
933
|
/** 步骤列表 */
|
|
2021
934
|
items: ThoughtChainItem[];
|
|
2022
935
|
/** 排列方向:vertical 纵向(带连接线)/ horizontal 横向 */
|
|
@@ -2028,16 +941,16 @@ type __VLS_Props$f = {
|
|
|
2028
941
|
/** 语言包:'zh-CN'/'en'/'ko'/'vi'/'zh-HK' 整包或部分文案对象(优先于祖先注入与全局设置) */
|
|
2029
942
|
locale?: LocaleInput;
|
|
2030
943
|
};
|
|
2031
|
-
declare var __VLS_45: {
|
|
944
|
+
declare var __VLS_45$2: {
|
|
2032
945
|
item: ThoughtChainItem;
|
|
2033
946
|
index: number;
|
|
2034
947
|
};
|
|
2035
|
-
type __VLS_Slots$
|
|
2036
|
-
content?: (props: typeof __VLS_45) => any;
|
|
948
|
+
type __VLS_Slots$d = {} & {
|
|
949
|
+
content?: (props: typeof __VLS_45$2) => any;
|
|
2037
950
|
};
|
|
2038
|
-
declare const __VLS_base$
|
|
951
|
+
declare const __VLS_base$d: vue.DefineComponent<__VLS_Props$h, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
2039
952
|
typing: () => any;
|
|
2040
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
953
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$h> & Readonly<{
|
|
2041
954
|
onTyping?: (() => any) | undefined;
|
|
2042
955
|
}>, {
|
|
2043
956
|
items: ThoughtChainItem[];
|
|
@@ -2045,16 +958,16 @@ declare const __VLS_base$c: vue.DefineComponent<__VLS_Props$f, {}, {}, {}, {}, v
|
|
|
2045
958
|
collapsible: boolean;
|
|
2046
959
|
showDuration: boolean;
|
|
2047
960
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
2048
|
-
declare const __VLS_export$
|
|
2049
|
-
declare const _default$
|
|
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;
|
|
2050
963
|
|
|
2051
|
-
type __VLS_WithSlots$
|
|
964
|
+
type __VLS_WithSlots$d<T, S> = T & {
|
|
2052
965
|
new (): {
|
|
2053
966
|
$slots: S;
|
|
2054
967
|
};
|
|
2055
968
|
};
|
|
2056
969
|
|
|
2057
|
-
type __VLS_Props$
|
|
970
|
+
type __VLS_Props$g = {
|
|
2058
971
|
/** 图标:字符串为图片地址;也可传组件;缺省渲染内置品牌动图 */
|
|
2059
972
|
icon?: string | Component;
|
|
2060
973
|
/** 名称(未传回落内置问候语「你好,我是 Gizmo」) */
|
|
@@ -2066,29 +979,29 @@ type __VLS_Props$e = {
|
|
|
2066
979
|
/** 语言包:'zh-CN'/'en'/'ko'/'vi'/'zh-HK' 整包或部分文案对象(优先于祖先注入与全局设置) */
|
|
2067
980
|
locale?: LocaleInput;
|
|
2068
981
|
};
|
|
2069
|
-
declare var __VLS_1$
|
|
982
|
+
declare var __VLS_1$4: {};
|
|
2070
983
|
declare var __VLS_19$1: {};
|
|
2071
|
-
declare var __VLS_21$
|
|
2072
|
-
declare var __VLS_23
|
|
2073
|
-
type __VLS_Slots$
|
|
2074
|
-
icon?: (props: typeof __VLS_1$
|
|
984
|
+
declare var __VLS_21$2: {};
|
|
985
|
+
declare var __VLS_23: {};
|
|
986
|
+
type __VLS_Slots$c = {} & {
|
|
987
|
+
icon?: (props: typeof __VLS_1$4) => any;
|
|
2075
988
|
} & {
|
|
2076
989
|
name?: (props: typeof __VLS_19$1) => any;
|
|
2077
990
|
} & {
|
|
2078
|
-
description?: (props: typeof __VLS_21$
|
|
991
|
+
description?: (props: typeof __VLS_21$2) => any;
|
|
2079
992
|
} & {
|
|
2080
|
-
suggestions?: (props: typeof __VLS_23
|
|
993
|
+
suggestions?: (props: typeof __VLS_23) => any;
|
|
2081
994
|
};
|
|
2082
|
-
declare const __VLS_base$
|
|
2083
|
-
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<{}>, {
|
|
2084
996
|
name: string;
|
|
2085
997
|
icon: string | Component;
|
|
998
|
+
description: string;
|
|
2086
999
|
layout: "vertical" | "horizontal";
|
|
2087
1000
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
2088
|
-
declare const __VLS_export$
|
|
2089
|
-
declare const _default$
|
|
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;
|
|
2090
1003
|
|
|
2091
|
-
type __VLS_WithSlots$
|
|
1004
|
+
type __VLS_WithSlots$c<T, S> = T & {
|
|
2092
1005
|
new (): {
|
|
2093
1006
|
$slots: S;
|
|
2094
1007
|
};
|
|
@@ -2101,7 +1014,7 @@ interface PromptItem {
|
|
|
2101
1014
|
icon?: string | Component;
|
|
2102
1015
|
disabled?: boolean;
|
|
2103
1016
|
}
|
|
2104
|
-
type __VLS_Props$
|
|
1017
|
+
type __VLS_Props$f = {
|
|
2105
1018
|
/** 建议 prompt 列表 */
|
|
2106
1019
|
prompts?: PromptItem[];
|
|
2107
1020
|
/** 网格标题 */
|
|
@@ -2109,35 +1022,35 @@ type __VLS_Props$d = {
|
|
|
2109
1022
|
/** 换行模式(默认 true 自动换行;false 不换行,超出横向滚动) */
|
|
2110
1023
|
wrap?: boolean;
|
|
2111
1024
|
};
|
|
2112
|
-
declare var __VLS_1$
|
|
1025
|
+
declare var __VLS_1$3: {
|
|
2113
1026
|
item: PromptItem;
|
|
2114
1027
|
index: number;
|
|
2115
1028
|
};
|
|
2116
1029
|
declare var __VLS_14: {};
|
|
2117
|
-
type __VLS_Slots$
|
|
2118
|
-
default?: (props: typeof __VLS_1$
|
|
1030
|
+
type __VLS_Slots$b = {} & {
|
|
1031
|
+
default?: (props: typeof __VLS_1$3) => any;
|
|
2119
1032
|
} & {
|
|
2120
1033
|
footer?: (props: typeof __VLS_14) => any;
|
|
2121
1034
|
};
|
|
2122
|
-
declare const __VLS_base$
|
|
1035
|
+
declare const __VLS_base$b: vue.DefineComponent<__VLS_Props$f, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
2123
1036
|
select: (item: PromptItem) => any;
|
|
2124
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
1037
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$f> & Readonly<{
|
|
2125
1038
|
onSelect?: ((item: PromptItem) => any) | undefined;
|
|
2126
1039
|
}>, {
|
|
2127
1040
|
title: string;
|
|
2128
1041
|
prompts: PromptItem[];
|
|
2129
1042
|
wrap: boolean;
|
|
2130
1043
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
2131
|
-
declare const __VLS_export$
|
|
2132
|
-
declare const _default$
|
|
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;
|
|
2133
1046
|
|
|
2134
|
-
type __VLS_WithSlots$
|
|
1047
|
+
type __VLS_WithSlots$b<T, S> = T & {
|
|
2135
1048
|
new (): {
|
|
2136
1049
|
$slots: S;
|
|
2137
1050
|
};
|
|
2138
1051
|
};
|
|
2139
1052
|
|
|
2140
|
-
type __VLS_Props$
|
|
1053
|
+
type __VLS_Props$e = {
|
|
2141
1054
|
/** 文件名 */
|
|
2142
1055
|
name: string;
|
|
2143
1056
|
/** 文件形态:image 渲染缩略图,file 渲染文档图标卡 */
|
|
@@ -2159,11 +1072,11 @@ type __VLS_Props$c = {
|
|
|
2159
1072
|
/** 语言配置:内置语言名(如 'en')或部分文案对象(深合并覆盖) */
|
|
2160
1073
|
locale?: LocaleInput;
|
|
2161
1074
|
};
|
|
2162
|
-
declare var __VLS_1$
|
|
2163
|
-
type __VLS_Slots$
|
|
2164
|
-
image?: (props: typeof __VLS_1$
|
|
1075
|
+
declare var __VLS_1$2: {};
|
|
1076
|
+
type __VLS_Slots$a = {} & {
|
|
1077
|
+
image?: (props: typeof __VLS_1$2) => any;
|
|
2165
1078
|
};
|
|
2166
|
-
declare const __VLS_base$
|
|
1079
|
+
declare const __VLS_base$a: vue.DefineComponent<__VLS_Props$e, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$e> & Readonly<{}>, {
|
|
2167
1080
|
url: string;
|
|
2168
1081
|
name: string;
|
|
2169
1082
|
locale: LocaleInput;
|
|
@@ -2175,10 +1088,10 @@ declare const __VLS_base$9: vue.DefineComponent<__VLS_Props$c, {}, {}, {}, {}, v
|
|
|
2175
1088
|
onDelete: () => void;
|
|
2176
1089
|
onDownload: () => void;
|
|
2177
1090
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
2178
|
-
declare const __VLS_export$
|
|
2179
|
-
declare const _default$
|
|
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;
|
|
2180
1093
|
|
|
2181
|
-
type __VLS_WithSlots$
|
|
1094
|
+
type __VLS_WithSlots$a<T, S> = T & {
|
|
2182
1095
|
new (): {
|
|
2183
1096
|
$slots: S;
|
|
2184
1097
|
};
|
|
@@ -2201,7 +1114,7 @@ interface AttachmentItem {
|
|
|
2201
1114
|
* 可重传。缺省不调(纯本地待发列表,向后兼容)
|
|
2202
1115
|
*/
|
|
2203
1116
|
type AttachmentUpload = (file: File, item: AttachmentItem) => Promise<Partial<AttachmentItem> | undefined | void> | Partial<AttachmentItem> | undefined | void;
|
|
2204
|
-
type __VLS_Props$
|
|
1117
|
+
type __VLS_Props$d = {
|
|
2205
1118
|
/** 附件列表(v-model) */
|
|
2206
1119
|
modelValue?: object[];
|
|
2207
1120
|
/** input[type=file] accept 属性,如 'image/*' */
|
|
@@ -2228,16 +1141,16 @@ declare var __VLS_12: {
|
|
|
2228
1141
|
item: object;
|
|
2229
1142
|
index: number;
|
|
2230
1143
|
};
|
|
2231
|
-
declare var __VLS_21: {
|
|
1144
|
+
declare var __VLS_21$1: {
|
|
2232
1145
|
item: object;
|
|
2233
1146
|
index: number;
|
|
2234
1147
|
};
|
|
2235
|
-
type __VLS_Slots$
|
|
1148
|
+
type __VLS_Slots$9 = {} & {
|
|
2236
1149
|
'list-item'?: (props: typeof __VLS_12) => any;
|
|
2237
1150
|
} & {
|
|
2238
|
-
'list-thumb'?: (props: typeof __VLS_21) => any;
|
|
1151
|
+
'list-thumb'?: (props: typeof __VLS_21$1) => any;
|
|
2239
1152
|
};
|
|
2240
|
-
declare const __VLS_base$
|
|
1153
|
+
declare const __VLS_base$9: vue.DefineComponent<__VLS_Props$d, {
|
|
2241
1154
|
openSelect: typeof openSelect;
|
|
2242
1155
|
retry: typeof retry;
|
|
2243
1156
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
@@ -2246,7 +1159,7 @@ declare const __VLS_base$8: vue.DefineComponent<__VLS_Props$b, {
|
|
|
2246
1159
|
change: (list: object[]) => any;
|
|
2247
1160
|
exceed: (file: File) => any;
|
|
2248
1161
|
uploaded: (item: AttachmentItem, result?: Partial<AttachmentItem> | undefined) => any;
|
|
2249
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
1162
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$d> & Readonly<{
|
|
2250
1163
|
onDelete?: ((item: object) => any) | undefined;
|
|
2251
1164
|
"onUpdate:modelValue"?: ((list: object[]) => any) | undefined;
|
|
2252
1165
|
onChange?: ((list: object[]) => any) | undefined;
|
|
@@ -2263,10 +1176,10 @@ declare const __VLS_base$8: vue.DefineComponent<__VLS_Props$b, {
|
|
|
2263
1176
|
beforeUpload: (file: File) => boolean | Promise<boolean>;
|
|
2264
1177
|
upload: AttachmentUpload;
|
|
2265
1178
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
2266
|
-
declare const __VLS_export$
|
|
2267
|
-
declare const _default$
|
|
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;
|
|
2268
1181
|
|
|
2269
|
-
type __VLS_WithSlots$
|
|
1182
|
+
type __VLS_WithSlots$9<T, S> = T & {
|
|
2270
1183
|
new (): {
|
|
2271
1184
|
$slots: S;
|
|
2272
1185
|
};
|
|
@@ -2277,16 +1190,19 @@ interface ConversationItem {
|
|
|
2277
1190
|
key: string | number;
|
|
2278
1191
|
label: string;
|
|
2279
1192
|
group?: string;
|
|
1193
|
+
/** 稳定分组 id(组间排序/去重用;group 仍是显示名,可为 locale 文案) */
|
|
1194
|
+
groupKey?: string;
|
|
2280
1195
|
disabled?: boolean;
|
|
2281
1196
|
}
|
|
2282
1197
|
/** 分组结构:groupable 比较器作用于该对象 */
|
|
2283
1198
|
interface ConversationGroup {
|
|
2284
1199
|
group?: string;
|
|
1200
|
+
groupKey?: string;
|
|
2285
1201
|
items: ConversationItem[];
|
|
2286
1202
|
}
|
|
2287
1203
|
/** 内置菜单指令 */
|
|
2288
1204
|
type MenuCommand = 'rename' | 'delete';
|
|
2289
|
-
type __VLS_Props$
|
|
1205
|
+
type __VLS_Props$c = {
|
|
2290
1206
|
/** 会话列表(按 group 字段分组,保持插入顺序) */
|
|
2291
1207
|
items: ConversationItem[];
|
|
2292
1208
|
/** 当前激活会话 key(v-model:active) */
|
|
@@ -2295,10 +1211,21 @@ type __VLS_Props$a = {
|
|
|
2295
1211
|
showBuiltInMenuType?: 'hover' | 'always';
|
|
2296
1212
|
/** 分组排序比较器(定制分组顺序;缺省保持插入顺序) */
|
|
2297
1213
|
groupable?: (a: ConversationGroup, b: ConversationGroup) => number;
|
|
1214
|
+
/** 多选批量模式(行首复选框;点击行主体 = 切换勾选,不切换当前会话) */
|
|
1215
|
+
selectable?: boolean;
|
|
2298
1216
|
/** 下一页加载中(分页场景;loading 时滚动到底不再触发 load-more) */
|
|
2299
1217
|
loading?: boolean;
|
|
2300
1218
|
/** 是否还有更早分页(缺省 false 表示一次性全量,不触发 load-more) */
|
|
2301
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;
|
|
2302
1229
|
/** 语言配置:内置语言名(如 'en')或部分文案对象(深合并覆盖) */
|
|
2303
1230
|
locale?: LocaleInput;
|
|
2304
1231
|
};
|
|
@@ -2310,28 +1237,52 @@ declare function handleMenuCommand(cmd: {
|
|
|
2310
1237
|
declare function renamePrompt(key: string | number): Promise<void>;
|
|
2311
1238
|
/** deleteConfirm(key):弹确认框,确认后 emit menu-command {command:'delete'} */
|
|
2312
1239
|
declare function deleteConfirm(key: string | number): Promise<void>;
|
|
2313
|
-
|
|
1240
|
+
type __VLS_ModelProps = {
|
|
1241
|
+
'selectedKeys'?: (string | number)[];
|
|
1242
|
+
};
|
|
1243
|
+
type __VLS_PublicProps = __VLS_Props$c & __VLS_ModelProps;
|
|
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: {
|
|
2314
1256
|
group: string;
|
|
1257
|
+
groupKey: string | undefined;
|
|
2315
1258
|
};
|
|
2316
|
-
declare var
|
|
1259
|
+
declare var __VLS_64: {
|
|
2317
1260
|
item: ConversationItem;
|
|
2318
1261
|
active: boolean;
|
|
2319
1262
|
};
|
|
2320
|
-
declare var
|
|
1263
|
+
declare var __VLS_93$2: {
|
|
2321
1264
|
item: ConversationItem;
|
|
2322
1265
|
};
|
|
2323
|
-
type __VLS_Slots$
|
|
2324
|
-
'group-title'?: (props: typeof __VLS_1$
|
|
1266
|
+
type __VLS_Slots$8 = {} & {
|
|
1267
|
+
'group-title'?: (props: typeof __VLS_1$1) => any;
|
|
1268
|
+
} & {
|
|
1269
|
+
item?: (props: typeof __VLS_11) => any;
|
|
1270
|
+
} & {
|
|
1271
|
+
menu?: (props: typeof __VLS_40) => any;
|
|
1272
|
+
} & {
|
|
1273
|
+
'group-title'?: (props: typeof __VLS_54$2) => any;
|
|
2325
1274
|
} & {
|
|
2326
|
-
item?: (props: typeof
|
|
1275
|
+
item?: (props: typeof __VLS_64) => any;
|
|
2327
1276
|
} & {
|
|
2328
|
-
menu?: (props: typeof
|
|
1277
|
+
menu?: (props: typeof __VLS_93$2) => any;
|
|
2329
1278
|
};
|
|
2330
|
-
declare const __VLS_base$
|
|
1279
|
+
declare const __VLS_base$8: vue.DefineComponent<__VLS_PublicProps, {
|
|
2331
1280
|
handleMenuCommand: typeof handleMenuCommand;
|
|
2332
1281
|
renamePrompt: typeof renamePrompt;
|
|
2333
1282
|
deleteConfirm: typeof deleteConfirm;
|
|
2334
|
-
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1283
|
+
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1284
|
+
"update:selectedKeys": (value: (string | number)[]) => any;
|
|
1285
|
+
} & {
|
|
2335
1286
|
change: (item: ConversationItem) => any;
|
|
2336
1287
|
"update:active": (key: string | number) => any;
|
|
2337
1288
|
"menu-command": (cmd: {
|
|
@@ -2340,7 +1291,8 @@ declare const __VLS_base$7: vue.DefineComponent<__VLS_Props$a, {
|
|
|
2340
1291
|
value?: string;
|
|
2341
1292
|
}) => any;
|
|
2342
1293
|
"load-more": () => any;
|
|
2343
|
-
|
|
1294
|
+
"update:selectedKeys": (keys: (string | number)[]) => any;
|
|
1295
|
+
}, string, vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
2344
1296
|
onChange?: ((item: ConversationItem) => any) | undefined;
|
|
2345
1297
|
"onUpdate:active"?: ((key: string | number) => any) | undefined;
|
|
2346
1298
|
"onMenu-command"?: ((cmd: {
|
|
@@ -2349,24 +1301,62 @@ declare const __VLS_base$7: vue.DefineComponent<__VLS_Props$a, {
|
|
|
2349
1301
|
value?: string;
|
|
2350
1302
|
}) => any) | undefined;
|
|
2351
1303
|
"onLoad-more"?: (() => any) | undefined;
|
|
1304
|
+
"onUpdate:selectedKeys"?: ((value: (string | number)[]) => any) | undefined;
|
|
2352
1305
|
}>, {
|
|
2353
|
-
loading: boolean;
|
|
2354
1306
|
locale: LocaleInput;
|
|
1307
|
+
loading: boolean;
|
|
2355
1308
|
items: ConversationItem[];
|
|
2356
1309
|
active: string | number;
|
|
2357
1310
|
showBuiltInMenuType: "hover" | "always";
|
|
2358
1311
|
groupable: (a: ConversationGroup, b: ConversationGroup) => number;
|
|
1312
|
+
selectable: boolean;
|
|
2359
1313
|
hasMore: boolean;
|
|
1314
|
+
rowHeight: number;
|
|
1315
|
+
virtualThreshold: number;
|
|
1316
|
+
virtualDisabled: boolean;
|
|
2360
1317
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
2361
|
-
declare const __VLS_export$
|
|
2362
|
-
declare const _default$
|
|
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;
|
|
2363
1320
|
|
|
2364
|
-
type __VLS_WithSlots$
|
|
1321
|
+
type __VLS_WithSlots$8<T, S> = T & {
|
|
2365
1322
|
new (): {
|
|
2366
1323
|
$slots: S;
|
|
2367
1324
|
};
|
|
2368
1325
|
};
|
|
2369
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
|
+
|
|
2370
1360
|
/** 色板槽位项:色值字符串(透明度走全局 props)或对象(可按色覆盖透明度/渐变/缩放) */
|
|
2371
1361
|
interface FvBlobHaloColor {
|
|
2372
1362
|
/** 色值(CSS 任意色:变量/16 进制/rgba;缺省保留默认色,纯调 scale/透明度时可省) */
|
|
@@ -2379,452 +1369,42 @@ interface FvBlobHaloColor {
|
|
|
2379
1369
|
* 高光渐变中带(半径 50% 处)色浓,0~1:小 = 更快向外淡出(缺省 .45)。
|
|
2380
1370
|
* 仅第 4 槽位(高光位)消费;其余槽位彩团平涂不受影响
|
|
2381
1371
|
*/
|
|
2382
|
-
mid?: number;
|
|
2383
|
-
/** 本色团缩放(0~1+,缺省回落槽位内置:1/2/3 槽 .8/.78/.76、高光位 .62) */
|
|
2384
|
-
scale?: number;
|
|
2385
|
-
}
|
|
2386
|
-
type __VLS_Props$
|
|
2387
|
-
/**
|
|
2388
|
-
* 色团色板(每色一组正体 + alt 淡体):槽位传色值字符串或
|
|
2389
|
-
* { color, opacity?, altOpacity? } 对象;null/undefined 保留默认色
|
|
2390
|
-
*/
|
|
2391
|
-
colors?: (string | FvBlobHaloColor | null | undefined)[];
|
|
2392
|
-
/** 光晕尺寸(px,正圆直径;内容 svg 撑满) */
|
|
2393
|
-
size?: number;
|
|
2394
|
-
/** 光晕相对挂载点放大倍率(>1 越出挂载盒,需使用方 overflow visible) */
|
|
2395
|
-
scale?: number;
|
|
2396
|
-
/** 正体透明度(0~1;被 colors 槽位对象 opacity 覆盖) */
|
|
2397
|
-
opacity?: number;
|
|
2398
|
-
/** alt 淡体透明度(0~1;被 colors 槽位对象 altOpacity 覆盖) */
|
|
2399
|
-
altOpacity?: number;
|
|
2400
|
-
/** 旋转一周时长(s;0 停转只保留变形蠕动) */
|
|
2401
|
-
rotateDuration?: number;
|
|
2402
|
-
/** 暂停全部动画(静帧装饰) */
|
|
2403
|
-
paused?: boolean;
|
|
2404
|
-
};
|
|
2405
|
-
declare const __VLS_export$9: vue.DefineComponent<__VLS_Props$9, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$9> & Readonly<{}>, {
|
|
2406
|
-
size: number;
|
|
2407
|
-
paused: boolean;
|
|
2408
|
-
colors: (string | FvBlobHaloColor | null | undefined)[];
|
|
2409
|
-
scale: number;
|
|
2410
|
-
opacity: number;
|
|
2411
|
-
altOpacity: number;
|
|
2412
|
-
rotateDuration: number;
|
|
2413
|
-
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
2414
|
-
declare const _default$9: typeof __VLS_export$9;
|
|
2415
|
-
|
|
2416
|
-
/**
|
|
2417
|
-
* adapter 层透传的附件描述(结构兼容 types.ChatFile:消费方 ChatFile[] 可直传)。
|
|
2418
|
-
* 先传后发架构下 id 即消费方上传端点返回的附件标识,由 adapter 拼进 send 入参
|
|
2419
|
-
*/
|
|
2420
|
-
interface AdapterChatFile {
|
|
2421
|
-
/** 附件标识(先传后发场景为服务端附件 id) */
|
|
2422
|
-
id: string;
|
|
2423
|
-
name?: string;
|
|
2424
|
-
url?: string;
|
|
2425
|
-
type?: 'image' | 'file';
|
|
2426
|
-
size?: number;
|
|
2427
|
-
}
|
|
2428
|
-
/** adapter 层透传的 OpenAI 风格消息 */
|
|
2429
|
-
interface AdapterChatMessage {
|
|
2430
|
-
role: 'user' | 'assistant' | 'system' | string;
|
|
2431
|
-
content: string;
|
|
2432
|
-
/** 本条消息携带的附件(user 行;缺省无附件) */
|
|
2433
|
-
files?: AdapterChatFile[];
|
|
2434
|
-
}
|
|
2435
|
-
/** 发送请求体 */
|
|
2436
|
-
interface ChatAdapterRequest {
|
|
2437
|
-
/** 对话消息(时间正序) */
|
|
2438
|
-
messages: Array<AdapterChatMessage>;
|
|
2439
|
-
/** 覆盖配置中的模型 */
|
|
2440
|
-
model?: string;
|
|
2441
|
-
/** 是否流式,默认 true */
|
|
2442
|
-
stream?: boolean;
|
|
2443
|
-
/** 外部中止信号(与 adapter 内部 abort 合并生效) */
|
|
2444
|
-
signal?: AbortSignal;
|
|
2445
|
-
}
|
|
2446
|
-
/** 服务端原始 usage(snake_case,按 OpenAI 规范原样回调) */
|
|
2447
|
-
interface RawUsage {
|
|
2448
|
-
prompt_tokens?: number;
|
|
2449
|
-
completion_tokens?: number;
|
|
2450
|
-
total_tokens?: number;
|
|
2451
|
-
}
|
|
2452
|
-
/** 流式/响应过程回调集合 */
|
|
2453
|
-
interface ChatAdapterHandlers {
|
|
2454
|
-
/** 正文增量 */
|
|
2455
|
-
onDelta(text: string): void;
|
|
2456
|
-
/** 思考链增量(reasoning_content) */
|
|
2457
|
-
onReasoning(text: string): void;
|
|
2458
|
-
/** token 用量(部分服务端在最后一帧携带) */
|
|
2459
|
-
onUsage(u: RawUsage): void;
|
|
2460
|
-
/**
|
|
2461
|
-
* 后端消息行 id 锚定(可选):流式 message_end 时携带的最终文本行 id,
|
|
2462
|
-
* 与 message_start 的首轮 GENERATING 行 id 可能不同(多轮工具循环),UI 落库/对账以它为准
|
|
2463
|
-
*/
|
|
2464
|
-
onBackendMessageId?(id: string): void;
|
|
2465
|
-
/** 工具调用轨迹事件(可选):Fv 系通用 tool{status:start|done} */
|
|
2466
|
-
onTool?(ev: {
|
|
2467
|
-
toolName: string;
|
|
2468
|
-
status: 'start' | 'done';
|
|
2469
|
-
}): void;
|
|
2470
|
-
/**
|
|
2471
|
-
* 追问建议(可选):Fv 系 V58+ suggestions 事件(流式收尾 0..1 次,必在 message_end
|
|
2472
|
-
* 之前);开关关闭/模型未产出/中断/失败无此事件。开关开启时回答末尾生成可点击
|
|
2473
|
-
* 追问 chips,点击即作为新用户消息发送
|
|
2474
|
-
*/
|
|
2475
|
-
onSuggestions?(items: string[]): void;
|
|
2476
|
-
/**
|
|
2477
|
-
* 正常结束(含非流式)。中止后是否回调本接口协议不保证——useChat 侧以中断轮
|
|
2478
|
-
* 登记表防御(adapter.abort 后迟到的 onDone 不会清掉中断哨兵),自定义 adapter
|
|
2479
|
-
* 无需在 abort 后刻意静默,但也不得在 onDone 后继续回调其它 handlers
|
|
2480
|
-
*/
|
|
2481
|
-
onDone(): void;
|
|
2482
|
-
/** 出错(HTTP 非 2xx / 网络 / 中断) */
|
|
2483
|
-
onError(e: Error): void;
|
|
2484
|
-
}
|
|
2485
|
-
/**
|
|
2486
|
-
* 聊天后端适配器:一次 send 对应一次完整生成(流式到 onDone 或出错进 onError)。
|
|
2487
|
-
* Task 17 useChat 消费该接口,可替换为自研后端/Ollama 等实现。
|
|
2488
|
-
*/
|
|
2489
|
-
interface ChatAdapter {
|
|
2490
|
-
send(req: ChatAdapterRequest, handlers: ChatAdapterHandlers): Promise<void>;
|
|
2491
|
-
/** 中止全部进行中的请求(并发 send 各自独立可中止;已完成的请求不受影响) */
|
|
2492
|
-
abort(): void;
|
|
2493
|
-
}
|
|
2494
|
-
/** OpenAI 兼容服务配置 */
|
|
2495
|
-
interface OpenAIAdapterConfig {
|
|
2496
|
-
/** 服务根地址,如 https://api.openai.com/v1,内部拼接 /chat/completions */
|
|
2497
|
-
baseURL: string;
|
|
2498
|
-
/** Bearer Token 密钥 */
|
|
2499
|
-
apiKey?: string;
|
|
2500
|
-
/** 默认模型,可被 req.model 覆盖 */
|
|
2501
|
-
model?: string;
|
|
2502
|
-
}
|
|
2503
|
-
/**
|
|
2504
|
-
* OpenAI 兼容 ChatAdapter(/v1/chat/completions)。
|
|
2505
|
-
* 流式走 Task 2 的 createSSEParser 解析 SSE,兼容 deepseek 风格 reasoning_content。
|
|
2506
|
-
*/
|
|
2507
|
-
declare function OpenAIAdapter(config: OpenAIAdapterConfig): ChatAdapter;
|
|
2508
|
-
|
|
2509
|
-
/**
|
|
2510
|
-
* Fv 系后端通用聊天适配器(`/api/ai-chat/*`):六事件 SSE 协议
|
|
2511
|
-
* (message_start / tool / delta / reasoning / message_end / error),POST `/message/send`。
|
|
2512
|
-
* 适用于 Fv 各项目组返回此结构的后端;V57 起新增 reasoning 思考事件
|
|
2513
|
-
* (载荷 {text} 与 delta 同构,多轮每轮都推,无思考轮不推);
|
|
2514
|
-
* V58 起新增 suggestions 追问建议事件(流式收尾时 0..1 次,必在 message_end 之前)。
|
|
2515
|
-
* 本适配器负责协议解析与事件分发,
|
|
2516
|
-
* 会话管理(列表/归档/删除等)由消费方直接调后端,不经此适配器。
|
|
2517
|
-
*/
|
|
2518
|
-
/** send 请求体(sessionId 由工厂按当前会话惰性注入) */
|
|
2519
|
-
interface FvCommonSendBody {
|
|
2520
|
-
sessionId: string;
|
|
2521
|
-
content: string;
|
|
2522
|
-
}
|
|
2523
|
-
/** 工具事件载荷(SSE `tool` 事件 data) */
|
|
2524
|
-
interface FvCommonToolEvent {
|
|
2525
|
-
toolName: string;
|
|
2526
|
-
status: 'start' | 'done';
|
|
2527
|
-
}
|
|
2528
|
-
/** 会话列表项(`/session/list` records 行;total 等 IPage 字段为字符串需 parseInt) */
|
|
2529
|
-
interface FvCommonSessionItem {
|
|
2530
|
-
id: string;
|
|
2531
|
-
title: string;
|
|
2532
|
-
titleSource?: 'AUTO' | 'MANUAL';
|
|
2533
|
-
status?: 'ACTIVE' | 'ARCHIVED';
|
|
2534
|
-
archivedTime?: string | null;
|
|
2535
|
-
messageCount?: number;
|
|
2536
|
-
lastMessageExcerpt?: string | null;
|
|
2537
|
-
lastMessageTime?: string | null;
|
|
2538
|
-
createdTime?: string;
|
|
2539
|
-
updatedTime?: string;
|
|
2540
|
-
}
|
|
2541
|
-
/** 历史/详情消息行(assistant 行 toolCalls/suggestions 为 JSON 字符串,消费方自行 JSON.parse) */
|
|
2542
|
-
interface FvCommonMessage {
|
|
2543
|
-
id: string;
|
|
2544
|
-
seq: number;
|
|
2545
|
-
role: 'user' | 'assistant' | 'tool';
|
|
2546
|
-
content: string | null;
|
|
2547
|
-
/**
|
|
2548
|
-
* V1.1+ 消息附件(仅 user 行非 null;旧数据/无附件恒 null,判空容错)。
|
|
2549
|
-
* 元素与上传端点出参同构(AiChatAttachmentDTO:id/originalName/type/suffix/
|
|
2550
|
-
* sizeBytes/downloadUrl),但**不含 createdTime**(快照 JSON 无该键,勿依赖)。
|
|
2551
|
-
* 消费方映射为 MessageNode.files 渲染 chips(downloadUrl 需鉴权取流时配
|
|
2552
|
-
* AiChat 的 resolveFileUrl 钩子)
|
|
2553
|
-
*/
|
|
2554
|
-
attachments?: Array<{
|
|
2555
|
-
id: string;
|
|
2556
|
-
originalName: string;
|
|
2557
|
-
type: 'IMAGE' | 'DOCUMENT' | string;
|
|
2558
|
-
suffix?: string;
|
|
2559
|
-
sizeBytes?: number;
|
|
2560
|
-
downloadUrl?: string;
|
|
2561
|
-
[k: string]: unknown;
|
|
2562
|
-
}> | null;
|
|
2563
|
-
/**
|
|
2564
|
-
* V57 思考留底(仅 assistant 最终行;null=GENERATING 未回写/user/tool 行恒 null,
|
|
2565
|
-
* 空串=该轮无思考)——判空须用 !!r && r.length > 0,勿用 != null
|
|
2566
|
-
*/
|
|
2567
|
-
reasoningContent?: string | null;
|
|
2568
|
-
toolCalls?: string | null;
|
|
2569
|
-
toolCallId?: string | null;
|
|
2570
|
-
toolName?: string | null;
|
|
2571
|
-
/**
|
|
2572
|
-
* V58+ 追问建议(仅 assistant 行且 status=SUCCESS 的最终回答非 null;user/tool 行、
|
|
2573
|
-
* GENERATING/INTERRUPTED/FAILED 行、开关关闭期间旧行恒 null)。JSON 数组原文透传
|
|
2574
|
-
* (如 '["问题1","问题2","问题3"]'),与 toolCalls 同款约定:消费方 JSON.parse 并
|
|
2575
|
-
* try-catch 包裹,解析失败按 null 处理不渲染(见 parseSuggestions)
|
|
2576
|
-
*/
|
|
2577
|
-
suggestions?: string | null;
|
|
2578
|
-
/**
|
|
2579
|
-
* V58+ 消息评价(仅 assistant 最终回答行;未评价/旧数据恒 null,判空容错)。
|
|
2580
|
-
* LIKE 点赞 / DISLIKE 点踩;配套 feedbackComment(附言 ≤500 字)、feedbackTime
|
|
2581
|
-
* (评价落库时间)同款容错。消费方映射为 MessageNode.feedback 灌入展示,
|
|
2582
|
-
* 评价提交走独立端点(POST /message/feedback),不经本适配器
|
|
2583
|
-
*/
|
|
2584
|
-
feedback?: 'LIKE' | 'DISLIKE' | null;
|
|
2585
|
-
feedbackComment?: string | null;
|
|
2586
|
-
feedbackTime?: string | null;
|
|
2587
|
-
status?: 'GENERATING' | 'SUCCESS' | 'FAILED' | 'INTERRUPTED' | null;
|
|
2588
|
-
failReason?: string | null;
|
|
2589
|
-
promptTokens?: number | null;
|
|
2590
|
-
completionTokens?: number | null;
|
|
2591
|
-
/** Long 全局转字符串 */
|
|
2592
|
-
elapsedMs?: string | null;
|
|
2593
|
-
createdTime?: string;
|
|
2594
|
-
}
|
|
2595
|
-
/** 会话详情出参(`/session/detail`) */
|
|
2596
|
-
interface FvCommonSessionDetail {
|
|
2597
|
-
session: FvCommonSessionItem;
|
|
2598
|
-
messages: FvCommonMessage[];
|
|
2599
|
-
}
|
|
2600
|
-
/** 消息 history 分页出参(`/message/history`) */
|
|
2601
|
-
interface FvCommonMessagePage {
|
|
2602
|
-
messages: FvCommonMessage[];
|
|
2603
|
-
hasMore: boolean;
|
|
2604
|
-
}
|
|
2605
|
-
interface FvCommonAdapterConfig {
|
|
2606
|
-
/** 服务根地址,如 https://host 或 /api(内部拼接 /ai-chat/message/send) */
|
|
2607
|
-
baseURL: string;
|
|
2608
|
-
/** 请求头(如 { Authorization: 'Bearer ' + token }),每次 send 惰性取用 */
|
|
2609
|
-
headers?: Record<string, string> | (() => Record<string, string>);
|
|
2610
|
-
/** 当前会话 id(工厂惰性取用:切换会话后下一次 send 即生效) */
|
|
2611
|
-
sessionId: string | (() => string);
|
|
2612
|
-
/** 业务错误码 → 提示文案映射(如 { 90602: '已有进行中的对话' });命中时 onError 的 message 用映射文案 */
|
|
2613
|
-
errorMessages?: Record<number, string>;
|
|
2614
|
-
}
|
|
2615
|
-
/** 带业务码的错误:同步段 JSON 错误(90601/90602/90603/90105)与 SSE error 事件统一走此形态 */
|
|
2616
|
-
declare class FvCommonError extends Error {
|
|
2617
|
-
code?: number | string;
|
|
2618
|
-
constructor(message: string, code?: number | string);
|
|
2619
|
-
}
|
|
2620
|
-
/**
|
|
2621
|
-
* 安全解析历史消息行的追问建议(FvCommonMessage.suggestions,JSON 数组原文透传)。
|
|
2622
|
-
* 与 toolCalls 同款约定:try-catch 包裹,脏数据(非 JSON/非字符串数组/全空)按无建议
|
|
2623
|
-
* 处理返回 undefined。仅 assistant 行且 status=SUCCESS 的最终回答字段非 null,
|
|
2624
|
-
* 但本函数不校验角色/状态(调用方已按行筛选),只做形状容错。
|
|
2625
|
-
*/
|
|
2626
|
-
declare function parseSuggestions(raw: string | null | undefined): string[] | undefined;
|
|
2627
|
-
/**
|
|
2628
|
-
* Fv 系通用聊天适配器:消费六事件 SSE。
|
|
2629
|
-
* 同步段失败(会话不存在/单飞行闸/未启用/参数校验)发生在 SSE 建立前,
|
|
2630
|
-
* 响应是普通 JSON 错误——此处按 Content-Type 分流,命中 errorMessages 时用映射文案。
|
|
2631
|
-
* 消息三角色里的 tool 行(toolCallId 配对)是会话管理端的落库形态,
|
|
2632
|
-
* 流式期间只有 tool{status} 事件(无 tool 行),由 onTool 上抛给消费方展示工具状态。
|
|
2633
|
-
*/
|
|
2634
|
-
declare function FvCommonAdapter(config: FvCommonAdapterConfig): ChatAdapter;
|
|
2635
|
-
|
|
2636
|
-
/**
|
|
2637
|
-
* 会话/消息持久化适配器。
|
|
2638
|
-
* Task 17 useChat 用它保存会话列表与 messageTree 序列化结果,
|
|
2639
|
-
* 接口为 async 以便未来替换为 IndexedDB/后端存储而不改调用方。
|
|
2640
|
-
*/
|
|
2641
|
-
interface StorageAdapter {
|
|
2642
|
-
get<T>(key: string): Promise<T | undefined>;
|
|
2643
|
-
set<T>(key: string, val: T): Promise<void>;
|
|
2644
|
-
remove(key: string): Promise<void>;
|
|
2645
|
-
}
|
|
2646
|
-
/**
|
|
2647
|
-
* localStorage 存储适配器。
|
|
2648
|
-
* mock/SSR 环境探测失败时自动降级为内存实现(数据不持久化,但不崩)。
|
|
2649
|
-
*/
|
|
2650
|
-
declare function createLocalStorageAdapter(): StorageAdapter;
|
|
2651
|
-
/** 纯内存存储适配器(测试/降级用,页面刷新即失) */
|
|
2652
|
-
declare function createMemoryAdapter(): StorageAdapter;
|
|
2653
|
-
|
|
2654
|
-
interface SSEEvent {
|
|
2655
|
-
event?: string;
|
|
2656
|
-
data: string;
|
|
2657
|
-
}
|
|
2658
|
-
interface SSEParser {
|
|
2659
|
-
push(chunk: string): void;
|
|
2660
|
-
end(): void;
|
|
2661
|
-
}
|
|
2662
|
-
declare function createSSEParser(onEvent: (ev: SSEEvent) => void, options?: {
|
|
2663
|
-
streamSeparator?: string;
|
|
2664
|
-
partSeparator?: string;
|
|
2665
|
-
kvSeparator?: string;
|
|
2666
|
-
}): SSEParser;
|
|
2667
|
-
|
|
2668
|
-
/**
|
|
2669
|
-
* @fv-ui/ai-chat 公共类型汇聚出口。
|
|
2670
|
-
* 标量/树形消息等基础类型在本文件直接定义(单一事实来源,消除 messageTree ↔ types 循环引用);
|
|
2671
|
-
* core 其余模块(adapter/storage/sse)的类型在此汇聚再导出,
|
|
2672
|
-
* 消费方 `import type { MessageNode, ChatAdapter, ... } from '@fv-ui/ai-chat'`。
|
|
2673
|
-
*/
|
|
2674
|
-
/**
|
|
2675
|
-
* 消息评价(Fv 系 V58+ 消息反馈):assistant 最终回答行的点赞/点踩留底。
|
|
2676
|
-
* action 为 null 表示未评价(缺省等同未评价);comment 随每次评价整体覆盖
|
|
2677
|
-
* (CLEAR 时一并清空)。历史恢复由消费方从 FvCommonMessage.feedback/
|
|
2678
|
-
* feedbackComment 灌入;流式新生成的回答初始未评价
|
|
2679
|
-
*/
|
|
2680
|
-
interface MessageFeedback {
|
|
2681
|
-
/** 当前评价态;null=未评价 */
|
|
2682
|
-
action: 'LIKE' | 'DISLIKE' | null;
|
|
2683
|
-
/** 评价附言(点踩原因等,≤500 字;随评价整体覆盖,无则 undefined) */
|
|
2684
|
-
comment?: string;
|
|
2685
|
-
}
|
|
2686
|
-
/** 消息角色 */
|
|
2687
|
-
type MessageRole = 'user' | 'assistant';
|
|
2688
|
-
/** 消息生命周期状态 */
|
|
2689
|
-
type MessageStatus = 'pending' | 'streaming' | 'done' | 'error';
|
|
2690
|
-
/**
|
|
2691
|
-
* 工具调用轨迹项(Fv 系通用):assistant 行 toolCalls 展开后的单个工具调用。
|
|
2692
|
-
* 兼容 OpenAI function calling 形状(type/function.name/function.arguments)。
|
|
2693
|
-
*/
|
|
2694
|
-
interface ToolCallItem {
|
|
2695
|
-
id: string;
|
|
2696
|
-
type?: string;
|
|
2697
|
-
function?: {
|
|
2698
|
-
name?: string;
|
|
2699
|
-
arguments?: string;
|
|
2700
|
-
};
|
|
2701
|
-
[k: string]: unknown;
|
|
2702
|
-
}
|
|
2703
|
-
/** token 用量(camelCase;adapter 层 snake_case 的 RawUsage 到此的映射责任在包装层) */
|
|
2704
|
-
interface MessageUsage {
|
|
2705
|
-
promptTokens?: number;
|
|
2706
|
-
completionTokens?: number;
|
|
2707
|
-
totalTokens?: number;
|
|
2708
|
-
}
|
|
2709
|
-
/** 消息附件文件描述(序列化安全:只含可 JSON 化字段,不含 File 原始对象) */
|
|
2710
|
-
interface ChatFile {
|
|
2711
|
-
/** 附件唯一标识(先传后发架构下为服务端附件 id) */
|
|
2712
|
-
id: string;
|
|
2713
|
-
/** 文件名 */
|
|
2714
|
-
name: string;
|
|
2715
|
-
/** 体积(字节) */
|
|
2716
|
-
size?: number;
|
|
2717
|
-
/**
|
|
2718
|
-
* 预览/下载地址(data URL、本地 objectURL 或远程地址)。
|
|
2719
|
-
* 远程地址需鉴权取流时经 AiChat 的 resolveFileUrl 换可渲染地址,
|
|
2720
|
-
* 此时本字段存原始远程地址(供解析函数取用)
|
|
2721
|
-
*/
|
|
2722
|
-
url?: string;
|
|
2723
|
-
/** 附件类别,缺省按 'file' 处理 */
|
|
2724
|
-
type?: 'image' | 'file';
|
|
2725
|
-
}
|
|
2726
|
-
/**
|
|
2727
|
-
* 工具调用轨迹步骤(Fv 系通用):流式 tool 事件与历史 tool 行展开后的单步。
|
|
2728
|
-
* status 与 ThoughtChain 链项一致(loading 转圈/success 勾/error 叉)。
|
|
2729
|
-
*/
|
|
2730
|
-
interface ToolStepItem {
|
|
2731
|
-
/** 步骤唯一标识(流式 `${toolName}-${序号}`;历史回放由消费方生成) */
|
|
2732
|
-
key: string;
|
|
2733
|
-
/** 展示名(流式经 toolStepLabel 转换后的工具名;text 步为思考/过渡文案原文) */
|
|
2734
|
-
title?: string;
|
|
2735
|
-
/** 步骤状态;缺省视为 loading */
|
|
2736
|
-
status?: 'pending' | 'loading' | 'success' | 'error';
|
|
2737
|
-
/** 补充描述(历史回放的用时/返回量等次要信息) */
|
|
2738
|
-
description?: string;
|
|
2739
|
-
/**
|
|
2740
|
-
* 步骤种类(缺省 'tool'):tool 工具调用步 / text 思考链中的思考·过渡文案步。
|
|
2741
|
-
* text 步呈现原始文案(不加「已查询」前缀、无 loading 态),节点图标固定对话气泡,
|
|
2742
|
-
* 供流式 reasoning 增量与历史回放把思考文本按发生顺序织入思考链
|
|
2743
|
-
*/
|
|
2744
|
-
kind?: 'tool' | 'text';
|
|
2745
|
-
/**
|
|
2746
|
-
* 思考段步是否已完结(text 步专用,流式内部状态):tool 事件/正文 delta 到达时
|
|
2747
|
-
* 置位,之后到达的 reasoning 增量新开一段——即「每轮思考一段」的轮间分隔标记。
|
|
2748
|
-
* 历史回放灌入的步天然完结(留底是聚合文本),不依赖此字段
|
|
2749
|
-
*/
|
|
2750
|
-
closed?: boolean;
|
|
2751
|
-
/** 工具步计时起点(ms;流式 start 记录,done 算差回写 description,之后无消费方) */
|
|
2752
|
-
startedAt?: number;
|
|
2753
|
-
}
|
|
2754
|
-
/** 树形消息节点(同构 open-webui 会话消息:parentId/childrenIds 构成分支树) */
|
|
2755
|
-
interface MessageNode {
|
|
2756
|
-
id: string;
|
|
2757
|
-
role: MessageRole;
|
|
2758
|
-
content: string;
|
|
2759
|
-
/** 思考链全文(流式期间由包装层追加) */
|
|
2760
|
-
reasoning?: string;
|
|
2761
|
-
/** 工具调用轨迹(Fv 系流式 tool 事件累积/历史 tool 行展开;AiMessage 以 ThoughtChain 渲染) */
|
|
2762
|
-
toolSteps?: ToolStepItem[];
|
|
2763
|
-
/** 附件列表 */
|
|
2764
|
-
files?: ChatFile[];
|
|
2765
|
-
/** 多模型对话中的模型序号(open-webui 语义) */
|
|
2766
|
-
modelIdx?: number;
|
|
2767
|
-
/** 生成模型名 */
|
|
2768
|
-
model?: string;
|
|
2769
|
-
/** 后端消息行 id(Fv 系带会话管理后端):流式 message_end 时回填,UI 落库/对账锚定用 */
|
|
2770
|
-
backendId?: string;
|
|
2771
|
-
/**
|
|
2772
|
-
* 追问建议(Fv 系 V58+:回答末尾生成的可点击追问 chips,点击即作为新用户消息发送)。
|
|
2773
|
-
* 流式经 adapter onSuggestions 回写;历史恢复由消费方从 FvCommonMessage.suggestions
|
|
2774
|
-
* (JSON 数组原文)解析灌入。空/缺省不渲染;展示端仅链尾消息渲染 chips
|
|
2775
|
-
*/
|
|
2776
|
-
suggestions?: string[];
|
|
2777
|
-
/**
|
|
2778
|
-
* 消息评价(Fv 系 V58+):点赞/点踩当前态与附言。历史恢复由消费方从
|
|
2779
|
-
* FvCommonMessage.feedback/feedbackComment 灌入;点击按钮经 feedbackHandler
|
|
2780
|
-
* 钩子上报,乐观更新失败回滚。仅 assistant 最终回答行有意义
|
|
2781
|
-
*/
|
|
2782
|
-
feedback?: MessageFeedback;
|
|
2783
|
-
/** 中间轮工具调用列表(JSON 字符串或已展开数组;Fv 系 assistant 行 toolCalls 非空即中间轮) */
|
|
2784
|
-
toolCalls?: string | ToolCallItem[];
|
|
2785
|
-
/** 父节点 id,根消息为 null */
|
|
2786
|
-
parentId: string | null;
|
|
2787
|
-
/** 子节点 id 列表(多个子节点即多个分支回答) */
|
|
2788
|
-
childrenIds: string[];
|
|
2789
|
-
status?: MessageStatus;
|
|
2790
|
-
/** status 为 'error' 时的错误描述 */
|
|
2791
|
-
error?: string;
|
|
2792
|
-
/** 创建时间戳(ms) */
|
|
2793
|
-
createdAt: number;
|
|
1372
|
+
mid?: number;
|
|
1373
|
+
/** 本色团缩放(0~1+,缺省回落槽位内置:1/2/3 槽 .8/.78/.76、高光位 .62) */
|
|
1374
|
+
scale?: number;
|
|
1375
|
+
}
|
|
1376
|
+
type __VLS_Props$a = {
|
|
2794
1377
|
/**
|
|
2795
|
-
*
|
|
2796
|
-
*
|
|
2797
|
-
* ISO 字符串("2026-10-07T20:08:44",亦可能被消费方 JSON 序列化包一层引号成
|
|
2798
|
-
* "\"2026-...\"")。消息时间的展示优先取本字段(自动识别格式),缺省回落 createdAt
|
|
1378
|
+
* 色团色板(每色一组正体 + alt 淡体):槽位传色值字符串或
|
|
1379
|
+
* { color, opacity?, altOpacity? } 对象;null/undefined 保留默认色
|
|
2799
1380
|
*/
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
/**
|
|
2804
|
-
|
|
2805
|
-
/**
|
|
2806
|
-
|
|
2807
|
-
/**
|
|
2808
|
-
|
|
1381
|
+
colors?: (string | FvBlobHaloColor | null | undefined)[];
|
|
1382
|
+
/** 光晕尺寸(px,正圆直径;内容 svg 撑满) */
|
|
1383
|
+
size?: number;
|
|
1384
|
+
/** 光晕相对挂载点放大倍率(>1 越出挂载盒,需使用方 overflow visible) */
|
|
1385
|
+
scale?: number;
|
|
1386
|
+
/** 正体透明度(0~1;被 colors 槽位对象 opacity 覆盖) */
|
|
1387
|
+
opacity?: number;
|
|
1388
|
+
/** alt 淡体透明度(0~1;被 colors 槽位对象 altOpacity 覆盖) */
|
|
1389
|
+
altOpacity?: number;
|
|
1390
|
+
/** 旋转一周时长(s;0 停转只保留变形蠕动) */
|
|
1391
|
+
rotateDuration?: number;
|
|
1392
|
+
/** 暂停全部动画(静帧装饰) */
|
|
1393
|
+
paused?: boolean;
|
|
2809
1394
|
};
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
navigateBranch(id: string, dir: BranchDirection): string | null;
|
|
2821
|
-
setCurrent(id: string): void;
|
|
2822
|
-
getCurrentChain(): MessageNode[];
|
|
2823
|
-
getSiblings(id: string): MessageNode[];
|
|
2824
|
-
toJSON(): string;
|
|
2825
|
-
fromJSON(s: string): void;
|
|
2826
|
-
}
|
|
1395
|
+
declare const __VLS_export$a: vue.DefineComponent<__VLS_Props$a, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$a> & Readonly<{}>, {
|
|
1396
|
+
size: number;
|
|
1397
|
+
colors: (string | FvBlobHaloColor | null | undefined)[];
|
|
1398
|
+
scale: number;
|
|
1399
|
+
opacity: number;
|
|
1400
|
+
altOpacity: number;
|
|
1401
|
+
rotateDuration: number;
|
|
1402
|
+
paused: boolean;
|
|
1403
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1404
|
+
declare const _default$a: typeof __VLS_export$a;
|
|
2827
1405
|
|
|
1406
|
+
/** 写操作确认卡节点执行器(回调收 (card, kind);AiMessages/AiChat 透传) */
|
|
1407
|
+
type MessageActionCardExecutor = (card: ActionCardPayload, kind: 'confirm' | 'cancel') => Promise<ActionCardResult | void>;
|
|
2828
1408
|
/**
|
|
2829
1409
|
* 消息评价提交钩子(AiChat 透传,消费方接后端端点)。返回 resolved 即成功;
|
|
2830
1410
|
* 返回错误文案串/抛错均视为失败(乐观更新回滚,文案经 feedback-error 上抛)。
|
|
@@ -2838,7 +1418,7 @@ interface AiMessageBranchInfo {
|
|
|
2838
1418
|
/** 当前分支序号(1 起) */
|
|
2839
1419
|
index: number;
|
|
2840
1420
|
}
|
|
2841
|
-
type __VLS_Props$
|
|
1421
|
+
type __VLS_Props$9 = {
|
|
2842
1422
|
/** 消息节点(树节点代理,流式期间 content/reasoning 增长驱动更新) */
|
|
2843
1423
|
message: MessageNode;
|
|
2844
1424
|
/** 同层分支元数据;缺省视为单分支(不渲染切换器) */
|
|
@@ -2920,70 +1500,130 @@ type __VLS_Props$8 = {
|
|
|
2920
1500
|
* 乐观更新:先翻转本地 feedback 再调钩子,失败回滚并上抛 feedback-error
|
|
2921
1501
|
*/
|
|
2922
1502
|
feedbackHandler?: FeedbackHandler;
|
|
1503
|
+
/**
|
|
1504
|
+
* 写操作确认卡执行器(仅 role='action' 节点渲染;回调收 (card, kind),与
|
|
1505
|
+
* useChat ActionCardOption.execute 同构——卡载荷随节点已知,组件内包装把
|
|
1506
|
+
* 执行结果写回节点终态并上抛 action-card-settled)。缺省待确认卡按钮禁用
|
|
1507
|
+
*/
|
|
1508
|
+
actionCardExecutor?: MessageActionCardExecutor;
|
|
1509
|
+
/** 定位标记:当前要高亮的消息 id(内容搜索定位场景);命中本消息时根节点加
|
|
1510
|
+
* is-located class(主题色描边 + 淡底色 + 自动褪去动画) */
|
|
1511
|
+
locateMessageId?: string;
|
|
2923
1512
|
/** 语言包:'zh-CN'/'en'/'ko'/'vi'/'zh-HK' 整包或部分文案对象(优先于祖先注入与全局设置) */
|
|
2924
1513
|
locale?: LocaleInput;
|
|
2925
1514
|
};
|
|
1515
|
+
/**
|
|
1516
|
+
* 插槽(消费方自定义渲染):
|
|
1517
|
+
* - action-card:整体替换确认卡内容(缺省内置卡片)
|
|
1518
|
+
* - action-card-icon / action-card-title / action-card-summary / action-card-actions /
|
|
1519
|
+
* action-card-result:单独替换对应区域,标题/图标均可独立自定义
|
|
1520
|
+
* 均为 role='action' 节点(写操作确认卡)专属;载荷 = 卡片 + 状态 + 结果 + 执行回调
|
|
1521
|
+
*/
|
|
1522
|
+
type __VLS_Slots$7 = {
|
|
1523
|
+
/** 整体替换卡片(经作用域拿 execute 回调;缺省内置 ActionCard) */
|
|
1524
|
+
'action-card'?: (props: {
|
|
1525
|
+
card: ActionCardPayload;
|
|
1526
|
+
status: ActionCardStatus;
|
|
1527
|
+
result?: ActionCardResult;
|
|
1528
|
+
execute: (kind: 'confirm' | 'cancel') => void;
|
|
1529
|
+
}) => unknown;
|
|
1530
|
+
/** 卡片头部状态图标(单独自定义) */
|
|
1531
|
+
'action-card-icon'?: (props: {
|
|
1532
|
+
card: ActionCardPayload;
|
|
1533
|
+
status: ActionCardStatus;
|
|
1534
|
+
result?: ActionCardResult;
|
|
1535
|
+
}) => unknown;
|
|
1536
|
+
/** 卡片头部标题(单独自定义) */
|
|
1537
|
+
'action-card-title'?: (props: {
|
|
1538
|
+
card: ActionCardPayload;
|
|
1539
|
+
status: ActionCardStatus;
|
|
1540
|
+
result?: ActionCardResult;
|
|
1541
|
+
}) => unknown;
|
|
1542
|
+
/** 卡片预案摘要(服务端文案原样渲染) */
|
|
1543
|
+
'action-card-summary'?: (props: {
|
|
1544
|
+
card: ActionCardPayload;
|
|
1545
|
+
status: ActionCardStatus;
|
|
1546
|
+
result?: ActionCardResult;
|
|
1547
|
+
}) => unknown;
|
|
1548
|
+
/** 卡片待确认/执行中操作区(取消/确认按钮) */
|
|
1549
|
+
'action-card-actions'?: (props: {
|
|
1550
|
+
card: ActionCardPayload;
|
|
1551
|
+
status: ActionCardStatus;
|
|
1552
|
+
execute: (kind: 'confirm' | 'cancel') => void;
|
|
1553
|
+
executing: boolean;
|
|
1554
|
+
}) => unknown;
|
|
1555
|
+
/** 卡片终态结果区(成功概要/失败原因原文) */
|
|
1556
|
+
'action-card-result'?: (props: {
|
|
1557
|
+
card: ActionCardPayload;
|
|
1558
|
+
status: ActionCardStatus;
|
|
1559
|
+
result?: ActionCardResult;
|
|
1560
|
+
}) => unknown;
|
|
1561
|
+
/** 自定义头像(默认 user/assistant 内置图标;优先于细分头像插槽) */
|
|
1562
|
+
'message-avatar'?: (props: {
|
|
1563
|
+
message: MessageNode;
|
|
1564
|
+
}) => unknown;
|
|
1565
|
+
/** 自定义用户头像(优先于 userAvatar props) */
|
|
1566
|
+
'user-avatar'?: () => unknown;
|
|
1567
|
+
/** 自定义助手头像(status 为 thinking/done/error,可按状态换头像;优先于 assistantAvatar props) */
|
|
1568
|
+
'assistant-avatar'?: (props: {
|
|
1569
|
+
status: 'thinking' | 'done' | 'error';
|
|
1570
|
+
message: MessageNode;
|
|
1571
|
+
}) => unknown;
|
|
1572
|
+
/** 自定义用户名称(优先于 userName props) */
|
|
1573
|
+
'user-name'?: (props: {
|
|
1574
|
+
message: MessageNode;
|
|
1575
|
+
}) => unknown;
|
|
1576
|
+
/** 自定义助手名称(优先于 assistantName props) */
|
|
1577
|
+
'assistant-name'?: (props: {
|
|
1578
|
+
message: MessageNode;
|
|
1579
|
+
}) => unknown;
|
|
1580
|
+
/** 自定义附件渲染(默认:图片缩略图按钮(点击内置放大预览),文档 FilesCard 卡片) */
|
|
1581
|
+
'message-files'?: (props: {
|
|
1582
|
+
message: MessageNode;
|
|
1583
|
+
files: ChatFile[];
|
|
1584
|
+
}) => unknown;
|
|
1585
|
+
/** 自定义操作区(默认复制/重生成按钮) */
|
|
1586
|
+
'message-actions'?: (props: {
|
|
1587
|
+
message: MessageNode;
|
|
1588
|
+
}) => unknown;
|
|
1589
|
+
/** 写操作确认卡挂载点(AiMessages 把 anchorId 命中本消息的卡投此插槽) */
|
|
1590
|
+
'action-cards'?: () => unknown;
|
|
1591
|
+
};
|
|
2926
1592
|
/** 展开/折叠本条消息的思考链(user 消息与无思考链消息调用无效) */
|
|
2927
1593
|
declare function expandThoughtChain(): void;
|
|
2928
1594
|
declare function collapseThoughtChain(): void;
|
|
2929
|
-
declare
|
|
2930
|
-
message: MessageNode;
|
|
2931
|
-
};
|
|
2932
|
-
declare var __VLS_3: {};
|
|
2933
|
-
declare var __VLS_16$2: {
|
|
2934
|
-
status: "thinking" | "error" | "done";
|
|
2935
|
-
message: MessageNode;
|
|
2936
|
-
};
|
|
2937
|
-
declare var __VLS_18$1: {
|
|
2938
|
-
message: MessageNode;
|
|
2939
|
-
};
|
|
2940
|
-
declare var __VLS_20$1: {
|
|
2941
|
-
message: MessageNode;
|
|
2942
|
-
};
|
|
2943
|
-
declare var __VLS_22: {
|
|
2944
|
-
message: MessageNode;
|
|
2945
|
-
files: ChatFile[];
|
|
2946
|
-
};
|
|
2947
|
-
declare var __VLS_80: {
|
|
2948
|
-
message: MessageNode;
|
|
2949
|
-
};
|
|
2950
|
-
type __VLS_Slots$6 = {} & {
|
|
2951
|
-
'message-avatar'?: (props: typeof __VLS_1$1) => any;
|
|
2952
|
-
} & {
|
|
2953
|
-
'user-avatar'?: (props: typeof __VLS_3) => any;
|
|
2954
|
-
} & {
|
|
2955
|
-
'assistant-avatar'?: (props: typeof __VLS_16$2) => any;
|
|
2956
|
-
} & {
|
|
2957
|
-
'user-name'?: (props: typeof __VLS_18$1) => any;
|
|
2958
|
-
} & {
|
|
2959
|
-
'assistant-name'?: (props: typeof __VLS_20$1) => any;
|
|
2960
|
-
} & {
|
|
2961
|
-
'message-files'?: (props: typeof __VLS_22) => any;
|
|
2962
|
-
} & {
|
|
2963
|
-
'message-actions'?: (props: typeof __VLS_80) => any;
|
|
2964
|
-
};
|
|
2965
|
-
declare const __VLS_base$6: vue.DefineComponent<__VLS_Props$8, {
|
|
1595
|
+
declare const __VLS_base$7: vue.DefineComponent<__VLS_Props$9, {
|
|
2966
1596
|
message: vue.ComputedRef<MessageNode>;
|
|
2967
1597
|
expandThoughtChain: typeof expandThoughtChain;
|
|
2968
1598
|
collapseThoughtChain: typeof collapseThoughtChain;
|
|
2969
1599
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
1600
|
+
typing: () => any;
|
|
2970
1601
|
copy: (message: MessageNode) => any;
|
|
2971
1602
|
regenerate: (message: MessageNode) => any;
|
|
2972
|
-
typing: () => any;
|
|
2973
1603
|
"branch-change": (dir: BranchDirection, message: MessageNode) => any;
|
|
2974
1604
|
"followup-select": (item: string, message: MessageNode) => any;
|
|
2975
1605
|
"file-click": (file: ChatFile, message: MessageNode) => any;
|
|
2976
1606
|
"feedback-change": (message: MessageNode, action: "LIKE" | "DISLIKE" | "CLEAR") => any;
|
|
2977
1607
|
"feedback-error": (message: string) => any;
|
|
2978
|
-
|
|
1608
|
+
"action-card-settled": (info: {
|
|
1609
|
+
card: ActionCardPayload;
|
|
1610
|
+
status: Exclude<ActionCardStatus, "pending" | "loading">;
|
|
1611
|
+
result?: ActionCardResult;
|
|
1612
|
+
}) => any;
|
|
1613
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$9> & Readonly<{
|
|
1614
|
+
onTyping?: (() => any) | undefined;
|
|
2979
1615
|
onCopy?: ((message: MessageNode) => any) | undefined;
|
|
2980
1616
|
onRegenerate?: ((message: MessageNode) => any) | undefined;
|
|
2981
|
-
onTyping?: (() => any) | undefined;
|
|
2982
1617
|
"onBranch-change"?: ((dir: BranchDirection, message: MessageNode) => any) | undefined;
|
|
2983
1618
|
"onFollowup-select"?: ((item: string, message: MessageNode) => any) | undefined;
|
|
2984
1619
|
"onFile-click"?: ((file: ChatFile, message: MessageNode) => any) | undefined;
|
|
2985
1620
|
"onFeedback-change"?: ((message: MessageNode, action: "LIKE" | "DISLIKE" | "CLEAR") => any) | undefined;
|
|
2986
1621
|
"onFeedback-error"?: ((message: string) => any) | undefined;
|
|
1622
|
+
"onAction-card-settled"?: ((info: {
|
|
1623
|
+
card: ActionCardPayload;
|
|
1624
|
+
status: Exclude<ActionCardStatus, "pending" | "loading">;
|
|
1625
|
+
result?: ActionCardResult;
|
|
1626
|
+
}) => any) | undefined;
|
|
2987
1627
|
}>, {
|
|
2988
1628
|
typing: boolean | {
|
|
2989
1629
|
step?: number;
|
|
@@ -3012,11 +1652,13 @@ declare const __VLS_base$6: vue.DefineComponent<__VLS_Props$8, {
|
|
|
3012
1652
|
timeFormat: (message: MessageNode, timestamp: number) => string;
|
|
3013
1653
|
resolveFileUrl: (file: ChatFile) => Promise<string> | string;
|
|
3014
1654
|
feedbackHandler: FeedbackHandler;
|
|
1655
|
+
actionCardExecutor: MessageActionCardExecutor;
|
|
1656
|
+
locateMessageId: string;
|
|
3015
1657
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
3016
|
-
declare const __VLS_export$
|
|
3017
|
-
declare const _default$
|
|
1658
|
+
declare const __VLS_export$9: __VLS_WithSlots$7<typeof __VLS_base$7, __VLS_Slots$7>;
|
|
1659
|
+
declare const _default$9: typeof __VLS_export$9;
|
|
3018
1660
|
|
|
3019
|
-
type __VLS_WithSlots$
|
|
1661
|
+
type __VLS_WithSlots$7<T, S> = T & {
|
|
3020
1662
|
new (): {
|
|
3021
1663
|
$slots: S;
|
|
3022
1664
|
};
|
|
@@ -3030,7 +1672,7 @@ interface AiMessagesSuggestion {
|
|
|
3030
1672
|
icon?: string | Component;
|
|
3031
1673
|
disabled?: boolean;
|
|
3032
1674
|
}
|
|
3033
|
-
type __VLS_Props$
|
|
1675
|
+
type __VLS_Props$8 = {
|
|
3034
1676
|
/** 当前链消息(根 → 焦点,时间正序) */
|
|
3035
1677
|
messages: MessageNode[];
|
|
3036
1678
|
/** 全量节点表(分支计算需查父节点 childrenIds) */
|
|
@@ -3119,6 +1761,16 @@ type __VLS_Props$7 = {
|
|
|
3119
1761
|
* 缺省不渲染)。点击 👍/👎 经此上抛消费方端点,乐观更新失败回滚
|
|
3120
1762
|
*/
|
|
3121
1763
|
feedbackHandler?: FeedbackHandler;
|
|
1764
|
+
/** 写操作确认卡执行器(透传 AiMessage→ActionCard;仅 role='action' 节点消费) */
|
|
1765
|
+
actionCardExecutor?: MessageActionCardExecutor;
|
|
1766
|
+
/** 定位标记消息 id(透传 AiMessage;内容搜索定位场景,命中消息加 is-located 高亮) */
|
|
1767
|
+
locateMessageId?: string;
|
|
1768
|
+
/**
|
|
1769
|
+
* 在途确认卡(流式 SSE 建卡 + 历史回放灌入):默认渲染在所属 assistant 下
|
|
1770
|
+
* (action.anchorId 指向的节点,多轮写操作各自贴在对应回答下方;anchorId 缺省/
|
|
1771
|
+
* 锚已删除回落消息流末尾,锚在其它分支的卡隐藏不渲染)
|
|
1772
|
+
*/
|
|
1773
|
+
actionCards?: MessageNode[];
|
|
3122
1774
|
/** 语言包:'zh-CN'/'en'/'ko'/'vi'/'zh-HK' 整包或部分文案对象(优先于祖先注入与全局设置) */
|
|
3123
1775
|
locale?: LocaleInput;
|
|
3124
1776
|
};
|
|
@@ -3139,33 +1791,97 @@ declare var __VLS_10: {};
|
|
|
3139
1791
|
declare var __VLS_13: {};
|
|
3140
1792
|
declare var __VLS_16$1: {};
|
|
3141
1793
|
declare var __VLS_19: {};
|
|
3142
|
-
declare var __VLS_30: {};
|
|
3143
|
-
declare var __VLS_51: {};
|
|
3144
|
-
declare var __VLS_53
|
|
3145
|
-
declare var __VLS_74
|
|
3146
|
-
declare var
|
|
1794
|
+
declare var __VLS_30$1: {};
|
|
1795
|
+
declare var __VLS_51$2: {};
|
|
1796
|
+
declare var __VLS_53: {};
|
|
1797
|
+
declare var __VLS_74: {};
|
|
1798
|
+
declare var __VLS_93$1: {
|
|
3147
1799
|
message: MessageNode;
|
|
3148
1800
|
};
|
|
3149
|
-
declare var
|
|
1801
|
+
declare var __VLS_96: {
|
|
3150
1802
|
message: MessageNode;
|
|
3151
1803
|
};
|
|
3152
|
-
declare var
|
|
3153
|
-
declare var
|
|
3154
|
-
status: "thinking" | "
|
|
1804
|
+
declare var __VLS_99: {};
|
|
1805
|
+
declare var __VLS_102: {
|
|
1806
|
+
status: "thinking" | "done" | "error";
|
|
3155
1807
|
message: MessageNode;
|
|
3156
1808
|
};
|
|
3157
|
-
declare var
|
|
1809
|
+
declare var __VLS_105: {
|
|
3158
1810
|
message: MessageNode;
|
|
3159
1811
|
};
|
|
3160
|
-
declare var
|
|
1812
|
+
declare var __VLS_108: {
|
|
3161
1813
|
message: MessageNode;
|
|
3162
1814
|
};
|
|
3163
|
-
declare var
|
|
1815
|
+
declare var __VLS_120: {
|
|
1816
|
+
card: _fv_ui_ai_chat_core.ActionCardPayload;
|
|
1817
|
+
status: _fv_ui_ai_chat_core.ActionCardStatus;
|
|
1818
|
+
result?: _fv_ui_ai_chat_core.ActionCardResult;
|
|
1819
|
+
execute: (kind: "confirm" | "cancel") => void;
|
|
1820
|
+
};
|
|
1821
|
+
declare var __VLS_123: {
|
|
1822
|
+
card: _fv_ui_ai_chat_core.ActionCardPayload;
|
|
1823
|
+
status: _fv_ui_ai_chat_core.ActionCardStatus;
|
|
1824
|
+
result?: _fv_ui_ai_chat_core.ActionCardResult;
|
|
1825
|
+
};
|
|
1826
|
+
declare var __VLS_126: {
|
|
1827
|
+
card: _fv_ui_ai_chat_core.ActionCardPayload;
|
|
1828
|
+
status: _fv_ui_ai_chat_core.ActionCardStatus;
|
|
1829
|
+
result?: _fv_ui_ai_chat_core.ActionCardResult;
|
|
1830
|
+
};
|
|
1831
|
+
declare var __VLS_129: {
|
|
1832
|
+
card: _fv_ui_ai_chat_core.ActionCardPayload;
|
|
1833
|
+
status: _fv_ui_ai_chat_core.ActionCardStatus;
|
|
1834
|
+
result?: _fv_ui_ai_chat_core.ActionCardResult;
|
|
1835
|
+
};
|
|
1836
|
+
declare var __VLS_132$1: {
|
|
1837
|
+
card: _fv_ui_ai_chat_core.ActionCardPayload;
|
|
1838
|
+
status: _fv_ui_ai_chat_core.ActionCardStatus;
|
|
1839
|
+
execute: (kind: "confirm" | "cancel") => void;
|
|
1840
|
+
executing: boolean;
|
|
1841
|
+
};
|
|
1842
|
+
declare var __VLS_135: {
|
|
1843
|
+
card: _fv_ui_ai_chat_core.ActionCardPayload;
|
|
1844
|
+
status: _fv_ui_ai_chat_core.ActionCardStatus;
|
|
1845
|
+
result?: _fv_ui_ai_chat_core.ActionCardResult;
|
|
1846
|
+
};
|
|
1847
|
+
declare var __VLS_146: {
|
|
1848
|
+
card: _fv_ui_ai_chat_core.ActionCardPayload;
|
|
1849
|
+
status: _fv_ui_ai_chat_core.ActionCardStatus;
|
|
1850
|
+
result?: _fv_ui_ai_chat_core.ActionCardResult;
|
|
1851
|
+
execute: (kind: "confirm" | "cancel") => void;
|
|
1852
|
+
};
|
|
1853
|
+
declare var __VLS_149: {
|
|
1854
|
+
card: _fv_ui_ai_chat_core.ActionCardPayload;
|
|
1855
|
+
status: _fv_ui_ai_chat_core.ActionCardStatus;
|
|
1856
|
+
result?: _fv_ui_ai_chat_core.ActionCardResult;
|
|
1857
|
+
};
|
|
1858
|
+
declare var __VLS_152: {
|
|
1859
|
+
card: _fv_ui_ai_chat_core.ActionCardPayload;
|
|
1860
|
+
status: _fv_ui_ai_chat_core.ActionCardStatus;
|
|
1861
|
+
result?: _fv_ui_ai_chat_core.ActionCardResult;
|
|
1862
|
+
};
|
|
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;
|
|
1867
|
+
};
|
|
1868
|
+
declare var __VLS_158: {
|
|
1869
|
+
card: _fv_ui_ai_chat_core.ActionCardPayload;
|
|
1870
|
+
status: _fv_ui_ai_chat_core.ActionCardStatus;
|
|
1871
|
+
execute: (kind: "confirm" | "cancel") => void;
|
|
1872
|
+
executing: boolean;
|
|
1873
|
+
};
|
|
1874
|
+
declare var __VLS_161: {
|
|
1875
|
+
card: _fv_ui_ai_chat_core.ActionCardPayload;
|
|
1876
|
+
status: _fv_ui_ai_chat_core.ActionCardStatus;
|
|
1877
|
+
result?: _fv_ui_ai_chat_core.ActionCardResult;
|
|
1878
|
+
};
|
|
1879
|
+
declare var __VLS_169: {
|
|
3164
1880
|
scrollToBottom: typeof scrollToBottom;
|
|
3165
1881
|
awayFromBottom: boolean;
|
|
3166
1882
|
};
|
|
3167
|
-
declare var
|
|
3168
|
-
type __VLS_Slots$
|
|
1883
|
+
declare var __VLS_185: {};
|
|
1884
|
+
type __VLS_Slots$6 = {} & {
|
|
3169
1885
|
empty?: (props: typeof __VLS_1) => any;
|
|
3170
1886
|
} & {
|
|
3171
1887
|
'welcome-name'?: (props: typeof __VLS_10) => any;
|
|
@@ -3176,31 +1892,55 @@ type __VLS_Slots$5 = {} & {
|
|
|
3176
1892
|
} & {
|
|
3177
1893
|
'welcome-suggestions'?: (props: typeof __VLS_19) => any;
|
|
3178
1894
|
} & {
|
|
3179
|
-
'refresh-suggestions'?: (props: typeof __VLS_30) => any;
|
|
1895
|
+
'refresh-suggestions'?: (props: typeof __VLS_30$1) => any;
|
|
1896
|
+
} & {
|
|
1897
|
+
'suggestions-footer'?: (props: typeof __VLS_51$2) => any;
|
|
1898
|
+
} & {
|
|
1899
|
+
'refresh-suggestions'?: (props: typeof __VLS_53) => any;
|
|
1900
|
+
} & {
|
|
1901
|
+
'suggestions-footer'?: (props: typeof __VLS_74) => any;
|
|
1902
|
+
} & {
|
|
1903
|
+
'message-avatar'?: (props: typeof __VLS_93$1) => any;
|
|
1904
|
+
} & {
|
|
1905
|
+
'message-actions'?: (props: typeof __VLS_96) => any;
|
|
3180
1906
|
} & {
|
|
3181
|
-
'
|
|
1907
|
+
'user-avatar'?: (props: typeof __VLS_99) => any;
|
|
3182
1908
|
} & {
|
|
3183
|
-
'
|
|
1909
|
+
'assistant-avatar'?: (props: typeof __VLS_102) => any;
|
|
3184
1910
|
} & {
|
|
3185
|
-
'
|
|
1911
|
+
'user-name'?: (props: typeof __VLS_105) => any;
|
|
3186
1912
|
} & {
|
|
3187
|
-
'
|
|
1913
|
+
'assistant-name'?: (props: typeof __VLS_108) => any;
|
|
3188
1914
|
} & {
|
|
3189
|
-
'
|
|
1915
|
+
'action-card'?: (props: typeof __VLS_120) => any;
|
|
3190
1916
|
} & {
|
|
3191
|
-
'
|
|
1917
|
+
'action-card-icon'?: (props: typeof __VLS_123) => any;
|
|
3192
1918
|
} & {
|
|
3193
|
-
'
|
|
1919
|
+
'action-card-title'?: (props: typeof __VLS_126) => any;
|
|
3194
1920
|
} & {
|
|
3195
|
-
'
|
|
1921
|
+
'action-card-summary'?: (props: typeof __VLS_129) => any;
|
|
3196
1922
|
} & {
|
|
3197
|
-
'
|
|
1923
|
+
'action-card-actions'?: (props: typeof __VLS_132$1) => any;
|
|
3198
1924
|
} & {
|
|
3199
|
-
'
|
|
1925
|
+
'action-card-result'?: (props: typeof __VLS_135) => any;
|
|
3200
1926
|
} & {
|
|
3201
|
-
'
|
|
1927
|
+
'action-card'?: (props: typeof __VLS_146) => any;
|
|
1928
|
+
} & {
|
|
1929
|
+
'action-card-icon'?: (props: typeof __VLS_149) => any;
|
|
1930
|
+
} & {
|
|
1931
|
+
'action-card-title'?: (props: typeof __VLS_152) => any;
|
|
1932
|
+
} & {
|
|
1933
|
+
'action-card-summary'?: (props: typeof __VLS_155) => any;
|
|
1934
|
+
} & {
|
|
1935
|
+
'action-card-actions'?: (props: typeof __VLS_158) => any;
|
|
1936
|
+
} & {
|
|
1937
|
+
'action-card-result'?: (props: typeof __VLS_161) => any;
|
|
1938
|
+
} & {
|
|
1939
|
+
'scroll-button'?: (props: typeof __VLS_169) => any;
|
|
1940
|
+
} & {
|
|
1941
|
+
'scroll-button-icon'?: (props: typeof __VLS_185) => any;
|
|
3202
1942
|
};
|
|
3203
|
-
declare const __VLS_base$
|
|
1943
|
+
declare const __VLS_base$6: vue.DefineComponent<__VLS_Props$8, {
|
|
3204
1944
|
scrollTo: typeof scrollTo$1;
|
|
3205
1945
|
scrollToBottom: typeof scrollToBottom;
|
|
3206
1946
|
scrollToTop: typeof scrollToTop;
|
|
@@ -3208,28 +1948,37 @@ declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$7, {
|
|
|
3208
1948
|
collapseThoughtChains: typeof collapseThoughtChains$1;
|
|
3209
1949
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
3210
1950
|
scroll: (event: Event) => any;
|
|
1951
|
+
select: (item: AiMessagesSuggestion) => any;
|
|
3211
1952
|
copy: (message: MessageNode) => any;
|
|
3212
1953
|
regenerate: (message: MessageNode) => any;
|
|
3213
|
-
select: (item: AiMessagesSuggestion) => any;
|
|
3214
1954
|
"branch-change": (dir: BranchDirection, message: MessageNode) => any;
|
|
3215
1955
|
"followup-select": (item: string, message: MessageNode) => any;
|
|
3216
1956
|
"feedback-change": (message: MessageNode, action: "LIKE" | "DISLIKE" | "CLEAR") => any;
|
|
3217
1957
|
"feedback-error": (message: string) => any;
|
|
1958
|
+
"action-card-settled": (info: {
|
|
1959
|
+
card: ActionCardPayload;
|
|
1960
|
+
status: Exclude<ActionCardStatus, "pending" | "loading">;
|
|
1961
|
+
result?: ActionCardResult;
|
|
1962
|
+
}) => any;
|
|
3218
1963
|
"message-file-click": (file: ChatFile, message: MessageNode) => any;
|
|
3219
1964
|
"refresh-suggestions": () => any;
|
|
3220
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
1965
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$8> & Readonly<{
|
|
3221
1966
|
onScroll?: ((event: Event) => any) | undefined;
|
|
1967
|
+
onSelect?: ((item: AiMessagesSuggestion) => any) | undefined;
|
|
3222
1968
|
onCopy?: ((message: MessageNode) => any) | undefined;
|
|
3223
1969
|
onRegenerate?: ((message: MessageNode) => any) | undefined;
|
|
3224
|
-
onSelect?: ((item: AiMessagesSuggestion) => any) | undefined;
|
|
3225
1970
|
"onBranch-change"?: ((dir: BranchDirection, message: MessageNode) => any) | undefined;
|
|
3226
1971
|
"onFollowup-select"?: ((item: string, message: MessageNode) => any) | undefined;
|
|
3227
1972
|
"onFeedback-change"?: ((message: MessageNode, action: "LIKE" | "DISLIKE" | "CLEAR") => any) | undefined;
|
|
3228
1973
|
"onFeedback-error"?: ((message: string) => any) | undefined;
|
|
1974
|
+
"onAction-card-settled"?: ((info: {
|
|
1975
|
+
card: ActionCardPayload;
|
|
1976
|
+
status: Exclude<ActionCardStatus, "pending" | "loading">;
|
|
1977
|
+
result?: ActionCardResult;
|
|
1978
|
+
}) => any) | undefined;
|
|
3229
1979
|
"onMessage-file-click"?: ((file: ChatFile, message: MessageNode) => any) | undefined;
|
|
3230
1980
|
"onRefresh-suggestions"?: (() => any) | undefined;
|
|
3231
1981
|
}>, {
|
|
3232
|
-
description: string;
|
|
3233
1982
|
name: string;
|
|
3234
1983
|
icon: string | Component;
|
|
3235
1984
|
typing: boolean | {
|
|
@@ -3240,6 +1989,7 @@ declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$7, {
|
|
|
3240
1989
|
autoCollapse: boolean;
|
|
3241
1990
|
collapsible: boolean;
|
|
3242
1991
|
showDuration: boolean;
|
|
1992
|
+
description: string;
|
|
3243
1993
|
suggestions: AiMessagesSuggestion[];
|
|
3244
1994
|
followupStyle: "list" | "chips";
|
|
3245
1995
|
showActions: boolean;
|
|
@@ -3259,6 +2009,8 @@ declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$7, {
|
|
|
3259
2009
|
timeFormat: (message: MessageNode, timestamp: number) => string;
|
|
3260
2010
|
resolveFileUrl: (file: ChatFile) => Promise<string> | string;
|
|
3261
2011
|
feedbackHandler: FeedbackHandler;
|
|
2012
|
+
actionCardExecutor: MessageActionCardExecutor;
|
|
2013
|
+
locateMessageId: string;
|
|
3262
2014
|
suggestionsTitle: string;
|
|
3263
2015
|
suggestionsWrap: boolean;
|
|
3264
2016
|
welcomeLayout: "horizontal" | "vertical";
|
|
@@ -3267,11 +2019,12 @@ declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$7, {
|
|
|
3267
2019
|
scrollThreshold: number;
|
|
3268
2020
|
showScrollButton: boolean;
|
|
3269
2021
|
scrollButtonThreshold: number;
|
|
2022
|
+
actionCards: MessageNode[];
|
|
3270
2023
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
3271
|
-
declare const __VLS_export$
|
|
3272
|
-
declare const _default$
|
|
2024
|
+
declare const __VLS_export$8: __VLS_WithSlots$6<typeof __VLS_base$6, __VLS_Slots$6>;
|
|
2025
|
+
declare const _default$8: typeof __VLS_export$8;
|
|
3273
2026
|
|
|
3274
|
-
type __VLS_WithSlots$
|
|
2027
|
+
type __VLS_WithSlots$6<T, S> = T & {
|
|
3275
2028
|
new (): {
|
|
3276
2029
|
$slots: S;
|
|
3277
2030
|
};
|
|
@@ -3301,7 +2054,7 @@ interface AiChatFeatures {
|
|
|
3301
2054
|
continueGenerate?: boolean;
|
|
3302
2055
|
fullscreenEditor?: boolean;
|
|
3303
2056
|
}
|
|
3304
|
-
type __VLS_Props$
|
|
2057
|
+
type __VLS_Props$7 = {
|
|
3305
2058
|
/** 默认模型(顶栏单选展示;未传 models 时作为单模型) */
|
|
3306
2059
|
model?: string;
|
|
3307
2060
|
/** 可选模型列表(multiple 选择器) */
|
|
@@ -3416,6 +2169,15 @@ type __VLS_Props$6 = {
|
|
|
3416
2169
|
accept?: string;
|
|
3417
2170
|
/** 附件数量上限(透传 Attachments,0 不限) */
|
|
3418
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;
|
|
3419
2181
|
/**
|
|
3420
2182
|
* 附件上传钩子(先传后发):选文件即调,成功返回附件描述(id/name/type 等回填列表项,
|
|
3421
2183
|
* id 随发送进入 adapter 的 user 消息 files);返回错误文案串/抛错置 error 可重传。
|
|
@@ -3435,8 +2197,25 @@ type __VLS_Props$6 = {
|
|
|
3435
2197
|
* feedback-error(乐观更新已回滚)。action=CLEAR 取消评价(comment 忽略)
|
|
3436
2198
|
*/
|
|
3437
2199
|
feedbackHandler?: FeedbackHandler;
|
|
2200
|
+
/**
|
|
2201
|
+
* 写操作确认卡选项(V59+「预案-确认-执行」):SSE action_card 事件由 adapter
|
|
2202
|
+
* 上抛后库内就地建卡(消息流末尾,0..N 张),确认/取消经 execute 走消费方带外
|
|
2203
|
+
* 端点(非 SSE);**缺省或未带 execute 即整特性关闭**——卡片不渲染、事件被
|
|
2204
|
+
* 容错丢弃(无执行器的待确认卡按钮禁用是纯负担)。历史回放卡经 actionCards
|
|
2205
|
+
* prop 由宿主自行控制,不受此开关影响
|
|
2206
|
+
*/
|
|
2207
|
+
actionCardOption?: ActionCardOption;
|
|
2208
|
+
/**
|
|
2209
|
+
* 初始确认卡列表(历史回放恢复):一次性深拷贝灌入(半受控,与 messages 同
|
|
2210
|
+
* 语义,运行期更换 prop 不生效)——卡片独立于消息树渲染,action.anchorId
|
|
2211
|
+
* 指向所属 assistant 消息 id 时锚定渲染在其下,缺省/锚已删除回落消息流末尾,
|
|
2212
|
+
* 锚在其它分支的卡隐藏不渲染;clearMessages 整框重置会一并清空
|
|
2213
|
+
*/
|
|
2214
|
+
actionCards?: MessageNode[];
|
|
3438
2215
|
/** 主题:light/dark/auto(注入 html dark class) */
|
|
3439
2216
|
theme?: 'light' | 'dark' | 'auto';
|
|
2217
|
+
/** 定位标记消息 id(透传 AiMessages→AiMessage;内容搜索定位场景,命中气泡加主题色描边+淡底+褪去动画) */
|
|
2218
|
+
locateMessageId?: string;
|
|
3440
2219
|
/** 语言包:'zh-CN'/'en'/'ko'/'vi'/'zh-HK' 整包或部分文案对象;解析后向整框后代注入(后代仍可用自身 locale prop 覆盖) */
|
|
3441
2220
|
locale?: LocaleInput;
|
|
3442
2221
|
};
|
|
@@ -3447,7 +2226,7 @@ declare function regenerate(messageId?: string): void;
|
|
|
3447
2226
|
declare function sendMessage(text: string, files?: ChatFile[]): void;
|
|
3448
2227
|
/** 向指定消息追加文本(编辑/续写场景) */
|
|
3449
2228
|
declare function appendToMessage(id: string, text: string): void;
|
|
3450
|
-
/**
|
|
2229
|
+
/** 清空消息树与在途确认卡(整框重置;卡不随树删联动,须一并清防孤儿残留尾部) */
|
|
3451
2230
|
declare function clearMessages(): void;
|
|
3452
2231
|
/** 导出当前链为纯文本(角色: 内容 逐条) */
|
|
3453
2232
|
declare function exportTxt(): string;
|
|
@@ -3459,70 +2238,117 @@ declare function expandThoughtChains(): void;
|
|
|
3459
2238
|
declare function collapseThoughtChains(): void;
|
|
3460
2239
|
/** 消息区滚动到指定位置(透传 AiMessages scrollTo;options 同原生 ScrollToOptions) */
|
|
3461
2240
|
declare function scrollTo(options: ScrollToOptions | number): void;
|
|
3462
|
-
declare var
|
|
2241
|
+
declare var __VLS_33$1: {
|
|
3463
2242
|
message: MessageNode;
|
|
3464
2243
|
};
|
|
3465
|
-
declare var
|
|
2244
|
+
declare var __VLS_36$1: {
|
|
3466
2245
|
message: MessageNode;
|
|
3467
2246
|
};
|
|
3468
|
-
declare var
|
|
3469
|
-
declare var
|
|
3470
|
-
status: "thinking" | "
|
|
2247
|
+
declare var __VLS_39$1: {};
|
|
2248
|
+
declare var __VLS_42$1: {
|
|
2249
|
+
status: "thinking" | "done" | "error";
|
|
3471
2250
|
message: MessageNode;
|
|
3472
2251
|
};
|
|
3473
|
-
declare var
|
|
2252
|
+
declare var __VLS_45$1: {
|
|
3474
2253
|
message: MessageNode;
|
|
3475
2254
|
};
|
|
3476
|
-
declare var
|
|
2255
|
+
declare var __VLS_48$1: {
|
|
3477
2256
|
message: MessageNode;
|
|
3478
2257
|
};
|
|
3479
|
-
declare var
|
|
3480
|
-
declare var
|
|
3481
|
-
declare var
|
|
3482
|
-
declare var
|
|
3483
|
-
declare var
|
|
3484
|
-
declare var
|
|
3485
|
-
declare var
|
|
3486
|
-
declare var
|
|
2258
|
+
declare var __VLS_51$1: {};
|
|
2259
|
+
declare var __VLS_54$1: {};
|
|
2260
|
+
declare var __VLS_57$1: {};
|
|
2261
|
+
declare var __VLS_60$1: {};
|
|
2262
|
+
declare var __VLS_63: {};
|
|
2263
|
+
declare var __VLS_66: {};
|
|
2264
|
+
declare var __VLS_69: {};
|
|
2265
|
+
declare var __VLS_72: {
|
|
3487
2266
|
scrollToBottom: (smooth?: boolean) => void;
|
|
3488
2267
|
awayFromBottom: boolean;
|
|
3489
2268
|
};
|
|
3490
|
-
declare var
|
|
3491
|
-
declare var
|
|
3492
|
-
|
|
3493
|
-
|
|
2269
|
+
declare var __VLS_75: {};
|
|
2270
|
+
declare var __VLS_78: {
|
|
2271
|
+
card: ActionCardPayload;
|
|
2272
|
+
status: ActionCardStatus;
|
|
2273
|
+
result?: ActionCardResult;
|
|
2274
|
+
execute: (kind: "confirm" | "cancel") => void;
|
|
2275
|
+
};
|
|
2276
|
+
declare var __VLS_81: {
|
|
2277
|
+
card: ActionCardPayload;
|
|
2278
|
+
status: ActionCardStatus;
|
|
2279
|
+
result?: ActionCardResult;
|
|
2280
|
+
};
|
|
2281
|
+
declare var __VLS_84: {
|
|
2282
|
+
card: ActionCardPayload;
|
|
2283
|
+
status: ActionCardStatus;
|
|
2284
|
+
result?: ActionCardResult;
|
|
2285
|
+
};
|
|
2286
|
+
declare var __VLS_87: {
|
|
2287
|
+
card: ActionCardPayload;
|
|
2288
|
+
status: ActionCardStatus;
|
|
2289
|
+
result?: ActionCardResult;
|
|
2290
|
+
};
|
|
2291
|
+
declare var __VLS_90: {
|
|
2292
|
+
card: ActionCardPayload;
|
|
2293
|
+
status: ActionCardStatus;
|
|
2294
|
+
execute: (kind: "confirm" | "cancel") => void;
|
|
2295
|
+
executing: boolean;
|
|
2296
|
+
};
|
|
2297
|
+
declare var __VLS_93: {
|
|
2298
|
+
card: ActionCardPayload;
|
|
2299
|
+
status: ActionCardStatus;
|
|
2300
|
+
result?: ActionCardResult;
|
|
2301
|
+
};
|
|
2302
|
+
declare var __VLS_132: {};
|
|
2303
|
+
declare var __VLS_134: {};
|
|
2304
|
+
type __VLS_Slots$5 = {} & {
|
|
2305
|
+
'message-avatar'?: (props: typeof __VLS_33$1) => any;
|
|
2306
|
+
} & {
|
|
2307
|
+
'message-actions'?: (props: typeof __VLS_36$1) => any;
|
|
2308
|
+
} & {
|
|
2309
|
+
'user-avatar'?: (props: typeof __VLS_39$1) => any;
|
|
2310
|
+
} & {
|
|
2311
|
+
'assistant-avatar'?: (props: typeof __VLS_42$1) => any;
|
|
3494
2312
|
} & {
|
|
3495
|
-
'
|
|
2313
|
+
'user-name'?: (props: typeof __VLS_45$1) => any;
|
|
3496
2314
|
} & {
|
|
3497
|
-
'
|
|
2315
|
+
'assistant-name'?: (props: typeof __VLS_48$1) => any;
|
|
3498
2316
|
} & {
|
|
3499
|
-
|
|
2317
|
+
empty?: (props: typeof __VLS_51$1) => any;
|
|
3500
2318
|
} & {
|
|
3501
|
-
'
|
|
2319
|
+
'welcome-name'?: (props: typeof __VLS_54$1) => any;
|
|
3502
2320
|
} & {
|
|
3503
|
-
'
|
|
2321
|
+
'welcome-description'?: (props: typeof __VLS_57$1) => any;
|
|
3504
2322
|
} & {
|
|
3505
|
-
|
|
2323
|
+
'welcome-icon'?: (props: typeof __VLS_60$1) => any;
|
|
3506
2324
|
} & {
|
|
3507
|
-
'welcome-
|
|
2325
|
+
'welcome-suggestions'?: (props: typeof __VLS_63) => any;
|
|
3508
2326
|
} & {
|
|
3509
|
-
'
|
|
2327
|
+
'refresh-suggestions'?: (props: typeof __VLS_66) => any;
|
|
3510
2328
|
} & {
|
|
3511
|
-
'
|
|
2329
|
+
'suggestions-footer'?: (props: typeof __VLS_69) => any;
|
|
3512
2330
|
} & {
|
|
3513
|
-
'
|
|
2331
|
+
'scroll-button'?: (props: typeof __VLS_72) => any;
|
|
3514
2332
|
} & {
|
|
3515
|
-
'
|
|
2333
|
+
'scroll-button-icon'?: (props: typeof __VLS_75) => any;
|
|
3516
2334
|
} & {
|
|
3517
|
-
'
|
|
2335
|
+
'action-card'?: (props: typeof __VLS_78) => any;
|
|
3518
2336
|
} & {
|
|
3519
|
-
'
|
|
2337
|
+
'action-card-icon'?: (props: typeof __VLS_81) => any;
|
|
3520
2338
|
} & {
|
|
3521
|
-
'
|
|
2339
|
+
'action-card-title'?: (props: typeof __VLS_84) => any;
|
|
3522
2340
|
} & {
|
|
3523
|
-
'
|
|
2341
|
+
'action-card-summary'?: (props: typeof __VLS_87) => any;
|
|
2342
|
+
} & {
|
|
2343
|
+
'action-card-actions'?: (props: typeof __VLS_90) => any;
|
|
2344
|
+
} & {
|
|
2345
|
+
'action-card-result'?: (props: typeof __VLS_93) => any;
|
|
2346
|
+
} & {
|
|
2347
|
+
'sender-prefix'?: (props: typeof __VLS_132) => any;
|
|
2348
|
+
} & {
|
|
2349
|
+
'drop-mask'?: (props: typeof __VLS_134) => any;
|
|
3524
2350
|
};
|
|
3525
|
-
declare const __VLS_base$
|
|
2351
|
+
declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$7, {
|
|
3526
2352
|
sendMessage: typeof sendMessage;
|
|
3527
2353
|
stop: typeof stop;
|
|
3528
2354
|
regenerate: typeof regenerate;
|
|
@@ -3535,16 +2361,21 @@ declare const __VLS_base$4: vue.DefineComponent<__VLS_Props$6, {
|
|
|
3535
2361
|
scrollTo: typeof scrollTo;
|
|
3536
2362
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
3537
2363
|
scroll: (event: Event) => any;
|
|
3538
|
-
copy: (message: MessageNode) => any;
|
|
3539
|
-
send: (text: string, files?: ChatFile[] | undefined) => any;
|
|
3540
2364
|
error: (err: Error, message?: MessageNode | undefined) => any;
|
|
2365
|
+
copy: (message: MessageNode) => any;
|
|
3541
2366
|
"branch-change": (dir: BranchDirection, message: MessageNode) => any;
|
|
3542
2367
|
"followup-select": (item: string, message: MessageNode) => any;
|
|
3543
2368
|
"feedback-change": (message: MessageNode, action: "LIKE" | "DISLIKE" | "CLEAR") => any;
|
|
3544
2369
|
"feedback-error": (message: string) => any;
|
|
2370
|
+
"action-card-settled": (info: {
|
|
2371
|
+
card: ActionCardPayload;
|
|
2372
|
+
status: Exclude<ActionCardStatus, "pending" | "loading">;
|
|
2373
|
+
result?: ActionCardResult;
|
|
2374
|
+
}) => any;
|
|
3545
2375
|
"message-file-click": (file: ChatFile, message: MessageNode) => any;
|
|
3546
2376
|
"refresh-suggestions": () => any;
|
|
3547
2377
|
"update:messages": (value: MessageNode[]) => any;
|
|
2378
|
+
send: (text: string, files?: ChatFile[] | undefined) => any;
|
|
3548
2379
|
"suggestion-select": (item: AiChatSuggestion) => any;
|
|
3549
2380
|
"message-complete": (message: MessageNode) => any;
|
|
3550
2381
|
"attachment-exceed": (file: File) => any;
|
|
@@ -3557,18 +2388,23 @@ declare const __VLS_base$4: vue.DefineComponent<__VLS_Props$6, {
|
|
|
3557
2388
|
toolName: string;
|
|
3558
2389
|
status: "start" | "done";
|
|
3559
2390
|
}) => any;
|
|
3560
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
2391
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$7> & Readonly<{
|
|
3561
2392
|
onScroll?: ((event: Event) => any) | undefined;
|
|
3562
|
-
onCopy?: ((message: MessageNode) => any) | undefined;
|
|
3563
|
-
onSend?: ((text: string, files?: ChatFile[] | undefined) => any) | undefined;
|
|
3564
2393
|
onError?: ((err: Error, message?: MessageNode | undefined) => any) | undefined;
|
|
2394
|
+
onCopy?: ((message: MessageNode) => any) | undefined;
|
|
3565
2395
|
"onBranch-change"?: ((dir: BranchDirection, message: MessageNode) => any) | undefined;
|
|
3566
2396
|
"onFollowup-select"?: ((item: string, message: MessageNode) => any) | undefined;
|
|
3567
2397
|
"onFeedback-change"?: ((message: MessageNode, action: "LIKE" | "DISLIKE" | "CLEAR") => any) | undefined;
|
|
3568
2398
|
"onFeedback-error"?: ((message: string) => any) | undefined;
|
|
2399
|
+
"onAction-card-settled"?: ((info: {
|
|
2400
|
+
card: ActionCardPayload;
|
|
2401
|
+
status: Exclude<ActionCardStatus, "pending" | "loading">;
|
|
2402
|
+
result?: ActionCardResult;
|
|
2403
|
+
}) => any) | undefined;
|
|
3569
2404
|
"onMessage-file-click"?: ((file: ChatFile, message: MessageNode) => any) | undefined;
|
|
3570
2405
|
"onRefresh-suggestions"?: (() => any) | undefined;
|
|
3571
2406
|
"onUpdate:messages"?: ((value: MessageNode[]) => any) | undefined;
|
|
2407
|
+
onSend?: ((text: string, files?: ChatFile[] | undefined) => any) | undefined;
|
|
3572
2408
|
"onSuggestion-select"?: ((item: AiChatSuggestion) => any) | undefined;
|
|
3573
2409
|
"onMessage-complete"?: ((message: MessageNode) => any) | undefined;
|
|
3574
2410
|
"onAttachment-exceed"?: ((file: File) => any) | undefined;
|
|
@@ -3593,10 +2429,6 @@ declare const __VLS_base$4: vue.DefineComponent<__VLS_Props$6, {
|
|
|
3593
2429
|
showDuration: boolean;
|
|
3594
2430
|
suggestions: AiChatSuggestion[];
|
|
3595
2431
|
accept: string;
|
|
3596
|
-
baseURL: string;
|
|
3597
|
-
apiKey: string;
|
|
3598
|
-
model: string;
|
|
3599
|
-
messages: MessageNode[];
|
|
3600
2432
|
followupStyle: "list" | "chips";
|
|
3601
2433
|
copyToClipboard: boolean;
|
|
3602
2434
|
showUserAvatar: boolean;
|
|
@@ -3613,7 +2445,9 @@ declare const __VLS_base$4: vue.DefineComponent<__VLS_Props$6, {
|
|
|
3613
2445
|
timeFormat: (message: MessageNode, timestamp: number) => string;
|
|
3614
2446
|
resolveFileUrl: (file: ChatFile) => Promise<string> | string;
|
|
3615
2447
|
feedbackHandler: FeedbackHandler;
|
|
2448
|
+
locateMessageId: string;
|
|
3616
2449
|
showHeader: boolean;
|
|
2450
|
+
messages: MessageNode[];
|
|
3617
2451
|
suggestionsWrap: boolean;
|
|
3618
2452
|
welcomeLayout: "horizontal" | "vertical";
|
|
3619
2453
|
showRefreshSuggestions: boolean;
|
|
@@ -3621,7 +2455,11 @@ declare const __VLS_base$4: vue.DefineComponent<__VLS_Props$6, {
|
|
|
3621
2455
|
scrollThreshold: number;
|
|
3622
2456
|
showScrollButton: boolean;
|
|
3623
2457
|
scrollButtonThreshold: number;
|
|
2458
|
+
actionCards: MessageNode[];
|
|
2459
|
+
model: string;
|
|
3624
2460
|
models: string[];
|
|
2461
|
+
baseURL: string;
|
|
2462
|
+
apiKey: string;
|
|
3625
2463
|
adapter: ChatAdapter;
|
|
3626
2464
|
centerWelcome: boolean;
|
|
3627
2465
|
welcomeTransitionDuration: number;
|
|
@@ -3634,9 +2472,93 @@ declare const __VLS_base$4: vue.DefineComponent<__VLS_Props$6, {
|
|
|
3634
2472
|
features: AiChatFeatures;
|
|
3635
2473
|
allowAttachments: boolean;
|
|
3636
2474
|
attachmentLimit: number;
|
|
2475
|
+
attachmentDedup: boolean;
|
|
2476
|
+
dropMainText: string;
|
|
2477
|
+
dropSubText: string;
|
|
3637
2478
|
uploadAttachment: (file: File, item: AttachmentItem) => Promise<Partial<AttachmentItem> | string | undefined | void> | Partial<AttachmentItem> | string | undefined | void;
|
|
2479
|
+
actionCardOption: ActionCardOption;
|
|
3638
2480
|
theme: "light" | "dark" | "auto";
|
|
3639
2481
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
2482
|
+
declare const __VLS_export$7: __VLS_WithSlots$5<typeof __VLS_base$5, __VLS_Slots$5>;
|
|
2483
|
+
declare const _default$7: typeof __VLS_export$7;
|
|
2484
|
+
|
|
2485
|
+
type __VLS_WithSlots$5<T, S> = T & {
|
|
2486
|
+
new (): {
|
|
2487
|
+
$slots: S;
|
|
2488
|
+
};
|
|
2489
|
+
};
|
|
2490
|
+
|
|
2491
|
+
/**
|
|
2492
|
+
* 确认/取消执行回调(消费方注入;卡载荷经 props.card 已知,回调只带 kind):
|
|
2493
|
+
* kind 区分带外端点(confirm 内调最坏 ~30s / cancel 快速返回);resolve 值即
|
|
2494
|
+
* 成功结果(由调用方写回节点),reject 的 Error 可携带 actionStatus 提示
|
|
2495
|
+
* ('invalid'/'expired'/'failed')驱动卡片按语义转终态,无提示(30007 单飞行闸/
|
|
2496
|
+
* 网络超时断线)时卡片退回待确认可重试
|
|
2497
|
+
*/
|
|
2498
|
+
type ActionCardExecutor = (kind: 'confirm' | 'cancel') => Promise<ActionCardResult | void>;
|
|
2499
|
+
type __VLS_Props$6 = {
|
|
2500
|
+
/** 卡片载荷(SSE action_card 事件 / 历史 plan 行,原样透传) */
|
|
2501
|
+
card: ActionCardPayload;
|
|
2502
|
+
/** 卡片状态:待确认/执行中/成功/失败/已取消/已过期/已失效 */
|
|
2503
|
+
status?: ActionCardStatus;
|
|
2504
|
+
/** 终态执行结果(成功概要/失败原因原文/取消回执 + 可折叠明细) */
|
|
2505
|
+
result?: ActionCardResult;
|
|
2506
|
+
/** 确认/取消执行器(缺省时待确认卡按钮禁用——纯只读展示) */
|
|
2507
|
+
execute?: ActionCardExecutor;
|
|
2508
|
+
/** 语言包:'zh-CN'/'en'/'ko'/'vi'/'zh-HK' 整包或部分文案对象 */
|
|
2509
|
+
locale?: LocaleInput;
|
|
2510
|
+
};
|
|
2511
|
+
type __VLS_Slots$4 = {
|
|
2512
|
+
/** 整体替换卡片内容(经作用域拿到卡载荷/状态/结果;确认/取消回调用 execute) */
|
|
2513
|
+
default?: (props: {
|
|
2514
|
+
card: ActionCardPayload;
|
|
2515
|
+
status: ActionCardStatus;
|
|
2516
|
+
result?: ActionCardResult;
|
|
2517
|
+
execute: (kind: 'confirm' | 'cancel') => void;
|
|
2518
|
+
}) => unknown;
|
|
2519
|
+
/** 头部标题(待确认为「待确认的操作」,终态为对应终态文案) */
|
|
2520
|
+
title?: (props: {
|
|
2521
|
+
card: ActionCardPayload;
|
|
2522
|
+
status: ActionCardStatus;
|
|
2523
|
+
result?: ActionCardResult;
|
|
2524
|
+
}) => unknown;
|
|
2525
|
+
/** 头部状态图标(终态语义色;缺省内置齿轮/对勾/叉等) */
|
|
2526
|
+
icon?: (props: {
|
|
2527
|
+
card: ActionCardPayload;
|
|
2528
|
+
status: ActionCardStatus;
|
|
2529
|
+
result?: ActionCardResult;
|
|
2530
|
+
}) => unknown;
|
|
2531
|
+
/** 预案摘要(服务端预检实查文案,原样渲染) */
|
|
2532
|
+
summary?: (props: {
|
|
2533
|
+
card: ActionCardPayload;
|
|
2534
|
+
status: ActionCardStatus;
|
|
2535
|
+
result?: ActionCardResult;
|
|
2536
|
+
}) => unknown;
|
|
2537
|
+
/** 待确认/执行中操作区(取消/确认按钮) */
|
|
2538
|
+
actions?: (props: {
|
|
2539
|
+
card: ActionCardPayload;
|
|
2540
|
+
status: ActionCardStatus;
|
|
2541
|
+
execute: (kind: 'confirm' | 'cancel') => void;
|
|
2542
|
+
executing: boolean;
|
|
2543
|
+
}) => unknown;
|
|
2544
|
+
/** 终态结果区(成功概要/失败原因 + 可折叠明细 + 失败引导) */
|
|
2545
|
+
result?: (props: {
|
|
2546
|
+
card: ActionCardPayload;
|
|
2547
|
+
status: ActionCardStatus;
|
|
2548
|
+
result?: ActionCardResult;
|
|
2549
|
+
}) => unknown;
|
|
2550
|
+
};
|
|
2551
|
+
declare const __VLS_base$4: vue.DefineComponent<__VLS_Props$6, {
|
|
2552
|
+
card: vue.ComputedRef<ActionCardPayload>;
|
|
2553
|
+
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
2554
|
+
finish: (status: "success" | "invalid" | "failed" | "expired" | "cancelled") => any;
|
|
2555
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$6> & Readonly<{
|
|
2556
|
+
onFinish?: ((status: "success" | "invalid" | "failed" | "expired" | "cancelled") => any) | undefined;
|
|
2557
|
+
}>, {
|
|
2558
|
+
status: ActionCardStatus;
|
|
2559
|
+
result: ActionCardResult;
|
|
2560
|
+
execute: ActionCardExecutor;
|
|
2561
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
3640
2562
|
declare const __VLS_export$6: __VLS_WithSlots$4<typeof __VLS_base$4, __VLS_Slots$4>;
|
|
3641
2563
|
declare const _default$6: typeof __VLS_export$6;
|
|
3642
2564
|
|
|
@@ -3677,12 +2599,12 @@ declare const __VLS_export$5: vue.DefineComponent<__VLS_Props$5, {
|
|
|
3677
2599
|
open: typeof open$1;
|
|
3678
2600
|
close: typeof close$1;
|
|
3679
2601
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
3680
|
-
close: () => any;
|
|
3681
2602
|
change: (key: string) => any;
|
|
2603
|
+
close: () => any;
|
|
3682
2604
|
navigate: (href: string) => any;
|
|
3683
2605
|
}, string, vue.PublicProps, Readonly<__VLS_Props$5> & Readonly<{
|
|
3684
|
-
onClose?: (() => any) | undefined;
|
|
3685
2606
|
onChange?: ((key: string) => any) | undefined;
|
|
2607
|
+
onClose?: (() => any) | undefined;
|
|
3686
2608
|
onNavigate?: ((href: string) => any) | undefined;
|
|
3687
2609
|
}>, {
|
|
3688
2610
|
width: string;
|
|
@@ -3693,57 +2615,6 @@ declare const __VLS_export$5: vue.DefineComponent<__VLS_Props$5, {
|
|
|
3693
2615
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
3694
2616
|
declare const _default$5: typeof __VLS_export$5;
|
|
3695
2617
|
|
|
3696
|
-
/**
|
|
3697
|
-
* 草稿会话哨兵:进入模块/新建/删除当前会话即切草稿态,不调 service.create;
|
|
3698
|
-
* 首条消息发出时由 FvAiChatPanel 的懒创建包装 adapter 调 service.create 后
|
|
3699
|
-
* 上抛 session-created 换真实 id(与参考项目宿主侧哨兵同值,迁移零成本)。
|
|
3700
|
-
*/
|
|
3701
|
-
declare const DRAFT_SESSION_ID = "__draft__";
|
|
3702
|
-
/** 会话列表查询(分页 + 状态筛选 + 关键字,正交同传) */
|
|
3703
|
-
interface FvAiSessionListQuery {
|
|
3704
|
-
pageNum: number;
|
|
3705
|
-
pageSize: number;
|
|
3706
|
-
status?: 'ACTIVE' | 'ARCHIVED';
|
|
3707
|
-
keyword?: string;
|
|
3708
|
-
}
|
|
3709
|
-
/** 列表页归一化形状(宿主 IPage 格式由胶水转换) */
|
|
3710
|
-
interface FvAiSessionPage {
|
|
3711
|
-
items: FvCommonSessionItem[];
|
|
3712
|
-
hasMore: boolean;
|
|
3713
|
-
}
|
|
3714
|
-
/** 加载更早消息页归一化形状 */
|
|
3715
|
-
interface FvAiMessagePage {
|
|
3716
|
-
messages: FvCommonMessage[];
|
|
3717
|
-
hasMore: boolean;
|
|
3718
|
-
}
|
|
3719
|
-
/**
|
|
3720
|
-
* AI 会话数据服务接口:宿主实现后经 prop 注入 FvAiSessionSidebar/FvAiChatPanel/
|
|
3721
|
-
* FvAiChatWidget。库内不内置网络实现;错误提示(toast)由宿主胶水层统一承担,
|
|
3722
|
-
* 库对 service 失败静默(侧栏)/空态重建(面板)。
|
|
3723
|
-
*/
|
|
3724
|
-
interface FvAiSessionService {
|
|
3725
|
-
/** 会话列表(分页,updatedTime DESC) */
|
|
3726
|
-
list(q: FvAiSessionListQuery): Promise<FvAiSessionPage>;
|
|
3727
|
-
/** 新建会话,返回新会话 id */
|
|
3728
|
-
create(): Promise<string>;
|
|
3729
|
-
/** 会话详情消息(尾部 limit 条,seq 升序) */
|
|
3730
|
-
detail(sessionId: string, limit?: number): Promise<FvCommonMessage[]>;
|
|
3731
|
-
/** 加载更早消息(beforeSeq 游标) */
|
|
3732
|
-
history(sessionId: string, beforeSeq: number, limit?: number): Promise<FvAiMessagePage>;
|
|
3733
|
-
/** 重命名 */
|
|
3734
|
-
rename(args: {
|
|
3735
|
-
sessionId: string;
|
|
3736
|
-
title: string;
|
|
3737
|
-
}): Promise<void>;
|
|
3738
|
-
/** 删除 */
|
|
3739
|
-
remove(sessionId: string): Promise<void>;
|
|
3740
|
-
/** 归档/恢复(可选;未实现时侧栏隐藏归档 tab 与菜单项) */
|
|
3741
|
-
archive?(args: {
|
|
3742
|
-
sessionId: string;
|
|
3743
|
-
archived: boolean;
|
|
3744
|
-
}): Promise<void>;
|
|
3745
|
-
}
|
|
3746
|
-
|
|
3747
2618
|
interface __VLS_ConversationItem {
|
|
3748
2619
|
key: string | number;
|
|
3749
2620
|
label: string;
|
|
@@ -3768,6 +2639,19 @@ type __VLS_Props$4 = {
|
|
|
3768
2639
|
collapsed?: boolean;
|
|
3769
2640
|
/** 语言配置:内置语言名(如 'en-US')或部分文案对象(深合并覆盖) */
|
|
3770
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;
|
|
3771
2655
|
};
|
|
3772
2656
|
|
|
3773
2657
|
declare var __VLS_brand: {};
|
|
@@ -3793,16 +2677,19 @@ type __VLS_Slots$3 = {} & {
|
|
|
3793
2677
|
declare const __VLS_base$3: vue.DefineComponent<__VLS_Props$4, {
|
|
3794
2678
|
refresh: () => Promise<void>;
|
|
3795
2679
|
reload: () => Promise<void>;
|
|
2680
|
+
closeSearch: () => void;
|
|
3796
2681
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
3797
2682
|
'update:collapsed': (collapsed: boolean) => any;
|
|
3798
2683
|
select: (sessionId: string, status?: 'ACTIVE' | 'ARCHIVED') => any;
|
|
3799
2684
|
'new-chat': () => any;
|
|
3800
2685
|
removed: (sessionId: string) => any;
|
|
2686
|
+
'content-select': (hit: FvAiSearchHit) => any;
|
|
3801
2687
|
}, string, vue.PublicProps, Readonly<__VLS_Props$4> & Readonly<{
|
|
3802
2688
|
"onUpdate:collapsed"?: ((collapsed: boolean) => any) | undefined;
|
|
3803
2689
|
onSelect?: ((sessionId: string, status?: 'ACTIVE' | 'ARCHIVED') => any) | undefined;
|
|
3804
2690
|
"onNew-chat"?: (() => any) | undefined;
|
|
3805
2691
|
onRemoved?: ((sessionId: string) => any) | undefined;
|
|
2692
|
+
"onContent-select"?: ((hit: FvAiSearchHit) => any) | undefined;
|
|
3806
2693
|
}>, {
|
|
3807
2694
|
locale: LocaleInput;
|
|
3808
2695
|
activeId: string;
|
|
@@ -3812,6 +2699,12 @@ declare const __VLS_base$3: vue.DefineComponent<__VLS_Props$4, {
|
|
|
3812
2699
|
brandName: string;
|
|
3813
2700
|
brandIcon: string;
|
|
3814
2701
|
collapsed: boolean;
|
|
2702
|
+
searchContent: boolean;
|
|
2703
|
+
searchPlaceholder: string;
|
|
2704
|
+
searchContentPlaceholder: string;
|
|
2705
|
+
searchHistoryEnabled: boolean;
|
|
2706
|
+
searchHistoryKey: string;
|
|
2707
|
+
searchHistoryPinned: boolean;
|
|
3815
2708
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
3816
2709
|
|
|
3817
2710
|
declare const __VLS_export$4: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
|
|
@@ -3870,12 +2763,20 @@ type __VLS_Props$3 = {
|
|
|
3870
2763
|
accept?: string;
|
|
3871
2764
|
/** 附件数量上限(透传 FvAiChat) */
|
|
3872
2765
|
attachmentLimit?: number;
|
|
2766
|
+
/** 附件去重开关(透传 FvAiChat;默认 false 不限制) */
|
|
2767
|
+
attachmentDedup?: boolean;
|
|
2768
|
+
/** 拖拽遮罩主说明文案(透传 FvAiChat;支持 \n 换行) */
|
|
2769
|
+
dropMainText?: string;
|
|
2770
|
+
/** 拖拽遮罩次说明文案(透传 FvAiChat;默认空串不渲染) */
|
|
2771
|
+
dropSubText?: string;
|
|
3873
2772
|
/** 附件上传钩子(透传 FvAiChat;草稿态懒创建由面板包装层承担) */
|
|
3874
2773
|
uploadAttachment?: (file: File, item: AttachmentItem) => Promise<Partial<AttachmentItem> | string | undefined | void> | Partial<AttachmentItem> | string | undefined | void;
|
|
3875
2774
|
/** 附件地址解析钩子(透传 FvAiChat) */
|
|
3876
2775
|
resolveFileUrl?: (file: ChatFile) => Promise<string> | string;
|
|
3877
2776
|
/** 消息评价提交钩子(透传 FvAiChat) */
|
|
3878
2777
|
feedbackHandler?: FeedbackHandler;
|
|
2778
|
+
/** 写操作确认卡选项(透传 FvAiChat;V59+「预案-确认-执行」) */
|
|
2779
|
+
actionCardOption?: ActionCardOption;
|
|
3879
2780
|
/** 消息区限宽(css 值;CSS 变量 --fv-messages-max-width 注入) */
|
|
3880
2781
|
messagesMaxWidth?: string;
|
|
3881
2782
|
/** 输入区限宽(css 值;非草稿态,CSS 变量注入) */
|
|
@@ -3892,6 +2793,13 @@ type __VLS_Props$3 = {
|
|
|
3892
2793
|
* 父层经此方法让整框重建(viewKey 自增),动画从头跑一遍
|
|
3893
2794
|
*/
|
|
3894
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>;
|
|
3895
2803
|
/**
|
|
3896
2804
|
* 直通刷新(spec §6.2):对当前会话重新拉 detail 并重建视图。
|
|
3897
2805
|
* 复用 watch(sessionId) 的加载路径(含过期响应守卫);草稿态 no-op。
|
|
@@ -3906,68 +2814,84 @@ declare function refresh$1(): Promise<void> | undefined;
|
|
|
3906
2814
|
* 对齐视口顶端;高度差公式(新增高-旧高+旧 scrollTop)兜底。
|
|
3907
2815
|
*/
|
|
3908
2816
|
declare function loadEarlier(): Promise<void>;
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
declare
|
|
3915
|
-
declare var
|
|
3916
|
-
declare var
|
|
3917
|
-
declare var
|
|
3918
|
-
|
|
2817
|
+
/**
|
|
2818
|
+
* 加载更新历史(afterSeq 游标,与 loadEarlier 对称):追加到 sourceMessages 尾部,
|
|
2819
|
+
* 重建整框后锚点回补(旧窗口首条)防滚动跳变;hasNewer=false 时停翻隐藏按钮。
|
|
2820
|
+
* 游标=当前末行 seq(seq 不连续,勿做算术)。
|
|
2821
|
+
*/
|
|
2822
|
+
declare function loadLater(): Promise<void>;
|
|
2823
|
+
declare var __VLS_18$1: {};
|
|
2824
|
+
declare var __VLS_21: {};
|
|
2825
|
+
declare var __VLS_24: {};
|
|
2826
|
+
declare var __VLS_27$1: {};
|
|
2827
|
+
declare var __VLS_30: {};
|
|
2828
|
+
declare var __VLS_33: {};
|
|
2829
|
+
declare var __VLS_36: {};
|
|
2830
|
+
declare var __VLS_39: {};
|
|
2831
|
+
declare var __VLS_42: {
|
|
2832
|
+
status: "thinking" | "done" | "error";
|
|
3919
2833
|
message: MessageNode;
|
|
3920
2834
|
};
|
|
3921
|
-
declare var
|
|
2835
|
+
declare var __VLS_45: {
|
|
3922
2836
|
message: MessageNode;
|
|
3923
2837
|
};
|
|
3924
|
-
declare var
|
|
2838
|
+
declare var __VLS_48: {
|
|
3925
2839
|
message: MessageNode;
|
|
3926
2840
|
};
|
|
3927
|
-
declare var
|
|
2841
|
+
declare var __VLS_51: {
|
|
3928
2842
|
message: MessageNode;
|
|
3929
2843
|
};
|
|
3930
|
-
declare var
|
|
2844
|
+
declare var __VLS_54: {
|
|
3931
2845
|
message: MessageNode;
|
|
3932
2846
|
};
|
|
3933
|
-
declare var
|
|
2847
|
+
declare var __VLS_57: {};
|
|
2848
|
+
declare var __VLS_60: {};
|
|
3934
2849
|
type __VLS_Slots$2 = {} & {
|
|
3935
|
-
empty?: (props: typeof
|
|
2850
|
+
empty?: (props: typeof __VLS_18$1) => any;
|
|
2851
|
+
} & {
|
|
2852
|
+
'welcome-name'?: (props: typeof __VLS_21) => any;
|
|
3936
2853
|
} & {
|
|
3937
|
-
'welcome-
|
|
2854
|
+
'welcome-description'?: (props: typeof __VLS_24) => any;
|
|
3938
2855
|
} & {
|
|
3939
|
-
'welcome-
|
|
2856
|
+
'welcome-icon'?: (props: typeof __VLS_27$1) => any;
|
|
3940
2857
|
} & {
|
|
3941
|
-
'welcome-
|
|
2858
|
+
'welcome-suggestions'?: (props: typeof __VLS_30) => any;
|
|
3942
2859
|
} & {
|
|
3943
|
-
'
|
|
2860
|
+
'refresh-suggestions'?: (props: typeof __VLS_33) => any;
|
|
3944
2861
|
} & {
|
|
3945
|
-
'
|
|
2862
|
+
'suggestions-footer'?: (props: typeof __VLS_36) => any;
|
|
3946
2863
|
} & {
|
|
3947
|
-
'
|
|
2864
|
+
'user-avatar'?: (props: typeof __VLS_39) => any;
|
|
3948
2865
|
} & {
|
|
3949
|
-
'
|
|
2866
|
+
'assistant-avatar'?: (props: typeof __VLS_42) => any;
|
|
3950
2867
|
} & {
|
|
3951
|
-
'
|
|
2868
|
+
'user-name'?: (props: typeof __VLS_45) => any;
|
|
3952
2869
|
} & {
|
|
3953
|
-
'
|
|
2870
|
+
'assistant-name'?: (props: typeof __VLS_48) => any;
|
|
3954
2871
|
} & {
|
|
3955
|
-
'
|
|
2872
|
+
'message-avatar'?: (props: typeof __VLS_51) => any;
|
|
3956
2873
|
} & {
|
|
3957
|
-
'message-
|
|
2874
|
+
'message-actions'?: (props: typeof __VLS_54) => any;
|
|
3958
2875
|
} & {
|
|
3959
|
-
'
|
|
2876
|
+
'sender-prefix'?: (props: typeof __VLS_57) => any;
|
|
3960
2877
|
} & {
|
|
3961
|
-
'
|
|
2878
|
+
'drop-mask'?: (props: typeof __VLS_60) => any;
|
|
3962
2879
|
};
|
|
3963
2880
|
declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$3, {
|
|
3964
2881
|
replayWelcome: typeof replayWelcome;
|
|
3965
2882
|
loadEarlier: typeof loadEarlier;
|
|
2883
|
+
loadLater: typeof loadLater;
|
|
3966
2884
|
refresh: typeof refresh$1;
|
|
2885
|
+
locateToSeq: typeof locateToSeq;
|
|
3967
2886
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
3968
2887
|
error: (err: Error) => any;
|
|
3969
2888
|
"feedback-change": (message: MessageNode, action: "LIKE" | "DISLIKE" | "CLEAR") => any;
|
|
3970
2889
|
"feedback-error": (message: string) => any;
|
|
2890
|
+
"action-card-settled": (info: {
|
|
2891
|
+
card: ActionCardPayload;
|
|
2892
|
+
status: Exclude<ActionCardStatus, "pending" | "loading">;
|
|
2893
|
+
result?: ActionCardResult;
|
|
2894
|
+
}) => any;
|
|
3971
2895
|
"message-file-click": (file: ChatFile, message: MessageNode) => any;
|
|
3972
2896
|
"refresh-suggestions": () => any;
|
|
3973
2897
|
"message-complete": (message: MessageNode) => any;
|
|
@@ -3982,6 +2906,11 @@ declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$3, {
|
|
|
3982
2906
|
onError?: ((err: Error) => any) | undefined;
|
|
3983
2907
|
"onFeedback-change"?: ((message: MessageNode, action: "LIKE" | "DISLIKE" | "CLEAR") => any) | undefined;
|
|
3984
2908
|
"onFeedback-error"?: ((message: string) => any) | undefined;
|
|
2909
|
+
"onAction-card-settled"?: ((info: {
|
|
2910
|
+
card: ActionCardPayload;
|
|
2911
|
+
status: Exclude<ActionCardStatus, "pending" | "loading">;
|
|
2912
|
+
result?: ActionCardResult;
|
|
2913
|
+
}) => any) | undefined;
|
|
3985
2914
|
"onMessage-file-click"?: ((file: ChatFile, message: MessageNode) => any) | undefined;
|
|
3986
2915
|
"onRefresh-suggestions"?: (() => any) | undefined;
|
|
3987
2916
|
"onMessage-complete"?: ((message: MessageNode) => any) | undefined;
|
|
@@ -4015,7 +2944,11 @@ declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$3, {
|
|
|
4015
2944
|
toolStepLabel: (toolName: string) => string;
|
|
4016
2945
|
allowAttachments: boolean;
|
|
4017
2946
|
attachmentLimit: number;
|
|
2947
|
+
attachmentDedup: boolean;
|
|
2948
|
+
dropMainText: string;
|
|
2949
|
+
dropSubText: string;
|
|
4018
2950
|
uploadAttachment: (file: File, item: AttachmentItem) => Promise<Partial<AttachmentItem> | string | undefined | void> | Partial<AttachmentItem> | string | undefined | void;
|
|
2951
|
+
actionCardOption: ActionCardOption;
|
|
4019
2952
|
theme: "light" | "dark" | "auto";
|
|
4020
2953
|
messagesMaxWidth: string;
|
|
4021
2954
|
senderMaxWidth: string;
|
|
@@ -4110,6 +3043,12 @@ type __VLS_Props$2 = {
|
|
|
4110
3043
|
theme?: 'light' | 'dark' | 'auto';
|
|
4111
3044
|
/** 语言配置(透传 Panel/Sidebar 与头部文案) */
|
|
4112
3045
|
locale?: LocaleInput;
|
|
3046
|
+
/** 开启侧栏内容搜索(透传 Sidebar;默认 true,宿主未实现 service.search 时自动降级) */
|
|
3047
|
+
searchContent?: boolean;
|
|
3048
|
+
/** 列表搜索框 placeholder(最大化态侧栏纯标题搜索时生效;缺省回落 locale) */
|
|
3049
|
+
searchPlaceholder?: string;
|
|
3050
|
+
/** 内容搜索弹窗 placeholder(最大化态侧栏与非最大化态头部搜索共用;缺省回落 locale) */
|
|
3051
|
+
searchContentPlaceholder?: string;
|
|
4113
3052
|
/** 工具名 → 步骤展示名(透传 Panel) */
|
|
4114
3053
|
toolStepLabel?: (toolName: string) => string;
|
|
4115
3054
|
/** 开启输入区附件上传(透传 Panel) */
|
|
@@ -4118,17 +3057,32 @@ type __VLS_Props$2 = {
|
|
|
4118
3057
|
accept?: string;
|
|
4119
3058
|
/** 附件数量上限(透传 Panel) */
|
|
4120
3059
|
attachmentLimit?: number;
|
|
3060
|
+
/** 附件去重开关(透传 Panel;默认 false 不限制) */
|
|
3061
|
+
attachmentDedup?: boolean;
|
|
3062
|
+
/** 拖拽遮罩主说明文案(透传 Panel;支持 \n 换行) */
|
|
3063
|
+
dropMainText?: string;
|
|
3064
|
+
/** 拖拽遮罩次说明文案(透传 Panel;默认空串不渲染) */
|
|
3065
|
+
dropSubText?: string;
|
|
4121
3066
|
/** 附件上传钩子(透传 Panel) */
|
|
4122
3067
|
uploadAttachment?: (file: File, item: AttachmentItem) => Promise<Partial<AttachmentItem> | string | undefined | void> | Partial<AttachmentItem> | string | undefined | void;
|
|
4123
3068
|
/** 附件地址解析钩子(透传 Panel) */
|
|
4124
3069
|
resolveFileUrl?: (file: ChatFile) => Promise<string> | string;
|
|
4125
3070
|
/** 消息评价提交钩子(透传 Panel) */
|
|
4126
3071
|
feedbackHandler?: FeedbackHandler;
|
|
3072
|
+
/** 写操作确认卡选项(透传 Panel;V59+「预案-确认-执行」) */
|
|
3073
|
+
actionCardOption?: ActionCardOption;
|
|
4127
3074
|
/** 首屏 detail 条数(透传 Panel,默认 100) */
|
|
4128
3075
|
detailLimit?: number;
|
|
4129
3076
|
/** 「加载更早」每次拉取条数(透传 Panel,默认 50) */
|
|
4130
3077
|
historyLimit?: number;
|
|
4131
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>;
|
|
4132
3086
|
declare function toggleMaximize(): void;
|
|
4133
3087
|
declare function toggleMode(): void;
|
|
4134
3088
|
/** 编程式开合(与 v-model 等价) */
|
|
@@ -4144,19 +3098,19 @@ declare function refresh(): Promise<void> | undefined;
|
|
|
4144
3098
|
* DESC)取首个非草稿且非当前项,即「继续上次对话」;都无则 no-op 返回 false
|
|
4145
3099
|
*/
|
|
4146
3100
|
declare function switchToPrevious(): boolean;
|
|
4147
|
-
declare var
|
|
4148
|
-
declare var
|
|
4149
|
-
declare var
|
|
4150
|
-
declare var
|
|
4151
|
-
declare var
|
|
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;
|
|
4152
3106
|
type __VLS_Slots$1 = {} & {
|
|
4153
|
-
[K in NonNullable<typeof
|
|
3107
|
+
[K in NonNullable<typeof __VLS_350>]?: (props: typeof __VLS_351) => any;
|
|
4154
3108
|
} & {
|
|
4155
|
-
'header-avatar'?: (props: typeof
|
|
3109
|
+
'header-avatar'?: (props: typeof __VLS_25) => any;
|
|
4156
3110
|
} & {
|
|
4157
|
-
'header-title'?: (props: typeof
|
|
3111
|
+
'header-title'?: (props: typeof __VLS_27) => any;
|
|
4158
3112
|
} & {
|
|
4159
|
-
'header-actions'?: (props: typeof
|
|
3113
|
+
'header-actions'?: (props: typeof __VLS_29) => any;
|
|
4160
3114
|
};
|
|
4161
3115
|
declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
|
|
4162
3116
|
open: typeof open;
|
|
@@ -4166,13 +3120,19 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
|
|
|
4166
3120
|
newChat: typeof newChat;
|
|
4167
3121
|
switchToPrevious: typeof switchToPrevious;
|
|
4168
3122
|
refresh: typeof refresh;
|
|
3123
|
+
openSessionAndLocate: typeof openSessionAndLocate;
|
|
4169
3124
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
4170
|
-
close: () => any;
|
|
4171
3125
|
error: (err: Error) => any;
|
|
4172
3126
|
open: () => any;
|
|
4173
3127
|
"update:modelValue": (v: boolean) => any;
|
|
3128
|
+
close: () => any;
|
|
4174
3129
|
"feedback-change": (message: MessageNode, action: "LIKE" | "DISLIKE" | "CLEAR") => any;
|
|
4175
3130
|
"feedback-error": (message: string) => any;
|
|
3131
|
+
"action-card-settled": (info: {
|
|
3132
|
+
card: ActionCardPayload;
|
|
3133
|
+
status: Exclude<ActionCardStatus, "pending" | "loading">;
|
|
3134
|
+
result?: ActionCardResult;
|
|
3135
|
+
}) => any;
|
|
4176
3136
|
"message-file-click": (file: ChatFile, message: MessageNode) => any;
|
|
4177
3137
|
"refresh-suggestions": () => any;
|
|
4178
3138
|
"message-complete": (message: MessageNode) => any;
|
|
@@ -4185,12 +3145,17 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
|
|
|
4185
3145
|
"round-complete": () => any;
|
|
4186
3146
|
"session-change": (sessionId: string) => any;
|
|
4187
3147
|
}, string, vue.PublicProps, Readonly<__VLS_Props$2> & Readonly<{
|
|
4188
|
-
onClose?: (() => any) | undefined;
|
|
4189
3148
|
onError?: ((err: Error) => any) | undefined;
|
|
4190
3149
|
onOpen?: (() => any) | undefined;
|
|
4191
3150
|
"onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
|
|
3151
|
+
onClose?: (() => any) | undefined;
|
|
4192
3152
|
"onFeedback-change"?: ((message: MessageNode, action: "LIKE" | "DISLIKE" | "CLEAR") => any) | undefined;
|
|
4193
3153
|
"onFeedback-error"?: ((message: string) => any) | undefined;
|
|
3154
|
+
"onAction-card-settled"?: ((info: {
|
|
3155
|
+
card: ActionCardPayload;
|
|
3156
|
+
status: Exclude<ActionCardStatus, "pending" | "loading">;
|
|
3157
|
+
result?: ActionCardResult;
|
|
3158
|
+
}) => any) | undefined;
|
|
4194
3159
|
"onMessage-file-click"?: ((file: ChatFile, message: MessageNode) => any) | undefined;
|
|
4195
3160
|
"onRefresh-suggestions"?: (() => any) | undefined;
|
|
4196
3161
|
"onMessage-complete"?: ((message: MessageNode) => any) | undefined;
|
|
@@ -4219,7 +3184,6 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
|
|
|
4219
3184
|
collapsible: boolean;
|
|
4220
3185
|
suggestions: AiChatSuggestion[];
|
|
4221
3186
|
accept: string;
|
|
4222
|
-
sessionId: string;
|
|
4223
3187
|
showTime: boolean;
|
|
4224
3188
|
resolveFileUrl: (file: ChatFile) => Promise<string> | string;
|
|
4225
3189
|
feedbackHandler: FeedbackHandler;
|
|
@@ -4231,8 +3195,16 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {
|
|
|
4231
3195
|
toolStepLabel: (toolName: string) => string;
|
|
4232
3196
|
allowAttachments: boolean;
|
|
4233
3197
|
attachmentLimit: number;
|
|
3198
|
+
attachmentDedup: boolean;
|
|
3199
|
+
dropMainText: string;
|
|
3200
|
+
dropSubText: string;
|
|
4234
3201
|
uploadAttachment: (file: File, item: AttachmentItem) => Promise<Partial<AttachmentItem> | string | undefined | void> | Partial<AttachmentItem> | string | undefined | void;
|
|
3202
|
+
actionCardOption: ActionCardOption;
|
|
4235
3203
|
theme: "light" | "dark" | "auto";
|
|
3204
|
+
sessionId: string;
|
|
3205
|
+
searchContent: boolean;
|
|
3206
|
+
searchPlaceholder: string;
|
|
3207
|
+
searchContentPlaceholder: string;
|
|
4236
3208
|
detailLimit: number;
|
|
4237
3209
|
historyLimit: number;
|
|
4238
3210
|
offsetTop: number;
|
|
@@ -4404,206 +3376,11 @@ declare const _default: typeof __VLS_export;
|
|
|
4404
3376
|
/** name(文件名去扩展名)→ svg 源文本 */
|
|
4405
3377
|
declare const iconRegistry: Record<string, string>;
|
|
4406
3378
|
|
|
4407
|
-
|
|
4408
|
-
startStream(options: {
|
|
4409
|
-
readableStream: ReadableStream<Uint8Array>;
|
|
4410
|
-
transformStream?: TransformStream<any, any>;
|
|
4411
|
-
}): Promise<void>;
|
|
4412
|
-
cancel(): void;
|
|
4413
|
-
data: Ref<SSEEvent[]>;
|
|
4414
|
-
error: Ref<Error | null>;
|
|
4415
|
-
isLoading: Ref<boolean>;
|
|
4416
|
-
}
|
|
4417
|
-
declare function useXStream(): UseXStreamReturn;
|
|
4418
|
-
|
|
4419
|
-
/** send 请求参数 */
|
|
4420
|
-
interface SendOptions {
|
|
4421
|
-
/** 请求地址 */
|
|
4422
|
-
url: string;
|
|
4423
|
-
/** 请求方法,默认 POST */
|
|
4424
|
-
method?: string;
|
|
4425
|
-
/** 请求头 */
|
|
4426
|
-
headers?: Record<string, string>;
|
|
4427
|
-
/** 请求体对象(内部 JSON.stringify) */
|
|
4428
|
-
body?: object;
|
|
4429
|
-
/** 可选转换流,接在 TextDecoderStream 之后(如协议转换) */
|
|
4430
|
-
transformStream?: TransformStream<any, any>;
|
|
4431
|
-
/** 全部 SSE 事件透传(含 event 名;tool/message_start 等非 content 事件不再被吞) */
|
|
4432
|
-
onEvent?: (ev: SSEEvent) => void;
|
|
4433
|
-
/** 内容分片回调:SSE data 为 JSON 且含字符串 content 时逐块触发 */
|
|
4434
|
-
onChunk?: (text: string) => void;
|
|
4435
|
-
}
|
|
4436
|
-
interface UseSendReturn {
|
|
4437
|
-
/** 发起请求并消费 SSE 流(逐块回调 onChunk) */
|
|
4438
|
-
send: (options: SendOptions) => Promise<void>;
|
|
4439
|
-
/** 中止当前请求/流消费 */
|
|
4440
|
-
abort: () => void;
|
|
4441
|
-
loading: Ref<boolean>;
|
|
4442
|
-
error: Ref<Error | null>;
|
|
4443
|
-
}
|
|
4444
|
-
declare function useSend(): UseSendReturn;
|
|
4445
|
-
/**
|
|
4446
|
-
* XRequest:Promise 化的流式请求,resolve 累计全文。
|
|
4447
|
-
* options 同 SendOptions(url 由首参覆盖),onChunk 透传照常触发。
|
|
4448
|
-
*/
|
|
4449
|
-
declare function XRequest(url: string, options?: Omit<SendOptions, 'url'>): Promise<string>;
|
|
4450
|
-
|
|
4451
|
-
interface UseRecordReturn {
|
|
4452
|
-
/** 开始录音(+实时转写);失败不抛出,写入 error */
|
|
4453
|
-
start: () => Promise<void>;
|
|
4454
|
-
/** 停止录音与转写,合成 audioUrl */
|
|
4455
|
-
stop: () => void;
|
|
4456
|
-
isRecording: Ref<boolean>;
|
|
4457
|
-
/** 实时转写文本(最终结果 + 中间结果拼接) */
|
|
4458
|
-
text: Ref<string>;
|
|
4459
|
-
/** 录音成品地址(Blob URL),stop 后生成,下次 start 前回收 */
|
|
4460
|
-
audioUrl: Ref<string | null>;
|
|
4461
|
-
error: Ref<Error | null>;
|
|
4462
|
-
}
|
|
4463
|
-
declare function useRecord(): UseRecordReturn;
|
|
4464
|
-
|
|
4465
|
-
/** useMessages 返回体 */
|
|
4466
|
-
interface UseMessagesReturn {
|
|
4467
|
-
/** 全量节点表(深层响应式;新增/删除键与节点字段变更均可被追踪) */
|
|
4468
|
-
messages: Ref<Record<string, MessageNode>>;
|
|
4469
|
-
/** 当前焦点节点 id(根到焦点构成当前链) */
|
|
4470
|
-
currentId: Ref<string | null>;
|
|
4471
|
-
/** 当前链(根 → 焦点,时间正序) */
|
|
4472
|
-
chain: ComputedRef<MessageNode[]>;
|
|
4473
|
-
/** 新增节点,parentId 缺省挂到当前焦点;返回带真实 id 的节点 */
|
|
4474
|
-
add(node: MessageNodeInput): MessageNode;
|
|
4475
|
-
/** 删除节点(子节点升级接替其在父 children 中的位置) */
|
|
4476
|
-
remove(id: string): void;
|
|
4477
|
-
/** 浅合并补丁(id/parentId/childrenIds 不可改) */
|
|
4478
|
-
edit(id: string, patch: Partial<MessageNode>): void;
|
|
4479
|
-
/** 追加正文 */
|
|
4480
|
-
appendContent(id: string, text: string): void;
|
|
4481
|
-
/** 分支导航,返回目标 id(越界返回 null);id 缺省取当前焦点 */
|
|
4482
|
-
navigate(id?: string, dir?: BranchDirection): string | null;
|
|
4483
|
-
/** 同步设置焦点节点(ref 写法经 watch 异步生效,此方法立即同步树内部状态) */
|
|
4484
|
-
setCurrent(id: string): void;
|
|
4485
|
-
/** 绑定/切换持久化适配器(不立即写盘;此后树变更自动去抖落盘) */
|
|
4486
|
-
setStorage(adapter?: StorageAdapter): void;
|
|
4487
|
-
/** 从存储恢复会话(覆盖当前树;无存储/无数据时保持原状) */
|
|
4488
|
-
load(): Promise<void>;
|
|
4489
|
-
/** 立即落盘(树变更后已自动调度,此为手动兜底,主要用于测试) */
|
|
4490
|
-
flush(): Promise<void>;
|
|
4491
|
-
/** 序列化整树({messages, currentId} JSON) */
|
|
4492
|
-
toJSON(): string;
|
|
4493
|
-
}
|
|
4494
|
-
/**
|
|
4495
|
-
* 聊天应用层状态中枢:把 Task 16 的纯数据 MessageTree 包装成响应式。
|
|
4496
|
-
*
|
|
4497
|
-
* 响应式策略:
|
|
4498
|
-
* - messages 用深层 ref 容器,其 .value(reactive 代理)注入树 —— 树内增删/字段写全部经由代理,可被追踪
|
|
4499
|
-
* - currentId 用 ref,与树内部 getter/setter 双向同步(watch 回写树,包装方法后拉取树)
|
|
4500
|
-
* - chain 为 computed,依赖上两者;节点对象本身是代理,消费方读 content 等字段同样响应
|
|
4501
|
-
*
|
|
4502
|
-
* @param initial 初始节点表/焦点(恢复会话时传入)
|
|
4503
|
-
*/
|
|
4504
|
-
declare function useMessages(initial?: {
|
|
4505
|
-
messages?: Record<string, MessageNode>;
|
|
4506
|
-
currentId?: string | null;
|
|
4507
|
-
}): UseMessagesReturn;
|
|
4508
|
-
|
|
4509
|
-
/** useChat 配置 */
|
|
4510
|
-
interface UseChatOptions {
|
|
4511
|
-
/** 聊天适配器实例或工厂(工厂每次 send 惰性求值,便于按会话切模型) */
|
|
4512
|
-
adapter: ChatAdapter | (() => ChatAdapter);
|
|
4513
|
-
/** 选中模型列表(多模型生成多个 assistant;缺省单模型)。支持工厂函数,每次 send 惰性取用(顶栏切换模型即时生效) */
|
|
4514
|
-
models?: string[] | (() => string[]);
|
|
4515
|
-
/** 初始消息表/焦点(恢复会话时传入;透传 useMessages) */
|
|
4516
|
-
initial?: {
|
|
4517
|
-
messages?: Record<string, MessageNode>;
|
|
4518
|
-
currentId?: string | null;
|
|
4519
|
-
};
|
|
4520
|
-
/** 工具调用轨迹事件透传(Fv 系通用 tool{status}):展示「正在查询库存…」等中间态 */
|
|
4521
|
-
onToolEvent?: (ev: {
|
|
4522
|
-
toolName: string;
|
|
4523
|
-
status: 'start' | 'done';
|
|
4524
|
-
}) => void;
|
|
4525
|
-
/** 工具名 → 步骤展示名(流式 toolSteps 的 title;缺省原样使用 toolName) */
|
|
4526
|
-
toolStepLabel?: (toolName: string) => string;
|
|
4527
|
-
/** 语言包工厂(惰性取用,与 toolStepLabel 同语义;附件 system prompt/工具用时/续写 prompt
|
|
4528
|
-
* 在产生时取值——语言切换只影响之后的请求,已落库数据不回溯);缺省读全局 */
|
|
4529
|
-
locale?: () => LocaleMessages;
|
|
4530
|
-
}
|
|
4531
|
-
/** 待发送队列项 */
|
|
4532
|
-
interface QueueItem {
|
|
4533
|
-
text: string;
|
|
4534
|
-
files?: ChatFile[];
|
|
4535
|
-
}
|
|
4536
|
-
/** useChat 返回体 */
|
|
4537
|
-
interface UseChatReturn {
|
|
4538
|
-
/** 发送用户消息并生成回复;生成中再调用被拒(需要排队的走 enqueue) */
|
|
4539
|
-
send(text: string, files?: ChatFile[]): Promise<void>;
|
|
4540
|
-
/** 中止当前生成:adapter.abort + 在途消息置 done(保留已生成内容) */
|
|
4541
|
-
stop(): void;
|
|
4542
|
-
/** 重新生成:焦点回退到末 assistant 的父节点重发生成新分支(旧回答保留在树上);可指定消息 id */
|
|
4543
|
-
regenerate(messageId?: string): Promise<void>;
|
|
4544
|
-
/** 继续生成:以目标 assistant 既有内容为前缀再次请求,增量追加到同一节点 */
|
|
4545
|
-
continueGenerate(messageId?: string): Promise<void>;
|
|
4546
|
-
/** 待发送队列(生成中入队,完成后自动 flush 队首) */
|
|
4547
|
-
queue: Ref<Array<QueueItem>>;
|
|
4548
|
-
/** 生成中入队;空闲时直接发送 */
|
|
4549
|
-
enqueue(text: string, files?: ChatFile[]): void;
|
|
4550
|
-
/** 是否有生成在途 */
|
|
4551
|
-
isLoading: Ref<boolean>;
|
|
4552
|
-
/** 底层消息树读写面(appendToMessage/clearMessages 等整框层操作经此) */
|
|
4553
|
-
msgs: UseMessagesReturn;
|
|
4554
|
-
/** 全量节点表(ref;分支信息/遍历等场景直查,AiChat 整框 v-model 同步用) */
|
|
4555
|
-
messages: UseMessagesReturn['messages'];
|
|
4556
|
-
currentId: UseMessagesReturn['currentId'];
|
|
4557
|
-
chain: UseMessagesReturn['chain'];
|
|
4558
|
-
}
|
|
4559
|
-
/**
|
|
4560
|
-
* 聊天应用层编排:在 useMessages 树状态之上驱动"发送 → 流式回填 → 队列/重生成/续写"生命周期。
|
|
4561
|
-
* 消息形态同构 open-webui:user 消息挂树后追加 pending assistant 节点,adapter 回调增量回填,结束置 done。
|
|
4562
|
-
* 多模型(models 数组/modelIdx 字段)接口形状已对齐,各模型 assistant 挂 user 下互为兄弟分支并发回填。
|
|
4563
|
-
*/
|
|
4564
|
-
declare function useChat(options: UseChatOptions): UseChatReturn;
|
|
4565
|
-
|
|
4566
|
-
/**
|
|
4567
|
-
* 创建树形消息数据结构。
|
|
4568
|
-
* 纯函数对象、非响应式;useMessages/useChat 包装 reactive 以驱动视图。
|
|
4569
|
-
* @param initial 初始节点表(恢复会话时传入),currentId 缺省取最后一个无子节点节点
|
|
4570
|
-
*/
|
|
4571
|
-
declare function createMessageTree(initial?: {
|
|
4572
|
-
messages?: Record<string, MessageNode>;
|
|
4573
|
-
currentId?: string | null;
|
|
4574
|
-
}): MessageTree;
|
|
4575
|
-
|
|
4576
|
-
/** 翻译函数形态(vue-i18n t 的结构子类型,便于纯函数测试注入桩);文案 key 为库 locale 平面 key */
|
|
4577
|
-
type AiChatT = (key: string, named?: Record<string, string>) => string;
|
|
4578
|
-
/**
|
|
4579
|
-
* FvCommonMessage[](seq 升序)→ MessageNode[](线性链,无分支)。
|
|
4580
|
-
* 分组状态机:user 开新轮;assistant(toolCalls) 起工具段收集 tool 行,多轮循环
|
|
4581
|
-
* 顺序累积(中间轮过渡文案以 text 步织入,保持发生顺序);下一个非 tool 行(最终
|
|
4582
|
-
* assistant / 下一轮 user)时把收集到的全部工具段作为 toolSteps 挂给本轮最终
|
|
4583
|
-
* assistant(若无最终行则丢弃——异常残留)。
|
|
4584
|
-
*
|
|
4585
|
-
* 附件(V1.1+):user 行 attachments(AiChatAttachmentDTO[],旧数据/无附件 null)
|
|
4586
|
-
* → MessageNode.files(chips 渲染;id=附件 id,name=originalName,type IMAGE→image)。
|
|
4587
|
-
* user 行 content 为服务端物化文本(图片占位行 + 文档解析块 + 用户输入),原样展示
|
|
4588
|
-
* 不与 chips 互斥——content 是正文留底,files 是附件入口。
|
|
4589
|
-
*/
|
|
4590
|
-
declare function mapHistoryToNodes(messages: FvCommonMessage[], t?: AiChatT): MessageNode[];
|
|
4591
|
-
/**
|
|
4592
|
-
* 会话列表项 → FvConversations item(key=id;group 仅作归档兜底分组,
|
|
4593
|
-
* 展示分组由消费方按「今天/以往」覆写;disabled 供草稿占位等禁用态)
|
|
4594
|
-
*/
|
|
4595
|
-
declare function sessionToConversationItem(s: FvCommonSessionItem, t?: AiChatT): {
|
|
4596
|
-
key: string;
|
|
4597
|
-
label: string;
|
|
4598
|
-
group?: string;
|
|
4599
|
-
disabled?: boolean;
|
|
4600
|
-
};
|
|
4601
|
-
|
|
4602
|
-
declare const version = "0.1.0";
|
|
3379
|
+
declare const version = "1.11.1";
|
|
4603
3380
|
|
|
4604
3381
|
declare const FvSparkleIcon: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
4605
3382
|
[key: string]: any;
|
|
4606
3383
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
4607
3384
|
|
|
4608
|
-
export {
|
|
4609
|
-
export type {
|
|
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 };
|