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