@burdenoff/fe-libs 2026.1115.13 → 2026.1116.2

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.
Files changed (57) hide show
  1. package/dist/shared/assistant/history/useHistoryRowControls.d.ts +16 -0
  2. package/dist/shared/assistant/history/useHistoryRowControls.js +38 -14
  3. package/dist/shared/assistant/i18nManifest.d.ts +9 -0
  4. package/dist/shared/assistant/i18nManifest.js +9 -0
  5. package/dist/shared/assistant/index.d.ts +2 -0
  6. package/dist/shared/assistant/ui/AIAssistantPanel.d.ts +16 -0
  7. package/dist/shared/assistant/ui/AIAssistantPanel.js +247 -223
  8. package/dist/shared/assistant/ui/AssistantChatArea.js +1355 -1347
  9. package/dist/shared/assistant/ui/AssistantOverlay.d.ts +6 -0
  10. package/dist/shared/assistant/ui/AssistantOverlay.js +4 -2
  11. package/dist/shared/assistant/ui/AssistantPageHost.d.ts +14 -1
  12. package/dist/shared/assistant/ui/AssistantPageHost.js +32 -19
  13. package/dist/shared/assistant/ui/AssistantRenameConversationDialog.d.ts +33 -0
  14. package/dist/shared/assistant/ui/AssistantRenameConversationDialog.js +70 -0
  15. package/dist/shared/assistant/ui/assistantPageBar.d.ts +33 -0
  16. package/dist/shared/assistant/ui/assistantPageBar.js +53 -0
  17. package/dist/shared/assistant/ui/assistantPageLayout.d.ts +20 -0
  18. package/dist/shared/assistant/ui/assistantPageLayout.js +10 -2
  19. package/dist/shared/assistant/ui/assistantPageStart.d.ts +17 -0
  20. package/dist/shared/assistant/ui/assistantPageStart.js +7 -4
  21. package/dist/shared/assistant/ui/compact/AssistantConversationMenu.d.ts +30 -0
  22. package/dist/shared/assistant/ui/compact/AssistantConversationMenu.js +174 -53
  23. package/dist/shared/assistant/ui/compact/AssistantPageBar.d.ts +19 -0
  24. package/dist/shared/assistant/ui/compact/AssistantPageBar.js +24 -19
  25. package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +2 -0
  26. package/dist/shared/assistant/ui/composer/AssistantComposer.js +347 -340
  27. package/dist/shared/assistant/ui/composer/AssistantDictation.d.ts +5 -0
  28. package/dist/shared/assistant/ui/composer/AssistantDictation.js +41 -40
  29. package/dist/shared/assistant/ui/composer/pageBoxClass.d.ts +28 -1
  30. package/dist/shared/assistant/ui/composer/pageBoxClass.js +17 -1
  31. package/dist/shared/assistant/ui/conversationDeleteDialog.d.ts +14 -4
  32. package/dist/shared/assistant/ui/conversationDeleteDialog.js +7 -6
  33. package/dist/shared/assistant/ui/voice/AssistantVoiceSessionButton.js +1 -1
  34. package/dist/shared/assistant/ui/voice/LiveWaveform.js +1 -1
  35. package/dist/shared/events/index.d.ts +7 -2
  36. package/dist/shared/events/sinks/OtelBrowserSink.d.ts +5 -0
  37. package/dist/shared/events/sinks/WebVitalsSink.d.ts +25 -0
  38. package/dist/shared/events/sinks/WebVitalsSink.js +51 -0
  39. package/dist/shared/events/sinks/index.d.ts +3 -0
  40. package/dist/shared/events/sinks/index.js +2 -1
  41. package/dist/shared/index.d.ts +1 -0
  42. package/dist/shared/providers/AppShellProvider.d.ts +16 -0
  43. package/dist/shared/providers/AppShellProvider.js +291 -292
  44. package/dist/shared/providers/shell/ObservabilityProvider.d.ts +6 -6
  45. package/dist/shared/rum/context.d.ts +24 -0
  46. package/dist/shared/rum/context.js +40 -0
  47. package/dist/shared/rum/index.d.ts +14 -0
  48. package/dist/shared/rum/mount.d.ts +12 -0
  49. package/dist/shared/rum/mount.js +5 -0
  50. package/dist/shared/rum/reporter.d.ts +22 -0
  51. package/dist/shared/rum/reporter.js +166 -0
  52. package/dist/shared/rum/types.d.ts +56 -0
  53. package/dist/shared-assistant.js +256 -254
  54. package/dist/shared-events.js +29 -28
  55. package/dist/shared.js +78 -74
  56. package/dist/ui/glass-card.d.ts +1 -1
  57. package/package.json +1 -1
@@ -15,142 +15,148 @@ import { AssistantFocusChip as oe } from "./AssistantFocusChip.js";
15
15
  import { useAskAboutStore as se } from "../../askAbout/askAboutStore.js";
16
16
  import { AssistantVoiceButton as ce, ListeningDot as le } from "./AssistantVoiceButton.js";
17
17
  import { AssistantVoiceSessionButton as ue } from "../voice/AssistantVoiceSessionButton.js";
18
- import { pageBoxClass as de } from "./pageBoxClass.js";
19
- import { useCompactDictation as fe } from "./useCompactDictation.js";
20
- import { DictationControls as pe, DictationLiveText as me, MicBlockedNotice as he } from "./AssistantDictation.js";
21
- import { AssistantMicMenu as ge } from "./AssistantMicMenu.js";
22
- import { AssistantModeSelector as _e } from "./AssistantModeSelector.js";
23
- import { AssistantModeMenu as ve } from "./AssistantModeMenu.js";
24
- import { AssistantViewSwitchRow as ye } from "../compact/AssistantViewSwitchRow.js";
25
- import { compactEnterSends as be, isImeComposingEnter as xe } from "./imeEnter.js";
26
- import { PAGE_COLUMN as Se, useAssistantPageLayout as Ce } from "../assistantPageLayout.js";
27
- import { useCallback as s, useEffect as c, useId as l, useLayoutEffect as we, useMemo as Te, useRef as u, useState as d } from "react";
28
- import { ArrowUp as Ee, Loader2 as De, Square as Oe } from "lucide-react";
29
- import { Fragment as ke, jsx as f, jsxs as p } from "react/jsx-runtime";
18
+ import { pageBoxClass as de, pageFieldClasses as fe } from "./pageBoxClass.js";
19
+ import { useCompactDictation as pe } from "./useCompactDictation.js";
20
+ import { DictationControls as me, DictationLiveText as he, MicBlockedNotice as ge } from "./AssistantDictation.js";
21
+ import { AssistantMicMenu as _e } from "./AssistantMicMenu.js";
22
+ import { AssistantModeSelector as ve } from "./AssistantModeSelector.js";
23
+ import { AssistantModeMenu as ye } from "./AssistantModeMenu.js";
24
+ import { AssistantViewSwitchRow as be } from "../compact/AssistantViewSwitchRow.js";
25
+ import { compactEnterSends as xe, isImeComposingEnter as Se } from "./imeEnter.js";
26
+ import { PAGE_COLUMN as Ce, useAssistantPageBox as we, useAssistantPageLayout as Te, useAssistantTallBox as Ee } from "../assistantPageLayout.js";
27
+ import { useCallback as s, useEffect as c, useId as De, useLayoutEffect as Oe, useMemo as ke, useRef as l, useState as u } from "react";
28
+ import { ArrowUp as Ae, Loader2 as d, Square as je } from "lucide-react";
29
+ import { Fragment as Me, jsx as f, jsxs as p } from "react/jsx-runtime";
30
30
  // src/shared/assistant/ui/composer/AssistantComposer.tsx
31
- var Ae = 200;
32
- function je(e) {
31
+ var Ne = 200;
32
+ function Pe(e) {
33
33
  if (!e) return !1;
34
34
  let t = e.ownerDocument.activeElement;
35
35
  return !t || t === e.ownerDocument.body ? !1 : e.contains(t) ? !0 : e.closest("[data-assistant-panel]")?.contains(t) ?? !1;
36
36
  }
37
- var Me = ({ children: e }) => e(l()), m = ({ writeAccessDenied: l = !1, onSend: m, disabled: Ne = !1, readOnly: Pe = !1, placeholder: Fe, mode: Ie, availableModes: h, attachmentCharsPerFile: Le, onModeChange: Re, auto: ze, onStartVoiceSession: g, onDraftStart: Be, onDraftChange: Ve, suspendDictation: He = !1, entrance: Ue = !1, onVoiceStateChange: We, presentation: Ge = "classic", turnInFlight: _ = !1, onStop: Ke, turnId: qe, modeDisabledReason: Je = null, inputRef: v, aboveCard: Ye, viewSwitch: Xe, modeReadOnly: Ze = !1, voiceSessionActive: y = !1, concealed: Qe = !1 }) => {
38
- let b = r(), x = Ce(), { locale: S } = n(), C = Ne || Pe, w = Ge === "compact", T = u(null), $e = s((e) => {
39
- T.current = e, typeof v == "function" ? v(e) : v && (v.current = e);
40
- }, [v]), [E, D] = d(""), [O, et] = d(!1), [k, tt] = d(!1), nt = u(!1), [A, j] = d(null), [rt, M] = d(null), [N, P] = d(null), [it, at] = d(_);
41
- it === _ ? N !== null && _ && qe != null && qe !== N && P(null) : (at(_), _ ? (M(null), P(null)) : N !== null && (M(N), P(null)));
42
- let ot = u(!1), F = u(null), st = u(!1), ct = u(!1), lt = u(null), I = u(!1), L = u(0), { attachments: R, isBusy: ut, preparingCount: dt, sendBlocker: ft, rejection: pt, addFiles: z, remove: mt, retry: ht, clear: gt, clearRejection: _t, canAddMore: vt, commit: yt, cancelCommit: bt } = te({ perFileChars: Le }), B = E.trim() !== "" || R.length > 0, xt = u(!1), V = u(!1);
37
+ var Fe = ({ children: e }) => e(De()), m = ({ writeAccessDenied: De = !1, onSend: m, disabled: Ie = !1, readOnly: Le = !1, placeholder: Re, mode: ze, availableModes: h, attachmentCharsPerFile: Be, onModeChange: Ve, auto: He, onStartVoiceSession: g, onDraftStart: Ue, onDraftChange: We, suspendDictation: Ge = !1, entrance: Ke = !1, onVoiceStateChange: qe, presentation: Je = "classic", turnInFlight: _ = !1, onStop: Ye, turnId: Xe, modeDisabledReason: Ze = null, inputRef: v, aboveCard: Qe, viewSwitch: $e, modeReadOnly: et = !1, voiceSessionActive: tt = !1, concealed: nt = !1 }) => {
38
+ let y = r(), rt = Te(), b = we(), it = Ee(), { locale: x } = n(), S = Ie || Le, C = Je === "compact", w = l(null), at = s((e) => {
39
+ w.current = e, typeof v == "function" ? v(e) : v && (v.current = e);
40
+ }, [v]), [T, E] = u(""), [D, ot] = u(!1), [O, st] = u(!1), ct = l(!1), [k, A] = u(null), [lt, j] = u(null), [M, N] = u(null), [ut, dt] = u(_);
41
+ ut === _ ? M !== null && _ && Xe != null && Xe !== M && N(null) : (dt(_), _ ? (j(null), N(null)) : M !== null && (j(M), N(null)));
42
+ let ft = l(!1), P = l(null), pt = l(!1), mt = l(!1), ht = l(null), F = l(!1), I = l(0), { attachments: L, isBusy: gt, preparingCount: _t, sendBlocker: vt, rejection: yt, addFiles: R, remove: bt, retry: xt, clear: St, clearRejection: Ct, canAddMore: wt, commit: Tt, cancelCommit: Et } = te({ perFileChars: Be }), z = T.trim() !== "" || L.length > 0, Dt = l(!1), B = l(!1);
43
43
  c(() => {
44
- B && !xt.current ? (xt.current = !0, Be?.()) : B || (xt.current = !1);
45
- }, [B, Be]), c(() => {
46
- B || (V.current = !1), Ve?.({
47
- text: E,
48
- hasAttachments: R.length > 0,
49
- dictated: V.current
44
+ z && !Dt.current ? (Dt.current = !0, Ue?.()) : z || (Dt.current = !1);
45
+ }, [z, Ue]), c(() => {
46
+ z || (B.current = !1), We?.({
47
+ text: T,
48
+ hasAttachments: L.length > 0,
49
+ dictated: B.current
50
50
  });
51
51
  }, [
52
- E,
53
- R.length,
54
- B,
55
- Ve
52
+ T,
53
+ L.length,
54
+ z,
55
+ We
56
56
  ]);
57
- let H = s((e) => {
58
- V.current = !0, D((t) => t ? `${t.replace(/\s+$/, "")} ${e}` : e);
59
- }, []), St = a((e) => e.assistantLanguage), Ct = Te(() => ee(St, S), [St, S]), wt = u(H), Tt = u(() => void 0), Et = a((e) => e.micDeviceId), U = o({
60
- onFinalize: (e) => wt.current(e),
61
- onEnded: () => Tt.current(),
62
- language: Ct.tag,
63
- deviceId: Et
64
- }), Dt = s(() => {
65
- V.current = !0;
66
- }, []), W = fe({
67
- enabled: w,
68
- voice: U,
69
- text: E,
70
- setText: D,
71
- textareaRef: T,
72
- markDictated: Dt,
73
- deviceId: Et
74
- }), Ot = W.addFinal;
57
+ let V = s((e) => {
58
+ B.current = !0, E((t) => t ? `${t.replace(/\s+$/, "")} ${e}` : e);
59
+ }, []), Ot = a((e) => e.assistantLanguage), kt = ke(() => ee(Ot, x), [Ot, x]), At = l(V), jt = l(() => void 0), Mt = a((e) => e.micDeviceId), H = o({
60
+ onFinalize: (e) => At.current(e),
61
+ onEnded: () => jt.current(),
62
+ language: kt.tag,
63
+ deviceId: Mt
64
+ }), Nt = s(() => {
65
+ B.current = !0;
66
+ }, []), U = pe({
67
+ enabled: C,
68
+ voice: H,
69
+ text: T,
70
+ setText: E,
71
+ textareaRef: w,
72
+ markDictated: Nt,
73
+ deviceId: Mt
74
+ }), Pt = U.addFinal;
75
75
  c(() => {
76
- wt.current = w ? Ot : H;
76
+ At.current = C ? Pt : V;
77
77
  }, [
78
- w,
79
- Ot,
80
- H
78
+ C,
79
+ Pt,
80
+ V
81
81
  ]);
82
- let kt = W.recogniserEnded;
82
+ let Ft = U.recogniserEnded;
83
83
  c(() => {
84
- Tt.current = w ? kt : () => void 0;
85
- }, [w, kt]);
86
- let G = U.isActive, At = U.interim, jt = U.stop, Mt = W.keepAndStop;
84
+ jt.current = C ? Ft : () => void 0;
85
+ }, [C, Ft]);
86
+ let W = H.isActive, It = H.interim, Lt = H.stop, Rt = U.keepAndStop;
87
87
  c(() => {
88
- He && G && (w ? Mt() : (At.trim() !== "" && H(At.trim()), jt()));
88
+ Ge && W && (C ? Rt() : (It.trim() !== "" && V(It.trim()), Lt()));
89
89
  }, [
90
- He,
91
- G,
92
- At,
93
- jt,
94
- H,
95
- w,
96
- Mt
90
+ Ge,
91
+ W,
92
+ It,
93
+ Lt,
94
+ V,
95
+ C,
96
+ Rt
97
97
  ]), c(() => {
98
- We?.({
99
- committing: k,
100
- dictating: G
98
+ qe?.({
99
+ committing: O,
100
+ dictating: W
101
101
  });
102
102
  }, [
103
- We,
104
- k,
105
- G
103
+ qe,
104
+ O,
105
+ W
106
106
  ]);
107
- let Nt = se((e) => e.pending), Pt = Nt ? b("askAbout.placeholder", "Ask about {{name}}…", { name: Nt.label }) : Fe ?? b("composer.placeholder", "Ask me anything…"), Ft = se((e) => e.focusRequested), It = (e) => {
108
- D(e), requestAnimationFrame(() => {
109
- let t = T.current;
107
+ let zt = se((e) => e.pending), Bt = zt ? y("askAbout.placeholder", "Ask about {{name}}…", { name: zt.label }) : Re ?? y("composer.placeholder", "Ask me anything…"), Vt = se((e) => e.focusRequested), Ht = (e) => {
108
+ E(e), requestAnimationFrame(() => {
109
+ let t = w.current;
110
110
  t && (t.focus({ preventScroll: !0 }), t.setSelectionRange(e.length, e.length));
111
111
  });
112
112
  };
113
113
  c(() => {
114
- if (!Ft || C) return;
115
- let e = T.current;
114
+ if (!Vt || S) return;
115
+ let e = w.current;
116
116
  e && (e.focus({ preventScroll: !0 }), se.getState().actions.composerFocused());
117
- }, [Ft, C]);
118
- let K = E.trim(), q = ne(R), Lt = R.filter((e) => e.status === "error"), J = (K.length > 0 || q.length > 0) && !C && !k && ft === null, Rt = q.some((e) => !(e.fileId && e.downloadUrl) && !e.inlineOnly), zt = u(C);
119
- zt.current = C;
120
- let Y = u(!0);
121
- c(() => (Y.current = !0, () => {
122
- Y.current = !1;
123
- }), []), we(() => {
124
- let e = T.current;
125
- e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, Ae)}px`);
126
- }, [E]);
117
+ }, [Vt, S]);
118
+ let G = T.trim(), K = ne(L), Ut = L.filter((e) => e.status === "error"), q = (G.length > 0 || K.length > 0) && !S && !O && vt === null, Wt = K.some((e) => !(e.fileId && e.downloadUrl) && !e.inlineOnly), Gt = l(S);
119
+ Gt.current = S;
120
+ let J = l(!0);
121
+ c(() => (J.current = !0, () => {
122
+ J.current = !1;
123
+ }), []);
124
+ let Kt = C && it ? Ke ? "start" : "chat" : null, Y = C && H.isSupported && !tt && U.phase !== "idle";
125
+ Oe(() => {
126
+ let e = w.current;
127
+ e && !Y && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, Ne)}px`);
128
+ }, [
129
+ T,
130
+ Kt,
131
+ Y
132
+ ]);
127
133
  let X = s(async () => {
128
- if (!J || nt.current) return;
129
- U.isActive && U.stop();
130
- let e = E.trim();
131
- j(null);
132
- let t = w && je(lt.current);
133
- if (!Rt) {
134
- I.current = t, m(e, q), D(""), gt();
134
+ if (!q || ct.current) return;
135
+ H.isActive && H.stop();
136
+ let e = T.trim();
137
+ A(null);
138
+ let t = C && Pe(ht.current);
139
+ if (!Wt) {
140
+ F.current = t, m(e, K), E(""), St();
135
141
  return;
136
142
  }
137
143
  let n = a.getState().activeConversationId;
138
- nt.current = !0, tt(!0);
144
+ ct.current = !0, st(!0);
139
145
  try {
140
- let r = await yt();
141
- if (!Y.current) {
146
+ let r = await Tt();
147
+ if (!J.current) {
142
148
  r.ok && await r.rollback();
143
149
  return;
144
150
  }
145
151
  if (!r.ok) {
146
- r.cancelled || j({
152
+ r.cancelled || A({
147
153
  kind: "failed",
148
154
  failures: r.failures
149
155
  });
150
156
  return;
151
157
  }
152
- if (zt.current) {
153
- await r.rollback(), Y.current && j({
158
+ if (Gt.current) {
159
+ await r.rollback(), J.current && A({
154
160
  kind: "busy",
155
161
  failures: []
156
162
  });
@@ -158,200 +164,200 @@ var Me = ({ children: e }) => e(l()), m = ({ writeAccessDenied: l = !1, onSend:
158
164
  }
159
165
  let i = a.getState();
160
166
  if (i.activeConversationId !== n || n !== null && !i.conversations.some((e) => e.id === n)) {
161
- await r.rollback(), Y.current && j({
167
+ await r.rollback(), J.current && A({
162
168
  kind: "moved",
163
169
  failures: []
164
170
  });
165
171
  return;
166
172
  }
167
- I.current = t, m(e, ne(r.attachments)), r.handedOver(), D(""), gt();
173
+ F.current = t, m(e, ne(r.attachments)), r.handedOver(), E(""), St();
168
174
  } finally {
169
- nt.current = !1, Y.current && tt(!1);
175
+ ct.current = !1, J.current && st(!1);
170
176
  }
171
177
  }, [
172
- J,
173
- Rt,
174
- yt,
175
- m,
176
- E,
177
178
  q,
178
- gt,
179
- U,
180
- w
181
- ]), Bt = s(() => {
182
- bt(), T.current?.focus();
183
- }, [bt]), Z = s(() => {
184
- zt.current ? ot.current = !0 : T.current?.focus();
185
- }, []), Vt = s(() => {
186
- if (ct.current) return;
187
- let e = Ke?.() ?? null;
188
- e !== null && (ct.current = !0, P(e)), Z();
189
- }, [Ke, Z]);
179
+ Wt,
180
+ Tt,
181
+ m,
182
+ T,
183
+ K,
184
+ St,
185
+ H,
186
+ C
187
+ ]), qt = s(() => {
188
+ Et(), w.current?.focus();
189
+ }, [Et]), Z = s(() => {
190
+ Gt.current ? ft.current = !0 : w.current?.focus();
191
+ }, []), Jt = s(() => {
192
+ if (mt.current) return;
193
+ let e = Ye?.() ?? null;
194
+ e !== null && (mt.current = !0, N(e)), Z();
195
+ }, [Ye, Z]);
190
196
  c(() => {
191
- !C && ot.current && (ot.current = !1, T.current?.focus());
192
- }, [C]);
193
- let Ht = s((e) => {
197
+ !S && ft.current && (ft.current = !1, w.current?.focus());
198
+ }, [S]);
199
+ let Yt = s((e) => {
194
200
  if (e !== null) {
195
- F.current = e;
201
+ P.current = e;
196
202
  return;
197
203
  }
198
- let t = F.current;
199
- F.current = null, t !== null && t.ownerDocument.activeElement === t && (st.current = !0);
200
- }, []), Q = w && _ && Ke !== void 0;
201
- we(() => {
202
- !Q && st.current && (st.current = !1, Z());
204
+ let t = P.current;
205
+ P.current = null, t !== null && t.ownerDocument.activeElement === t && (pt.current = !0);
206
+ }, []), Q = C && _ && Ye !== void 0;
207
+ Oe(() => {
208
+ !Q && pt.current && (pt.current = !1, Z());
203
209
  }, [Q, Z]), c(() => {
204
- N === null && (ct.current = !1);
205
- }, [N]), we(() => {
210
+ M === null && (mt.current = !1);
211
+ }, [M]), Oe(() => {
206
212
  if (!Q) return;
207
- let e = I.current;
208
- if (I.current = !1, !e) return;
209
- let t = F.current;
213
+ let e = F.current;
214
+ if (F.current = !1, !e) return;
215
+ let t = P.current;
210
216
  if (t === null) return;
211
217
  let n = t.ownerDocument, r = n.activeElement;
212
- (r === null || r === n.body || r === T.current) && t.focus({ preventScroll: !0 });
218
+ (r === null || r === n.body || r === w.current) && t.focus({ preventScroll: !0 });
213
219
  }, [Q]);
214
- let Ut = s((e) => {
215
- D(e), M(null);
220
+ let Xt = s((e) => {
221
+ E(e), j(null);
216
222
  }, []);
217
223
  c(() => {
218
- j(null);
219
- }, [R.length]);
220
- let Wt = (t) => {
221
- if (t.kind === "busy") return b("attachments.saveBusy", "The assistant started another reply, so nothing was sent. Your message and files are still here.");
222
- if (t.kind === "moved") return b("attachments.saveMoved", "You switched conversations while the files were being saved, so nothing was sent. Your message and files are still here.");
224
+ A(null);
225
+ }, [L.length]);
226
+ let Zt = (t) => {
227
+ if (t.kind === "busy") return y("attachments.saveBusy", "The assistant started another reply, so nothing was sent. Your message and files are still here.");
228
+ if (t.kind === "moved") return y("attachments.saveMoved", "You switched conversations while the files were being saved, so nothing was sent. Your message and files are still here.");
223
229
  let { failures: n } = t;
224
- if (n.some((e) => e.code === re.editorAccessRequired)) return e(b, S);
225
- if (n.some((e) => e.code === re.quotaExceeded || e.code === re.quotaNotProvisioned)) return `${b("attachments.quotaFull", "File storage is full or not set up for this workspace, so the attachments couldn't be saved. Nothing was sent.")} ${b("attachments.retrySend", "Press Send to try again, or remove the file.")}`;
226
- let r = n[0], i = R.find((e) => e.id === r?.id)?.filename ?? "";
227
- return `${n.length <= 1 ? b("attachments.saveFailedOne", "{{name}} couldn't be saved, so nothing was sent.", { name: i }) : b("attachments.saveFailedMany", "{{count}} attachments couldn't be saved, so nothing was sent.", { count: n.length })} ${b("attachments.retrySend", "Press Send to try again, or remove the file.")}`;
228
- }, Gt = s((e) => {
230
+ if (n.some((e) => e.code === re.editorAccessRequired)) return e(y, x);
231
+ if (n.some((e) => e.code === re.quotaExceeded || e.code === re.quotaNotProvisioned)) return `${y("attachments.quotaFull", "File storage is full or not set up for this workspace, so the attachments couldn't be saved. Nothing was sent.")} ${y("attachments.retrySend", "Press Send to try again, or remove the file.")}`;
232
+ let r = n[0], i = L.find((e) => e.id === r?.id)?.filename ?? "";
233
+ return `${n.length <= 1 ? y("attachments.saveFailedOne", "{{name}} couldn't be saved, so nothing was sent.", { name: i }) : y("attachments.saveFailedMany", "{{count}} attachments couldn't be saved, so nothing was sent.", { count: n.length })} ${y("attachments.retrySend", "Press Send to try again, or remove the file.")}`;
234
+ }, Qt = s((e) => {
229
235
  e.key === "Enter" && !e.shiftKey && (e.preventDefault(), X());
230
- }, [X]), Kt = s((e) => {
231
- e.key === "Escape" ? xe(e) && e.stopPropagation() : be(e) && (e.preventDefault(), M(null), X());
232
- }, [X]), qt = s((e) => {
236
+ }, [X]), $t = s((e) => {
237
+ e.key === "Escape" ? Se(e) && e.stopPropagation() : xe(e) && (e.preventDefault(), j(null), X());
238
+ }, [X]), en = s((e) => {
233
239
  let t = Array.from(e.clipboardData?.files ?? []);
234
- t.length !== 0 && (e.preventDefault(), z(t));
235
- }, [z]), Jt = s((e) => {
236
- Array.from(e.dataTransfer?.types ?? []).includes("Files") && (L.current += 1, et(!0));
237
- }, []), Yt = s(() => {
238
- L.current = Math.max(0, L.current - 1), L.current === 0 && et(!1);
239
- }, []), Xt = s((e) => {
240
+ t.length !== 0 && (e.preventDefault(), R(t));
241
+ }, [R]), tn = s((e) => {
242
+ Array.from(e.dataTransfer?.types ?? []).includes("Files") && (I.current += 1, ot(!0));
243
+ }, []), nn = s(() => {
244
+ I.current = Math.max(0, I.current - 1), I.current === 0 && ot(!1);
245
+ }, []), rn = s((e) => {
240
246
  Array.from(e.dataTransfer?.types ?? []).includes("Files") && e.preventDefault();
241
- }, []), Zt = s((e) => {
242
- e.preventDefault(), L.current = 0, et(!1), z(e.dataTransfer?.files ?? null);
243
- }, [z]), Qt = (e) => {
247
+ }, []), an = s((e) => {
248
+ e.preventDefault(), I.current = 0, ot(!1), R(e.dataTransfer?.files ?? null);
249
+ }, [R]), on = (e) => {
244
250
  switch (e) {
245
- case "too-many": return b("attachments.tooMany", "You can attach up to {{max}} files per message.", { max: 5 });
246
- case "too-large": return b("attachments.tooLarge", "That file is larger than 10 MB.");
247
- case "empty": return b("attachments.empty", "That file is empty.");
248
- case "unreadable": return b("attachments.unreadable", "That file could not be read.");
249
- case "unsupported-image": return b("attachments.unsupportedImage", "This device can't read that image format, so it can't be resized to send. Save it as JPEG and try again.");
250
- case "too-large-to-save": return b("attachments.tooLargeToSave", "That file is over 5 MB, so it can't be saved to Files, and no text could be read from it.");
251
+ case "too-many": return y("attachments.tooMany", "You can attach up to {{max}} files per message.", { max: 5 });
252
+ case "too-large": return y("attachments.tooLarge", "That file is larger than 10 MB.");
253
+ case "empty": return y("attachments.empty", "That file is empty.");
254
+ case "unreadable": return y("attachments.unreadable", "That file could not be read.");
255
+ case "unsupported-image": return y("attachments.unsupportedImage", "This device can't read that image format, so it can't be resized to send. Save it as JPEG and try again.");
256
+ case "too-large-to-save": return y("attachments.tooLargeToSave", "That file is over 5 MB, so it can't be saved to Files, and no text could be read from it.");
251
257
  }
252
258
  }, $ = (() => {
253
- switch (U.error) {
254
- case "not-allowed": return b("voice.denied", "Microphone access is blocked. Allow it in your browser settings to dictate.");
255
- case "audio-capture": return b("voice.noMic", "No microphone was found.");
256
- case "network": return b("voice.network", "Speech recognition is offline right now.");
257
- case "language-not-supported": return b("voice.languageNotSupported", "This browser cannot recognise spoken {{language}}. Try a different browser, or type instead.", { language: i(U.language, S) });
258
- case "unknown": return b("voice.failed", "Dictation stopped unexpectedly.");
259
+ switch (H.error) {
260
+ case "not-allowed": return y("voice.denied", "Microphone access is blocked. Allow it in your browser settings to dictate.");
261
+ case "audio-capture": return y("voice.noMic", "No microphone was found.");
262
+ case "network": return y("voice.network", "Speech recognition is offline right now.");
263
+ case "language-not-supported": return y("voice.languageNotSupported", "This browser cannot recognise spoken {{language}}. Try a different browser, or type instead.", { language: i(H.language, x) });
264
+ case "unknown": return y("voice.failed", "Dictation stopped unexpectedly.");
259
265
  default: return null;
260
266
  }
261
- })(), $t = (e, n, r = !1) => k ? /* @__PURE__ */ f(t, {
262
- onDismiss: Bt,
267
+ })(), sn = (e, n, r = !1) => O ? /* @__PURE__ */ f(t, {
268
+ onDismiss: qt,
263
269
  children: /* @__PURE__ */ p("p", {
264
270
  className: "flex items-center justify-center gap-2 text-text-muted",
265
271
  "data-testid": "assistant-commit-status",
266
272
  children: [
267
- /* @__PURE__ */ f(De, {
273
+ /* @__PURE__ */ f(d, {
268
274
  className: "size-3 motion-safe:animate-spin",
269
275
  "aria-hidden": "true"
270
276
  }),
271
- /* @__PURE__ */ f("span", { children: b("attachments.saving", "Saving your attachments…") }),
277
+ /* @__PURE__ */ f("span", { children: y("attachments.saving", "Saving your attachments…") }),
272
278
  /* @__PURE__ */ f("button", {
273
279
  type: "button",
274
- onClick: Bt,
280
+ onClick: qt,
275
281
  className: "rounded text-text-primary underline underline-offset-2 hover:text-action-primary-bg focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong",
276
282
  "data-testid": "assistant-commit-cancel",
277
- children: b("attachments.cancelSaving", "Cancel")
283
+ children: y("attachments.cancelSaving", "Cancel")
278
284
  })
279
285
  ]
280
286
  })
281
- }) : A ? /* @__PURE__ */ f("p", {
287
+ }) : k ? /* @__PURE__ */ f("p", {
282
288
  className: "text-status-error-text",
283
289
  role: "alert",
284
290
  "data-testid": "assistant-commit-failed",
285
- children: Wt(A)
286
- }) : !r && U.isStarting && !U.isListening ? /* @__PURE__ */ f("p", {
291
+ children: Zt(k)
292
+ }) : !r && H.isStarting && !H.isListening ? /* @__PURE__ */ f("p", {
287
293
  className: "text-text-muted",
288
294
  "data-testid": "assistant-voice-starting",
289
- children: b("voice.starting", "Starting the microphone…")
290
- }) : !r && U.isListening ? /* @__PURE__ */ p("p", {
295
+ children: y("voice.starting", "Starting the microphone…")
296
+ }) : !r && H.isListening ? /* @__PURE__ */ p("p", {
291
297
  className: "text-status-error-text",
292
298
  "data-testid": "assistant-voice-status",
293
- children: [/* @__PURE__ */ f(le, {}), U.interim || b("voice.listening", "Listening… speak now, tap the square to stop")]
299
+ children: [/* @__PURE__ */ f(le, {}), H.interim || y("voice.listening", "Listening… speak now, tap the square to stop")]
294
300
  }) : $ ? /* @__PURE__ */ f("p", {
295
301
  className: "text-status-error-text",
296
302
  "data-testid": "assistant-voice-error",
297
303
  children: $
298
- }) : pt ? /* @__PURE__ */ f("button", {
304
+ }) : yt ? /* @__PURE__ */ f("button", {
299
305
  type: "button",
300
- onClick: _t,
306
+ onClick: Ct,
301
307
  className: "text-status-error-text underline-offset-2 hover:underline",
302
308
  "data-testid": "assistant-attachment-rejection",
303
- children: Qt(pt)
304
- }) : ft === "failed" ? /* @__PURE__ */ f("p", {
309
+ children: on(yt)
310
+ }) : vt === "failed" ? /* @__PURE__ */ f("p", {
305
311
  className: "text-status-error-text",
306
312
  "data-testid": "assistant-attachment-blocked",
307
- children: Lt.length === 1 ? b("attachments.blockedOne", "{{name}} didn't upload. Retry or remove it before sending.", { name: Lt[0].filename }) : b("attachments.blockedMany", "{{count}} attachments didn't upload. Retry or remove them before sending.", { count: Lt.length })
313
+ children: Ut.length === 1 ? y("attachments.blockedOne", "{{name}} didn't upload. Retry or remove it before sending.", { name: Ut[0].filename }) : y("attachments.blockedMany", "{{count}} attachments didn't upload. Retry or remove them before sending.", { count: Ut.length })
308
314
  }) : n ? /* @__PURE__ */ f("p", {
309
315
  className: "text-text-muted",
310
316
  "data-testid": "assistant-stopping-status",
311
- children: b("composer.stopping", "Stopping the reply…")
317
+ children: y("composer.stopping", "Stopping the reply…")
312
318
  }) : e ? /* @__PURE__ */ f("p", {
313
319
  className: "text-text-muted",
314
320
  "data-testid": "assistant-stop-status",
315
- children: b("composer.stopped", "Reply stopped.")
321
+ children: y("composer.stopped", "Reply stopped.")
316
322
  }) : /* @__PURE__ */ f("p", {
317
323
  className: "text-text-muted",
318
- children: b("composer.hint", "Enter to send · Shift+Enter for newline · drag or paste files to attach")
324
+ children: y("composer.hint", "Enter to send · Shift+Enter for newline · drag or paste files to attach")
319
325
  });
320
- if (w) {
321
- let e = g !== void 0 && K.length === 0 && R.length === 0 && !U.isActive, n = b("composer.hint", "Enter to send · Shift+Enter for newline · drag or paste files to attach"), r = U.isSupported && !y && W.phase !== "idle", i = U.error === "not-allowed" || U.error === "audio-capture", ee = !!(k || A || $ || pt || ft === "failed" || rt !== null || N !== null), a = W.nothingHeard && !ee, o = "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--color-bg-elevated)]";
322
- return /* @__PURE__ */ f(Me, { children: (te) => /* @__PURE__ */ p("div", {
323
- ref: lt,
324
- className: `${x ? `flex-shrink-0 px-3 pt-1.5 ${Se}` : "flex-shrink-0 px-3 pt-1.5"}${Qe ? " hidden" : ""}`,
326
+ if (C) {
327
+ let e = g !== void 0 && G.length === 0 && L.length === 0 && !H.isActive, n = y("composer.hint", "Enter to send · Shift+Enter for newline · drag or paste files to attach"), r = H.error === "not-allowed" || H.error === "audio-capture", i = !!(O || k || $ || yt || vt === "failed" || lt !== null || M !== null), ee = U.nothingHeard && !i, a = fe(Kt), o = "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--color-bg-elevated)]";
328
+ return /* @__PURE__ */ f(Fe, { children: (te) => /* @__PURE__ */ p("div", {
329
+ ref: ht,
330
+ className: `${rt ? `flex-shrink-0 px-3 pt-1.5 ${Ce}` : "flex-shrink-0 px-3 pt-1.5"}${nt ? " hidden" : ""}`,
325
331
  children: [
326
- Ye,
327
- Xe ? /* @__PURE__ */ f(ye, {
328
- voiceLive: y,
329
- children: Xe
332
+ Qe,
333
+ $e ? /* @__PURE__ */ f(be, {
334
+ voiceLive: tt,
335
+ children: $e
330
336
  }) : null,
331
337
  /* @__PURE__ */ p("div", {
332
- className: ee || a || l ? "mb-1.5 px-1 text-center text-xs" : "",
338
+ className: i || ee || De ? "mb-1.5 px-1 text-center text-xs" : "",
333
339
  "aria-live": "polite",
334
340
  "data-testid": "assistant-composer-status",
335
341
  children: [
336
- l ? /* @__PURE__ */ f("p", {
342
+ De ? /* @__PURE__ */ f("p", {
337
343
  className: "text-status-warning",
338
344
  "data-testid": "assistant-write-access-warning",
339
- children: b("composer.writeAccessDenied", "Changes may not save — your role in this workspace does not currently allow edits. You can still plan and review an action.")
345
+ children: y("composer.writeAccessDenied", "Changes may not save — your role in this workspace does not currently allow edits. You can still plan and review an action.")
340
346
  }) : null,
341
- i && $ && !k && !A ? /* @__PURE__ */ f(he, {
347
+ r && $ && !O && !k ? /* @__PURE__ */ f(ge, {
342
348
  message: $,
343
349
  onTryAgain: () => {
344
- U.clearError(), W.start();
350
+ H.clearError(), U.start();
345
351
  }
346
- }) : a ? /* @__PURE__ */ f("p", {
352
+ }) : ee ? /* @__PURE__ */ f("p", {
347
353
  className: "text-text-secondary",
348
354
  "data-testid": "assistant-dictation-nothing-heard",
349
- children: b("dictation.nothingHeard", "Nothing was heard. Check the microphone and try again.")
350
- }) : ee ? $t(rt !== null, N !== null, !0) : null,
351
- r && U.isListening ? /* @__PURE__ */ f("span", {
355
+ children: y("dictation.nothingHeard", "Nothing was heard. Check the microphone and try again.")
356
+ }) : i ? sn(lt !== null, M !== null, !0) : null,
357
+ Y && H.isListening ? /* @__PURE__ */ f("span", {
352
358
  className: "sr-only",
353
359
  "data-testid": "assistant-dictation-announced",
354
- children: b("voiceSession.listening", "Listening…")
360
+ children: y("voiceSession.listening", "Listening…")
355
361
  }) : null
356
362
  ]
357
363
  }),
@@ -362,74 +368,75 @@ var Me = ({ children: e }) => e(l()), m = ({ writeAccessDenied: l = !1, onSend:
362
368
  children: n
363
369
  }),
364
370
  /* @__PURE__ */ p("div", {
365
- onDragEnter: Jt,
366
- onDragLeave: Yt,
367
- onDragOver: Xt,
368
- onDrop: Zt,
369
- className: `flex flex-col rounded-3xl border transition-colors ${r && W.phase === "listening" ? "border-status-warning-bg ring-1 ring-status-warning-bg" : "focus-within:border-[var(--color-focus-ring)] focus-within:ring-1 focus-within:ring-[var(--color-focus-ring)]"} ${Ze ? "bg-bg-surface" : "bg-bg-elevated"} ${r && W.phase !== "transcribing" ? "" : O ? "border-dashed border-[var(--color-focus-ring)]" : "border-[var(--color-text-muted)]"} ${de(x, {
370
- hearing: r && W.phase === "listening",
371
- quiet: Pe || Ze || O,
372
- entrance: Ue
371
+ onDragEnter: tn,
372
+ onDragLeave: nn,
373
+ onDragOver: rn,
374
+ onDrop: an,
375
+ className: `flex flex-col rounded-3xl border transition-colors ${Y && U.phase === "listening" ? "border-status-warning-bg ring-1 ring-status-warning-bg" : "focus-within:border-[var(--color-focus-ring)] focus-within:ring-1 focus-within:ring-[var(--color-focus-ring)]"} ${et ? "bg-bg-surface" : "bg-bg-elevated"} ${Y && U.phase !== "transcribing" ? "" : D ? "border-dashed border-[var(--color-focus-ring)]" : "border-[var(--color-text-muted)]"} ${de(b, {
376
+ hearing: Y && U.phase === "listening",
377
+ quiet: Le || et || D,
378
+ entrance: Ke
373
379
  })}`,
374
- "data-dictating": r ? W.phase : void 0,
380
+ "data-dictating": Y ? U.phase : void 0,
375
381
  "data-testid": "assistant-composer",
376
382
  "data-presentation": "compact",
377
383
  children: [
378
384
  /* @__PURE__ */ f("div", {
379
385
  className: "px-3 pt-3 empty:hidden",
380
- children: /* @__PURE__ */ p(ke, { children: [/* @__PURE__ */ f(oe, {
381
- disabled: k,
382
- showSuggestions: K.length === 0,
383
- onSuggest: It
386
+ children: /* @__PURE__ */ p(Me, { children: [/* @__PURE__ */ f(oe, {
387
+ disabled: O,
388
+ showSuggestions: G.length === 0,
389
+ onSuggest: Ht
384
390
  }), /* @__PURE__ */ f(ae, {
385
- attachments: R,
386
- onRemove: mt,
387
- onRetry: ht,
388
- disabled: C || k,
389
- preparingCount: dt
391
+ attachments: L,
392
+ onRemove: bt,
393
+ onRetry: xt,
394
+ disabled: S || O,
395
+ preparingCount: _t
390
396
  })] })
391
397
  }),
392
398
  /* @__PURE__ */ f("textarea", {
393
- ref: $e,
394
- value: E,
395
- onChange: (e) => Ut(e.target.value),
396
- onKeyDown: Kt,
397
- onPaste: qt,
398
- disabled: C,
399
- readOnly: k,
400
- "aria-busy": k || void 0,
401
- placeholder: O ? b("composer.dropHere", "Drop files to attach") : Pt,
399
+ ref: at,
400
+ value: T,
401
+ onChange: (e) => Xt(e.target.value),
402
+ onKeyDown: $t,
403
+ onPaste: en,
404
+ disabled: S,
405
+ readOnly: O,
406
+ "aria-busy": O || void 0,
407
+ placeholder: D ? y("composer.dropHere", "Drop files to attach") : Bt,
402
408
  rows: 1,
403
- className: `scrollbar-slim scrollbar-box min-h-10 w-[calc(100%-0.375rem)] resize-none bg-transparent pb-1 pe-2.5 ps-4 pt-3 text-base leading-6 text-text-primary placeholder:text-text-muted focus:outline-none disabled:opacity-50${r ? " hidden" : ""}`,
409
+ className: `scrollbar-slim scrollbar-box ${a.minHeight} w-[calc(100%-0.375rem)] resize-none bg-transparent pb-1 pe-2.5 ps-4 ${a.paddingTop} text-base ${a.lineHeight} text-text-primary placeholder:text-text-muted focus:outline-none disabled:opacity-50${Y ? " hidden" : ""}`,
404
410
  "aria-describedby": te,
405
411
  title: n,
406
- "aria-label": b("chatInput.ariaLabel", "Message input"),
412
+ "aria-label": y("chatInput.ariaLabel", "Message input"),
407
413
  "data-testid": "assistant-input"
408
414
  }),
409
- r ? /* @__PURE__ */ f(me, {
410
- phase: W.phase,
411
- before: W.before,
412
- take: W.take,
413
- interim: W.interim,
414
- after: W.after
415
+ Y ? /* @__PURE__ */ f(he, {
416
+ size: Kt,
417
+ phase: U.phase,
418
+ before: U.before,
419
+ take: U.take,
420
+ interim: U.interim,
421
+ after: U.after
415
422
  }) : null,
416
- r ? W.phase === "transcribing" ? /* @__PURE__ */ f(pe, {
417
- phase: W.phase,
418
- seconds: W.seconds,
419
- level: W.level,
420
- onCancel: W.cancel,
421
- onFinish: W.finish,
423
+ Y ? U.phase === "transcribing" ? /* @__PURE__ */ f(me, {
424
+ phase: U.phase,
425
+ seconds: U.seconds,
426
+ level: U.level,
427
+ onCancel: U.cancel,
428
+ onFinish: U.finish,
422
429
  focusRing: o
423
430
  }) : /* @__PURE__ */ f(t, {
424
- onDismiss: W.cancel,
431
+ onDismiss: U.cancel,
425
432
  children: /* @__PURE__ */ f("div", {
426
433
  className: "contents",
427
- children: /* @__PURE__ */ f(pe, {
428
- phase: W.phase,
429
- seconds: W.seconds,
430
- level: W.level,
431
- onCancel: W.cancel,
432
- onFinish: W.finish,
434
+ children: /* @__PURE__ */ f(me, {
435
+ phase: U.phase,
436
+ seconds: U.seconds,
437
+ level: U.level,
438
+ onCancel: U.cancel,
439
+ onFinish: U.finish,
433
440
  focusRing: o
434
441
  })
435
442
  })
@@ -438,74 +445,74 @@ var Me = ({ children: e }) => e(l()), m = ({ writeAccessDenied: l = !1, onSend:
438
445
  "data-testid": "assistant-composer-controls",
439
446
  children: [
440
447
  /* @__PURE__ */ f(ie, {
441
- onFiles: z,
442
- canAddMore: vt,
443
- disabled: C || k,
448
+ onFiles: R,
449
+ canAddMore: wt,
450
+ disabled: S || O,
444
451
  compact: !0,
445
452
  capMenuHeight: !0
446
453
  }),
447
- /* @__PURE__ */ f(ve, {
454
+ /* @__PURE__ */ f(ye, {
448
455
  chip: !0,
449
- readOnly: Ze,
450
- mode: Ie,
456
+ readOnly: et,
457
+ mode: ze,
451
458
  availableModes: h,
452
- onModeChange: Re,
453
- auto: ze,
454
- disabled: C || k,
455
- disabledReason: N === null ? _ ? "replying" : Je ?? "busy" : "busy"
459
+ onModeChange: Ve,
460
+ auto: He,
461
+ disabled: S || O,
462
+ disabledReason: M === null ? _ ? "replying" : Ze ?? "busy" : "busy"
456
463
  }),
457
- x && i ? /* @__PURE__ */ f("span", {
464
+ b && r ? /* @__PURE__ */ f("span", {
458
465
  className: "ms-1 hidden min-w-0 truncate text-xs text-text-secondary sm:block",
459
466
  "data-testid": "assistant-mic-summary",
460
- children: b("dictation.noMicrophone", "No microphone available")
467
+ children: y("dictation.noMicrophone", "No microphone available")
461
468
  }) : null,
462
469
  /* @__PURE__ */ f("div", { className: "min-w-0 flex-1" }),
463
- U.isSupported && !y ? x ? /* @__PURE__ */ f(ge, {
464
- onDictate: W.start,
465
- blocked: i,
466
- disabled: C || k
470
+ H.isSupported && !tt ? b ? /* @__PURE__ */ f(_e, {
471
+ onDictate: U.start,
472
+ blocked: r,
473
+ disabled: S || O
467
474
  }) : /* @__PURE__ */ f(ce, {
468
475
  compact: !0,
469
- isListening: U.isListening,
470
- isStarting: U.isStarting,
471
- onToggle: W.start,
472
- disabled: C || k
476
+ isListening: H.isListening,
477
+ isStarting: H.isStarting,
478
+ onToggle: U.start,
479
+ disabled: S || O
473
480
  }) : null,
474
481
  Q ? /* @__PURE__ */ f("button", {
475
- ref: Ht,
482
+ ref: Yt,
476
483
  type: "button",
477
- onClick: Vt,
478
- className: `flex size-11 sm:size-10 flex-shrink-0 items-center justify-center rounded-full bg-action-primary-bg text-action-primary-text transition-colors hover:bg-action-primary-bg-hover ${o} ${N === null ? "" : "cursor-default opacity-60"}`,
479
- "aria-label": N === null ? b("composer.stop", "Stop the reply") : b("composer.stopping", "Stopping the reply…"),
480
- title: N === null ? b("composer.stop", "Stop the reply") : b("composer.stopping", "Stopping the reply…"),
481
- "aria-disabled": N === null ? void 0 : "true",
482
- "aria-busy": N === null ? void 0 : "true",
484
+ onClick: Jt,
485
+ className: `flex size-11 sm:size-10 flex-shrink-0 items-center justify-center rounded-full bg-action-primary-bg text-action-primary-text transition-colors hover:bg-action-primary-bg-hover ${o} ${M === null ? "" : "cursor-default opacity-60"}`,
486
+ "aria-label": M === null ? y("composer.stop", "Stop the reply") : y("composer.stopping", "Stopping the reply…"),
487
+ title: M === null ? y("composer.stop", "Stop the reply") : y("composer.stopping", "Stopping the reply…"),
488
+ "aria-disabled": M === null ? void 0 : "true",
489
+ "aria-busy": M === null ? void 0 : "true",
483
490
  "data-testid": "assistant-stop",
484
- children: N === null ? /* @__PURE__ */ f(Oe, {
491
+ children: M === null ? /* @__PURE__ */ f(je, {
485
492
  className: "size-4 fill-current",
486
493
  "aria-hidden": "true"
487
- }) : /* @__PURE__ */ f(De, {
494
+ }) : /* @__PURE__ */ f(d, {
488
495
  className: "size-4 motion-safe:animate-spin",
489
496
  "aria-hidden": "true"
490
497
  })
491
- }) : e && !(x && i) ? /* @__PURE__ */ f(ue, {
498
+ }) : e && !(b && r) ? /* @__PURE__ */ f(ue, {
492
499
  compact: !0,
493
- invisible: y,
500
+ invisible: tt,
494
501
  onStart: g,
495
- disabled: C || k
502
+ disabled: S || O
496
503
  }) : /* @__PURE__ */ f("button", {
497
504
  type: "button",
498
505
  onClick: () => {
499
- M(null), X();
506
+ j(null), X();
500
507
  },
501
- disabled: !J,
502
- className: `flex size-11 sm:size-10 flex-shrink-0 items-center justify-center rounded-full transition-colors ${o} ${J ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover" : "bg-[var(--color-bg-disabled)] text-[var(--color-text-disabled)]"}`,
503
- "aria-label": b("chatInput.send", "Send message"),
508
+ disabled: !q,
509
+ className: `flex size-11 sm:size-10 flex-shrink-0 items-center justify-center rounded-full transition-colors ${o} ${q ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover" : "bg-[var(--color-bg-disabled)] text-[var(--color-text-disabled)]"}`,
510
+ "aria-label": y("chatInput.send", "Send message"),
504
511
  "data-testid": "assistant-send",
505
- children: Ne || ut || k ? /* @__PURE__ */ f(De, {
512
+ children: Ie || gt || O ? /* @__PURE__ */ f(d, {
506
513
  className: "size-5 motion-safe:animate-spin",
507
514
  "aria-hidden": "true"
508
- }) : /* @__PURE__ */ f(Ee, {
515
+ }) : /* @__PURE__ */ f(Ae, {
509
516
  className: "size-5",
510
517
  "aria-hidden": "true"
511
518
  })
@@ -521,89 +528,89 @@ var Me = ({ children: e }) => e(l()), m = ({ writeAccessDenied: l = !1, onSend:
521
528
  className: "flex-shrink-0 px-3 pb-3 pt-1.5",
522
529
  children: [
523
530
  /* @__PURE__ */ p("div", {
524
- onDragEnter: Jt,
525
- onDragLeave: Yt,
526
- onDragOver: Xt,
527
- onDrop: Zt,
528
- className: `rounded-2xl border p-2 shadow-sm transition-colors focus-within:border-action-primary-bg focus-within:ring-2 focus-within:ring-action-primary-bg/15 ${O ? "border-action-primary-bg border-dashed bg-action-primary-bg/5" : "border-border-default bg-bg-sunken"}`,
531
+ onDragEnter: tn,
532
+ onDragLeave: nn,
533
+ onDragOver: rn,
534
+ onDrop: an,
535
+ className: `rounded-2xl border p-2 shadow-sm transition-colors focus-within:border-action-primary-bg focus-within:ring-2 focus-within:ring-action-primary-bg/15 ${D ? "border-action-primary-bg border-dashed bg-action-primary-bg/5" : "border-border-default bg-bg-sunken"}`,
529
536
  "data-testid": "assistant-composer",
530
537
  children: [
531
- /* @__PURE__ */ p(ke, { children: [/* @__PURE__ */ f(oe, {
532
- disabled: k,
533
- showSuggestions: K.length === 0,
534
- onSuggest: It
538
+ /* @__PURE__ */ p(Me, { children: [/* @__PURE__ */ f(oe, {
539
+ disabled: O,
540
+ showSuggestions: G.length === 0,
541
+ onSuggest: Ht
535
542
  }), /* @__PURE__ */ f(ae, {
536
- attachments: R,
537
- onRemove: mt,
538
- onRetry: ht,
539
- disabled: C || k,
540
- preparingCount: dt
543
+ attachments: L,
544
+ onRemove: bt,
545
+ onRetry: xt,
546
+ disabled: S || O,
547
+ preparingCount: _t
541
548
  })] }),
542
549
  /* @__PURE__ */ p("div", {
543
550
  className: "flex items-end gap-2",
544
551
  children: [
545
552
  /* @__PURE__ */ f(ie, {
546
- onFiles: z,
547
- canAddMore: vt,
548
- disabled: C || k,
553
+ onFiles: R,
554
+ canAddMore: wt,
555
+ disabled: S || O,
549
556
  showLabel: !0
550
557
  }),
551
558
  /* @__PURE__ */ f("textarea", {
552
- ref: T,
553
- value: E,
554
- onChange: (e) => D(e.target.value),
555
- onKeyDown: Gt,
556
- onPaste: qt,
557
- disabled: C,
558
- readOnly: k,
559
- "aria-busy": k || void 0,
560
- placeholder: O ? b("composer.dropHere", "Drop files to attach") : Pt,
559
+ ref: w,
560
+ value: T,
561
+ onChange: (e) => E(e.target.value),
562
+ onKeyDown: Qt,
563
+ onPaste: en,
564
+ disabled: S,
565
+ readOnly: O,
566
+ "aria-busy": O || void 0,
567
+ placeholder: D ? y("composer.dropHere", "Drop files to attach") : Bt,
561
568
  rows: 1,
562
569
  className: "min-h-[36px] flex-1 resize-none self-center bg-transparent px-1 py-2 text-[15px] leading-relaxed text-text-primary placeholder:text-text-muted focus:outline-none disabled:opacity-50",
563
- "aria-label": b("chatInput.ariaLabel", "Message input"),
570
+ "aria-label": y("chatInput.ariaLabel", "Message input"),
564
571
  "data-testid": "assistant-input"
565
572
  }),
566
- U.isSupported && /* @__PURE__ */ f(ce, {
567
- isListening: U.isListening,
568
- isStarting: U.isStarting,
569
- onToggle: U.toggle,
570
- disabled: C || k
573
+ H.isSupported && /* @__PURE__ */ f(ce, {
574
+ isListening: H.isListening,
575
+ isStarting: H.isStarting,
576
+ onToggle: H.toggle,
577
+ disabled: S || O
571
578
  }),
572
- g && K.length === 0 && R.length === 0 && !U.isActive ? /* @__PURE__ */ f(ue, {
579
+ g && G.length === 0 && L.length === 0 && !H.isActive ? /* @__PURE__ */ f(ue, {
573
580
  onStart: g,
574
- disabled: C || k
581
+ disabled: S || O
575
582
  }) : /* @__PURE__ */ f("button", {
576
583
  type: "button",
577
584
  onClick: () => void X(),
578
- disabled: !J,
579
- className: `flex size-9 flex-shrink-0 items-center justify-center rounded-full shadow-sm transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong ${J ? "bg-action-primary-bg text-action-primary-text hover:scale-105 hover:bg-action-primary-bg-hover" : "bg-bg-elevated text-text-muted"}`,
580
- "aria-label": b("chatInput.send", "Send message"),
585
+ disabled: !q,
586
+ className: `flex size-9 flex-shrink-0 items-center justify-center rounded-full shadow-sm transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong ${q ? "bg-action-primary-bg text-action-primary-text hover:scale-105 hover:bg-action-primary-bg-hover" : "bg-bg-elevated text-text-muted"}`,
587
+ "aria-label": y("chatInput.send", "Send message"),
581
588
  "data-testid": "assistant-send",
582
- children: Ne || ut || k ? /* @__PURE__ */ f(De, { className: "size-4 motion-safe:animate-spin" }) : /* @__PURE__ */ f(Ee, { className: "size-4" })
589
+ children: Ie || gt || O ? /* @__PURE__ */ f(d, { className: "size-4 motion-safe:animate-spin" }) : /* @__PURE__ */ f(Ae, { className: "size-4" })
583
590
  })
584
591
  ]
585
592
  }),
586
593
  (h.length > 1 || h.some((e) => e.writeCapable)) && /* @__PURE__ */ f("div", {
587
594
  className: "mt-2 px-0.5",
588
- children: /* @__PURE__ */ f(_e, {
589
- mode: Ie,
595
+ children: /* @__PURE__ */ f(ve, {
596
+ mode: ze,
590
597
  availableModes: h,
591
- onModeChange: Re,
592
- disabled: C || k,
593
- auto: ze
598
+ onModeChange: Ve,
599
+ disabled: S || O,
600
+ auto: He
594
601
  })
595
602
  })
596
603
  ]
597
604
  }),
598
- l ? /* @__PURE__ */ f("p", {
605
+ De ? /* @__PURE__ */ f("p", {
599
606
  className: "mt-1.5 px-1 text-center text-[11px] text-status-warning",
600
607
  "data-testid": "assistant-write-access-warning",
601
- children: b("composer.writeAccessDenied", "Changes may not save — your role in this workspace does not currently allow edits. You can still plan and review an action.")
608
+ children: y("composer.writeAccessDenied", "Changes may not save — your role in this workspace does not currently allow edits. You can still plan and review an action.")
602
609
  }) : null,
603
610
  /* @__PURE__ */ f("div", {
604
611
  className: "mt-1.5 px-1 text-center text-[11px]",
605
612
  "aria-live": "polite",
606
- children: $t(!1, !1)
613
+ children: sn(!1, !1)
607
614
  })
608
615
  ]
609
616
  });