@burdenoff/fe-libs 2026.1007.4 → 2026.1007.6
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/chrome/AutoBreadcrumbs.d.ts.map +1 -1
- package/dist/chrome/AutoBreadcrumbs.js +65 -76
- package/dist/chrome/Breadcrumb.d.ts.map +1 -1
- package/dist/chrome/Breadcrumbs.d.ts.map +1 -1
- package/dist/chrome/Breadcrumbs.js +47 -46
- package/dist/chrome/ContextSwitcher.js +86 -86
- package/dist/chrome/HeaderBar.d.ts.map +1 -1
- package/dist/chrome/HeaderBar.js +111 -107
- package/dist/chrome/HeaderThemeSwitcher.d.ts.map +1 -1
- package/dist/chrome/HeaderThemeSwitcher.js +46 -45
- package/dist/chrome/LanguageSwitcher.js +4 -4
- package/dist/chrome/MobileTabBar.js +4 -4
- package/dist/chrome/PageHeader.d.ts.map +1 -1
- package/dist/chrome/PageHeader.js +32 -30
- package/dist/chrome/PersonaSurfaceControls.js +8 -8
- package/dist/chrome/ProductSideNav.js +6 -6
- package/dist/chrome/ProfileSwitcher.d.ts.map +1 -1
- package/dist/chrome/ProfileSwitcher.js +89 -88
- package/dist/chrome/SideNavigation.js +4 -4
- package/dist/chrome/Tabs.d.ts.map +1 -1
- package/dist/chrome/Tabs.js +30 -29
- package/dist/chrome/breadcrumbLabel.d.ts +10 -0
- package/dist/chrome/breadcrumbLabel.d.ts.map +1 -0
- package/dist/chrome/breadcrumbLabel.js +31 -0
- package/dist/chrome/contextSwitcher/TriggerButton.d.ts.map +1 -1
- package/dist/chrome/contextSwitcher/TriggerButton.js +40 -36
- package/dist/chrome/notificationCenter/BellButton.d.ts.map +1 -1
- package/dist/chrome/notificationCenter/BellButton.js +29 -25
- package/dist/chrome/shellLabelManifest.d.ts +27 -0
- package/dist/chrome/shellLabelManifest.d.ts.map +1 -0
- package/dist/chrome/sideNavigation/SidebarHeader.d.ts.map +1 -1
- package/dist/chrome/sideNavigation/SidebarHeader.js +23 -22
- package/dist/shared/assistant/api.d.ts +11 -0
- package/dist/shared/assistant/api.d.ts.map +1 -1
- package/dist/shared/assistant/api.js +6 -2
- package/dist/shared/assistant/appControls/languageReply.d.ts +6 -1
- package/dist/shared/assistant/appControls/languageReply.d.ts.map +1 -1
- package/dist/shared/assistant/conversation.d.ts +14 -0
- package/dist/shared/assistant/conversation.d.ts.map +1 -1
- package/dist/shared/assistant/createSandboxAssistantTransport.d.ts +8 -1
- package/dist/shared/assistant/createSandboxAssistantTransport.d.ts.map +1 -1
- package/dist/shared/assistant/createSandboxAssistantTransport.js +70 -51
- package/dist/shared/assistant/history/historyMapping.d.ts.map +1 -1
- package/dist/shared/assistant/history/historyMapping.js +19 -12
- package/dist/shared/assistant/i18nManifest.d.ts +26 -5
- package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
- package/dist/shared/assistant/i18nManifest.js +36 -22
- package/dist/shared/assistant/index.d.ts +7 -0
- package/dist/shared/assistant/index.d.ts.map +1 -1
- package/dist/shared/assistant/localUiCommandCopy.d.ts +23 -0
- package/dist/shared/assistant/localUiCommandCopy.d.ts.map +1 -1
- package/dist/shared/assistant/localUiCommandCopy.js +60 -23
- package/dist/shared/assistant/localUiCommands.d.ts +29 -0
- package/dist/shared/assistant/localUiCommands.d.ts.map +1 -1
- package/dist/shared/assistant/localUiCommands.js +18 -7
- package/dist/shared/assistant/productCopy.d.ts +78 -0
- package/dist/shared/assistant/productCopy.d.ts.map +1 -0
- package/dist/shared/assistant/productCopy.js +45 -0
- package/dist/shared/assistant/types.d.ts +19 -8
- package/dist/shared/assistant/types.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.js +1479 -1140
- package/dist/shared/assistant/ui/AssistantEmptyState.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantEmptyState.js +30 -22
- package/dist/shared/assistant/ui/AssistantHeader.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantHeader.js +46 -45
- package/dist/shared/assistant/ui/AssistantMarkdownRenderer.d.ts +18 -3
- package/dist/shared/assistant/ui/AssistantMarkdownRenderer.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantMarkdownRenderer.js +1 -1
- package/dist/shared/assistant/ui/AssistantMessageItem.d.ts +5 -0
- package/dist/shared/assistant/ui/AssistantMessageItem.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantMessageItem.js +89 -84
- package/dist/shared/assistant/ui/AssistantMessageList.d.ts +5 -0
- package/dist/shared/assistant/ui/AssistantMessageList.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantMessageList.js +26 -25
- package/dist/shared/assistant/ui/AssistantUiOfferLink.d.ts +45 -0
- package/dist/shared/assistant/ui/AssistantUiOfferLink.d.ts.map +1 -0
- package/dist/shared/assistant/ui/AssistantUiOfferLink.js +56 -0
- package/dist/shared/assistant/ui/assistantOverlayState.d.ts +9 -0
- package/dist/shared/assistant/ui/assistantOverlayState.d.ts.map +1 -1
- package/dist/shared/assistant/ui/assistantOverlayState.js +37 -28
- package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.d.ts.map +1 -1
- package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.js +1 -1
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +5 -0
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +12 -11
- package/dist/shared/assistant/ui/voice/VoiceConversationView.d.ts +6 -1
- package/dist/shared/assistant/ui/voice/VoiceConversationView.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/VoiceConversationView.js +7 -7
- package/dist/shared/assistant/ui/voice/VoiceTranscriptDrawer.d.ts +6 -1
- package/dist/shared/assistant/ui/voice/VoiceTranscriptDrawer.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/VoiceTranscriptDrawer.js +15 -12
- package/dist/shared/assistant/uiActions/actOnResolve.d.ts +108 -0
- package/dist/shared/assistant/uiActions/actOnResolve.d.ts.map +1 -0
- package/dist/shared/assistant/uiActions/actOnResolve.js +51 -0
- package/dist/shared/assistant/uiActions/linkContext.d.ts +29 -0
- package/dist/shared/assistant/uiActions/linkContext.d.ts.map +1 -1
- package/dist/shared/assistant/uiActions/linkContext.js +37 -10
- package/dist/shared/assistant/uiActions/navIntent.d.ts +58 -0
- package/dist/shared/assistant/uiActions/navIntent.d.ts.map +1 -0
- package/dist/shared/assistant/uiActions/navIntent.js +79 -0
- package/dist/shared/assistant/uiActions/navigateAction.d.ts +6 -1
- package/dist/shared/assistant/uiActions/navigateAction.d.ts.map +1 -1
- package/dist/shared/assistant/uiActions/navigateAction.js +18 -14
- package/dist/shared/assistant/uiActions/navigationOutcome.d.ts +16 -2
- package/dist/shared/assistant/uiActions/navigationOutcome.d.ts.map +1 -1
- package/dist/shared/assistant/uiActions/navigationOutcome.js +6 -2
- package/dist/shared/assistant/uiActions/offerYesOnSurface.d.ts +39 -0
- package/dist/shared/assistant/uiActions/offerYesOnSurface.d.ts.map +1 -0
- package/dist/shared/assistant/uiActions/offerYesOnSurface.js +34 -0
- package/dist/shared/assistant/uiActions/uiCatalogue.d.ts +14 -0
- package/dist/shared/assistant/uiActions/uiCatalogue.d.ts.map +1 -1
- package/dist/shared/assistant/uiActions/uiCatalogue.js +23 -3
- package/dist/shared/assistant/uiActions/uiOffers.d.ts +249 -0
- package/dist/shared/assistant/uiActions/uiOffers.d.ts.map +1 -0
- package/dist/shared/assistant/uiActions/uiOffers.js +195 -0
- package/dist/shared/assistant/writeProposals.d.ts +6 -0
- package/dist/shared/assistant/writeProposals.d.ts.map +1 -1
- package/dist/shared/assistant/writeReplyBinder.d.ts +40 -0
- package/dist/shared/assistant/writeReplyBinder.d.ts.map +1 -1
- package/dist/shared/assistant/writeReplyBinder.js +100 -83
- package/dist/shared/assistant/writeReplySend.d.ts +14 -0
- package/dist/shared/assistant/writeReplySend.d.ts.map +1 -1
- package/dist/shared/assistant/writeReplySend.js +32 -29
- package/dist/shared/components/ContextConversationWidget.js +1 -1
- package/dist/shared/events/sinks/RybbitSink.d.ts.map +1 -1
- package/dist/shared/events/sinks/RybbitSink.js +66 -69
- package/dist/shared/hooks/index.d.ts +2 -0
- package/dist/shared/hooks/index.d.ts.map +1 -1
- package/dist/shared/navigation/unsavedChanges.d.ts +83 -0
- package/dist/shared/navigation/unsavedChanges.d.ts.map +1 -0
- package/dist/shared/navigation/unsavedChanges.js +46 -0
- package/dist/shared/providers/AppShellProvider.d.ts +17 -0
- package/dist/shared/providers/AppShellProvider.d.ts.map +1 -1
- package/dist/shared/providers/AppShellProvider.js +188 -180
- package/dist/shared/providers/shell/I18nProvider.d.ts +92 -4
- package/dist/shared/providers/shell/I18nProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/I18nProvider.js +187 -79
- package/dist/shared/providers/shell/ProfileI18nBridge.d.ts +18 -2
- package/dist/shared/providers/shell/ProfileI18nBridge.d.ts.map +1 -1
- package/dist/shared/providers/shell/ProfileI18nBridge.js +55 -41
- package/dist/shared/providers/shell/directionMode.d.ts +25 -0
- package/dist/shared/providers/shell/directionMode.d.ts.map +1 -0
- package/dist/shared/providers/shell/directionMode.js +34 -0
- package/dist/shared/providers/shell/index.d.ts +4 -2
- package/dist/shared/providers/shell/index.d.ts.map +1 -1
- package/dist/shared/providers/shell/translationLayers.d.ts +30 -0
- package/dist/shared/providers/shell/translationLayers.d.ts.map +1 -0
- package/dist/shared/providers/shell/translationLayers.js +35 -0
- package/dist/shared/providers/shell/translationStore.d.ts +55 -0
- package/dist/shared/providers/shell/translationStore.d.ts.map +1 -0
- package/dist/shared/providers/shell/translationStore.js +100 -0
- package/dist/shared/providers/shell/useShellLabel.d.ts +13 -1
- package/dist/shared/providers/shell/useShellLabel.d.ts.map +1 -1
- package/dist/shared/providers/shell/useShellLabel.js +10 -9
- package/dist/shared-assistant.js +244 -237
- package/dist/shared-hooks.js +10 -9
- package/dist/shared-providers-shell.js +20 -19
- package/dist/shared.js +20 -19
- package/dist/ui/boff-ui2.d.ts.map +1 -1
- package/dist/ui/cta-overflow-menu.d.ts.map +1 -1
- package/dist/ui/cta-overflow-menu.js +20 -18
- package/dist/ui/guidance.d.ts +1 -1
- package/dist/ui/guidance.d.ts.map +1 -1
- package/dist/ui/guidance.js +53 -52
- package/package.json +3 -2
|
@@ -324,12 +324,17 @@ var he = [
|
|
|
324
324
|
"back",
|
|
325
325
|
"offer"
|
|
326
326
|
], Q = [
|
|
327
|
+
"tap",
|
|
328
|
+
"deixis",
|
|
329
|
+
"yes",
|
|
330
|
+
"resolve"
|
|
331
|
+
], ge = /^uo_[0-9a-f]{32}$/, _e = [
|
|
327
332
|
"arrived",
|
|
328
333
|
"redirected",
|
|
329
334
|
"new-tab",
|
|
330
335
|
"refused",
|
|
331
336
|
"unconfirmed"
|
|
332
|
-
], $ = 256,
|
|
337
|
+
], $ = 256, ve = [
|
|
333
338
|
"done",
|
|
334
339
|
"already",
|
|
335
340
|
"failed",
|
|
@@ -338,7 +343,7 @@ var he = [
|
|
|
338
343
|
"ambiguous",
|
|
339
344
|
"confirm"
|
|
340
345
|
];
|
|
341
|
-
function
|
|
346
|
+
function ye(e) {
|
|
342
347
|
if (!C(e)) return null;
|
|
343
348
|
if (e.kind === "theme" && typeof e.mode == "string" && typeof e.alreadyApplied == "boolean") return {
|
|
344
349
|
kind: "theme",
|
|
@@ -346,7 +351,7 @@ function _e(e) {
|
|
|
346
351
|
alreadyApplied: e.alreadyApplied
|
|
347
352
|
};
|
|
348
353
|
if (e.kind === "navigate" && typeof e.destinationId == "string" && typeof e.path == "string" && typeof e.alreadyHere == "boolean") {
|
|
349
|
-
let t = he.find((t) => t === e.via), n =
|
|
354
|
+
let t = he.find((t) => t === e.via), n = _e.find((t) => t === e.outcome), { landedPath: r, offerId: i } = e, a = t === "offer" ? Q.find((t) => t === e.trigger) : void 0, o = t === "offer" && typeof i == "string" && ge.test(i) ? i : void 0;
|
|
350
355
|
return {
|
|
351
356
|
kind: "navigate",
|
|
352
357
|
destinationId: e.destinationId,
|
|
@@ -354,11 +359,13 @@ function _e(e) {
|
|
|
354
359
|
alreadyHere: e.alreadyHere,
|
|
355
360
|
...t ? { via: t } : {},
|
|
356
361
|
...n ? { outcome: n } : {},
|
|
357
|
-
...typeof r == "string" && r.length <= $ ? { landedPath: r } : {}
|
|
362
|
+
...typeof r == "string" && r.length <= $ ? { landedPath: r } : {},
|
|
363
|
+
...a ? { trigger: a } : {},
|
|
364
|
+
...o ? { offerId: o } : {}
|
|
358
365
|
};
|
|
359
366
|
}
|
|
360
367
|
if (e.kind === "app-control" && typeof e.control == "string") {
|
|
361
|
-
let t =
|
|
368
|
+
let t = ve.find((t) => t === e.outcome);
|
|
362
369
|
if (t && e.control.length <= $) {
|
|
363
370
|
let n = e.control === "language" && (t === "done" || t === "already") && typeof e.languageLabel == "string" && e.languageLabel.length > 0 && e.languageLabel.length <= 80 ? e.languageLabel : null;
|
|
364
371
|
return {
|
|
@@ -380,7 +387,7 @@ function _e(e) {
|
|
|
380
387
|
candidateIds: [...t]
|
|
381
388
|
} : null;
|
|
382
389
|
}
|
|
383
|
-
function
|
|
390
|
+
function be(e) {
|
|
384
391
|
if (!L(e) || !C(e)) return null;
|
|
385
392
|
let { kind: t, version: n, status: r, summary: i, data: a, at: o } = e;
|
|
386
393
|
if (typeof t != "string" || typeof n != "number") return null;
|
|
@@ -394,7 +401,7 @@ function ve(e) {
|
|
|
394
401
|
...typeof o == "string" ? { at: o } : {}
|
|
395
402
|
};
|
|
396
403
|
}
|
|
397
|
-
function
|
|
404
|
+
function xe(t) {
|
|
398
405
|
let { kept: n } = z(t), r = {};
|
|
399
406
|
if (n.voice === !0 && (r.voice = !0, typeof n.voiceSessionId == "string" && n.voiceSessionId.length > 0 && (r.voiceSessionId = n.voiceSessionId)), typeof n.lang == "string" && n.lang.length > 0 && (r.lang = n.lang), e(n.mode) && (r.mode = n.mode), typeof n.sandboxId == "string" && (r.sandboxId = n.sandboxId), typeof n.sessionId == "string" && (r.sessionId = n.sessionId), Array.isArray(n.attachments)) {
|
|
400
407
|
let e = n.attachments.map(pe).filter((e) => e !== null);
|
|
@@ -404,15 +411,15 @@ function ye(t) {
|
|
|
404
411
|
let e = n.artifacts.map(me).filter((e) => e !== null);
|
|
405
412
|
e.length > 0 && (r.artifacts = e);
|
|
406
413
|
}
|
|
407
|
-
let i =
|
|
414
|
+
let i = ye(n.localAction);
|
|
408
415
|
if (i && (r.localAction = i), typeof n.continuedVoiceTurns == "number" && (r.continuedVoiceTurns = n.continuedVoiceTurns), n.approvalFollowUp === !0 && (r.approvalFollowUp = !0), n.incomplete === !0 && (r.incomplete = !0), n.truncated === !0 && (r.truncated = !0), Array.isArray(n.records)) {
|
|
409
|
-
let e = n.records.map(
|
|
416
|
+
let e = n.records.map(be).filter((e) => e !== null);
|
|
410
417
|
e.length > 0 && (r.records = e);
|
|
411
418
|
}
|
|
412
419
|
return r;
|
|
413
420
|
}
|
|
414
|
-
function
|
|
415
|
-
let t =
|
|
421
|
+
function Se(e) {
|
|
422
|
+
let t = xe(e.metadata);
|
|
416
423
|
return {
|
|
417
424
|
id: e.clientMessageId ?? `legacy:${e.id}`,
|
|
418
425
|
role: de[e.role],
|
|
@@ -424,4 +431,4 @@ function be(e) {
|
|
|
424
431
|
};
|
|
425
432
|
}
|
|
426
433
|
//#endregion
|
|
427
|
-
export { s as HISTORY_CLIENT_ID_PATTERN, l as HISTORY_ENTRY_CONTENT_CAP_BYTES, c as HISTORY_MAX_CONTENT_BYTES, ee as HISTORY_METADATA_ENVELOPE_MAX_BYTES, oe as HISTORY_METADATA_KEYS, u as HISTORY_REQUEST_HEADROOM_BYTES, Z as HISTORY_SAVE_REQUEST_BUDGET_BYTES, y as HISTORY_TRUNCATION_MARKER, z as filterHistoryMetadata, H as fitHistoryMetadataEnvelope,
|
|
434
|
+
export { s as HISTORY_CLIENT_ID_PATTERN, l as HISTORY_ENTRY_CONTENT_CAP_BYTES, c as HISTORY_MAX_CONTENT_BYTES, ee as HISTORY_METADATA_ENVELOPE_MAX_BYTES, oe as HISTORY_METADATA_KEYS, u as HISTORY_REQUEST_HEADROOM_BYTES, Z as HISTORY_SAVE_REQUEST_BUDGET_BYTES, y as HISTORY_TRUNCATION_MARKER, z as filterHistoryMetadata, H as fitHistoryMetadataEnvelope, Se as fromHistoryEntry, ue as historyEntriesMatchKind, b as isHistoryClientId, X as measureHistorySaveRequest, le as toHistoryEntries, k as toStorableHistoryText, q as truncateUtf8, x as utf8ByteLength };
|
|
@@ -39,8 +39,13 @@ import { AssistantModeConfig } from './conversation';
|
|
|
39
39
|
* and `assistant` pills — the exact defect `AssistantModeSelector` fixed. Use
|
|
40
40
|
* `assistantModeI18nCopy(modes)`, which takes the words from the product.
|
|
41
41
|
* - A mode's `description` and `suggestions`, and the page label from
|
|
42
|
-
* `describeCurrentPage()`, are
|
|
43
|
-
*
|
|
42
|
+
* `describeCurrentPage()`, are the product's words too. Since BOFF-8060 (F5)
|
|
43
|
+
* they are translated AT DISPLAY TIME under keys derived from their English
|
|
44
|
+
* (`suggestion.<mode>.<slug>`, `modeDescription.<mode>`, `page.<slug>`; see
|
|
45
|
+
* `productCopy.ts`). They stay out of the shared manifest, and
|
|
46
|
+
* `assistantI18nSeedCopy` emits them from the product's own modes and the
|
|
47
|
+
* `pageLabels` it passes — so a product passes its ENGLISH, never a
|
|
48
|
+
* pre-translated string (that would key the translation by itself).
|
|
44
49
|
*
|
|
45
50
|
* HOW A PRODUCT'S EXTRACTOR USES IT
|
|
46
51
|
*
|
|
@@ -332,6 +337,8 @@ export declare const ASSISTANT_I18N_LITERAL_COPY: {
|
|
|
332
337
|
readonly "localCommand.themeHighContrast": "high-contrast";
|
|
333
338
|
readonly "localCommand.themeLight": "light";
|
|
334
339
|
readonly "localCommand.themeSet": "Switched to the {{theme}} theme.";
|
|
340
|
+
readonly "localCommand.thisPage": "this page";
|
|
341
|
+
readonly "localCommand.unsavedChanges": "You have unsaved changes in {{label}}. Save or discard them, then ask again.";
|
|
335
342
|
readonly "markdown.closePreview": "Close image preview";
|
|
336
343
|
readonly "markdown.copied": "Copied";
|
|
337
344
|
readonly "markdown.copy": "Copy";
|
|
@@ -356,6 +363,13 @@ export declare const ASSISTANT_I18N_LITERAL_COPY: {
|
|
|
356
363
|
readonly "modeSelector.ariaLabel": "Select assistant mode";
|
|
357
364
|
readonly "modeSelector.auto": "Auto";
|
|
358
365
|
readonly "modeSelector.autoHint": "Answers your questions, and proposes changes for you to approve";
|
|
366
|
+
readonly "offer.announce": "Suggested page: {{page}}";
|
|
367
|
+
readonly "offer.expired": "That suggestion has expired. Ask again, or use the menu.";
|
|
368
|
+
readonly "offer.hintLink": "Tap, or say “take me there”.";
|
|
369
|
+
readonly "offer.hintRead": "Tap, or say “take me there” or “yes”.";
|
|
370
|
+
readonly "offer.keptForUnsaved": "You have unsaved changes in {{label}}, so I stayed here. Tap Open {{page}} when you're ready.";
|
|
371
|
+
readonly "offer.notAvailable": "{{page}} isn't in your menu right now.";
|
|
372
|
+
readonly "offer.open": "Open {{page}}";
|
|
359
373
|
readonly "overlay.launcher": "AI Assistant";
|
|
360
374
|
readonly "overlay.launcherTitle": "AI Assistant ({{shortcut}})";
|
|
361
375
|
readonly "panel.ariaLabel": "AI Assistant";
|
|
@@ -546,8 +560,11 @@ export declare const ASSISTANT_I18N_SEED_COMPAT_COPY: Readonly<{
|
|
|
546
560
|
* see `overrides` on `assistantI18nSeedCopy`.
|
|
547
561
|
*/
|
|
548
562
|
export declare const ASSISTANT_I18N_MANIFEST: Readonly<Record<string, string>>;
|
|
549
|
-
/**
|
|
550
|
-
|
|
563
|
+
/**
|
|
564
|
+
* The part of a mode that decides its keys and English: the pill, plus (when
|
|
565
|
+
* given) its description and suggestion chips (BOFF-8060, F5).
|
|
566
|
+
*/
|
|
567
|
+
export type AssistantModeCopySource = Pick<AssistantModeConfig, "id" | "label" | "producesArtifacts"> & Partial<Pick<AssistantModeConfig, "description" | "suggestions">>;
|
|
551
568
|
/**
|
|
552
569
|
* `mode.<id>` for each mode a product offers, in the product's own words.
|
|
553
570
|
*
|
|
@@ -564,7 +581,9 @@ export declare function assistantModeI18nCopy(modes: readonly AssistantModeCopyS
|
|
|
564
581
|
/**
|
|
565
582
|
* Everything a product seeds for the shared assistant, as FULL keys under its
|
|
566
583
|
* namespace: the manifest, its own mode labels, and its own English for any
|
|
567
|
-
* shared key it has customised
|
|
584
|
+
* shared key it has customised — plus its own display copy (BOFF-8060, F5):
|
|
585
|
+
* each mode's description and suggestion chips, and the `pageLabels` its
|
|
586
|
+
* `describeCurrentPage()` can return (pass every label it can produce).
|
|
568
587
|
*
|
|
569
588
|
* `namespace` is the id given to `AssistantProductProvider` /
|
|
570
589
|
* `AssistantI18nProvider`; the keys are built by `assistantTranslationKey`, the
|
|
@@ -582,5 +601,7 @@ export declare function assistantI18nSeedCopy(args: {
|
|
|
582
601
|
namespace: string;
|
|
583
602
|
modes: readonly AssistantModeCopySource[];
|
|
584
603
|
overrides?: Readonly<Record<string, string>>;
|
|
604
|
+
/** Every English label the product's `describeCurrentPage()` can return. */
|
|
605
|
+
pageLabels?: readonly string[];
|
|
585
606
|
}): Record<string, string>;
|
|
586
607
|
//# sourceMappingURL=i18nManifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18nManifest.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/i18nManifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"i18nManifest.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/i18nManifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAc1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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EAAE,GACxC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAexB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,SAAS,uBAAuB,EAAE,CAAC;IAC1C,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC7C,4EAA4E;IAC5E,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAuCzB"}
|
|
@@ -7,10 +7,11 @@ import { INCOMPLETE_TURN_NOTICES as a } from "./streamBudget.js";
|
|
|
7
7
|
import { STAGE_COPY as o, THINKING_PHRASES as s } from "./stageCopy.js";
|
|
8
8
|
import { VOICE_MUTED_LABEL as c, VOICE_THINKING_LABEL as l } from "./voice/voiceStatus.js";
|
|
9
9
|
import { ATTACHMENT_SOURCES as u } from "./attachmentSources.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { assistantProductCopyEntries as d } from "./productCopy.js";
|
|
11
|
+
import { WRITE_PROPOSAL_ERROR_COPY as f } from "./writeProposalErrorCopy.js";
|
|
12
|
+
import { WRITE_PROPOSAL_VOICE_COPY as p } from "./writeProposalVoice.js";
|
|
12
13
|
//#region src/shared/assistant/i18nManifest.ts
|
|
13
|
-
var
|
|
14
|
+
var m = {
|
|
14
15
|
"apiCalls.consentBody": "In Take action mode the assistant can read AND change your data — creating records, logging activity, updating details, and more, on your behalf.",
|
|
15
16
|
"apiCalls.consentBody2": "It will describe what it is about to do and ask you to confirm before making a change. Only continue if you want the assistant to take actions for you.",
|
|
16
17
|
"apiCalls.consentCancel": "Stay in Ask",
|
|
@@ -230,6 +231,8 @@ var p = {
|
|
|
230
231
|
"localCommand.themeHighContrast": "high-contrast",
|
|
231
232
|
"localCommand.themeLight": "light",
|
|
232
233
|
"localCommand.themeSet": "Switched to the {{theme}} theme.",
|
|
234
|
+
"localCommand.thisPage": "this page",
|
|
235
|
+
"localCommand.unsavedChanges": "You have unsaved changes in {{label}}. Save or discard them, then ask again.",
|
|
233
236
|
"markdown.closePreview": "Close image preview",
|
|
234
237
|
"markdown.copied": "Copied",
|
|
235
238
|
"markdown.copy": "Copy",
|
|
@@ -254,6 +257,13 @@ var p = {
|
|
|
254
257
|
"modeSelector.ariaLabel": "Select assistant mode",
|
|
255
258
|
"modeSelector.auto": "Auto",
|
|
256
259
|
"modeSelector.autoHint": "Answers your questions, and proposes changes for you to approve",
|
|
260
|
+
"offer.announce": "Suggested page: {{page}}",
|
|
261
|
+
"offer.expired": "That suggestion has expired. Ask again, or use the menu.",
|
|
262
|
+
"offer.hintLink": "Tap, or say “take me there”.",
|
|
263
|
+
"offer.hintRead": "Tap, or say “take me there” or “yes”.",
|
|
264
|
+
"offer.keptForUnsaved": "You have unsaved changes in {{label}}, so I stayed here. Tap Open {{page}} when you're ready.",
|
|
265
|
+
"offer.notAvailable": "{{page}} isn't in your menu right now.",
|
|
266
|
+
"offer.open": "Open {{page}}",
|
|
257
267
|
"overlay.launcher": "AI Assistant",
|
|
258
268
|
"overlay.launcherTitle": "AI Assistant ({{shortcut}})",
|
|
259
269
|
"panel.ariaLabel": "AI Assistant",
|
|
@@ -421,39 +431,43 @@ var p = {
|
|
|
421
431
|
"writeProposal.values": "Values",
|
|
422
432
|
"writeProposal.variablesOmitted": "{{count}} more values not shown",
|
|
423
433
|
"writeProposal.waitForTurn": "You can confirm once the assistant finishes replying."
|
|
424
|
-
},
|
|
425
|
-
...
|
|
426
|
-
...
|
|
427
|
-
...
|
|
428
|
-
...
|
|
429
|
-
...
|
|
430
|
-
...
|
|
431
|
-
...
|
|
432
|
-
...
|
|
434
|
+
}, h = (e) => Object.fromEntries(e.map((e) => [e.key, e.fallback])), g = Object.freeze({
|
|
435
|
+
...h(Object.values(o)),
|
|
436
|
+
...h(s),
|
|
437
|
+
...h([l, c]),
|
|
438
|
+
...h(a),
|
|
439
|
+
...h(Object.values(i)),
|
|
440
|
+
...h(Object.values(r)),
|
|
441
|
+
...h(Object.values(f)),
|
|
442
|
+
...h(Object.values(p)),
|
|
433
443
|
...Object.fromEntries(u.map((e) => [e.labelKey, e.labelFallback]))
|
|
434
|
-
}),
|
|
435
|
-
...
|
|
436
|
-
...
|
|
437
|
-
...
|
|
444
|
+
}), _ = Object.freeze({ "outcome.usageDailyLimitReachedNoTime": "You've reached today's AI assistant limit. Try again tomorrow." }), v = Object.freeze({
|
|
445
|
+
...m,
|
|
446
|
+
...g,
|
|
447
|
+
..._
|
|
438
448
|
});
|
|
439
|
-
function
|
|
449
|
+
function y(e) {
|
|
440
450
|
let r = e.map((e) => e.id).filter((e) => !n(e));
|
|
441
451
|
if (r.length > 0) throw Error(`assistantModeI18nCopy: malformed mode id ${r.map((e) => JSON.stringify(e)).join(", ")}. Declare product modes with declareAssistantMode().`);
|
|
442
452
|
return Object.fromEntries(e.map((e) => [`mode.${e.id}`, e.label || t(e)]));
|
|
443
453
|
}
|
|
444
|
-
function
|
|
454
|
+
function b(t) {
|
|
445
455
|
let n = {
|
|
446
|
-
...
|
|
447
|
-
...
|
|
456
|
+
...v,
|
|
457
|
+
...y(t.modes)
|
|
448
458
|
}, r = Object.entries(t.overrides ?? {}), i = r.filter(([e]) => !Object.hasOwn(n, e)).map(([e]) => e);
|
|
449
459
|
if (i.length > 0) throw Error(`assistantI18nSeedCopy: no shared assistant key ${i.join(", ")} to override. Check the spelling, or that the key is a mode this product offers; a key fe-libs no longer requests belongs with the product's own keys.`);
|
|
450
460
|
let a = r.filter(([, e]) => e.trim() === "").map(([e]) => e);
|
|
451
461
|
if (a.length > 0) throw Error(`assistantI18nSeedCopy: blank English for ${a.join(", ")}. Omit the override to keep the shared English.`);
|
|
452
462
|
let o = {
|
|
453
463
|
...n,
|
|
454
|
-
...Object.fromEntries(r)
|
|
464
|
+
...Object.fromEntries(r),
|
|
465
|
+
...d({
|
|
466
|
+
modes: t.modes,
|
|
467
|
+
pageLabels: t.pageLabels
|
|
468
|
+
})
|
|
455
469
|
};
|
|
456
470
|
return Object.fromEntries(Object.entries(o).map(([n, r]) => [e(t.namespace, n), r]));
|
|
457
471
|
}
|
|
458
472
|
//#endregion
|
|
459
|
-
export {
|
|
473
|
+
export { g as ASSISTANT_I18N_COMPUTED_COPY, m as ASSISTANT_I18N_LITERAL_COPY, v as ASSISTANT_I18N_MANIFEST, _ as ASSISTANT_I18N_SEED_COMPAT_COPY, b as assistantI18nSeedCopy, y as assistantModeI18nCopy };
|
|
@@ -90,6 +90,7 @@ export * from './i18nManifest';
|
|
|
90
90
|
export * from './modeCopy';
|
|
91
91
|
export * from './modeIds';
|
|
92
92
|
export * from './modeCapabilities';
|
|
93
|
+
export * from './productCopy';
|
|
93
94
|
export * from './adminModeSendGate';
|
|
94
95
|
export * from './attachmentTurn';
|
|
95
96
|
export * from './writeModeConsent';
|
|
@@ -208,6 +209,7 @@ export * from './history/historySearch';
|
|
|
208
209
|
export * from './history/useAssistantHistorySearch';
|
|
209
210
|
export * from './ui/AssistantMessageItem';
|
|
210
211
|
export * from './ui/AssistantMessageList';
|
|
212
|
+
export * from './ui/AssistantUiOfferLink';
|
|
211
213
|
export * from './ui/AssistantTurnActivity';
|
|
212
214
|
export * from './ui/voice/AssistantVoiceSession';
|
|
213
215
|
export * from './ui/voice/HandsFreePrivacyNotice';
|
|
@@ -240,6 +242,11 @@ export * from './uiActions/linkContext';
|
|
|
240
242
|
export * from './uiActions/deixis';
|
|
241
243
|
export * from './uiActions/recordNames';
|
|
242
244
|
export * from './uiActions/uiCatalogue';
|
|
245
|
+
export * from './uiActions/uiOffers';
|
|
246
|
+
export * from './uiActions/offerYesOnSurface';
|
|
247
|
+
export * from './uiActions/navIntent';
|
|
248
|
+
export * from './uiActions/actOnResolve';
|
|
249
|
+
export * from '../navigation/unsavedChanges';
|
|
243
250
|
export * from './appControls/types';
|
|
244
251
|
export * from './appControls/registry';
|
|
245
252
|
export * from './appControls/useAssistantControl';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AAGxB,cAAc,wBAAwB,CAAC;AAKvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAE9C,cAAc,qBAAqB,CAAC;AAGpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAElC,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yCAAyC,CAAC;AACxD,cAAc,uBAAuB,CAAC;AACtC,cAAc,sCAAsC,CAAC;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wB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AAEtC,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yCAAyC,CAAC"}
|
|
@@ -46,10 +46,18 @@ export interface NavigationOutcomeNames {
|
|
|
46
46
|
* - redirected: where the person actually is. A landing with no registry label
|
|
47
47
|
* is "another page" rather than a raw path.
|
|
48
48
|
* - unconfirmed / refused: "Couldn't open X." (the router never got there).
|
|
49
|
+
* - refused for unsaved changes (N4): "You have unsaved changes in {label}.
|
|
50
|
+
* Save or discard them, then ask again." — the first change the guard named;
|
|
51
|
+
* "this page" when it gave no label.
|
|
49
52
|
* - new-tab: honest either way — a voice-triggered `window.open` has no user
|
|
50
53
|
* activation and may be blocked, so the link is given too.
|
|
51
54
|
*/
|
|
52
55
|
export declare function navigationOutcomeCopy(tr: AssistantTr, outcome: NavigationOutcome, names: NavigationOutcomeNames): LocalCommandCopy;
|
|
56
|
+
/**
|
|
57
|
+
* ★ BOFF-8060 (N4): an assistant navigation refused because the page holds
|
|
58
|
+
* unsaved changes. `label` is the product's own name for what is unsaved.
|
|
59
|
+
*/
|
|
60
|
+
export declare function unsavedChangesCopy(tr: AssistantTr, label: string | null): LocalCommandCopy;
|
|
53
61
|
/** "Back on X." — `page` is the registry label of where the person went back to. */
|
|
54
62
|
export declare function backDoneCopy(tr: AssistantTr, page: string | null): LocalCommandCopy;
|
|
55
63
|
/** A link in the last reply that does not resolve to a page the person can open. */
|
|
@@ -76,4 +84,19 @@ export declare function entityNounText(tr: AssistantTr, noun: {
|
|
|
76
84
|
key: string;
|
|
77
85
|
fallback: string;
|
|
78
86
|
}): string;
|
|
87
|
+
/** The link: "Open {{page}}". */
|
|
88
|
+
export declare function offerOpenText(tr: AssistantTr, page: string): string;
|
|
89
|
+
/** Announced once, politely, when the link first appears. */
|
|
90
|
+
export declare function offerAnnounceText(tr: AssistantTr, page: string): string;
|
|
91
|
+
/**
|
|
92
|
+
* The hint under the link: "yes" is named only for an offer the model asked
|
|
93
|
+
* about in a read transport (`uiOfferHintKind`).
|
|
94
|
+
*/
|
|
95
|
+
export declare function offerHintText(tr: AssistantTr, kind: "read" | "link"): string;
|
|
96
|
+
/** A "yes" to an offer that ran out of time. */
|
|
97
|
+
export declare function offerExpiredCopy(tr: AssistantTr): LocalCommandCopy;
|
|
98
|
+
/** An accepted offer whose page the live registry no longer holds. */
|
|
99
|
+
export declare function offerNotAvailableCopy(tr: AssistantTr, page: string | null): LocalCommandCopy;
|
|
100
|
+
/** Act-on-resolve held back by unsaved changes (N4): the offer stays. */
|
|
101
|
+
export declare function offerKeptForUnsavedCopy(tr: AssistantTr, label: string | null, page: string | null): LocalCommandCopy;
|
|
79
102
|
//# sourceMappingURL=localUiCommandCopy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localUiCommandCopy.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/localUiCommandCopy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAEvE;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;CACrB;AA8CD,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,WAAW,EACf,IAAI,EAAE;IAAE,cAAc,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,cAAc,CAAA;CAAE,EACvD,aAAa,EAAE,OAAO,GACrB,gBAAgB,CAiClB;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,WAC8B,CAAC;AAIxE,wBAAgB,qBAAqB,CACnC,EAAE,EAAE,WAAW,EACf,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,OAAO,GACnB,gBAAgB,CAOlB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,EAAE,EAAE,WAAW,EACf,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,SAAS,gBAAgB,EAAE,GACtC,gBAAgB,CAelB;
|
|
1
|
+
{"version":3,"file":"localUiCommandCopy.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/localUiCommandCopy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAEvE;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;CACrB;AA8CD,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,WAAW,EACf,IAAI,EAAE;IAAE,cAAc,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,cAAc,CAAA;CAAE,EACvD,aAAa,EAAE,OAAO,GACrB,gBAAgB,CAiClB;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,WAC8B,CAAC;AAIxE,wBAAgB,qBAAqB,CACnC,EAAE,EAAE,WAAW,EACf,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,OAAO,GACnB,gBAAgB,CAOlB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,EAAE,EAAE,WAAW,EACf,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,SAAS,gBAAgB,EAAE,GACtC,gBAAgB,CAelB;AA6DD,MAAM,WAAW,sBAAsB;IACrC,0EAA0E;IAC1E,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,8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CAAA;CAAE,GACtC,MAAM,CAER;AASD,iCAAiC;AACjC,wBAAgB,aAAa,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,6DAA6D;AAC7D,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAI5E;AAkBD,gDAAgD;AAChD,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,WAAW,GAAG,gBAAgB,CAElE;AAED,sEAAsE;AACtE,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,gBAAgB,CAI5F;AAED,yEAAyE;AACzE,wBAAgB,uBAAuB,CACrC,EAAE,EAAE,WAAW,EACf,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,IAAI,EAAE,MAAM,GAAG,IAAI,GAClB,gBAAgB,CAKlB"}
|
|
@@ -33,8 +33,8 @@ function c(e, t, i) {
|
|
|
33
33
|
return `${r(e ?? "", { page: a(t) })}\n\n${n.join("\n")}`;
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
var l = (e) => [e("localCommand.opened", "Opened {{page}}."), "Opened {{page}}."], u = (e) => [e("localCommand.redirected", "{{page}} didn't open. You're on {{landed}} instead."), "{{page}} didn't open. You're on {{landed}} instead."], d = (e) => [e("localCommand.notOpened", "Couldn't open {{page}}."), "Couldn't open {{page}}."], f = (e) => [e("localCommand.newTab", "{{page}} opens in a separate tab. If nothing opened, use this link: {{link}}"), "{{page}} opens in a separate tab. If nothing opened, use this link: {{link}}"], p = (e) => [e("localCommand.backDone", "Back on {{page}}."), "Back on {{page}}."], m = (e) => [e("localCommand.linkNotOpenable", "I can't open that link from here."), "I can't open that link from here."], h = (e) => [e("localCommand.chooseLinked", "My last reply links more than one page. Which one?"), "My last reply links more than one page. Which one?"], g = (e) => [e("localCommand.pickFromList", "Pick one of the pages listed above."), "Pick one of the pages listed above."], _ = (e) => [e("localCommand.previousPage", "the previous page"), "the previous page"], v = (e) => [e("localCommand.anotherPage", "another page"), "another page"];
|
|
37
|
-
function
|
|
36
|
+
var l = (e) => [e("localCommand.opened", "Opened {{page}}."), "Opened {{page}}."], u = (e) => [e("localCommand.redirected", "{{page}} didn't open. You're on {{landed}} instead."), "{{page}} didn't open. You're on {{landed}} instead."], d = (e) => [e("localCommand.notOpened", "Couldn't open {{page}}."), "Couldn't open {{page}}."], f = (e) => [e("localCommand.newTab", "{{page}} opens in a separate tab. If nothing opened, use this link: {{link}}"), "{{page}} opens in a separate tab. If nothing opened, use this link: {{link}}"], p = (e) => [e("localCommand.backDone", "Back on {{page}}."), "Back on {{page}}."], m = (e) => [e("localCommand.linkNotOpenable", "I can't open that link from here."), "I can't open that link from here."], h = (e) => [e("localCommand.chooseLinked", "My last reply links more than one page. Which one?"), "My last reply links more than one page. Which one?"], g = (e) => [e("localCommand.pickFromList", "Pick one of the pages listed above."), "Pick one of the pages listed above."], _ = (e) => [e("localCommand.previousPage", "the previous page"), "the previous page"], v = (e) => [e("localCommand.anotherPage", "another page"), "another page"], y = (e) => [e("localCommand.unsavedChanges", "You have unsaved changes in {{label}}. Save or discard them, then ask again."), "You have unsaved changes in {{label}}. Save or discard them, then ask again."], b = (e) => [e("localCommand.thisPage", "this page"), "this page"];
|
|
37
|
+
function x(e, t, i, o = () => ({})) {
|
|
38
38
|
let s = [t], c = Object.entries(i).map(([t, { label: n, fallback: r }]) => ({
|
|
39
39
|
name: t,
|
|
40
40
|
label: n,
|
|
@@ -49,62 +49,99 @@ function y(e, t, i, o = () => ({})) {
|
|
|
49
49
|
});
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function S(e, t, n) {
|
|
53
53
|
let r = {
|
|
54
54
|
label: n.page,
|
|
55
55
|
fallback: v
|
|
56
56
|
};
|
|
57
57
|
switch (t.status) {
|
|
58
|
-
case "arrived": return
|
|
59
|
-
case "redirected": return
|
|
58
|
+
case "arrived": return x(e, l(e), { page: r });
|
|
59
|
+
case "redirected": return x(e, u(e), {
|
|
60
60
|
page: r,
|
|
61
61
|
landed: {
|
|
62
62
|
label: n.landed,
|
|
63
63
|
fallback: v
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
|
-
case "new-tab": return
|
|
67
|
-
case "refused":
|
|
68
|
-
case "unconfirmed": return
|
|
66
|
+
case "new-tab": return x(e, f(e), { page: r }, ({ page: e }) => ({ link: n.path ? `[${e ?? ""}](${o(n.path)})` : e ?? "" }));
|
|
67
|
+
case "refused": return t.reason === "unsaved-changes" ? C(e, t.unsaved?.[0]?.label ?? null) : x(e, d(e), { page: r });
|
|
68
|
+
case "unconfirmed": return x(e, d(e), { page: r });
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
return
|
|
71
|
+
function C(e, t) {
|
|
72
|
+
return x(e, y(e), { label: {
|
|
73
|
+
label: t,
|
|
74
|
+
fallback: b
|
|
75
|
+
} });
|
|
76
|
+
}
|
|
77
|
+
function w(e, t) {
|
|
78
|
+
return x(e, p(e), { page: {
|
|
73
79
|
label: t,
|
|
74
80
|
fallback: _
|
|
75
81
|
} });
|
|
76
82
|
}
|
|
77
|
-
function
|
|
83
|
+
function T(e) {
|
|
78
84
|
return n([m(e)], ([e]) => e ?? "");
|
|
79
85
|
}
|
|
80
|
-
function
|
|
86
|
+
function E(e, t) {
|
|
81
87
|
return n([h(e)], ([e]) => {
|
|
82
88
|
let n = t.map((e, t) => `${t + 1}. [${a(e.label)}](${o(e.path)})${e.context ? ` — ${a(e.context)}` : ""}`);
|
|
83
89
|
return `${e ?? ""}\n\n${n.join("\n")}`;
|
|
84
90
|
});
|
|
85
91
|
}
|
|
86
|
-
function
|
|
92
|
+
function D(e) {
|
|
87
93
|
return n([g(e)], ([e]) => e ?? "");
|
|
88
94
|
}
|
|
89
|
-
var
|
|
90
|
-
function
|
|
95
|
+
var O = (e) => [e("localCommand.chooseKinds", "Do you mean the {{first}} or the {{second}}?"), "Do you mean the {{first}} or the {{second}}?"], k = (e) => [e("localCommand.chooseKindsMany", "Which one do you mean?"), "Which one do you mean?"], A = (e) => [e("localCommand.chooseRecord", "More than one {{noun}} is called “{{name}}”. Which one?"), "More than one {{noun}} is called “{{name}}”. Which one?"];
|
|
96
|
+
function j(e) {
|
|
91
97
|
return e.map((e, t) => `${t + 1}. [${a(e.label)}](${o(e.path)})${e.context ? ` — ${a(e.context)}` : ""}`).join("\n");
|
|
92
98
|
}
|
|
93
|
-
function
|
|
99
|
+
function M(e, t, i) {
|
|
94
100
|
let o = t.length === 2;
|
|
95
|
-
return n([o ?
|
|
101
|
+
return n([o ? O(e) : k(e)], ([e]) => `${o ? r(e ?? "", {
|
|
96
102
|
first: a(t[0] ?? ""),
|
|
97
103
|
second: a(t[1] ?? "")
|
|
98
|
-
}) : e ?? ""}\n\n${
|
|
104
|
+
}) : e ?? ""}\n\n${j(i)}`);
|
|
99
105
|
}
|
|
100
|
-
function
|
|
101
|
-
return n([
|
|
106
|
+
function N(e, t, i, o) {
|
|
107
|
+
return n([A(e)], ([e]) => `${r(e ?? "", {
|
|
102
108
|
noun: a(t),
|
|
103
109
|
name: a(i)
|
|
104
|
-
})}\n\n${
|
|
110
|
+
})}\n\n${j(o)}`);
|
|
105
111
|
}
|
|
106
|
-
function
|
|
112
|
+
function P(e, t) {
|
|
107
113
|
return e(t.key, t.fallback);
|
|
108
114
|
}
|
|
115
|
+
function F(e, t) {
|
|
116
|
+
return r(e("offer.open", "Open {{page}}"), { page: t });
|
|
117
|
+
}
|
|
118
|
+
function I(e, t) {
|
|
119
|
+
return r(e("offer.announce", "Suggested page: {{page}}"), { page: t });
|
|
120
|
+
}
|
|
121
|
+
function L(e, t) {
|
|
122
|
+
return t === "read" ? e("offer.hintRead", "Tap, or say “take me there” or “yes”.") : e("offer.hintLink", "Tap, or say “take me there”.");
|
|
123
|
+
}
|
|
124
|
+
var R = (e) => [e("offer.expired", "That suggestion has expired. Ask again, or use the menu."), "That suggestion has expired. Ask again, or use the menu."], z = (e) => [e("offer.notAvailable", "{{page}} isn't in your menu right now."), "{{page}} isn't in your menu right now."], B = (e) => [e("offer.keptForUnsaved", "You have unsaved changes in {{label}}, so I stayed here. Tap Open {{page}} when you're ready."), "You have unsaved changes in {{label}}, so I stayed here. Tap Open {{page}} when you're ready."];
|
|
125
|
+
function V(e) {
|
|
126
|
+
return n([R(e)], ([e]) => e ?? "");
|
|
127
|
+
}
|
|
128
|
+
function H(e, t) {
|
|
129
|
+
return x(e, z(e), { page: {
|
|
130
|
+
label: t,
|
|
131
|
+
fallback: v
|
|
132
|
+
} });
|
|
133
|
+
}
|
|
134
|
+
function U(e, t, n) {
|
|
135
|
+
return x(e, B(e), {
|
|
136
|
+
label: {
|
|
137
|
+
label: t,
|
|
138
|
+
fallback: b
|
|
139
|
+
},
|
|
140
|
+
page: {
|
|
141
|
+
label: n,
|
|
142
|
+
fallback: v
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
109
146
|
//#endregion
|
|
110
|
-
export {
|
|
147
|
+
export { w as backDoneCopy, c as chooseDestinationCopy, E as chooseLinkedCopy, P as entityNounText, T as linkNotOpenableCopy, a as markdownText, s as navigationCommandCopy, S as navigationOutcomeCopy, I as offerAnnounceText, V as offerExpiredCopy, L as offerHintText, U as offerKeptForUnsavedCopy, H as offerNotAvailableCopy, F as offerOpenText, D as pickFromListCopy, N as recordChoiceCopy, M as recordKindsCopy, i as themeCommandCopy, C as unsavedChangesCopy };
|
|
@@ -42,6 +42,19 @@ export type LocalUiCommand = {
|
|
|
42
42
|
kind: "navigate";
|
|
43
43
|
destination: LocalDestination;
|
|
44
44
|
via?: "link" | "choice";
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* ★ BOFF-8060 (N3): a page the model OFFERED, accepted — "take me there"
|
|
48
|
+
* (`deixis`) over the newest reply's one target, or a bare "yes" the 5a
|
|
49
|
+
* binder accepted (`yes`). The panel re-validates and claims the offer before
|
|
50
|
+
* it navigates. `destination` is the person's own registry entry.
|
|
51
|
+
*/
|
|
52
|
+
| {
|
|
53
|
+
kind: "navigate";
|
|
54
|
+
destination: LocalDestination;
|
|
55
|
+
via: "offer";
|
|
56
|
+
offerId: string;
|
|
57
|
+
trigger: "deixis" | "yes";
|
|
45
58
|
} | {
|
|
46
59
|
kind: "choose-destination";
|
|
47
60
|
query: string;
|
|
@@ -138,6 +151,22 @@ export interface LocalUiCommandOptions {
|
|
|
138
151
|
* the N2 sandbox image is live.
|
|
139
152
|
*/
|
|
140
153
|
uiCatalogue?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* ★ BOFF-8060 (N3): read the pages the model OFFERS (`uiOffers` on the turn
|
|
156
|
+
* poller's reads) and draw an "Open {page}" link under the reply. Default
|
|
157
|
+
* off. Read only from a sandbox whose own `/health` says it serves offers
|
|
158
|
+
* and is proposal-v1.
|
|
159
|
+
*/
|
|
160
|
+
uiOffers?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* ★★ BOFF-8060 (N4, design §8 R5): the product ATTESTS that every editor
|
|
163
|
+
* which can hold a draft registers it with N4 (`useUnsavedChanges`), so an
|
|
164
|
+
* empty `listUnsavedChanges()` means "nothing unsaved" and not "nobody
|
|
165
|
+
* reports". Default off: act-on-resolve then never acts (R5 is absent) and
|
|
166
|
+
* every offer stays an "Open {page}" link. Set it only in the same release
|
|
167
|
+
* as the editors' adoption, with a seam test that pins both.
|
|
168
|
+
*/
|
|
169
|
+
leaveGuard?: boolean;
|
|
141
170
|
}
|
|
142
171
|
/**
|
|
143
172
|
* What only the panel knows at the moment of sending. Optional, so every
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localUiCommands.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/localUi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EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,CAAC;CAChD;AAKD;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,MAAM,CAAC,EAAE,MAAM,GACd,gBAAgB,EAAE,CAgCpB;AAID,0CAA0C;AAC1C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC;AAE3D;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,WAAW,CAAA;CAAE,GACpD;IAAE,cAAc,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,cAAc,CAAA;CAAE,CAOnD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAapE;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,WAAW,EAAE,gBAAgB,EAC7B,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,SAAS,gBAAgB,EAAE,GACxC,OAAO,CAcT"}
|
|
@@ -228,14 +228,25 @@ function N(e, t) {
|
|
|
228
228
|
candidateIds: t.pendingChoice.candidateIds
|
|
229
229
|
};
|
|
230
230
|
let { targets: n, unresolved: r } = t.links, [a] = n;
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
231
|
+
if (!a) return r > 0 ? { kind: "link-not-openable" } : null;
|
|
232
|
+
if (n.length === 1) {
|
|
233
|
+
let e = t.offers?.find((e) => e.path === a.path)?.offerId;
|
|
234
|
+
return e ? {
|
|
235
|
+
kind: "navigate",
|
|
236
|
+
destination: a,
|
|
237
|
+
via: "offer",
|
|
238
|
+
offerId: e,
|
|
239
|
+
trigger: "deixis"
|
|
240
|
+
} : {
|
|
241
|
+
kind: "navigate",
|
|
242
|
+
destination: a,
|
|
243
|
+
via: "link"
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
return {
|
|
236
247
|
kind: "choose-linked",
|
|
237
248
|
candidates: n.slice(0, 4)
|
|
238
|
-
}
|
|
249
|
+
};
|
|
239
250
|
}
|
|
240
251
|
function P(e, t) {
|
|
241
252
|
let n = (e) => e.kind === "navigate" ? [e.destination] : e.kind === "choose-linked" || e.kind === "choose-destination" ? e.candidates : null, r = n(e), i = n(t);
|
|
@@ -243,7 +254,7 @@ function P(e, t) {
|
|
|
243
254
|
let a = [];
|
|
244
255
|
for (let e of [...r, ...i]) a.some((t) => t.path === e.path) || a.push(e);
|
|
245
256
|
let [o] = a;
|
|
246
|
-
return o && a.length === 1 ? {
|
|
257
|
+
return o && a.length === 1 ? e.kind === "navigate" ? e : {
|
|
247
258
|
kind: "navigate",
|
|
248
259
|
destination: o,
|
|
249
260
|
via: "link"
|