@burdenoff/fe-libs 2026.1013.9 → 2026.1013.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.
@@ -18,256 +18,267 @@ import { useCallback as s, useEffect as c, useMemo as he, useRef as l, useState
18
18
  import { Maximize2 as ge, Minimize2 as _e, ScrollText as ve, X as d } from "lucide-react";
19
19
  import { jsx as f, jsxs as p } from "react/jsx-runtime";
20
20
  //#region src/shared/assistant/ui/voice/AssistantVoiceSession.tsx
21
- var m = ({ session: m, turns: xe = [], onSaveTranscript: Se, onContinueInChat: Ce, notice: h = null, privacyNotice: g = null, spoken: _, onInterrupt: we, onToggleMute: v, attachments: y = [], onAttachFiles: b, onRemoveAttachment: Te, onRetryAttachment: Ee, canAttachMore: De = !0, preparingAttachments: x = 0, attachmentsLocked: S = !1, attachmentNotice: C = null, spokenChunks: w = null, onEnd: T, capturing: Oe = !0, interrupting: ke = !1, awaitingEndpoint: Ae = !1, holding: E = !1, correcting: je = !1, onLetMeFinish: D, onImDone: O, proposalChip: k = null, proposalTray: A = null, renderAfterTurn: Me }) => {
22
- let j = n(), { muted: M, error: N } = m, P = l(null), F = l(null), [Ne, I] = u("mini"), L = ce(Ne, m.phase === "ended"), R = L === "full", z = L === "mini", B = L === "mini" ? "panel" : L === "panel" ? "full" : "mini", [V, H] = u(!1);
23
- t("assistant.transcript", he(() => ({ run: () => V ? { status: "already" } : (H(!0), { status: "done" }) }), [V]));
24
- let U = A !== null && !z, W = l(!1), G = l(v);
25
- G.current = v;
26
- let K = s(() => {
27
- m.phase !== "listening" && m.phase !== "thinking" || M || W.current || o(m) || (W.current = !0, G.current());
28
- }, [M, m]), q = s(() => {
29
- W.current && (W.current = !1, G.current());
30
- }, []), Pe = K;
21
+ var m = ({ session: m, turns: be = [], onSaveTranscript: xe, onContinueInChat: Se, notice: g = null, privacyNotice: _ = null, spoken: v, onInterrupt: Ce, onToggleMute: y, attachments: b = [], onAttachFiles: x, onRemoveAttachment: we, onRetryAttachment: Te, canAttachMore: Ee = !0, preparingAttachments: S = 0, attachmentsLocked: C = !1, attachmentNotice: w = null, spokenChunks: T = null, onEnd: E, capturing: De = !0, interrupting: Oe = !1, awaitingEndpoint: ke = !1, holding: D = !1, correcting: Ae = !1, onLetMeFinish: O, onImDone: k, proposalChip: A = null, proposalTray: j = null, renderAfterTurn: je }) => {
22
+ let M = n(), { muted: N, error: P } = m, F = l(null), I = l(null), [Me, L] = u("mini"), R = ce(Me, m.phase === "ended"), z = R === "full", B = R === "mini", V = R === "mini" ? "panel" : R === "panel" ? "full" : "mini", [H, U] = u(!1);
23
+ t("assistant.transcript", he(() => ({ run: () => H ? { status: "already" } : (U(!0), { status: "done" }) }), [H]));
24
+ let W = j !== null && !B, G = l(!1), K = l(y);
25
+ K.current = y;
26
+ let q = s(() => {
27
+ m.phase !== "listening" && m.phase !== "thinking" || N || G.current || o(m) || (G.current = !0, K.current());
28
+ }, [N, m]), J = s(() => {
29
+ G.current && (G.current = !1, K.current());
30
+ }, []), Ne = q;
31
31
  c(() => {
32
32
  let e = () => {
33
- document.visibilityState === "hidden" ? K() : q();
33
+ document.visibilityState === "hidden" ? q() : J();
34
34
  };
35
35
  return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
36
- }, [K, q]), c(() => {
37
- let e = q;
36
+ }, [q, J]), c(() => {
37
+ let e = J;
38
38
  return window.addEventListener("focus", e), () => {
39
- window.removeEventListener("focus", e), W.current = !1;
39
+ window.removeEventListener("focus", e), G.current = !1;
40
40
  };
41
41
  }, []), c(() => {
42
- document.activeElement?.closest("[data-hands-free-notice]") || P.current?.focus();
43
- }, []), e(F, { fallbackSelector: `[${ae}]` }), c(() => {
42
+ document.activeElement?.closest("[data-hands-free-notice]") || F.current?.focus();
43
+ }, []), e(I, { fallbackSelector: `[${ae}]` }), c(() => {
44
44
  let e = (e) => {
45
45
  if (e.key === "Escape") {
46
46
  let t = pe({
47
47
  defaultPrevented: e.defaultPrevented,
48
48
  layerAbove: fe({
49
49
  target: e.target,
50
- session: F.current,
50
+ session: I.current,
51
51
  doc: document
52
52
  }),
53
- transcriptOpen: V
53
+ transcriptOpen: H
54
54
  });
55
55
  if (t === "ignore") return;
56
- e.preventDefault(), t === "close-transcript" ? H(!1) : g ? g.decline() : U ? A?.onClose() : T();
56
+ e.preventDefault(), t === "close-transcript" ? U(!1) : _ ? _.decline() : W ? j?.onClose() : E();
57
57
  return;
58
58
  }
59
- if (e.key !== "Tab" || !R) return;
60
- let t = (V ? F.current?.querySelector("[data-testid=\"assistant-voice-transcript\"]") : F.current)?.querySelectorAll("button:not([disabled])");
59
+ if (e.key !== "Tab" || !z) return;
60
+ let t = (H ? I.current?.querySelector("[data-testid=\"assistant-voice-transcript\"]") : I.current)?.querySelectorAll("button:not([disabled])");
61
61
  if (!t || t.length === 0) return;
62
62
  let n = t[0], r = t[t.length - 1];
63
63
  !n || !r || (e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus()));
64
64
  };
65
65
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
66
66
  }, [
67
- T,
68
- R,
69
- V,
70
- U,
71
- A,
72
- g
67
+ E,
68
+ z,
69
+ H,
70
+ W,
71
+ j,
72
+ _
73
73
  ]);
74
- let J = h !== null && N === null, Y = o(m), X = D && O && m.phase === "listening" && !M && N === null ? {
75
- letMeFinish: D,
76
- imDone: O
77
- } : null, Fe = X !== null;
74
+ let Y = g !== null && P === null, X = o(m), Z = O && k && m.phase === "listening" && !N && P === null ? {
75
+ letMeFinish: O,
76
+ imDone: k
77
+ } : null, Pe = Z !== null;
78
78
  c(() => {
79
- if (Fe) return;
79
+ if (Pe) return;
80
80
  let e = document.activeElement;
81
- (!e || e === document.body) && P.current?.focus();
82
- }, [Fe]);
83
- let Z = i({
81
+ (!e || e === document.body) && F.current?.focus();
82
+ }, [Pe]);
83
+ let Q = i({
84
84
  snapshot: m,
85
- capturing: Oe,
86
- interrupting: ke,
87
- awaitingEndpoint: Ae
88
- }), Ie = (() => {
89
- switch (Z) {
90
- case "connecting": return j("voiceSession.connecting", "Starting the microphone…");
91
- case "endpoint-grace": return j("voiceSession.endpointGrace", "Still listening — take your time");
92
- case "interrupting": return j("voiceSession.interrupting", "Stopped — go ahead");
93
- case "thinking": return j(a.key, a.fallback);
94
- case "speaking": return j("voiceSession.speaking", "Speaking — tap to stop");
85
+ capturing: De,
86
+ interrupting: Oe,
87
+ awaitingEndpoint: ke
88
+ }), Fe = (() => {
89
+ switch (Q) {
90
+ case "connecting": return M("voiceSession.connecting", "Starting the microphone…");
91
+ case "endpoint-grace": return M("voiceSession.endpointGrace", "Still listening — take your time");
92
+ case "interrupting": return M("voiceSession.interrupting", "Stopped — go ahead");
93
+ case "thinking": return M(a.key, a.fallback);
94
+ case "speaking": return M("voiceSession.speaking", "Speaking — tap to stop");
95
95
  case "mic-error":
96
96
  case "ended": return "";
97
- case "listening": return M ? j("voiceSession.muted", "Microphone off") : j("voiceSession.listening", "Listening…");
98
- default: return Z;
97
+ case "listening": return N ? M("voiceSession.muted", "Microphone off") : M("voiceSession.listening", "Listening…");
98
+ default: return Q;
99
99
  }
100
- })(), Le = !M && (Z === "listening" || Z === "endpoint-grace"), Re = Le && E ? j("voiceSession.holding", "Take your time — tap “I’m done” when you finish") : Le && je ? j("voiceSession.correcting", "Stopped that answer — listening to your correction") : Ie, Q = ne({
101
- tr: j,
102
- stage: Z,
103
- muted: M,
104
- label: Re
105
- }), ze = te(Re, Q), $ = Z === "thinking";
100
+ })(), Ie = !N && (Q === "listening" || Q === "endpoint-grace"), Le = Ie && D ? M("voiceSession.holding", "Take your time — tap “I’m done” when you finish") : Ie && Ae ? M("voiceSession.correcting", "Stopped that answer — listening to your correction") : Fe, $ = ne({
101
+ tr: M,
102
+ stage: Q,
103
+ muted: N,
104
+ label: Le
105
+ }), Re = te(Le, $), ze = Q === "thinking";
106
106
  return /* @__PURE__ */ p("div", {
107
- ref: F,
108
- className: `flex flex-col items-center justify-between bg-bg-sunken ${L === "full" ? "fixed inset-x-0 bottom-0 top-14 z-[60] px-6 py-8" : L === "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"}`,
107
+ ref: I,
108
+ className: `flex flex-col items-center justify-between bg-bg-sunken ${R === "full" ? "fixed inset-x-0 bottom-0 top-14 z-[60] px-6 py-8" : R === "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"}`,
109
109
  role: "dialog",
110
- "aria-modal": R || void 0,
111
- "aria-label": j("voiceSession.title", "Voice conversation"),
110
+ "aria-modal": z || void 0,
111
+ "aria-label": M("voiceSession.title", "Voice conversation"),
112
112
  "data-testid": "assistant-voice-session",
113
113
  [oe]: "",
114
114
  children: [
115
115
  /* @__PURE__ */ p("button", {
116
- ref: P,
116
+ ref: F,
117
117
  type: "button",
118
- onClick: T,
119
- className: `absolute ${R ? "right-6 top-6 h-14 gap-2 px-5 text-base" : z ? "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`,
120
- title: j("voiceSession.end", "End the voice conversation"),
118
+ onClick: E,
119
+ className: `absolute ${z ? "right-6 top-6 h-14 gap-2 px-5 text-base" : B ? "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`,
120
+ title: M("voiceSession.end", "End the voice conversation"),
121
121
  "data-testid": "assistant-voice-end",
122
122
  children: [/* @__PURE__ */ f(d, {
123
- className: R ? "size-6" : z ? "size-4" : "size-5",
123
+ className: z ? "size-6" : B ? "size-4" : "size-5",
124
124
  "aria-hidden": "true"
125
125
  }), /* @__PURE__ */ f("span", {
126
- className: `truncate whitespace-nowrap font-medium ${z ? "max-w-[3.5rem] text-xs" : "max-w-[7rem]"}`,
127
- children: j("voiceSession.endShort", "End")
126
+ className: `truncate whitespace-nowrap font-medium ${B ? "max-w-[3.5rem] text-xs" : "max-w-[7rem]"}`,
127
+ children: M("voiceSession.endShort", "End")
128
128
  })]
129
129
  }),
130
130
  /* @__PURE__ */ p("div", {
131
- className: `flex flex-col items-center ${z ? `px-3 ${J || C ? "pt-9 pb-2" : ""}` : `min-h-[1.5rem] ${J || C ? R ? "pt-14" : "pt-10" : ""}`}`,
132
- children: [J ? /* @__PURE__ */ f("p", {
133
- className: "max-w-xs text-center text-xs text-status-warning",
134
- "data-testid": "assistant-voice-notice",
135
- children: ye(h, j)
136
- }) : null, C ? /* @__PURE__ */ f("p", {
137
- className: "max-w-xs text-center text-xs text-status-warning",
138
- role: "status",
139
- "aria-live": "polite",
140
- "data-testid": "assistant-voice-attachment-notice",
141
- children: C
142
- }) : null]
131
+ className: `flex flex-col items-center ${B ? `px-3 ${Y || w ? "pt-9 pb-2" : ""}` : `min-h-[1.5rem] ${Y || w ? z ? "pt-14" : "pt-10" : ""}`}`,
132
+ children: [
133
+ Y ? /* @__PURE__ */ f("p", {
134
+ className: "max-w-xs text-center text-xs text-status-warning",
135
+ "data-testid": "assistant-voice-notice",
136
+ children: h(g, M)
137
+ }) : null,
138
+ /* @__PURE__ */ f("span", {
139
+ className: "sr-only start-0 top-0",
140
+ role: "status",
141
+ "aria-live": "polite",
142
+ "aria-atomic": "true",
143
+ "data-testid": "assistant-voice-notice-announced",
144
+ children: Y && g === "reply-not-heard" ? h(g, M) : null
145
+ }),
146
+ w ? /* @__PURE__ */ f("p", {
147
+ className: "max-w-xs text-center text-xs text-status-warning",
148
+ role: "status",
149
+ "aria-live": "polite",
150
+ "data-testid": "assistant-voice-attachment-notice",
151
+ children: w
152
+ }) : null
153
+ ]
143
154
  }),
144
155
  (() => {
145
156
  let e = /* @__PURE__ */ f(se, {
146
157
  session: m,
147
- compact: z,
148
- connecting: Z === "connecting",
149
- onPress: r(Z) ? we : v,
150
- label: r(Z) ? j("voiceSession.interrupt", "Stop the assistant and speak") : M ? j("voiceSession.unmute", "Turn the microphone on") : j("voiceSession.mute", "Turn the microphone off")
151
- }), t = X ? /* @__PURE__ */ f("button", {
158
+ compact: B,
159
+ connecting: Q === "connecting",
160
+ onPress: r(Q) ? Ce : y,
161
+ label: r(Q) ? M("voiceSession.interrupt", "Stop the assistant and speak") : N ? M("voiceSession.unmute", "Turn the microphone on") : M("voiceSession.mute", "Turn the microphone off")
162
+ }), t = Z ? /* @__PURE__ */ f("button", {
152
163
  type: "button",
153
- onClick: E ? X.imDone : X.letMeFinish,
154
- 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 ${z ? "h-7 px-3 text-xs" : R ? "h-11 px-6 text-base" : "h-9 px-4 text-sm"} ${E ? "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"}`,
155
- title: E ? j("voiceSession.imDoneHint", "Send what you said now") : j("voiceSession.letMeFinishHint", "Pause sending until you tap “I’m done”"),
164
+ onClick: D ? Z.imDone : Z.letMeFinish,
165
+ 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 ${B ? "h-7 px-3 text-xs" : z ? "h-11 px-6 text-base" : "h-9 px-4 text-sm"} ${D ? "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"}`,
166
+ title: D ? M("voiceSession.imDoneHint", "Send what you said now") : M("voiceSession.letMeFinishHint", "Pause sending until you tap “I’m done”"),
156
167
  "data-testid": "assistant-voice-hold",
157
- "data-holding": E ? "true" : "false",
158
- children: E ? j("voiceSession.imDone", "I’m done") : j("voiceSession.letMeFinish", "Let me finish")
168
+ "data-holding": D ? "true" : "false",
169
+ children: D ? M("voiceSession.imDone", "I’m done") : M("voiceSession.letMeFinish", "Let me finish")
159
170
  }) : null, n = t ? /* @__PURE__ */ p("div", {
160
171
  className: "flex flex-col items-center gap-2",
161
172
  children: [e, t]
162
- }) : e, i = ee(Z) ? _ : Y || null, a = N === null ? null : be(N, j);
163
- return z ? /* @__PURE__ */ f(le, {
164
- spokenChunks: w,
165
- state: Z,
173
+ }) : e, i = ee(Q) ? v : X || null, a = P === null ? null : ye(P, M);
174
+ return B ? /* @__PURE__ */ f(le, {
175
+ spokenChunks: T,
176
+ state: Q,
166
177
  caption: i,
167
- statusText: ze,
168
- statusSuffix: Q,
169
- rotateStatus: $,
178
+ statusText: Re,
179
+ statusSuffix: $,
180
+ rotateStatus: ze,
170
181
  errorText: a,
171
182
  control: n
172
183
  }) : /* @__PURE__ */ f(ue, {
173
- state: Z,
174
- userCaption: Y || null,
175
- spokenChunks: w,
176
- assistantCaption: _,
177
- expanded: R,
178
- statusText: ze,
179
- statusSuffix: Q,
180
- rotateStatus: $,
184
+ state: Q,
185
+ userCaption: X || null,
186
+ spokenChunks: T,
187
+ assistantCaption: v,
188
+ expanded: z,
189
+ statusText: Re,
190
+ statusSuffix: $,
191
+ rotateStatus: ze,
181
192
  errorText: a,
182
193
  control: n
183
194
  });
184
195
  })(),
185
- k && !U ? /* @__PURE__ */ f("div", {
186
- className: z ? "absolute left-20 right-36 top-2 flex justify-center" : `flex w-full justify-center ${R ? "max-w-[calc(100%-12rem)]" : "max-w-[calc(100%-8rem)]"}`,
196
+ A && !W ? /* @__PURE__ */ f("div", {
197
+ className: B ? "absolute left-20 right-36 top-2 flex justify-center" : `flex w-full justify-center ${z ? "max-w-[calc(100%-12rem)]" : "max-w-[calc(100%-8rem)]"}`,
187
198
  children: /* @__PURE__ */ f("button", {
188
199
  type: "button",
189
200
  onClick: () => {
190
- I("panel"), k.onOpen();
201
+ L("panel"), A.onOpen();
191
202
  },
192
- 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 ${z ? "h-8 px-3 text-xs" : "h-10 px-4 text-sm"}`,
203
+ 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 ${B ? "h-8 px-3 text-xs" : "h-10 px-4 text-sm"}`,
193
204
  "data-testid": "assistant-voice-proposal-chip",
194
- children: k.label
205
+ children: A.label
195
206
  })
196
207
  }) : null,
197
- A && U ? /* @__PURE__ */ p("div", {
198
- className: `absolute z-10 flex flex-col gap-2 overflow-y-auto rounded-lg border border-border-subtle bg-bg-elevated shadow-lg ${R ? "inset-x-6 bottom-24 top-24 mx-auto max-w-xl p-4" : "inset-x-3 bottom-16 top-16 p-3"}`,
208
+ j && W ? /* @__PURE__ */ p("div", {
209
+ className: `absolute z-10 flex flex-col gap-2 overflow-y-auto rounded-lg border border-border-subtle bg-bg-elevated shadow-lg ${z ? "inset-x-6 bottom-24 top-24 mx-auto max-w-xl p-4" : "inset-x-3 bottom-16 top-16 p-3"}`,
199
210
  "data-testid": "assistant-voice-proposal-tray",
200
211
  children: [/* @__PURE__ */ f("div", {
201
212
  className: "flex justify-end",
202
213
  children: /* @__PURE__ */ f("button", {
203
214
  type: "button",
204
- onClick: A.onClose,
215
+ onClick: j.onClose,
205
216
  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",
206
- "aria-label": A.closeLabel,
217
+ "aria-label": j.closeLabel,
207
218
  "data-testid": "assistant-voice-proposal-tray-close",
208
219
  children: /* @__PURE__ */ f(d, {
209
220
  className: "size-4",
210
221
  "aria-hidden": "true"
211
222
  })
212
223
  })
213
- }), A.content]
224
+ }), j.content]
214
225
  }) : null,
215
- g ? /* @__PURE__ */ f(me, {
216
- view: L,
217
- onContinue: g.accept,
218
- onNotNow: g.decline
226
+ _ ? /* @__PURE__ */ f(me, {
227
+ view: R,
228
+ onContinue: _.accept,
229
+ onNotNow: _.decline
219
230
  }) : null,
220
- V ? /* @__PURE__ */ f(de, {
221
- turns: xe,
222
- onClose: () => H(!1),
223
- onSave: Se,
224
- onContinueInChat: Ce,
225
- renderAfterTurn: Me
231
+ H ? /* @__PURE__ */ f(de, {
232
+ turns: be,
233
+ onClose: () => U(!1),
234
+ onSave: xe,
235
+ onContinueInChat: Se,
236
+ renderAfterTurn: je
226
237
  }) : null,
227
- b ? /* @__PURE__ */ f("div", {
228
- className: `absolute ${R ? "left-6 top-6" : z ? "left-11 top-2" : "left-3 top-3"}`,
238
+ x ? /* @__PURE__ */ f("div", {
239
+ className: `absolute ${z ? "left-6 top-6" : B ? "left-11 top-2" : "left-3 top-3"}`,
229
240
  children: /* @__PURE__ */ f(re, {
230
241
  onFiles: (e) => {
231
- b(e), I((e) => e === "mini" ? "panel" : e);
242
+ x(e), L((e) => e === "mini" ? "panel" : e);
232
243
  },
233
- onPickerOpen: Pe,
244
+ onPickerOpen: Ne,
234
245
  direction: "down",
235
- canAddMore: De,
236
- disabled: S
246
+ canAddMore: Ee,
247
+ disabled: C
237
248
  })
238
249
  }) : null,
239
- (y.length > 0 || x > 0) && !z ? /* @__PURE__ */ f("div", {
240
- className: `absolute ${R ? "bottom-24 left-24 right-24" : "bottom-16 left-16 right-16"}`,
250
+ (b.length > 0 || S > 0) && !B ? /* @__PURE__ */ f("div", {
251
+ className: `absolute ${z ? "bottom-24 left-24 right-24" : "bottom-16 left-16 right-16"}`,
241
252
  "data-testid": "assistant-voice-attachments",
242
253
  children: /* @__PURE__ */ f(ie, {
243
- attachments: y,
244
- onRemove: Te ?? (() => void 0),
245
- onRetry: Ee ?? (() => void 0),
246
- preparingCount: x,
247
- disabled: S
254
+ attachments: b,
255
+ onRemove: we ?? (() => void 0),
256
+ onRetry: Te ?? (() => void 0),
257
+ preparingCount: S,
258
+ disabled: C
248
259
  })
249
260
  }) : null,
250
261
  /* @__PURE__ */ f("button", {
251
262
  type: "button",
252
- onClick: () => H((e) => !e),
253
- className: `absolute ${R ? "bottom-6 right-6 size-14" : z ? "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`,
254
- "aria-pressed": V,
255
- "aria-label": j("voiceSession.transcriptTitle", "Voice transcript"),
263
+ onClick: () => U((e) => !e),
264
+ className: `absolute ${z ? "bottom-6 right-6 size-14" : B ? "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`,
265
+ "aria-pressed": H,
266
+ "aria-label": M("voiceSession.transcriptTitle", "Voice transcript"),
256
267
  "data-testid": "assistant-voice-transcript-toggle",
257
- children: /* @__PURE__ */ f(ve, { className: R ? "size-6" : z ? "size-4" : "size-5" })
268
+ children: /* @__PURE__ */ f(ve, { className: z ? "size-6" : B ? "size-4" : "size-5" })
258
269
  }),
259
270
  /* @__PURE__ */ f("button", {
260
271
  type: "button",
261
- onClick: () => I(B),
262
- className: `absolute ${R ? "bottom-6 left-6 size-14" : z ? "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`,
263
- "aria-label": B === "panel" ? j("voiceSession.expandPanel", "Show the conversation in the panel") : B === "full" ? j("voiceSession.expand", "Expand the conversation to full screen") : j("voiceSession.collapse", "Shrink to the compact controller"),
272
+ onClick: () => L(V),
273
+ className: `absolute ${z ? "bottom-6 left-6 size-14" : B ? "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`,
274
+ "aria-label": V === "panel" ? M("voiceSession.expandPanel", "Show the conversation in the panel") : V === "full" ? M("voiceSession.expand", "Expand the conversation to full screen") : M("voiceSession.collapse", "Shrink to the compact controller"),
264
275
  "data-testid": "assistant-voice-expand",
265
- children: R ? /* @__PURE__ */ f(_e, { className: "size-5" }) : /* @__PURE__ */ f(ge, { className: z ? "size-4" : "size-5" })
276
+ children: z ? /* @__PURE__ */ f(_e, { className: "size-5" }) : /* @__PURE__ */ f(ge, { className: B ? "size-4" : "size-5" })
266
277
  })
267
278
  ]
268
279
  });
269
280
  };
270
- function ye(e, t) {
281
+ function h(e, t) {
271
282
  switch (e) {
272
283
  case "network": return t("voiceSession.noticeNetwork", "Speech recognition lost its connection. Check your network — it will retry.");
273
284
  case "not-capturing": return t("voiceSession.noticeNotCapturing", "The microphone did not start. Check that this site is allowed to use it, then try again.");
@@ -275,10 +286,11 @@ function ye(e, t) {
275
286
  case "nothing-heard": return t("voiceSession.noticeNothingHeard", "Nothing heard yet. Check your microphone is not muted or in use by another app.");
276
287
  case "hands-free-nothing-heard": return t("voiceSession.noticeHandsFreeNothingHeard", "Stopped, but I did not catch that. Say it again, or tap to replay.");
277
288
  case "hands-free-fallback": return t("voiceSession.noticeHandsFreeFallback", "Hands-free interrupt turned itself off for this conversation. Tap to interrupt still works.");
289
+ case "reply-not-heard": return t("voiceSession.noticeReplyNotHeard", "That reply was not read aloud: earlier audio may still be playing. Read it in the transcript.");
278
290
  default: return e;
279
291
  }
280
292
  }
281
- function be(e, t) {
293
+ function ye(e, t) {
282
294
  switch (e) {
283
295
  case "mic-denied": return t("voiceSession.micDenied", "Microphone access is blocked. Allow it in your browser settings to talk.");
284
296
  case "no-speech-support": return t("voiceSession.noSpeechSupport", "This browser cannot listen. Try a different browser, or type instead.");