@burdenoff/fe-libs 2026.1029.9 → 2026.1029.11
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/i18nManifest.d.ts +4 -0
- package/dist/shared/assistant/i18nManifest.js +4 -0
- package/dist/shared/assistant/index.d.ts +2 -0
- package/dist/shared/assistant/speech/speechFeed.d.ts +4 -3
- package/dist/shared/assistant/speech/speechFeed.js +3 -2
- package/dist/shared/assistant/ui/AIAssistantPanel.d.ts +18 -0
- package/dist/shared/assistant/ui/AIAssistantPanel.js +158 -141
- package/dist/shared/assistant/ui/AssistantChatArea.js +10 -10
- package/dist/shared/assistant/ui/AssistantOverlay.d.ts +77 -3
- package/dist/shared/assistant/ui/AssistantOverlay.js +314 -113
- package/dist/shared/assistant/ui/AssistantSpeechProvider.js +140 -137
- package/dist/shared/assistant/ui/assistantOverlayState.d.ts +210 -0
- package/dist/shared/assistant/ui/assistantOverlayState.js +99 -29
- package/dist/shared/assistant/ui/compact/AssistantWindowHeader.d.ts +19 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowHeader.js +54 -0
- package/dist/shared/assistant/ui/composer/AssistantAttachmentButton.d.ts +8 -0
- package/dist/shared/assistant/ui/composer/AssistantAttachmentButton.js +34 -34
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +2 -1
- package/dist/shared/assistant/ui/useAssistantVisualViewport.d.ts +3 -0
- package/dist/shared/assistant/ui/useAssistantVisualViewport.js +24 -0
- package/dist/shared/assistant/ui/useVoiceSession.js +13 -8
- package/dist/shared-assistant.js +158 -156
- package/package.json +1 -1
|
@@ -548,6 +548,7 @@ export declare const ASSISTANT_I18N_LITERAL_COPY: {
|
|
|
548
548
|
readonly 'offer.notAvailable': "{{page}} isn't in your menu right now.";
|
|
549
549
|
readonly 'offer.open': "Open {{page}}";
|
|
550
550
|
readonly 'overlay.launcher': "AI Assistant";
|
|
551
|
+
readonly 'overlay.launcherQuick': "Open quick assistant";
|
|
551
552
|
readonly 'overlay.launcherTitle': "AI Assistant ({{shortcut}})";
|
|
552
553
|
readonly 'panel.ariaLabel': "AI Assistant";
|
|
553
554
|
readonly 'pendingWrite.approve': "Approve this change";
|
|
@@ -661,6 +662,9 @@ export declare const ASSISTANT_I18N_LITERAL_COPY: {
|
|
|
661
662
|
readonly 'waitingChange.review': "Review";
|
|
662
663
|
readonly 'waitingChange.reviewLabel': "Review the change waiting for your approval";
|
|
663
664
|
readonly 'waitingChange.status': "{{count}} change(s) waiting for your approval";
|
|
665
|
+
readonly 'window.minimize': "Minimize";
|
|
666
|
+
readonly 'window.openFull': "Open full assistant";
|
|
667
|
+
readonly 'window.title': "Quick assistant";
|
|
664
668
|
readonly 'writeConsent.body': "In {{mode}} mode the assistant can read AND change your data — creating records, logging activity, updating details, and more, on your behalf.";
|
|
665
669
|
readonly 'writeConsent.cancel': "Stay in {{mode}}";
|
|
666
670
|
readonly 'writeConsent.confirm': "Enable {{mode}}";
|
|
@@ -441,6 +441,7 @@ var g = {
|
|
|
441
441
|
"offer.notAvailable": "{{page}} isn't in your menu right now.",
|
|
442
442
|
"offer.open": "Open {{page}}",
|
|
443
443
|
"overlay.launcher": "AI Assistant",
|
|
444
|
+
"overlay.launcherQuick": "Open quick assistant",
|
|
444
445
|
"overlay.launcherTitle": "AI Assistant ({{shortcut}})",
|
|
445
446
|
"panel.ariaLabel": "AI Assistant",
|
|
446
447
|
"pendingWrite.approve": "Approve this change",
|
|
@@ -554,6 +555,9 @@ var g = {
|
|
|
554
555
|
"waitingChange.review": "Review",
|
|
555
556
|
"waitingChange.reviewLabel": "Review the change waiting for your approval",
|
|
556
557
|
"waitingChange.status": "{{count}} change(s) waiting for your approval",
|
|
558
|
+
"window.minimize": "Minimize",
|
|
559
|
+
"window.openFull": "Open full assistant",
|
|
560
|
+
"window.title": "Quick assistant",
|
|
557
561
|
"writeConsent.body": "In {{mode}} mode the assistant can read AND change your data — creating records, logging activity, updating details, and more, on your behalf.",
|
|
558
562
|
"writeConsent.cancel": "Stay in {{mode}}",
|
|
559
563
|
"writeConsent.confirm": "Enable {{mode}}",
|
|
@@ -380,4 +380,6 @@ export * from './ui/compact/AssistantDiscardDraftDialog';
|
|
|
380
380
|
export * from './ui/compact/AssistantMenuView';
|
|
381
381
|
export * from './ui/compact/AssistantVoiceLanguageSettings';
|
|
382
382
|
export * from './ui/compact/AssistantWaitingChangeRow';
|
|
383
|
+
export * from './ui/compact/AssistantWindowHeader';
|
|
384
|
+
export * from './ui/useAssistantVisualViewport';
|
|
383
385
|
export * from './ui/compact/waitingChange';
|
|
@@ -52,19 +52,20 @@ export type SpeechFeedEvent = {
|
|
|
52
52
|
} | {
|
|
53
53
|
type: 'audio';
|
|
54
54
|
messageId: string;
|
|
55
|
-
state: 'queued' | 'started' | 'paused' | 'ended';
|
|
55
|
+
state: 'queued' | 'started' | 'paused' | 'ended' | 'retrying';
|
|
56
56
|
} | {
|
|
57
57
|
type: 'abort';
|
|
58
58
|
messageId: string;
|
|
59
|
+
retrying?: true;
|
|
59
60
|
};
|
|
60
61
|
type Listener = (event: SpeechFeedEvent) => void;
|
|
61
62
|
export declare const speechFeed: {
|
|
62
63
|
publish(messageId: string, item: SpeechFeedItem): void;
|
|
63
64
|
append(messageId: string, item: SpeechFeedItem, phrases: readonly string[]): void;
|
|
64
65
|
retract(messageId: string): void;
|
|
65
|
-
audio(messageId: string, state: "queued" | "started" | "paused" | "ended"): void;
|
|
66
|
+
audio(messageId: string, state: "queued" | "started" | "paused" | "ended" | "retrying"): void;
|
|
66
67
|
/** Forget a published message and tell the subscriber to stop speaking it. */
|
|
67
|
-
abort(messageId: string): void;
|
|
68
|
+
abort(messageId: string, retrying?: boolean): void;
|
|
68
69
|
subscribe(listener: Listener): () => void;
|
|
69
70
|
/**
|
|
70
71
|
* The item published for `messageId`, if it is still live (not aborted). The
|
|
@@ -5,6 +5,7 @@ import { AssistantNavigate } from './AssistantMarkdownRenderer';
|
|
|
5
5
|
import { AssistantLiveAvatarSeam } from './assistantLiveAvatarSeam';
|
|
6
6
|
import { AssistantPreviewController } from '../preview/types';
|
|
7
7
|
import { AssistantPresentation } from './composer/AssistantComposer';
|
|
8
|
+
import { AssistantSurface } from './assistantOverlayState';
|
|
8
9
|
export type AIAssistantPanelProps = PanelProps & {
|
|
9
10
|
/** When provided, renders a dock/float toggle in the header. */
|
|
10
11
|
docked?: boolean;
|
|
@@ -124,6 +125,23 @@ export type AIAssistantPanelProps = PanelProps & {
|
|
|
124
125
|
* without a host that honours it the control would do nothing.
|
|
125
126
|
*/
|
|
126
127
|
onExpandedChange?: (expanded: boolean) => void;
|
|
128
|
+
/**
|
|
129
|
+
* BOFF-10178 (compact only): which surface the overlay is showing this ONE
|
|
130
|
+
* panel in. `window` is the Quick assistant: a slim header (Open full
|
|
131
|
+
* assistant, Minimize) in place of the full header, no ☰ view, no Expand, no
|
|
132
|
+
* Avatar tab. `panel` or absent is the full assistant. The chat area and the
|
|
133
|
+
* composer are the same instance either way, so a draft, its attachments and
|
|
134
|
+
* a turn in flight survive the switch.
|
|
135
|
+
*/
|
|
136
|
+
surface?: AssistantSurface;
|
|
137
|
+
/** Compact window: switch to the full assistant. Same instance, nothing re-sent. */
|
|
138
|
+
onOpenFull?: () => void;
|
|
139
|
+
/**
|
|
140
|
+
* Compact window: hide the window and keep it mounted (the overlay then passes
|
|
141
|
+
* `visible={false}`). The window has no Close (CW-M), so this is also what
|
|
142
|
+
* Escape does there: it never asks to discard a draft the hidden window keeps.
|
|
143
|
+
*/
|
|
144
|
+
onMinimize?: () => void;
|
|
127
145
|
};
|
|
128
146
|
/**
|
|
129
147
|
* The panel.
|
|
@@ -29,239 +29,256 @@ import { AssistantCompactHeader as Pe } from "./compact/AssistantCompactHeader.j
|
|
|
29
29
|
import { AssistantConversationMenu as Fe } from "./compact/AssistantConversationMenu.js";
|
|
30
30
|
import { AssistantDiscardDraftDialog as Ie } from "./compact/AssistantDiscardDraftDialog.js";
|
|
31
31
|
import { AssistantMenuView as Le } from "./compact/AssistantMenuView.js";
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
32
|
+
import { AssistantWindowHeader as Re } from "./compact/AssistantWindowHeader.js";
|
|
33
|
+
import { useCallback as n, useEffect as r, useId as ze, useMemo as i, useRef as a, useState as o } from "react";
|
|
34
|
+
import { Fragment as Be, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
34
35
|
//#region src/shared/assistant/ui/AIAssistantPanel.tsx
|
|
35
|
-
var l = ({ onClose: l, visible: u, docked: d, onToggleDock: f, writeAccess:
|
|
36
|
-
let
|
|
37
|
-
Te(
|
|
38
|
-
let [
|
|
39
|
-
|
|
40
|
-
let
|
|
36
|
+
var Ve = { backgroundColor: "var(--color-bg-elevated)" }, l = ({ onClose: l, visible: u, docked: d, onToggleDock: f, writeAccess: He, onNavigate: Ue, isShellLessTarget: We, connectSourceHref: Ge, onConnectSource: Ke, preview: p, liveAvatar: m, presentation: h, onExpandedChange: g, surface: _, onOpenFull: v, onMinimize: y, serverHistory: qe = !1 }) => {
|
|
37
|
+
let b = te(), Je = de(m);
|
|
38
|
+
Te(qe);
|
|
39
|
+
let [Ye, x] = o(!1), S = ge(p);
|
|
40
|
+
Ye && !S && x(!1);
|
|
41
|
+
let C = Ye && S;
|
|
41
42
|
me(_e(p, ve()));
|
|
42
|
-
let
|
|
43
|
-
e(
|
|
44
|
-
let { conversations:
|
|
45
|
-
|
|
46
|
-
let
|
|
43
|
+
let w = a(null);
|
|
44
|
+
e(w);
|
|
45
|
+
let { conversations: Xe, activeConversationId: Ze, conversationListOpen: T, setConversationListOpen: E, createConversation: D } = ne(), O = h === "compact", k = O && _ === "window", [Qe, A] = o(!1), j = a(!1);
|
|
46
|
+
Qe && (!O || k || T || C) && A(!1);
|
|
47
|
+
let M = O && Qe, [$e, et] = o(!1), N = je(O && !k && g !== void 0), [P, tt] = o(!1), F = N && P;
|
|
47
48
|
r(() => {
|
|
48
|
-
|
|
49
|
+
P && !N && (tt(!1), g?.(!1));
|
|
49
50
|
}, [
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
P,
|
|
52
|
+
N,
|
|
52
53
|
g
|
|
53
54
|
]);
|
|
54
|
-
let
|
|
55
|
-
let e = !
|
|
56
|
-
|
|
57
|
-
},
|
|
55
|
+
let nt = () => {
|
|
56
|
+
let e = !F;
|
|
57
|
+
tt(e), g?.(e);
|
|
58
|
+
}, rt = a(!1), it = a(g);
|
|
58
59
|
r(() => {
|
|
59
|
-
|
|
60
|
+
rt.current = F, it.current = g;
|
|
60
61
|
}), r(() => () => {
|
|
61
|
-
|
|
62
|
+
rt.current && it.current?.(!1);
|
|
62
63
|
}, []);
|
|
63
|
-
let
|
|
64
|
-
|
|
65
|
-
let
|
|
66
|
-
chatTab: `${
|
|
67
|
-
avatarTab: `${
|
|
68
|
-
chatPanel: `${
|
|
69
|
-
avatarPanel: `${
|
|
70
|
-
leaveHint: `${
|
|
71
|
-
} : null, [
|
|
72
|
-
|
|
73
|
-
}, []),
|
|
74
|
-
open:
|
|
75
|
-
close:
|
|
76
|
-
ids:
|
|
77
|
-
covered:
|
|
78
|
-
setReplyEscape:
|
|
64
|
+
let I = T || C || M, L = m?.tab, at = fe(L), [R, z] = o(!1);
|
|
65
|
+
R && (!L || u === !1 || k) && z(!1);
|
|
66
|
+
let B = L !== void 0 && (at || R), V = ze(), ot = ze(), H = i(() => B ? {
|
|
67
|
+
chatTab: `${V}-chat-tab`,
|
|
68
|
+
avatarTab: `${V}-avatar-tab`,
|
|
69
|
+
chatPanel: `${V}-chat-panel`,
|
|
70
|
+
avatarPanel: `${V}-avatar-panel`,
|
|
71
|
+
leaveHint: `${V}-avatar-leave`
|
|
72
|
+
} : null, [B, V]), st = n(() => z(!1), []), U = a(null), ct = n((e) => {
|
|
73
|
+
U.current = e;
|
|
74
|
+
}, []), lt = i(() => ({
|
|
75
|
+
open: R,
|
|
76
|
+
close: st,
|
|
77
|
+
ids: H,
|
|
78
|
+
covered: I,
|
|
79
|
+
setReplyEscape: ct
|
|
79
80
|
}), [
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
]),
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
historyOpen:
|
|
89
|
-
previewOpen:
|
|
90
|
-
avatarOpen:
|
|
91
|
-
}) ?? (
|
|
81
|
+
R,
|
|
82
|
+
st,
|
|
83
|
+
H,
|
|
84
|
+
I,
|
|
85
|
+
ct
|
|
86
|
+
]), ut = (e) => z(e === "avatar"), dt = () => {
|
|
87
|
+
A(!1), ut("avatar"), j.current = !0;
|
|
88
|
+
}, ft = oe({
|
|
89
|
+
historyOpen: T,
|
|
90
|
+
previewOpen: C,
|
|
91
|
+
avatarOpen: R
|
|
92
|
+
}) ?? (M ? "menu" : null), W = (e) => {
|
|
92
93
|
let t = ce({
|
|
93
|
-
historyOpen:
|
|
94
|
-
previewOpen:
|
|
94
|
+
historyOpen: T,
|
|
95
|
+
previewOpen: C
|
|
95
96
|
}, e);
|
|
96
|
-
|
|
97
|
+
E(t.historyOpen), x(t.previewOpen);
|
|
97
98
|
};
|
|
98
|
-
t("assistant.history", i(() => ({ run: () =>
|
|
99
|
+
t("assistant.history", i(() => ({ run: () => T ? { status: "already" } : (E(!0), x(!1), { status: "done" }) }), [T, E])), t("assistant.preview", i(() => S ? {
|
|
99
100
|
surface: "panel",
|
|
100
|
-
run: () =>
|
|
101
|
-
close: () =>
|
|
101
|
+
run: () => C ? { status: "already" } : (E(!1), x(!0), { status: "done" }),
|
|
102
|
+
close: () => C ? (x(!1), { status: "done" }) : { status: "already" }
|
|
102
103
|
} : null, [
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
S,
|
|
105
|
+
C,
|
|
106
|
+
E
|
|
106
107
|
]));
|
|
107
|
-
let
|
|
108
|
-
Oe(
|
|
109
|
-
let
|
|
108
|
+
let G = Xe.find((e) => e.id === Ze);
|
|
109
|
+
Oe(G?.backendSessionId ?? null, G?.mode ?? null, u ?? !0), Ee(u ?? !0);
|
|
110
|
+
let pt = ee(u !== !1), K = Ne(), q = a(!1), mt = n((e) => {
|
|
110
111
|
q.current = e;
|
|
111
|
-
}, []), J = a(!1), [
|
|
112
|
-
compact:
|
|
112
|
+
}, []), J = a(!1), [ht, Y] = o(!1), X = n(() => Ae({
|
|
113
|
+
compact: O,
|
|
113
114
|
unsent: q.current,
|
|
114
115
|
confirmed: J.current
|
|
115
|
-
}) === "close" ? !1 : (Y(!0), !0), [
|
|
116
|
+
}) === "close" ? !1 : (Y(!0), !0), [O]);
|
|
116
117
|
r(() => {
|
|
117
|
-
if (!(!
|
|
118
|
+
if (!(!O || !K)) return K(X);
|
|
118
119
|
}, [
|
|
119
|
-
|
|
120
|
+
O,
|
|
120
121
|
K,
|
|
121
122
|
X
|
|
122
123
|
]);
|
|
123
124
|
let Z = n(() => {
|
|
125
|
+
if (k && y) {
|
|
126
|
+
y();
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
124
129
|
X() || l();
|
|
125
|
-
}, [
|
|
130
|
+
}, [
|
|
131
|
+
k,
|
|
132
|
+
y,
|
|
133
|
+
X,
|
|
134
|
+
l
|
|
135
|
+
]), gt = () => {
|
|
126
136
|
J.current = !0, q.current = !1, Y(!1);
|
|
127
137
|
try {
|
|
128
138
|
l();
|
|
129
139
|
} finally {
|
|
130
140
|
J.current = !1;
|
|
131
141
|
}
|
|
132
|
-
}, Q = a(null),
|
|
133
|
-
|
|
134
|
-
}, [
|
|
135
|
-
|
|
142
|
+
}, Q = a(null), _t = a(null), vt = a(null), yt = n(() => A(!1), []), [bt, xt] = o(0), St = n(() => {
|
|
143
|
+
D(), A(!1), E(!1), xt((e) => e + 1);
|
|
144
|
+
}, [D, E]), Ct = n(() => {
|
|
145
|
+
v?.(), xt((e) => e + 1);
|
|
146
|
+
}, [v]), wt = n(() => {
|
|
147
|
+
A(!1), et(!0);
|
|
136
148
|
}, []), $ = a(!1);
|
|
137
149
|
return r(() => {
|
|
138
|
-
if ($.current && !
|
|
150
|
+
if ($.current && !M) {
|
|
139
151
|
let e = document.activeElement;
|
|
140
|
-
(!e || e === document.body || e ===
|
|
152
|
+
(!e || e === document.body || e === w.current) && _t.current?.focus({ preventScroll: !0 });
|
|
141
153
|
}
|
|
142
|
-
$.current =
|
|
143
|
-
}, [
|
|
144
|
-
|
|
145
|
-
}, [
|
|
146
|
-
!
|
|
147
|
-
}, [
|
|
148
|
-
panelRef:
|
|
149
|
-
inputRef:
|
|
150
|
-
onNewConversation:
|
|
151
|
-
onOpenConversationMenu:
|
|
154
|
+
$.current = M;
|
|
155
|
+
}, [M]), r(() => {
|
|
156
|
+
bt > 0 && Q.current?.focus({ preventScroll: !0 });
|
|
157
|
+
}, [bt]), r(() => {
|
|
158
|
+
!j.current || !R || !H || (j.current = !1, document.getElementById(H.avatarTab)?.focus({ preventScroll: !0 }));
|
|
159
|
+
}, [R, H]), ke({
|
|
160
|
+
panelRef: w,
|
|
161
|
+
inputRef: O ? Q : void 0,
|
|
162
|
+
onNewConversation: O ? St : void 0,
|
|
163
|
+
onOpenConversationMenu: O && !k ? wt : void 0,
|
|
152
164
|
onClose: () => {
|
|
153
165
|
let e = se({
|
|
154
|
-
historyOpen:
|
|
155
|
-
previewOpen:
|
|
156
|
-
avatarOpen:
|
|
157
|
-
tabReplySpeaking:
|
|
166
|
+
historyOpen: T,
|
|
167
|
+
previewOpen: C,
|
|
168
|
+
avatarOpen: R,
|
|
169
|
+
tabReplySpeaking: U.current !== null
|
|
158
170
|
});
|
|
159
171
|
if (e === "overlay") {
|
|
160
|
-
|
|
172
|
+
E(!1), x(!1);
|
|
161
173
|
return;
|
|
162
174
|
}
|
|
163
175
|
if (e === "tab-reply") {
|
|
164
|
-
|
|
176
|
+
U.current?.();
|
|
165
177
|
return;
|
|
166
178
|
}
|
|
167
179
|
if (e === "tab") {
|
|
168
|
-
|
|
180
|
+
z(!1), H && document.getElementById(H.chatTab)?.focus();
|
|
169
181
|
return;
|
|
170
182
|
}
|
|
171
|
-
if (
|
|
172
|
-
|
|
183
|
+
if (M) {
|
|
184
|
+
A(!1);
|
|
173
185
|
return;
|
|
174
186
|
}
|
|
175
187
|
Z();
|
|
176
188
|
}
|
|
177
189
|
}), /* @__PURE__ */ s(re, {
|
|
178
190
|
visible: u ?? !0,
|
|
179
|
-
engine:
|
|
191
|
+
engine: Je,
|
|
180
192
|
children: /* @__PURE__ */ s(le, {
|
|
181
193
|
value: m,
|
|
182
194
|
children: /* @__PURE__ */ s(ue.Provider, {
|
|
183
|
-
value:
|
|
195
|
+
value: lt,
|
|
184
196
|
children: /* @__PURE__ */ s(pe, {
|
|
185
197
|
value: p,
|
|
186
198
|
children: /* @__PURE__ */ s(we, {
|
|
187
|
-
navigate:
|
|
188
|
-
isShellLessTarget:
|
|
199
|
+
navigate: Ue,
|
|
200
|
+
isShellLessTarget: We,
|
|
189
201
|
children: /* @__PURE__ */ s(he, {
|
|
190
|
-
value:
|
|
191
|
-
onOpen:
|
|
202
|
+
value: Ge,
|
|
203
|
+
onOpen: Ke,
|
|
192
204
|
children: /* @__PURE__ */ s(Se, { children: /* @__PURE__ */ s(Ce, { children: /* @__PURE__ */ c("div", {
|
|
193
|
-
ref:
|
|
205
|
+
ref: w,
|
|
194
206
|
className: "relative flex h-full w-full flex-col bg-bg-surface",
|
|
207
|
+
style: k ? Ve : void 0,
|
|
195
208
|
role: "complementary",
|
|
196
|
-
"aria-label":
|
|
209
|
+
"aria-label": k ? b("window.title", "Quick assistant") : b("panel.ariaLabel", "AI Assistant"),
|
|
197
210
|
"data-testid": "ai-assistant-panel",
|
|
198
211
|
[ae]: "",
|
|
199
|
-
...
|
|
200
|
-
...
|
|
212
|
+
...ft ? { [ie]: ft } : {},
|
|
213
|
+
...O ? {
|
|
201
214
|
"data-presentation": "compact",
|
|
202
|
-
...
|
|
215
|
+
..._ ? { "data-assistant-surface": _ } : {},
|
|
216
|
+
...F ? { "data-assistant-expanded": "" } : {}
|
|
203
217
|
} : {},
|
|
204
218
|
tabIndex: -1,
|
|
205
219
|
children: [
|
|
206
220
|
/* @__PURE__ */ c("div", {
|
|
207
221
|
className: "contents",
|
|
208
|
-
inert:
|
|
209
|
-
children: [
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
222
|
+
inert: I || void 0,
|
|
223
|
+
children: [O ? /* @__PURE__ */ c(Be, { children: [k ? /* @__PURE__ */ s(Re, {
|
|
224
|
+
onOpenFull: Ct,
|
|
225
|
+
onMinimize: () => y?.()
|
|
226
|
+
}) : /* @__PURE__ */ s(Pe, {
|
|
227
|
+
contextLabel: pt,
|
|
228
|
+
menuOpen: M,
|
|
229
|
+
menuViewId: ot,
|
|
230
|
+
onOpenMenu: () => A(!0),
|
|
231
|
+
menuButtonRef: _t,
|
|
215
232
|
conversationMenu: /* @__PURE__ */ s(Fe, {
|
|
216
|
-
open:
|
|
217
|
-
onOpenChange:
|
|
218
|
-
triggerRef:
|
|
233
|
+
open: $e,
|
|
234
|
+
onOpenChange: et,
|
|
235
|
+
triggerRef: vt
|
|
219
236
|
}),
|
|
220
|
-
expandOffered:
|
|
221
|
-
expanded:
|
|
222
|
-
onToggleExpanded:
|
|
223
|
-
onTogglePreview: () =>
|
|
224
|
-
previewOpen:
|
|
237
|
+
expandOffered: N,
|
|
238
|
+
expanded: F,
|
|
239
|
+
onToggleExpanded: nt,
|
|
240
|
+
onTogglePreview: () => W("preview"),
|
|
241
|
+
previewOpen: C,
|
|
225
242
|
onClose: Z
|
|
226
243
|
}), /* @__PURE__ */ s(Ie, {
|
|
227
|
-
open:
|
|
244
|
+
open: ht,
|
|
228
245
|
onKeep: () => Y(!1),
|
|
229
|
-
onDiscard:
|
|
246
|
+
onDiscard: gt
|
|
230
247
|
})] }) : /* @__PURE__ */ s(be, {
|
|
231
|
-
contextLabel:
|
|
232
|
-
onNewConversation: () =>
|
|
233
|
-
onOpenHistory: () =>
|
|
234
|
-
historyOpen:
|
|
235
|
-
onTogglePreview: () =>
|
|
236
|
-
previewOpen:
|
|
248
|
+
contextLabel: pt,
|
|
249
|
+
onNewConversation: () => D(),
|
|
250
|
+
onOpenHistory: () => W("history"),
|
|
251
|
+
historyOpen: T,
|
|
252
|
+
onTogglePreview: () => W("preview"),
|
|
253
|
+
previewOpen: C,
|
|
237
254
|
onClose: l,
|
|
238
255
|
docked: d,
|
|
239
256
|
onToggleDock: f
|
|
240
|
-
}),
|
|
241
|
-
selected:
|
|
242
|
-
onSelect:
|
|
243
|
-
ids:
|
|
257
|
+
}), H && !k ? /* @__PURE__ */ s(De, {
|
|
258
|
+
selected: R ? "avatar" : "chat",
|
|
259
|
+
onSelect: ut,
|
|
260
|
+
ids: H
|
|
244
261
|
}) : null]
|
|
245
262
|
}),
|
|
246
|
-
|
|
247
|
-
id:
|
|
248
|
-
onClose:
|
|
263
|
+
T ? /* @__PURE__ */ s(xe, { presentation: h }) : M ? /* @__PURE__ */ s(Le, {
|
|
264
|
+
id: ot,
|
|
265
|
+
onClose: yt,
|
|
249
266
|
onRequestClosePanel: Z,
|
|
250
|
-
onNewConversation:
|
|
251
|
-
onOpenAvatar:
|
|
267
|
+
onNewConversation: St,
|
|
268
|
+
onOpenAvatar: B ? dt : void 0,
|
|
252
269
|
docked: d,
|
|
253
270
|
onToggleDock: f
|
|
254
271
|
}) : null,
|
|
255
|
-
|
|
272
|
+
C && /* @__PURE__ */ s(ye, { onClose: () => x(!1) }),
|
|
256
273
|
/* @__PURE__ */ s("div", {
|
|
257
274
|
className: "contents",
|
|
258
|
-
inert:
|
|
275
|
+
inert: I || void 0,
|
|
259
276
|
children: /* @__PURE__ */ s(Me, {
|
|
260
277
|
visible: u ?? !0,
|
|
261
|
-
writeAccess:
|
|
278
|
+
writeAccess: He,
|
|
262
279
|
presentation: h,
|
|
263
|
-
inputRef:
|
|
264
|
-
onDraftDirtyChange:
|
|
280
|
+
inputRef: O ? Q : void 0,
|
|
281
|
+
onDraftDirtyChange: O ? mt : void 0
|
|
265
282
|
})
|
|
266
283
|
})
|
|
267
284
|
]
|
|
@@ -1640,8 +1640,8 @@ var Gi = () => () => {}, Ki = () => "off", qi = ({ visible: qi = !0, writeAccess
|
|
|
1640
1640
|
x.speech?.close(), x.speech = null, x.render?.end();
|
|
1641
1641
|
}, Ke = () => {
|
|
1642
1642
|
We(), x.stream?.close(), x.stream = null, x.render = null;
|
|
1643
|
-
}, Je = !1, Ye = () => {
|
|
1644
|
-
Je && (Je = !1, qe.abort(b));
|
|
1643
|
+
}, Je = !1, Ye = (e = !1) => {
|
|
1644
|
+
Je && (Je = !1, qe.abort(b, e));
|
|
1645
1645
|
}, Xe = new u(), Qe = () => {}, $e = async (i = 1) => {
|
|
1646
1646
|
T(b, "attemptStarted");
|
|
1647
1647
|
let a = null, o = null, s = !1;
|
|
@@ -1818,9 +1818,12 @@ var Gi = () => () => {}, Ki = () => "off", qi = ({ visible: qi = !0, writeAccess
|
|
|
1818
1818
|
} finally {
|
|
1819
1819
|
et?.dispose();
|
|
1820
1820
|
}
|
|
1821
|
-
if (ht?.(), Ke(),
|
|
1821
|
+
if (ht?.(), Ke(), S.done || (w(b, { outcome: "timedOut" }), S = {
|
|
1822
|
+
...S,
|
|
1823
|
+
content: Ue(S.content, g, N, le)
|
|
1824
|
+
}), (S.done || Je) && n.voiceSessionId !== void 0 && !Ae().abandon) {
|
|
1822
1825
|
let e = l(at(S.content));
|
|
1823
|
-
(e.trim() || Je) && (s && it(e), T(b, "speechQueued"), Je = !0, qe.publish(b, {
|
|
1826
|
+
(e.trim() || Je) && ((s || !S.done) && it(e), T(b, "speechQueued"), Je = !0, qe.publish(b, {
|
|
1824
1827
|
conversationId: _,
|
|
1825
1828
|
channel: "voice",
|
|
1826
1829
|
voiceSessionId: n.voiceSessionId,
|
|
@@ -1830,10 +1833,7 @@ var Gi = () => () => {}, Ki = () => "off", qi = ({ visible: qi = !0, writeAccess
|
|
|
1830
1833
|
}));
|
|
1831
1834
|
}
|
|
1832
1835
|
let _t = ue.producesArtifacts ? await ye(i, y, c, g, ve).then((e) => e).catch(() => []) : void 0;
|
|
1833
|
-
S.usedTools !== void 0 && w(b, { usedTools: S.usedTools }),
|
|
1834
|
-
...S,
|
|
1835
|
-
content: Ue(S.content, g, N, le)
|
|
1836
|
-
}), s && (S = {
|
|
1836
|
+
S.usedTools !== void 0 && w(b, { usedTools: S.usedTools }), s && (S = {
|
|
1837
1837
|
...S,
|
|
1838
1838
|
content: at(S.content)
|
|
1839
1839
|
});
|
|
@@ -1872,7 +1872,7 @@ var Gi = () => () => {}, Ki = () => "off", qi = ({ visible: qi = !0, writeAccess
|
|
|
1872
1872
|
if (i === 1 && Xe.canFailover() && Dn(e)) {
|
|
1873
1873
|
Qe();
|
|
1874
1874
|
let e = a ?? v.getState().sandboxesByMode[g]?.sandboxId ?? null;
|
|
1875
|
-
return e && (Fo.current.add(e), Po.current.invalidate(e)), ka(_), ja(g), Ca(_, b, ""), Ta(_, b, { pendingWrite: void 0 }), e && K.retireSandbox(e), Ke(), Ye(), vn(b), $e(2);
|
|
1875
|
+
return e && (Fo.current.add(e), Po.current.invalidate(e)), ka(_), ja(g), Ca(_, b, ""), Ta(_, b, { pendingWrite: void 0 }), e && K.retireSandbox(e), Ke(), Ye(!0), vn(b), $e(2);
|
|
1876
1876
|
}
|
|
1877
1877
|
throw e;
|
|
1878
1878
|
}
|
|
@@ -2772,7 +2772,7 @@ var Gi = () => () => {}, Ki = () => "off", qi = ({ visible: qi = !0, writeAccess
|
|
|
2772
2772
|
active: fo,
|
|
2773
2773
|
onSelect: Qi ? Ll : El
|
|
2774
2774
|
} : void 0,
|
|
2775
|
-
suspendDictation: J,
|
|
2775
|
+
suspendDictation: J || Qi && !qi,
|
|
2776
2776
|
onVoiceStateChange: q.ids ? rl : void 0,
|
|
2777
2777
|
presentation: Yi,
|
|
2778
2778
|
turnInFlight: G,
|