@burdenoff/microfe-healthybowl 2026.630.3 → 2026.703.1

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.
@@ -5,28 +5,28 @@ import { AssistantChatInput as m } from "./AssistantChatInput.js";
5
5
  import { AssistantMessageList as h } from "./AssistantMessageList.js";
6
6
  import { ASSISTANT_MODES as g } from "../../types/assistant.js";
7
7
  import { AssistantModeSelector as _ } from "./AssistantModeSelector.js";
8
- import { AssistantApiCallsConsentDialog as ee } from "./AssistantApiCallsConsentDialog.js";
9
- import { AssistantWelcome as te } from "./AssistantWelcome.js";
10
- import { useAssistantApiAccess as ne } from "../../hooks/useAssistantApiAccess.js";
11
- import { gatherPageContext as re } from "../../utils/pageContext.js";
12
- import { isQuotaExhaustedError as v } from "../../utils/quotaUtils.js";
13
- import { dispatchAssistantQuotaExhausted as y, notifyAiCreditsUpdated as ie } from "../../utils/aiCredits.js";
14
- import { buildPromptForMode as ae } from "../../utils/assistantPrompt.js";
15
- import { useCallback as b, useEffect as x, useMemo as oe, useRef as se, useState as ce } from "react";
16
- import { Plus as le } from "lucide-react";
17
- import { Fragment as ue, jsx as S, jsxs as C } from "react/jsx-runtime";
18
- import { useGatewayClient as de } from "@burdenoff/fe-libs/shared/graphql";
19
- import { useAuthToken as fe } from "@burdenoff/fe-libs/shared/providers/shell";
8
+ import { AssistantApiCallsConsentDialog as v } from "./AssistantApiCallsConsentDialog.js";
9
+ import { AssistantWelcome as ee } from "./AssistantWelcome.js";
10
+ import { useAssistantApiAccess as te } from "../../hooks/useAssistantApiAccess.js";
11
+ import { gatherPageContext as ne } from "../../utils/pageContext.js";
12
+ import { isQuotaExhaustedError as re } from "../../utils/quotaUtils.js";
13
+ import { dispatchAssistantQuotaExhausted as ie, notifyAiCreditsUpdated as ae } from "../../utils/aiCredits.js";
14
+ import { buildPromptForMode as oe } from "../../utils/assistantPrompt.js";
15
+ import { useCallback as y, useEffect as b, useMemo as se, useRef as ce, useState as le } from "react";
16
+ import { Plus as ue } from "lucide-react";
17
+ import { Fragment as de, jsx as x, jsxs as S } from "react/jsx-runtime";
18
+ import { useGatewayClient as fe } from "@burdenoff/fe-libs/shared/graphql";
19
+ import { useAuthToken as pe } from "@burdenoff/fe-libs/shared/providers/shell";
20
20
  //#region src/components/assistant/AssistantChatArea.tsx
21
- var pe = {
21
+ var me = {
22
22
  general: 18e4,
23
23
  "api-calls": 18e4,
24
24
  "vibe-plugins": 6e5
25
- }, me = 18e4;
26
- function w() {
25
+ }, he = 18e4;
26
+ function ge() {
27
27
  return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
28
28
  }
29
- function T(e) {
29
+ function C(e) {
30
30
  try {
31
31
  let t = e === "workspaceId" ? "burdenoff-active-context-workspace" : "burdenoff-active-context-organization", n = localStorage.getItem(t);
32
32
  if (n) return n;
@@ -38,13 +38,13 @@ function T(e) {
38
38
  return "";
39
39
  }
40
40
  }
41
- function he() {
42
- return new URLSearchParams(window.location.search).get("workspace") ?? T("workspaceId");
41
+ function _e() {
42
+ return new URLSearchParams(window.location.search).get("workspace") ?? C("workspaceId");
43
43
  }
44
- function ge() {
45
- return new URLSearchParams(window.location.search).get("org") ?? T("organizationId");
44
+ function ve() {
45
+ return new URLSearchParams(window.location.search).get("org") ?? C("organizationId");
46
46
  }
47
- function _e(e) {
47
+ function ye(e) {
48
48
  let t = e instanceof Error ? e.message.toLowerCase() : String(e).toLowerCase();
49
49
  return t.includes("rate limit exceeded") || t.includes("unauthorized") || t.includes("k8s api error 401") ? !1 : [
50
50
  "sandbox not found",
@@ -59,35 +59,35 @@ function _e(e) {
59
59
  "session mode mismatch"
60
60
  ].some((e) => t.includes(e));
61
61
  }
62
- function ve(e) {
62
+ function be(e) {
63
63
  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]");
64
64
  }
65
- function E(e) {
65
+ function w(e) {
66
66
  return e.info?.time?.created ?? 0;
67
67
  }
68
- function D(e) {
68
+ function T(e) {
69
69
  return (e ?? []).filter((e) => e.type === "text" && typeof e.text == "string").map((e) => e.text?.trim() ?? "").filter(Boolean).join("\n");
70
70
  }
71
- function O(e) {
71
+ function E(e) {
72
72
  return (e ?? []).filter((e) => e.type === "tool" && e.tool).map((e) => {
73
73
  let t = e.state?.status ?? "running", n = e.tool ?? "tool";
74
74
  return t === "completed" ? `Completed: ${n}` : t === "failed" ? `Failed: ${n}` : `Running: ${n}`;
75
75
  });
76
76
  }
77
- function ye(e, t) {
78
- let n = e.filter((e) => e.info?.role === "assistant" && E(e) >= t).sort((e, t) => E(e) - E(t));
77
+ function xe(e, t) {
78
+ let n = e.filter((e) => e.info?.role === "assistant" && w(e) > t).sort((e, t) => w(e) - w(t));
79
79
  if (n.length === 0) return {
80
80
  content: "Thinking...",
81
81
  done: !1
82
82
  };
83
- let r = n[n.length - 1], i = D(r.parts), a = O(r.parts);
83
+ let r = n[n.length - 1], i = T(r.parts), a = E(r.parts);
84
84
  return {
85
85
  content: [i, ...a].filter(Boolean).join("\n\n") || "Thinking...",
86
86
  done: !!r.info?.time?.completed && (!!i || a.length > 0),
87
87
  tokens: r.info?.tokens
88
88
  };
89
89
  }
90
- function be(e) {
90
+ function Se(e) {
91
91
  switch (e) {
92
92
  case "provisioning": return "Starting assistant environment...";
93
93
  case "connecting": return "Connecting to assistant...";
@@ -95,78 +95,78 @@ function be(e) {
95
95
  default: return "";
96
96
  }
97
97
  }
98
- var k = ({ messagesExpanded: T = !1 }) => {
99
- let E = t(), D = de("workspace"), { getAccessToken: O, getWorkspaceToken: k, userId: A } = fe(), { conversations: j, activeConversationId: M, mode: N, processingByConversationId: P, setMode: F, setConversationMode: I, setActiveConversation: L, createConversation: R, addMessage: z, updateMessage: B, patchMessage: V, setConversationProcessing: H, clearConversationProcessing: xe, setBackendSessionId: U, clearBackendSessionId: W, setSandbox: G, clearSandbox: Se, acknowledgeApiCalls: Ce } = e(), we = j.find((e) => e.id === M)?.messages ?? [], K = M ? P[M] : void 0, Te = K?.messageId ?? null, Ee = K?.status === "provisioning" || K?.status === "connecting" || K?.status === "streaming", { canUseApiCalls: q, loading: De } = ne(ge()), Oe = oe(() => g.filter((e) => !e.requiresAdmin || q), [q]), [J, Y] = ce(null);
100
- x(() => {
101
- if (De) return;
102
- let e = g.find((e) => e.id === N);
103
- (!e || e.requiresAdmin && !q) && N !== "general" && F("general");
98
+ var D = ({ messagesExpanded: C = !1 }) => {
99
+ let T = t(), E = fe("workspace"), { getAccessToken: D, getWorkspaceToken: O, userId: k } = pe(), { conversations: A, activeConversationId: j, mode: M, processingByConversationId: N, setMode: P, setConversationMode: F, setActiveConversation: I, createConversation: L, addMessage: R, updateMessage: z, patchMessage: B, setConversationProcessing: V, clearConversationProcessing: Ce, setBackendSessionId: H, clearBackendSessionId: U, setSandbox: W, clearSandbox: we, acknowledgeApiCalls: Te } = e(), Ee = A.find((e) => e.id === j)?.messages ?? [], G = j ? N[j] : void 0, De = G?.messageId ?? null, Oe = G?.status === "provisioning" || G?.status === "connecting" || G?.status === "streaming", { canUseApiCalls: K, loading: ke } = te(ve()), Ae = se(() => g.filter((e) => !e.requiresAdmin || K), [K]), [q, J] = le(null);
100
+ b(() => {
101
+ if (ke) return;
102
+ let e = g.find((e) => e.id === M);
103
+ (!e || e.requiresAdmin && !K) && M !== "general" && P("general");
104
104
  }, [
105
- N,
106
- q,
107
- De,
108
- F
105
+ M,
106
+ K,
107
+ ke,
108
+ P
109
109
  ]);
110
- let X = b((e, t, n, r) => {
111
- H(e, n, t, null), r ? B(e, t, r) : B(e, t, be(n));
112
- }, [H, B]), ke = b(async (t, n, a, s, c) => {
110
+ let Y = y((e, t, n, r) => {
111
+ V(e, n, t, null), r ? z(e, t, r) : z(e, t, Se(n));
112
+ }, [V, z]), X = y(async (t, n, a, s, c) => {
113
113
  let u = e.getState().sandboxesByMode[a]?.sandboxId ?? null;
114
114
  if (!u) {
115
- X(t, n, "provisioning", "Looking for existing environment...");
116
- let e = await o(D, s, a, c);
117
- if (e) u = e, G(a, u, "provisioning"), X(t, n, "provisioning", "Reusing assistant environment..."), await p(D, u, s, c, 3e5, (e) => X(t, n, "provisioning", e)), await f(D, u, s, c, 9e4, (e) => X(t, n, "connecting", e)), G(a, u, "running");
115
+ Y(t, n, "provisioning", "Looking for existing environment...");
116
+ let e = await o(E, s, a, c);
117
+ if (e) u = e, W(a, u, "provisioning"), Y(t, n, "provisioning", "Reusing assistant environment..."), await p(E, u, s, c, 3e5, (e) => Y(t, n, "provisioning", e)), await f(E, u, s, c, 9e4, (e) => Y(t, n, "connecting", e)), W(a, u, "running");
118
118
  else {
119
- if (a === "api-calls" && !O()) throw Error("API Calls mode requires an authenticated session. Please sign in again.");
120
- X(t, n, "provisioning", "Starting assistant environment..."), G(a, null, "provisioning"), u = await r(D, a, s, c), G(a, u, "provisioning"), await p(D, u, s, c, 3e5, (e) => X(t, n, "provisioning", e)), await f(D, u, s, c, 9e4, (e) => X(t, n, "connecting", e)), G(a, u, "running");
119
+ if (a === "api-calls" && !D()) throw Error("API Calls mode requires an authenticated session. Please sign in again.");
120
+ Y(t, n, "provisioning", "Starting assistant environment..."), W(a, null, "provisioning"), u = await r(E, a, s, c), W(a, u, "provisioning"), await p(E, u, s, c, 3e5, (e) => Y(t, n, "provisioning", e)), await f(E, u, s, c, 9e4, (e) => Y(t, n, "connecting", e)), W(a, u, "running");
121
121
  }
122
122
  }
123
123
  let d = e.getState().conversations.find((e) => e.id === t)?.backendSessionId ?? null;
124
124
  if (d) try {
125
- let e = await l(D, u, s, d, c);
125
+ let e = await l(E, u, s, d, c);
126
126
  if (e.mode !== a) throw Error(`Session mode mismatch: expected ${a}, received ${e.mode}`);
127
127
  } catch {
128
- W(t), d = null;
128
+ U(t), d = null;
129
129
  }
130
- return d || (X(t, n, "connecting", "Preparing session..."), d = (await i(D, u, s, a, c)).sessionId, U(t, d)), {
130
+ return d || (Y(t, n, "connecting", "Preparing session..."), d = (await i(E, u, s, a, c)).sessionId, H(t, d)), {
131
131
  sandboxId: u,
132
132
  sessionId: d
133
133
  };
134
134
  }, [
135
+ E,
136
+ U,
135
137
  D,
138
+ H,
136
139
  W,
137
- O,
138
- U,
139
- G,
140
- X
141
- ]), Z = b(async (t) => {
142
- if (M) {
143
- let e = P[M]?.status;
140
+ Y
141
+ ]), Z = y(async (t) => {
142
+ if (j) {
143
+ let e = N[j]?.status;
144
144
  if (e === "provisioning" || e === "connecting" || e === "streaming") return;
145
145
  }
146
- let r = e.getState().mode, i = M, o = i ? e.getState().conversations.find((e) => e.id === i) : void 0;
147
- if (i ? o && o.mode !== r && (o.messages.length > 0 || o.backendSessionId) ? i = R(void 0, r) : o && o.mode !== r && I(i, r) : i = R(void 0, r), !i) return;
148
- let l = he(), f = {
149
- accessToken: O(),
150
- workspaceToken: k(),
151
- userId: A,
152
- organizationId: ge()
146
+ let r = e.getState().mode, i = j, o = i ? e.getState().conversations.find((e) => e.id === i) : void 0;
147
+ if (i ? o && o.mode !== r && (o.messages.length > 0 || o.backendSessionId) ? i = L(void 0, r) : o && o.mode !== r && F(i, r) : i = L(void 0, r), !i) return;
148
+ let l = _e(), f = {
149
+ accessToken: D(),
150
+ workspaceToken: O(),
151
+ userId: k,
152
+ organizationId: ve()
153
153
  }, p = {
154
- id: w(),
154
+ id: ge(),
155
155
  role: "user",
156
156
  content: t,
157
157
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
158
158
  };
159
- z(i, p);
160
- let m = w();
161
- z(i, {
159
+ R(i, p);
160
+ let m = ge();
161
+ R(i, {
162
162
  id: m,
163
163
  role: "assistant",
164
164
  content: "",
165
165
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
166
166
  });
167
167
  let h = (e, t, n, a) => {
168
- V(i, m, {
169
- content: ve(e),
168
+ B(i, m, {
169
+ content: be(e),
170
170
  metadata: t?.length || n || a ? {
171
171
  artifacts: t,
172
172
  mode: r,
@@ -176,35 +176,33 @@ var k = ({ messagesExpanded: T = !1 }) => {
176
176
  });
177
177
  }, g = async (e = 1) => {
178
178
  try {
179
- await n(D, l, f);
179
+ await n(E, l, f);
180
180
  } catch (e) {
181
- if (v(e)) {
182
- y("ai-credits"), h("You've run out of AI credits for this billing cycle. Upgrade your plan to keep chatting."), H(i, "error", m, null);
181
+ if (re(e)) {
182
+ ie("ai-credits"), h("You've run out of AI credits for this billing cycle. Upgrade your plan to keep chatting."), V(i, "error", m, null);
183
183
  return;
184
184
  }
185
185
  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);
186
186
  }
187
187
  try {
188
- let { sandboxId: e, sessionId: n } = await ke(i, m, r, l, f);
189
- X(i, m, "streaming", "Thinking...");
190
- let o = Date.now();
191
- await d(D, e, l, n, ae(r, t), r, re(), f);
192
- let p = ye([], o), g = Date.now() + (pe[r] ?? me), _ = Date.now();
193
- for (; Date.now() < g && (p = ye(await c(D, e, l, n, f, 50), o), V(i, m, { content: ve(p.content) }), !p.done);) Date.now() - _ > 3e4 && (await a(D, e, l, 600, f).catch(() => void 0), _ = Date.now()), await new Promise((e) => setTimeout(e, 1500));
188
+ let { sandboxId: e, sessionId: n } = await X(i, m, r, l, f), o = (await c(E, e, l, n, f, 50).catch(() => [])).reduce((e, t) => Math.max(e, w(t)), 0);
189
+ Y(i, m, "streaming", "Thinking..."), await d(E, e, l, n, oe(r, t), r, ne(), f);
190
+ let p = xe([], o), g = Date.now() + (me[r] ?? he), _ = Date.now();
191
+ for (; Date.now() < g && (p = xe(await c(E, e, l, n, f, 50), o), B(i, m, { content: be(p.content) }), !p.done);) Date.now() - _ > 3e4 && (await a(E, e, l, 600, f).catch(() => void 0), _ = Date.now()), await new Promise((e) => setTimeout(e, 1500));
194
192
  if (!p.done && r !== "vibe-plugins") throw Error("Assistant response timed out while streaming progress");
195
- let ee = r === "vibe-plugins" ? await s(D, e, l, n, f).catch(() => []) : void 0;
193
+ let v = r === "vibe-plugins" ? await s(E, e, l, n, f).catch(() => []) : void 0;
196
194
  if (p.done || (p = {
197
195
  ...p,
198
196
  content: `${p.content}\n\n_Still building in the background — any artifacts below will finish shortly. Re-open this conversation to pick up the completed plugin._`
199
- }), h(p.content, ee, n, e), p.tokens) {
200
- V(i, m, { tokens: p.tokens });
197
+ }), h(p.content, v, n, e), p.tokens) {
198
+ B(i, m, { tokens: p.tokens });
201
199
  try {
202
- await u(D, l, n, p.tokens, f), ie();
200
+ await u(E, l, n, p.tokens, f), ae();
203
201
  } catch {}
204
202
  }
205
- H(i, "complete", m, null);
203
+ V(i, "complete", m, null);
206
204
  } catch (t) {
207
- if (e === 1 && _e(t)) return W(i), Se(r), g(2);
205
+ if (e === 1 && ye(t)) return U(i), we(r), g(2);
208
206
  throw t;
209
207
  }
210
208
  };
@@ -212,38 +210,38 @@ var k = ({ messagesExpanded: T = !1 }) => {
212
210
  if (!l) throw Error("Assistant backend is unavailable without an active workspace context.");
213
211
  await g();
214
212
  } catch (e) {
215
- if (v(e)) {
216
- y("sandbox"), h("You've reached your sandbox limit on the current plan. Upgrade to start the AI assistant."), H(i, "error", m, null);
213
+ if (re(e)) {
214
+ ie("sandbox"), h("You've reached your sandbox limit on the current plan. Upgrade to start the AI assistant."), V(i, "error", m, null);
217
215
  return;
218
216
  }
219
217
  let t = e instanceof Error ? e.message : "Something went wrong";
220
- H(i, "error", m, t), B(i, m, `Sorry, an error occurred: ${t}. Please try again.`);
218
+ V(i, "error", m, t), z(i, m, `Sorry, an error occurred: ${t}. Please try again.`);
221
219
  }
222
220
  }, [
223
- M,
224
- z,
225
- D,
226
- W,
227
- Se,
228
221
  j,
229
222
  R,
230
- ke,
231
- O,
232
- k,
233
- V,
234
- P,
223
+ E,
235
224
  U,
236
- I,
237
- H,
225
+ we,
226
+ A,
227
+ L,
238
228
  X,
229
+ D,
230
+ O,
239
231
  B,
240
- A
241
- ]), Ae = b((e) => {
232
+ N,
233
+ H,
234
+ F,
235
+ V,
236
+ Y,
237
+ z,
238
+ k
239
+ ]), je = y((e) => {
242
240
  Z(e);
243
- }, [Z]), Q = se(Z);
244
- x(() => {
241
+ }, [Z]), Q = ce(Z);
242
+ b(() => {
245
243
  Q.current = Z;
246
- }, [Z]), x(() => {
244
+ }, [Z]), b(() => {
247
245
  let t = e.getState().consumePendingPrompt();
248
246
  return t && Q.current(t), e.subscribe((t, n) => {
249
247
  if (t.pendingPrompt && t.pendingPrompt !== n.pendingPrompt) {
@@ -252,86 +250,86 @@ var k = ({ messagesExpanded: T = !1 }) => {
252
250
  }
253
251
  });
254
252
  }, []);
255
- let $ = b((t) => {
256
- let n = M ? e.getState().conversations.find((e) => e.id === M) : void 0;
253
+ let $ = y((t) => {
254
+ let n = j ? e.getState().conversations.find((e) => e.id === j) : void 0;
257
255
  if (n && (n.messages.length > 0 || n.backendSessionId)) {
258
256
  if (n.mode !== t) {
259
257
  let n = e.getState().conversations.find((n) => n.mode === t && n.messages.length === 0 && !n.backendSessionId && !e.getState().processingByConversationId[n.id]);
260
- n ? L(n.id) : R(void 0, t);
258
+ n ? I(n.id) : L(void 0, t);
261
259
  }
262
- } else M && I(M, t);
263
- F(t);
260
+ } else j && F(j, t);
261
+ P(t);
264
262
  }, [
265
- M,
266
- R,
263
+ j,
267
264
  L,
268
265
  I,
269
- F
270
- ]), je = b((t) => {
266
+ F,
267
+ P
268
+ ]), Me = y((t) => {
271
269
  if (g.find((e) => e.id === t)?.writeCapable && !e.getState().apiCallsAcknowledged) {
272
- Y(t);
270
+ J(t);
273
271
  return;
274
272
  }
275
273
  $(t);
276
- }, [$]), Me = b(() => {
277
- let e = J;
278
- Y(null), Ce(), e && $(e);
274
+ }, [$]), Ne = y(() => {
275
+ let e = q;
276
+ J(null), Te(), e && $(e);
279
277
  }, [
280
- J,
281
- Ce,
278
+ q,
279
+ Te,
282
280
  $
283
- ]), Ne = b(() => {
284
- Y(null);
281
+ ]), Pe = y(() => {
282
+ J(null);
285
283
  }, []);
286
- return /* @__PURE__ */ C("div", {
284
+ return /* @__PURE__ */ S("div", {
287
285
  className: "flex flex-col flex-1 overflow-hidden",
288
286
  children: [
289
- we.length === 0 ? /* @__PURE__ */ S(te, {
290
- mode: N,
291
- onSuggestionClick: Ae
292
- }) : /* @__PURE__ */ C(ue, { children: [/* @__PURE__ */ S("div", {
293
- className: `grid min-h-0 transition-[grid-template-rows] duration-300 ease-out ${T ? "flex-1" : "flex-shrink-0"}`,
294
- style: { gridTemplateRows: T ? "1fr" : "0fr" },
295
- inert: !T || void 0,
287
+ Ee.length === 0 ? /* @__PURE__ */ x(ee, {
288
+ mode: M,
289
+ onSuggestionClick: je
290
+ }) : /* @__PURE__ */ S(de, { children: [/* @__PURE__ */ x("div", {
291
+ className: `grid min-h-0 transition-[grid-template-rows] duration-300 ease-out ${C ? "flex-1" : "flex-shrink-0"}`,
292
+ style: { gridTemplateRows: C ? "1fr" : "0fr" },
293
+ inert: !C || void 0,
296
294
  "data-testid": "message-transcript",
297
- children: /* @__PURE__ */ S("div", {
298
- className: `min-h-0 overflow-hidden transition-opacity duration-300 ${T ? "opacity-100" : "opacity-0"}`,
299
- children: /* @__PURE__ */ S("div", {
295
+ children: /* @__PURE__ */ x("div", {
296
+ className: `min-h-0 overflow-hidden transition-opacity duration-300 ${C ? "opacity-100" : "opacity-0"}`,
297
+ children: /* @__PURE__ */ x("div", {
300
298
  className: "flex h-full flex-col",
301
- children: /* @__PURE__ */ S(h, {
302
- messages: we,
303
- streamingMessageId: Te,
304
- expanded: T
299
+ children: /* @__PURE__ */ x(h, {
300
+ messages: Ee,
301
+ streamingMessageId: De,
302
+ expanded: C
305
303
  })
306
304
  })
307
305
  })
308
- }), !T && /* @__PURE__ */ S("div", { className: "flex-1" })] }),
309
- /* @__PURE__ */ S(m, {
306
+ }), !C && /* @__PURE__ */ x("div", { className: "flex-1" })] }),
307
+ /* @__PURE__ */ x(m, {
310
308
  onSend: (e) => void Z(e),
311
- disabled: Ee,
312
- placeholder: N === "api-calls" ? E("healthybowl.assistant.chatArea.placeholderActions", "What would you like to change or create?") : E("healthybowl.assistant.chatArea.placeholderGeneral", "Ask anything about your farm…"),
313
- toolbarStart: /* @__PURE__ */ C(ue, { children: [/* @__PURE__ */ S("button", {
309
+ disabled: Oe,
310
+ placeholder: M === "api-calls" ? T("healthybowl.assistant.chatArea.placeholderActions", "What would you like to change or create?") : T("healthybowl.assistant.chatArea.placeholderGeneral", "Ask anything about your farm…"),
311
+ toolbarStart: /* @__PURE__ */ S(de, { children: [/* @__PURE__ */ x("button", {
314
312
  type: "button",
315
- onClick: () => R(),
313
+ onClick: () => L(),
316
314
  className: "flex size-7 flex-shrink-0 items-center justify-center rounded-full text-text-secondary transition-colors hover:bg-bg-elevated hover:text-text-primary",
317
- "aria-label": E("healthybowl.assistant.chatArea.newConversation", "New conversation"),
315
+ "aria-label": T("healthybowl.assistant.chatArea.newConversation", "New conversation"),
318
316
  "data-testid": "composer-new-conversation",
319
- children: /* @__PURE__ */ S(le, { className: "size-4" })
320
- }), /* @__PURE__ */ S(_, {
321
- mode: N,
322
- availableModes: Oe,
323
- onModeChange: je
317
+ children: /* @__PURE__ */ x(ue, { className: "size-4" })
318
+ }), /* @__PURE__ */ x(_, {
319
+ mode: M,
320
+ availableModes: Ae,
321
+ onModeChange: Me
324
322
  })] })
325
323
  }),
326
- /* @__PURE__ */ S(ee, {
327
- open: J !== null,
328
- onConfirm: Me,
329
- onCancel: Ne
324
+ /* @__PURE__ */ x(v, {
325
+ open: q !== null,
326
+ onConfirm: Ne,
327
+ onCancel: Pe
330
328
  })
331
329
  ]
332
330
  });
333
331
  };
334
332
  //#endregion
335
- export { k as AssistantChatArea };
333
+ export { D as AssistantChatArea };
336
334
 
337
335
  //# sourceMappingURL=AssistantChatArea.js.map