@burdenoff/fe-libs 2026.910.4 → 2026.910.5

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.
@@ -1,75 +1,75 @@
1
1
  import { useI18n as e } from "../../providers/shell/I18nProvider.js";
2
2
  import { useAuthToken as t } from "../../providers/shell/AuthTokenProvider.js";
3
3
  import "../../../shared-providers-shell.js";
4
- import { describeQuotaError as n } from "../quota.js";
5
- import { abortAssistantTurn as r, approvePendingWrite as i, createAssistantSandbox as a, createAssistantSession as o, extendAssistantSandboxTTL as s, findExistingSandbox as c, getAssistantArtifacts as l, getAssistantMessages as u, getAssistantSession as d, releaseSupersededAssistantSandboxes as f, sendAssistantPromptAsync as ee, waitForAssistantServiceReady as p, waitForSandboxRunning as m } from "../api.js";
6
- import { getAssistantMedia as h, sanitize as te } from "../progress.js";
7
- import { isVoiceTurn as g, voiceMarker as _, voiceSessionIdOf as ne } from "../voice/turnVisibility.js";
8
- import { buildContinuedFromVoiceNote as v, buildVoiceTranscriptMarkdown as y, voiceTranscriptFilename as re } from "../voice/voiceTranscript.js";
9
- import { pollDelayMs as ie } from "../voice/assistantPollSchedule.js";
10
- import { toCaptionText as b } from "../voice/captionText.js";
11
- import { resolveAssistantLanguage as ae } from "../voice/languages.js";
12
- import { resolveLanguagePair as oe } from "../voice/languagePair.js";
13
- import { findPendingWrite as x } from "../pendingWrite.js";
14
- import { useAssistantProduct as se } from "../product.js";
15
- import { useAssistantTr as ce } from "../i18n.js";
16
- import { buildPromptParts as le, buildPromptWithAttachments as ue, countInlineImageCandidates as de, countInlinedImageParts as fe, getSendableAttachments as pe, toMessageAttachment as me } from "../attachments.js";
17
- import { useAssistantStore as S } from "../store.js";
18
- import { isTurnInFlight as he, planAbandonedTurn as ge, planTurnAbort as _e } from "../turnState.js";
19
- import { STAGE_COPY as C, isStageCopy as ve, stageText as w, statusStageCopy as ye, thinkingPhrase as be } from "../stageCopy.js";
20
- import { parseToolActivity as xe } from "./AssistantToolActivity.js";
21
- import { useVoiceSession as Se } from "./useVoiceSession.js";
22
- import { getOrganizationId as Ce, getWorkspaceId as we } from "../context.js";
23
- import { createReadinessTracker as Te } from "../sandboxReadiness.js";
24
- import { AssistantSpokenTurnsNotice as Ee } from "./AssistantSpokenTurnsNotice.js";
25
- import { VoiceTranscriptDrawer as De } from "./voice/VoiceTranscriptDrawer.js";
26
- import { downloadFile as Oe } from "../exportConversation.js";
27
- import { AssistantEmptyState as ke } from "./AssistantEmptyState.js";
28
- import { AssistantMessageList as Ae } from "./AssistantMessageList.js";
29
- import { AssistantVoiceSession as je } from "./voice/AssistantVoiceSession.js";
30
- import { useAssistantApiAccess as Me } from "../useAssistantApiAccess.js";
31
- import { useConversationTurns as Ne } from "../useConversationTurns.js";
32
- import { isMultimodalBodyRejection as Pe, isRecoverableAssistantError as Fe } from "../transportErrors.js";
33
- import { dispatchAssistantQuotaExhausted as Ie, notifyAiCreditsUpdated as Le } from "../aiCredits.js";
34
- import { useAssistantAttachments as Re } from "../useAssistantAttachments.js";
35
- import { AssistantComposer as ze } from "./composer/AssistantComposer.js";
36
- import { isProdRuntime as Be } from "../env.js";
37
- import { AssistantApiCallsConsentDialog as Ve } from "./AssistantApiCallsConsentDialog.js";
38
- import { useCallback as T, useEffect as E, useMemo as D, useRef as O, useState as He } from "react";
39
- import { jsx as k, jsxs as Ue } from "react/jsx-runtime";
4
+ import { useAssistantProduct as n } from "../product.js";
5
+ import { useAssistantTr as r } from "../i18n.js";
6
+ import { describeQuotaError as i } from "../quota.js";
7
+ import { abortAssistantTurn as a, approvePendingWrite as o, createAssistantSandbox as s, createAssistantSession as c, extendAssistantSandboxTTL as l, findExistingSandbox as u, getAssistantArtifacts as ee, getAssistantMessages as te, getAssistantSession as d, releaseSupersededAssistantSandboxes as f, sendAssistantPromptAsync as ne, waitForAssistantServiceReady as p, waitForSandboxRunning as m } from "../api.js";
8
+ import { getAssistantMedia as h, sanitize as re } from "../progress.js";
9
+ import { isVoiceTurn as g, voiceMarker as _, voiceSessionIdOf as v } from "../voice/turnVisibility.js";
10
+ import { buildContinuedFromVoiceNote as ie, buildVoiceTranscriptMarkdown as y, voiceTranscriptFilename as ae } from "../voice/voiceTranscript.js";
11
+ import { pollDelayMs as oe } from "../voice/assistantPollSchedule.js";
12
+ import { toCaptionText as se } from "../voice/captionText.js";
13
+ import { resolveAssistantLanguage as ce } from "../voice/languages.js";
14
+ import { resolveLanguagePair as le } from "../voice/languagePair.js";
15
+ import { findPendingWrite as b } from "../pendingWrite.js";
16
+ import { buildPromptParts as ue, buildPromptWithAttachments as de, countInlineImageCandidates as fe, countInlinedImageParts as pe, getSendableAttachments as me, toMessageAttachment as he } from "../attachments.js";
17
+ import { useAssistantStore as x } from "../store.js";
18
+ import { isTurnInFlight as ge, planAbandonedTurn as _e, planTurnAbort as ve } from "../turnState.js";
19
+ import { STAGE_COPY as S, isStageCopy as ye, stageText as C, statusStageCopy as be, thinkingPhrase as xe } from "../stageCopy.js";
20
+ import { parseToolActivity as Se } from "./AssistantToolActivity.js";
21
+ import { useVoiceSession as Ce } from "./useVoiceSession.js";
22
+ import { getOrganizationId as we, getWorkspaceId as Te } from "../context.js";
23
+ import { createReadinessTracker as Ee } from "../sandboxReadiness.js";
24
+ import { AssistantSpokenTurnsNotice as De } from "./AssistantSpokenTurnsNotice.js";
25
+ import { VoiceTranscriptDrawer as Oe } from "./voice/VoiceTranscriptDrawer.js";
26
+ import { downloadFile as ke } from "../exportConversation.js";
27
+ import { AssistantEmptyState as Ae } from "./AssistantEmptyState.js";
28
+ import { AssistantMessageList as je } from "./AssistantMessageList.js";
29
+ import { AssistantVoiceSession as Me } from "./voice/AssistantVoiceSession.js";
30
+ import { useAssistantApiAccess as Ne } from "../useAssistantApiAccess.js";
31
+ import { useConversationTurns as Pe } from "../useConversationTurns.js";
32
+ import { isMultimodalBodyRejection as Fe, isRecoverableAssistantError as Ie } from "../transportErrors.js";
33
+ import { dispatchAssistantQuotaExhausted as Le, notifyAiCreditsUpdated as Re } from "../aiCredits.js";
34
+ import { useAssistantAttachments as ze } from "../useAssistantAttachments.js";
35
+ import { AssistantComposer as Be } from "./composer/AssistantComposer.js";
36
+ import { isProdRuntime as Ve } from "../env.js";
37
+ import { AssistantApiCallsConsentDialog as He } from "./AssistantApiCallsConsentDialog.js";
38
+ import { useCallback as w, useEffect as T, useMemo as E, useRef as D, useState as Ue } from "react";
39
+ import { jsx as O, jsxs as We } from "react/jsx-runtime";
40
40
  //#region src/shared/assistant/ui/AssistantChatArea.tsx
41
- var We = {
41
+ var Ge = {
42
42
  general: 18e4,
43
43
  assistant: 18e4,
44
44
  "api-calls": 18e4,
45
45
  "vibe-plugins": 6e5
46
- }, Ge = 18e4, Ke = 600, qe = 2e4;
47
- function Je() {
46
+ }, Ke = 18e4, qe = 600, Je = 2e4;
47
+ function Ye() {
48
48
  return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
49
49
  }
50
- function Ye(e) {
50
+ function Xe(e) {
51
51
  return e.info?.time?.created ?? 0;
52
52
  }
53
- function A(e) {
53
+ function k(e) {
54
54
  return (e ?? []).filter((e) => e.type === "text" && typeof e.text == "string").map((e) => e.text?.trim() ?? "").filter(Boolean).join("\n");
55
55
  }
56
- function j(e) {
56
+ function A(e) {
57
57
  return (e ?? []).filter((e) => e.type === "tool" && e.tool).map((e) => {
58
58
  let t = e.state?.status ?? "running", n = e.tool ?? "tool";
59
59
  return t === "completed" ? `Completed: ${n}` : t === "failed" ? `Failed: ${n}` : `Running: ${n}`;
60
60
  });
61
61
  }
62
- function Xe(e, t) {
63
- let n = e.filter((e) => e.info?.role === "assistant" && Ye(e) > t).sort((e, t) => Ye(e) - Ye(t));
62
+ function Ze(e, t) {
63
+ let n = e.filter((e) => e.info?.role === "assistant" && Xe(e) > t).sort((e, t) => Xe(e) - Xe(t));
64
64
  if (n.length === 0) return {
65
- content: C.thinking.fallback,
65
+ content: S.thinking.fallback,
66
66
  done: !1
67
67
  };
68
- let r = n[n.length - 1], i = A(r.parts), a = h(r.parts), o = j(r.parts), s = x(r.parts), c = [
68
+ let r = n[n.length - 1], i = k(r.parts), a = h(r.parts), o = A(r.parts), s = b(r.parts), c = [
69
69
  i,
70
70
  ...a,
71
71
  ...o
72
- ].filter(Boolean).join("\n\n") || C.thinking.fallback, l = r.info?.providerID, u = r.info?.modelID;
72
+ ].filter(Boolean).join("\n\n") || S.thinking.fallback, l = r.info?.providerID, u = r.info?.modelID;
73
73
  return {
74
74
  content: c,
75
75
  done: !!r.info?.time?.completed && (!!i || a.length > 0 || o.length > 0),
@@ -79,29 +79,29 @@ function Xe(e, t) {
79
79
  ...s ? { pendingWrite: s } : {}
80
80
  };
81
81
  }
82
- var M = ({ visible: h = !0, writeAccess: x = "unknown" }) => {
83
- let A = ce(), { product: j, modes: M, gatherPageContext: Ze, buildPrompt: Qe, reportTokenUsage: $e } = se(), { getAccessToken: N, getWorkspaceToken: P, userId: F } = t(), { locale: et } = e(), tt = S((e) => e.assistantLanguage), nt = S((e) => e.replyLanguage), rt = D(() => oe(tt, nt, et), [
84
- tt,
82
+ var j = ({ visible: h = !0, writeAccess: b = "unknown" }) => {
83
+ let k = r(), { product: A, modes: j, gatherPageContext: Qe, buildPrompt: $e, reportTokenUsage: et } = n(), { getAccessToken: M, getWorkspaceToken: N, userId: P } = t(), { locale: tt } = e(), nt = x((e) => e.assistantLanguage), rt = x((e) => e.replyLanguage), it = E(() => le(nt, rt, tt), [
85
84
  nt,
86
- et
87
- ]), it = rt.reply.english, at = rt.replyIsExplicit, ot = rt.reply.code, { conversations: st, activeConversationId: I, mode: L, processingByConversationId: ct, setMode: lt, setConversationMode: ut, setActiveConversation: dt, createConversation: R, addMessage: z, updateMessage: B, patchMessage: V, mergeMessageMetadata: ft, setConversationProcessing: H, clearConversationProcessing: pt, setBackendSessionId: mt, clearBackendSessionId: ht, setSandbox: U, clearSandbox: gt, acknowledgeApiCalls: _t } = S(), vt = st.find((e) => e.id === I), W = Ne(vt), yt = W.all, bt = I ? ct[I] : void 0, xt = he(bt?.status), St = xt ? bt?.messageId ?? null : null, Ct = bt?.status === "error" ? bt.messageId : null, { canUseApiCalls: wt, loading: Tt } = Me(Ce()), Et = D(() => M.filter((e) => !e.requiresAdmin || wt), [M, wt]), [Dt, Ot] = He(null), [kt, At] = He(!1), jt = O({}), Mt = O(Te()), Nt = O(/* @__PURE__ */ new Set()), Pt = D(() => M.find((e) => e.id === L), [M, L]);
88
- E(() => {
89
- Tt || (!Pt || Pt.requiresAdmin && !wt) && L !== "assistant" && lt("assistant");
85
+ rt,
86
+ tt
87
+ ]), at = it.reply.english, ot = it.replyIsExplicit, st = it.reply.code, { conversations: ct, activeConversationId: F, mode: I, processingByConversationId: lt, setMode: ut, setConversationMode: dt, setActiveConversation: ft, createConversation: L, addMessage: R, updateMessage: z, patchMessage: B, mergeMessageMetadata: pt, setConversationProcessing: V, clearConversationProcessing: mt, setBackendSessionId: ht, clearBackendSessionId: gt, setSandbox: H, clearSandbox: _t, acknowledgeApiCalls: vt } = x(), yt = ct.find((e) => e.id === F), U = Pe(yt), bt = U.all, xt = F ? lt[F] : void 0, St = ge(xt?.status), Ct = St ? xt?.messageId ?? null : null, wt = xt?.status === "error" ? xt.messageId : null, { canUseApiCalls: Tt, loading: Et } = Ne(we()), Dt = E(() => j.filter((e) => !e.requiresAdmin || Tt), [j, Tt]), [Ot, kt] = Ue(null), [At, W] = Ue(!1), jt = D({}), Mt = D(Ee()), Nt = D(/* @__PURE__ */ new Set()), Pt = E(() => j.find((e) => e.id === I), [j, I]);
88
+ T(() => {
89
+ Et || (!Pt || Pt.requiresAdmin && !Tt) && I !== "assistant" && ut("assistant");
90
90
  }, [
91
- L,
91
+ I,
92
92
  Pt,
93
- wt,
94
93
  Tt,
95
- lt
94
+ Et,
95
+ ut
96
96
  ]);
97
- let G = T((e, t, n, r) => {
98
- H(e, n, t, null), r ? B(e, t, r) : B(e, t, ye(A, n));
97
+ let G = w((e, t, n, r) => {
98
+ V(e, n, t, null), r ? z(e, t, r) : z(e, t, be(k, n));
99
99
  }, [
100
- H,
101
- B,
102
- A
103
- ]), Ft = T(async (e, t, n, r, i) => {
104
- let s = S.getState().sandboxesByMode[n]?.sandboxId ?? null, l = async (e) => {
100
+ V,
101
+ z,
102
+ k
103
+ ]), Ft = w(async (e, t, n, r, i) => {
104
+ let a = x.getState().sandboxesByMode[n]?.sandboxId ?? null, o = async (e) => {
105
105
  if (Mt.current.isFresh(e)) return !0;
106
106
  try {
107
107
  return await m(e, r, i, 3e5), await p(e, r, i, 9e4), Mt.current.markVerified(e), !0;
@@ -109,453 +109,453 @@ var M = ({ visible: h = !0, writeAccess: x = "unknown" }) => {
109
109
  return Mt.current.invalidate(e), !1;
110
110
  }
111
111
  };
112
- if (s && (U(n, s, "provisioning"), G(e, t, "provisioning", w(A, C.reusingEnvironment)), await l(s) || (U(n, null, "provisioning"), s = null)), !s) {
113
- G(e, t, "provisioning", w(A, C.lookingForEnvironment));
114
- let a = await c(r, j, n, Be(), i);
115
- a && (U(n, a, "provisioning"), G(e, t, "provisioning", w(A, C.reusingEnvironment)), await l(a) ? s = a : U(n, null, "provisioning"));
112
+ if (a && (H(n, a, "provisioning"), G(e, t, "provisioning", C(k, S.reusingEnvironment)), await o(a) || (H(n, null, "provisioning"), a = null)), !a) {
113
+ G(e, t, "provisioning", C(k, S.lookingForEnvironment));
114
+ let s = await u(r, A, n, Ve(), i);
115
+ s && (H(n, s, "provisioning"), G(e, t, "provisioning", C(k, S.reusingEnvironment)), await o(s) ? a = s : H(n, null, "provisioning"));
116
116
  }
117
- if (!s) {
118
- if (n === "api-calls" && !N()) throw Error("API Calls mode requires an authenticated session. Please sign in again.");
119
- G(e, t, "provisioning", w(A, C.startingEnvironment)), U(n, null, "provisioning"), await f(r, j, n, Be(), i), s = await a(j, n, r, Be(), Ke, i), U(n, s, "provisioning"), await m(s, r, i, 3e5), await p(s, r, i, 9e4);
117
+ if (!a) {
118
+ if (n === "api-calls" && !M()) throw Error("API Calls mode requires an authenticated session. Please sign in again.");
119
+ G(e, t, "provisioning", C(k, S.startingEnvironment)), H(n, null, "provisioning"), await f(r, A, n, Ve(), i), a = await s(A, n, r, Ve(), qe, i), H(n, a, "provisioning"), await m(a, r, i, 3e5), await p(a, r, i, 9e4);
120
120
  }
121
- U(n, s, "running");
122
- let u = S.getState().conversations.find((t) => t.id === e)?.backendSessionId ?? null;
123
- if (u) try {
124
- let e = await d(s, r, u, i);
121
+ H(n, a, "running");
122
+ let l = x.getState().conversations.find((t) => t.id === e)?.backendSessionId ?? null;
123
+ if (l) try {
124
+ let e = await d(a, r, l, i);
125
125
  if (e.mode !== n) throw Error(`Session mode mismatch: expected ${n}, received ${e.mode}`);
126
126
  } catch {
127
- ht(e), u = null;
127
+ gt(e), l = null;
128
128
  }
129
- return u || (G(e, t, "connecting", w(A, C.preparingSession)), u = (await o(s, r, n, i)).sessionId, mt(e, u)), {
130
- sandboxId: s,
131
- sessionId: u
129
+ return l || (G(e, t, "connecting", C(k, S.preparingSession)), l = (await c(a, r, n, i)).sessionId, ht(e, l)), {
130
+ sandboxId: a,
131
+ sessionId: l
132
132
  };
133
133
  }, [
134
- ht,
135
- N,
136
- j,
137
- mt,
138
- U,
134
+ gt,
135
+ M,
139
136
  A,
137
+ ht,
138
+ H,
139
+ k,
140
140
  G
141
- ]), [It, Lt] = He(null), K = O(/* @__PURE__ */ new Set()), Rt = O(null), zt = T(() => {
142
- let e = S.getState(), t = e.activeConversationId;
141
+ ]), [It, Lt] = Ue(null), K = D(/* @__PURE__ */ new Set()), Rt = D(null), zt = w(() => {
142
+ let e = x.getState(), t = e.activeConversationId;
143
143
  if (!t) return;
144
- let n = e.processingByConversationId[t], i = he(n?.status) ? n?.messageId ?? null : null;
145
- if (!_e({
146
- interruptedTurnId: i,
147
- activeTurnId: i,
148
- alreadyRequested: i ? K.current.has(i) : !1
149
- }).send || !i) return;
150
- K.current.add(i);
151
- let a = e.sandboxesByMode[e.mode]?.sandboxId, o = we(), s = e.conversations.find((e) => e.id === t)?.backendSessionId;
152
- !a || !o || !s || r(a, o, s, {
153
- accessToken: N(),
154
- workspaceToken: P(),
155
- userId: F,
156
- organizationId: Ce()
144
+ let n = e.processingByConversationId[t], r = ge(n?.status) ? n?.messageId ?? null : null;
145
+ if (!ve({
146
+ interruptedTurnId: r,
147
+ activeTurnId: r,
148
+ alreadyRequested: r ? K.current.has(r) : !1
149
+ }).send || !r) return;
150
+ K.current.add(r);
151
+ let i = e.sandboxesByMode[e.mode]?.sandboxId, o = Te(), s = e.conversations.find((e) => e.id === t)?.backendSessionId;
152
+ !i || !o || !s || a(i, o, s, {
153
+ accessToken: M(),
154
+ workspaceToken: N(),
155
+ userId: P,
156
+ organizationId: we()
157
157
  });
158
158
  }, [
159
- F,
160
- N,
161
- P
162
- ]), Bt = T(async (e) => {
163
- let t = S.getState(), n = t.sandboxesByMode[t.mode]?.sandboxId, r = we(), a = t.activeConversationId;
164
- if (!(!n || !r || !a)) {
159
+ P,
160
+ M,
161
+ N
162
+ ]), Bt = w(async (e) => {
163
+ let t = x.getState(), n = t.sandboxesByMode[t.mode]?.sandboxId, r = Te(), i = t.activeConversationId;
164
+ if (!(!n || !r || !i)) {
165
165
  Lt(e);
166
166
  try {
167
- await i(n, r, e, {
168
- accessToken: N(),
169
- workspaceToken: P(),
170
- userId: F,
171
- organizationId: Ce()
167
+ await o(n, r, e, {
168
+ accessToken: M(),
169
+ workspaceToken: N(),
170
+ userId: P,
171
+ organizationId: we()
172
172
  });
173
173
  } catch (e) {
174
- Lt(null), z(a, {
175
- id: Je(),
174
+ Lt(null), R(i, {
175
+ id: Ye(),
176
176
  role: "system",
177
177
  content: e instanceof Error ? e.message : "The change could not be approved.",
178
178
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
179
179
  });
180
180
  return;
181
181
  }
182
- Lt(null), J.current(A("pendingWrite.approvedPrompt", "I approved that change — go ahead."));
182
+ Lt(null), J.current(k("pendingWrite.approvedPrompt", "I approved that change — go ahead."));
183
183
  }
184
184
  }, [
185
- F,
186
- z,
187
- A
188
- ]), q = T(async (e, t = [], r = {}) => {
189
- let i = r.voiceSessionId !== void 0, a = S.getState(), o = a.activeConversationId ?? I;
185
+ P,
186
+ R,
187
+ k
188
+ ]), q = w(async (e, t = [], n = {}) => {
189
+ let r = n.voiceSessionId !== void 0, a = x.getState(), o = a.activeConversationId ?? F;
190
190
  if (o) {
191
- if (he(a.processingByConversationId[o]?.status)) {
192
- let n = a.processingByConversationId[o]?.messageId ?? null;
193
- n && K.current.has(n) && (Rt.current = {
191
+ if (ge(a.processingByConversationId[o]?.status)) {
192
+ let r = a.processingByConversationId[o]?.messageId ?? null;
193
+ r && K.current.has(r) && (Rt.current = {
194
194
  conversationId: o,
195
195
  content: e,
196
196
  attachments: t,
197
- options: r
197
+ options: n
198
198
  });
199
199
  return;
200
200
  }
201
201
  if (Nt.current.has(o)) return;
202
202
  }
203
- let c = a.mode, d = I, f = d ? S.getState().conversations.find((e) => e.id === d) : void 0;
204
- if (d ? f && f.mode !== c && (f.messages.length > 0 || f.backendSessionId) ? d = R(void 0, c) : f && f.mode !== c && ut(d, c) : d = R(void 0, c), !d) return;
205
- jt.current[d] = t;
206
- let p = we(), m = {
207
- accessToken: N(),
208
- workspaceToken: P(),
209
- userId: F,
210
- organizationId: Ce()
211
- }, h = {
212
- id: Je(),
203
+ let s = a.mode, c = F, u = c ? x.getState().conversations.find((e) => e.id === c) : void 0;
204
+ if (c ? u && u.mode !== s && (u.messages.length > 0 || u.backendSessionId) ? c = L(void 0, s) : u && u.mode !== s && dt(c, s) : c = L(void 0, s), !c) return;
205
+ jt.current[c] = t;
206
+ let d = Te(), f = {
207
+ accessToken: M(),
208
+ workspaceToken: N(),
209
+ userId: P,
210
+ organizationId: we()
211
+ }, p = {
212
+ id: Ye(),
213
213
  role: "user",
214
214
  content: e,
215
215
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
216
216
  metadata: {
217
- ...t.length ? { attachments: t.map(me) } : {},
218
- ..._(r.voiceSessionId)
217
+ ...t.length ? { attachments: t.map(he) } : {},
218
+ ..._(n.voiceSessionId)
219
219
  }
220
220
  };
221
- z(d, h);
222
- let g = Je();
223
- z(d, {
224
- id: g,
221
+ R(c, p);
222
+ let m = Ye();
223
+ R(c, {
224
+ id: m,
225
225
  role: "assistant",
226
226
  content: "",
227
227
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
228
228
  metadata: {
229
- lang: ot,
230
- ..._(r.voiceSessionId)
229
+ lang: st,
230
+ ..._(n.voiceSessionId)
231
231
  }
232
- }), H(d, "provisioning", g, null);
233
- let ne = (e, t, n, i, a = ot) => {
234
- V(d, g, { content: te(e) }), ft(d, g, {
232
+ }), V(c, "provisioning", m, null);
233
+ let h = (e, t, r, i, a = st) => {
234
+ B(c, m, { content: re(e) }), pt(c, m, {
235
235
  lang: a,
236
236
  ...t?.length ? { artifacts: t } : {},
237
- ...t?.length || n || i ? { mode: c } : {},
238
- ...n ? { sessionId: n } : {},
237
+ ...t?.length || r || i ? { mode: s } : {},
238
+ ...r ? { sessionId: r } : {},
239
239
  ...i ? { sandboxId: i } : {},
240
- ..._(r.voiceSessionId)
240
+ ..._(n.voiceSessionId)
241
241
  });
242
- }, v = async (n = 1) => {
243
- let r = !1;
242
+ }, g = async (n = 1) => {
243
+ let i = !1;
244
244
  try {
245
- let { sandboxId: n, sessionId: a } = await Ft(d, g, c, p, m), o = (await u(n, p, a, m, { limit: 50 }).catch(() => [])).reduce((e, t) => Math.max(e, Ye(t)), 0);
246
- G(d, g, "streaming", w(A, C.thinking));
247
- let f = ue(e, t), h = Qe?.(c, f, it, at, i) ?? f, _ = le(h, t), v = fe(_), y = v > 0, re = Ze?.();
248
- r = de(t) > v;
245
+ let { sandboxId: n, sessionId: a } = await Ft(c, m, s, d, f), o = (await te(n, d, a, f, { limit: 50 }).catch(() => [])).reduce((e, t) => Math.max(e, Xe(t)), 0);
246
+ G(c, m, "streaming", C(k, S.thinking));
247
+ let u = de(e, t), p = $e?.(s, u, at, ot, r) ?? u, g = ue(p, t), _ = pe(g), v = _ > 0, ie = Qe?.();
248
+ i = fe(t) > _;
249
249
  try {
250
- await ee(n, p, a, h, c, re, m, _?.length ? { parts: _ } : void 0);
250
+ await ne(n, d, a, p, s, ie, f, g?.length ? { parts: g } : void 0);
251
251
  } catch (e) {
252
- if (!_ || !Pe(e)) throw e;
253
- await ee(n, p, a, h, c, re, m, void 0), r ||= y;
252
+ if (!g || !Fe(e)) throw e;
253
+ await ne(n, d, a, p, s, ie, f, void 0), i ||= v;
254
254
  }
255
- let b = Xe([], o), ae = Date.now() + (We[c] ?? Ge), oe = Date.now(), x = Date.now(), se = () => ge({
256
- turnId: g,
257
- abortRequested: K.current.has(g),
258
- activeTurnId: S.getState().processingByConversationId[d]?.messageId ?? null
259
- }), ce = () => {
260
- let e = S.getState().conversations.find((e) => e.id === d)?.messages.find((e) => e.id === g)?.content;
261
- ve(A, e) && B(d, g, w(A, C.stopped));
255
+ let y = Ze([], o), ae = Date.now() + (Ge[s] ?? Ke), se = Date.now(), ce = Date.now(), le = () => _e({
256
+ turnId: m,
257
+ abortRequested: K.current.has(m),
258
+ activeTurnId: x.getState().processingByConversationId[c]?.messageId ?? null
259
+ }), b = () => {
260
+ let e = x.getState().conversations.find((e) => e.id === c)?.messages.find((e) => e.id === m)?.content;
261
+ ye(k, e) && z(c, m, C(k, S.stopped));
262
262
  };
263
263
  for (; Date.now() < ae;) {
264
- let e = se();
264
+ let e = le();
265
265
  if (e.abandon) {
266
- ce(), e.clearProcessing && pt(d);
266
+ b(), e.clearProcessing && mt(c);
267
267
  return;
268
268
  }
269
- if (b = Xe(await u(n, p, a, m, {
269
+ if (y = Ze(await te(n, d, a, f, {
270
270
  limit: 50,
271
271
  sinceMs: o
272
- }), o), V(d, g, { content: ve(A, b.content) ? be(A, Date.now() - x) : te(b.content) }), b.pendingWrite && ft(d, g, { pendingWrite: b.pendingWrite }), b.done) break;
273
- Date.now() - oe > 3e4 && (await s(n, p, 600, m).catch(() => void 0), oe = Date.now()), await new Promise((e) => setTimeout(e, ie(Date.now() - x)));
272
+ }), o), B(c, m, { content: ye(k, y.content) ? xe(k, Date.now() - ce) : re(y.content) }), y.pendingWrite && pt(c, m, { pendingWrite: y.pendingWrite }), y.done) break;
273
+ Date.now() - se > 3e4 && (await l(n, d, 600, f).catch(() => void 0), se = Date.now()), await new Promise((e) => setTimeout(e, oe(Date.now() - ce)));
274
274
  }
275
- if (!b.done && c !== "vibe-plugins") throw Error("Assistant response timed out while streaming progress");
276
- let pe = c === "vibe-plugins" ? await l(n, p, a, m).then((e) => e).catch(() => []) : void 0;
277
- if (b.done || (b = {
278
- ...b,
279
- 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._`
280
- }), r && (b = {
281
- ...b,
282
- content: `${b.content}\n\n${A("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._")}`
283
- }), ne(b.content, pe, a, n), b.tokens) {
284
- V(d, g, { tokens: b.tokens });
275
+ if (!y.done && s !== "vibe-plugins") throw Error("Assistant response timed out while streaming progress");
276
+ let me = s === "vibe-plugins" ? await ee(n, d, a, f).then((e) => e).catch(() => []) : void 0;
277
+ if (y.done || (y = {
278
+ ...y,
279
+ content: `${y.content}\n\n_Still building in the background — any artifacts below will finish shortly. Re-open this conversation to pick up the completed plugin._`
280
+ }), i && (y = {
281
+ ...y,
282
+ content: `${y.content}\n\n${k("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._")}`
283
+ }), h(y.content, me, a, n), y.tokens) {
284
+ B(c, m, { tokens: y.tokens });
285
285
  try {
286
- await $e?.({
287
- workspaceId: p,
286
+ await et?.({
287
+ workspaceId: d,
288
288
  sessionId: a,
289
- messageId: b.messageId,
290
- model: b.model,
291
- tokens: b.tokens
292
- }), Le(j);
289
+ messageId: y.messageId,
290
+ model: y.model,
291
+ tokens: y.tokens
292
+ }), Re(A);
293
293
  } catch {}
294
294
  }
295
- let me = se();
296
- if (me.abandon) {
297
- ce(), me.clearProcessing && pt(d);
295
+ let he = le();
296
+ if (he.abandon) {
297
+ b(), he.clearProcessing && mt(c);
298
298
  return;
299
299
  }
300
- H(d, "complete", g, null);
300
+ V(c, "complete", m, null);
301
301
  } catch (e) {
302
- if (n === 1 && Fe(e)) return ht(d), gt(c), v(2);
302
+ if (n === 1 && Ie(e)) return gt(c), _t(s), g(2);
303
303
  throw e;
304
304
  }
305
- }, y = d;
306
- Nt.current.add(y);
305
+ }, v = c;
306
+ Nt.current.add(v);
307
307
  try {
308
- if (!p) throw Error("Assistant backend is unavailable without an active workspace context.");
309
- await v();
308
+ if (!d) throw Error("Assistant backend is unavailable without an active workspace context.");
309
+ await g();
310
310
  } catch (e) {
311
- Mt.current.invalidate(S.getState().sandboxesByMode[c]?.sandboxId ?? null);
312
- let t = n(e);
311
+ Mt.current.invalidate(x.getState().sandboxesByMode[s]?.sandboxId ?? null);
312
+ let t = i(e);
313
313
  if (t) {
314
- t.refusal === "exhausted" && Ie(j, "sandbox");
314
+ t.refusal === "exhausted" && Le(A, "sandbox");
315
315
  let e = [t.quotaName, t.traceId ? `reference ${t.traceId}` : null].filter(Boolean).join(" · "), n = t.refusal === "exhausted" ? "You've reached your sandbox limit on the current plan. Upgrade to start the AI assistant." : "This workspace has no sandbox allowance provisioned, so the AI assistant cannot start. Upgrading will not help — ask an administrator to provision it.";
316
- ne(e ? `${n}\n\n${e}` : n, void 0, void 0, void 0, "en"), H(d, "error", g, null);
316
+ h(e ? `${n}\n\n${e}` : n, void 0, void 0, void 0, "en"), V(c, "error", m, null);
317
317
  return;
318
318
  }
319
- let i = e instanceof Error ? e.message : "Something went wrong";
320
- H(d, "error", g, i), V(d, g, { content: `Sorry, an error occurred: ${i}. Please try again.` }), ft(d, g, {
319
+ let r = e instanceof Error ? e.message : "Something went wrong";
320
+ V(c, "error", m, r), B(c, m, { content: `Sorry, an error occurred: ${r}. Please try again.` }), pt(c, m, {
321
321
  lang: "en",
322
- ..._(r.voiceSessionId)
322
+ ..._(n.voiceSessionId)
323
323
  });
324
324
  } finally {
325
- Nt.current.delete(y);
325
+ Nt.current.delete(v);
326
326
  let e = Rt.current;
327
- Rt.current = null, e && e.conversationId === y && J.current(e.content, e.attachments, e.options);
327
+ Rt.current = null, e && e.conversationId === v && J.current(e.content, e.attachments, e.options);
328
328
  }
329
329
  }, [
330
- I,
331
- z,
332
- Qe,
333
- ht,
334
- gt,
335
- st,
330
+ F,
336
331
  R,
332
+ $e,
333
+ gt,
334
+ _t,
335
+ ct,
336
+ L,
337
337
  Ft,
338
- Ze,
338
+ Qe,
339
+ M,
339
340
  N,
340
- P,
341
- V,
342
- j,
343
- $e,
344
- at,
341
+ B,
342
+ A,
343
+ et,
345
344
  ot,
346
- it,
345
+ st,
346
+ at,
347
+ ht,
348
+ dt,
349
+ V,
347
350
  mt,
348
- ut,
349
- H,
350
- pt,
351
- A,
351
+ k,
352
352
  G,
353
- B,
354
- F
355
- ]), Vt = T((e) => {
353
+ z,
354
+ P
355
+ ]), Vt = w((e) => {
356
356
  q(e);
357
- }, [q]), Ht = T(() => {
358
- let e = [...W.chat].reverse().find((e) => e.role === "user"), t = I ? jt.current[I] ?? [] : [];
357
+ }, [q]), Ht = w(() => {
358
+ let e = [...U.chat].reverse().find((e) => e.role === "user"), t = F ? jt.current[F] ?? [] : [];
359
359
  e && q(e.content, t);
360
360
  }, [
361
- yt,
361
+ bt,
362
362
  q,
363
- I
364
- ]), J = O(q);
365
- E(() => {
363
+ F
364
+ ]), J = D(q);
365
+ T(() => {
366
366
  J.current = q;
367
367
  }, [q]);
368
- let Ut = D(() => {
369
- if (xt) return null;
370
- for (let e = yt.length - 1; e >= 0; --e) {
371
- let t = yt[e];
368
+ let Y = E(() => {
369
+ if (St) return null;
370
+ for (let e = bt.length - 1; e >= 0; --e) {
371
+ let t = bt[e];
372
372
  if (t?.role !== "assistant" || !g(t) || K.current.has(t.id)) continue;
373
- let n = xe(t.content).text.trim();
373
+ let n = Se(t.content).text.trim();
374
374
  return n ? {
375
375
  id: t.id,
376
376
  text: n
377
377
  } : null;
378
378
  }
379
379
  return null;
380
- }, [yt, xt]), Wt = D(() => Ut ? b(Ut.text) : null, [Ut]), Gt = W.chat, Y = D(() => W.voice.filter((e) => e.role === "user" || e.role === "assistant").map((e) => ({
380
+ }, [bt, St]), Ut = E(() => Y ? se(Y.text) : null, [Y]), Wt = U.chat, X = E(() => U.voice.filter((e) => e.role === "user" || e.role === "assistant").map((e) => ({
381
381
  id: e.id,
382
382
  role: e.role,
383
- text: xe(e.content).text.trim(),
384
- sessionId: ne(e),
383
+ text: Se(e.content).text.trim(),
384
+ sessionId: v(e),
385
385
  timestamp: e.timestamp
386
- })).filter((e) => e.text.length > 0), [W.voice]), Kt = T(() => {
387
- if (Y.length === 0) return;
386
+ })).filter((e) => e.text.length > 0), [U.voice]), Gt = w(() => {
387
+ if (X.length === 0) return;
388
388
  let e = /* @__PURE__ */ new Date();
389
- Oe(y(Y, {
390
- title: A("voiceSession.transcript", "Voice conversation"),
391
- savedAt: A("voiceSession.savedAt", "Saved"),
392
- session: A("voiceSession.sessionLabel", "Session"),
393
- earlier: A("voiceSession.earlierLabel", "Earlier"),
394
- you: A("voiceSession.speakerYou", "You"),
395
- assistant: A("voiceSession.speakerAssistant", "Assistant")
396
- }, e), re(j, e), "text/markdown");
389
+ ke(y(X, {
390
+ title: k("voiceSession.transcript", "Voice conversation"),
391
+ savedAt: k("voiceSession.savedAt", "Saved"),
392
+ session: k("voiceSession.sessionLabel", "Session"),
393
+ earlier: k("voiceSession.earlierLabel", "Earlier"),
394
+ you: k("voiceSession.speakerYou", "You"),
395
+ assistant: k("voiceSession.speakerAssistant", "Assistant")
396
+ }, e), ae(A, e), "text/markdown");
397
397
  }, [
398
- j,
399
- Y,
400
- A
401
- ]), X = Re(), Z = O(X);
402
- Z.current = X;
403
- let Q = Se({
404
- onSubmit: T((e, t) => {
398
+ A,
399
+ X,
400
+ k
401
+ ]), Z = ze(), Q = D(Z);
402
+ Q.current = Z;
403
+ let $ = Ce({
404
+ onSubmit: w((e, t) => {
405
405
  let n = () => {
406
- let n = Z.current, r = pe(n.attachments);
406
+ let n = Q.current, r = me(n.attachments);
407
407
  J.current(e, r, { voiceSessionId: t }), n.clear();
408
408
  };
409
- if (!Z.current.isBusy) {
409
+ if (!Q.current.isBusy) {
410
410
  n();
411
411
  return;
412
412
  }
413
413
  let r = Date.now(), i = window.setInterval(() => {
414
- Z.current.isBusy && Date.now() - r < qe || (window.clearInterval(i), n());
414
+ Q.current.isBusy && Date.now() - r < Je || (window.clearInterval(i), n());
415
415
  }, 200);
416
416
  }, []),
417
- latestReply: Ut,
418
- language: ae(tt, et).tag
419
- }), qt = D(() => (vt?.messages ?? []).reduce((e, t) => Math.max(e, t.metadata?.continuedVoiceTurns ?? 0), 0), [vt?.messages]), Jt = Y.length > qt, Yt = T(() => {
420
- let e = S.getState().activeConversationId;
421
- !e || Y.length === 0 || (z(e, {
422
- id: Je(),
417
+ latestReply: Y,
418
+ language: ce(nt, tt).tag
419
+ }), Kt = E(() => (yt?.messages ?? []).reduce((e, t) => Math.max(e, t.metadata?.continuedVoiceTurns ?? 0), 0), [yt?.messages]), qt = X.length > Kt, Jt = w(() => {
420
+ let e = x.getState().activeConversationId;
421
+ !e || X.length === 0 || (R(e, {
422
+ id: Ye(),
423
423
  role: "system",
424
- content: v(Y.slice(qt), {
425
- intro: A("voiceSession.continuedIntro", "Continued from a voice conversation. You asked about:"),
426
- nothing: A("voiceSession.continuedNothing", "Continued from a voice conversation."),
427
- more: (e) => A("voiceSession.continuedMore", "…and {{count}} more", { count: e })
424
+ content: ie(X.slice(Kt), {
425
+ intro: k("voiceSession.continuedIntro", "Continued from a voice conversation. You asked about:"),
426
+ nothing: k("voiceSession.continuedNothing", "Continued from a voice conversation."),
427
+ more: (e) => k("voiceSession.continuedMore", "…and {{count}} more", { count: e })
428
428
  }),
429
429
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
430
- metadata: { continuedVoiceTurns: Y.length }
431
- }), At(!1), Q.end());
430
+ metadata: { continuedVoiceTurns: X.length }
431
+ }), W(!1), $.end());
432
432
  }, [
433
- Y,
434
- qt,
435
- z,
436
- A,
437
- Q
438
- ]), Xt = O(0);
439
- E(() => {
440
- Q.active && (Xt.current = Y.length);
441
- }, [Q.active]);
442
- let Zt = T(() => {
443
- let e = Y.length > Xt.current;
444
- Q.end(), e && At(!0);
445
- }, [Y, Q]);
446
- E(() => {
447
- !h && Q.active && Q.end();
448
- }, [h, Q]), E(() => {
449
- Q.active || (Z.current.clear(), Rt.current = null);
450
- }, [Q.active]), E(() => {
451
- let e = S.getState().consumePendingPrompt();
452
- return e && J.current(e), S.subscribe((e, t) => {
433
+ X,
434
+ Kt,
435
+ R,
436
+ k,
437
+ $
438
+ ]), Yt = D(0);
439
+ T(() => {
440
+ $.active && (Yt.current = X.length);
441
+ }, [$.active]);
442
+ let Xt = w(() => {
443
+ let e = X.length > Yt.current;
444
+ $.end(), e && W(!0);
445
+ }, [X, $]);
446
+ T(() => {
447
+ !h && $.active && $.end();
448
+ }, [h, $]), T(() => {
449
+ $.active || (Q.current.clear(), Rt.current = null);
450
+ }, [$.active]), T(() => {
451
+ let e = x.getState().consumePendingPrompt();
452
+ return e && J.current(e), x.subscribe((e, t) => {
453
453
  if (e.pendingPrompt && e.pendingPrompt !== t.pendingPrompt) {
454
- let e = S.getState().consumePendingPrompt();
454
+ let e = x.getState().consumePendingPrompt();
455
455
  e && J.current(e);
456
456
  }
457
457
  });
458
458
  }, []);
459
- let $ = T((e) => {
460
- let t = I ? S.getState().conversations.find((e) => e.id === I) : void 0;
459
+ let Zt = w((e) => {
460
+ let t = F ? x.getState().conversations.find((e) => e.id === F) : void 0;
461
461
  if (t && (t.messages.length > 0 || t.backendSessionId)) {
462
462
  if (t.mode !== e) {
463
- let t = S.getState().conversations.find((t) => t.mode === e && t.messages.length === 0 && !t.backendSessionId && !S.getState().processingByConversationId[t.id]);
464
- t ? dt(t.id) : R(void 0, e);
463
+ let t = x.getState().conversations.find((t) => t.mode === e && t.messages.length === 0 && !t.backendSessionId && !x.getState().processingByConversationId[t.id]);
464
+ t ? ft(t.id) : L(void 0, e);
465
465
  }
466
- } else I && ut(I, e);
467
- lt(e);
466
+ } else F && dt(F, e);
467
+ ut(e);
468
468
  }, [
469
- I,
470
- R,
469
+ F,
470
+ L,
471
+ ft,
471
472
  dt,
472
- ut,
473
- lt
474
- ]), Qt = T((e) => {
475
- if (M.find((t) => t.id === e)?.writeCapable && !S.getState().apiCallsAcknowledged) {
476
- Ot(e);
473
+ ut
474
+ ]), Qt = w((e) => {
475
+ if (j.find((t) => t.id === e)?.writeCapable && !x.getState().apiCallsAcknowledged) {
476
+ kt(e);
477
477
  return;
478
478
  }
479
- $(e);
480
- }, [$, M]), $t = T(() => {
481
- let e = Dt;
482
- Ot(null), _t(), e && $(e);
479
+ Zt(e);
480
+ }, [Zt, j]), $t = w(() => {
481
+ let e = Ot;
482
+ kt(null), vt(), e && Zt(e);
483
483
  }, [
484
- Dt,
485
- _t,
486
- $
487
- ]), en = T(() => {
488
- Ot(null);
484
+ Ot,
485
+ vt,
486
+ Zt
487
+ ]), en = w(() => {
488
+ kt(null);
489
489
  }, []);
490
- return /* @__PURE__ */ Ue("div", {
490
+ return /* @__PURE__ */ We("div", {
491
491
  className: "relative flex flex-1 flex-col overflow-hidden",
492
492
  children: [
493
- /* @__PURE__ */ Ue("div", {
493
+ /* @__PURE__ */ We("div", {
494
494
  className: "contents",
495
- inert: Q.active || void 0,
495
+ inert: $.active || void 0,
496
496
  children: [
497
- Y.length > 0 && !Q.active ? /* @__PURE__ */ k(Ee, {
498
- count: Y.length,
499
- onOpenTranscript: () => At(!0)
497
+ X.length > 0 && !$.active ? /* @__PURE__ */ O(De, {
498
+ count: X.length,
499
+ onOpenTranscript: () => W(!0)
500
500
  }) : null,
501
- Gt.length === 0 ? /* @__PURE__ */ k(ke, {
502
- mode: L,
501
+ Wt.length === 0 ? /* @__PURE__ */ O(Ae, {
502
+ mode: I,
503
503
  onSuggestionClick: Vt
504
- }) : /* @__PURE__ */ k("div", {
504
+ }) : /* @__PURE__ */ O("div", {
505
505
  className: "flex min-h-0 flex-1 flex-col",
506
- children: /* @__PURE__ */ k(Ae, {
506
+ children: /* @__PURE__ */ O(je, {
507
507
  onApprovePendingWrite: Bt,
508
508
  approvingWriteRef: It,
509
- messages: Gt,
510
- streamingMessageId: St,
511
- failedMessageId: Ct,
509
+ messages: Wt,
510
+ streamingMessageId: Ct,
511
+ failedMessageId: wt,
512
512
  onRetry: Ht
513
513
  })
514
514
  }),
515
- /* @__PURE__ */ k(ze, {
516
- onStartVoiceSession: Q.available && L !== "api-calls" ? Q.start : void 0,
515
+ /* @__PURE__ */ O(Be, {
516
+ onStartVoiceSession: $.available && I !== "api-calls" ? $.start : void 0,
517
517
  onSend: (e, t) => void q(e, t),
518
- disabled: xt,
519
- placeholder: L === "api-calls" ? A("chatArea.placeholderActions", "What would you like me to do?") : A("chatArea.placeholderGeneral", "Ask me anything…"),
520
- mode: L,
521
- writeAccessDenied: x === "denied" && !!Pt?.writeCapable,
522
- availableModes: Et,
518
+ disabled: St,
519
+ placeholder: I === "api-calls" ? k("chatArea.placeholderActions", "What would you like me to do?") : k("chatArea.placeholderGeneral", "Ask me anything…"),
520
+ mode: I,
521
+ writeAccessDenied: b === "denied" && !!Pt?.writeCapable,
522
+ availableModes: Dt,
523
523
  onModeChange: Qt
524
524
  })
525
525
  ]
526
526
  }),
527
- kt && !Q.active ? /* @__PURE__ */ k(De, {
528
- turns: Y,
529
- onClose: () => At(!1),
530
- onSave: Kt,
531
- onContinueInChat: Jt ? Yt : void 0,
527
+ At && !$.active ? /* @__PURE__ */ O(Oe, {
528
+ turns: X,
529
+ onClose: () => W(!1),
530
+ onSave: Gt,
531
+ onContinueInChat: qt ? Jt : void 0,
532
532
  closeOnEscape: !0
533
533
  }) : null,
534
- Q.active && /* @__PURE__ */ k(je, {
535
- session: Q.session,
536
- notice: Q.notice,
537
- capturing: Q.capturing,
538
- interrupting: Q.interrupting,
539
- awaitingEndpoint: Q.awaitingEndpoint,
540
- turns: Y,
541
- spokenChunks: Q.spokenChunks,
542
- attachments: X.attachments,
543
- onAttachFiles: X.addFiles,
544
- onRemoveAttachment: X.remove,
545
- onRetryAttachment: X.retry,
546
- canAttachMore: X.canAddMore,
547
- preparingAttachments: X.preparingCount,
548
- onSaveTranscript: Kt,
549
- onContinueInChat: Yt,
534
+ $.active && /* @__PURE__ */ O(Me, {
535
+ session: $.session,
536
+ notice: $.notice,
537
+ capturing: $.capturing,
538
+ interrupting: $.interrupting,
539
+ awaitingEndpoint: $.awaitingEndpoint,
540
+ turns: X,
541
+ spokenChunks: $.spokenChunks,
542
+ attachments: Z.attachments,
543
+ onAttachFiles: Z.addFiles,
544
+ onRemoveAttachment: Z.remove,
545
+ onRetryAttachment: Z.retry,
546
+ canAttachMore: Z.canAddMore,
547
+ preparingAttachments: Z.preparingCount,
548
+ onSaveTranscript: Gt,
549
+ onContinueInChat: Jt,
550
550
  onInterrupt: () => {
551
- Q.interrupt(), zt();
551
+ $.interrupt(), zt();
552
552
  },
553
- spoken: Wt,
554
- onToggleMute: Q.toggleMute,
555
- onEnd: Zt
553
+ spoken: Ut,
554
+ onToggleMute: $.toggleMute,
555
+ onEnd: Xt
556
556
  }),
557
- /* @__PURE__ */ k(Ve, {
558
- open: Dt !== null,
557
+ /* @__PURE__ */ O(He, {
558
+ open: Ot !== null,
559
559
  onConfirm: $t,
560
560
  onCancel: en
561
561
  })
@@ -563,4 +563,4 @@ var M = ({ visible: h = !0, writeAccess: x = "unknown" }) => {
563
563
  });
564
564
  };
565
565
  //#endregion
566
- export { M as AssistantChatArea };
566
+ export { j as AssistantChatArea };