@burdenoff/fe-libs 2026.909.3 → 2026.910.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.
@@ -68,6 +68,7 @@ export * from './conversation';
68
68
  export * from './attachments';
69
69
  export * from './store';
70
70
  export * from './turnState';
71
+ export * from './stageCopy';
71
72
  export * from './gatewayLimits';
72
73
  export * from './documentText';
73
74
  export * from './ui/AssistantToolActivity';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/index.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,123 @@
1
+ import { AssistantConversationStatus } from './conversation';
2
+ import { AssistantTr } from './i18n';
3
+ /**
4
+ * Every string the assistant shows in its own bubble while a turn is still
5
+ * working — and the one predicate that recognises them.
6
+ *
7
+ * ★★ THE REASON THIS IS ONE MODULE. Two features depend on the same set and
8
+ * they fail in opposite directions if it drifts:
9
+ *
10
+ * - the bubble rotates filler while the model thinks, so the set GROWS;
11
+ * - an interrupted turn must have its filler replaced, so the set must be
12
+ * RECOGNISED exhaustively.
13
+ *
14
+ * Add a phrase to the rotation without teaching the predicate about it and an
15
+ * interrupt during that phrase strands it in the transcript forever — which is
16
+ * precisely the defect this module exists to fix (BOFF-7229), reintroduced one
17
+ * word at a time. Keeping both sides here makes that impossible: the predicate
18
+ * is derived from the same tables the writers use, and a test asserts it.
19
+ */
20
+ export interface StageCopyEntry {
21
+ /** Relative i18n key, resolved through `AssistantTr`. */
22
+ readonly key: string;
23
+ /** English copy, used when the key is unseeded or no provider is mounted. */
24
+ readonly fallback: string;
25
+ }
26
+ /**
27
+ * The environment steps.
28
+ *
29
+ * ★ These are INFORMATIVE, not filler: each names a different thing the runtime
30
+ * is actually doing, and on a cold start they are the only signal the user gets
31
+ * for 11-15 seconds. They are deliberately NOT part of the rotation — swapping
32
+ * "Starting assistant environment..." for "Pondering..." would trade real
33
+ * progress information for decoration.
34
+ */
35
+ export declare const STAGE_COPY: {
36
+ readonly reusingEnvironment: {
37
+ readonly key: "stage.reusingEnvironment";
38
+ readonly fallback: "Reusing assistant environment...";
39
+ };
40
+ readonly lookingForEnvironment: {
41
+ readonly key: "stage.lookingForEnvironment";
42
+ readonly fallback: "Looking for existing environment...";
43
+ };
44
+ readonly startingEnvironment: {
45
+ readonly key: "stage.startingEnvironment";
46
+ readonly fallback: "Starting assistant environment...";
47
+ };
48
+ readonly preparingSession: {
49
+ readonly key: "stage.preparingSession";
50
+ readonly fallback: "Preparing session...";
51
+ };
52
+ readonly connecting: {
53
+ readonly key: "stage.connecting";
54
+ readonly fallback: "Connecting to assistant...";
55
+ };
56
+ readonly thinking: {
57
+ readonly key: "stage.thinking";
58
+ readonly fallback: "Thinking...";
59
+ };
60
+ /**
61
+ * What replaces stage copy on a turn the user cut off.
62
+ *
63
+ * ★ Deliberately NOT a member of `isStageCopy`: it is a settled outcome, not
64
+ * a turn still working. That asymmetry is what makes the replacement
65
+ * idempotent — a second pass over an already-stopped turn rewrites nothing.
66
+ */
67
+ readonly stopped: {
68
+ readonly key: "stage.stopped";
69
+ readonly fallback: "Stopped";
70
+ };
71
+ };
72
+ /**
73
+ * Filler shown while the model is working and has produced nothing yet.
74
+ *
75
+ * ★ `thinking` is first so the sequence always opens on the familiar word, and
76
+ * so index 0 is stable for tests. The rest exist because a single frozen
77
+ * "Thinking..." for the length of a turn reads as a hang; a phrase that moves
78
+ * reads as work in progress.
79
+ *
80
+ * ★ Every entry here is machine copy by construction, so `isStageCopy` covers
81
+ * the whole list rather than a hand-maintained subset.
82
+ */
83
+ export declare const THINKING_PHRASES: readonly StageCopyEntry[];
84
+ /**
85
+ * How long each phrase holds.
86
+ *
87
+ * ★ Not the poll cadence. Polls land every 600-1500ms
88
+ * (`voice/assistantPollSchedule`), and rotating on every one of them flickers.
89
+ * Rotation is driven by ELAPSED TIME so the cadence is independent of how often
90
+ * the loop happens to write.
91
+ */
92
+ export declare const PHRASE_ROTATE_MS = 2500;
93
+ /** Resolve one entry through the product's translator. */
94
+ export declare function stageText(tr: AssistantTr, entry: StageCopyEntry): string;
95
+ /**
96
+ * The phrase for a turn that has been working `elapsedMs`.
97
+ *
98
+ * Pure in `elapsedMs` — the caller owns the clock — so the rotation is
99
+ * exercised by tests without faking timers.
100
+ */
101
+ export declare function thinkingPhrase(tr: AssistantTr, elapsedMs: number): string;
102
+ /**
103
+ * The copy for a conversation status, when a caller has none of its own.
104
+ *
105
+ * ★ Translated, where the literals it replaces were bare English. The assistant
106
+ * rendering English in every locale is a defect this codebase has already paid
107
+ * for once in the fe-libs shell.
108
+ */
109
+ export declare function statusStageCopy(tr: AssistantTr, status: AssistantConversationStatus): string;
110
+ /**
111
+ * Is this bubble still showing machine copy rather than an answer?
112
+ *
113
+ * ★★ Both the translation AND the English fallback are compared, for two
114
+ * reasons that are easy to miss. A locale can change mid-turn, leaving content
115
+ * written under the previous one; and a key that is published but not yet
116
+ * ACTIVE resolves to its fallback, which is how ~9,000 assistant keys behaved
117
+ * in prod. Matching one form only would leave the bubble stranded in exactly
118
+ * the cases this predicate exists to catch.
119
+ *
120
+ * ★ Empty is machine copy too — a bubble with nothing in it is not an answer.
121
+ */
122
+ export declare function isStageCopy(tr: AssistantTr, content: string | null | undefined): boolean;
123
+ //# sourceMappingURL=stageCopy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stageCopy.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/stageCopy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,cAAc;IAC7B,yDAAyD;IACzD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;IAyBrB;;;;;;OAMG;;;;;CAK8C,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EAWrD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC,0DAA0D;AAC1D,wBAAgB,SAAS,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,cAAc,GAAG,MAAM,CAExE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAKzE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,EAAE,EAAE,WAAW,EACf,MAAM,EAAE,2BAA2B,GAClC,MAAM,CAcR;AAeD;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,EAAE,EAAE,WAAW,EACf,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACjC,OAAO,CAOT"}
@@ -0,0 +1,97 @@
1
+ //#region src/shared/assistant/stageCopy.ts
2
+ var e = {
3
+ reusingEnvironment: {
4
+ key: "stage.reusingEnvironment",
5
+ fallback: "Reusing assistant environment..."
6
+ },
7
+ lookingForEnvironment: {
8
+ key: "stage.lookingForEnvironment",
9
+ fallback: "Looking for existing environment..."
10
+ },
11
+ startingEnvironment: {
12
+ key: "stage.startingEnvironment",
13
+ fallback: "Starting assistant environment..."
14
+ },
15
+ preparingSession: {
16
+ key: "stage.preparingSession",
17
+ fallback: "Preparing session..."
18
+ },
19
+ connecting: {
20
+ key: "stage.connecting",
21
+ fallback: "Connecting to assistant..."
22
+ },
23
+ thinking: {
24
+ key: "stage.thinking",
25
+ fallback: "Thinking..."
26
+ },
27
+ stopped: {
28
+ key: "stage.stopped",
29
+ fallback: "Stopped"
30
+ }
31
+ }, t = [
32
+ e.thinking,
33
+ {
34
+ key: "stage.pondering",
35
+ fallback: "Pondering..."
36
+ },
37
+ {
38
+ key: "stage.reasoning",
39
+ fallback: "Reasoning..."
40
+ },
41
+ {
42
+ key: "stage.inferring",
43
+ fallback: "Inferring..."
44
+ },
45
+ {
46
+ key: "stage.considering",
47
+ fallback: "Considering..."
48
+ },
49
+ {
50
+ key: "stage.working",
51
+ fallback: "Working..."
52
+ },
53
+ {
54
+ key: "stage.reflecting",
55
+ fallback: "Reflecting..."
56
+ },
57
+ {
58
+ key: "stage.deliberating",
59
+ fallback: "Deliberating..."
60
+ },
61
+ {
62
+ key: "stage.weighing",
63
+ fallback: "Weighing it up..."
64
+ },
65
+ {
66
+ key: "stage.piecing",
67
+ fallback: "Piecing it together..."
68
+ }
69
+ ], n = 2500;
70
+ function r(e, t) {
71
+ return e(t.key, t.fallback);
72
+ }
73
+ function i(e, i) {
74
+ return r(e, t[Math.floor((Number.isFinite(i) ? Math.max(0, i) : 0) / n) % t.length]);
75
+ }
76
+ function a(t, n) {
77
+ switch (n) {
78
+ case "provisioning": return r(t, e.startingEnvironment);
79
+ case "connecting": return r(t, e.connecting);
80
+ case "streaming": return r(t, e.thinking);
81
+ default: return "";
82
+ }
83
+ }
84
+ var o = [
85
+ e.reusingEnvironment,
86
+ e.lookingForEnvironment,
87
+ e.startingEnvironment,
88
+ e.preparingSession,
89
+ e.connecting,
90
+ ...t
91
+ ];
92
+ function s(e, t) {
93
+ let n = (t ?? "").trim();
94
+ return n ? o.some((t) => e(t.key, t.fallback) === n || t.fallback === n) : !0;
95
+ }
96
+ //#endregion
97
+ export { n as PHRASE_ROTATE_MS, e as STAGE_COPY, t as THINKING_PHRASES, s as isStageCopy, r as stageText, a as statusStageCopy, i as thinkingPhrase };
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantChatArea.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantChatArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAyEf,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAoLvE;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;CACpC;AAED,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAi6DxD,CAAC"}
1
+ {"version":3,"file":"AssistantChatArea.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantChatArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAyEf,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAgLvE;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;CACpC;AAED,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAg9DxD,CAAC"}
@@ -10,43 +10,44 @@ import { pollDelayMs as ie } from "../voice/assistantPollSchedule.js";
10
10
  import { toCaptionText as b } from "../voice/captionText.js";
11
11
  import { resolveAssistantLanguage as ae } from "../voice/languages.js";
12
12
  import { resolveLanguagePair as oe } from "../voice/languagePair.js";
13
- import { findPendingWrite as se } from "../pendingWrite.js";
14
- import { useAssistantProduct as ce } from "../product.js";
15
- import { useAssistantTr as le } from "../i18n.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 { parseToolActivity as ye } from "./AssistantToolActivity.js";
20
- import { useVoiceSession as be } from "./useVoiceSession.js";
21
- import { getOrganizationId as S, getWorkspaceId as xe } from "../context.js";
22
- import { createReadinessTracker as Se } from "../sandboxReadiness.js";
23
- import { AssistantSpokenTurnsNotice as Ce } from "./AssistantSpokenTurnsNotice.js";
24
- import { VoiceTranscriptDrawer as we } from "./voice/VoiceTranscriptDrawer.js";
25
- import { downloadFile as Te } from "../exportConversation.js";
26
- import { AssistantEmptyState as Ee } from "./AssistantEmptyState.js";
27
- import { AssistantMessageList as De } from "./AssistantMessageList.js";
28
- import { AssistantVoiceSession as Oe } from "./voice/AssistantVoiceSession.js";
29
- import { useAssistantApiAccess as ke } from "../useAssistantApiAccess.js";
30
- import { useConversationTurns as Ae } from "../useConversationTurns.js";
31
- import { isMultimodalBodyRejection as je, isRecoverableAssistantError as Me } from "../transportErrors.js";
32
- import { dispatchAssistantQuotaExhausted as Ne, notifyAiCreditsUpdated as Pe } from "../aiCredits.js";
33
- import { useAssistantAttachments as Fe } from "../useAssistantAttachments.js";
34
- import { AssistantComposer as Ie } from "./composer/AssistantComposer.js";
35
- import { isProdRuntime as Le } from "../env.js";
36
- import { AssistantApiCallsConsentDialog as Re } from "./AssistantApiCallsConsentDialog.js";
37
- import { useCallback as C, useEffect as w, useMemo as T, useRef as E, useState as ze } from "react";
38
- import { jsx as D, jsxs as Be } from "react/jsx-runtime";
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";
39
40
  //#region src/shared/assistant/ui/AssistantChatArea.tsx
40
- var Ve = {
41
+ var We = {
41
42
  general: 18e4,
42
43
  assistant: 18e4,
43
44
  "api-calls": 18e4,
44
45
  "vibe-plugins": 6e5
45
- }, He = 18e4, Ue = 600, We = 2e4;
46
- function O() {
46
+ }, Ge = 18e4, Ke = 600, qe = 2e4;
47
+ function Je() {
47
48
  return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
48
49
  }
49
- function k(e) {
50
+ function Ye(e) {
50
51
  return e.info?.time?.created ?? 0;
51
52
  }
52
53
  function A(e) {
@@ -58,17 +59,17 @@ function j(e) {
58
59
  return t === "completed" ? `Completed: ${n}` : t === "failed" ? `Failed: ${n}` : `Running: ${n}`;
59
60
  });
60
61
  }
61
- function Ge(e, t) {
62
- let n = e.filter((e) => e.info?.role === "assistant" && k(e) > t).sort((e, t) => k(e) - k(t));
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));
63
64
  if (n.length === 0) return {
64
- content: "Thinking...",
65
+ content: C.thinking.fallback,
65
66
  done: !1
66
67
  };
67
- let r = n[n.length - 1], i = A(r.parts), a = h(r.parts), o = j(r.parts), s = se(r.parts), c = [
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
69
  i,
69
70
  ...a,
70
71
  ...o
71
- ].filter(Boolean).join("\n\n") || "Thinking...", l = r.info?.providerID, u = r.info?.modelID;
72
+ ].filter(Boolean).join("\n\n") || C.thinking.fallback, l = r.info?.providerID, u = r.info?.modelID;
72
73
  return {
73
74
  content: c,
74
75
  done: !!r.info?.time?.completed && (!!i || a.length > 0 || o.length > 0),
@@ -78,121 +79,118 @@ function Ge(e, t) {
78
79
  ...s ? { pendingWrite: s } : {}
79
80
  };
80
81
  }
81
- function Ke(e) {
82
- switch (e) {
83
- case "provisioning": return "Starting assistant environment...";
84
- case "connecting": return "Connecting to assistant...";
85
- case "streaming": return "Thinking...";
86
- default: return "";
87
- }
88
- }
89
- var M = ({ visible: h = !0, writeAccess: se = "unknown" }) => {
90
- let A = le(), { product: j, modes: M, gatherPageContext: qe, buildPrompt: Je, reportTokenUsage: Ye } = ce(), { getAccessToken: N, getWorkspaceToken: P, userId: F } = t(), { locale: Xe } = e(), Ze = x((e) => e.assistantLanguage), Qe = x((e) => e.replyLanguage), $e = T(() => oe(Ze, Qe, Xe), [
91
- Ze,
92
- Qe,
93
- Xe
94
- ]), et = $e.reply.english, tt = $e.replyIsExplicit, nt = $e.reply.code, { conversations: rt, activeConversationId: I, mode: L, processingByConversationId: it, setMode: R, setConversationMode: z, setActiveConversation: at, createConversation: B, addMessage: V, updateMessage: ot, patchMessage: H, mergeMessageMetadata: st, setConversationProcessing: U, clearConversationProcessing: ct, setBackendSessionId: lt, clearBackendSessionId: ut, setSandbox: W, clearSandbox: dt, acknowledgeApiCalls: ft } = x(), pt = rt.find((e) => e.id === I), G = Ae(pt), mt = G.all, ht = I ? it[I] : void 0, gt = ge(ht?.status), _t = gt ? ht?.messageId ?? null : null, vt = ht?.status === "error" ? ht.messageId : null, { canUseApiCalls: yt, loading: bt } = ke(S()), xt = T(() => M.filter((e) => !e.requiresAdmin || yt), [M, yt]), [St, Ct] = ze(null), [wt, Tt] = ze(!1), Et = E({}), Dt = E(Se()), Ot = E(/* @__PURE__ */ new Set()), kt = T(() => M.find((e) => e.id === L), [M, L]);
95
- w(() => {
96
- bt || (!kt || kt.requiresAdmin && !yt) && L !== "assistant" && R("assistant");
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,
85
+ 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");
97
90
  }, [
98
91
  L,
99
- kt,
100
- yt,
101
- bt,
102
- R
92
+ Pt,
93
+ wt,
94
+ Tt,
95
+ lt
103
96
  ]);
104
- let K = C((e, t, n, r) => {
105
- U(e, n, t, null), r ? ot(e, t, r) : ot(e, t, Ke(n));
106
- }, [U, ot]), At = C(async (e, t, n, r, i) => {
107
- let s = x.getState().sandboxesByMode[n]?.sandboxId ?? null, l = async (e) => {
108
- if (Dt.current.isFresh(e)) return !0;
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));
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) => {
105
+ if (Mt.current.isFresh(e)) return !0;
109
106
  try {
110
- return await m(e, r, i, 3e5), await p(e, r, i, 9e4), Dt.current.markVerified(e), !0;
107
+ return await m(e, r, i, 3e5), await p(e, r, i, 9e4), Mt.current.markVerified(e), !0;
111
108
  } catch {
112
- return Dt.current.invalidate(e), !1;
109
+ return Mt.current.invalidate(e), !1;
113
110
  }
114
111
  };
115
- if (s && (W(n, s, "provisioning"), K(e, t, "provisioning", "Reusing assistant environment..."), await l(s) || (W(n, null, "provisioning"), s = null)), !s) {
116
- K(e, t, "provisioning", "Looking for existing environment...");
117
- let a = await c(r, j, n, Le(), i);
118
- a && (W(n, a, "provisioning"), K(e, t, "provisioning", "Reusing assistant environment..."), await l(a) ? s = a : W(n, null, "provisioning"));
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"));
119
116
  }
120
117
  if (!s) {
121
118
  if (n === "api-calls" && !N()) throw Error("API Calls mode requires an authenticated session. Please sign in again.");
122
- K(e, t, "provisioning", "Starting assistant environment..."), W(n, null, "provisioning"), await f(r, j, n, Le(), i), s = await a(j, n, r, Le(), Ue, i), W(n, s, "provisioning"), await m(s, r, i, 3e5), await p(s, r, i, 9e4);
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);
123
120
  }
124
- W(n, s, "running");
125
- let u = x.getState().conversations.find((t) => t.id === e)?.backendSessionId ?? null;
121
+ U(n, s, "running");
122
+ let u = S.getState().conversations.find((t) => t.id === e)?.backendSessionId ?? null;
126
123
  if (u) try {
127
124
  let e = await d(s, r, u, i);
128
125
  if (e.mode !== n) throw Error(`Session mode mismatch: expected ${n}, received ${e.mode}`);
129
126
  } catch {
130
- ut(e), u = null;
127
+ ht(e), u = null;
131
128
  }
132
- return u || (K(e, t, "connecting", "Preparing session..."), u = (await o(s, r, n, i)).sessionId, lt(e, u)), {
129
+ return u || (G(e, t, "connecting", w(A, C.preparingSession)), u = (await o(s, r, n, i)).sessionId, mt(e, u)), {
133
130
  sandboxId: s,
134
131
  sessionId: u
135
132
  };
136
133
  }, [
137
- ut,
134
+ ht,
138
135
  N,
139
136
  j,
140
- lt,
141
- W,
142
- K
143
- ]), [jt, Mt] = ze(null), q = E(/* @__PURE__ */ new Set()), Nt = E(null), Pt = C(() => {
144
- let e = x.getState(), t = e.activeConversationId;
137
+ mt,
138
+ U,
139
+ A,
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;
145
143
  if (!t) return;
146
- let n = e.processingByConversationId[t], i = ge(n?.status) ? n?.messageId ?? null : null;
147
- if (!ve({
144
+ let n = e.processingByConversationId[t], i = he(n?.status) ? n?.messageId ?? null : null;
145
+ if (!_e({
148
146
  interruptedTurnId: i,
149
147
  activeTurnId: i,
150
- alreadyRequested: i ? q.current.has(i) : !1
148
+ alreadyRequested: i ? K.current.has(i) : !1
151
149
  }).send || !i) return;
152
- q.current.add(i);
153
- let a = e.sandboxesByMode[e.mode]?.sandboxId, o = xe(), s = e.conversations.find((e) => e.id === t)?.backendSessionId;
150
+ K.current.add(i);
151
+ let a = e.sandboxesByMode[e.mode]?.sandboxId, o = we(), s = e.conversations.find((e) => e.id === t)?.backendSessionId;
154
152
  !a || !o || !s || r(a, o, s, {
155
153
  accessToken: N(),
156
154
  workspaceToken: P(),
157
155
  userId: F,
158
- organizationId: S()
156
+ organizationId: Ce()
159
157
  });
160
158
  }, [
161
159
  F,
162
160
  N,
163
161
  P
164
- ]), Ft = C(async (e) => {
165
- let t = x.getState(), n = t.sandboxesByMode[t.mode]?.sandboxId, r = xe(), a = t.activeConversationId;
162
+ ]), Bt = T(async (e) => {
163
+ let t = S.getState(), n = t.sandboxesByMode[t.mode]?.sandboxId, r = we(), a = t.activeConversationId;
166
164
  if (!(!n || !r || !a)) {
167
- Mt(e);
165
+ Lt(e);
168
166
  try {
169
167
  await i(n, r, e, {
170
168
  accessToken: N(),
171
169
  workspaceToken: P(),
172
170
  userId: F,
173
- organizationId: S()
171
+ organizationId: Ce()
174
172
  });
175
173
  } catch (e) {
176
- Mt(null), V(a, {
177
- id: O(),
174
+ Lt(null), z(a, {
175
+ id: Je(),
178
176
  role: "system",
179
177
  content: e instanceof Error ? e.message : "The change could not be approved.",
180
178
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
181
179
  });
182
180
  return;
183
181
  }
184
- Mt(null), Y.current(A("pendingWrite.approvedPrompt", "I approved that change — go ahead."));
182
+ Lt(null), J.current(A("pendingWrite.approvedPrompt", "I approved that change — go ahead."));
185
183
  }
186
184
  }, [
187
185
  F,
188
- V,
186
+ z,
189
187
  A
190
- ]), J = C(async (e, t = [], r = {}) => {
191
- let i = r.voiceSessionId !== void 0, a = x.getState(), o = a.activeConversationId ?? I;
188
+ ]), q = T(async (e, t = [], r = {}) => {
189
+ let i = r.voiceSessionId !== void 0, a = S.getState(), o = a.activeConversationId ?? I;
192
190
  if (o) {
193
- if (ge(a.processingByConversationId[o]?.status)) {
191
+ if (he(a.processingByConversationId[o]?.status)) {
194
192
  let n = a.processingByConversationId[o]?.messageId ?? null;
195
- n && q.current.has(n) && (Nt.current = {
193
+ n && K.current.has(n) && (Rt.current = {
196
194
  conversationId: o,
197
195
  content: e,
198
196
  attachments: t,
@@ -200,40 +198,40 @@ var M = ({ visible: h = !0, writeAccess: se = "unknown" }) => {
200
198
  });
201
199
  return;
202
200
  }
203
- if (Ot.current.has(o)) return;
201
+ if (Nt.current.has(o)) return;
204
202
  }
205
- let c = a.mode, d = I, f = d ? x.getState().conversations.find((e) => e.id === d) : void 0;
206
- if (d ? f && f.mode !== c && (f.messages.length > 0 || f.backendSessionId) ? d = B(void 0, c) : f && f.mode !== c && z(d, c) : d = B(void 0, c), !d) return;
207
- Et.current[d] = t;
208
- let p = xe(), m = {
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 = {
209
207
  accessToken: N(),
210
208
  workspaceToken: P(),
211
209
  userId: F,
212
- organizationId: S()
210
+ organizationId: Ce()
213
211
  }, h = {
214
- id: O(),
212
+ id: Je(),
215
213
  role: "user",
216
214
  content: e,
217
215
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
218
216
  metadata: {
219
- ...t.length ? { attachments: t.map(he) } : {},
217
+ ...t.length ? { attachments: t.map(me) } : {},
220
218
  ..._(r.voiceSessionId)
221
219
  }
222
220
  };
223
- V(d, h);
224
- let g = O();
225
- V(d, {
221
+ z(d, h);
222
+ let g = Je();
223
+ z(d, {
226
224
  id: g,
227
225
  role: "assistant",
228
226
  content: "",
229
227
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
230
228
  metadata: {
231
- lang: nt,
229
+ lang: ot,
232
230
  ..._(r.voiceSessionId)
233
231
  }
234
- }), U(d, "provisioning", g, null);
235
- let ne = (e, t, n, i, a = nt) => {
236
- H(d, g, { content: te(e) }), st(d, g, {
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, {
237
235
  lang: a,
238
236
  ...t?.length ? { artifacts: t } : {},
239
237
  ...t?.length || n || i ? { mode: c } : {},
@@ -244,147 +242,151 @@ var M = ({ visible: h = !0, writeAccess: se = "unknown" }) => {
244
242
  }, v = async (n = 1) => {
245
243
  let r = !1;
246
244
  try {
247
- let { sandboxId: n, sessionId: a } = await At(d, g, c, p, m), o = (await u(n, p, a, m, { limit: 50 }).catch(() => [])).reduce((e, t) => Math.max(e, k(t)), 0);
248
- K(d, g, "streaming", "Thinking...");
249
- let f = de(e, t), h = Je?.(c, f, et, tt, i) ?? f, _ = ue(h, t), v = pe(_), y = v > 0, re = qe?.();
250
- r = fe(t) > v;
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;
251
249
  try {
252
250
  await ee(n, p, a, h, c, re, m, _?.length ? { parts: _ } : void 0);
253
251
  } catch (e) {
254
- if (!_ || !je(e)) throw e;
252
+ if (!_ || !Pe(e)) throw e;
255
253
  await ee(n, p, a, h, c, re, m, void 0), r ||= y;
256
254
  }
257
- let b = Ge([], o), ae = Date.now() + (Ve[c] ?? He), oe = Date.now(), se = Date.now(), ce = () => _e({
255
+ let b = Xe([], o), ae = Date.now() + (We[c] ?? Ge), oe = Date.now(), x = Date.now(), se = () => ge({
258
256
  turnId: g,
259
- abortRequested: q.current.has(g),
260
- activeTurnId: x.getState().processingByConversationId[d]?.messageId ?? null
261
- });
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));
262
+ };
262
263
  for (; Date.now() < ae;) {
263
- let e = ce();
264
+ let e = se();
264
265
  if (e.abandon) {
265
- e.clearProcessing && ct(d);
266
+ ce(), e.clearProcessing && pt(d);
266
267
  return;
267
268
  }
268
- if (b = Ge(await u(n, p, a, m, {
269
+ if (b = Xe(await u(n, p, a, m, {
269
270
  limit: 50,
270
271
  sinceMs: o
271
- }), o), H(d, g, { content: te(b.content) }), b.pendingWrite && st(d, g, { pendingWrite: b.pendingWrite }), b.done) break;
272
- 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() - se)));
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)));
273
274
  }
274
275
  if (!b.done && c !== "vibe-plugins") throw Error("Assistant response timed out while streaming progress");
275
- let le = c === "vibe-plugins" ? await l(n, p, a, m).then((e) => e).catch(() => []) : void 0;
276
+ let pe = c === "vibe-plugins" ? await l(n, p, a, m).then((e) => e).catch(() => []) : void 0;
276
277
  if (b.done || (b = {
277
278
  ...b,
278
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._`
279
280
  }), r && (b = {
280
281
  ...b,
281
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._")}`
282
- }), ne(b.content, le, a, n), b.tokens) {
283
- H(d, g, { tokens: b.tokens });
283
+ }), ne(b.content, pe, a, n), b.tokens) {
284
+ V(d, g, { tokens: b.tokens });
284
285
  try {
285
- await Ye?.({
286
+ await $e?.({
286
287
  workspaceId: p,
287
288
  sessionId: a,
288
289
  messageId: b.messageId,
289
290
  model: b.model,
290
291
  tokens: b.tokens
291
- }), Pe(j);
292
+ }), Le(j);
292
293
  } catch {}
293
294
  }
294
- let me = ce();
295
+ let me = se();
295
296
  if (me.abandon) {
296
- me.clearProcessing && ct(d);
297
+ ce(), me.clearProcessing && pt(d);
297
298
  return;
298
299
  }
299
- U(d, "complete", g, null);
300
+ H(d, "complete", g, null);
300
301
  } catch (e) {
301
- if (n === 1 && Me(e)) return ut(d), dt(c), v(2);
302
+ if (n === 1 && Fe(e)) return ht(d), gt(c), v(2);
302
303
  throw e;
303
304
  }
304
305
  }, y = d;
305
- Ot.current.add(y);
306
+ Nt.current.add(y);
306
307
  try {
307
308
  if (!p) throw Error("Assistant backend is unavailable without an active workspace context.");
308
309
  await v();
309
310
  } catch (e) {
310
- Dt.current.invalidate(x.getState().sandboxesByMode[c]?.sandboxId ?? null);
311
+ Mt.current.invalidate(S.getState().sandboxesByMode[c]?.sandboxId ?? null);
311
312
  let t = n(e);
312
313
  if (t) {
313
- t.refusal === "exhausted" && Ne(j, "sandbox");
314
+ t.refusal === "exhausted" && Ie(j, "sandbox");
314
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.";
315
- ne(e ? `${n}\n\n${e}` : n, void 0, void 0, void 0, "en"), U(d, "error", g, null);
316
+ ne(e ? `${n}\n\n${e}` : n, void 0, void 0, void 0, "en"), H(d, "error", g, null);
316
317
  return;
317
318
  }
318
319
  let i = e instanceof Error ? e.message : "Something went wrong";
319
- U(d, "error", g, i), H(d, g, { content: `Sorry, an error occurred: ${i}. Please try again.` }), st(d, g, {
320
+ H(d, "error", g, i), V(d, g, { content: `Sorry, an error occurred: ${i}. Please try again.` }), ft(d, g, {
320
321
  lang: "en",
321
322
  ..._(r.voiceSessionId)
322
323
  });
323
324
  } finally {
324
- Ot.current.delete(y);
325
- let e = Nt.current;
326
- Nt.current = null, e && e.conversationId === y && Y.current(e.content, e.attachments, e.options);
325
+ Nt.current.delete(y);
326
+ let e = Rt.current;
327
+ Rt.current = null, e && e.conversationId === y && J.current(e.content, e.attachments, e.options);
327
328
  }
328
329
  }, [
329
330
  I,
330
- V,
331
- Je,
332
- ut,
333
- dt,
334
- rt,
335
- B,
336
- At,
337
- qe,
331
+ z,
332
+ Qe,
333
+ ht,
334
+ gt,
335
+ st,
336
+ R,
337
+ Ft,
338
+ Ze,
338
339
  N,
339
340
  P,
340
- H,
341
+ V,
341
342
  j,
342
- Ye,
343
- tt,
344
- nt,
345
- et,
346
- lt,
347
- z,
348
- U,
349
- ct,
343
+ $e,
344
+ at,
345
+ ot,
346
+ it,
347
+ mt,
348
+ ut,
349
+ H,
350
+ pt,
350
351
  A,
351
- K,
352
+ G,
353
+ B,
352
354
  F
353
- ]), It = C((e) => {
354
- J(e);
355
- }, [J]), Lt = C(() => {
356
- let e = [...G.chat].reverse().find((e) => e.role === "user"), t = I ? Et.current[I] ?? [] : [];
357
- e && J(e.content, t);
355
+ ]), Vt = T((e) => {
356
+ q(e);
357
+ }, [q]), Ht = T(() => {
358
+ let e = [...W.chat].reverse().find((e) => e.role === "user"), t = I ? jt.current[I] ?? [] : [];
359
+ e && q(e.content, t);
358
360
  }, [
359
- mt,
360
- J,
361
+ yt,
362
+ q,
361
363
  I
362
- ]), Y = E(J);
363
- w(() => {
364
- Y.current = J;
365
- }, [J]);
366
- let Rt = T(() => {
367
- if (gt) return null;
368
- for (let e = mt.length - 1; e >= 0; --e) {
369
- let t = mt[e];
370
- if (t?.role !== "assistant" || !g(t) || q.current.has(t.id)) continue;
371
- let n = ye(t.content).text.trim();
364
+ ]), J = O(q);
365
+ E(() => {
366
+ J.current = q;
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];
372
+ if (t?.role !== "assistant" || !g(t) || K.current.has(t.id)) continue;
373
+ let n = xe(t.content).text.trim();
372
374
  return n ? {
373
375
  id: t.id,
374
376
  text: n
375
377
  } : null;
376
378
  }
377
379
  return null;
378
- }, [mt, gt]), zt = T(() => Rt ? b(Rt.text) : null, [Rt]), Bt = G.chat, X = T(() => G.voice.filter((e) => e.role === "user" || e.role === "assistant").map((e) => ({
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) => ({
379
381
  id: e.id,
380
382
  role: e.role,
381
- text: ye(e.content).text.trim(),
383
+ text: xe(e.content).text.trim(),
382
384
  sessionId: ne(e),
383
385
  timestamp: e.timestamp
384
- })).filter((e) => e.text.length > 0), [G.voice]), Vt = C(() => {
385
- if (X.length === 0) return;
386
+ })).filter((e) => e.text.length > 0), [W.voice]), Kt = T(() => {
387
+ if (Y.length === 0) return;
386
388
  let e = /* @__PURE__ */ new Date();
387
- Te(y(X, {
389
+ Oe(y(Y, {
388
390
  title: A("voiceSession.transcript", "Voice conversation"),
389
391
  savedAt: A("voiceSession.savedAt", "Saved"),
390
392
  session: A("voiceSession.sessionLabel", "Session"),
@@ -394,168 +396,168 @@ var M = ({ visible: h = !0, writeAccess: se = "unknown" }) => {
394
396
  }, e), re(j, e), "text/markdown");
395
397
  }, [
396
398
  j,
397
- X,
399
+ Y,
398
400
  A
399
- ]), Z = Fe(), Q = E(Z);
400
- Q.current = Z;
401
- let $ = be({
402
- onSubmit: C((e, t) => {
401
+ ]), X = Re(), Z = O(X);
402
+ Z.current = X;
403
+ let Q = Se({
404
+ onSubmit: T((e, t) => {
403
405
  let n = () => {
404
- let n = Q.current, r = me(n.attachments);
405
- Y.current(e, r, { voiceSessionId: t }), n.clear();
406
+ let n = Z.current, r = pe(n.attachments);
407
+ J.current(e, r, { voiceSessionId: t }), n.clear();
406
408
  };
407
- if (!Q.current.isBusy) {
409
+ if (!Z.current.isBusy) {
408
410
  n();
409
411
  return;
410
412
  }
411
413
  let r = Date.now(), i = window.setInterval(() => {
412
- Q.current.isBusy && Date.now() - r < We || (window.clearInterval(i), n());
414
+ Z.current.isBusy && Date.now() - r < qe || (window.clearInterval(i), n());
413
415
  }, 200);
414
416
  }, []),
415
- latestReply: Rt,
416
- language: ae(Ze, Xe).tag
417
- }), Ht = T(() => (pt?.messages ?? []).reduce((e, t) => Math.max(e, t.metadata?.continuedVoiceTurns ?? 0), 0), [pt?.messages]), Ut = X.length > Ht, Wt = C(() => {
418
- let e = x.getState().activeConversationId;
419
- !e || X.length === 0 || (V(e, {
420
- id: O(),
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(),
421
423
  role: "system",
422
- content: v(X.slice(Ht), {
424
+ content: v(Y.slice(qt), {
423
425
  intro: A("voiceSession.continuedIntro", "Continued from a voice conversation. You asked about:"),
424
426
  nothing: A("voiceSession.continuedNothing", "Continued from a voice conversation."),
425
427
  more: (e) => A("voiceSession.continuedMore", "…and {{count}} more", { count: e })
426
428
  }),
427
429
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
428
- metadata: { continuedVoiceTurns: X.length }
429
- }), Tt(!1), $.end());
430
+ metadata: { continuedVoiceTurns: Y.length }
431
+ }), At(!1), Q.end());
430
432
  }, [
431
- X,
432
- Ht,
433
- V,
433
+ Y,
434
+ qt,
435
+ z,
434
436
  A,
435
- $
436
- ]), Gt = E(0);
437
- w(() => {
438
- $.active && (Gt.current = X.length);
439
- }, [$.active]);
440
- let Kt = C(() => {
441
- let e = X.length > Gt.current;
442
- $.end(), e && Tt(!0);
443
- }, [X, $]);
444
- w(() => {
445
- !h && $.active && $.end();
446
- }, [h, $]), w(() => {
447
- $.active || (Q.current.clear(), Nt.current = null);
448
- }, [$.active]), w(() => {
449
- let e = x.getState().consumePendingPrompt();
450
- return e && Y.current(e), x.subscribe((e, t) => {
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) => {
451
453
  if (e.pendingPrompt && e.pendingPrompt !== t.pendingPrompt) {
452
- let e = x.getState().consumePendingPrompt();
453
- e && Y.current(e);
454
+ let e = S.getState().consumePendingPrompt();
455
+ e && J.current(e);
454
456
  }
455
457
  });
456
458
  }, []);
457
- let qt = C((e) => {
458
- let t = I ? x.getState().conversations.find((e) => e.id === I) : void 0;
459
+ let $ = T((e) => {
460
+ let t = I ? S.getState().conversations.find((e) => e.id === I) : void 0;
459
461
  if (t && (t.messages.length > 0 || t.backendSessionId)) {
460
462
  if (t.mode !== e) {
461
- let t = x.getState().conversations.find((t) => t.mode === e && t.messages.length === 0 && !t.backendSessionId && !x.getState().processingByConversationId[t.id]);
462
- t ? at(t.id) : B(void 0, 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
465
  }
464
- } else I && z(I, e);
465
- R(e);
466
+ } else I && ut(I, e);
467
+ lt(e);
466
468
  }, [
467
469
  I,
468
- B,
469
- at,
470
- z,
471
- R
472
- ]), Jt = C((e) => {
473
- if (M.find((t) => t.id === e)?.writeCapable && !x.getState().apiCallsAcknowledged) {
474
- Ct(e);
470
+ R,
471
+ dt,
472
+ ut,
473
+ lt
474
+ ]), Qt = T((e) => {
475
+ if (M.find((t) => t.id === e)?.writeCapable && !S.getState().apiCallsAcknowledged) {
476
+ Ot(e);
475
477
  return;
476
478
  }
477
- qt(e);
478
- }, [qt, M]), Yt = C(() => {
479
- let e = St;
480
- Ct(null), ft(), e && qt(e);
479
+ $(e);
480
+ }, [$, M]), $t = T(() => {
481
+ let e = Dt;
482
+ Ot(null), _t(), e && $(e);
481
483
  }, [
482
- St,
483
- ft,
484
- qt
485
- ]), Xt = C(() => {
486
- Ct(null);
484
+ Dt,
485
+ _t,
486
+ $
487
+ ]), en = T(() => {
488
+ Ot(null);
487
489
  }, []);
488
- return /* @__PURE__ */ Be("div", {
490
+ return /* @__PURE__ */ Ue("div", {
489
491
  className: "relative flex flex-1 flex-col overflow-hidden",
490
492
  children: [
491
- /* @__PURE__ */ Be("div", {
493
+ /* @__PURE__ */ Ue("div", {
492
494
  className: "contents",
493
- inert: $.active || void 0,
495
+ inert: Q.active || void 0,
494
496
  children: [
495
- X.length > 0 && !$.active ? /* @__PURE__ */ D(Ce, {
496
- count: X.length,
497
- onOpenTranscript: () => Tt(!0)
497
+ Y.length > 0 && !Q.active ? /* @__PURE__ */ k(Ee, {
498
+ count: Y.length,
499
+ onOpenTranscript: () => At(!0)
498
500
  }) : null,
499
- Bt.length === 0 ? /* @__PURE__ */ D(Ee, {
501
+ Gt.length === 0 ? /* @__PURE__ */ k(ke, {
500
502
  mode: L,
501
- onSuggestionClick: It
502
- }) : /* @__PURE__ */ D("div", {
503
+ onSuggestionClick: Vt
504
+ }) : /* @__PURE__ */ k("div", {
503
505
  className: "flex min-h-0 flex-1 flex-col",
504
- children: /* @__PURE__ */ D(De, {
505
- onApprovePendingWrite: Ft,
506
- approvingWriteRef: jt,
507
- messages: Bt,
508
- streamingMessageId: _t,
509
- failedMessageId: vt,
510
- onRetry: Lt
506
+ children: /* @__PURE__ */ k(Ae, {
507
+ onApprovePendingWrite: Bt,
508
+ approvingWriteRef: It,
509
+ messages: Gt,
510
+ streamingMessageId: St,
511
+ failedMessageId: Ct,
512
+ onRetry: Ht
511
513
  })
512
514
  }),
513
- /* @__PURE__ */ D(Ie, {
514
- onStartVoiceSession: $.available && L !== "api-calls" ? $.start : void 0,
515
- onSend: (e, t) => void J(e, t),
516
- disabled: gt,
515
+ /* @__PURE__ */ k(ze, {
516
+ onStartVoiceSession: Q.available && L !== "api-calls" ? Q.start : void 0,
517
+ onSend: (e, t) => void q(e, t),
518
+ disabled: xt,
517
519
  placeholder: L === "api-calls" ? A("chatArea.placeholderActions", "What would you like me to do?") : A("chatArea.placeholderGeneral", "Ask me anything…"),
518
520
  mode: L,
519
- writeAccessDenied: se === "denied" && !!kt?.writeCapable,
520
- availableModes: xt,
521
- onModeChange: Jt
521
+ writeAccessDenied: x === "denied" && !!Pt?.writeCapable,
522
+ availableModes: Et,
523
+ onModeChange: Qt
522
524
  })
523
525
  ]
524
526
  }),
525
- wt && !$.active ? /* @__PURE__ */ D(we, {
526
- turns: X,
527
- onClose: () => Tt(!1),
528
- onSave: Vt,
529
- onContinueInChat: Ut ? Wt : void 0,
527
+ kt && !Q.active ? /* @__PURE__ */ k(De, {
528
+ turns: Y,
529
+ onClose: () => At(!1),
530
+ onSave: Kt,
531
+ onContinueInChat: Jt ? Yt : void 0,
530
532
  closeOnEscape: !0
531
533
  }) : null,
532
- $.active && /* @__PURE__ */ D(Oe, {
533
- session: $.session,
534
- notice: $.notice,
535
- capturing: $.capturing,
536
- interrupting: $.interrupting,
537
- awaitingEndpoint: $.awaitingEndpoint,
538
- turns: X,
539
- spokenChunks: $.spokenChunks,
540
- attachments: Z.attachments,
541
- onAttachFiles: Z.addFiles,
542
- onRemoveAttachment: Z.remove,
543
- onRetryAttachment: Z.retry,
544
- canAttachMore: Z.canAddMore,
545
- preparingAttachments: Z.preparingCount,
546
- onSaveTranscript: Vt,
547
- onContinueInChat: Wt,
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,
548
550
  onInterrupt: () => {
549
- $.interrupt(), Pt();
551
+ Q.interrupt(), zt();
550
552
  },
551
- spoken: zt,
552
- onToggleMute: $.toggleMute,
553
- onEnd: Kt
553
+ spoken: Wt,
554
+ onToggleMute: Q.toggleMute,
555
+ onEnd: Zt
554
556
  }),
555
- /* @__PURE__ */ D(Re, {
556
- open: St !== null,
557
- onConfirm: Yt,
558
- onCancel: Xt
557
+ /* @__PURE__ */ k(Ve, {
558
+ open: Dt !== null,
559
+ onConfirm: $t,
560
+ onCancel: en
559
561
  })
560
562
  ]
561
563
  });
@@ -38,56 +38,57 @@ import { BOILERPLATE_PAGE_SHARE as hn, MAX_BOILERPLATE_LINE_CHARS as gn, MAX_EXT
38
38
  import { ATTACHMENT_ACCEPT as Fn, AttachmentRejectedError as In, INLINE_IMAGE_MAX_DIM as Ln, INLINE_IMAGE_QUALITY as Rn, MAX_ATTACHMENTS as zn, MAX_FILE_BYTES as Bn, MAX_INLINE_CHARS_PER_FILE as Vn, MAX_INLINE_CHARS_TOTAL as Hn, MAX_INLINE_IMAGE_BASE64_CHARS as Un, MAX_INLINE_IMAGE_PARTS as Wn, MAX_INLINE_TURN_BODY_BYTES as Gn, MAX_TURN_BODY_BYTES as Kn, PROMPT_ENVELOPE_RESERVE_BYTES as qn, TURN_BODY_HEADROOM_BYTES as Jn, buildAttachmentPromptBlock as Yn, buildPromptParts as Xn, buildPromptWithAttachments as Zn, classifyAttachment as Qn, countInlineImageCandidates as $n, countInlinedImageParts as er, detectDocumentFormat as tr, estimateTurnBodyBytes as nr, formatBytes as rr, getAttachmentSendBlocker as ir, getExtension as ar, getSendableAttachments as or, hasAttachmentWorkInFlight as sr, parseDataUrl as cr, toMessageAttachment as lr, truncateForInline as ur, validateFile as dr } from "./shared/assistant/attachments.js";
39
39
  import { useAssistantStore as fr } from "./shared/assistant/store.js";
40
40
  import { isTurnInFlight as pr, planAbandonedTurn as mr, planTurnAbort as hr } from "./shared/assistant/turnState.js";
41
- import { AssistantToolActivity as gr, parseToolActivity as _r } from "./shared/assistant/ui/AssistantToolActivity.js";
42
- import { AssistantSpeechProvider as vr, useAssistantSpeech as yr } from "./shared/assistant/ui/AssistantSpeechProvider.js";
43
- import { useVoiceSession as br } from "./shared/assistant/ui/useVoiceSession.js";
44
- import { copyToClipboard as xr } from "./shared/assistant/clipboard.js";
45
- import { getActorId as Sr, getOrganizationId as Cr, getWorkspaceId as wr } from "./shared/assistant/context.js";
46
- import { ATTACHMENT_SOURCES as Tr, availableAttachmentSources as Er, deviceHasCamera as Dr } from "./shared/assistant/attachmentSources.js";
47
- import { SANDBOX_READY_TTL_MS as Or, createReadinessTracker as kr, isRecentlyVerified as Ar } from "./shared/assistant/sandboxReadiness.js";
48
- import { AssistantAutoSpeakToggle as jr } from "./shared/assistant/ui/AssistantAutoSpeakToggle.js";
49
- import { AssistantMarkdownImage as Mr, imageHostLabel as Nr, isRemoteImageSrc as Pr } from "./shared/assistant/ui/AssistantMarkdownImage.js";
50
- import { AssistantMarkdownRenderer as Fr, assistantUrlTransform as Ir } from "./shared/assistant/ui/AssistantMarkdownRenderer.js";
51
- import { AssistantMessageAttachments as Lr } from "./shared/assistant/ui/AssistantMessageAttachments.js";
52
- import { AssistantPendingWriteCard as Rr } from "./shared/assistant/ui/AssistantPendingWriteCard.js";
53
- import { AssistantLanguageMenu as zr } from "./shared/assistant/ui/AssistantLanguageMenu.js";
54
- import { AssistantReplyLanguageSelector as Br } from "./shared/assistant/ui/AssistantReplyLanguageSelector.js";
55
- import { AssistantSpeakButton as Vr } from "./shared/assistant/ui/AssistantSpeakButton.js";
56
- import { AssistantSpokenTurnsNotice as Hr } from "./shared/assistant/ui/AssistantSpokenTurnsNotice.js";
57
- import { AssistantAttachmentButton as Ur } from "./shared/assistant/ui/composer/AssistantAttachmentButton.js";
58
- import { AssistantAttachmentChips as Wr } from "./shared/assistant/ui/composer/AssistantAttachmentChips.js";
59
- import { AssistantLanguageSelector as Gr, FOLLOW_APP_LOCALE as Kr } from "./shared/assistant/ui/composer/AssistantLanguageSelector.js";
60
- import { ASSISTANT_MODE_META as qr, AssistantModeSelector as Jr, nextModeIndex as Yr } from "./shared/assistant/ui/composer/AssistantModeSelector.js";
61
- import { AssistantVoiceButton as Xr } from "./shared/assistant/ui/composer/AssistantVoiceButton.js";
62
- import { AUTO_VOICE as Zr, AssistantVoiceSelector as Qr } from "./shared/assistant/ui/composer/AssistantVoiceSelector.js";
63
- import { AssistantVoiceOrb as $r } from "./shared/assistant/ui/voice/AssistantVoiceOrb.js";
64
- import { AssistantVoiceSessionButton as ei } from "./shared/assistant/ui/voice/AssistantVoiceSessionButton.js";
65
- import { CAPTION_SCROLL_ATTR as ti, VoiceCaption as ni } from "./shared/assistant/ui/voice/VoiceCaption.js";
66
- import { VoiceConversationView as ri } from "./shared/assistant/ui/voice/VoiceConversationView.js";
67
- import { VoiceWaveform as ii } from "./shared/assistant/ui/voice/VoiceWaveform.js";
68
- import { VoiceMiniController as ai } from "./shared/assistant/ui/voice/VoiceMiniController.js";
69
- import { VoiceStage as oi } from "./shared/assistant/ui/voice/VoiceStage.js";
70
- import { VoiceTranscriptDrawer as si } from "./shared/assistant/ui/voice/VoiceTranscriptDrawer.js";
71
- import { downloadFile as ci, exportConversation as li } from "./shared/assistant/exportConversation.js";
72
- import { AssistantMoreMenu as ui } from "./shared/assistant/ui/AssistantMoreMenu.js";
73
- import { AssistantHeader as di } from "./shared/assistant/ui/AssistantHeader.js";
74
- import { AssistantConversationList as fi } from "./shared/assistant/ui/AssistantConversationList.js";
75
- import { AssistantEmptyState as pi } from "./shared/assistant/ui/AssistantEmptyState.js";
76
- import { AssistantMessageItem as mi } from "./shared/assistant/ui/AssistantMessageItem.js";
77
- import { AssistantMessageList as hi } from "./shared/assistant/ui/AssistantMessageList.js";
78
- import { AssistantVoiceSession as gi } from "./shared/assistant/ui/voice/AssistantVoiceSession.js";
79
- import { useAssistantApiAccess as _i } from "./shared/assistant/useAssistantApiAccess.js";
80
- import { useConversationTurns as vi } from "./shared/assistant/useConversationTurns.js";
81
- import { isMultimodalBodyRejection as yi, isRecoverableAssistantError as bi } from "./shared/assistant/transportErrors.js";
82
- import { aiCreditsUpdatedEventName as xi, dispatchAssistantQuotaExhausted as Si, notifyAiCreditsUpdated as Ci } from "./shared/assistant/aiCredits.js";
83
- import { useWorkspaceWriteAccess as wi } from "./shared/assistant/useWorkspaceWriteAccess.js";
84
- import { extractDocumentText as Ti } from "./shared/assistant/documentExtract.js";
85
- import { useAssistantAttachments as Ei } from "./shared/assistant/useAssistantAttachments.js";
86
- import { AssistantComposer as Di } from "./shared/assistant/ui/composer/AssistantComposer.js";
87
- import { isProdRuntime as Oi } from "./shared/assistant/env.js";
88
- import { useAssistantHeartbeat as ki } from "./shared/assistant/useAssistantHeartbeat.js";
89
- import { useAssistantKeyboardShortcuts as Ai } from "./shared/assistant/useAssistantKeyboardShortcuts.js";
90
- import { AssistantApiCallsConsentDialog as ji } from "./shared/assistant/ui/AssistantApiCallsConsentDialog.js";
91
- import { AssistantChatArea as Mi } from "./shared/assistant/ui/AssistantChatArea.js";
92
- import { AIAssistantPanel as Ni } from "./shared/assistant/ui/AIAssistantPanel.js";
93
- export { Ni as AIAssistantPanel, g as ASSISTANT_API_AUTH_STRATEGY, zt as ASSISTANT_LANGUAGES, qr as ASSISTANT_MODE_META, Fn as ATTACHMENT_ACCEPT, Tr as ATTACHMENT_SOURCES, Zr as AUTO_VOICE, ji as AssistantApiCallsConsentDialog, Ur as AssistantAttachmentButton, Wr as AssistantAttachmentChips, jr as AssistantAutoSpeakToggle, Mi as AssistantChatArea, Di as AssistantComposer, fi as AssistantConversationList, pi as AssistantEmptyState, di as AssistantHeader, $t as AssistantI18nProvider, zr as AssistantLanguageMenu, Gr as AssistantLanguageSelector, Mr as AssistantMarkdownImage, Fr as AssistantMarkdownRenderer, Lr as AssistantMessageAttachments, mi as AssistantMessageItem, hi as AssistantMessageList, Jr as AssistantModeSelector, ui as AssistantMoreMenu, Rr as AssistantPendingWriteCard, qt as AssistantProductProvider, Br as AssistantReplyLanguageSelector, X as AssistantRuntimeManager, Vr as AssistantSpeakButton, vr as AssistantSpeechProvider, Hr as AssistantSpokenTurnsNotice, gr as AssistantToolActivity, Xr as AssistantVoiceButton, $r as AssistantVoiceOrb, Qr as AssistantVoiceSelector, gi as AssistantVoiceSession, ei as AssistantVoiceSessionButton, In as AttachmentRejectedError, hn as BOILERPLATE_PAGE_SHARE, ti as CAPTION_SCROLL_ATTR, s as CHECK_AI_CREDITS, c as CREATE_SANDBOX, vt as DEFAULT_SPEAKABLE_LABELS, Bt as DEFAULT_SPEECH_RATE, Ge as ENDPOINT_GRACE_MS, l as EXTEND_SANDBOX_TTL, Kr as FOLLOW_APP_LOCALE, u as GET_ACTIVE_SANDBOXES, d as GET_SANDBOX, xe as HOSTED_TTS_MAX_CHARS, _e as HOSTED_TTS_TIER, ve as HOSTED_VOICES, cn as IDLE_PLAYBACK, Ke as INITIAL_SESSION, Ln as INLINE_IMAGE_MAX_DIM, Rn as INLINE_IMAGE_QUALITY, qe as INTERRUPT_MAX_MS, Je as INTERRUPT_MIN_MS, zn as MAX_ATTACHMENTS, gn as MAX_BOILERPLATE_LINE_CHARS, _n as MAX_EXTRACTED_CHARS, Bn as MAX_FILE_BYTES, Vn as MAX_INLINE_CHARS_PER_FILE, Hn as MAX_INLINE_CHARS_TOTAL, pn as MAX_INLINE_IMAGE_BASE64_BYTES, Un as MAX_INLINE_IMAGE_BASE64_CHARS, Wn as MAX_INLINE_IMAGE_PARTS, Gn as MAX_INLINE_TURN_BODY_BYTES, vn as MAX_PDF_PAGES_SCANNED, mn as MAX_REQUEST_BODY_BYTES, yt as MAX_SPEAKABLE_CHARS, bt as MAX_SPOKEN_TABLE_ROWS, Kn as MAX_TURN_BODY_BYTES, At as MINI_CAPTION_BUDGET, yn as MIN_PAGE_TEXT_CHARS, bn as MIN_TEXT_PAGE_SHARE, Mt as POLL_FAST_MS, Nt as POLL_FAST_UNTIL_MS, Pt as POLL_SLOW_MS, Ft as POLL_STEADY_MS, It as POLL_STEADY_UNTIL_MS, Ot as PREVIEW_LANGUAGES, qn as PROMPT_ENVELOPE_RESERVE_BYTES, f as PROXY_SANDBOX_REQUEST, p as REPORT_AI_TOKEN_USAGE, Or as SANDBOX_READY_TTL_MS, Ye as SILENCE_SUBMIT_MS, Se as SPEAKING_RATE_MAX, Ce as SPEAKING_RATE_MAX_STREAMING, we as SPEAKING_RATE_MAX_SYNC, Te as SPEAKING_RATE_MIN, xt as SPEECH_CHUNK_CHARS, St as SPEECH_CHUNK_CJK_CHARS, rt as SPEECH_LANG, rn as SPOKEN_LABEL_LANGUAGES, m as STOP_ASSISTANT_SANDBOX, Jn as TURN_BODY_HEADROOM_BYTES, it as VOICE_LIST_TIMEOUT_MS, ni as VoiceCaption, ri as VoiceConversationView, ai as VoiceMiniController, oi as VoiceStage, si as VoiceTranscriptDrawer, ii as VoiceWaveform, h as WAIT_FOR_SANDBOX_RUNNING, E as abortAssistantTurn, xi as aiCreditsUpdatedEventName, D as approvePendingWrite, en as assistantTranslationKey, Ir as assistantUrlTransform, Er as availableAttachmentSources, Ee as base64ToBytes, ge as browserSpeechEngine, O as buildAssistantSandboxEnv, Yn as buildAttachmentPromptBlock, ht as buildContinuedFromVoiceNote, Z as buildProgress, Xn as buildPromptParts, k as buildPromptRequestBody, Zn as buildPromptWithAttachments, De as buildRequest, a as buildSandboxContextInput, gt as buildVoiceTranscriptMarkdown, le as chatTurns, A as checkAssistantAiCredits, Ct as chunkForSpeech, Qn as classifyAttachment, Oe as classifyHttpFailure, t as classifyQuotaError, xn as columnLetterToIndex, Pe as configureSpeechEngine, wt as containsCjk, xr as copyToClipboard, $n as countInlineImageCandidates, er as countInlinedImageParts, j as createAssistantSandbox, M as createAssistantSession, Me as createHostedTtsEngine, kr as createReadinessTracker, Ne as createRoutingSpeechEngine, se as createSandboxAssistantTransport, Fe as createSpeechEngines, ke as decodeAudioResponse, Sn as decodeXmlEntities, n as describeQuotaError, tr as detectDocumentFormat, on as detectScriptLocale, Dr as deviceHasCamera, Si as dispatchAssistantQuotaExhausted, Cn as docxXmlToText, N as downloadAssistantArtifact, ci as downloadFile, nr as estimateTurnBodyBytes, o as executeSandboxGraphQL, li as exportConversation, P as extendAssistantSandboxTTL, Ti as extractDocumentText, Vt as findAssistantLanguage, F as findExistingSandbox, Gt as findPendingWrite, wn as fitPdfPages, rr as formatBytes, Tn as formatPageRanges, Sr as getActorId, I as getAssistantArtifacts, Q as getAssistantMedia, L as getAssistantMessages, R as getAssistantSession, z as getAssistantStreamAccess, $ as getAssistantText, ir as getAttachmentSendBlocker, S as getCapability, ar as getExtension, _ as getImageForMode, v as getImageTagForMode, Cr as getOrganizationId, ee as getRawMessageCreatedAt, y as getResourcesForMode, b as getSandboxImageRegistry, or as getSendableAttachments, Ie as getSpeechEngine, te as getToolProgress, wr as getWorkspaceId, ue as groupBySession, de as groupConsecutiveBySession, sr as hasAttachmentWorkInFlight, ye as hostedLocaleFor, be as hostedSupportsLanguage, Nr as imageHostLabel, Xe as isCapturing, Ze as isEcho, En as isMostlyImagePages, yi as isMultimodalBodyRejection, Oi as isProdRuntime, r as isQuotaExhaustedError, ne as isReapedSandboxConnectionError, Ar as isRecentlyVerified, re as isRecoverable, bi as isRecoverableAssistantError, Pr as isRemoteImageSrc, ln as isSpeakingMessage, at as isSpeechBlocked, Qe as isSubmittable, pr as isTurnInFlight, C as isUnknownFieldError, fe as isVoiceTurn, Dn as joinSheets, ot as languageDisplayName, ie as mapSessionToHistory, w as markSupported, T as markUnsupported, ae as mergeMessagesById, ze as micIsInterrupt, B as modeRequiresConfirmWrites, Yr as nextModeIndex, st as normalizeLangTag, Ci as notifyAiCreditsUpdated, $e as orbMode, On as pageMarker, Kt as parseConfirmationRefusal, cr as parseDataUrl, kn as parseSharedStrings, _r as parseToolActivity, An as parseWorkbookSheets, jn as pdfTextItemsToPage, mr as planAbandonedTurn, et as planReplyConsumption, hr as planTurnAbort, Lt as pollDelayMs, ct as primaryLanguageSubtag, un as publishedChunks, i as quotaExhaustedEventName, Le as readSpeechEngineConfig, V as releaseSupersededAssistantSandboxes, Ut as replyFollowsInput, H as reportAssistantAiTokenUsage, dn as requiresCancel, Re as resetSpeechEngine, Ht as resolveAssistantLanguage, Wt as resolveLanguagePair, Jt as resolveModeConfig, x as resolveSandboxAssistantMode, sn as resolveSpeechLocale, oe as sanitize, U as selectExistingAssistantSandbox, W as selectSupersededAssistantSandboxes, lt as selectVoiceForLocale, G as sendAssistantPromptAsync, K as sendHeartbeat, Mn as sheetXmlToRows, Ae as shouldDisableEngine, jt as showPreviousChunk, Be as showsAssistantCaption, Ve as showsUserCaption, Tt as speakableEmail, ut as speechGate, an as speechLabelsFor, dt as speechLangForLocale, fn as speechPlaybackReducer, je as splitForVendor, Et as splitTableRow, tt as spokenSoFar, q as stopReapedAssistantSandbox, Nn as summarisePageText, Rt as toCaptionText, lr as toMessageAttachment, Dt as toSpeakableText, ur as truncateForInline, Pn as truncatePagesForInline, _i as useAssistantApiAccess, Ei as useAssistantAttachments, ki as useAssistantHeartbeat, tn as useAssistantI18nNamespace, Ai as useAssistantKeyboardShortcuts, Yt as useAssistantPageLabel, Xt as useAssistantProduct, Zt as useAssistantProductOrNull, yr as useAssistantSpeech, Qt as useAssistantStorageFolders, fr as useAssistantStore, nn as useAssistantTr, vi as useConversationTurns, ce as useSandboxAssistantTransport, e as useVoiceInput, br as useVoiceSession, wi as useWorkspaceWriteAccess, dr as validateFile, ft as voiceAvailability, pe as voiceMarker, kt as voicePreviewText, pt as voiceQualityRank, me as voiceSessionIdOf, nt as voiceSessionReducer, He as voiceStageState, _t as voiceTranscriptFilename, he as voiceTurnsOnly, mt as voicesForLocale, J as waitForAssistantServiceReady, Y as waitForSandboxRunning, Ue as waveformIsActive, We as waveformIsSettled };
41
+ import { PHRASE_ROTATE_MS as gr, STAGE_COPY as _r, THINKING_PHRASES as vr, isStageCopy as yr, stageText as br, statusStageCopy as xr, thinkingPhrase as Sr } from "./shared/assistant/stageCopy.js";
42
+ import { AssistantToolActivity as Cr, parseToolActivity as wr } from "./shared/assistant/ui/AssistantToolActivity.js";
43
+ import { AssistantSpeechProvider as Tr, useAssistantSpeech as Er } from "./shared/assistant/ui/AssistantSpeechProvider.js";
44
+ import { useVoiceSession as Dr } from "./shared/assistant/ui/useVoiceSession.js";
45
+ import { copyToClipboard as Or } from "./shared/assistant/clipboard.js";
46
+ import { getActorId as kr, getOrganizationId as Ar, getWorkspaceId as jr } from "./shared/assistant/context.js";
47
+ import { ATTACHMENT_SOURCES as Mr, availableAttachmentSources as Nr, deviceHasCamera as Pr } from "./shared/assistant/attachmentSources.js";
48
+ import { SANDBOX_READY_TTL_MS as Fr, createReadinessTracker as Ir, isRecentlyVerified as Lr } from "./shared/assistant/sandboxReadiness.js";
49
+ import { AssistantAutoSpeakToggle as Rr } from "./shared/assistant/ui/AssistantAutoSpeakToggle.js";
50
+ import { AssistantMarkdownImage as zr, imageHostLabel as Br, isRemoteImageSrc as Vr } from "./shared/assistant/ui/AssistantMarkdownImage.js";
51
+ import { AssistantMarkdownRenderer as Hr, assistantUrlTransform as Ur } from "./shared/assistant/ui/AssistantMarkdownRenderer.js";
52
+ import { AssistantMessageAttachments as Wr } from "./shared/assistant/ui/AssistantMessageAttachments.js";
53
+ import { AssistantPendingWriteCard as Gr } from "./shared/assistant/ui/AssistantPendingWriteCard.js";
54
+ import { AssistantLanguageMenu as Kr } from "./shared/assistant/ui/AssistantLanguageMenu.js";
55
+ import { AssistantReplyLanguageSelector as qr } from "./shared/assistant/ui/AssistantReplyLanguageSelector.js";
56
+ import { AssistantSpeakButton as Jr } from "./shared/assistant/ui/AssistantSpeakButton.js";
57
+ import { AssistantSpokenTurnsNotice as Yr } from "./shared/assistant/ui/AssistantSpokenTurnsNotice.js";
58
+ import { AssistantAttachmentButton as Xr } from "./shared/assistant/ui/composer/AssistantAttachmentButton.js";
59
+ import { AssistantAttachmentChips as Zr } from "./shared/assistant/ui/composer/AssistantAttachmentChips.js";
60
+ import { AssistantLanguageSelector as Qr, FOLLOW_APP_LOCALE as $r } from "./shared/assistant/ui/composer/AssistantLanguageSelector.js";
61
+ import { ASSISTANT_MODE_META as ei, AssistantModeSelector as ti, nextModeIndex as ni } from "./shared/assistant/ui/composer/AssistantModeSelector.js";
62
+ import { AssistantVoiceButton as ri } from "./shared/assistant/ui/composer/AssistantVoiceButton.js";
63
+ import { AUTO_VOICE as ii, AssistantVoiceSelector as ai } from "./shared/assistant/ui/composer/AssistantVoiceSelector.js";
64
+ import { AssistantVoiceOrb as oi } from "./shared/assistant/ui/voice/AssistantVoiceOrb.js";
65
+ import { AssistantVoiceSessionButton as si } from "./shared/assistant/ui/voice/AssistantVoiceSessionButton.js";
66
+ import { CAPTION_SCROLL_ATTR as ci, VoiceCaption as li } from "./shared/assistant/ui/voice/VoiceCaption.js";
67
+ import { VoiceConversationView as ui } from "./shared/assistant/ui/voice/VoiceConversationView.js";
68
+ import { VoiceWaveform as di } from "./shared/assistant/ui/voice/VoiceWaveform.js";
69
+ import { VoiceMiniController as fi } from "./shared/assistant/ui/voice/VoiceMiniController.js";
70
+ import { VoiceStage as pi } from "./shared/assistant/ui/voice/VoiceStage.js";
71
+ import { VoiceTranscriptDrawer as mi } from "./shared/assistant/ui/voice/VoiceTranscriptDrawer.js";
72
+ import { downloadFile as hi, exportConversation as gi } from "./shared/assistant/exportConversation.js";
73
+ import { AssistantMoreMenu as _i } from "./shared/assistant/ui/AssistantMoreMenu.js";
74
+ import { AssistantHeader as vi } from "./shared/assistant/ui/AssistantHeader.js";
75
+ import { AssistantConversationList as yi } from "./shared/assistant/ui/AssistantConversationList.js";
76
+ import { AssistantEmptyState as bi } from "./shared/assistant/ui/AssistantEmptyState.js";
77
+ import { AssistantMessageItem as xi } from "./shared/assistant/ui/AssistantMessageItem.js";
78
+ import { AssistantMessageList as Si } from "./shared/assistant/ui/AssistantMessageList.js";
79
+ import { AssistantVoiceSession as Ci } from "./shared/assistant/ui/voice/AssistantVoiceSession.js";
80
+ import { useAssistantApiAccess as wi } from "./shared/assistant/useAssistantApiAccess.js";
81
+ import { useConversationTurns as Ti } from "./shared/assistant/useConversationTurns.js";
82
+ import { isMultimodalBodyRejection as Ei, isRecoverableAssistantError as Di } from "./shared/assistant/transportErrors.js";
83
+ import { aiCreditsUpdatedEventName as Oi, dispatchAssistantQuotaExhausted as ki, notifyAiCreditsUpdated as Ai } from "./shared/assistant/aiCredits.js";
84
+ import { useWorkspaceWriteAccess as ji } from "./shared/assistant/useWorkspaceWriteAccess.js";
85
+ import { extractDocumentText as Mi } from "./shared/assistant/documentExtract.js";
86
+ import { useAssistantAttachments as Ni } from "./shared/assistant/useAssistantAttachments.js";
87
+ import { AssistantComposer as Pi } from "./shared/assistant/ui/composer/AssistantComposer.js";
88
+ import { isProdRuntime as Fi } from "./shared/assistant/env.js";
89
+ import { useAssistantHeartbeat as Ii } from "./shared/assistant/useAssistantHeartbeat.js";
90
+ import { useAssistantKeyboardShortcuts as Li } from "./shared/assistant/useAssistantKeyboardShortcuts.js";
91
+ import { AssistantApiCallsConsentDialog as Ri } from "./shared/assistant/ui/AssistantApiCallsConsentDialog.js";
92
+ import { AssistantChatArea as zi } from "./shared/assistant/ui/AssistantChatArea.js";
93
+ import { AIAssistantPanel as Bi } from "./shared/assistant/ui/AIAssistantPanel.js";
94
+ export { Bi as AIAssistantPanel, g as ASSISTANT_API_AUTH_STRATEGY, zt as ASSISTANT_LANGUAGES, ei as ASSISTANT_MODE_META, Fn as ATTACHMENT_ACCEPT, Mr as ATTACHMENT_SOURCES, ii as AUTO_VOICE, Ri as AssistantApiCallsConsentDialog, Xr as AssistantAttachmentButton, Zr as AssistantAttachmentChips, Rr as AssistantAutoSpeakToggle, zi as AssistantChatArea, Pi as AssistantComposer, yi as AssistantConversationList, bi as AssistantEmptyState, vi as AssistantHeader, $t as AssistantI18nProvider, Kr as AssistantLanguageMenu, Qr as AssistantLanguageSelector, zr as AssistantMarkdownImage, Hr as AssistantMarkdownRenderer, Wr as AssistantMessageAttachments, xi as AssistantMessageItem, Si as AssistantMessageList, ti as AssistantModeSelector, _i as AssistantMoreMenu, Gr as AssistantPendingWriteCard, qt as AssistantProductProvider, qr as AssistantReplyLanguageSelector, X as AssistantRuntimeManager, Jr as AssistantSpeakButton, Tr as AssistantSpeechProvider, Yr as AssistantSpokenTurnsNotice, Cr as AssistantToolActivity, ri as AssistantVoiceButton, oi as AssistantVoiceOrb, ai as AssistantVoiceSelector, Ci as AssistantVoiceSession, si as AssistantVoiceSessionButton, In as AttachmentRejectedError, hn as BOILERPLATE_PAGE_SHARE, ci as CAPTION_SCROLL_ATTR, s as CHECK_AI_CREDITS, c as CREATE_SANDBOX, vt as DEFAULT_SPEAKABLE_LABELS, Bt as DEFAULT_SPEECH_RATE, Ge as ENDPOINT_GRACE_MS, l as EXTEND_SANDBOX_TTL, $r as FOLLOW_APP_LOCALE, u as GET_ACTIVE_SANDBOXES, d as GET_SANDBOX, xe as HOSTED_TTS_MAX_CHARS, _e as HOSTED_TTS_TIER, ve as HOSTED_VOICES, cn as IDLE_PLAYBACK, Ke as INITIAL_SESSION, Ln as INLINE_IMAGE_MAX_DIM, Rn as INLINE_IMAGE_QUALITY, qe as INTERRUPT_MAX_MS, Je as INTERRUPT_MIN_MS, zn as MAX_ATTACHMENTS, gn as MAX_BOILERPLATE_LINE_CHARS, _n as MAX_EXTRACTED_CHARS, Bn as MAX_FILE_BYTES, Vn as MAX_INLINE_CHARS_PER_FILE, Hn as MAX_INLINE_CHARS_TOTAL, pn as MAX_INLINE_IMAGE_BASE64_BYTES, Un as MAX_INLINE_IMAGE_BASE64_CHARS, Wn as MAX_INLINE_IMAGE_PARTS, Gn as MAX_INLINE_TURN_BODY_BYTES, vn as MAX_PDF_PAGES_SCANNED, mn as MAX_REQUEST_BODY_BYTES, yt as MAX_SPEAKABLE_CHARS, bt as MAX_SPOKEN_TABLE_ROWS, Kn as MAX_TURN_BODY_BYTES, At as MINI_CAPTION_BUDGET, yn as MIN_PAGE_TEXT_CHARS, bn as MIN_TEXT_PAGE_SHARE, gr as PHRASE_ROTATE_MS, Mt as POLL_FAST_MS, Nt as POLL_FAST_UNTIL_MS, Pt as POLL_SLOW_MS, Ft as POLL_STEADY_MS, It as POLL_STEADY_UNTIL_MS, Ot as PREVIEW_LANGUAGES, qn as PROMPT_ENVELOPE_RESERVE_BYTES, f as PROXY_SANDBOX_REQUEST, p as REPORT_AI_TOKEN_USAGE, Fr as SANDBOX_READY_TTL_MS, Ye as SILENCE_SUBMIT_MS, Se as SPEAKING_RATE_MAX, Ce as SPEAKING_RATE_MAX_STREAMING, we as SPEAKING_RATE_MAX_SYNC, Te as SPEAKING_RATE_MIN, xt as SPEECH_CHUNK_CHARS, St as SPEECH_CHUNK_CJK_CHARS, rt as SPEECH_LANG, rn as SPOKEN_LABEL_LANGUAGES, _r as STAGE_COPY, m as STOP_ASSISTANT_SANDBOX, vr as THINKING_PHRASES, Jn as TURN_BODY_HEADROOM_BYTES, it as VOICE_LIST_TIMEOUT_MS, li as VoiceCaption, ui as VoiceConversationView, fi as VoiceMiniController, pi as VoiceStage, mi as VoiceTranscriptDrawer, di as VoiceWaveform, h as WAIT_FOR_SANDBOX_RUNNING, E as abortAssistantTurn, Oi as aiCreditsUpdatedEventName, D as approvePendingWrite, en as assistantTranslationKey, Ur as assistantUrlTransform, Nr as availableAttachmentSources, Ee as base64ToBytes, ge as browserSpeechEngine, O as buildAssistantSandboxEnv, Yn as buildAttachmentPromptBlock, ht as buildContinuedFromVoiceNote, Z as buildProgress, Xn as buildPromptParts, k as buildPromptRequestBody, Zn as buildPromptWithAttachments, De as buildRequest, a as buildSandboxContextInput, gt as buildVoiceTranscriptMarkdown, le as chatTurns, A as checkAssistantAiCredits, Ct as chunkForSpeech, Qn as classifyAttachment, Oe as classifyHttpFailure, t as classifyQuotaError, xn as columnLetterToIndex, Pe as configureSpeechEngine, wt as containsCjk, Or as copyToClipboard, $n as countInlineImageCandidates, er as countInlinedImageParts, j as createAssistantSandbox, M as createAssistantSession, Me as createHostedTtsEngine, Ir as createReadinessTracker, Ne as createRoutingSpeechEngine, se as createSandboxAssistantTransport, Fe as createSpeechEngines, ke as decodeAudioResponse, Sn as decodeXmlEntities, n as describeQuotaError, tr as detectDocumentFormat, on as detectScriptLocale, Pr as deviceHasCamera, ki as dispatchAssistantQuotaExhausted, Cn as docxXmlToText, N as downloadAssistantArtifact, hi as downloadFile, nr as estimateTurnBodyBytes, o as executeSandboxGraphQL, gi as exportConversation, P as extendAssistantSandboxTTL, Mi as extractDocumentText, Vt as findAssistantLanguage, F as findExistingSandbox, Gt as findPendingWrite, wn as fitPdfPages, rr as formatBytes, Tn as formatPageRanges, kr as getActorId, I as getAssistantArtifacts, Q as getAssistantMedia, L as getAssistantMessages, R as getAssistantSession, z as getAssistantStreamAccess, $ as getAssistantText, ir as getAttachmentSendBlocker, S as getCapability, ar as getExtension, _ as getImageForMode, v as getImageTagForMode, Ar as getOrganizationId, ee as getRawMessageCreatedAt, y as getResourcesForMode, b as getSandboxImageRegistry, or as getSendableAttachments, Ie as getSpeechEngine, te as getToolProgress, jr as getWorkspaceId, ue as groupBySession, de as groupConsecutiveBySession, sr as hasAttachmentWorkInFlight, ye as hostedLocaleFor, be as hostedSupportsLanguage, Br as imageHostLabel, Xe as isCapturing, Ze as isEcho, En as isMostlyImagePages, Ei as isMultimodalBodyRejection, Fi as isProdRuntime, r as isQuotaExhaustedError, ne as isReapedSandboxConnectionError, Lr as isRecentlyVerified, re as isRecoverable, Di as isRecoverableAssistantError, Vr as isRemoteImageSrc, ln as isSpeakingMessage, at as isSpeechBlocked, yr as isStageCopy, Qe as isSubmittable, pr as isTurnInFlight, C as isUnknownFieldError, fe as isVoiceTurn, Dn as joinSheets, ot as languageDisplayName, ie as mapSessionToHistory, w as markSupported, T as markUnsupported, ae as mergeMessagesById, ze as micIsInterrupt, B as modeRequiresConfirmWrites, ni as nextModeIndex, st as normalizeLangTag, Ai as notifyAiCreditsUpdated, $e as orbMode, On as pageMarker, Kt as parseConfirmationRefusal, cr as parseDataUrl, kn as parseSharedStrings, wr as parseToolActivity, An as parseWorkbookSheets, jn as pdfTextItemsToPage, mr as planAbandonedTurn, et as planReplyConsumption, hr as planTurnAbort, Lt as pollDelayMs, ct as primaryLanguageSubtag, un as publishedChunks, i as quotaExhaustedEventName, Le as readSpeechEngineConfig, V as releaseSupersededAssistantSandboxes, Ut as replyFollowsInput, H as reportAssistantAiTokenUsage, dn as requiresCancel, Re as resetSpeechEngine, Ht as resolveAssistantLanguage, Wt as resolveLanguagePair, Jt as resolveModeConfig, x as resolveSandboxAssistantMode, sn as resolveSpeechLocale, oe as sanitize, U as selectExistingAssistantSandbox, W as selectSupersededAssistantSandboxes, lt as selectVoiceForLocale, G as sendAssistantPromptAsync, K as sendHeartbeat, Mn as sheetXmlToRows, Ae as shouldDisableEngine, jt as showPreviousChunk, Be as showsAssistantCaption, Ve as showsUserCaption, Tt as speakableEmail, ut as speechGate, an as speechLabelsFor, dt as speechLangForLocale, fn as speechPlaybackReducer, je as splitForVendor, Et as splitTableRow, tt as spokenSoFar, br as stageText, xr as statusStageCopy, q as stopReapedAssistantSandbox, Nn as summarisePageText, Sr as thinkingPhrase, Rt as toCaptionText, lr as toMessageAttachment, Dt as toSpeakableText, ur as truncateForInline, Pn as truncatePagesForInline, wi as useAssistantApiAccess, Ni as useAssistantAttachments, Ii as useAssistantHeartbeat, tn as useAssistantI18nNamespace, Li as useAssistantKeyboardShortcuts, Yt as useAssistantPageLabel, Xt as useAssistantProduct, Zt as useAssistantProductOrNull, Er as useAssistantSpeech, Qt as useAssistantStorageFolders, fr as useAssistantStore, nn as useAssistantTr, Ti as useConversationTurns, ce as useSandboxAssistantTransport, e as useVoiceInput, Dr as useVoiceSession, ji as useWorkspaceWriteAccess, dr as validateFile, ft as voiceAvailability, pe as voiceMarker, kt as voicePreviewText, pt as voiceQualityRank, me as voiceSessionIdOf, nt as voiceSessionReducer, He as voiceStageState, _t as voiceTranscriptFilename, he as voiceTurnsOnly, mt as voicesForLocale, J as waitForAssistantServiceReady, Y as waitForSandboxRunning, Ue as waveformIsActive, We as waveformIsSettled };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fe-libs",
3
- "version": "2026.909.3",
3
+ "version": "2026.910.1",
4
4
  "description": "Burdenoff frontend primitives and domain libraries",
5
5
  "type": "module",
6
6
  "bin": {