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