@webskill/chatbot 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/chatbot.css +180 -28
- package/dist/index.d.ts +164 -11
- package/dist/index.js +2423 -1691
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -129,6 +129,13 @@ interface RuntimeLlmEntry {
|
|
|
129
129
|
model: string;
|
|
130
130
|
requestTimeoutMs?: number;
|
|
131
131
|
capabilities?: RuntimeLlmCapabilities;
|
|
132
|
+
/**
|
|
133
|
+
* Anthropic extended thinking 预算(0.10.0 遗留项 #1):仅 anthropic 条目有意义;
|
|
134
|
+
* 设置面是开关,开启写入 `DEFAULT_THINKING_BUDGET_TOKENS`。
|
|
135
|
+
* 0.10.0 #40.4:缺省(undefined)视为**开启**(按默认预算),显式关闭存 0。
|
|
136
|
+
* @experimental
|
|
137
|
+
*/
|
|
138
|
+
thinkingBudgetTokens?: number;
|
|
132
139
|
}
|
|
133
140
|
/** 模型列表 + 默认项。`defaultId` 由 `mergeRuntimeConfigDefaults` 归一到真实存在的条目 */
|
|
134
141
|
interface RuntimeLlmSelection {
|
|
@@ -208,6 +215,15 @@ interface RuntimeUserProfileConfig {
|
|
|
208
215
|
encrypted: boolean;
|
|
209
216
|
}
|
|
210
217
|
/** @experimental */
|
|
218
|
+
interface RuntimeSkillStateConfig {
|
|
219
|
+
/**
|
|
220
|
+
* 技能连续失败自动隔离阈值(0.10.0 UI-UX5 #48-12;#49-2 起默认 5),
|
|
221
|
+
* 与 governance `SkillStatePolicy` 的缺省对齐。读点在 console 的
|
|
222
|
+
* GovernanceFacade 装配处(`failureThreshold`),守卫本身不读配置。
|
|
223
|
+
*/
|
|
224
|
+
quarantineThreshold: number;
|
|
225
|
+
}
|
|
226
|
+
/** @experimental */
|
|
211
227
|
interface RuntimeConfig {
|
|
212
228
|
loop: RuntimeLoopConfig;
|
|
213
229
|
interaction: RuntimeInteractionConfig;
|
|
@@ -224,6 +240,7 @@ interface RuntimeConfig {
|
|
|
224
240
|
appearance: RuntimeAppearanceConfig;
|
|
225
241
|
multimodal: RuntimeMultimodalConfig;
|
|
226
242
|
userProfile: RuntimeUserProfileConfig;
|
|
243
|
+
skillState: RuntimeSkillStateConfig;
|
|
227
244
|
/** 被用户删掉的自动模型条目 id(FR-14.3):删一次就不该再自己长回来 */
|
|
228
245
|
dismissedAutoEntries: readonly string[];
|
|
229
246
|
}
|
|
@@ -330,6 +347,11 @@ interface ChatToolCall {
|
|
|
330
347
|
args?: string;
|
|
331
348
|
/** 执行耗时(trace completed/failed 回填;live 由 started→终态计时) */
|
|
332
349
|
durationMs?: number;
|
|
350
|
+
/**
|
|
351
|
+
* 开始时刻(epoch ms,0.10.0 UI-UX5 #32)。与思考段按时间穿插需要共同时钟;
|
|
352
|
+
* 旧会话消息没有该字段时工具卡片保持原有相对顺序。
|
|
353
|
+
*/
|
|
354
|
+
at?: number;
|
|
333
355
|
/**
|
|
334
356
|
* failed 时的结构化错误码(如 `TOOL_NOT_ALLOWED`)。
|
|
335
357
|
* 「被策略拒绝」与「执行失败」在 UI 上是两回事,靠错误码区分而不是解析文案。
|
|
@@ -373,6 +395,28 @@ interface ChatInteractionRecord {
|
|
|
373
395
|
/** 提交时的表单值;文件类字段已在引擎侧脱敏 */
|
|
374
396
|
submittedValues?: unknown;
|
|
375
397
|
}
|
|
398
|
+
/**
|
|
399
|
+
* 该 run 内模型产出的一段思考正文(0.10.0 UI-UX5 #32)。
|
|
400
|
+
* 每次模型调用的思考算一段;随消息持久化,重开会话仍能看到。
|
|
401
|
+
* 模型不支持思考输出时整个数组缺省——不产空壳卡片。
|
|
402
|
+
* @experimental
|
|
403
|
+
*/
|
|
404
|
+
interface ChatThinking {
|
|
405
|
+
text: string;
|
|
406
|
+
/** 首个思考增量到达时刻(epoch ms;与工具卡片按时间穿插的排序依据) */
|
|
407
|
+
at: number;
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* 该 run 的大模型用量(0.10.0 UI-UX5 #47):随消息持久化,重开会话仍可见。
|
|
411
|
+
* 上游不回报 token 用量时整个字段缺省——不显示假数据。
|
|
412
|
+
* @experimental
|
|
413
|
+
*/
|
|
414
|
+
interface ChatTokenUsage {
|
|
415
|
+
inputTokens: number;
|
|
416
|
+
outputTokens: number;
|
|
417
|
+
/** 本 run 向大模型发送请求的次数(模型调用轮数) */
|
|
418
|
+
llmCalls: number;
|
|
419
|
+
}
|
|
376
420
|
/** @stable */
|
|
377
421
|
interface ChatMessage {
|
|
378
422
|
id: string;
|
|
@@ -397,6 +441,12 @@ interface ChatMessage {
|
|
|
397
441
|
activeSkillNames?: string[];
|
|
398
442
|
/** 该 run 的工具调用序列(思维链工具行;按 trace 顺序) */
|
|
399
443
|
toolCalls?: ChatToolCall[];
|
|
444
|
+
/**
|
|
445
|
+
* 该 run 的思考段序列(0.10.0 UI-UX5 #32):渲染时与 `toolCalls` 按 `at` 归并,
|
|
446
|
+
* 多张思考卡片按时间穿插在工具卡片之间。
|
|
447
|
+
* @experimental
|
|
448
|
+
*/
|
|
449
|
+
thinkings?: ChatThinking[];
|
|
400
450
|
/**
|
|
401
451
|
* 该 run 的结果块(bridge.renderResult 的 blocks),随消息持久化。
|
|
402
452
|
* 当前 run 的块由 ResultBlocksPro 直读 bridge 渲染;历史消息按 blocks 逐条渲染(ResultBlockList)。
|
|
@@ -412,6 +462,12 @@ interface ChatMessage {
|
|
|
412
462
|
* @experimental
|
|
413
463
|
*/
|
|
414
464
|
perceptions?: PerceptionRecord[];
|
|
465
|
+
/**
|
|
466
|
+
* 该 run 的大模型用量(0.10.0 UI-UX5 #47):消息操作区图标右侧显示
|
|
467
|
+
* 输入输出合计 tokens(千分位)。上游不回报用量时缺省,不显示假数据。
|
|
468
|
+
* @experimental
|
|
469
|
+
*/
|
|
470
|
+
usage?: ChatTokenUsage;
|
|
415
471
|
/**
|
|
416
472
|
* 发出本轮请求的模型条目 id(`RuntimeConfig.llm.entries[].id`)。
|
|
417
473
|
* 写在消息上而不是会话上:切换模型只对后续消息生效,已有消息的归属不能被改写。
|
|
@@ -465,6 +521,15 @@ type ChatEvent = {
|
|
|
465
521
|
type: 'message-delta';
|
|
466
522
|
runId: string;
|
|
467
523
|
delta: string;
|
|
524
|
+
} |
|
|
525
|
+
/**
|
|
526
|
+
* 思考增量(0.10.0 UI-UX5 #32):runtime 的 thinking-delta 原样转发。
|
|
527
|
+
* 模型不产出思考时一个事件也没有;UI 据事件有无决定渲不渲染思考卡片。
|
|
528
|
+
*/
|
|
529
|
+
{
|
|
530
|
+
type: 'thinking-delta';
|
|
531
|
+
runId: string;
|
|
532
|
+
delta: string;
|
|
468
533
|
} | {
|
|
469
534
|
type: 'message-complete';
|
|
470
535
|
message: ChatMessage;
|
|
@@ -623,6 +688,17 @@ interface ChatbotHostAdapter {
|
|
|
623
688
|
}
|
|
624
689
|
//#endregion
|
|
625
690
|
//#region src/core/chatEngine.d.ts
|
|
691
|
+
/**
|
|
692
|
+
* 选中条目 → 默认条目 → 首条;命中不可用条目时**回退到下一个可用条目**
|
|
693
|
+
* (0.10.0 复核:选中项失效时宁可静默换用可用模型,也不能把 UI 锁死成
|
|
694
|
+
* 「未配置」死胡同——引擎与 UI 共用同一判据,两边必须同进退)。
|
|
695
|
+
* 全部不可用才 undefined(引擎走内置演示)。
|
|
696
|
+
*
|
|
697
|
+
* 导出给 UI 复用同一判据:composer 的「未配置模型」引导判定必须与引擎的
|
|
698
|
+
* 实际挑选结果一致,否则会出现「UI 说有模型、引擎却走演示档」的错位(0.10.0 UI-UX5 #49-1)。
|
|
699
|
+
* @experimental
|
|
700
|
+
*/
|
|
701
|
+
declare function pickUsableLlmEntry(entries: readonly RuntimeLlmEntry[], defaultId: string | undefined, selectedId: string | undefined): RuntimeLlmEntry | undefined;
|
|
626
702
|
/** 默认沙箱执行器的构造参数(adapter.executor 未注入时;executorFactory 替换点可见同一形状) @stable */
|
|
627
703
|
interface SandboxExecutorDeps {
|
|
628
704
|
fs: FileSystemProvider;
|
|
@@ -918,6 +994,7 @@ declare const chatbotDictionary: {
|
|
|
918
994
|
'header.console': string;
|
|
919
995
|
'header.theme.light': string;
|
|
920
996
|
'header.theme.dark': string;
|
|
997
|
+
'header.language': string;
|
|
921
998
|
'session.title': string;
|
|
922
999
|
'session.new': string;
|
|
923
1000
|
'session.searchPlaceholder': string;
|
|
@@ -934,6 +1011,11 @@ declare const chatbotDictionary: {
|
|
|
934
1011
|
'session.delete.confirmTitle': string;
|
|
935
1012
|
'session.delete.confirmDescription': string;
|
|
936
1013
|
'common.cancel': string;
|
|
1014
|
+
'toast.saved': string;
|
|
1015
|
+
'toast.applied': string;
|
|
1016
|
+
'toast.couldNotSave': string;
|
|
1017
|
+
'toast.undo': string;
|
|
1018
|
+
'toast.dismiss': string;
|
|
937
1019
|
'session.rename': string;
|
|
938
1020
|
'session.renameInput': string;
|
|
939
1021
|
'session.archive': string;
|
|
@@ -963,7 +1045,9 @@ declare const chatbotDictionary: {
|
|
|
963
1045
|
'message.deleted.title': string;
|
|
964
1046
|
'message.deleted.description': string;
|
|
965
1047
|
'message.viewTrace': string;
|
|
1048
|
+
'message.tokens': string;
|
|
966
1049
|
'message.skillsUsed': string;
|
|
1050
|
+
'message.skill': string;
|
|
967
1051
|
'message.edit': string;
|
|
968
1052
|
'message.editSend': string;
|
|
969
1053
|
'message.editCancel': string;
|
|
@@ -986,9 +1070,10 @@ declare const chatbotDictionary: {
|
|
|
986
1070
|
'cot.thinking': string;
|
|
987
1071
|
'cot.thought': string;
|
|
988
1072
|
'cot.summary': string;
|
|
989
|
-
'cot.reasoning': string;
|
|
990
1073
|
'cot.working': string;
|
|
1074
|
+
'thinking.title': string;
|
|
991
1075
|
'trace.title': string;
|
|
1076
|
+
'trace.flow': string;
|
|
992
1077
|
'trace.runId': string;
|
|
993
1078
|
'trace.runId.copy': string;
|
|
994
1079
|
'trace.runId.copied': string;
|
|
@@ -1034,6 +1119,7 @@ declare const chatbotDictionary: {
|
|
|
1034
1119
|
'interaction.authorize.description': string;
|
|
1035
1120
|
'interaction.authorize.capability': string;
|
|
1036
1121
|
'interaction.authorize.details': string;
|
|
1122
|
+
'skillGeneration.confirm': string;
|
|
1037
1123
|
'interaction.pageAction.click': string;
|
|
1038
1124
|
'interaction.pageAction.fill': string;
|
|
1039
1125
|
'interaction.pageAction.submit': string;
|
|
@@ -1052,6 +1138,8 @@ declare const chatbotDictionary: {
|
|
|
1052
1138
|
'surface.removeItem': string;
|
|
1053
1139
|
'surface.arrayFirstItemOnly': string;
|
|
1054
1140
|
'surface.readOnlySnapshot': string;
|
|
1141
|
+
'surface.suggested': string;
|
|
1142
|
+
'surface.useSuggestion': string;
|
|
1055
1143
|
'interaction.wait': string;
|
|
1056
1144
|
'interaction.wait.inPanel': string;
|
|
1057
1145
|
'interaction.wait.fallback': string;
|
|
@@ -1059,6 +1147,7 @@ declare const chatbotDictionary: {
|
|
|
1059
1147
|
'result.artifacts': string;
|
|
1060
1148
|
'result.download': string;
|
|
1061
1149
|
'result.file': string;
|
|
1150
|
+
'result.block.unknown': string;
|
|
1062
1151
|
'status.aria': string;
|
|
1063
1152
|
'status.route': string;
|
|
1064
1153
|
'status.activate': string;
|
|
@@ -1083,12 +1172,16 @@ declare const chatbotDictionary: {
|
|
|
1083
1172
|
'composer.attachment.compressed': string;
|
|
1084
1173
|
'composer.model': string;
|
|
1085
1174
|
'composer.model.demo': string;
|
|
1175
|
+
'composer.noModel.title': string;
|
|
1176
|
+
'composer.noModel.description': string;
|
|
1177
|
+
'composer.noModel.configure': string;
|
|
1086
1178
|
'capability.group': string;
|
|
1087
1179
|
'composer.pageCapture': string;
|
|
1088
1180
|
'composer.pageCapture.disabled.setting': string;
|
|
1089
1181
|
'composer.pageCapture.disabled.model': string;
|
|
1090
1182
|
'composer.addAttachment.imagesOff': string;
|
|
1091
1183
|
'composer.addAttachment.modelNoImages': string;
|
|
1184
|
+
'attachment.imagesDropped': string;
|
|
1092
1185
|
'composer.dictate': string;
|
|
1093
1186
|
'composer.dictate.stop': string;
|
|
1094
1187
|
'composer.dictate.recording': string;
|
|
@@ -1238,6 +1331,7 @@ declare const chatbotDictionary: {
|
|
|
1238
1331
|
'header.console': string;
|
|
1239
1332
|
'header.theme.light': string;
|
|
1240
1333
|
'header.theme.dark': string;
|
|
1334
|
+
'header.language': string;
|
|
1241
1335
|
'session.title': string;
|
|
1242
1336
|
'session.new': string;
|
|
1243
1337
|
'session.searchPlaceholder': string;
|
|
@@ -1254,6 +1348,11 @@ declare const chatbotDictionary: {
|
|
|
1254
1348
|
'session.delete.confirmTitle': string;
|
|
1255
1349
|
'session.delete.confirmDescription': string;
|
|
1256
1350
|
'common.cancel': string;
|
|
1351
|
+
'toast.saved': string;
|
|
1352
|
+
'toast.applied': string;
|
|
1353
|
+
'toast.couldNotSave': string;
|
|
1354
|
+
'toast.undo': string;
|
|
1355
|
+
'toast.dismiss': string;
|
|
1257
1356
|
'session.rename': string;
|
|
1258
1357
|
'session.renameInput': string;
|
|
1259
1358
|
'session.archive': string;
|
|
@@ -1286,7 +1385,9 @@ declare const chatbotDictionary: {
|
|
|
1286
1385
|
'message.deleted.title': string;
|
|
1287
1386
|
'message.deleted.description': string;
|
|
1288
1387
|
'message.viewTrace': string;
|
|
1388
|
+
'message.tokens': string;
|
|
1289
1389
|
'message.skillsUsed': string;
|
|
1390
|
+
'message.skill': string;
|
|
1290
1391
|
'capability.tools.on': string;
|
|
1291
1392
|
'capability.tools.off': string;
|
|
1292
1393
|
'capability.images.on': string;
|
|
@@ -1306,9 +1407,10 @@ declare const chatbotDictionary: {
|
|
|
1306
1407
|
'cot.thinking': string;
|
|
1307
1408
|
'cot.thought': string;
|
|
1308
1409
|
'cot.summary': string;
|
|
1309
|
-
'cot.reasoning': string;
|
|
1310
1410
|
'cot.working': string;
|
|
1411
|
+
'thinking.title': string;
|
|
1311
1412
|
'trace.title': string;
|
|
1413
|
+
'trace.flow': string;
|
|
1312
1414
|
'trace.runId': string;
|
|
1313
1415
|
'trace.runId.copy': string;
|
|
1314
1416
|
'trace.runId.copied': string;
|
|
@@ -1354,6 +1456,7 @@ declare const chatbotDictionary: {
|
|
|
1354
1456
|
'interaction.authorize.description': string;
|
|
1355
1457
|
'interaction.authorize.capability': string;
|
|
1356
1458
|
'interaction.authorize.details': string;
|
|
1459
|
+
'skillGeneration.confirm': string;
|
|
1357
1460
|
'interaction.pageAction.click': string;
|
|
1358
1461
|
'interaction.pageAction.fill': string;
|
|
1359
1462
|
'interaction.pageAction.submit': string;
|
|
@@ -1372,6 +1475,8 @@ declare const chatbotDictionary: {
|
|
|
1372
1475
|
'surface.removeItem': string;
|
|
1373
1476
|
'surface.arrayFirstItemOnly': string;
|
|
1374
1477
|
'surface.readOnlySnapshot': string;
|
|
1478
|
+
'surface.suggested': string;
|
|
1479
|
+
'surface.useSuggestion': string;
|
|
1375
1480
|
'interaction.wait': string;
|
|
1376
1481
|
'interaction.wait.inPanel': string;
|
|
1377
1482
|
'interaction.wait.fallback': string;
|
|
@@ -1379,6 +1484,7 @@ declare const chatbotDictionary: {
|
|
|
1379
1484
|
'result.artifacts': string;
|
|
1380
1485
|
'result.download': string;
|
|
1381
1486
|
'result.file': string;
|
|
1487
|
+
'result.block.unknown': string;
|
|
1382
1488
|
'status.aria': string;
|
|
1383
1489
|
'status.route': string;
|
|
1384
1490
|
'status.activate': string;
|
|
@@ -1403,12 +1509,16 @@ declare const chatbotDictionary: {
|
|
|
1403
1509
|
'composer.attachment.compressed': string;
|
|
1404
1510
|
'composer.model': string;
|
|
1405
1511
|
'composer.model.demo': string;
|
|
1512
|
+
'composer.noModel.title': string;
|
|
1513
|
+
'composer.noModel.description': string;
|
|
1514
|
+
'composer.noModel.configure': string;
|
|
1406
1515
|
'capability.group': string;
|
|
1407
1516
|
'composer.pageCapture': string;
|
|
1408
1517
|
'composer.pageCapture.disabled.setting': string;
|
|
1409
1518
|
'composer.pageCapture.disabled.model': string;
|
|
1410
1519
|
'composer.addAttachment.imagesOff': string;
|
|
1411
1520
|
'composer.addAttachment.modelNoImages': string;
|
|
1521
|
+
'attachment.imagesDropped': string;
|
|
1412
1522
|
'composer.dictate': string;
|
|
1413
1523
|
'composer.dictate.stop': string;
|
|
1414
1524
|
'composer.dictate.recording': string;
|
|
@@ -1561,6 +1671,7 @@ declare const useT: () => TranslateFn<{
|
|
|
1561
1671
|
'header.console': string;
|
|
1562
1672
|
'header.theme.light': string;
|
|
1563
1673
|
'header.theme.dark': string;
|
|
1674
|
+
'header.language': string;
|
|
1564
1675
|
'session.title': string;
|
|
1565
1676
|
'session.new': string;
|
|
1566
1677
|
'session.searchPlaceholder': string;
|
|
@@ -1577,6 +1688,11 @@ declare const useT: () => TranslateFn<{
|
|
|
1577
1688
|
'session.delete.confirmTitle': string;
|
|
1578
1689
|
'session.delete.confirmDescription': string;
|
|
1579
1690
|
'common.cancel': string;
|
|
1691
|
+
'toast.saved': string;
|
|
1692
|
+
'toast.applied': string;
|
|
1693
|
+
'toast.couldNotSave': string;
|
|
1694
|
+
'toast.undo': string;
|
|
1695
|
+
'toast.dismiss': string;
|
|
1580
1696
|
'session.rename': string;
|
|
1581
1697
|
'session.renameInput': string;
|
|
1582
1698
|
'session.archive': string;
|
|
@@ -1606,7 +1722,9 @@ declare const useT: () => TranslateFn<{
|
|
|
1606
1722
|
'message.deleted.title': string;
|
|
1607
1723
|
'message.deleted.description': string;
|
|
1608
1724
|
'message.viewTrace': string;
|
|
1725
|
+
'message.tokens': string;
|
|
1609
1726
|
'message.skillsUsed': string;
|
|
1727
|
+
'message.skill': string;
|
|
1610
1728
|
'message.edit': string;
|
|
1611
1729
|
'message.editSend': string;
|
|
1612
1730
|
'message.editCancel': string;
|
|
@@ -1629,9 +1747,10 @@ declare const useT: () => TranslateFn<{
|
|
|
1629
1747
|
'cot.thinking': string;
|
|
1630
1748
|
'cot.thought': string;
|
|
1631
1749
|
'cot.summary': string;
|
|
1632
|
-
'cot.reasoning': string;
|
|
1633
1750
|
'cot.working': string;
|
|
1751
|
+
'thinking.title': string;
|
|
1634
1752
|
'trace.title': string;
|
|
1753
|
+
'trace.flow': string;
|
|
1635
1754
|
'trace.runId': string;
|
|
1636
1755
|
'trace.runId.copy': string;
|
|
1637
1756
|
'trace.runId.copied': string;
|
|
@@ -1677,6 +1796,7 @@ declare const useT: () => TranslateFn<{
|
|
|
1677
1796
|
'interaction.authorize.description': string;
|
|
1678
1797
|
'interaction.authorize.capability': string;
|
|
1679
1798
|
'interaction.authorize.details': string;
|
|
1799
|
+
'skillGeneration.confirm': string;
|
|
1680
1800
|
'interaction.pageAction.click': string;
|
|
1681
1801
|
'interaction.pageAction.fill': string;
|
|
1682
1802
|
'interaction.pageAction.submit': string;
|
|
@@ -1695,6 +1815,8 @@ declare const useT: () => TranslateFn<{
|
|
|
1695
1815
|
'surface.removeItem': string;
|
|
1696
1816
|
'surface.arrayFirstItemOnly': string;
|
|
1697
1817
|
'surface.readOnlySnapshot': string;
|
|
1818
|
+
'surface.suggested': string;
|
|
1819
|
+
'surface.useSuggestion': string;
|
|
1698
1820
|
'interaction.wait': string;
|
|
1699
1821
|
'interaction.wait.inPanel': string;
|
|
1700
1822
|
'interaction.wait.fallback': string;
|
|
@@ -1702,6 +1824,7 @@ declare const useT: () => TranslateFn<{
|
|
|
1702
1824
|
'result.artifacts': string;
|
|
1703
1825
|
'result.download': string;
|
|
1704
1826
|
'result.file': string;
|
|
1827
|
+
'result.block.unknown': string;
|
|
1705
1828
|
'status.aria': string;
|
|
1706
1829
|
'status.route': string;
|
|
1707
1830
|
'status.activate': string;
|
|
@@ -1726,12 +1849,16 @@ declare const useT: () => TranslateFn<{
|
|
|
1726
1849
|
'composer.attachment.compressed': string;
|
|
1727
1850
|
'composer.model': string;
|
|
1728
1851
|
'composer.model.demo': string;
|
|
1852
|
+
'composer.noModel.title': string;
|
|
1853
|
+
'composer.noModel.description': string;
|
|
1854
|
+
'composer.noModel.configure': string;
|
|
1729
1855
|
'capability.group': string;
|
|
1730
1856
|
'composer.pageCapture': string;
|
|
1731
1857
|
'composer.pageCapture.disabled.setting': string;
|
|
1732
1858
|
'composer.pageCapture.disabled.model': string;
|
|
1733
1859
|
'composer.addAttachment.imagesOff': string;
|
|
1734
1860
|
'composer.addAttachment.modelNoImages': string;
|
|
1861
|
+
'attachment.imagesDropped': string;
|
|
1735
1862
|
'composer.dictate': string;
|
|
1736
1863
|
'composer.dictate.stop': string;
|
|
1737
1864
|
'composer.dictate.recording': string;
|
|
@@ -1881,6 +2008,7 @@ declare const useT: () => TranslateFn<{
|
|
|
1881
2008
|
'header.console': string;
|
|
1882
2009
|
'header.theme.light': string;
|
|
1883
2010
|
'header.theme.dark': string;
|
|
2011
|
+
'header.language': string;
|
|
1884
2012
|
'session.title': string;
|
|
1885
2013
|
'session.new': string;
|
|
1886
2014
|
'session.searchPlaceholder': string;
|
|
@@ -1897,6 +2025,11 @@ declare const useT: () => TranslateFn<{
|
|
|
1897
2025
|
'session.delete.confirmTitle': string;
|
|
1898
2026
|
'session.delete.confirmDescription': string;
|
|
1899
2027
|
'common.cancel': string;
|
|
2028
|
+
'toast.saved': string;
|
|
2029
|
+
'toast.applied': string;
|
|
2030
|
+
'toast.couldNotSave': string;
|
|
2031
|
+
'toast.undo': string;
|
|
2032
|
+
'toast.dismiss': string;
|
|
1900
2033
|
'session.rename': string;
|
|
1901
2034
|
'session.renameInput': string;
|
|
1902
2035
|
'session.archive': string;
|
|
@@ -1929,7 +2062,9 @@ declare const useT: () => TranslateFn<{
|
|
|
1929
2062
|
'message.deleted.title': string;
|
|
1930
2063
|
'message.deleted.description': string;
|
|
1931
2064
|
'message.viewTrace': string;
|
|
2065
|
+
'message.tokens': string;
|
|
1932
2066
|
'message.skillsUsed': string;
|
|
2067
|
+
'message.skill': string;
|
|
1933
2068
|
'capability.tools.on': string;
|
|
1934
2069
|
'capability.tools.off': string;
|
|
1935
2070
|
'capability.images.on': string;
|
|
@@ -1949,9 +2084,10 @@ declare const useT: () => TranslateFn<{
|
|
|
1949
2084
|
'cot.thinking': string;
|
|
1950
2085
|
'cot.thought': string;
|
|
1951
2086
|
'cot.summary': string;
|
|
1952
|
-
'cot.reasoning': string;
|
|
1953
2087
|
'cot.working': string;
|
|
2088
|
+
'thinking.title': string;
|
|
1954
2089
|
'trace.title': string;
|
|
2090
|
+
'trace.flow': string;
|
|
1955
2091
|
'trace.runId': string;
|
|
1956
2092
|
'trace.runId.copy': string;
|
|
1957
2093
|
'trace.runId.copied': string;
|
|
@@ -1997,6 +2133,7 @@ declare const useT: () => TranslateFn<{
|
|
|
1997
2133
|
'interaction.authorize.description': string;
|
|
1998
2134
|
'interaction.authorize.capability': string;
|
|
1999
2135
|
'interaction.authorize.details': string;
|
|
2136
|
+
'skillGeneration.confirm': string;
|
|
2000
2137
|
'interaction.pageAction.click': string;
|
|
2001
2138
|
'interaction.pageAction.fill': string;
|
|
2002
2139
|
'interaction.pageAction.submit': string;
|
|
@@ -2015,6 +2152,8 @@ declare const useT: () => TranslateFn<{
|
|
|
2015
2152
|
'surface.removeItem': string;
|
|
2016
2153
|
'surface.arrayFirstItemOnly': string;
|
|
2017
2154
|
'surface.readOnlySnapshot': string;
|
|
2155
|
+
'surface.suggested': string;
|
|
2156
|
+
'surface.useSuggestion': string;
|
|
2018
2157
|
'interaction.wait': string;
|
|
2019
2158
|
'interaction.wait.inPanel': string;
|
|
2020
2159
|
'interaction.wait.fallback': string;
|
|
@@ -2022,6 +2161,7 @@ declare const useT: () => TranslateFn<{
|
|
|
2022
2161
|
'result.artifacts': string;
|
|
2023
2162
|
'result.download': string;
|
|
2024
2163
|
'result.file': string;
|
|
2164
|
+
'result.block.unknown': string;
|
|
2025
2165
|
'status.aria': string;
|
|
2026
2166
|
'status.route': string;
|
|
2027
2167
|
'status.activate': string;
|
|
@@ -2046,12 +2186,16 @@ declare const useT: () => TranslateFn<{
|
|
|
2046
2186
|
'composer.attachment.compressed': string;
|
|
2047
2187
|
'composer.model': string;
|
|
2048
2188
|
'composer.model.demo': string;
|
|
2189
|
+
'composer.noModel.title': string;
|
|
2190
|
+
'composer.noModel.description': string;
|
|
2191
|
+
'composer.noModel.configure': string;
|
|
2049
2192
|
'capability.group': string;
|
|
2050
2193
|
'composer.pageCapture': string;
|
|
2051
2194
|
'composer.pageCapture.disabled.setting': string;
|
|
2052
2195
|
'composer.pageCapture.disabled.model': string;
|
|
2053
2196
|
'composer.addAttachment.imagesOff': string;
|
|
2054
2197
|
'composer.addAttachment.modelNoImages': string;
|
|
2198
|
+
'attachment.imagesDropped': string;
|
|
2055
2199
|
'composer.dictate': string;
|
|
2056
2200
|
'composer.dictate.stop': string;
|
|
2057
2201
|
'composer.dictate.recording': string;
|
|
@@ -2224,7 +2368,7 @@ interface AppearanceChange {
|
|
|
2224
2368
|
* 不在其中(AC-20.7 按「无未覆盖的配置类 leaf」执行,见偏差 D-15)。
|
|
2225
2369
|
* @experimental
|
|
2226
2370
|
*/
|
|
2227
|
-
type SettingsSectionId = 'settings.runtime' | 'settings.sandbox' | 'settings.genui' | 'settings.trust' | 'settings.privacy' | 'settings.appearance' | 'connections.models' | 'connections.page' | 'connections.mcp';
|
|
2371
|
+
type SettingsSectionId = 'settings.runtime' | 'settings.sandbox' | 'settings.genui' | 'settings.trust' | 'settings.privacy' | 'settings.appearance' | 'connections.models' | 'connections.webmcp' | 'connections.page' | 'connections.mcp';
|
|
2228
2372
|
//#endregion
|
|
2229
2373
|
//#region src/react/useChatLayout.d.ts
|
|
2230
2374
|
/** 宿主可指定的布局档;auto 按容器尺寸判定 @stable */
|
|
@@ -2238,11 +2382,12 @@ interface ChatbotProps {
|
|
|
2238
2382
|
adapter: ChatbotHostAdapter;
|
|
2239
2383
|
config?: ChatbotConfig;
|
|
2240
2384
|
/**
|
|
2241
|
-
* 界面语言(默认 '
|
|
2385
|
+
* 界面语言(默认 'zh',0.10.0 UI-UX5 #1:SDK 缺省中文)。
|
|
2386
|
+
* **传了 `config.runtimeConfig` 时本属性被忽略**:
|
|
2242
2387
|
* 0.6.0 起外观配置的唯一真值源是配置存储(FR-20.1)。
|
|
2243
2388
|
*/
|
|
2244
2389
|
locale?: Locale;
|
|
2245
|
-
/** 主题(默认 '
|
|
2390
|
+
/** 主题(默认 'dark',0.10.0 UI-UX5 #1:SDK 缺省深色)。同上:有配置源时被忽略 */
|
|
2246
2391
|
theme?: ChatTheme;
|
|
2247
2392
|
/** 交互渲染框架档(默认 'native';'a2ui' 需宿主安装 optional peer @a2ui/lit) */
|
|
2248
2393
|
renderer?: RendererKind;
|
|
@@ -2252,12 +2397,12 @@ interface ChatbotProps {
|
|
|
2252
2397
|
surfaceRegistry?: SurfaceRegistry;
|
|
2253
2398
|
/** 布局档(默认 'auto':按容器尺寸在 fullscreen / embedded / mobile 之间判定) */
|
|
2254
2399
|
layout?: ChatLayout;
|
|
2255
|
-
onAppearanceChange?(next: AppearanceChange): void;
|
|
2256
2400
|
/**
|
|
2257
2401
|
* 打开配置面(FR-20.4)。配置面本身已迁到 console,chatbot 只负责发出这个请求;
|
|
2258
2402
|
* 宿主不接就不渲染任何「打开设置」出口——给一个点了没反应的按钮更糟。
|
|
2403
|
+
* `section` 可选(FR-16.5):齿轮不带分区(→ Overview),带诉求的入口(错误卡等)才传分区。
|
|
2259
2404
|
*/
|
|
2260
|
-
onOpenSettings?(section
|
|
2405
|
+
onOpenSettings?(section?: SettingsSectionId): void;
|
|
2261
2406
|
/**
|
|
2262
2407
|
* 装配完成后把引擎交给宿主,用于接线跨界面动作(例如 console 的快照恢复入口
|
|
2263
2408
|
* 需要调 `engine.resume(runId)`)。每次重新装配都会再调一次。
|
|
@@ -2269,7 +2414,7 @@ interface ChatbotProps {
|
|
|
2269
2414
|
* presentation shell and accessible thread primitives.
|
|
2270
2415
|
* @stable
|
|
2271
2416
|
*/
|
|
2272
|
-
declare function Chatbot({ adapter, config, locale: localeProp, theme: themeProp, renderer: rendererProp, dictationLang: dictationLangProp, surfaceRegistry, layout,
|
|
2417
|
+
declare function Chatbot({ adapter, config, locale: localeProp, theme: themeProp, renderer: rendererProp, dictationLang: dictationLangProp, surfaceRegistry, layout, onOpenSettings, onEngineReady }: ChatbotProps): import("react").JSX.Element;
|
|
2273
2418
|
//#endregion
|
|
2274
2419
|
//#region src/react/A2uiSurfaceHost.d.ts
|
|
2275
2420
|
/** @experimental */
|
|
@@ -2447,4 +2592,12 @@ interface ErrorCardProps {
|
|
|
2447
2592
|
/** 结构化错误卡:错误码徽章 + 描述 + 建议(engine error 事件 / 失败 run) @stable */
|
|
2448
2593
|
declare function ErrorCard({ code, message, loopLimits, onOpenSettings, onDismiss }: ErrorCardProps): import("react").JSX.Element;
|
|
2449
2594
|
//#endregion
|
|
2450
|
-
|
|
2595
|
+
//#region src/version.d.ts
|
|
2596
|
+
/** Generated by scripts/syncVersionConstant.mjs from packages/chatbot/package.json. Do not edit by hand. */
|
|
2597
|
+
/**
|
|
2598
|
+
* Version of the published `@webskill/chatbot` package, injected at build time.
|
|
2599
|
+
* @stable
|
|
2600
|
+
*/
|
|
2601
|
+
declare const CHATBOT_VERSION = "0.7.0";
|
|
2602
|
+
//#endregion
|
|
2603
|
+
export { A2uiSurfaceHost, type A2uiSurfaceHostProps, A2uiSurfaceSnapshotHost, type A2uiSurfaceSnapshotHostProps, type AppearanceChange, CHATBOT_VERSION, type ChatAttachmentInput, type ChatAttachmentMeta, ChatEngine, type ChatEngineOptions, type ChatEvent, type ChatInteractionRecord, type ChatLayout, type ChatMessage, type ChatRunPhase, type ChatSessionListResult, type ChatSessionMeta, type ChatTheme, type ChatThinking, type ChatTokenUsage, type ChatToolCall, Chatbot, type ChatbotConfig, type ChatbotGovernancePorts, type ChatbotHostAdapter, type ChatbotProps, CompositeUiBridge, type CompositeUiBridgeDeps, DEFAULT_RENDERER_CAPABILITIES, DEFAULT_RUNTIME_CONFIG_STORAGE_KEY, type DownloadableFile, ErrorCard, type ErrorCardProps, InteractionCard, type InteractionCardProps, InterruptedBanner, type InterruptedBannerProps, type Locale, OpenUiSurfaceHost, type OpenUiSurfaceHostProps, OpenUiSurfaceSnapshotHost, type OpenUiSurfaceSnapshotHostProps, type RendererCapability, type RendererKind, type ResolvedChatLayout, ResultBlockList, type ResultBlockListProps, ResultBlocksPro, type ResultBlocksProProps, type RunSnapshot, type RuntimeAppearanceConfig, type RuntimeConfig, type RuntimeConfigStore, type RuntimeRendererId, type SandboxExecutorDeps, type SettingsSectionId, SkillBadges, SpecInteraction, type SpecInteractionProps, VercelPayloadPreview, type VercelPayloadPreviewProps, VercelSurfaceHost, type VercelSurfaceHostProps, VercelSurfaceSnapshotHost, type VercelSurfaceSnapshotHostProps, chatbotDictionary, configureA2uiMarkdown, createLocalStorageRuntimeConfigStore, createMemoryRuntimeConfigStore, pickUsableLlmEntry, probeA2uiAvailability, probeOpenUiAvailability, sandboxExecutorDeps, useT };
|