@burdenoff/fe-libs 2026.1024.1 → 2026.1024.3
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/FooterBar.d.ts +1 -1
- package/dist/chrome/NativePageTransition.d.ts +1 -1
- package/dist/chrome/ProductPickerSheet.js +42 -42
- package/dist/chrome/ProductSwitcher.d.ts +8 -0
- package/dist/chrome/ProductSwitcher.js +83 -72
- package/dist/chrome/index.d.ts +9 -9
- package/dist/chrome/swipe/swipeMath.d.ts +1 -1
- package/dist/shared/assistant/api.d.ts +3 -3
- package/dist/shared/assistant/appControls/grammar.d.ts +21 -21
- package/dist/shared/assistant/appControls/languageReply.d.ts +1 -1
- package/dist/shared/assistant/appControls/names.d.ts +3 -3
- package/dist/shared/assistant/appControls/pageAdapters.d.ts +5 -5
- package/dist/shared/assistant/appControls/plan.d.ts +38 -38
- package/dist/shared/assistant/appControls/types.d.ts +15 -15
- package/dist/shared/assistant/appControls/useAssistantControl.d.ts +1 -1
- package/dist/shared/assistant/attachmentSources.d.ts +2 -2
- package/dist/shared/assistant/attachments.d.ts +5 -5
- package/dist/shared/assistant/autoRouting.d.ts +6 -6
- package/dist/shared/assistant/avatar/live/LiveAvatarStage.js +5 -1
- package/dist/shared/assistant/avatar/live/LiveAvatarTabView.js +28 -25
- package/dist/shared/assistant/avatar/live/createLiveAvatarSeam.d.ts +1 -1
- package/dist/shared/assistant/avatar/live/createLiveAvatarSeam.js +61 -50
- package/dist/shared/assistant/avatar/live/liveAvatarController.d.ts +19 -4
- package/dist/shared/assistant/avatar/live/liveAvatarController.js +163 -155
- package/dist/shared/assistant/avatar/live/liveAvatarStatus.d.ts +5 -3
- package/dist/shared/assistant/avatar/live/liveAvatarStatus.js +2 -2
- package/dist/shared/assistant/conversation.d.ts +20 -20
- package/dist/shared/assistant/displayContent.d.ts +4 -4
- package/dist/shared/assistant/documentText.d.ts +3 -3
- package/dist/shared/assistant/exportConversation.d.ts +1 -1
- package/dist/shared/assistant/history/historyControls.d.ts +4 -4
- package/dist/shared/assistant/history/historyErrors.d.ts +3 -3
- package/dist/shared/assistant/history/historyList.d.ts +5 -5
- package/dist/shared/assistant/history/historyMerge.d.ts +4 -4
- package/dist/shared/assistant/history/historyOperations.d.ts +1 -1
- package/dist/shared/assistant/history/historySearch.d.ts +5 -5
- package/dist/shared/assistant/history/historyStatus.d.ts +1 -1
- package/dist/shared/assistant/history/historyTypes.d.ts +12 -12
- package/dist/shared/assistant/history/profileBoundStorage.d.ts +2 -2
- package/dist/shared/assistant/i18n.d.ts +1 -1
- package/dist/shared/assistant/i18nManifest.d.ts +534 -534
- package/dist/shared/assistant/liveDeltas.d.ts +1 -1
- package/dist/shared/assistant/liveOverlay.d.ts +1 -1
- package/dist/shared/assistant/localUiCommandCopy.d.ts +1 -1
- package/dist/shared/assistant/localUiCommands.d.ts +22 -22
- package/dist/shared/assistant/localeCommands/engine.d.ts +5 -5
- package/dist/shared/assistant/localeCommands/evaluate.d.ts +8 -8
- package/dist/shared/assistant/localeCommands/fold.d.ts +2 -2
- package/dist/shared/assistant/localeCommands/frames.d.ts +3 -3
- package/dist/shared/assistant/localeCommands/gate.d.ts +3 -3
- package/dist/shared/assistant/localeCommands/languageNames.d.ts +1 -1
- package/dist/shared/assistant/localeCommands/normalise.d.ts +1 -1
- package/dist/shared/assistant/localeCommands/types.d.ts +4 -4
- package/dist/shared/assistant/modeCapabilities.d.ts +1 -1
- package/dist/shared/assistant/modeCopy.d.ts +2 -2
- package/dist/shared/assistant/permissionError.d.ts +2 -2
- package/dist/shared/assistant/preview/surfaceState.d.ts +1 -1
- package/dist/shared/assistant/preview/types.d.ts +5 -5
- package/dist/shared/assistant/preview/writeActionResults.d.ts +1 -1
- package/dist/shared/assistant/prewarm.d.ts +5 -5
- package/dist/shared/assistant/quota.d.ts +2 -2
- package/dist/shared/assistant/sandboxReadiness.d.ts +2 -2
- package/dist/shared/assistant/speech/speechFeed.d.ts +3 -3
- package/dist/shared/assistant/turnOutcome.d.ts +2 -2
- package/dist/shared/assistant/turnProgress.d.ts +1 -1
- package/dist/shared/assistant/turnState.d.ts +1 -1
- package/dist/shared/assistant/turnStream.d.ts +3 -3
- package/dist/shared/assistant/turnTimeline.d.ts +13 -13
- package/dist/shared/assistant/turnTimingReport.d.ts +1 -1
- package/dist/shared/assistant/turnTimingReporter.d.ts +3 -3
- package/dist/shared/assistant/ui/AssistantAvatarTabs.d.ts +1 -1
- package/dist/shared/assistant/ui/AssistantHistoryNotices.d.ts +1 -1
- package/dist/shared/assistant/ui/AssistantToolActivity.d.ts +1 -1
- package/dist/shared/assistant/ui/AssistantUiOfferLink.d.ts +2 -2
- package/dist/shared/assistant/ui/AssistantWriteConfirmDialog.d.ts +3 -3
- package/dist/shared/assistant/ui/composer/AssistantAttachmentButton.d.ts +1 -1
- package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.d.ts +1 -1
- package/dist/shared/assistant/ui/leaveConfirmFocus.d.ts +1 -1
- package/dist/shared/assistant/ui/leaveConfirmNavigate.d.ts +3 -3
- package/dist/shared/assistant/ui/panelOverlays.d.ts +5 -5
- package/dist/shared/assistant/ui/useVoiceSession.d.ts +5 -5
- package/dist/shared/assistant/ui/useWriteProposalConfirm.d.ts +4 -4
- package/dist/shared/assistant/ui/useWriteProposals.d.ts +2 -2
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +1 -1
- package/dist/shared/assistant/ui/voice/VoiceCaption.d.ts +1 -1
- package/dist/shared/assistant/ui/voice/VoiceWaveform.d.ts +1 -1
- package/dist/shared/assistant/ui/voice/voiceSessionEscape.d.ts +2 -2
- package/dist/shared/assistant/ui/voice/voiceStartGate.d.ts +6 -6
- package/dist/shared/assistant/ui/writeProposalPresentation.d.ts +1 -1
- package/dist/shared/assistant/uiActions/actOnResolve.d.ts +5 -5
- package/dist/shared/assistant/uiActions/assistantHref.d.ts +2 -2
- package/dist/shared/assistant/uiActions/backStack.d.ts +1 -1
- package/dist/shared/assistant/uiActions/deixis.d.ts +3 -3
- package/dist/shared/assistant/uiActions/entityRoutes.d.ts +1 -1
- package/dist/shared/assistant/uiActions/navigationOutcome.d.ts +8 -8
- package/dist/shared/assistant/uiActions/offerYesOnSurface.d.ts +1 -1
- package/dist/shared/assistant/uiActions/resolveTarget.d.ts +2 -2
- package/dist/shared/assistant/uiActions/uiOffers.d.ts +5 -5
- package/dist/shared/assistant/usageReporting.d.ts +2 -2
- package/dist/shared/assistant/useWorkspaceWriteAccess.d.ts +1 -1
- package/dist/shared/assistant/voice/affirmations.d.ts +1 -1
- package/dist/shared/assistant/voice/handsFree.d.ts +3 -3
- package/dist/shared/assistant/voice/handsfree/bargeIn.d.ts +5 -5
- package/dist/shared/assistant/voice/handsfree/echoGate.d.ts +6 -6
- package/dist/shared/assistant/voice/handsfree/handsFreeController.d.ts +7 -7
- package/dist/shared/assistant/voice/handsfree/handsFreeSetting.d.ts +2 -2
- package/dist/shared/assistant/voice/handsfree/micCapture.d.ts +1 -1
- package/dist/shared/assistant/voice/handsfree/playbackReference.d.ts +1 -1
- package/dist/shared/assistant/voice/handsfree/sttTransport.d.ts +3 -3
- package/dist/shared/assistant/voice/handsfree/useHandsFreeInterrupt.d.ts +4 -4
- package/dist/shared/assistant/voice/handsfree/vad.d.ts +1 -1
- package/dist/shared/assistant/voice/speechPlayback.d.ts +7 -7
- package/dist/shared/assistant/voice/useVoiceInput.d.ts +1 -1
- package/dist/shared/assistant/voice/voiceReopen.d.ts +8 -8
- package/dist/shared/assistant/writeConfirmSeam.d.ts +1 -1
- package/dist/shared/assistant/writeModeConsent.d.ts +7 -7
- package/dist/shared/assistant/writeProposalDiscovery.d.ts +3 -3
- package/dist/shared/assistant/writeProposalErrorCopy.d.ts +1 -1
- package/dist/shared/assistant/writeProposals.d.ts +23 -23
- package/dist/shared/assistant/writeReplyBinder.d.ts +11 -11
- package/dist/shared/assistant/writeReplySend.d.ts +7 -7
- package/dist/shared/components/LandingOrDashboardRedirect.d.ts +18 -3
- package/dist/shared/components/LandingOrDashboardRedirect.js +58 -28
- package/dist/shared/components/index.d.ts +2 -1
- package/dist/shared/hooks/shell/globalSearchError.d.ts +2 -2
- package/dist/shared/navigation/productSwitchHandoff.d.ts +45 -0
- package/dist/shared/navigation/productSwitchHandoff.js +27 -0
- package/dist/shared/navigation/unsavedChanges.d.ts +1 -1
- package/dist/shared/utils/index.d.ts +3 -3
- package/dist/shared-components.js +7 -6
- package/dist/shared.js +71 -70
- package/package.json +3 -2
|
@@ -7,7 +7,7 @@ import { LocalCommandCopy } from '../localUiCommandCopy';
|
|
|
7
7
|
* display parameter also translates it when late words arrive, or when history
|
|
8
8
|
* is reopened in another app language; saved strings are never rewritten.
|
|
9
9
|
*/
|
|
10
|
-
export type LanguageReplyStep =
|
|
10
|
+
export type LanguageReplyStep = 'write' | 'wait' | 'grace';
|
|
11
11
|
/** How long an idle, still-untranslated language is given before displaying English. */
|
|
12
12
|
export declare const LANGUAGE_REPLY_GRACE_MS = 400;
|
|
13
13
|
/** The longest the reply waits for the new language at all. */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export type NameMatch<T> = {
|
|
2
|
-
kind:
|
|
2
|
+
kind: 'one';
|
|
3
3
|
item: T;
|
|
4
4
|
} | {
|
|
5
|
-
kind:
|
|
5
|
+
kind: 'many';
|
|
6
6
|
items: T[];
|
|
7
7
|
} | {
|
|
8
|
-
kind:
|
|
8
|
+
kind: 'none';
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* Which of `items` a person means by `said`, judged on the product's own
|
|
@@ -24,7 +24,7 @@ export interface EnumFilterEntry {
|
|
|
24
24
|
apply: (value: string | null) => ControlResult;
|
|
25
25
|
}
|
|
26
26
|
export declare function enumFilter<V extends string>(spec: EnumFilterSpec<V>): EnumFilterEntry;
|
|
27
|
-
export declare function filtersOf(entries: readonly EnumFilterEntry[]): NonNullable<PageControlsAdapter[
|
|
27
|
+
export declare function filtersOf(entries: readonly EnumFilterEntry[]): NonNullable<PageControlsAdapter['filters']>;
|
|
28
28
|
export interface SortFieldSpec<V extends string> {
|
|
29
29
|
id: string;
|
|
30
30
|
label: string;
|
|
@@ -38,7 +38,7 @@ export interface SortSpec<V extends string> {
|
|
|
38
38
|
value: V;
|
|
39
39
|
set: (value: V) => void;
|
|
40
40
|
}
|
|
41
|
-
export declare function sortOf<V extends string>(spec: SortSpec<V>): NonNullable<PageControlsAdapter[
|
|
41
|
+
export declare function sortOf<V extends string>(spec: SortSpec<V>): NonNullable<PageControlsAdapter['sort']>;
|
|
42
42
|
export interface TabsSpec<T extends string> {
|
|
43
43
|
items: readonly {
|
|
44
44
|
id: T;
|
|
@@ -47,12 +47,12 @@ export interface TabsSpec<T extends string> {
|
|
|
47
47
|
value: T;
|
|
48
48
|
set: (id: T) => void;
|
|
49
49
|
}
|
|
50
|
-
export declare function tabsOf<T extends string>(spec: TabsSpec<T>): NonNullable<PageControlsAdapter[
|
|
51
|
-
export declare function searchOf(set: (query: string) => void): NonNullable<PageControlsAdapter[
|
|
50
|
+
export declare function tabsOf<T extends string>(spec: TabsSpec<T>): NonNullable<PageControlsAdapter['tabs']>;
|
|
51
|
+
export declare function searchOf(set: (query: string) => void): NonNullable<PageControlsAdapter['search']>;
|
|
52
52
|
/** One form or dialog the page can OPEN. `open` must only open it. */
|
|
53
53
|
export interface OpenerSpec {
|
|
54
54
|
id: string;
|
|
55
55
|
label: string;
|
|
56
56
|
open: () => void;
|
|
57
57
|
}
|
|
58
|
-
export declare function openersOf(specs: readonly OpenerSpec[]): NonNullable<PageControlsAdapter[
|
|
58
|
+
export declare function openersOf(specs: readonly OpenerSpec[]): NonNullable<PageControlsAdapter['openers']>;
|
|
@@ -7,124 +7,124 @@ import { ControlBlock, ControlKey, SortDirection } from './types';
|
|
|
7
7
|
*/
|
|
8
8
|
/** What the panel says, as data. `appControlCopy.ts` turns it into words. */
|
|
9
9
|
export type ControlReply = {
|
|
10
|
-
code:
|
|
10
|
+
code: 'opened';
|
|
11
11
|
what: OpenedWhat;
|
|
12
12
|
} | {
|
|
13
|
-
code:
|
|
13
|
+
code: 'closed';
|
|
14
14
|
what: ClosedWhat;
|
|
15
15
|
} | {
|
|
16
|
-
code:
|
|
16
|
+
code: 'search-opened';
|
|
17
17
|
query: string | null;
|
|
18
18
|
} | {
|
|
19
|
-
code:
|
|
19
|
+
code: 'sidebar';
|
|
20
20
|
collapsed: boolean;
|
|
21
21
|
already: boolean;
|
|
22
22
|
} | {
|
|
23
|
-
code:
|
|
23
|
+
code: 'sidebar-entry';
|
|
24
24
|
name: string;
|
|
25
25
|
expanded: boolean;
|
|
26
26
|
already: boolean;
|
|
27
27
|
} | {
|
|
28
|
-
code:
|
|
28
|
+
code: 'language';
|
|
29
29
|
label: string;
|
|
30
30
|
already: boolean;
|
|
31
31
|
} | {
|
|
32
|
-
code:
|
|
32
|
+
code: 'language-not-offered';
|
|
33
33
|
label: string;
|
|
34
34
|
} | {
|
|
35
|
-
code:
|
|
35
|
+
code: 'workspace-confirm';
|
|
36
36
|
name: string;
|
|
37
37
|
} | {
|
|
38
|
-
code:
|
|
38
|
+
code: 'workspace-switched';
|
|
39
39
|
name: string;
|
|
40
40
|
} | {
|
|
41
|
-
code:
|
|
41
|
+
code: 'workspace-already';
|
|
42
42
|
name: string;
|
|
43
43
|
} | {
|
|
44
|
-
code:
|
|
44
|
+
code: 'workspace-none';
|
|
45
45
|
} | {
|
|
46
|
-
code:
|
|
46
|
+
code: 'logout-confirm';
|
|
47
47
|
} | {
|
|
48
|
-
code:
|
|
48
|
+
code: 'logout-done';
|
|
49
49
|
} | {
|
|
50
|
-
code:
|
|
50
|
+
code: 'tab';
|
|
51
51
|
name: string;
|
|
52
52
|
already: boolean;
|
|
53
53
|
} | {
|
|
54
|
-
code:
|
|
54
|
+
code: 'filter-set';
|
|
55
55
|
filter: string;
|
|
56
56
|
option: string;
|
|
57
57
|
already: boolean;
|
|
58
58
|
} | {
|
|
59
|
-
code:
|
|
59
|
+
code: 'filter-cleared';
|
|
60
60
|
filter: string | null;
|
|
61
61
|
} | {
|
|
62
|
-
code:
|
|
62
|
+
code: 'sorted';
|
|
63
63
|
page: string;
|
|
64
64
|
field: string;
|
|
65
65
|
direction: SortDirection;
|
|
66
66
|
already: boolean;
|
|
67
67
|
} | {
|
|
68
|
-
code:
|
|
68
|
+
code: 'sort-needs-field';
|
|
69
69
|
} | {
|
|
70
|
-
code:
|
|
70
|
+
code: 'searched';
|
|
71
71
|
page: string;
|
|
72
72
|
query: string;
|
|
73
73
|
} | {
|
|
74
|
-
code:
|
|
74
|
+
code: 'search-cleared';
|
|
75
75
|
} | {
|
|
76
|
-
code:
|
|
76
|
+
code: 'form-opened';
|
|
77
77
|
name: string;
|
|
78
78
|
} | {
|
|
79
|
-
code:
|
|
79
|
+
code: 'not-found';
|
|
80
80
|
what: NotFoundKind;
|
|
81
81
|
page: string;
|
|
82
82
|
name: string;
|
|
83
83
|
options: string[];
|
|
84
84
|
filter?: string;
|
|
85
85
|
} | {
|
|
86
|
-
code:
|
|
86
|
+
code: 'ambiguous';
|
|
87
87
|
what: AmbiguousKind;
|
|
88
88
|
name: string;
|
|
89
89
|
options: string[];
|
|
90
90
|
} | {
|
|
91
|
-
code:
|
|
91
|
+
code: 'filter-choose';
|
|
92
92
|
filter: string;
|
|
93
93
|
options: string[];
|
|
94
94
|
} | {
|
|
95
|
-
code:
|
|
95
|
+
code: 'failed';
|
|
96
96
|
} | {
|
|
97
|
-
code:
|
|
97
|
+
code: 'blocked';
|
|
98
98
|
reason: ControlBlock;
|
|
99
99
|
};
|
|
100
|
-
export type OpenedWhat =
|
|
101
|
-
export type ClosedWhat =
|
|
102
|
-
export type NotFoundKind =
|
|
103
|
-
export type AmbiguousKind =
|
|
100
|
+
export type OpenedWhat = 'notifications' | 'help' | 'context' | 'history' | 'transcript' | 'preview' | 'conversation';
|
|
101
|
+
export type ClosedWhat = 'preview';
|
|
102
|
+
export type NotFoundKind = 'tab' | 'filter' | 'filter-option' | 'sort' | 'form' | 'workspace';
|
|
103
|
+
export type AmbiguousKind = 'tab' | 'filter' | 'menu' | 'workspace' | 'column' | 'form';
|
|
104
104
|
/** What is recorded on the exchange (`AssistantLocalAction`). */
|
|
105
|
-
export type ControlOutcome =
|
|
105
|
+
export type ControlOutcome = 'done' | 'already' | 'failed' | 'blocked' | 'not-found' | 'ambiguous' | 'confirm';
|
|
106
106
|
export interface ControlRun {
|
|
107
107
|
reply: ControlReply;
|
|
108
108
|
outcome: ControlOutcome;
|
|
109
109
|
}
|
|
110
110
|
/** What the stronger confirmation asks about. */
|
|
111
111
|
export type ConfirmPrompt = {
|
|
112
|
-
kind:
|
|
112
|
+
kind: 'logout';
|
|
113
113
|
} | {
|
|
114
|
-
kind:
|
|
114
|
+
kind: 'workspace';
|
|
115
115
|
name: string;
|
|
116
116
|
};
|
|
117
117
|
export type ControlPlan =
|
|
118
118
|
/** Nothing to run: say it. */
|
|
119
119
|
{
|
|
120
|
-
kind:
|
|
121
|
-
control: ControlKey |
|
|
120
|
+
kind: 'reply';
|
|
121
|
+
control: ControlKey | 'page';
|
|
122
122
|
run: ControlRun;
|
|
123
123
|
}
|
|
124
124
|
/** Run it now and say what happened. `silent`: record nothing (a new conversation). */
|
|
125
125
|
| {
|
|
126
|
-
kind:
|
|
127
|
-
control: ControlKey |
|
|
126
|
+
kind: 'run';
|
|
127
|
+
control: ControlKey | 'page';
|
|
128
128
|
run: () => ControlRun;
|
|
129
129
|
silent?: boolean;
|
|
130
130
|
}
|
|
@@ -133,7 +133,7 @@ export type ControlPlan =
|
|
|
133
133
|
* trusted press on the dialog's button — never from anything typed or said.
|
|
134
134
|
*/
|
|
135
135
|
| {
|
|
136
|
-
kind:
|
|
136
|
+
kind: 'confirm';
|
|
137
137
|
control: ControlKey;
|
|
138
138
|
ask: ControlRun;
|
|
139
139
|
prompt: ConfirmPrompt;
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
* called), not that everything it triggers has finished. The copy says so
|
|
31
31
|
* ("Switching to …", never "Switched to …") where the app's handler is async.
|
|
32
32
|
*/
|
|
33
|
-
export type ControlStatus =
|
|
33
|
+
export type ControlStatus = 'done' | 'already' | 'failed';
|
|
34
34
|
export interface ControlResult {
|
|
35
35
|
status: ControlStatus;
|
|
36
36
|
}
|
|
37
37
|
/** Why a registered control cannot run for this person, right now. */
|
|
38
38
|
export type ControlBlock =
|
|
39
39
|
/** RBAC or a feature gate: the person is not allowed to use it here. */
|
|
40
|
-
|
|
40
|
+
'permission'
|
|
41
41
|
/** Needs the live voice screen out of the way first (History, Preview, new conversation). */
|
|
42
|
-
|
|
|
42
|
+
| 'voice-session';
|
|
43
43
|
export interface ControlBase {
|
|
44
44
|
/**
|
|
45
45
|
* Null: it can run. Otherwise why not. Read at match time AND at run time —
|
|
@@ -111,7 +111,7 @@ export interface PageFilter {
|
|
|
111
111
|
/** The option now applied, or null for none. */
|
|
112
112
|
current?: () => string | null;
|
|
113
113
|
}
|
|
114
|
-
export type SortDirection =
|
|
114
|
+
export type SortDirection = 'asc' | 'desc';
|
|
115
115
|
export interface PageControlsAdapter extends ControlBase {
|
|
116
116
|
/**
|
|
117
117
|
* Which page this is, in the product's words ("Crops"). Said back to the
|
|
@@ -180,22 +180,22 @@ export interface PreviewControl extends OpenControl {
|
|
|
180
180
|
* assistant panel, which the live voice screen covers. "page": drawn on the
|
|
181
181
|
* product's own page beside the assistant, so Voice may open it.
|
|
182
182
|
*/
|
|
183
|
-
surface?:
|
|
183
|
+
surface?: 'panel' | 'page';
|
|
184
184
|
}
|
|
185
185
|
/** Every control key, and the handler shape it takes. */
|
|
186
186
|
export interface ControlMap {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
187
|
+
'header.notifications': OpenControl;
|
|
188
|
+
'header.search': SearchControl;
|
|
189
|
+
'header.help': OpenControl;
|
|
190
|
+
'header.context': OpenControl;
|
|
191
|
+
'header.workspace': WorkspaceControl;
|
|
192
|
+
'account.logout': LogoutControl;
|
|
193
193
|
sidebar: SidebarControl;
|
|
194
194
|
language: LanguageControl;
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
'assistant.history': OpenControl;
|
|
196
|
+
'assistant.transcript': OpenControl;
|
|
197
|
+
'assistant.preview': PreviewControl;
|
|
198
|
+
'assistant.conversation.new': OpenControl;
|
|
199
199
|
page: PageControlsAdapter;
|
|
200
200
|
}
|
|
201
201
|
export type ControlKey = keyof ControlMap;
|
|
@@ -20,4 +20,4 @@ export declare function useAssistantControl<K extends ControlKey>(key: K, impl:
|
|
|
20
20
|
* its handlers call the page's own setters. The vocabulary has no submit, save,
|
|
21
21
|
* create or delete — see `types.ts`.
|
|
22
22
|
*/
|
|
23
|
-
export declare function useAssistantPageControls(adapter: ControlMap[
|
|
23
|
+
export declare function useAssistantPageControls(adapter: ControlMap['page'] | null): void;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* through Documents or Files here; anything else is a file it would have to
|
|
20
20
|
* refuse after the user had already chosen it.
|
|
21
21
|
*/
|
|
22
|
-
export type AttachmentSourceId =
|
|
22
|
+
export type AttachmentSourceId = 'camera' | 'gallery' | 'documents' | 'files';
|
|
23
23
|
export interface AttachmentSource {
|
|
24
24
|
id: AttachmentSourceId;
|
|
25
25
|
/** i18n key and the English fallback, resolved by the caller. */
|
|
@@ -33,7 +33,7 @@ export interface AttachmentSource {
|
|
|
33
33
|
* ignored on desktop, which falls back to the file picker rather than
|
|
34
34
|
* breaking.
|
|
35
35
|
*/
|
|
36
|
-
capture?:
|
|
36
|
+
capture?: 'environment' | 'user';
|
|
37
37
|
/** Multi-select. A camera capture is one shot at a time. */
|
|
38
38
|
multiple: boolean;
|
|
39
39
|
/**
|
|
@@ -61,14 +61,14 @@ export interface AssistantInlineLimitsConfig {
|
|
|
61
61
|
readonly maxInlineCharsPerFile?: number;
|
|
62
62
|
readonly maxInlineCharsTotal?: number;
|
|
63
63
|
}
|
|
64
|
-
export type AssistantAttachmentKind =
|
|
65
|
-
export type AssistantAttachmentStatus =
|
|
66
|
-
export type AttachmentRejection =
|
|
64
|
+
export type AssistantAttachmentKind = 'image' | 'text' | 'document';
|
|
65
|
+
export type AssistantAttachmentStatus = 'pending' | 'uploading' | 'ready' | 'error';
|
|
66
|
+
export type AttachmentRejection = 'too-many' | 'too-large' | 'empty' | 'unreadable' | 'unsupported-image'
|
|
67
67
|
/**
|
|
68
68
|
* Over the 5 MiB the browser can upload directly, and with no text to send inline instead: it
|
|
69
69
|
* could be neither saved to Files nor read, so it is refused at attach rather than failing at Send.
|
|
70
70
|
*/
|
|
71
|
-
|
|
|
71
|
+
| 'too-large-to-save';
|
|
72
72
|
/**
|
|
73
73
|
* Thrown while PREPARING a file (after it passed `validateFile`) to reject it
|
|
74
74
|
* with a specific reason rather than the generic 'unreadable'.
|
|
@@ -234,7 +234,7 @@ export declare function hasAttachmentWorkInFlight(preparingCount: number, attach
|
|
|
234
234
|
*/
|
|
235
235
|
export declare function getSendableAttachments(attachments: AssistantAttachment[]): AssistantAttachment[];
|
|
236
236
|
/** Why a draft cannot be sent yet, as far as its attachments are concerned. */
|
|
237
|
-
export type AttachmentSendBlocker =
|
|
237
|
+
export type AttachmentSendBlocker = 'in-flight' | 'failed';
|
|
238
238
|
/**
|
|
239
239
|
* Whether the attachments block sending, and why — `null` when they do not.
|
|
240
240
|
*
|
|
@@ -11,13 +11,13 @@ export declare const AUTO_READ_MODE = "assistant";
|
|
|
11
11
|
*/
|
|
12
12
|
export declare const AUTO_WRITE_MODE = "api-calls";
|
|
13
13
|
/** What a message asks for: a change to be made, or anything else. */
|
|
14
|
-
export type AssistantIntent =
|
|
14
|
+
export type AssistantIntent = 'act' | 'read';
|
|
15
15
|
/**
|
|
16
16
|
* Auto is offered only where there is something to route between: the product
|
|
17
17
|
* offers BOTH the read mode and the write mode to this person. `modes` must be
|
|
18
18
|
* the role-filtered list the selector shows, not the product's full list.
|
|
19
19
|
*/
|
|
20
|
-
export declare function isAutoRoutingOffered(modes: readonly Pick<AssistantModeConfig,
|
|
20
|
+
export declare function isAutoRoutingOffered(modes: readonly Pick<AssistantModeConfig, 'id'>[]): boolean;
|
|
21
21
|
/**
|
|
22
22
|
* Does this message ask for a change to be made?
|
|
23
23
|
*
|
|
@@ -62,16 +62,16 @@ export interface AutoRouteConversation {
|
|
|
62
62
|
* place, with a fresh backend session.
|
|
63
63
|
*/
|
|
64
64
|
export type AutoRoute = {
|
|
65
|
-
action:
|
|
65
|
+
action: 'new';
|
|
66
66
|
mode: AssistantMode;
|
|
67
67
|
} | {
|
|
68
|
-
action:
|
|
68
|
+
action: 'adopt';
|
|
69
69
|
mode: AssistantMode;
|
|
70
70
|
} | {
|
|
71
|
-
action:
|
|
71
|
+
action: 'continue';
|
|
72
72
|
mode: AssistantMode;
|
|
73
73
|
} | {
|
|
74
|
-
action:
|
|
74
|
+
action: 'escalate';
|
|
75
75
|
mode: AssistantMode;
|
|
76
76
|
};
|
|
77
77
|
export interface AutoRouteInput {
|
|
@@ -115,7 +115,11 @@ var f = "inline-flex h-8 items-center gap-1.5 rounded-full border border-border-
|
|
|
115
115
|
}), /* @__PURE__ */ u("button", {
|
|
116
116
|
type: "button",
|
|
117
117
|
onClick: () => {
|
|
118
|
-
|
|
118
|
+
if (M) {
|
|
119
|
+
h.recheckRetry();
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
w.current?.focus(), h.confirm();
|
|
119
123
|
},
|
|
120
124
|
"aria-describedby": M ? `${b} ${x}` : b,
|
|
121
125
|
"aria-disabled": M,
|
|
@@ -29,31 +29,34 @@ var y = "text-xs font-medium text-text-secondary", b = "text-xs text-text-muted"
|
|
|
29
29
|
}, [r]);
|
|
30
30
|
let { phase: I } = P, L = I === "starting" || I === "connecting" || I === "ready" || I === "ending", [R, z] = c(!1);
|
|
31
31
|
R && (I === "off" || I === "choosing" || I === "ready" || I === "ending") && z(!1);
|
|
32
|
-
let B = E(),
|
|
32
|
+
let B = E(), V = P.retryAt !== null && P.retryAt > B, H = ne(P, D, B), U = P.selectedAvatarId, W = (e) => {
|
|
33
33
|
let t = P.avatars.indexOf(e);
|
|
34
34
|
return de?.[e] ?? (t === -1 ? D.chooserNone : `${D.chooserLabel} ${t + 1}`);
|
|
35
|
-
},
|
|
35
|
+
}, G = I === "ready" ? { kind: "turn-off" } : I === "ending" ? { kind: "ending" } : R || I === "starting" || I === "connecting" ? { kind: "starting" } : P.offered ? {
|
|
36
36
|
kind: "turn-on",
|
|
37
|
-
ready: !
|
|
38
|
-
} : null,
|
|
37
|
+
ready: !V && U !== null && (I === "choosing" || I === "off" && P.avatars.includes(U))
|
|
38
|
+
} : null, K = s(null), ge = G?.kind === "turn-off";
|
|
39
39
|
ie(() => {
|
|
40
|
-
|
|
41
|
-
}, [
|
|
40
|
+
K.current = ge ? E() : null;
|
|
41
|
+
}, [ge, E]);
|
|
42
42
|
let _e = i((e) => {
|
|
43
43
|
if (e !== null) return () => {
|
|
44
44
|
e.ownerDocument.activeElement === e && N.current?.focus();
|
|
45
45
|
};
|
|
46
46
|
}, []), ve = () => {
|
|
47
|
-
if (
|
|
47
|
+
if (G !== null) switch (G.kind) {
|
|
48
48
|
case "turn-on":
|
|
49
|
-
if (!
|
|
49
|
+
if (!G.ready || U === null) {
|
|
50
|
+
V && r.recheckRetry();
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
50
53
|
z(!0), I === "choosing" ? r.confirm() : r.requestOn({
|
|
51
54
|
start: !0,
|
|
52
|
-
avatarId:
|
|
55
|
+
avatarId: U
|
|
53
56
|
});
|
|
54
57
|
return;
|
|
55
58
|
case "turn-off": {
|
|
56
|
-
let e =
|
|
59
|
+
let e = K.current;
|
|
57
60
|
if (e !== null && E() - e < 1e3) return;
|
|
58
61
|
r.switchOff();
|
|
59
62
|
return;
|
|
@@ -61,7 +64,7 @@ var y = "text-xs font-medium text-text-secondary", b = "text-xs text-text-muted"
|
|
|
61
64
|
case "starting":
|
|
62
65
|
case "ending": return;
|
|
63
66
|
}
|
|
64
|
-
}, ye = te(F, me), q =
|
|
67
|
+
}, ye = te(F, me), q = U === null ? null : pe.get(U) ?? null, J = ye === "speaker" && F.avatarSpeaker !== null ? `${h}${F.avatarSpeaker}` : ye === "paired" && q !== null ? m : p, be = J === m ? q : J.startsWith(h) ? F.avatarSpeaker : null, Y = J === p ? O.activeVoiceName : be === null ? null : v(be, O.voiceChoices)?.name ?? null, xe = O.speakingMessageId !== null || O.spokenChunks !== null, Se = Y !== null && !C.live && !xe, Ce = O.activeVoiceName ? D.voiceModeMineNamed(_(O.activeVoiceName)) : D.voiceModeMine, we = (e) => {
|
|
65
68
|
if (e === p || e === m) {
|
|
66
69
|
T.setVoiceMode(e);
|
|
67
70
|
return;
|
|
@@ -73,7 +76,7 @@ var y = "text-xs font-medium text-text-secondary", b = "text-xs text-text-muted"
|
|
|
73
76
|
}, []), ke = (e) => {
|
|
74
77
|
let t = fe?.get(e);
|
|
75
78
|
return t === void 0 || Ee.has(t) ? null : t;
|
|
76
|
-
}, X = !L &&
|
|
79
|
+
}, X = !L && U !== null ? ke(U) : null, Z = L ? null : w === void 0 ? C.impossible ? D.askNeedsVoice : null : w === "by-typing" ? D.askByTyping : w === "needs-voice" ? D.askNeedsVoice : w === "nothing" ? D.askNothing : null, Ae = I === "off" && P.avatars.length === 0 && P.offered, [Q, je] = c(!1), $ = Ae && (Q || P.problem !== null);
|
|
77
80
|
return $ !== Q && je($), /* @__PURE__ */ f("div", {
|
|
78
81
|
ref: N,
|
|
79
82
|
tabIndex: -1,
|
|
@@ -96,9 +99,9 @@ var y = "text-xs font-medium text-text-secondary", b = "text-xs text-text-muted"
|
|
|
96
99
|
playsInline: !0,
|
|
97
100
|
"data-testid": "assistant-avatar-tab-video"
|
|
98
101
|
}) : null,
|
|
99
|
-
X !== null &&
|
|
102
|
+
X !== null && U !== null ? /* @__PURE__ */ d(re, {
|
|
100
103
|
size: "frame",
|
|
101
|
-
name: U
|
|
104
|
+
name: W(U),
|
|
102
105
|
src: X,
|
|
103
106
|
onError: Oe
|
|
104
107
|
}) : null,
|
|
@@ -121,10 +124,10 @@ var y = "text-xs font-medium text-text-secondary", b = "text-xs text-text-muted"
|
|
|
121
124
|
})
|
|
122
125
|
}),
|
|
123
126
|
/* @__PURE__ */ d("p", {
|
|
124
|
-
className:
|
|
127
|
+
className: H === null ? "sr-only" : "text-center text-sm text-text-secondary",
|
|
125
128
|
role: "status",
|
|
126
129
|
"data-testid": "assistant-avatar-tab-status",
|
|
127
|
-
children:
|
|
130
|
+
children: H ?? ""
|
|
128
131
|
}),
|
|
129
132
|
P.avatars.length > 1 && !L ? /* @__PURE__ */ f("fieldset", {
|
|
130
133
|
className: "flex min-w-0 flex-col gap-1.5",
|
|
@@ -135,7 +138,7 @@ var y = "text-xs font-medium text-text-secondary", b = "text-xs text-text-muted"
|
|
|
135
138
|
}), /* @__PURE__ */ d("div", {
|
|
136
139
|
className: "flex flex-wrap gap-2",
|
|
137
140
|
children: P.avatars.map((e) => {
|
|
138
|
-
let t = e ===
|
|
141
|
+
let t = e === U, n = W(e);
|
|
139
142
|
return /* @__PURE__ */ f("label", {
|
|
140
143
|
className: `${oe} ${t ? "border-transparent bg-action-primary-bg text-action-primary-text" : "border-border-default bg-bg-elevated text-text-secondary hover:bg-bg-raised hover:text-text-primary"}`,
|
|
141
144
|
title: t ? D.chooserSelected(n) : D.chooserOption(n),
|
|
@@ -164,7 +167,7 @@ var y = "text-xs font-medium text-text-secondary", b = "text-xs text-text-muted"
|
|
|
164
167
|
}, e);
|
|
165
168
|
})
|
|
166
169
|
})]
|
|
167
|
-
}) : P.avatars.length > 0 &&
|
|
170
|
+
}) : P.avatars.length > 0 && U !== null ? /* @__PURE__ */ f("div", {
|
|
168
171
|
className: "flex flex-col gap-0.5",
|
|
169
172
|
"data-testid": "assistant-avatar-tab-chosen",
|
|
170
173
|
children: [/* @__PURE__ */ f("p", {
|
|
@@ -174,7 +177,7 @@ var y = "text-xs font-medium text-text-secondary", b = "text-xs text-text-muted"
|
|
|
174
177
|
children: D.chooserLabel
|
|
175
178
|
}), /* @__PURE__ */ d("span", {
|
|
176
179
|
className: "truncate text-text-primary",
|
|
177
|
-
children: U
|
|
180
|
+
children: W(U)
|
|
178
181
|
})]
|
|
179
182
|
}), L && P.avatars.length > 1 ? /* @__PURE__ */ d("p", {
|
|
180
183
|
className: b,
|
|
@@ -245,16 +248,16 @@ var y = "text-xs font-medium text-text-secondary", b = "text-xs text-text-muted"
|
|
|
245
248
|
"data-testid": "assistant-avatar-tab-disclosure",
|
|
246
249
|
children: D.consent
|
|
247
250
|
}),
|
|
248
|
-
|
|
251
|
+
G === null ? null : /* @__PURE__ */ d("button", {
|
|
249
252
|
ref: _e,
|
|
250
253
|
type: "button",
|
|
251
254
|
onClick: ve,
|
|
252
|
-
"aria-disabled":
|
|
253
|
-
"aria-describedby":
|
|
254
|
-
className:
|
|
255
|
+
"aria-disabled": G.kind === "turn-on" ? !G.ready : G.kind !== "turn-off",
|
|
256
|
+
"aria-describedby": G.kind === "turn-on" ? k : void 0,
|
|
257
|
+
className: G.kind === "turn-off" ? S : ae,
|
|
255
258
|
"data-testid": "assistant-avatar-tab-switch",
|
|
256
|
-
"data-slot":
|
|
257
|
-
children:
|
|
259
|
+
"data-slot": G.kind,
|
|
260
|
+
children: G.kind === "turn-off" ? D.stop : G.kind === "starting" ? D.turnOnStarting : G.kind === "ending" ? D.stateEnding : D.consentConfirm
|
|
258
261
|
}),
|
|
259
262
|
$ ? /* @__PURE__ */ d("button", {
|
|
260
263
|
type: "button",
|
|
@@ -45,7 +45,7 @@ export interface LiveAvatarSeamOptions {
|
|
|
45
45
|
readonly avatarVoiceStore?: LiveAvatarVoiceStore;
|
|
46
46
|
readonly scheduler?: AvatarScheduler;
|
|
47
47
|
readonly browserSupported?: () => boolean;
|
|
48
|
-
readonly controller?: Partial<Pick<LiveAvatarControllerDeps, 'createAudioElement' | 'releaseAudioElement' | 'startMeter' | 'decode' | 'now' | 'newIdempotencyKey' | 'subscribeWorkspaceChange' | 'subscribePageHide' | 'idleMs' | 'endBeforeDeadlineMs' | 'connectTimeoutMs' | 'trackerConfig' | 'maxDrainMs' | 'stallMs' | 'readinessProbe'>>;
|
|
48
|
+
readonly controller?: Partial<Pick<LiveAvatarControllerDeps, 'createAudioElement' | 'releaseAudioElement' | 'startMeter' | 'decode' | 'now' | 'newIdempotencyKey' | 'subscribeWorkspaceChange' | 'subscribePageHide' | 'subscribePageShow' | 'idleMs' | 'endBeforeDeadlineMs' | 'connectTimeoutMs' | 'trackerConfig' | 'maxDrainMs' | 'stallMs' | 'readinessProbe'>>;
|
|
49
49
|
}
|
|
50
50
|
/** The seam, plus what a host or a test may need of it. */
|
|
51
51
|
export interface LiveAvatarSeamHandle extends AssistantLiveAvatarSeam {
|