@burdenoff/fe-libs 2026.907.1 → 2026.907.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/shared/assistant/quota.d.ts +30 -0
- package/dist/shared/assistant/quota.d.ts.map +1 -1
- package/dist/shared/assistant/quota.js +33 -2
- package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.js +9 -5
- package/dist/shared-assistant.js +92 -92
- package/package.json +1 -1
|
@@ -43,6 +43,36 @@ export type QuotaRefusal = "exhausted" | "not-provisioned";
|
|
|
43
43
|
* would not help.
|
|
44
44
|
*/
|
|
45
45
|
export declare function classifyQuotaError(error: unknown): QuotaRefusal | null;
|
|
46
|
+
/**
|
|
47
|
+
* A quota refusal, plus the facts needed to act on it.
|
|
48
|
+
*
|
|
49
|
+
* ★★★ Why this exists (prod, 2026-09-07). The assistant was dead for hours and
|
|
50
|
+
* the only thing anyone could see was "You've reached your sandbox limit on the
|
|
51
|
+
* current plan." The gateway had named the exact ceiling —
|
|
52
|
+
* `platform.sandbox.runtime_hours` — in `extensions.quotaName`, and we threw it
|
|
53
|
+
* away. The workspace had TWO sandbox quotas; the one everybody stared at
|
|
54
|
+
* (`platform.sandbox.environments`, 0 of 60 used) was fine, and the one that was
|
|
55
|
+
* actually blocking went unexamined because nothing on screen named it.
|
|
56
|
+
*
|
|
57
|
+
* A ceiling you cannot name is a ceiling you cannot raise.
|
|
58
|
+
*/
|
|
59
|
+
export interface QuotaRefusalDetail {
|
|
60
|
+
refusal: QuotaRefusal;
|
|
61
|
+
/** WHICH ceiling — e.g. `platform.sandbox.runtime_hours`. */
|
|
62
|
+
quotaName: string | null;
|
|
63
|
+
/** The refusing service's trace id, so support can find the request. */
|
|
64
|
+
traceId: string | null;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Which refusal this is AND what it was about, or null when not a quota wall.
|
|
68
|
+
*
|
|
69
|
+
* ★ Deliberately falls back to {@link isQuotaExhaustedError} rather than using
|
|
70
|
+
* {@link classifyQuotaError} alone: the classifier keys on `extensions.code`,
|
|
71
|
+
* but the assistant's raw-fetch transport can surface a bare quota string with
|
|
72
|
+
* no code at all. Dropping that path here would have quietly narrowed the wall
|
|
73
|
+
* the chat area already catches.
|
|
74
|
+
*/
|
|
75
|
+
export declare function describeQuotaError(error: unknown): QuotaRefusalDetail | null;
|
|
46
76
|
export type QuotaKind = "sandbox" | "ai-credits" | "generic";
|
|
47
77
|
/**
|
|
48
78
|
* Event the assistant dispatches on a quota wall, namespaced by product.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quota.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/quota.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAmBH;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAmB7D;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,iBAAiB,CAAC;AA0C3D;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,GAAG,IAAI,CAStE;AAED,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC;AAE7D;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B"}
|
|
1
|
+
{"version":3,"file":"quota.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/quota.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAmBH;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAmB7D;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,iBAAiB,CAAC;AA0C3D;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,GAAG,IAAI,CAStE;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,YAAY,CAAC;IACtB,6DAA6D;IAC7D,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,wEAAwE;IACxE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAwBD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,GAAG,IAAI,CAmB5E;AAED,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC;AAE7D;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B"}
|
|
@@ -38,8 +38,39 @@ function i(e) {
|
|
|
38
38
|
let n = e?.statusCode;
|
|
39
39
|
return typeof n == "number" && n === 429 ? "exhausted" : null;
|
|
40
40
|
}
|
|
41
|
-
function a(
|
|
41
|
+
function a(t) {
|
|
42
|
+
if (!t || typeof t != "object") return [];
|
|
43
|
+
let n = [
|
|
44
|
+
t,
|
|
45
|
+
t.result,
|
|
46
|
+
t.networkError
|
|
47
|
+
], r = [];
|
|
48
|
+
for (let t of n) {
|
|
49
|
+
if (!t || typeof t != "object") continue;
|
|
50
|
+
let n = t.extensions;
|
|
51
|
+
n && typeof n == "object" && r.push(n);
|
|
52
|
+
for (let n of e(t, "errors") ?? []) n.extensions && typeof n.extensions == "object" && r.push(n.extensions);
|
|
53
|
+
}
|
|
54
|
+
return r;
|
|
55
|
+
}
|
|
56
|
+
function o(e) {
|
|
57
|
+
let n = i(e) ?? (t(e) ? "exhausted" : null);
|
|
58
|
+
if (!n) return null;
|
|
59
|
+
let r = (t) => {
|
|
60
|
+
for (let n of a(e)) {
|
|
61
|
+
let e = n[t];
|
|
62
|
+
if (typeof e == "string" && e.length > 0) return e;
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
};
|
|
66
|
+
return {
|
|
67
|
+
refusal: n,
|
|
68
|
+
quotaName: r("quotaName"),
|
|
69
|
+
traceId: r("traceId")
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function s(e) {
|
|
42
73
|
return `${e}:quota-exhausted`;
|
|
43
74
|
}
|
|
44
75
|
//#endregion
|
|
45
|
-
export { i as classifyQuotaError, t as isQuotaExhaustedError,
|
|
76
|
+
export { i as classifyQuotaError, o as describeQuotaError, t as isQuotaExhaustedError, s as quotaExhaustedEventName };
|
|
@@ -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;AAoEf,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,
|
|
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;AAoEf,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,CAgtDxD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useI18n as e } from "../../providers/shell/I18nProvider.js";
|
|
2
2
|
import { useAuthToken as t } from "../../providers/shell/AuthTokenProvider.js";
|
|
3
3
|
import "../../../shared-providers-shell.js";
|
|
4
|
-
import {
|
|
4
|
+
import { describeQuotaError as n } from "../quota.js";
|
|
5
5
|
import { approvePendingWrite as r, createAssistantSandbox as i, createAssistantSession as a, extendAssistantSandboxTTL as o, findExistingSandbox as s, getAssistantArtifacts as c, getAssistantMessages as l, getAssistantSession as u, releaseSupersededAssistantSandboxes as d, sendAssistantPromptAsync as f, waitForAssistantServiceReady as p, waitForSandboxRunning as m } from "../api.js";
|
|
6
6
|
import { getAssistantMedia as h, sanitize as ee } from "../progress.js";
|
|
7
7
|
import { isVoiceTurn as g, voiceMarker as _, voiceSessionIdOf as v } from "../voice/turnVisibility.js";
|
|
@@ -257,12 +257,16 @@ var k = ({ visible: h = !0, writeAccess: oe = "unknown" }) => {
|
|
|
257
257
|
if (!m) throw Error("Assistant backend is unavailable without an active workspace context.");
|
|
258
258
|
await y();
|
|
259
259
|
} catch (e) {
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
G.current.invalidate(x.getState().sandboxesByMode[u]?.sandboxId ?? null);
|
|
261
|
+
let t = n(e);
|
|
262
|
+
if (t) {
|
|
263
|
+
t.refusal === "exhausted" && je(O, "sandbox");
|
|
264
|
+
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.";
|
|
265
|
+
te(e ? `${n}\n\n${e}` : n, void 0, void 0, void 0, "en"), L(d, "error", v, null);
|
|
262
266
|
return;
|
|
263
267
|
}
|
|
264
|
-
let
|
|
265
|
-
L(d, "error", v,
|
|
268
|
+
let i = e instanceof Error ? e.message : "Something went wrong";
|
|
269
|
+
L(d, "error", v, i), I(d, v, { content: `Sorry, an error occurred: ${i}. Please try again.` }), ut(d, v, {
|
|
266
270
|
lang: "en",
|
|
267
271
|
..._(r.voiceSessionId)
|
|
268
272
|
});
|
package/dist/shared-assistant.js
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
1
1
|
import { useVoiceInput as e } from "./shared/assistant/voice/useVoiceInput.js";
|
|
2
|
-
import { classifyQuotaError as t,
|
|
3
|
-
import { buildSandboxContextInput as
|
|
4
|
-
import { CHECK_AI_CREDITS as
|
|
5
|
-
import { ASSISTANT_API_AUTH_STRATEGY as
|
|
6
|
-
import { getCapability as
|
|
7
|
-
import { approvePendingWrite as
|
|
8
|
-
import { AssistantRuntimeManager as
|
|
9
|
-
import { buildProgress as
|
|
10
|
-
import { createSandboxAssistantTransport as
|
|
11
|
-
import { useSandboxAssistantTransport as
|
|
12
|
-
import { chatTurns as
|
|
13
|
-
import { browserSpeechEngine as
|
|
14
|
-
import { HOSTED_TTS_TIER as
|
|
15
|
-
import { HOSTED_TTS_MAX_CHARS as
|
|
16
|
-
import { createHostedTtsEngine as
|
|
17
|
-
import { createRoutingSpeechEngine as
|
|
18
|
-
import { configureSpeechEngine as
|
|
19
|
-
import { micIsInterrupt as
|
|
20
|
-
import { ENDPOINT_GRACE_MS as
|
|
21
|
-
import { SPEECH_LANG as
|
|
22
|
-
import { buildContinuedFromVoiceNote as
|
|
23
|
-
import { DEFAULT_SPEAKABLE_LABELS as
|
|
24
|
-
import { PREVIEW_LANGUAGES as
|
|
25
|
-
import { MINI_CAPTION_BUDGET as
|
|
26
|
-
import { POLL_FAST_MS as
|
|
27
|
-
import { toCaptionText as
|
|
28
|
-
import { ASSISTANT_LANGUAGES as
|
|
29
|
-
import { replyFollowsInput as
|
|
30
|
-
import { findPendingWrite as
|
|
31
|
-
import { AssistantProductProvider as
|
|
32
|
-
import { AssistantI18nProvider as
|
|
33
|
-
import { SPOKEN_LABEL_LANGUAGES as
|
|
34
|
-
import { detectScriptLocale as
|
|
35
|
-
import { IDLE_PLAYBACK as
|
|
36
|
-
import { MAX_INLINE_IMAGE_BASE64_BYTES as
|
|
37
|
-
import { BOILERPLATE_PAGE_SHARE as
|
|
38
|
-
import { ATTACHMENT_ACCEPT as
|
|
39
|
-
import { useAssistantStore as
|
|
40
|
-
import { isTurnInFlight as
|
|
41
|
-
import { AssistantToolActivity as
|
|
42
|
-
import { AssistantSpeechProvider as
|
|
43
|
-
import { useVoiceSession as
|
|
44
|
-
import { copyToClipboard as
|
|
45
|
-
import { getActorId as
|
|
46
|
-
import { ATTACHMENT_SOURCES as
|
|
47
|
-
import { SANDBOX_READY_TTL_MS as
|
|
48
|
-
import { AssistantAutoSpeakToggle as
|
|
49
|
-
import { AssistantMarkdownImage as
|
|
50
|
-
import { AssistantMarkdownRenderer as
|
|
51
|
-
import { AssistantMessageAttachments as
|
|
52
|
-
import { AssistantPendingWriteCard as
|
|
53
|
-
import { AssistantLanguageMenu as
|
|
54
|
-
import { AssistantReplyLanguageSelector as
|
|
55
|
-
import { AssistantSpeakButton as
|
|
56
|
-
import { AssistantSpokenTurnsNotice as
|
|
57
|
-
import { AssistantAttachmentButton as
|
|
58
|
-
import { AssistantAttachmentChips as
|
|
59
|
-
import { AssistantLanguageSelector as
|
|
60
|
-
import { ASSISTANT_MODE_META as
|
|
61
|
-
import { AssistantVoiceButton as
|
|
62
|
-
import { AUTO_VOICE as
|
|
63
|
-
import { AssistantVoiceOrb as
|
|
64
|
-
import { AssistantVoiceSessionButton as
|
|
65
|
-
import { CAPTION_SCROLL_ATTR as
|
|
66
|
-
import { VoiceConversationView as
|
|
67
|
-
import { VoiceWaveform as
|
|
68
|
-
import { VoiceMiniController as
|
|
69
|
-
import { VoiceStage as
|
|
70
|
-
import { VoiceTranscriptDrawer as
|
|
71
|
-
import { downloadFile as
|
|
72
|
-
import { AssistantMoreMenu as
|
|
73
|
-
import { AssistantHeader as
|
|
74
|
-
import { AssistantConversationList as
|
|
75
|
-
import { AssistantEmptyState as
|
|
76
|
-
import { AssistantMessageItem as
|
|
77
|
-
import { AssistantMessageList as
|
|
78
|
-
import { AssistantVoiceSession as
|
|
79
|
-
import { useAssistantApiAccess as
|
|
80
|
-
import { useConversationTurns as
|
|
81
|
-
import { isMultimodalBodyRejection as
|
|
82
|
-
import { aiCreditsUpdatedEventName as
|
|
83
|
-
import { useWorkspaceWriteAccess as
|
|
84
|
-
import { extractDocumentText as
|
|
85
|
-
import { useAssistantAttachments as
|
|
86
|
-
import { AssistantComposer as
|
|
87
|
-
import { isProdRuntime as
|
|
88
|
-
import { useAssistantHeartbeat as
|
|
89
|
-
import { useAssistantKeyboardShortcuts as
|
|
90
|
-
import { AssistantApiCallsConsentDialog as
|
|
91
|
-
import { AssistantChatArea as
|
|
92
|
-
import { AIAssistantPanel as
|
|
93
|
-
export {
|
|
2
|
+
import { classifyQuotaError as t, describeQuotaError as n, isQuotaExhaustedError as r, quotaExhaustedEventName as i } from "./shared/assistant/quota.js";
|
|
3
|
+
import { buildSandboxContextInput as a, executeSandboxGraphQL as o } from "./shared/assistant/gatewayClient.js";
|
|
4
|
+
import { CHECK_AI_CREDITS as s, CREATE_SANDBOX as c, EXTEND_SANDBOX_TTL as l, GET_ACTIVE_SANDBOXES as u, GET_SANDBOX as d, PROXY_SANDBOX_REQUEST as f, REPORT_AI_TOKEN_USAGE as p, STOP_ASSISTANT_SANDBOX as m, WAIT_FOR_SANDBOX_RUNNING as h } from "./shared/assistant/operations.js";
|
|
5
|
+
import { ASSISTANT_API_AUTH_STRATEGY as g, getImageForMode as _, getImageTagForMode as v, getResourcesForMode as y, getSandboxImageRegistry as b, resolveSandboxAssistantMode as x } from "./shared/assistant/images.js";
|
|
6
|
+
import { getCapability as S, isUnknownFieldError as C, markSupported as w, markUnsupported as T } from "./shared/assistant/capabilities.js";
|
|
7
|
+
import { approvePendingWrite as E, buildAssistantSandboxEnv as D, buildPromptRequestBody as O, checkAssistantAiCredits as k, createAssistantSandbox as A, createAssistantSession as j, downloadAssistantArtifact as M, extendAssistantSandboxTTL as N, findExistingSandbox as P, getAssistantArtifacts as F, getAssistantMessages as I, getAssistantSession as L, getAssistantStreamAccess as R, modeRequiresConfirmWrites as z, releaseSupersededAssistantSandboxes as B, reportAssistantAiTokenUsage as V, selectExistingAssistantSandbox as H, selectSupersededAssistantSandboxes as U, sendAssistantPromptAsync as W, sendHeartbeat as G, stopReapedAssistantSandbox as K, waitForAssistantServiceReady as q, waitForSandboxRunning as J } from "./shared/assistant/api.js";
|
|
8
|
+
import { AssistantRuntimeManager as Y } from "./shared/assistant/runtime.js";
|
|
9
|
+
import { buildProgress as X, getAssistantMedia as Z, getAssistantText as Q, getRawMessageCreatedAt as $, getToolProgress as ee, isReapedSandboxConnectionError as te, isRecoverable as ne, mapSessionToHistory as re, mergeMessagesById as ie, sanitize as ae } from "./shared/assistant/progress.js";
|
|
10
|
+
import { createSandboxAssistantTransport as oe } from "./shared/assistant/createSandboxAssistantTransport.js";
|
|
11
|
+
import { useSandboxAssistantTransport as se } from "./shared/assistant/useSandboxAssistantTransport.js";
|
|
12
|
+
import { chatTurns as ce, groupBySession as le, groupConsecutiveBySession as ue, isVoiceTurn as de, voiceMarker as fe, voiceSessionIdOf as pe, voiceTurnsOnly as me } from "./shared/assistant/voice/turnVisibility.js";
|
|
13
|
+
import { browserSpeechEngine as he } from "./shared/assistant/speech/browserSpeechEngine.js";
|
|
14
|
+
import { HOSTED_TTS_TIER as ge, HOSTED_VOICES as _e, hostedLocaleFor as ve, hostedSupportsLanguage as ye } from "./shared/assistant/speech/hostedVoiceCatalogue.js";
|
|
15
|
+
import { HOSTED_TTS_MAX_CHARS as be, SPEAKING_RATE_MAX as xe, SPEAKING_RATE_MAX_STREAMING as Se, SPEAKING_RATE_MAX_SYNC as Ce, SPEAKING_RATE_MIN as we, base64ToBytes as Te, buildRequest as Ee, classifyHttpFailure as De, decodeAudioResponse as Oe, shouldDisableEngine as ke, splitForVendor as Ae } from "./shared/assistant/speech/hostedTtsProtocol.js";
|
|
16
|
+
import { createHostedTtsEngine as je } from "./shared/assistant/speech/hostedTtsSpeechEngine.js";
|
|
17
|
+
import { createRoutingSpeechEngine as Me } from "./shared/assistant/speech/routingSpeechEngine.js";
|
|
18
|
+
import { configureSpeechEngine as Ne, createSpeechEngines as Pe, getSpeechEngine as Fe, readSpeechEngineConfig as Ie, resetSpeechEngine as Le } from "./shared/assistant/speech/createSpeechEngine.js";
|
|
19
|
+
import { micIsInterrupt as Re, showsAssistantCaption as ze, showsUserCaption as Be, voiceStageState as Ve, waveformIsActive as He, waveformIsSettled as Ue } from "./shared/assistant/voice/voiceStageState.js";
|
|
20
|
+
import { ENDPOINT_GRACE_MS as We, INITIAL_SESSION as Ge, INTERRUPT_MAX_MS as Ke, INTERRUPT_MIN_MS as qe, SILENCE_SUBMIT_MS as Je, isCapturing as Ye, isEcho as Xe, isSubmittable as Ze, orbMode as Qe, planReplyConsumption as $e, spokenSoFar as et, voiceSessionReducer as tt } from "./shared/assistant/voice/voiceSession.js";
|
|
21
|
+
import { SPEECH_LANG as nt, VOICE_LIST_TIMEOUT_MS as rt, isSpeechBlocked as it, languageDisplayName as at, normalizeLangTag as ot, primaryLanguageSubtag as st, selectVoiceForLocale as ct, speechGate as lt, speechLangForLocale as ut, voiceAvailability as dt, voiceQualityRank as ft, voicesForLocale as pt } from "./shared/assistant/voice/speechVoices.js";
|
|
22
|
+
import { buildContinuedFromVoiceNote as mt, buildVoiceTranscriptMarkdown as ht, voiceTranscriptFilename as gt } from "./shared/assistant/voice/voiceTranscript.js";
|
|
23
|
+
import { DEFAULT_SPEAKABLE_LABELS as _t, MAX_SPEAKABLE_CHARS as vt, MAX_SPOKEN_TABLE_ROWS as yt, SPEECH_CHUNK_CHARS as bt, SPEECH_CHUNK_CJK_CHARS as xt, chunkForSpeech as St, containsCjk as Ct, speakableEmail as wt, splitTableRow as Tt, toSpeakableText as Et } from "./shared/assistant/voice/speakableText.js";
|
|
24
|
+
import { PREVIEW_LANGUAGES as Dt, voicePreviewText as Ot } from "./shared/assistant/voice/voicePreview.js";
|
|
25
|
+
import { MINI_CAPTION_BUDGET as kt, showPreviousChunk as At } from "./shared/assistant/voice/miniCaptionBudget.js";
|
|
26
|
+
import { POLL_FAST_MS as jt, POLL_FAST_UNTIL_MS as Mt, POLL_SLOW_MS as Nt, POLL_STEADY_MS as Pt, POLL_STEADY_UNTIL_MS as Ft, pollDelayMs as It } from "./shared/assistant/voice/assistantPollSchedule.js";
|
|
27
|
+
import { toCaptionText as Lt } from "./shared/assistant/voice/captionText.js";
|
|
28
|
+
import { ASSISTANT_LANGUAGES as Rt, DEFAULT_SPEECH_RATE as zt, findAssistantLanguage as Bt, resolveAssistantLanguage as Vt } from "./shared/assistant/voice/languages.js";
|
|
29
|
+
import { replyFollowsInput as Ht, resolveLanguagePair as Ut } from "./shared/assistant/voice/languagePair.js";
|
|
30
|
+
import { findPendingWrite as Wt, parseConfirmationRefusal as Gt } from "./shared/assistant/pendingWrite.js";
|
|
31
|
+
import { AssistantProductProvider as Kt, resolveModeConfig as qt, useAssistantPageLabel as Jt, useAssistantProduct as Yt, useAssistantProductOrNull as Xt, useAssistantStorageFolders as Zt } from "./shared/assistant/product.js";
|
|
32
|
+
import { AssistantI18nProvider as Qt, assistantTranslationKey as $t, useAssistantI18nNamespace as en, useAssistantTr as tn } from "./shared/assistant/i18n.js";
|
|
33
|
+
import { SPOKEN_LABEL_LANGUAGES as nn, speechLabelsFor as rn } from "./shared/assistant/voice/speechLabels.js";
|
|
34
|
+
import { detectScriptLocale as an, resolveSpeechLocale as on } from "./shared/assistant/voice/replyLanguage.js";
|
|
35
|
+
import { IDLE_PLAYBACK as sn, isSpeakingMessage as cn, requiresCancel as ln, speechPlaybackReducer as un } from "./shared/assistant/voice/speechPlayback.js";
|
|
36
|
+
import { MAX_INLINE_IMAGE_BASE64_BYTES as dn, MAX_REQUEST_BODY_BYTES as fn } from "./shared/assistant/gatewayLimits.js";
|
|
37
|
+
import { BOILERPLATE_PAGE_SHARE as pn, MAX_BOILERPLATE_LINE_CHARS as mn, MAX_EXTRACTED_CHARS as hn, MAX_PDF_PAGES_SCANNED as gn, MIN_PAGE_TEXT_CHARS as _n, MIN_TEXT_PAGE_SHARE as vn, columnLetterToIndex as yn, decodeXmlEntities as bn, docxXmlToText as xn, fitPdfPages as Sn, formatPageRanges as Cn, isMostlyImagePages as wn, joinSheets as Tn, pageMarker as En, parseSharedStrings as Dn, parseWorkbookSheets as On, pdfTextItemsToPage as kn, sheetXmlToRows as An, summarisePageText as jn, truncatePagesForInline as Mn } from "./shared/assistant/documentText.js";
|
|
38
|
+
import { ATTACHMENT_ACCEPT as Nn, AttachmentRejectedError as Pn, INLINE_IMAGE_MAX_DIM as Fn, INLINE_IMAGE_QUALITY as In, MAX_ATTACHMENTS as Ln, MAX_FILE_BYTES as Rn, MAX_INLINE_CHARS_PER_FILE as zn, MAX_INLINE_CHARS_TOTAL as Bn, MAX_INLINE_IMAGE_BASE64_CHARS as Vn, MAX_INLINE_IMAGE_PARTS as Hn, MAX_INLINE_TURN_BODY_BYTES as Un, MAX_TURN_BODY_BYTES as Wn, PROMPT_ENVELOPE_RESERVE_BYTES as Gn, TURN_BODY_HEADROOM_BYTES as Kn, buildAttachmentPromptBlock as qn, buildPromptParts as Jn, buildPromptWithAttachments as Yn, classifyAttachment as Xn, countInlineImageCandidates as Zn, countInlinedImageParts as Qn, detectDocumentFormat as $n, estimateTurnBodyBytes as er, formatBytes as tr, getAttachmentSendBlocker as nr, getExtension as rr, getSendableAttachments as ir, hasAttachmentWorkInFlight as ar, parseDataUrl as or, toMessageAttachment as sr, truncateForInline as cr, validateFile as lr } from "./shared/assistant/attachments.js";
|
|
39
|
+
import { useAssistantStore as ur } from "./shared/assistant/store.js";
|
|
40
|
+
import { isTurnInFlight as dr } from "./shared/assistant/turnState.js";
|
|
41
|
+
import { AssistantToolActivity as fr, parseToolActivity as pr } from "./shared/assistant/ui/AssistantToolActivity.js";
|
|
42
|
+
import { AssistantSpeechProvider as mr, useAssistantSpeech as hr } from "./shared/assistant/ui/AssistantSpeechProvider.js";
|
|
43
|
+
import { useVoiceSession as gr } from "./shared/assistant/ui/useVoiceSession.js";
|
|
44
|
+
import { copyToClipboard as _r } from "./shared/assistant/clipboard.js";
|
|
45
|
+
import { getActorId as vr, getOrganizationId as yr, getWorkspaceId as br } from "./shared/assistant/context.js";
|
|
46
|
+
import { ATTACHMENT_SOURCES as xr, availableAttachmentSources as Sr, deviceHasCamera as Cr } from "./shared/assistant/attachmentSources.js";
|
|
47
|
+
import { SANDBOX_READY_TTL_MS as wr, createReadinessTracker as Tr, isRecentlyVerified as Er } from "./shared/assistant/sandboxReadiness.js";
|
|
48
|
+
import { AssistantAutoSpeakToggle as Dr } from "./shared/assistant/ui/AssistantAutoSpeakToggle.js";
|
|
49
|
+
import { AssistantMarkdownImage as Or, imageHostLabel as kr, isRemoteImageSrc as Ar } from "./shared/assistant/ui/AssistantMarkdownImage.js";
|
|
50
|
+
import { AssistantMarkdownRenderer as jr, assistantUrlTransform as Mr } from "./shared/assistant/ui/AssistantMarkdownRenderer.js";
|
|
51
|
+
import { AssistantMessageAttachments as Nr } from "./shared/assistant/ui/AssistantMessageAttachments.js";
|
|
52
|
+
import { AssistantPendingWriteCard as Pr } from "./shared/assistant/ui/AssistantPendingWriteCard.js";
|
|
53
|
+
import { AssistantLanguageMenu as Fr } from "./shared/assistant/ui/AssistantLanguageMenu.js";
|
|
54
|
+
import { AssistantReplyLanguageSelector as Ir } from "./shared/assistant/ui/AssistantReplyLanguageSelector.js";
|
|
55
|
+
import { AssistantSpeakButton as Lr } from "./shared/assistant/ui/AssistantSpeakButton.js";
|
|
56
|
+
import { AssistantSpokenTurnsNotice as Rr } from "./shared/assistant/ui/AssistantSpokenTurnsNotice.js";
|
|
57
|
+
import { AssistantAttachmentButton as zr } from "./shared/assistant/ui/composer/AssistantAttachmentButton.js";
|
|
58
|
+
import { AssistantAttachmentChips as Br } from "./shared/assistant/ui/composer/AssistantAttachmentChips.js";
|
|
59
|
+
import { AssistantLanguageSelector as Vr, FOLLOW_APP_LOCALE as Hr } from "./shared/assistant/ui/composer/AssistantLanguageSelector.js";
|
|
60
|
+
import { ASSISTANT_MODE_META as Ur, AssistantModeSelector as Wr, nextModeIndex as Gr } from "./shared/assistant/ui/composer/AssistantModeSelector.js";
|
|
61
|
+
import { AssistantVoiceButton as Kr } from "./shared/assistant/ui/composer/AssistantVoiceButton.js";
|
|
62
|
+
import { AUTO_VOICE as qr, AssistantVoiceSelector as Jr } from "./shared/assistant/ui/composer/AssistantVoiceSelector.js";
|
|
63
|
+
import { AssistantVoiceOrb as Yr } from "./shared/assistant/ui/voice/AssistantVoiceOrb.js";
|
|
64
|
+
import { AssistantVoiceSessionButton as Xr } from "./shared/assistant/ui/voice/AssistantVoiceSessionButton.js";
|
|
65
|
+
import { CAPTION_SCROLL_ATTR as Zr, VoiceCaption as Qr } from "./shared/assistant/ui/voice/VoiceCaption.js";
|
|
66
|
+
import { VoiceConversationView as $r } from "./shared/assistant/ui/voice/VoiceConversationView.js";
|
|
67
|
+
import { VoiceWaveform as ei } from "./shared/assistant/ui/voice/VoiceWaveform.js";
|
|
68
|
+
import { VoiceMiniController as ti } from "./shared/assistant/ui/voice/VoiceMiniController.js";
|
|
69
|
+
import { VoiceStage as ni } from "./shared/assistant/ui/voice/VoiceStage.js";
|
|
70
|
+
import { VoiceTranscriptDrawer as ri } from "./shared/assistant/ui/voice/VoiceTranscriptDrawer.js";
|
|
71
|
+
import { downloadFile as ii, exportConversation as ai } from "./shared/assistant/exportConversation.js";
|
|
72
|
+
import { AssistantMoreMenu as oi } from "./shared/assistant/ui/AssistantMoreMenu.js";
|
|
73
|
+
import { AssistantHeader as si } from "./shared/assistant/ui/AssistantHeader.js";
|
|
74
|
+
import { AssistantConversationList as ci } from "./shared/assistant/ui/AssistantConversationList.js";
|
|
75
|
+
import { AssistantEmptyState as li } from "./shared/assistant/ui/AssistantEmptyState.js";
|
|
76
|
+
import { AssistantMessageItem as ui } from "./shared/assistant/ui/AssistantMessageItem.js";
|
|
77
|
+
import { AssistantMessageList as di } from "./shared/assistant/ui/AssistantMessageList.js";
|
|
78
|
+
import { AssistantVoiceSession as fi } from "./shared/assistant/ui/voice/AssistantVoiceSession.js";
|
|
79
|
+
import { useAssistantApiAccess as pi } from "./shared/assistant/useAssistantApiAccess.js";
|
|
80
|
+
import { useConversationTurns as mi } from "./shared/assistant/useConversationTurns.js";
|
|
81
|
+
import { isMultimodalBodyRejection as hi, isRecoverableAssistantError as gi } from "./shared/assistant/transportErrors.js";
|
|
82
|
+
import { aiCreditsUpdatedEventName as _i, dispatchAssistantQuotaExhausted as vi, notifyAiCreditsUpdated as yi } from "./shared/assistant/aiCredits.js";
|
|
83
|
+
import { useWorkspaceWriteAccess as bi } from "./shared/assistant/useWorkspaceWriteAccess.js";
|
|
84
|
+
import { extractDocumentText as xi } from "./shared/assistant/documentExtract.js";
|
|
85
|
+
import { useAssistantAttachments as Si } from "./shared/assistant/useAssistantAttachments.js";
|
|
86
|
+
import { AssistantComposer as Ci } from "./shared/assistant/ui/composer/AssistantComposer.js";
|
|
87
|
+
import { isProdRuntime as wi } from "./shared/assistant/env.js";
|
|
88
|
+
import { useAssistantHeartbeat as Ti } from "./shared/assistant/useAssistantHeartbeat.js";
|
|
89
|
+
import { useAssistantKeyboardShortcuts as Ei } from "./shared/assistant/useAssistantKeyboardShortcuts.js";
|
|
90
|
+
import { AssistantApiCallsConsentDialog as Di } from "./shared/assistant/ui/AssistantApiCallsConsentDialog.js";
|
|
91
|
+
import { AssistantChatArea as Oi } from "./shared/assistant/ui/AssistantChatArea.js";
|
|
92
|
+
import { AIAssistantPanel as ki } from "./shared/assistant/ui/AIAssistantPanel.js";
|
|
93
|
+
export { ki as AIAssistantPanel, g as ASSISTANT_API_AUTH_STRATEGY, Rt as ASSISTANT_LANGUAGES, Ur as ASSISTANT_MODE_META, Nn as ATTACHMENT_ACCEPT, xr as ATTACHMENT_SOURCES, qr as AUTO_VOICE, Di as AssistantApiCallsConsentDialog, zr as AssistantAttachmentButton, Br as AssistantAttachmentChips, Dr as AssistantAutoSpeakToggle, Oi as AssistantChatArea, Ci as AssistantComposer, ci as AssistantConversationList, li as AssistantEmptyState, si as AssistantHeader, Qt as AssistantI18nProvider, Fr as AssistantLanguageMenu, Vr as AssistantLanguageSelector, Or as AssistantMarkdownImage, jr as AssistantMarkdownRenderer, Nr as AssistantMessageAttachments, ui as AssistantMessageItem, di as AssistantMessageList, Wr as AssistantModeSelector, oi as AssistantMoreMenu, Pr as AssistantPendingWriteCard, Kt as AssistantProductProvider, Ir as AssistantReplyLanguageSelector, Y as AssistantRuntimeManager, Lr as AssistantSpeakButton, mr as AssistantSpeechProvider, Rr as AssistantSpokenTurnsNotice, fr as AssistantToolActivity, Kr as AssistantVoiceButton, Yr as AssistantVoiceOrb, Jr as AssistantVoiceSelector, fi as AssistantVoiceSession, Xr as AssistantVoiceSessionButton, Pn as AttachmentRejectedError, pn as BOILERPLATE_PAGE_SHARE, Zr as CAPTION_SCROLL_ATTR, s as CHECK_AI_CREDITS, c as CREATE_SANDBOX, _t as DEFAULT_SPEAKABLE_LABELS, zt as DEFAULT_SPEECH_RATE, We as ENDPOINT_GRACE_MS, l as EXTEND_SANDBOX_TTL, Hr as FOLLOW_APP_LOCALE, u as GET_ACTIVE_SANDBOXES, d as GET_SANDBOX, be as HOSTED_TTS_MAX_CHARS, ge as HOSTED_TTS_TIER, _e as HOSTED_VOICES, sn as IDLE_PLAYBACK, Ge as INITIAL_SESSION, Fn as INLINE_IMAGE_MAX_DIM, In as INLINE_IMAGE_QUALITY, Ke as INTERRUPT_MAX_MS, qe as INTERRUPT_MIN_MS, Ln as MAX_ATTACHMENTS, mn as MAX_BOILERPLATE_LINE_CHARS, hn as MAX_EXTRACTED_CHARS, Rn as MAX_FILE_BYTES, zn as MAX_INLINE_CHARS_PER_FILE, Bn as MAX_INLINE_CHARS_TOTAL, dn as MAX_INLINE_IMAGE_BASE64_BYTES, Vn as MAX_INLINE_IMAGE_BASE64_CHARS, Hn as MAX_INLINE_IMAGE_PARTS, Un as MAX_INLINE_TURN_BODY_BYTES, gn as MAX_PDF_PAGES_SCANNED, fn as MAX_REQUEST_BODY_BYTES, vt as MAX_SPEAKABLE_CHARS, yt as MAX_SPOKEN_TABLE_ROWS, Wn as MAX_TURN_BODY_BYTES, kt as MINI_CAPTION_BUDGET, _n as MIN_PAGE_TEXT_CHARS, vn as MIN_TEXT_PAGE_SHARE, jt as POLL_FAST_MS, Mt as POLL_FAST_UNTIL_MS, Nt as POLL_SLOW_MS, Pt as POLL_STEADY_MS, Ft as POLL_STEADY_UNTIL_MS, Dt as PREVIEW_LANGUAGES, Gn as PROMPT_ENVELOPE_RESERVE_BYTES, f as PROXY_SANDBOX_REQUEST, p as REPORT_AI_TOKEN_USAGE, wr as SANDBOX_READY_TTL_MS, Je as SILENCE_SUBMIT_MS, xe as SPEAKING_RATE_MAX, Se as SPEAKING_RATE_MAX_STREAMING, Ce as SPEAKING_RATE_MAX_SYNC, we as SPEAKING_RATE_MIN, bt as SPEECH_CHUNK_CHARS, xt as SPEECH_CHUNK_CJK_CHARS, nt as SPEECH_LANG, nn as SPOKEN_LABEL_LANGUAGES, m as STOP_ASSISTANT_SANDBOX, Kn as TURN_BODY_HEADROOM_BYTES, rt as VOICE_LIST_TIMEOUT_MS, Qr as VoiceCaption, $r as VoiceConversationView, ti as VoiceMiniController, ni as VoiceStage, ri as VoiceTranscriptDrawer, ei as VoiceWaveform, h as WAIT_FOR_SANDBOX_RUNNING, _i as aiCreditsUpdatedEventName, E as approvePendingWrite, $t as assistantTranslationKey, Mr as assistantUrlTransform, Sr as availableAttachmentSources, Te as base64ToBytes, he as browserSpeechEngine, D as buildAssistantSandboxEnv, qn as buildAttachmentPromptBlock, mt as buildContinuedFromVoiceNote, X as buildProgress, Jn as buildPromptParts, O as buildPromptRequestBody, Yn as buildPromptWithAttachments, Ee as buildRequest, a as buildSandboxContextInput, ht as buildVoiceTranscriptMarkdown, ce as chatTurns, k as checkAssistantAiCredits, St as chunkForSpeech, Xn as classifyAttachment, De as classifyHttpFailure, t as classifyQuotaError, yn as columnLetterToIndex, Ne as configureSpeechEngine, Ct as containsCjk, _r as copyToClipboard, Zn as countInlineImageCandidates, Qn as countInlinedImageParts, A as createAssistantSandbox, j as createAssistantSession, je as createHostedTtsEngine, Tr as createReadinessTracker, Me as createRoutingSpeechEngine, oe as createSandboxAssistantTransport, Pe as createSpeechEngines, Oe as decodeAudioResponse, bn as decodeXmlEntities, n as describeQuotaError, $n as detectDocumentFormat, an as detectScriptLocale, Cr as deviceHasCamera, vi as dispatchAssistantQuotaExhausted, xn as docxXmlToText, M as downloadAssistantArtifact, ii as downloadFile, er as estimateTurnBodyBytes, o as executeSandboxGraphQL, ai as exportConversation, N as extendAssistantSandboxTTL, xi as extractDocumentText, Bt as findAssistantLanguage, P as findExistingSandbox, Wt as findPendingWrite, Sn as fitPdfPages, tr as formatBytes, Cn as formatPageRanges, vr as getActorId, F as getAssistantArtifacts, Z as getAssistantMedia, I as getAssistantMessages, L as getAssistantSession, R as getAssistantStreamAccess, Q as getAssistantText, nr as getAttachmentSendBlocker, S as getCapability, rr as getExtension, _ as getImageForMode, v as getImageTagForMode, yr as getOrganizationId, $ as getRawMessageCreatedAt, y as getResourcesForMode, b as getSandboxImageRegistry, ir as getSendableAttachments, Fe as getSpeechEngine, ee as getToolProgress, br as getWorkspaceId, le as groupBySession, ue as groupConsecutiveBySession, ar as hasAttachmentWorkInFlight, ve as hostedLocaleFor, ye as hostedSupportsLanguage, kr as imageHostLabel, Ye as isCapturing, Xe as isEcho, wn as isMostlyImagePages, hi as isMultimodalBodyRejection, wi as isProdRuntime, r as isQuotaExhaustedError, te as isReapedSandboxConnectionError, Er as isRecentlyVerified, ne as isRecoverable, gi as isRecoverableAssistantError, Ar as isRemoteImageSrc, cn as isSpeakingMessage, it as isSpeechBlocked, Ze as isSubmittable, dr as isTurnInFlight, C as isUnknownFieldError, de as isVoiceTurn, Tn as joinSheets, at as languageDisplayName, re as mapSessionToHistory, w as markSupported, T as markUnsupported, ie as mergeMessagesById, Re as micIsInterrupt, z as modeRequiresConfirmWrites, Gr as nextModeIndex, ot as normalizeLangTag, yi as notifyAiCreditsUpdated, Qe as orbMode, En as pageMarker, Gt as parseConfirmationRefusal, or as parseDataUrl, Dn as parseSharedStrings, pr as parseToolActivity, On as parseWorkbookSheets, kn as pdfTextItemsToPage, $e as planReplyConsumption, It as pollDelayMs, st as primaryLanguageSubtag, i as quotaExhaustedEventName, Ie as readSpeechEngineConfig, B as releaseSupersededAssistantSandboxes, Ht as replyFollowsInput, V as reportAssistantAiTokenUsage, ln as requiresCancel, Le as resetSpeechEngine, Vt as resolveAssistantLanguage, Ut as resolveLanguagePair, qt as resolveModeConfig, x as resolveSandboxAssistantMode, on as resolveSpeechLocale, ae as sanitize, H as selectExistingAssistantSandbox, U as selectSupersededAssistantSandboxes, ct as selectVoiceForLocale, W as sendAssistantPromptAsync, G as sendHeartbeat, An as sheetXmlToRows, ke as shouldDisableEngine, At as showPreviousChunk, ze as showsAssistantCaption, Be as showsUserCaption, wt as speakableEmail, lt as speechGate, rn as speechLabelsFor, ut as speechLangForLocale, un as speechPlaybackReducer, Ae as splitForVendor, Tt as splitTableRow, et as spokenSoFar, K as stopReapedAssistantSandbox, jn as summarisePageText, Lt as toCaptionText, sr as toMessageAttachment, Et as toSpeakableText, cr as truncateForInline, Mn as truncatePagesForInline, pi as useAssistantApiAccess, Si as useAssistantAttachments, Ti as useAssistantHeartbeat, en as useAssistantI18nNamespace, Ei as useAssistantKeyboardShortcuts, Jt as useAssistantPageLabel, Yt as useAssistantProduct, Xt as useAssistantProductOrNull, hr as useAssistantSpeech, Zt as useAssistantStorageFolders, ur as useAssistantStore, tn as useAssistantTr, mi as useConversationTurns, se as useSandboxAssistantTransport, e as useVoiceInput, gr as useVoiceSession, bi as useWorkspaceWriteAccess, lr as validateFile, dt as voiceAvailability, fe as voiceMarker, Ot as voicePreviewText, ft as voiceQualityRank, pe as voiceSessionIdOf, tt as voiceSessionReducer, Ve as voiceStageState, gt as voiceTranscriptFilename, me as voiceTurnsOnly, pt as voicesForLocale, q as waitForAssistantServiceReady, J as waitForSandboxRunning, He as waveformIsActive, Ue as waveformIsSettled };
|