@burdenoff/fe-libs 2026.1009.1 → 2026.1010.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/shared/assistant/appControls/copy.js +1 -0
- package/dist/shared/assistant/appControls/grammar.d.ts +2 -0
- package/dist/shared/assistant/appControls/grammar.js +43 -41
- package/dist/shared/assistant/appControls/languages.d.ts +2 -0
- package/dist/shared/assistant/appControls/languages.js +8 -5
- package/dist/shared/assistant/appControls/plan.d.ts +4 -0
- package/dist/shared/assistant/appControls/plan.js +135 -118
- package/dist/shared/assistant/appControls/types.d.ts +23 -1
- package/dist/shared/assistant/i18nManifest.d.ts +1 -0
- package/dist/shared/assistant/i18nManifest.js +1 -0
- package/dist/shared/assistant/index.d.ts +18 -0
- package/dist/shared/assistant/localUiCommands.d.ts +33 -0
- package/dist/shared/assistant/localUiCommands.js +159 -88
- package/dist/shared/assistant/localeCommands/active.d.ts +19 -0
- package/dist/shared/assistant/localeCommands/active.js +25 -0
- package/dist/shared/assistant/localeCommands/assent.d.ts +25 -0
- package/dist/shared/assistant/localeCommands/assent.js +78 -0
- package/dist/shared/assistant/localeCommands/engine.d.ts +89 -0
- package/dist/shared/assistant/localeCommands/engine.js +351 -0
- package/dist/shared/assistant/localeCommands/evaluate.d.ts +77 -0
- package/dist/shared/assistant/localeCommands/evaluate.js +180 -0
- package/dist/shared/assistant/localeCommands/fold.d.ts +17 -0
- package/dist/shared/assistant/localeCommands/fold.js +66 -0
- package/dist/shared/assistant/localeCommands/frames.d.ts +23 -0
- package/dist/shared/assistant/localeCommands/frames.js +150 -0
- package/dist/shared/assistant/localeCommands/gate.d.ts +37 -0
- package/dist/shared/assistant/localeCommands/gate.js +137 -0
- package/dist/shared/assistant/localeCommands/languageNames.d.ts +11 -0
- package/dist/shared/assistant/localeCommands/languageNames.js +53 -0
- package/dist/shared/assistant/localeCommands/nameForms.d.ts +21 -0
- package/dist/shared/assistant/localeCommands/nameForms.js +44 -0
- package/dist/shared/assistant/localeCommands/normalise.d.ts +49 -0
- package/dist/shared/assistant/localeCommands/normalise.js +87 -0
- package/dist/shared/assistant/localeCommands/symbols.d.ts +8 -0
- package/dist/shared/assistant/localeCommands/symbols.js +6 -0
- package/dist/shared/assistant/localeCommands/tables/ar.d.ts +10 -0
- package/dist/shared/assistant/localeCommands/tables/ar.js +343 -0
- package/dist/shared/assistant/localeCommands/tables/en.d.ts +12 -0
- package/dist/shared/assistant/localeCommands/tables/en.js +28 -0
- package/dist/shared/assistant/localeCommands/tables/es.d.ts +7 -0
- package/dist/shared/assistant/localeCommands/tables/es.js +356 -0
- package/dist/shared/assistant/localeCommands/tables/hi.d.ts +9 -0
- package/dist/shared/assistant/localeCommands/tables/hi.js +495 -0
- package/dist/shared/assistant/localeCommands/tables/ta.d.ts +10 -0
- package/dist/shared/assistant/localeCommands/tables/ta.js +429 -0
- package/dist/shared/assistant/localeCommands/tables/zh.d.ts +9 -0
- package/dist/shared/assistant/localeCommands/tables/zh.js +402 -0
- package/dist/shared/assistant/localeCommands/types.d.ts +172 -0
- package/dist/shared/assistant/localeCommands/types.js +19 -0
- package/dist/shared/assistant/ui/AIAssistantPanel.js +5 -1
- package/dist/shared/assistant/ui/AssistantChatArea.js +1340 -1330
- package/dist/shared/assistant/uiActions/linkContext.d.ts +20 -1
- package/dist/shared/assistant/uiActions/linkContext.js +39 -21
- package/dist/shared/assistant/uiActions/offerYesOnSurface.d.ts +6 -0
- package/dist/shared/assistant/uiActions/offerYesOnSurface.js +1 -1
- package/dist/shared/assistant/writeReplyBinder.d.ts +1 -1
- package/dist/shared/assistant/writeReplySend.d.ts +16 -0
- package/dist/shared/assistant/writeReplySend.js +23 -1
- package/dist/shared-assistant.js +55 -37
- package/package.json +1 -1
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
//#region src/shared/assistant/localeCommands/tables/zh.ts
|
|
2
|
+
var e = {
|
|
3
|
+
locale: "zh",
|
|
4
|
+
maxLength: 80,
|
|
5
|
+
courtesy: {
|
|
6
|
+
prefix: [
|
|
7
|
+
"请帮我",
|
|
8
|
+
"麻烦帮我",
|
|
9
|
+
"请你",
|
|
10
|
+
"麻烦你",
|
|
11
|
+
"请",
|
|
12
|
+
"麻烦",
|
|
13
|
+
"劳驾",
|
|
14
|
+
"帮我",
|
|
15
|
+
"我想要",
|
|
16
|
+
"我想",
|
|
17
|
+
"我要",
|
|
18
|
+
"你好",
|
|
19
|
+
"please",
|
|
20
|
+
"pls"
|
|
21
|
+
],
|
|
22
|
+
suffix: [
|
|
23
|
+
"啊",
|
|
24
|
+
"呀",
|
|
25
|
+
"谢谢",
|
|
26
|
+
"谢了",
|
|
27
|
+
"一下",
|
|
28
|
+
"好吗",
|
|
29
|
+
"please",
|
|
30
|
+
"pls",
|
|
31
|
+
"thanks"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
fillers: [
|
|
35
|
+
"嗯",
|
|
36
|
+
"呃",
|
|
37
|
+
"额",
|
|
38
|
+
"唔",
|
|
39
|
+
"啊",
|
|
40
|
+
"哦",
|
|
41
|
+
"呀"
|
|
42
|
+
],
|
|
43
|
+
compound: [
|
|
44
|
+
"然后",
|
|
45
|
+
"接着",
|
|
46
|
+
"之后",
|
|
47
|
+
"并且",
|
|
48
|
+
"而且",
|
|
49
|
+
"再",
|
|
50
|
+
"在哪",
|
|
51
|
+
"哪里",
|
|
52
|
+
"哪儿",
|
|
53
|
+
"怎么",
|
|
54
|
+
"怎样",
|
|
55
|
+
"如何",
|
|
56
|
+
"什么",
|
|
57
|
+
"为什么",
|
|
58
|
+
"吗",
|
|
59
|
+
"呢",
|
|
60
|
+
"是不是",
|
|
61
|
+
"多少",
|
|
62
|
+
"搜索栏",
|
|
63
|
+
"搜索框",
|
|
64
|
+
"搜索结果",
|
|
65
|
+
"搜索引擎",
|
|
66
|
+
"搜索功能",
|
|
67
|
+
"搜索按钮"
|
|
68
|
+
],
|
|
69
|
+
polite: {
|
|
70
|
+
prefix: [
|
|
71
|
+
"你能",
|
|
72
|
+
"你可以",
|
|
73
|
+
"能不能",
|
|
74
|
+
"可不可以",
|
|
75
|
+
"能否",
|
|
76
|
+
"请问你能",
|
|
77
|
+
"请问能不能"
|
|
78
|
+
],
|
|
79
|
+
suffix: [
|
|
80
|
+
"可以吗",
|
|
81
|
+
"好吗",
|
|
82
|
+
"行吗"
|
|
83
|
+
],
|
|
84
|
+
particle: ["吗", "嘛"]
|
|
85
|
+
},
|
|
86
|
+
goto: {
|
|
87
|
+
go: [
|
|
88
|
+
"(去|转到|进入|跳转到|前往|导航到|切换到|跳到){x}",
|
|
89
|
+
"(去|转到|进入|跳转到|前往|导航到|切换到){x}{p}",
|
|
90
|
+
"(带我去|带我到|带我进入|送我去){x}",
|
|
91
|
+
"(带我去|带我到|带我进入){x}{p}",
|
|
92
|
+
"{x}{p}"
|
|
93
|
+
],
|
|
94
|
+
open: [
|
|
95
|
+
"打开{x}",
|
|
96
|
+
"打开{x}{p}",
|
|
97
|
+
"开启{x}",
|
|
98
|
+
"开启{x}{p}"
|
|
99
|
+
],
|
|
100
|
+
show: ["(显示|展示|给我看|给我看看|让我看){x}{p}"],
|
|
101
|
+
places: [
|
|
102
|
+
"页面",
|
|
103
|
+
"页",
|
|
104
|
+
"界面",
|
|
105
|
+
"屏幕"
|
|
106
|
+
],
|
|
107
|
+
ambiguous: [
|
|
108
|
+
"任务",
|
|
109
|
+
"工单",
|
|
110
|
+
"订单",
|
|
111
|
+
"警报",
|
|
112
|
+
"告警",
|
|
113
|
+
"请求",
|
|
114
|
+
"发票",
|
|
115
|
+
"问题",
|
|
116
|
+
"案例",
|
|
117
|
+
"案件",
|
|
118
|
+
"缺陷",
|
|
119
|
+
"事件",
|
|
120
|
+
"交易",
|
|
121
|
+
"条目",
|
|
122
|
+
"会话",
|
|
123
|
+
"审批",
|
|
124
|
+
"申请"
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
there: [
|
|
128
|
+
"带我去",
|
|
129
|
+
"(带我去|带我到|去|到)(那里|那儿|那边)",
|
|
130
|
+
"带我过去",
|
|
131
|
+
"到那里去",
|
|
132
|
+
"(打开|进入)(那个|该|这个|那)(页面|页|链接)",
|
|
133
|
+
"打开它",
|
|
134
|
+
"打开(链接|该链接|那个链接)",
|
|
135
|
+
"(带我去|去|转到)(那个|该)(页面|页)"
|
|
136
|
+
],
|
|
137
|
+
back: [
|
|
138
|
+
"返回",
|
|
139
|
+
"后退",
|
|
140
|
+
"返回上一页",
|
|
141
|
+
"返回上一个页面",
|
|
142
|
+
"回到上一页",
|
|
143
|
+
"回去",
|
|
144
|
+
"退回",
|
|
145
|
+
"回退",
|
|
146
|
+
"上一页",
|
|
147
|
+
"上一个页面",
|
|
148
|
+
"返回上页"
|
|
149
|
+
],
|
|
150
|
+
pick: {
|
|
151
|
+
frames: [
|
|
152
|
+
"{o}",
|
|
153
|
+
"(打开|选择|选){o}",
|
|
154
|
+
"第{n}[(个|项)]",
|
|
155
|
+
"(打开|选择)第{n}[(个|项)]",
|
|
156
|
+
"选项{n}",
|
|
157
|
+
"(打开|选择)选项{n}"
|
|
158
|
+
],
|
|
159
|
+
ordinals: [
|
|
160
|
+
[
|
|
161
|
+
"第一个",
|
|
162
|
+
"第一",
|
|
163
|
+
"第一项",
|
|
164
|
+
"第1个",
|
|
165
|
+
"首个",
|
|
166
|
+
"第一个选项"
|
|
167
|
+
],
|
|
168
|
+
[
|
|
169
|
+
"第二个",
|
|
170
|
+
"第二",
|
|
171
|
+
"第二项",
|
|
172
|
+
"第2个",
|
|
173
|
+
"第二个选项"
|
|
174
|
+
],
|
|
175
|
+
[
|
|
176
|
+
"第三个",
|
|
177
|
+
"第三",
|
|
178
|
+
"第三项",
|
|
179
|
+
"第3个",
|
|
180
|
+
"第三个选项"
|
|
181
|
+
],
|
|
182
|
+
[
|
|
183
|
+
"第四个",
|
|
184
|
+
"第四",
|
|
185
|
+
"第四项",
|
|
186
|
+
"第4个",
|
|
187
|
+
"第四个选项"
|
|
188
|
+
]
|
|
189
|
+
],
|
|
190
|
+
last: [
|
|
191
|
+
"最后一个",
|
|
192
|
+
"最后",
|
|
193
|
+
"最后一项",
|
|
194
|
+
"最后一个选项"
|
|
195
|
+
],
|
|
196
|
+
numbers: [
|
|
197
|
+
["一", "1"],
|
|
198
|
+
[
|
|
199
|
+
"二",
|
|
200
|
+
"两",
|
|
201
|
+
"2"
|
|
202
|
+
],
|
|
203
|
+
["三", "3"],
|
|
204
|
+
["四", "4"]
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
language: [
|
|
208
|
+
"(切换|更改|更换|改变|设置)[(应用|界面|系统)]语言[(为|成|到)]{lang}",
|
|
209
|
+
"把[(应用|界面|系统)]语言(改成|改为|换成|切换为|设置为|设为|调成){lang}",
|
|
210
|
+
"语言(改成|改为|换成|切换到|切换为|设置为){lang}",
|
|
211
|
+
"切换到{lang}",
|
|
212
|
+
"换成{lang}"
|
|
213
|
+
],
|
|
214
|
+
languageNames: {
|
|
215
|
+
en: [
|
|
216
|
+
"英语",
|
|
217
|
+
"英文",
|
|
218
|
+
"english"
|
|
219
|
+
],
|
|
220
|
+
hi: [
|
|
221
|
+
"印地语",
|
|
222
|
+
"印地文",
|
|
223
|
+
"印度语"
|
|
224
|
+
],
|
|
225
|
+
ta: [
|
|
226
|
+
"泰米尔语",
|
|
227
|
+
"泰米尔文",
|
|
228
|
+
"坦米尔语"
|
|
229
|
+
],
|
|
230
|
+
ar: ["阿拉伯语", "阿拉伯文"],
|
|
231
|
+
es: [
|
|
232
|
+
"西班牙语",
|
|
233
|
+
"西班牙文",
|
|
234
|
+
"西语"
|
|
235
|
+
],
|
|
236
|
+
zh: [
|
|
237
|
+
"中文",
|
|
238
|
+
"汉语",
|
|
239
|
+
"简体中文",
|
|
240
|
+
"普通话",
|
|
241
|
+
"国语",
|
|
242
|
+
"中国话"
|
|
243
|
+
]
|
|
244
|
+
},
|
|
245
|
+
theme: [
|
|
246
|
+
{
|
|
247
|
+
template: "(深色|暗色)模式",
|
|
248
|
+
family: "dark"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
template: "(开启|打开|切换到|切换为|启用|使用|设置为)(深色|暗色)模式",
|
|
252
|
+
family: "dark"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
template: "(深色|暗色)模式(开启|打开)",
|
|
256
|
+
family: "dark"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
template: "(关闭|取消|退出)(深色|暗色)模式",
|
|
260
|
+
family: "dark",
|
|
261
|
+
invert: !0
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
template: "(深色|暗色)主题",
|
|
265
|
+
family: "dark",
|
|
266
|
+
saysTheme: !0
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
template: "(开启|打开|切换到|切换为|启用|使用|设置为)(深色|暗色)主题",
|
|
270
|
+
family: "dark",
|
|
271
|
+
saysTheme: !0
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
template: "(浅色|亮色)模式",
|
|
275
|
+
family: "light"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
template: "(开启|打开|切换到|切换为|启用|使用|设置为)(浅色|亮色)模式",
|
|
279
|
+
family: "light"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
template: "(浅色|亮色)模式(开启|打开)",
|
|
283
|
+
family: "light"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
template: "(关闭|取消|退出)(浅色|亮色)模式",
|
|
287
|
+
family: "light",
|
|
288
|
+
invert: !0
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
template: "(浅色|亮色)主题",
|
|
292
|
+
family: "light",
|
|
293
|
+
saysTheme: !0
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
template: "(开启|打开|切换到|切换为|启用|使用|设置为)(浅色|亮色)主题",
|
|
297
|
+
family: "light",
|
|
298
|
+
saysTheme: !0
|
|
299
|
+
}
|
|
300
|
+
],
|
|
301
|
+
controls: {
|
|
302
|
+
history: [{ template: "(打开|查看|显示)(对话|聊天|会话)历史[记录]" }, {
|
|
303
|
+
template: "(打开|查看|显示)历史[记录]",
|
|
304
|
+
weak: !0
|
|
305
|
+
}],
|
|
306
|
+
transcript: [{ template: "(打开|查看|显示)语音(转录|转写)" }, {
|
|
307
|
+
template: "(打开|查看|显示)(转录|转写|逐字稿)",
|
|
308
|
+
weak: !0
|
|
309
|
+
}],
|
|
310
|
+
previewOpen: [{ template: "(打开|显示)(ai|助手)预览" }, {
|
|
311
|
+
template: "(打开|显示)预览",
|
|
312
|
+
weak: !0
|
|
313
|
+
}],
|
|
314
|
+
previewClose: [{ template: "(关闭|隐藏)(ai|助手)预览" }, {
|
|
315
|
+
template: "(关闭|隐藏)预览",
|
|
316
|
+
weak: !0
|
|
317
|
+
}],
|
|
318
|
+
newConversation: [{ template: "(开始|新建|发起)[一个]新(对话|会话)" }, { template: "新对话" }],
|
|
319
|
+
notifications: [{ template: "(打开|查看|显示)通知(面板|中心|铃铛)" }, {
|
|
320
|
+
template: "(打开|查看|显示)通知",
|
|
321
|
+
weak: !0
|
|
322
|
+
}],
|
|
323
|
+
help: [{ template: "(打开|显示)帮助(菜单|面板|中心)" }, {
|
|
324
|
+
template: "(打开|显示)帮助",
|
|
325
|
+
weak: !0
|
|
326
|
+
}],
|
|
327
|
+
sidebarCollapse: [{ template: "(收起|折叠|关闭|隐藏)侧边栏" }],
|
|
328
|
+
sidebarExpand: [{ template: "(展开|打开|显示)侧边栏" }],
|
|
329
|
+
tab: ["(打开|切换到|转到|显示){x}(标签页|标签|选项卡)"],
|
|
330
|
+
filter: [
|
|
331
|
+
"(只显示|仅显示|只看){x}",
|
|
332
|
+
"按{x}(筛选|过滤)",
|
|
333
|
+
"(筛选|过滤){x}"
|
|
334
|
+
],
|
|
335
|
+
filterClear: ["(清除|清空|移除|重置)[所有](筛选|过滤)[条件]"],
|
|
336
|
+
sort: ["按{x}排序[{d}]", "按{x}[{d}]排序"],
|
|
337
|
+
sortDirection: ["{d}排序", "按{d}排序"],
|
|
338
|
+
search: ["(搜索|查找|搜|查询){q}", "在(本|这个)页面[中](搜索|查找){q}"],
|
|
339
|
+
searchClear: ["(清除|清空|取消)搜索"],
|
|
340
|
+
directions: {
|
|
341
|
+
asc: [
|
|
342
|
+
"升序",
|
|
343
|
+
"正序",
|
|
344
|
+
"从小到大",
|
|
345
|
+
"由小到大",
|
|
346
|
+
"从旧到新"
|
|
347
|
+
],
|
|
348
|
+
desc: [
|
|
349
|
+
"降序",
|
|
350
|
+
"倒序",
|
|
351
|
+
"从大到小",
|
|
352
|
+
"由大到小",
|
|
353
|
+
"从新到旧"
|
|
354
|
+
]
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
yes: {
|
|
358
|
+
tierA: [
|
|
359
|
+
"是的",
|
|
360
|
+
"是",
|
|
361
|
+
"对",
|
|
362
|
+
"好",
|
|
363
|
+
"好的",
|
|
364
|
+
"可以",
|
|
365
|
+
"行",
|
|
366
|
+
"没问题",
|
|
367
|
+
"对的",
|
|
368
|
+
"ok",
|
|
369
|
+
"okay",
|
|
370
|
+
"yes",
|
|
371
|
+
"yeah"
|
|
372
|
+
],
|
|
373
|
+
tierB: [
|
|
374
|
+
"嗯",
|
|
375
|
+
"啊",
|
|
376
|
+
"哦",
|
|
377
|
+
"好吧",
|
|
378
|
+
"嗯嗯"
|
|
379
|
+
],
|
|
380
|
+
negation: [
|
|
381
|
+
"不",
|
|
382
|
+
"没有",
|
|
383
|
+
"别",
|
|
384
|
+
"不要",
|
|
385
|
+
"不行",
|
|
386
|
+
"不可以",
|
|
387
|
+
"但",
|
|
388
|
+
"但是",
|
|
389
|
+
"可是",
|
|
390
|
+
"不过",
|
|
391
|
+
"然而",
|
|
392
|
+
"否",
|
|
393
|
+
"无"
|
|
394
|
+
]
|
|
395
|
+
},
|
|
396
|
+
hints: {
|
|
397
|
+
there: "带我去",
|
|
398
|
+
yes: "好"
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
//#endregion
|
|
402
|
+
export { e as CHINESE_COMMANDS };
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ★ BOFF-8867 (multilingual commands): the shapes of the per-locale tables.
|
|
3
|
+
*
|
|
4
|
+
* A table is DATA: the small frame a language puts around a name (a verb, a
|
|
5
|
+
* postposition, a place word, a courtesy word) and a few closed lists. It never
|
|
6
|
+
* holds a page name — a destination is found by exact folded equality against
|
|
7
|
+
* the labels the app shows (design §2.5) — and a test fails if one creeps in.
|
|
8
|
+
*
|
|
9
|
+
* Template syntax (compiled once, `frames.ts`): words separated by spaces;
|
|
10
|
+
* `(a|b c)` alternatives (they may hold several words); `[a|b]` optional;
|
|
11
|
+
* `{x}` a name slot (a label the app shows), `{q}` free text, `{p}` a place
|
|
12
|
+
* word, `{lang}` a language name, `{o}` an ordinal, `{n}` a number, `{d}` a
|
|
13
|
+
* sort direction. A template is matched against the WHOLE folded utterance.
|
|
14
|
+
*/
|
|
15
|
+
/** The languages with a table. Others fall through to the model, as today. */
|
|
16
|
+
export declare const COMMAND_LOCALES: readonly ["hi", "ta", "ar", "es", "zh"];
|
|
17
|
+
export type CommandLocale = (typeof COMMAND_LOCALES)[number];
|
|
18
|
+
/**
|
|
19
|
+
* The families a manifest switches on one by one (design §3.2 G4). `theme`,
|
|
20
|
+
* `back`, `there` and `pick` need no names; `goto` and `controls` read the
|
|
21
|
+
* app's own labels; `language` reads the names of the languages; `yes` is the
|
|
22
|
+
* narrow offer-assent row.
|
|
23
|
+
*/
|
|
24
|
+
export declare const COMMAND_FAMILIES: readonly ["goto", "there", "back", "pick", "yes", "language", "theme", "controls"];
|
|
25
|
+
export type CommandFamily = (typeof COMMAND_FAMILIES)[number];
|
|
26
|
+
/** The locale keys of the manifest: `en` carries the English additions. */
|
|
27
|
+
export type ManifestLocale = CommandLocale | "en";
|
|
28
|
+
/** The six UI languages a language command can set (`appControls/types`). */
|
|
29
|
+
export type LanguageCode = "en" | "ar" | "es" | "hi" | "ta" | "zh";
|
|
30
|
+
/** How a go-to template treats a record noun and a place word. */
|
|
31
|
+
export interface GotoFrames {
|
|
32
|
+
/** "go to X": a navigation verb, a bare name is enough. */
|
|
33
|
+
go: readonly string[];
|
|
34
|
+
/**
|
|
35
|
+
* "open X": a bare name is a page unless it ENDS in an ambiguous record noun
|
|
36
|
+
* (`open tasks` is the tasks that are open); a place word makes it a page.
|
|
37
|
+
*/
|
|
38
|
+
open: readonly string[];
|
|
39
|
+
/** "show me X": asks for DATA, so a place word is ALWAYS required (`{p}` in the template). */
|
|
40
|
+
show: readonly string[];
|
|
41
|
+
/** Words that make a name a page: page, screen, section. */
|
|
42
|
+
places: readonly string[];
|
|
43
|
+
/** Record nouns an open-class bare name must not end in. */
|
|
44
|
+
ambiguous: readonly string[];
|
|
45
|
+
}
|
|
46
|
+
export interface PickFrames {
|
|
47
|
+
/** Templates over `{o}` (an ordinal word) and `{n}` (a number), whole utterance. */
|
|
48
|
+
frames: readonly string[];
|
|
49
|
+
/** Words for each position, 1 to 4. */
|
|
50
|
+
ordinals: readonly [readonly string[], readonly string[], readonly string[], readonly string[]];
|
|
51
|
+
/** "the last one". */
|
|
52
|
+
last: readonly string[];
|
|
53
|
+
/** Words for the numbers 1 to 4 (digits are always accepted). */
|
|
54
|
+
numbers: readonly [readonly string[], readonly string[], readonly string[], readonly string[]];
|
|
55
|
+
}
|
|
56
|
+
/** One theme phrase: a template over nothing (a closed phrase), the family it sets. */
|
|
57
|
+
export interface ThemePhrase {
|
|
58
|
+
template: string;
|
|
59
|
+
family: "light" | "dark";
|
|
60
|
+
/** "dark mode off" sets the other family. */
|
|
61
|
+
invert?: boolean;
|
|
62
|
+
/** The phrase says "theme": a product with `themeWords: "mode-only"` skips it. */
|
|
63
|
+
saysTheme?: boolean;
|
|
64
|
+
}
|
|
65
|
+
/** One app control phrase (closed), with whether a page of the same name beats it. */
|
|
66
|
+
export interface ControlPhrase {
|
|
67
|
+
template: string;
|
|
68
|
+
/** A weak phrase yields to a sidebar page of that name ("open notifications"). */
|
|
69
|
+
weak?: boolean;
|
|
70
|
+
}
|
|
71
|
+
export interface ControlFrames {
|
|
72
|
+
history: readonly ControlPhrase[];
|
|
73
|
+
transcript: readonly ControlPhrase[];
|
|
74
|
+
previewOpen: readonly ControlPhrase[];
|
|
75
|
+
previewClose: readonly ControlPhrase[];
|
|
76
|
+
newConversation: readonly ControlPhrase[];
|
|
77
|
+
notifications: readonly ControlPhrase[];
|
|
78
|
+
help: readonly ControlPhrase[];
|
|
79
|
+
sidebarCollapse: readonly ControlPhrase[];
|
|
80
|
+
sidebarExpand: readonly ControlPhrase[];
|
|
81
|
+
/** Over `{x}`, a tab of the page. */
|
|
82
|
+
tab: readonly string[];
|
|
83
|
+
/** Over `{x}`, an option of a filter of the page. */
|
|
84
|
+
filter: readonly string[];
|
|
85
|
+
filterClear: readonly string[];
|
|
86
|
+
/** Over `{x}` (a sort field) and optionally `{d}`. */
|
|
87
|
+
sort: readonly string[];
|
|
88
|
+
/** Over `{d}` alone: "sort ascending". */
|
|
89
|
+
sortDirection: readonly string[];
|
|
90
|
+
/** Over `{q}`, free text: the page's own search box. */
|
|
91
|
+
search: readonly string[];
|
|
92
|
+
searchClear: readonly string[];
|
|
93
|
+
/** Direction words for `{d}`. */
|
|
94
|
+
directions: {
|
|
95
|
+
asc: readonly string[];
|
|
96
|
+
desc: readonly string[];
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
export interface YesWords {
|
|
100
|
+
/** Closed list of words that mean yes, on their own. */
|
|
101
|
+
tierA: readonly string[];
|
|
102
|
+
/** Backchannels and acknowledgements: NEVER a yes alone. */
|
|
103
|
+
tierB: readonly string[];
|
|
104
|
+
/** Any of these anywhere vetoes the yes (checked first). */
|
|
105
|
+
negation: readonly string[];
|
|
106
|
+
}
|
|
107
|
+
export interface LocaleTable {
|
|
108
|
+
locale: CommandLocale;
|
|
109
|
+
/** The longest utterance, in UTF-16 units, after folding (English keeps 80). */
|
|
110
|
+
maxLength: number;
|
|
111
|
+
/** Removed from the start / end of an utterance ("please open crops"). */
|
|
112
|
+
courtesy: {
|
|
113
|
+
prefix: readonly string[];
|
|
114
|
+
suffix: readonly string[];
|
|
115
|
+
};
|
|
116
|
+
/** Disfluencies removed anywhere ("um", "ம்ம்"); for `zh`, at the edges only. */
|
|
117
|
+
fillers: readonly string[];
|
|
118
|
+
/** Words that join two requests, and question words (unmarked questions): a control sentence holding one goes to the model. */
|
|
119
|
+
compound: readonly string[];
|
|
120
|
+
/**
|
|
121
|
+
* A question mark is a command only as a polite request: it opens with a
|
|
122
|
+
* `prefix` phrase or ends with a `suffix` one (either is enough), and the
|
|
123
|
+
* `particle` words may follow. Absent: every question is the model's.
|
|
124
|
+
*/
|
|
125
|
+
polite?: {
|
|
126
|
+
prefix: readonly string[];
|
|
127
|
+
suffix: readonly string[];
|
|
128
|
+
particle?: readonly string[];
|
|
129
|
+
};
|
|
130
|
+
goto: GotoFrames;
|
|
131
|
+
/**
|
|
132
|
+
* The closed case forms of one page label ("வானிலை" → "வானிலைக்கு"): each names
|
|
133
|
+
* the same page as the label, which stays a name too. Absent: names are matched bare.
|
|
134
|
+
*/
|
|
135
|
+
nameForms?: (label: string) => readonly string[];
|
|
136
|
+
there: readonly string[];
|
|
137
|
+
back: readonly string[];
|
|
138
|
+
pick: PickFrames;
|
|
139
|
+
/** Over `{lang}`. A language command always carries the word for the app. */
|
|
140
|
+
language: readonly string[];
|
|
141
|
+
/** Extra names per language (colloquial, dative…), on top of the app's and CLDR's. */
|
|
142
|
+
languageNames: Readonly<Partial<Record<LanguageCode, readonly string[]>>>;
|
|
143
|
+
theme: readonly ThemePhrase[];
|
|
144
|
+
controls: ControlFrames;
|
|
145
|
+
yes: YesWords;
|
|
146
|
+
/**
|
|
147
|
+
* The phrases HealthyBowl's offer hints promise (`offer.hintLink` /
|
|
148
|
+
* `offer.hintRead`): a test holds that every one parses.
|
|
149
|
+
*/
|
|
150
|
+
hints: {
|
|
151
|
+
there: string;
|
|
152
|
+
yes: string;
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
/** What the English additions carry (`tables/en.ts`). */
|
|
156
|
+
export interface EnglishAdditions {
|
|
157
|
+
/** Over `{lang}`; the language command of English, beyond the legacy grammar. */
|
|
158
|
+
language: readonly string[];
|
|
159
|
+
/** English go-to verbs for a native app whose labels need the fold. */
|
|
160
|
+
goto: GotoFrames;
|
|
161
|
+
}
|
|
162
|
+
/** One manifest entry: a family of a locale, switched on only with its evidence. */
|
|
163
|
+
export interface ManifestEntry {
|
|
164
|
+
enabled: boolean;
|
|
165
|
+
/** sha256 of the frozen blind file this entry passed on. Required when enabled. */
|
|
166
|
+
corpusSha256?: string;
|
|
167
|
+
positives?: number;
|
|
168
|
+
negatives?: number;
|
|
169
|
+
falseMatches?: number;
|
|
170
|
+
recall?: number;
|
|
171
|
+
}
|
|
172
|
+
export type CommandManifest = Readonly<Record<ManifestLocale, Readonly<Partial<Record<CommandFamily | "frames", ManifestEntry>>>>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/shared/assistant/localeCommands/types.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"hi",
|
|
4
|
+
"ta",
|
|
5
|
+
"ar",
|
|
6
|
+
"es",
|
|
7
|
+
"zh"
|
|
8
|
+
], t = [
|
|
9
|
+
"goto",
|
|
10
|
+
"there",
|
|
11
|
+
"back",
|
|
12
|
+
"pick",
|
|
13
|
+
"yes",
|
|
14
|
+
"language",
|
|
15
|
+
"theme",
|
|
16
|
+
"controls"
|
|
17
|
+
];
|
|
18
|
+
//#endregion
|
|
19
|
+
export { t as COMMAND_FAMILIES, e as COMMAND_LOCALES };
|
|
@@ -43,7 +43,11 @@ var k = ({ onClose: k, visible: A, docked: j, onToggleDock: M, writeAccess: N, o
|
|
|
43
43
|
}, e);
|
|
44
44
|
J(t.historyOpen), V(t.previewOpen);
|
|
45
45
|
};
|
|
46
|
-
t("assistant.history", w(() => ({ run: () => q ? { status: "already" } : (J(!0), V(!1), { status: "done" }) }), [q, J])), t("assistant.preview", w(() => H ? {
|
|
46
|
+
t("assistant.history", w(() => ({ run: () => q ? { status: "already" } : (J(!0), V(!1), { status: "done" }) }), [q, J])), t("assistant.preview", w(() => H ? {
|
|
47
|
+
surface: "panel",
|
|
48
|
+
run: () => U ? { status: "already" } : (J(!1), V(!0), { status: "done" }),
|
|
49
|
+
close: () => U ? (V(!1), { status: "done" }) : { status: "already" }
|
|
50
|
+
} : null, [
|
|
47
51
|
H,
|
|
48
52
|
U,
|
|
49
53
|
J
|