@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.
- package/dist/shared/assistant/ui/AIAssistantPanel.js +6 -6
- package/dist/shared/assistant/ui/AssistantChatArea.js +358 -358
- package/dist/shared/assistant/ui/AssistantConversationList.js +16 -16
- package/dist/shared/assistant/ui/AssistantLanguageMenu.js +6 -6
- package/dist/shared/assistant/ui/AssistantMarkdownRenderer.d.ts +21 -7
- package/dist/shared/assistant/ui/AssistantMarkdownRenderer.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantMarkdownRenderer.js +47 -37
- package/dist/shared/assistant/ui/AssistantMessageItem.js +16 -16
- package/dist/shared/assistant/ui/AssistantReplyLanguageSelector.js +5 -5
- package/dist/shared/assistant/ui/AssistantSpeechProvider.js +151 -151
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +6 -6
- package/dist/shared/assistant/ui/composer/AssistantLanguageSelector.js +4 -4
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +48 -48
- package/dist/shared/assistant/ui/voice/VoiceConversationView.js +8 -8
- package/dist/shared/components/assistantWidget/MessageContent.d.ts +11 -3
- package/dist/shared/components/assistantWidget/MessageContent.d.ts.map +1 -1
- package/dist/shared/components/assistantWidget/MessageContent.js +26 -27
- package/dist/shared-assistant.js +93 -93
- package/package.json +2 -2
|
@@ -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 {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { buildPromptParts as
|
|
17
|
-
import { useAssistantStore as
|
|
18
|
-
import { isTurnInFlight as
|
|
19
|
-
import { STAGE_COPY as
|
|
20
|
-
import { parseToolActivity as
|
|
21
|
-
import { useVoiceSession as
|
|
22
|
-
import { getOrganizationId as
|
|
23
|
-
import { createReadinessTracker as
|
|
24
|
-
import { AssistantSpokenTurnsNotice as
|
|
25
|
-
import { VoiceTranscriptDrawer as
|
|
26
|
-
import { downloadFile as
|
|
27
|
-
import { AssistantEmptyState as
|
|
28
|
-
import { AssistantMessageList as
|
|
29
|
-
import { AssistantVoiceSession as
|
|
30
|
-
import { useAssistantApiAccess as
|
|
31
|
-
import { useConversationTurns as
|
|
32
|
-
import { isMultimodalBodyRejection as
|
|
33
|
-
import { dispatchAssistantQuotaExhausted as
|
|
34
|
-
import { useAssistantAttachments as
|
|
35
|
-
import { AssistantComposer as
|
|
36
|
-
import { isProdRuntime as
|
|
37
|
-
import { AssistantApiCallsConsentDialog as
|
|
38
|
-
import { useCallback as
|
|
39
|
-
import { jsx as
|
|
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
|
|
41
|
+
var Ge = {
|
|
42
42
|
general: 18e4,
|
|
43
43
|
assistant: 18e4,
|
|
44
44
|
"api-calls": 18e4,
|
|
45
45
|
"vibe-plugins": 6e5
|
|
46
|
-
},
|
|
47
|
-
function
|
|
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
|
|
50
|
+
function Xe(e) {
|
|
51
51
|
return e.info?.time?.created ?? 0;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
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
|
|
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
|
|
63
|
-
let n = e.filter((e) => e.info?.role === "assistant" &&
|
|
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:
|
|
65
|
+
content: S.thinking.fallback,
|
|
66
66
|
done: !1
|
|
67
67
|
};
|
|
68
|
-
let r = n[n.length - 1], i =
|
|
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") ||
|
|
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
|
|
83
|
-
let
|
|
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
|
-
|
|
87
|
-
|
|
88
|
-
E(() => {
|
|
89
|
-
|
|
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
|
-
|
|
91
|
+
I,
|
|
92
92
|
Pt,
|
|
93
|
-
wt,
|
|
94
93
|
Tt,
|
|
95
|
-
|
|
94
|
+
Et,
|
|
95
|
+
ut
|
|
96
96
|
]);
|
|
97
|
-
let G =
|
|
98
|
-
|
|
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
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
]), Ft =
|
|
104
|
-
let
|
|
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 (
|
|
113
|
-
G(e, t, "provisioning",
|
|
114
|
-
let
|
|
115
|
-
|
|
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 (!
|
|
118
|
-
if (n === "api-calls" && !
|
|
119
|
-
G(e, t, "provisioning",
|
|
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
|
-
|
|
122
|
-
let
|
|
123
|
-
if (
|
|
124
|
-
let e = await d(
|
|
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
|
-
|
|
127
|
+
gt(e), l = null;
|
|
128
128
|
}
|
|
129
|
-
return
|
|
130
|
-
sandboxId:
|
|
131
|
-
sessionId:
|
|
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
|
-
|
|
135
|
-
|
|
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] =
|
|
142
|
-
let e =
|
|
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],
|
|
145
|
-
if (!
|
|
146
|
-
interruptedTurnId:
|
|
147
|
-
activeTurnId:
|
|
148
|
-
alreadyRequested:
|
|
149
|
-
}).send || !
|
|
150
|
-
K.current.add(
|
|
151
|
-
let
|
|
152
|
-
!
|
|
153
|
-
accessToken:
|
|
154
|
-
workspaceToken:
|
|
155
|
-
userId:
|
|
156
|
-
organizationId:
|
|
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
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
]), Bt =
|
|
163
|
-
let t =
|
|
164
|
-
if (!(!n || !r || !
|
|
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
|
|
168
|
-
accessToken:
|
|
169
|
-
workspaceToken:
|
|
170
|
-
userId:
|
|
171
|
-
organizationId:
|
|
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),
|
|
175
|
-
id:
|
|
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(
|
|
182
|
+
Lt(null), J.current(k("pendingWrite.approvedPrompt", "I approved that change — go ahead."));
|
|
183
183
|
}
|
|
184
184
|
}, [
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
]), q =
|
|
189
|
-
let
|
|
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 (
|
|
192
|
-
let
|
|
193
|
-
|
|
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:
|
|
197
|
+
options: n
|
|
198
198
|
});
|
|
199
199
|
return;
|
|
200
200
|
}
|
|
201
201
|
if (Nt.current.has(o)) return;
|
|
202
202
|
}
|
|
203
|
-
let
|
|
204
|
-
if (
|
|
205
|
-
jt.current[
|
|
206
|
-
let
|
|
207
|
-
accessToken:
|
|
208
|
-
workspaceToken:
|
|
209
|
-
userId:
|
|
210
|
-
organizationId:
|
|
211
|
-
},
|
|
212
|
-
id:
|
|
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(
|
|
218
|
-
..._(
|
|
217
|
+
...t.length ? { attachments: t.map(he) } : {},
|
|
218
|
+
..._(n.voiceSessionId)
|
|
219
219
|
}
|
|
220
220
|
};
|
|
221
|
-
|
|
222
|
-
let
|
|
223
|
-
|
|
224
|
-
id:
|
|
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:
|
|
230
|
-
..._(
|
|
229
|
+
lang: st,
|
|
230
|
+
..._(n.voiceSessionId)
|
|
231
231
|
}
|
|
232
|
-
}),
|
|
233
|
-
let
|
|
234
|
-
|
|
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 ||
|
|
238
|
-
...
|
|
237
|
+
...t?.length || r || i ? { mode: s } : {},
|
|
238
|
+
...r ? { sessionId: r } : {},
|
|
239
239
|
...i ? { sandboxId: i } : {},
|
|
240
|
-
..._(
|
|
240
|
+
..._(n.voiceSessionId)
|
|
241
241
|
});
|
|
242
|
-
},
|
|
243
|
-
let
|
|
242
|
+
}, g = async (n = 1) => {
|
|
243
|
+
let i = !1;
|
|
244
244
|
try {
|
|
245
|
-
let { sandboxId: n, sessionId: a } = await Ft(
|
|
246
|
-
G(
|
|
247
|
-
let
|
|
248
|
-
|
|
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
|
|
250
|
+
await ne(n, d, a, p, s, ie, f, g?.length ? { parts: g } : void 0);
|
|
251
251
|
} catch (e) {
|
|
252
|
-
if (!
|
|
253
|
-
await
|
|
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
|
|
256
|
-
turnId:
|
|
257
|
-
abortRequested: K.current.has(
|
|
258
|
-
activeTurnId:
|
|
259
|
-
}),
|
|
260
|
-
let e =
|
|
261
|
-
|
|
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 =
|
|
264
|
+
let e = le();
|
|
265
265
|
if (e.abandon) {
|
|
266
|
-
|
|
266
|
+
b(), e.clearProcessing && mt(c);
|
|
267
267
|
return;
|
|
268
268
|
}
|
|
269
|
-
if (
|
|
269
|
+
if (y = Ze(await te(n, d, a, f, {
|
|
270
270
|
limit: 50,
|
|
271
271
|
sinceMs: o
|
|
272
|
-
}), o),
|
|
273
|
-
Date.now() -
|
|
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 (!
|
|
276
|
-
let
|
|
277
|
-
if (
|
|
278
|
-
...
|
|
279
|
-
content: `${
|
|
280
|
-
}),
|
|
281
|
-
...
|
|
282
|
-
content: `${
|
|
283
|
-
}),
|
|
284
|
-
|
|
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
|
|
287
|
-
workspaceId:
|
|
286
|
+
await et?.({
|
|
287
|
+
workspaceId: d,
|
|
288
288
|
sessionId: a,
|
|
289
|
-
messageId:
|
|
290
|
-
model:
|
|
291
|
-
tokens:
|
|
292
|
-
}),
|
|
289
|
+
messageId: y.messageId,
|
|
290
|
+
model: y.model,
|
|
291
|
+
tokens: y.tokens
|
|
292
|
+
}), Re(A);
|
|
293
293
|
} catch {}
|
|
294
294
|
}
|
|
295
|
-
let
|
|
296
|
-
if (
|
|
297
|
-
|
|
295
|
+
let he = le();
|
|
296
|
+
if (he.abandon) {
|
|
297
|
+
b(), he.clearProcessing && mt(c);
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
|
-
|
|
300
|
+
V(c, "complete", m, null);
|
|
301
301
|
} catch (e) {
|
|
302
|
-
if (n === 1 &&
|
|
302
|
+
if (n === 1 && Ie(e)) return gt(c), _t(s), g(2);
|
|
303
303
|
throw e;
|
|
304
304
|
}
|
|
305
|
-
},
|
|
306
|
-
Nt.current.add(
|
|
305
|
+
}, v = c;
|
|
306
|
+
Nt.current.add(v);
|
|
307
307
|
try {
|
|
308
|
-
if (!
|
|
309
|
-
await
|
|
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(
|
|
312
|
-
let t =
|
|
311
|
+
Mt.current.invalidate(x.getState().sandboxesByMode[s]?.sandboxId ?? null);
|
|
312
|
+
let t = i(e);
|
|
313
313
|
if (t) {
|
|
314
|
-
t.refusal === "exhausted" &&
|
|
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
|
-
|
|
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
|
|
320
|
-
|
|
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
|
-
..._(
|
|
322
|
+
..._(n.voiceSessionId)
|
|
323
323
|
});
|
|
324
324
|
} finally {
|
|
325
|
-
Nt.current.delete(
|
|
325
|
+
Nt.current.delete(v);
|
|
326
326
|
let e = Rt.current;
|
|
327
|
-
Rt.current = null, e && e.conversationId ===
|
|
327
|
+
Rt.current = null, e && e.conversationId === v && J.current(e.content, e.attachments, e.options);
|
|
328
328
|
}
|
|
329
329
|
}, [
|
|
330
|
-
|
|
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
|
-
|
|
338
|
+
Qe,
|
|
339
|
+
M,
|
|
339
340
|
N,
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
$e,
|
|
344
|
-
at,
|
|
341
|
+
B,
|
|
342
|
+
A,
|
|
343
|
+
et,
|
|
345
344
|
ot,
|
|
346
|
-
|
|
345
|
+
st,
|
|
346
|
+
at,
|
|
347
|
+
ht,
|
|
348
|
+
dt,
|
|
349
|
+
V,
|
|
347
350
|
mt,
|
|
348
|
-
|
|
349
|
-
H,
|
|
350
|
-
pt,
|
|
351
|
-
A,
|
|
351
|
+
k,
|
|
352
352
|
G,
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
]), Vt =
|
|
353
|
+
z,
|
|
354
|
+
P
|
|
355
|
+
]), Vt = w((e) => {
|
|
356
356
|
q(e);
|
|
357
|
-
}, [q]), Ht =
|
|
358
|
-
let e = [...
|
|
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
|
-
|
|
361
|
+
bt,
|
|
362
362
|
q,
|
|
363
|
-
|
|
364
|
-
]), J =
|
|
365
|
-
|
|
363
|
+
F
|
|
364
|
+
]), J = D(q);
|
|
365
|
+
T(() => {
|
|
366
366
|
J.current = q;
|
|
367
367
|
}, [q]);
|
|
368
|
-
let
|
|
369
|
-
if (
|
|
370
|
-
for (let e =
|
|
371
|
-
let t =
|
|
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 =
|
|
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
|
-
}, [
|
|
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:
|
|
384
|
-
sessionId:
|
|
383
|
+
text: Se(e.content).text.trim(),
|
|
384
|
+
sessionId: v(e),
|
|
385
385
|
timestamp: e.timestamp
|
|
386
|
-
})).filter((e) => e.text.length > 0), [
|
|
387
|
-
if (
|
|
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
|
-
|
|
390
|
-
title:
|
|
391
|
-
savedAt:
|
|
392
|
-
session:
|
|
393
|
-
earlier:
|
|
394
|
-
you:
|
|
395
|
-
assistant:
|
|
396
|
-
}, e),
|
|
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
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
]),
|
|
402
|
-
|
|
403
|
-
let
|
|
404
|
-
onSubmit:
|
|
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 =
|
|
406
|
+
let n = Q.current, r = me(n.attachments);
|
|
407
407
|
J.current(e, r, { voiceSessionId: t }), n.clear();
|
|
408
408
|
};
|
|
409
|
-
if (!
|
|
409
|
+
if (!Q.current.isBusy) {
|
|
410
410
|
n();
|
|
411
411
|
return;
|
|
412
412
|
}
|
|
413
413
|
let r = Date.now(), i = window.setInterval(() => {
|
|
414
|
-
|
|
414
|
+
Q.current.isBusy && Date.now() - r < Je || (window.clearInterval(i), n());
|
|
415
415
|
}, 200);
|
|
416
416
|
}, []),
|
|
417
|
-
latestReply:
|
|
418
|
-
language:
|
|
419
|
-
}),
|
|
420
|
-
let e =
|
|
421
|
-
!e ||
|
|
422
|
-
id:
|
|
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:
|
|
425
|
-
intro:
|
|
426
|
-
nothing:
|
|
427
|
-
more: (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:
|
|
431
|
-
}),
|
|
430
|
+
metadata: { continuedVoiceTurns: X.length }
|
|
431
|
+
}), W(!1), $.end());
|
|
432
432
|
}, [
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
]),
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
}, [
|
|
442
|
-
let
|
|
443
|
-
let e =
|
|
444
|
-
|
|
445
|
-
}, [
|
|
446
|
-
|
|
447
|
-
!h &&
|
|
448
|
-
}, [h,
|
|
449
|
-
|
|
450
|
-
}, [
|
|
451
|
-
let e =
|
|
452
|
-
return e && J.current(e),
|
|
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 =
|
|
454
|
+
let e = x.getState().consumePendingPrompt();
|
|
455
455
|
e && J.current(e);
|
|
456
456
|
}
|
|
457
457
|
});
|
|
458
458
|
}, []);
|
|
459
|
-
let
|
|
460
|
-
let t =
|
|
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 =
|
|
464
|
-
t ?
|
|
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
|
|
467
|
-
|
|
466
|
+
} else F && dt(F, e);
|
|
467
|
+
ut(e);
|
|
468
468
|
}, [
|
|
469
|
-
|
|
470
|
-
|
|
469
|
+
F,
|
|
470
|
+
L,
|
|
471
|
+
ft,
|
|
471
472
|
dt,
|
|
472
|
-
ut
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
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
|
-
|
|
480
|
-
}, [
|
|
481
|
-
let e =
|
|
482
|
-
|
|
479
|
+
Zt(e);
|
|
480
|
+
}, [Zt, j]), $t = w(() => {
|
|
481
|
+
let e = Ot;
|
|
482
|
+
kt(null), vt(), e && Zt(e);
|
|
483
483
|
}, [
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
]), en =
|
|
488
|
-
|
|
484
|
+
Ot,
|
|
485
|
+
vt,
|
|
486
|
+
Zt
|
|
487
|
+
]), en = w(() => {
|
|
488
|
+
kt(null);
|
|
489
489
|
}, []);
|
|
490
|
-
return /* @__PURE__ */
|
|
490
|
+
return /* @__PURE__ */ We("div", {
|
|
491
491
|
className: "relative flex flex-1 flex-col overflow-hidden",
|
|
492
492
|
children: [
|
|
493
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ We("div", {
|
|
494
494
|
className: "contents",
|
|
495
|
-
inert:
|
|
495
|
+
inert: $.active || void 0,
|
|
496
496
|
children: [
|
|
497
|
-
|
|
498
|
-
count:
|
|
499
|
-
onOpenTranscript: () =>
|
|
497
|
+
X.length > 0 && !$.active ? /* @__PURE__ */ O(De, {
|
|
498
|
+
count: X.length,
|
|
499
|
+
onOpenTranscript: () => W(!0)
|
|
500
500
|
}) : null,
|
|
501
|
-
|
|
502
|
-
mode:
|
|
501
|
+
Wt.length === 0 ? /* @__PURE__ */ O(Ae, {
|
|
502
|
+
mode: I,
|
|
503
503
|
onSuggestionClick: Vt
|
|
504
|
-
}) : /* @__PURE__ */
|
|
504
|
+
}) : /* @__PURE__ */ O("div", {
|
|
505
505
|
className: "flex min-h-0 flex-1 flex-col",
|
|
506
|
-
children: /* @__PURE__ */
|
|
506
|
+
children: /* @__PURE__ */ O(je, {
|
|
507
507
|
onApprovePendingWrite: Bt,
|
|
508
508
|
approvingWriteRef: It,
|
|
509
|
-
messages:
|
|
510
|
-
streamingMessageId:
|
|
511
|
-
failedMessageId:
|
|
509
|
+
messages: Wt,
|
|
510
|
+
streamingMessageId: Ct,
|
|
511
|
+
failedMessageId: wt,
|
|
512
512
|
onRetry: Ht
|
|
513
513
|
})
|
|
514
514
|
}),
|
|
515
|
-
/* @__PURE__ */
|
|
516
|
-
onStartVoiceSession:
|
|
515
|
+
/* @__PURE__ */ O(Be, {
|
|
516
|
+
onStartVoiceSession: $.available && I !== "api-calls" ? $.start : void 0,
|
|
517
517
|
onSend: (e, t) => void q(e, t),
|
|
518
|
-
disabled:
|
|
519
|
-
placeholder:
|
|
520
|
-
mode:
|
|
521
|
-
writeAccessDenied:
|
|
522
|
-
availableModes:
|
|
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
|
-
|
|
528
|
-
turns:
|
|
529
|
-
onClose: () =>
|
|
530
|
-
onSave:
|
|
531
|
-
onContinueInChat:
|
|
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
|
-
|
|
535
|
-
session:
|
|
536
|
-
notice:
|
|
537
|
-
capturing:
|
|
538
|
-
interrupting:
|
|
539
|
-
awaitingEndpoint:
|
|
540
|
-
turns:
|
|
541
|
-
spokenChunks:
|
|
542
|
-
attachments:
|
|
543
|
-
onAttachFiles:
|
|
544
|
-
onRemoveAttachment:
|
|
545
|
-
onRetryAttachment:
|
|
546
|
-
canAttachMore:
|
|
547
|
-
preparingAttachments:
|
|
548
|
-
onSaveTranscript:
|
|
549
|
-
onContinueInChat:
|
|
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
|
-
|
|
551
|
+
$.interrupt(), zt();
|
|
552
552
|
},
|
|
553
|
-
spoken:
|
|
554
|
-
onToggleMute:
|
|
555
|
-
onEnd:
|
|
553
|
+
spoken: Ut,
|
|
554
|
+
onToggleMute: $.toggleMute,
|
|
555
|
+
onEnd: Xt
|
|
556
556
|
}),
|
|
557
|
-
/* @__PURE__ */
|
|
558
|
-
open:
|
|
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 {
|
|
566
|
+
export { j as AssistantChatArea };
|