@burdenoff/fe-libs 2026.1119.5 → 2026.1119.7

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