@burdenoff/microfe-healthybowl 2026.901.1 → 2026.901.3

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.
@@ -20,9 +20,10 @@ import { dispatchAssistantQuotaExhausted as ue, notifyAiCreditsUpdated as de } f
20
20
  import { buildPromptForMode as fe } from "../../utils/assistantPrompt.js";
21
21
  import { isMultimodalBodyRejection as pe, isRecoverableAssistantError as me } from "../../utils/assistantTransportErrors.js";
22
22
  import { pollDelayMs as he } from "../../utils/assistantPollSchedule.js";
23
- import { useCallback as T, useEffect as E, useMemo as D, useRef as ge, useState as _e } from "react";
23
+ import { createReadinessTracker as ge } from "../../utils/sandboxReadiness.js";
24
+ import { useCallback as T, useEffect as E, useMemo as D, useRef as O, useState as _e } from "react";
24
25
  import { useI18n as ve } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
25
- import { jsx as O, jsxs as ye } from "react/jsx-runtime";
26
+ import { jsx as k, jsxs as ye } from "react/jsx-runtime";
26
27
  import { useGatewayClient as be } from "@burdenoff/fe-libs/shared/graphql";
27
28
  import { useAuthToken as xe } from "@burdenoff/fe-libs/shared/providers/shell";
28
29
  import { getAssistantMedia as Se } from "@burdenoff/fe-libs/shared/assistant";
@@ -39,25 +40,25 @@ function Te() {
39
40
  function Ee(e) {
40
41
  return e.replace(/(Authorization\s*:\s*Bearer\s+)[^\s\n]+/gi, "$1[REDACTED]").replace(/(X-Workspace-Authorization\s*:\s*Bearer\s+)[^\s\n]+/gi, "$1[REDACTED]").replace(/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9._-]+\.[A-Za-z0-9._-]+\b/g, "[REDACTED_JWT]").replace(/\bsk-ant-[A-Za-z0-9-]+\b/g, "[REDACTED_API_KEY]");
41
42
  }
42
- function k(e) {
43
+ function A(e) {
43
44
  return e.info?.time?.created ?? 0;
44
45
  }
45
- function A(e) {
46
+ function j(e) {
46
47
  return (e ?? []).filter((e) => e.type === "text" && typeof e.text == "string").map((e) => e.text?.trim() ?? "").filter(Boolean).join("\n");
47
48
  }
48
- function j(e) {
49
+ function M(e) {
49
50
  return (e ?? []).filter((e) => e.type === "tool" && e.tool).map((e) => {
50
51
  let t = e.state?.status ?? "running", n = e.tool ?? "tool";
51
52
  return t === "completed" ? `Completed: ${n}` : t === "failed" ? `Failed: ${n}` : `Running: ${n}`;
52
53
  });
53
54
  }
54
55
  function De(e, t) {
55
- let n = e.filter((e) => e.info?.role === "assistant" && k(e) > t).sort((e, t) => k(e) - k(t));
56
+ let n = e.filter((e) => e.info?.role === "assistant" && A(e) > t).sort((e, t) => A(e) - A(t));
56
57
  if (n.length === 0) return {
57
58
  content: "Thinking...",
58
59
  done: !1
59
60
  };
60
- let r = n[n.length - 1], i = A(r.parts), a = Se(r.parts), o = j(r.parts);
61
+ let r = n[n.length - 1], i = j(r.parts), a = Se(r.parts), o = M(r.parts);
61
62
  return {
62
63
  content: [
63
64
  i,
@@ -76,64 +77,65 @@ function Oe(e) {
76
77
  default: return "";
77
78
  }
78
79
  }
79
- var M = ({ visible: Se = !0 }) => {
80
- let A = t(), j = be("workspace"), { getAccessToken: M, getWorkspaceToken: ke, userId: Ae } = xe(), { locale: N } = ve(), P = e((e) => e.assistantLanguage), je = D(() => g(P, N).english, [P, N]), Me = h(P) !== null, Ne = D(() => g(P, N).code, [P, N]), { conversations: Pe, activeConversationId: F, mode: I, processingByConversationId: Fe, setMode: L, setConversationMode: R, setActiveConversation: Ie, createConversation: z, addMessage: B, updateMessage: Le, patchMessage: V, setConversationProcessing: H, clearConversationProcessing: Re, setBackendSessionId: ze, clearBackendSessionId: U, setSandbox: W, clearSandbox: Be, acknowledgeApiCalls: Ve } = e(), G = Pe.find((e) => e.id === F)?.messages ?? [], K = F ? Fe[F] : void 0, q = _(K?.status), He = q ? K?.messageId ?? null : null, Ue = K?.status === "error" ? K.messageId : null, { canUseApiCalls: J, loading: We } = ce(y()), Ge = D(() => S.filter((e) => !e.requiresAdmin || J), [J]), [Ke, qe] = _e(null), Je = ge({}), Ye = ge(/* @__PURE__ */ new Set());
80
+ var N = ({ visible: Se = !0 }) => {
81
+ let j = t(), M = be("workspace"), { getAccessToken: N, getWorkspaceToken: ke, userId: Ae } = xe(), { locale: P } = ve(), F = e((e) => e.assistantLanguage), je = D(() => g(F, P).english, [F, P]), Me = h(F) !== null, Ne = D(() => g(F, P).code, [F, P]), { conversations: Pe, activeConversationId: I, mode: L, processingByConversationId: Fe, setMode: R, setConversationMode: z, setActiveConversation: Ie, createConversation: B, addMessage: Le, updateMessage: Re, patchMessage: V, setConversationProcessing: H, clearConversationProcessing: ze, setBackendSessionId: Be, clearBackendSessionId: U, setSandbox: W, clearSandbox: Ve, acknowledgeApiCalls: He } = e(), G = Pe.find((e) => e.id === I)?.messages ?? [], K = I ? Fe[I] : void 0, q = _(K?.status), Ue = q ? K?.messageId ?? null : null, We = K?.status === "error" ? K.messageId : null, { canUseApiCalls: J, loading: Ge } = ce(y()), Ke = D(() => S.filter((e) => !e.requiresAdmin || J), [J]), [qe, Je] = _e(null), Ye = O({}), Y = O(ge()), Xe = O(/* @__PURE__ */ new Set());
81
82
  E(() => {
82
- if (We) return;
83
- let e = S.find((e) => e.id === I);
84
- (!e || e.requiresAdmin && !J) && I !== "assistant" && L("assistant");
83
+ if (Ge) return;
84
+ let e = S.find((e) => e.id === L);
85
+ (!e || e.requiresAdmin && !J) && L !== "assistant" && R("assistant");
85
86
  }, [
86
- I,
87
+ L,
87
88
  J,
88
- We,
89
- L
89
+ Ge,
90
+ R
90
91
  ]);
91
- let Y = T((e, t, n, r) => {
92
- H(e, n, t, null), r ? Le(e, t, r) : Le(e, t, Oe(n));
93
- }, [H, Le]), Xe = T(async (t, n, a, s, c) => {
92
+ let X = T((e, t, n, r) => {
93
+ H(e, n, t, null), r ? Re(e, t, r) : Re(e, t, Oe(n));
94
+ }, [H, Re]), Ze = T(async (t, n, a, s, c) => {
94
95
  let u = e.getState().sandboxesByMode[a]?.sandboxId ?? null, d = async (e) => {
96
+ if (Y.current.isFresh(e)) return !0;
95
97
  try {
96
- return await p(j, e, s, c, 3e5, (e) => Y(t, n, "provisioning", e)), await f(j, e, s, c, 9e4, (e) => Y(t, n, "connecting", e)), !0;
98
+ return await p(M, e, s, c, 3e5, (e) => X(t, n, "provisioning", e)), await f(M, e, s, c, 9e4, (e) => X(t, n, "connecting", e)), Y.current.markVerified(e), !0;
97
99
  } catch {
98
- return !1;
100
+ return Y.current.invalidate(e), !1;
99
101
  }
100
102
  };
101
- if (u && (W(a, u, "provisioning"), Y(t, n, "provisioning", "Reusing assistant environment..."), await d(u) || (W(a, null, "provisioning"), u = null)), !u) {
102
- Y(t, n, "provisioning", "Looking for existing environment...");
103
- let e = await o(j, s, a, c);
104
- e && (W(a, e, "provisioning"), Y(t, n, "provisioning", "Reusing assistant environment..."), await d(e) ? u = e : W(a, null, "provisioning"));
103
+ if (u && (W(a, u, "provisioning"), X(t, n, "provisioning", "Reusing assistant environment..."), await d(u) || (W(a, null, "provisioning"), u = null)), !u) {
104
+ X(t, n, "provisioning", "Looking for existing environment...");
105
+ let e = await o(M, s, a, c);
106
+ e && (W(a, e, "provisioning"), X(t, n, "provisioning", "Reusing assistant environment..."), await d(e) ? u = e : W(a, null, "provisioning"));
105
107
  }
106
108
  if (!u) {
107
- if (a === "api-calls" && !M()) throw Error("API Calls mode requires an authenticated session. Please sign in again.");
108
- Y(t, n, "provisioning", "Starting assistant environment..."), W(a, null, "provisioning"), u = await r(j, a, s, c), W(a, u, "provisioning"), await p(j, u, s, c, 3e5, (e) => Y(t, n, "provisioning", e)), await f(j, u, s, c, 9e4, (e) => Y(t, n, "connecting", e));
109
+ if (a === "api-calls" && !N()) throw Error("API Calls mode requires an authenticated session. Please sign in again.");
110
+ X(t, n, "provisioning", "Starting assistant environment..."), W(a, null, "provisioning"), u = await r(M, a, s, c), W(a, u, "provisioning"), await p(M, u, s, c, 3e5, (e) => X(t, n, "provisioning", e)), await f(M, u, s, c, 9e4, (e) => X(t, n, "connecting", e));
109
111
  }
110
112
  W(a, u, "running");
111
113
  let m = e.getState().conversations.find((e) => e.id === t)?.backendSessionId ?? null;
112
114
  if (m) try {
113
- let e = await l(j, u, s, m, c);
115
+ let e = await l(M, u, s, m, c);
114
116
  if (e.mode !== a) throw Error(`Session mode mismatch: expected ${a}, received ${e.mode}`);
115
117
  } catch {
116
118
  U(t), m = null;
117
119
  }
118
- return m || (Y(t, n, "connecting", "Preparing session..."), m = (await i(j, u, s, a, c)).sessionId, ze(t, m)), {
120
+ return m || (X(t, n, "connecting", "Preparing session..."), m = (await i(M, u, s, a, c)).sessionId, Be(t, m)), {
119
121
  sandboxId: u,
120
122
  sessionId: m
121
123
  };
122
124
  }, [
123
- j,
124
- U,
125
125
  M,
126
- ze,
126
+ U,
127
+ N,
128
+ Be,
127
129
  W,
128
- Y
129
- ]), X = T(async (t, r = [], i = {}) => {
130
- let o = e.getState(), l = o.activeConversationId ?? F;
131
- if (l && (_(o.processingByConversationId[l]?.status) || Ye.current.has(l))) return;
132
- let f = o.mode, p = F, h = p ? e.getState().conversations.find((e) => e.id === p) : void 0;
133
- if (p ? h && h.mode !== f && (h.messages.length > 0 || h.backendSessionId) ? p = z(void 0, f) : h && h.mode !== f && R(p, f) : p = z(void 0, f), !p) return;
134
- Je.current[p] = r;
130
+ X
131
+ ]), Z = T(async (t, r = [], i = {}) => {
132
+ let o = e.getState(), l = o.activeConversationId ?? I;
133
+ if (l && (_(o.processingByConversationId[l]?.status) || Xe.current.has(l))) return;
134
+ let f = o.mode, p = I, h = p ? e.getState().conversations.find((e) => e.id === p) : void 0;
135
+ if (p ? h && h.mode !== f && (h.messages.length > 0 || h.backendSessionId) ? p = B(void 0, f) : h && h.mode !== f && z(p, f) : p = B(void 0, f), !p) return;
136
+ Ye.current[p] = r;
135
137
  let g = ee(), v = {
136
- accessToken: M(),
138
+ accessToken: N(),
137
139
  workspaceToken: ke(),
138
140
  userId: Ae,
139
141
  organizationId: y()
@@ -144,9 +146,9 @@ var M = ({ visible: Se = !0 }) => {
144
146
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
145
147
  metadata: r.length ? { attachments: r.map(ae) } : void 0
146
148
  };
147
- B(p, b);
149
+ Le(p, b);
148
150
  let x = Te();
149
- B(p, {
151
+ Le(p, {
150
152
  id: x,
151
153
  role: "assistant",
152
154
  content: "",
@@ -167,7 +169,7 @@ var M = ({ visible: Se = !0 }) => {
167
169
  }, C = async (e = 1) => {
168
170
  let o = !1;
169
171
  try {
170
- await n(j, g, v);
172
+ await n(M, g, v);
171
173
  } catch (e) {
172
174
  if (le(e)) {
173
175
  ue("ai-credits"), S("You've run out of AI credits for this billing cycle. Upgrade your plan to keep chatting.", void 0, void 0, void 0, "en"), H(p, "error", x, null);
@@ -176,90 +178,90 @@ var M = ({ visible: Se = !0 }) => {
176
178
  console.warn("[assistant] AI-credit pre-flight check failed with a non-quota error; proceeding — gateway @usage(checkQuota) still enforces the real budget downstream", e);
177
179
  }
178
180
  try {
179
- let { sandboxId: e, sessionId: n } = await Xe(p, x, f, g, v), l = (await c(j, e, g, n, v, 50).catch(() => [])).reduce((e, t) => Math.max(e, k(t)), 0);
180
- Y(p, x, "streaming", "Thinking...");
181
+ let { sandboxId: e, sessionId: n } = await Ze(p, x, f, g, v), l = (await c(M, e, g, n, v, 50).catch(() => [])).reduce((e, t) => Math.max(e, A(t)), 0);
182
+ X(p, x, "streaming", "Thinking...");
181
183
  let h = fe(f, ne(t, r), je, Me, i.dictated === !0), _ = te(h, r), y = ie(_), ee = y > 0, ae = m();
182
184
  o = re(r) > y;
183
185
  try {
184
- await d(j, e, g, n, h, f, ae, v, _);
186
+ await d(M, e, g, n, h, f, ae, v, _);
185
187
  } catch (t) {
186
188
  if (!_ || !pe(t)) throw t;
187
- await d(j, e, g, n, h, f, ae, v, void 0), o ||= ee;
189
+ await d(M, e, g, n, h, f, ae, v, void 0), o ||= ee;
188
190
  }
189
191
  let b = De([], l), C = Date.now() + (Ce[f] ?? we), w = Date.now(), oe = Date.now();
190
- for (; Date.now() < C && (b = De(await c(j, e, g, n, v, 50), l), V(p, x, { content: Ee(b.content) }), !b.done);) Date.now() - w > 3e4 && (await a(j, e, g, 600, v).catch(() => void 0), w = Date.now()), await new Promise((e) => setTimeout(e, he(Date.now() - oe)));
192
+ for (; Date.now() < C && (b = De(await c(M, e, g, n, v, 50), l), V(p, x, { content: Ee(b.content) }), !b.done);) Date.now() - w > 3e4 && (await a(M, e, g, 600, v).catch(() => void 0), w = Date.now()), await new Promise((e) => setTimeout(e, he(Date.now() - oe)));
191
193
  if (!b.done && f !== "vibe-plugins") throw Error("Assistant response timed out while streaming progress");
192
- let se = f === "vibe-plugins" ? await s(j, e, g, n, v).catch(() => []) : void 0;
194
+ let se = f === "vibe-plugins" ? await s(M, e, g, n, v).catch(() => []) : void 0;
193
195
  if (b.done || (b = {
194
196
  ...b,
195
197
  content: `${b.content}\n\n_Still building in the background — any artifacts below will finish shortly. Re-open this conversation to pick up the completed plugin._`
196
198
  }), o && (b = {
197
199
  ...b,
198
- content: `${b.content}\n\n${A("healthybowl.assistant.attachments.imagesNotSent", "_Your photo was too large to include with this message, so the answer above is from the text and the file link only. Try a smaller or more tightly cropped photo._")}`
200
+ content: `${b.content}\n\n${j("healthybowl.assistant.attachments.imagesNotSent", "_Your photo was too large to include with this message, so the answer above is from the text and the file link only. Try a smaller or more tightly cropped photo._")}`
199
201
  }), S(b.content, se, n, e), b.tokens) {
200
202
  V(p, x, { tokens: b.tokens });
201
203
  try {
202
- await u(j, g, n, b.tokens, v), de();
204
+ await u(M, g, n, b.tokens, v), de();
203
205
  } catch {}
204
206
  }
205
207
  H(p, "complete", x, null);
206
208
  } catch (t) {
207
- if (e === 1 && me(t)) return U(p), Be(f), C(2);
209
+ if (e === 1 && me(t)) return U(p), Ve(f), C(2);
208
210
  throw t;
209
211
  }
210
212
  }, w = p;
211
- Ye.current.add(w);
213
+ Xe.current.add(w);
212
214
  try {
213
215
  if (!g) throw Error("Assistant backend is unavailable without an active workspace context.");
214
216
  await C();
215
- } catch (e) {
216
- if (le(e)) {
217
+ } catch (t) {
218
+ if (Y.current.invalidate(e.getState().sandboxesByMode[f]?.sandboxId ?? null), le(t)) {
217
219
  ue("sandbox"), S("You've reached your sandbox limit on the current plan. Upgrade to start the AI assistant.", void 0, void 0, void 0, "en"), H(p, "error", x, null);
218
220
  return;
219
221
  }
220
- let t = e instanceof Error ? e.message : "Something went wrong";
221
- H(p, "error", x, t), V(p, x, {
222
- content: `Sorry, an error occurred: ${t}. Please try again.`,
222
+ let n = t instanceof Error ? t.message : "Something went wrong";
223
+ H(p, "error", x, n), V(p, x, {
224
+ content: `Sorry, an error occurred: ${n}. Please try again.`,
223
225
  metadata: { lang: "en" }
224
226
  });
225
227
  } finally {
226
- Ye.current.delete(w);
228
+ Xe.current.delete(w);
227
229
  }
228
230
  }, [
229
- F,
230
- B,
231
- j,
231
+ I,
232
+ Le,
233
+ M,
232
234
  U,
233
- Be,
235
+ Ve,
234
236
  Pe,
235
- z,
236
- Xe,
237
- M,
237
+ B,
238
+ Ze,
239
+ N,
238
240
  ke,
239
241
  V,
240
242
  Me,
241
243
  Ne,
242
244
  je,
243
- ze,
244
- R,
245
+ Be,
246
+ z,
245
247
  H,
246
- A,
247
- Y,
248
+ j,
249
+ X,
248
250
  Ae
249
- ]), Ze = T((e) => {
250
- X(e);
251
- }, [X]), Qe = T(() => {
252
- let e = [...G].reverse().find((e) => e.role === "user"), t = F ? Je.current[F] ?? [] : [];
253
- e && X(e.content, t);
251
+ ]), Qe = T((e) => {
252
+ Z(e);
253
+ }, [Z]), $e = T(() => {
254
+ let e = [...G].reverse().find((e) => e.role === "user"), t = I ? Ye.current[I] ?? [] : [];
255
+ e && Z(e.content, t);
254
256
  }, [
255
257
  G,
256
- X,
257
- F
258
- ]), Z = ge(X);
258
+ Z,
259
+ I
260
+ ]), Q = O(Z);
259
261
  E(() => {
260
- Z.current = X;
261
- }, [X]);
262
- let $e = D(() => {
262
+ Q.current = Z;
263
+ }, [Z]);
264
+ let et = D(() => {
263
265
  if (q) return null;
264
266
  for (let e = G.length - 1; e >= 0; --e) {
265
267
  let t = G[e];
@@ -271,104 +273,104 @@ var M = ({ visible: Se = !0 }) => {
271
273
  } : null;
272
274
  }
273
275
  return null;
274
- }, [G, q]), et = D(() => G.filter((e) => e.role === "user" || e.role === "assistant").slice(-6).map((e) => ({
276
+ }, [G, q]), tt = D(() => G.filter((e) => e.role === "user" || e.role === "assistant").slice(-6).map((e) => ({
275
277
  id: e.id,
276
278
  role: e.role,
277
279
  text: v(e.content).text.trim()
278
- })).filter((e) => e.text.length > 0), [G]), Q = se({
280
+ })).filter((e) => e.text.length > 0), [G]), $ = se({
279
281
  onSubmit: T((e) => {
280
- Z.current(e, [], { dictated: !0 });
282
+ Q.current(e, [], { dictated: !0 });
281
283
  }, []),
282
- latestReply: $e,
283
- language: g(P, N).tag
284
+ latestReply: et,
285
+ language: g(F, P).tag
284
286
  });
285
287
  E(() => {
286
- !Se && Q.active && Q.end();
287
- }, [Se, Q]), E(() => {
288
+ !Se && $.active && $.end();
289
+ }, [Se, $]), E(() => {
288
290
  let t = e.getState().consumePendingPrompt();
289
- return t && Z.current(t), e.subscribe((t, n) => {
291
+ return t && Q.current(t), e.subscribe((t, n) => {
290
292
  if (t.pendingPrompt && t.pendingPrompt !== n.pendingPrompt) {
291
293
  let t = e.getState().consumePendingPrompt();
292
- t && Z.current(t);
294
+ t && Q.current(t);
293
295
  }
294
296
  });
295
297
  }, []);
296
- let $ = T((t) => {
297
- let n = F ? e.getState().conversations.find((e) => e.id === F) : void 0;
298
+ let nt = T((t) => {
299
+ let n = I ? e.getState().conversations.find((e) => e.id === I) : void 0;
298
300
  if (n && (n.messages.length > 0 || n.backendSessionId)) {
299
301
  if (n.mode !== t) {
300
302
  let n = e.getState().conversations.find((n) => n.mode === t && n.messages.length === 0 && !n.backendSessionId && !e.getState().processingByConversationId[n.id]);
301
- n ? Ie(n.id) : z(void 0, t);
303
+ n ? Ie(n.id) : B(void 0, t);
302
304
  }
303
- } else F && R(F, t);
304
- L(t);
305
+ } else I && z(I, t);
306
+ R(t);
305
307
  }, [
306
- F,
307
- z,
308
+ I,
309
+ B,
308
310
  Ie,
309
- R,
310
- L
311
- ]), tt = T((t) => {
311
+ z,
312
+ R
313
+ ]), rt = T((t) => {
312
314
  if (S.find((e) => e.id === t)?.writeCapable && !e.getState().apiCallsAcknowledged) {
313
- qe(t);
315
+ Je(t);
314
316
  return;
315
317
  }
316
- $(t);
317
- }, [$]), nt = T(() => {
318
- let e = Ke;
319
- qe(null), Ve(), e && $(e);
318
+ nt(t);
319
+ }, [nt]), it = T(() => {
320
+ let e = qe;
321
+ Je(null), He(), e && nt(e);
320
322
  }, [
321
- Ke,
322
- Ve,
323
- $
324
- ]), rt = T(() => {
325
- qe(null);
323
+ qe,
324
+ He,
325
+ nt
326
+ ]), at = T(() => {
327
+ Je(null);
326
328
  }, []);
327
329
  return /* @__PURE__ */ ye("div", {
328
330
  className: "relative flex flex-1 flex-col overflow-hidden",
329
331
  children: [
330
332
  /* @__PURE__ */ ye("div", {
331
333
  className: "contents",
332
- inert: Q.active || void 0,
333
- children: [G.length === 0 ? /* @__PURE__ */ O(C, {
334
- mode: I,
335
- onSuggestionClick: Ze
336
- }) : /* @__PURE__ */ O("div", {
334
+ inert: $.active || void 0,
335
+ children: [G.length === 0 ? /* @__PURE__ */ k(C, {
336
+ mode: L,
337
+ onSuggestionClick: Qe
338
+ }) : /* @__PURE__ */ k("div", {
337
339
  className: "flex min-h-0 flex-1 flex-col",
338
- children: /* @__PURE__ */ O(b, {
340
+ children: /* @__PURE__ */ k(b, {
339
341
  messages: G,
340
- streamingMessageId: He,
341
- failedMessageId: Ue,
342
- onRetry: Qe
342
+ streamingMessageId: Ue,
343
+ failedMessageId: We,
344
+ onRetry: $e
343
345
  })
344
- }), /* @__PURE__ */ O(w, {
345
- onStartVoiceSession: Q.available && I !== "api-calls" ? Q.start : void 0,
346
- onSend: (e, t) => void X(e, t),
346
+ }), /* @__PURE__ */ k(w, {
347
+ onStartVoiceSession: $.available && L !== "api-calls" ? $.start : void 0,
348
+ onSend: (e, t) => void Z(e, t),
347
349
  disabled: q,
348
- placeholder: I === "api-calls" ? A("healthybowl.assistant.chatArea.placeholderActions", "What would you like me to do?") : A("healthybowl.assistant.chatArea.placeholderGeneral", "Ask HealthyBowl anything…"),
349
- mode: I,
350
- availableModes: Ge,
351
- onModeChange: tt
350
+ placeholder: L === "api-calls" ? j("healthybowl.assistant.chatArea.placeholderActions", "What would you like me to do?") : j("healthybowl.assistant.chatArea.placeholderGeneral", "Ask HealthyBowl anything…"),
351
+ mode: L,
352
+ availableModes: Ke,
353
+ onModeChange: rt
352
354
  })]
353
355
  }),
354
- Q.active && /* @__PURE__ */ O(oe, {
355
- session: Q.session,
356
- notice: Q.notice,
357
- turns: et,
358
- onInterrupt: Q.interrupt,
359
- spoken: $e?.text ?? null,
360
- onToggleMute: Q.toggleMute,
361
- onEnd: Q.end
356
+ $.active && /* @__PURE__ */ k(oe, {
357
+ session: $.session,
358
+ notice: $.notice,
359
+ turns: tt,
360
+ onInterrupt: $.interrupt,
361
+ spoken: et?.text ?? null,
362
+ onToggleMute: $.toggleMute,
363
+ onEnd: $.end
362
364
  }),
363
- /* @__PURE__ */ O(x, {
364
- open: Ke !== null,
365
- onConfirm: nt,
366
- onCancel: rt
365
+ /* @__PURE__ */ k(x, {
366
+ open: qe !== null,
367
+ onConfirm: it,
368
+ onCancel: at
367
369
  })
368
370
  ]
369
371
  });
370
372
  };
371
373
  //#endregion
372
- export { M as AssistantChatArea };
374
+ export { N as AssistantChatArea };
373
375
 
374
376
  //# sourceMappingURL=AssistantChatArea.js.map