@burdenoff/fe-libs 2026.1011.2 → 2026.1011.4
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.
|
@@ -184,7 +184,18 @@ export declare const ASSISTANT_SHEET_BASE_CLASS: string;
|
|
|
184
184
|
export declare const ASSISTANT_SHEET_COMPACT_CLASS = "h-[60vh] max-h-[60vh]";
|
|
185
185
|
/** Phone, expanded from the grab handle. */
|
|
186
186
|
export declare const ASSISTANT_SHEET_EXPANDED_CLASS = "h-[88vh] max-h-[88vh]";
|
|
187
|
-
/**
|
|
187
|
+
/**
|
|
188
|
+
* Desktop floating window, rising from the launcher, clamped to the viewport.
|
|
189
|
+
*
|
|
190
|
+
* ★★ THE HEIGHT CLAMP LEAVES THE SHELL HEADER FREE (BOFF-9092). The window is
|
|
191
|
+
* anchored `bottom-24` (6rem) and is 680px tall, shrinking only to
|
|
192
|
+
* `max-h`. That used to be `100vh - 8rem`, which puts the top edge at 32px on
|
|
193
|
+
* any viewport shorter than ~808px, UNDER the 56px shell header (`z-[100]`):
|
|
194
|
+
* the header covered the window's own header, its History and Close controls.
|
|
195
|
+
* The clamp now subtracts the bottom anchor, the header (`--assistant-overlay-top`,
|
|
196
|
+
* which the overlay sets on the sheet for both layouts; 56px when absent) and a
|
|
197
|
+
* 0.5rem breathing gap, so the top edge never rises above `header + 8px`.
|
|
198
|
+
*/
|
|
188
199
|
export declare const ASSISTANT_FLOATING_DESKTOP_CLASS: string;
|
|
189
200
|
/**
|
|
190
201
|
* Desktop docked side panel, from below the shell header to the bottom edge.
|
|
@@ -41,7 +41,7 @@ var v = 520, y = 24, b = "--assistant-panel-inset";
|
|
|
41
41
|
function x(e) {
|
|
42
42
|
return !e.isOpen || !e.isDesktop ? 0 : e.docked ? 440 : 544;
|
|
43
43
|
}
|
|
44
|
-
var S = "fixed z-50 flex flex-col overflow-hidden border border-border-default bg-bg-surface shadow-2xl inset-x-0 bottom-0 top-auto rounded-t-2xl animate-in slide-in-from-bottom-4 fade-in duration-200", C = "h-[60vh] max-h-[60vh]", w = "h-[88vh] max-h-[88vh]", T = "sm:inset-auto sm:top-auto sm:bottom-24 sm:right-6 sm:rounded-2xl sm:h-[680px] sm:max-h-[calc(100vh-
|
|
44
|
+
var S = "fixed z-50 flex flex-col overflow-hidden border border-border-default bg-bg-surface shadow-2xl inset-x-0 bottom-0 top-auto rounded-t-2xl animate-in slide-in-from-bottom-4 fade-in duration-200", C = "h-[60vh] max-h-[60vh]", w = "h-[88vh] max-h-[88vh]", T = "sm:inset-auto sm:top-auto sm:bottom-24 sm:right-6 sm:rounded-2xl sm:h-[680px] sm:max-h-[calc(100vh-6rem-var(--assistant-overlay-top,56px)-0.5rem)] sm:w-[520px] sm:max-w-[calc(100vw-2rem)]", E = "sm:left-auto sm:right-0 sm:top-[var(--assistant-overlay-top)] sm:bottom-0 sm:rounded-none sm:h-auto sm:max-h-none sm:w-[440px] sm:max-w-[calc(100vw-2rem)]";
|
|
45
45
|
function D(e) {
|
|
46
46
|
return [
|
|
47
47
|
S,
|
|
@@ -17,251 +17,251 @@ import { useCallback as s, useEffect as c, useMemo as me, useRef as l, useState
|
|
|
17
17
|
import { Maximize2 as he, Minimize2 as ge, ScrollText as _e, X as d } from "lucide-react";
|
|
18
18
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
19
19
|
//#region src/shared/assistant/ui/voice/AssistantVoiceSession.tsx
|
|
20
|
-
var m = ({ session: m, turns: be = [], onSaveTranscript: xe, onContinueInChat: Se, notice:
|
|
21
|
-
let
|
|
22
|
-
t("assistant.transcript", me(() => ({ run: () =>
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
let
|
|
26
|
-
m.phase !== "listening" && m.phase !== "thinking" ||
|
|
27
|
-
}, [
|
|
28
|
-
|
|
29
|
-
}, []),
|
|
20
|
+
var m = ({ session: m, turns: be = [], onSaveTranscript: xe, onContinueInChat: Se, notice: Ce = null, privacyNotice: h = null, spoken: g, onInterrupt: we, onToggleMute: _, attachments: v = [], onAttachFiles: y, onRemoveAttachment: Te, onRetryAttachment: Ee, canAttachMore: De = !0, preparingAttachments: b = 0, attachmentsLocked: x = !1, attachmentNotice: S = null, spokenChunks: C = null, onEnd: w, capturing: Oe = !0, interrupting: ke = !1, awaitingEndpoint: Ae = !1, holding: T = !1, correcting: je = !1, onLetMeFinish: E, onImDone: D, proposalChip: O = null, proposalTray: k = null, renderAfterTurn: Me }) => {
|
|
21
|
+
let A = n(), { muted: j, error: M } = m, N = l(null), P = l(null), [F, I] = u("mini"), L = F === "full", R = F === "mini", z = F === "mini" ? "panel" : F === "panel" ? "full" : "mini", [B, V] = u(!1);
|
|
22
|
+
t("assistant.transcript", me(() => ({ run: () => B ? { status: "already" } : (V(!0), { status: "done" }) }), [B]));
|
|
23
|
+
let H = k !== null && !R, U = l(!1), W = l(_);
|
|
24
|
+
W.current = _;
|
|
25
|
+
let G = s(() => {
|
|
26
|
+
m.phase !== "listening" && m.phase !== "thinking" || j || U.current || o(m) || (U.current = !0, W.current());
|
|
27
|
+
}, [j, m]), K = s(() => {
|
|
28
|
+
U.current && (U.current = !1, W.current());
|
|
29
|
+
}, []), Ne = G;
|
|
30
30
|
c(() => {
|
|
31
31
|
let e = () => {
|
|
32
|
-
document.visibilityState === "hidden" ?
|
|
32
|
+
document.visibilityState === "hidden" ? G() : K();
|
|
33
33
|
};
|
|
34
34
|
return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
|
|
35
|
-
}, [
|
|
36
|
-
let e =
|
|
35
|
+
}, [G, K]), c(() => {
|
|
36
|
+
let e = K;
|
|
37
37
|
return window.addEventListener("focus", e), () => {
|
|
38
|
-
window.removeEventListener("focus", e),
|
|
38
|
+
window.removeEventListener("focus", e), U.current = !1;
|
|
39
39
|
};
|
|
40
40
|
}, []), c(() => {
|
|
41
|
-
document.activeElement?.closest("[data-hands-free-notice]") ||
|
|
42
|
-
}, []), e(
|
|
41
|
+
document.activeElement?.closest("[data-hands-free-notice]") || N.current?.focus();
|
|
42
|
+
}, []), e(P, { fallbackSelector: `[${ae}]` }), c(() => {
|
|
43
43
|
let e = (e) => {
|
|
44
44
|
if (e.key === "Escape") {
|
|
45
45
|
let t = fe({
|
|
46
46
|
defaultPrevented: e.defaultPrevented,
|
|
47
47
|
layerAbove: de({
|
|
48
48
|
target: e.target,
|
|
49
|
-
session:
|
|
49
|
+
session: P.current,
|
|
50
50
|
doc: document
|
|
51
51
|
}),
|
|
52
|
-
transcriptOpen:
|
|
52
|
+
transcriptOpen: B
|
|
53
53
|
});
|
|
54
54
|
if (t === "ignore") return;
|
|
55
|
-
e.preventDefault(), t === "close-transcript" ?
|
|
55
|
+
e.preventDefault(), t === "close-transcript" ? V(!1) : h ? h.decline() : H ? k?.onClose() : w();
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
|
-
if (e.key !== "Tab" || !
|
|
59
|
-
let t = (
|
|
58
|
+
if (e.key !== "Tab" || !L) return;
|
|
59
|
+
let t = (B ? P.current?.querySelector("[data-testid=\"assistant-voice-transcript\"]") : P.current)?.querySelectorAll("button:not([disabled])");
|
|
60
60
|
if (!t || t.length === 0) return;
|
|
61
61
|
let n = t[0], r = t[t.length - 1];
|
|
62
62
|
!n || !r || (e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus()));
|
|
63
63
|
};
|
|
64
64
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
65
65
|
}, [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
w,
|
|
67
|
+
L,
|
|
68
|
+
B,
|
|
69
|
+
H,
|
|
70
|
+
k,
|
|
71
|
+
h
|
|
72
72
|
]);
|
|
73
|
-
let
|
|
74
|
-
letMeFinish:
|
|
75
|
-
imDone:
|
|
76
|
-
} : null,
|
|
73
|
+
let q = Ce !== null && M === null, J = o(m), Y = E && D && m.phase === "listening" && !j && M === null ? {
|
|
74
|
+
letMeFinish: E,
|
|
75
|
+
imDone: D
|
|
76
|
+
} : null, X = Y !== null;
|
|
77
77
|
c(() => {
|
|
78
|
-
if (
|
|
78
|
+
if (X) return;
|
|
79
79
|
let e = document.activeElement;
|
|
80
|
-
(!e || e === document.body) &&
|
|
81
|
-
}, [
|
|
80
|
+
(!e || e === document.body) && N.current?.focus();
|
|
81
|
+
}, [X]);
|
|
82
82
|
let Z = i({
|
|
83
83
|
snapshot: m,
|
|
84
|
-
capturing:
|
|
85
|
-
interrupting:
|
|
86
|
-
awaitingEndpoint:
|
|
84
|
+
capturing: Oe,
|
|
85
|
+
interrupting: ke,
|
|
86
|
+
awaitingEndpoint: Ae
|
|
87
87
|
}), Pe = (() => {
|
|
88
88
|
switch (Z) {
|
|
89
|
-
case "connecting": return
|
|
90
|
-
case "endpoint-grace": return
|
|
91
|
-
case "interrupting": return
|
|
92
|
-
case "thinking": return
|
|
93
|
-
case "speaking": return
|
|
89
|
+
case "connecting": return A("voiceSession.connecting", "Starting the microphone…");
|
|
90
|
+
case "endpoint-grace": return A("voiceSession.endpointGrace", "Still listening — take your time");
|
|
91
|
+
case "interrupting": return A("voiceSession.interrupting", "Stopped — go ahead");
|
|
92
|
+
case "thinking": return A(a.key, a.fallback);
|
|
93
|
+
case "speaking": return A("voiceSession.speaking", "Speaking — tap to stop");
|
|
94
94
|
case "mic-error":
|
|
95
95
|
case "ended": return "";
|
|
96
|
-
case "listening": return
|
|
96
|
+
case "listening": return j ? A("voiceSession.muted", "Microphone off") : A("voiceSession.listening", "Listening…");
|
|
97
97
|
default: return Z;
|
|
98
98
|
}
|
|
99
|
-
})(),
|
|
100
|
-
tr:
|
|
99
|
+
})(), Q = !j && (Z === "listening" || Z === "endpoint-grace"), Fe = Q && T ? A("voiceSession.holding", "Take your time — tap “I’m done” when you finish") : Q && je ? A("voiceSession.correcting", "Stopped that answer — listening to your correction") : Pe, $ = ne({
|
|
100
|
+
tr: A,
|
|
101
101
|
stage: Z,
|
|
102
|
-
muted:
|
|
103
|
-
label:
|
|
104
|
-
}),
|
|
102
|
+
muted: j,
|
|
103
|
+
label: Fe
|
|
104
|
+
}), Ie = te(Fe, $), Le = Z === "thinking";
|
|
105
105
|
return /* @__PURE__ */ p("div", {
|
|
106
|
-
ref:
|
|
107
|
-
className: `flex flex-col items-center justify-between bg-bg-sunken ${
|
|
106
|
+
ref: P,
|
|
107
|
+
className: `flex flex-col items-center justify-between bg-bg-sunken ${F === "full" ? "fixed inset-x-0 bottom-0 top-14 z-[60] px-6 py-8" : F === "panel" ? "absolute inset-0 z-20 px-4 py-6" : "absolute inset-x-0 bottom-0 z-20 min-h-[11.25rem] border-t border-border-subtle px-3 py-3 shadow-lg"}`,
|
|
108
108
|
role: "dialog",
|
|
109
|
-
"aria-modal":
|
|
110
|
-
"aria-label":
|
|
109
|
+
"aria-modal": L || void 0,
|
|
110
|
+
"aria-label": A("voiceSession.title", "Voice conversation"),
|
|
111
111
|
"data-testid": "assistant-voice-session",
|
|
112
112
|
[oe]: "",
|
|
113
113
|
children: [
|
|
114
114
|
/* @__PURE__ */ p("button", {
|
|
115
|
-
ref:
|
|
115
|
+
ref: N,
|
|
116
116
|
type: "button",
|
|
117
|
-
onClick:
|
|
118
|
-
className: `absolute ${
|
|
119
|
-
title:
|
|
117
|
+
onClick: w,
|
|
118
|
+
className: `absolute ${L ? "right-6 top-6 h-14 gap-2 px-5 text-base" : R ? "right-12 top-2 h-8 gap-1.5 px-2.5 text-xs" : "right-3 top-3 h-11 gap-2 px-4 text-sm"} flex items-center justify-center rounded-full border border-border-default bg-bg-elevated text-text-secondary hover:bg-bg-sunken transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong`,
|
|
119
|
+
title: A("voiceSession.end", "End the voice conversation"),
|
|
120
120
|
"data-testid": "assistant-voice-end",
|
|
121
121
|
children: [/* @__PURE__ */ f(d, {
|
|
122
|
-
className:
|
|
122
|
+
className: L ? "size-6" : R ? "size-4" : "size-5",
|
|
123
123
|
"aria-hidden": "true"
|
|
124
124
|
}), /* @__PURE__ */ f("span", {
|
|
125
|
-
className: `truncate whitespace-nowrap font-medium ${
|
|
126
|
-
children:
|
|
125
|
+
className: `truncate whitespace-nowrap font-medium ${R ? "max-w-[3.5rem] text-xs" : "max-w-[7rem]"}`,
|
|
126
|
+
children: A("voiceSession.endShort", "End")
|
|
127
127
|
})]
|
|
128
128
|
}),
|
|
129
129
|
/* @__PURE__ */ p("div", {
|
|
130
|
-
className: `flex flex-col items-center ${
|
|
131
|
-
children: [
|
|
130
|
+
className: `flex flex-col items-center ${R ? `px-3 ${q || S ? "pt-9 pb-2" : ""}` : `min-h-[1.5rem] ${q || S ? L ? "pt-14" : "pt-10" : ""}`}`,
|
|
131
|
+
children: [q ? /* @__PURE__ */ f("p", {
|
|
132
132
|
className: "max-w-xs text-center text-xs text-status-warning",
|
|
133
133
|
"data-testid": "assistant-voice-notice",
|
|
134
|
-
children: ve(
|
|
135
|
-
}) : null,
|
|
134
|
+
children: ve(Ce, A)
|
|
135
|
+
}) : null, S ? /* @__PURE__ */ f("p", {
|
|
136
136
|
className: "max-w-xs text-center text-xs text-status-warning",
|
|
137
137
|
role: "status",
|
|
138
138
|
"aria-live": "polite",
|
|
139
139
|
"data-testid": "assistant-voice-attachment-notice",
|
|
140
|
-
children:
|
|
140
|
+
children: S
|
|
141
141
|
}) : null]
|
|
142
142
|
}),
|
|
143
143
|
(() => {
|
|
144
144
|
let e = /* @__PURE__ */ f(se, {
|
|
145
145
|
session: m,
|
|
146
|
-
compact:
|
|
146
|
+
compact: R,
|
|
147
147
|
connecting: Z === "connecting",
|
|
148
|
-
onPress: r(Z) ?
|
|
149
|
-
label: r(Z) ?
|
|
150
|
-
}), t =
|
|
148
|
+
onPress: r(Z) ? we : _,
|
|
149
|
+
label: r(Z) ? A("voiceSession.interrupt", "Stop the assistant and speak") : j ? A("voiceSession.unmute", "Turn the microphone on") : A("voiceSession.mute", "Turn the microphone off")
|
|
150
|
+
}), t = Y ? /* @__PURE__ */ f("button", {
|
|
151
151
|
type: "button",
|
|
152
|
-
onClick:
|
|
153
|
-
className: `flex items-center justify-center rounded-full border font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong ${
|
|
154
|
-
title:
|
|
152
|
+
onClick: T ? Y.imDone : Y.letMeFinish,
|
|
153
|
+
className: `flex items-center justify-center rounded-full border font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong ${R ? "h-7 px-3 text-xs" : L ? "h-11 px-6 text-base" : "h-9 px-4 text-sm"} ${T ? "border-transparent bg-action-primary-bg text-action-primary-text hover:opacity-90" : "border-border-default bg-bg-elevated text-text-secondary hover:bg-bg-sunken"}`,
|
|
154
|
+
title: T ? A("voiceSession.imDoneHint", "Send what you said now") : A("voiceSession.letMeFinishHint", "Pause sending until you tap “I’m done”"),
|
|
155
155
|
"data-testid": "assistant-voice-hold",
|
|
156
|
-
"data-holding":
|
|
157
|
-
children:
|
|
156
|
+
"data-holding": T ? "true" : "false",
|
|
157
|
+
children: T ? A("voiceSession.imDone", "I’m done") : A("voiceSession.letMeFinish", "Let me finish")
|
|
158
158
|
}) : null, n = t ? /* @__PURE__ */ p("div", {
|
|
159
159
|
className: "flex flex-col items-center gap-2",
|
|
160
160
|
children: [e, t]
|
|
161
|
-
}) : e, i = ee(Z) ?
|
|
162
|
-
return
|
|
163
|
-
spokenChunks:
|
|
161
|
+
}) : e, i = ee(Z) ? g : J || null, a = M === null ? null : ye(M, A);
|
|
162
|
+
return R ? /* @__PURE__ */ f(ce, {
|
|
163
|
+
spokenChunks: C,
|
|
164
164
|
state: Z,
|
|
165
165
|
caption: i,
|
|
166
|
-
statusText:
|
|
167
|
-
statusSuffix:
|
|
168
|
-
rotateStatus:
|
|
166
|
+
statusText: Ie,
|
|
167
|
+
statusSuffix: $,
|
|
168
|
+
rotateStatus: Le,
|
|
169
169
|
errorText: a,
|
|
170
170
|
control: n
|
|
171
171
|
}) : /* @__PURE__ */ f(le, {
|
|
172
172
|
state: Z,
|
|
173
|
-
userCaption:
|
|
174
|
-
spokenChunks:
|
|
175
|
-
assistantCaption:
|
|
176
|
-
expanded:
|
|
177
|
-
statusText:
|
|
178
|
-
statusSuffix:
|
|
179
|
-
rotateStatus:
|
|
173
|
+
userCaption: J || null,
|
|
174
|
+
spokenChunks: C,
|
|
175
|
+
assistantCaption: g,
|
|
176
|
+
expanded: L,
|
|
177
|
+
statusText: Ie,
|
|
178
|
+
statusSuffix: $,
|
|
179
|
+
rotateStatus: Le,
|
|
180
180
|
errorText: a,
|
|
181
181
|
control: n
|
|
182
182
|
});
|
|
183
183
|
})(),
|
|
184
|
-
|
|
185
|
-
className:
|
|
184
|
+
O && !H ? /* @__PURE__ */ f("div", {
|
|
185
|
+
className: R ? "absolute left-20 right-36 top-2 flex justify-center" : `flex w-full justify-center ${L ? "max-w-[calc(100%-12rem)]" : "max-w-[calc(100%-8rem)]"}`,
|
|
186
186
|
children: /* @__PURE__ */ f("button", {
|
|
187
187
|
type: "button",
|
|
188
188
|
onClick: () => {
|
|
189
|
-
|
|
189
|
+
I("panel"), O.onOpen();
|
|
190
190
|
},
|
|
191
|
-
className: `max-w-full truncate rounded-full border border-border-default bg-bg-elevated font-medium text-text-primary transition-colors hover:bg-bg-raised focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong ${
|
|
191
|
+
className: `max-w-full truncate rounded-full border border-border-default bg-bg-elevated font-medium text-text-primary transition-colors hover:bg-bg-raised focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong ${R ? "h-8 px-3 text-xs" : "h-10 px-4 text-sm"}`,
|
|
192
192
|
"data-testid": "assistant-voice-proposal-chip",
|
|
193
|
-
children:
|
|
193
|
+
children: O.label
|
|
194
194
|
})
|
|
195
195
|
}) : null,
|
|
196
|
-
|
|
197
|
-
className: `absolute z-10 flex flex-col gap-2 overflow-y-auto rounded-lg border border-border-subtle bg-bg-elevated shadow-lg ${
|
|
196
|
+
k && H ? /* @__PURE__ */ p("div", {
|
|
197
|
+
className: `absolute z-10 flex flex-col gap-2 overflow-y-auto rounded-lg border border-border-subtle bg-bg-elevated shadow-lg ${L ? "inset-x-6 bottom-24 top-24 mx-auto max-w-xl p-4" : "inset-x-3 bottom-16 top-16 p-3"}`,
|
|
198
198
|
"data-testid": "assistant-voice-proposal-tray",
|
|
199
199
|
children: [/* @__PURE__ */ f("div", {
|
|
200
200
|
className: "flex justify-end",
|
|
201
201
|
children: /* @__PURE__ */ f("button", {
|
|
202
202
|
type: "button",
|
|
203
|
-
onClick:
|
|
203
|
+
onClick: k.onClose,
|
|
204
204
|
className: "flex size-8 items-center justify-center rounded-full text-text-secondary transition-colors hover:bg-bg-raised hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong",
|
|
205
|
-
"aria-label":
|
|
205
|
+
"aria-label": k.closeLabel,
|
|
206
206
|
"data-testid": "assistant-voice-proposal-tray-close",
|
|
207
207
|
children: /* @__PURE__ */ f(d, {
|
|
208
208
|
className: "size-4",
|
|
209
209
|
"aria-hidden": "true"
|
|
210
210
|
})
|
|
211
211
|
})
|
|
212
|
-
}),
|
|
212
|
+
}), k.content]
|
|
213
213
|
}) : null,
|
|
214
|
-
|
|
215
|
-
view:
|
|
216
|
-
onContinue:
|
|
217
|
-
onNotNow:
|
|
214
|
+
h ? /* @__PURE__ */ f(pe, {
|
|
215
|
+
view: F,
|
|
216
|
+
onContinue: h.accept,
|
|
217
|
+
onNotNow: h.decline
|
|
218
218
|
}) : null,
|
|
219
|
-
|
|
219
|
+
B ? /* @__PURE__ */ f(ue, {
|
|
220
220
|
turns: be,
|
|
221
|
-
onClose: () =>
|
|
221
|
+
onClose: () => V(!1),
|
|
222
222
|
onSave: xe,
|
|
223
223
|
onContinueInChat: Se,
|
|
224
|
-
renderAfterTurn:
|
|
224
|
+
renderAfterTurn: Me
|
|
225
225
|
}) : null,
|
|
226
|
-
|
|
227
|
-
className: `absolute ${
|
|
226
|
+
y ? /* @__PURE__ */ f("div", {
|
|
227
|
+
className: `absolute ${L ? "left-6 top-6" : R ? "left-11 top-2" : "left-3 top-3"}`,
|
|
228
228
|
children: /* @__PURE__ */ f(re, {
|
|
229
229
|
onFiles: (e) => {
|
|
230
|
-
|
|
230
|
+
y(e), I((e) => e === "mini" ? "panel" : e);
|
|
231
231
|
},
|
|
232
|
-
onPickerOpen:
|
|
232
|
+
onPickerOpen: Ne,
|
|
233
233
|
direction: "down",
|
|
234
|
-
canAddMore:
|
|
235
|
-
disabled:
|
|
234
|
+
canAddMore: De,
|
|
235
|
+
disabled: x
|
|
236
236
|
})
|
|
237
237
|
}) : null,
|
|
238
|
-
(
|
|
239
|
-
className: `absolute ${
|
|
238
|
+
(v.length > 0 || b > 0) && !R ? /* @__PURE__ */ f("div", {
|
|
239
|
+
className: `absolute ${L ? "bottom-24 left-24 right-24" : "bottom-16 left-16 right-16"}`,
|
|
240
240
|
"data-testid": "assistant-voice-attachments",
|
|
241
241
|
children: /* @__PURE__ */ f(ie, {
|
|
242
|
-
attachments:
|
|
243
|
-
onRemove:
|
|
244
|
-
onRetry:
|
|
245
|
-
preparingCount:
|
|
246
|
-
disabled:
|
|
242
|
+
attachments: v,
|
|
243
|
+
onRemove: Te ?? (() => void 0),
|
|
244
|
+
onRetry: Ee ?? (() => void 0),
|
|
245
|
+
preparingCount: b,
|
|
246
|
+
disabled: x
|
|
247
247
|
})
|
|
248
248
|
}) : null,
|
|
249
249
|
/* @__PURE__ */ f("button", {
|
|
250
250
|
type: "button",
|
|
251
|
-
onClick: () =>
|
|
252
|
-
className: `absolute ${
|
|
253
|
-
"aria-pressed":
|
|
254
|
-
"aria-label":
|
|
251
|
+
onClick: () => V((e) => !e),
|
|
252
|
+
className: `absolute ${L ? "bottom-6 right-6 size-14" : R ? "right-2 top-2 size-8" : "bottom-3 right-3 size-11"} flex items-center justify-center rounded-full bg-bg-elevated text-text-secondary transition-colors hover:bg-bg-raised hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong`,
|
|
253
|
+
"aria-pressed": B,
|
|
254
|
+
"aria-label": A("voiceSession.transcriptTitle", "Voice transcript"),
|
|
255
255
|
"data-testid": "assistant-voice-transcript-toggle",
|
|
256
|
-
children: /* @__PURE__ */ f(_e, { className:
|
|
256
|
+
children: /* @__PURE__ */ f(_e, { className: L ? "size-6" : R ? "size-4" : "size-5" })
|
|
257
257
|
}),
|
|
258
258
|
/* @__PURE__ */ f("button", {
|
|
259
259
|
type: "button",
|
|
260
|
-
onClick: () =>
|
|
261
|
-
className: `absolute ${
|
|
262
|
-
"aria-label":
|
|
260
|
+
onClick: () => I(z),
|
|
261
|
+
className: `absolute ${L ? "bottom-6 left-6 size-14" : R ? "left-2 top-2 size-8" : "bottom-3 left-3 size-11"} flex items-center justify-center rounded-full bg-bg-elevated text-text-secondary transition-colors hover:bg-bg-raised hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong`,
|
|
262
|
+
"aria-label": z === "panel" ? A("voiceSession.expandPanel", "Show the conversation in the panel") : z === "full" ? A("voiceSession.expand", "Expand the conversation to full screen") : A("voiceSession.collapse", "Shrink to the compact controller"),
|
|
263
263
|
"data-testid": "assistant-voice-expand",
|
|
264
|
-
children:
|
|
264
|
+
children: L ? /* @__PURE__ */ f(ge, { className: "size-5" }) : /* @__PURE__ */ f(he, { className: R ? "size-4" : "size-5" })
|
|
265
265
|
})
|
|
266
266
|
]
|
|
267
267
|
});
|