@burdenoff/fe-libs 2026.907.2 → 2026.908.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/api.d.ts +21 -0
- package/dist/shared/assistant/api.d.ts.map +1 -1
- package/dist/shared/assistant/api.js +12 -5
- package/dist/shared/assistant/turnState.d.ts +35 -0
- package/dist/shared/assistant/turnState.d.ts.map +1 -1
- package/dist/shared/assistant/turnState.js +17 -1
- package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.js +286 -264
- package/dist/shared/assistant/ui/AssistantSpeechProvider.d.ts +15 -0
- package/dist/shared/assistant/ui/AssistantSpeechProvider.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantSpeechProvider.js +162 -157
- package/dist/shared/assistant/ui/useVoiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/ui/useVoiceSession.js +77 -72
- package/dist/shared-assistant.js +87 -87
- package/package.json +1 -1
|
@@ -5,10 +5,10 @@ import { useCallback as u, useEffect as d, useMemo as f, useReducer as p, useRef
|
|
|
5
5
|
//#region src/shared/assistant/ui/useVoiceSession.ts
|
|
6
6
|
var g = 4e3, _ = 2500, v = 5e3, y = 12e3, b = "data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQAAAAA=";
|
|
7
7
|
function x({ onSubmit: x, latestReply: S, language: C }) {
|
|
8
|
-
let w = m(null), [T, E] = p(u((e, t) => c(e, t, w.current), []), t), D = l(), { setSessionSpeaking: O,
|
|
9
|
-
|
|
10
|
-
let
|
|
11
|
-
|
|
8
|
+
let w = m(null), [T, E] = p(u((e, t) => c(e, t, w.current), []), t), D = l(), { setSessionSpeaking: O, setSessionMicOpen: k, speakingMessageId: A, stop: j } = D, M = m(null), N = m(null), P = m(!1), [F, I] = h(null), [L, R] = h(!1), [z, B] = h(!1), V = m(T);
|
|
9
|
+
V.current = T;
|
|
10
|
+
let H = m(S);
|
|
11
|
+
H.current = S, d(() => {
|
|
12
12
|
if (T.phase === "speaking") {
|
|
13
13
|
w.current = S?.text ?? null;
|
|
14
14
|
return;
|
|
@@ -19,78 +19,83 @@ function x({ onSubmit: x, latestReply: S, language: C }) {
|
|
|
19
19
|
}, _);
|
|
20
20
|
return () => clearTimeout(e);
|
|
21
21
|
}, [T.phase, S]);
|
|
22
|
-
let
|
|
22
|
+
let U = u((e, t) => {
|
|
23
23
|
E({
|
|
24
24
|
type: "speech",
|
|
25
25
|
transcript: e,
|
|
26
26
|
final: t
|
|
27
27
|
});
|
|
28
|
-
}, []),
|
|
29
|
-
|
|
30
|
-
}, [
|
|
31
|
-
onFinalize: u((e) =>
|
|
28
|
+
}, []), W = m(0), G = u(() => {
|
|
29
|
+
j(), W.current = Date.now(), R(!0), E({ type: "interrupt" });
|
|
30
|
+
}, [j]), K = e({
|
|
31
|
+
onFinalize: u((e) => U(e, !0), [U]),
|
|
32
32
|
language: C
|
|
33
33
|
});
|
|
34
34
|
d(() => {
|
|
35
|
-
|
|
36
|
-
}, [
|
|
37
|
-
if (
|
|
38
|
-
let e = setTimeout(() =>
|
|
39
|
-
return
|
|
40
|
-
clearTimeout(e),
|
|
35
|
+
K.interim && U(K.interim, !1);
|
|
36
|
+
}, [K.interim, U]), d(() => {
|
|
37
|
+
if (M.current && clearTimeout(M.current), B(!1), T.phase !== "listening" || T.muted || !a(s(T))) return;
|
|
38
|
+
let e = setTimeout(() => B(!0), 800);
|
|
39
|
+
return M.current = setTimeout(() => E({ type: "silence" }), r), () => {
|
|
40
|
+
clearTimeout(e), M.current && clearTimeout(M.current);
|
|
41
41
|
};
|
|
42
42
|
}, [T]), d(() => {
|
|
43
|
-
if (!
|
|
44
|
-
let e = Date.now() -
|
|
43
|
+
if (!L) return;
|
|
44
|
+
let e = Date.now() - W.current, t = K.isListening ? Math.max(0, 500 - e) : Math.max(0, n - e), r = setTimeout(() => R(!1), t);
|
|
45
45
|
return () => clearTimeout(r);
|
|
46
|
-
}, [
|
|
47
|
-
let
|
|
48
|
-
T.phase === "listening" && (
|
|
46
|
+
}, [L, K.isListening]);
|
|
47
|
+
let q = m("");
|
|
48
|
+
T.phase === "listening" && (q.current = s(T)), d(() => {
|
|
49
49
|
if (T.phase !== "thinking") return;
|
|
50
|
-
let e =
|
|
51
|
-
e && x(e,
|
|
50
|
+
let e = q.current.trim();
|
|
51
|
+
e && x(e, J.current ?? `vs-orphan-${Date.now().toString(36)}`);
|
|
52
52
|
}, [T.phase]), d(() => {
|
|
53
|
-
let e = o(S?.id, T.phase,
|
|
54
|
-
e.claim && (
|
|
53
|
+
let e = o(S?.id, T.phase, N.current);
|
|
54
|
+
e.claim && (N.current = S?.id ?? null, e.advance && S && E({
|
|
55
55
|
type: "reply",
|
|
56
56
|
text: S.text
|
|
57
57
|
}));
|
|
58
58
|
}, [S, T.phase]), d(() => {
|
|
59
|
-
let e =
|
|
60
|
-
|
|
61
|
-
}, [
|
|
62
|
-
T.phase !== "listening" &&
|
|
59
|
+
let e = A !== null;
|
|
60
|
+
P.current && !e && E({ type: "speech-ended" }), P.current = e;
|
|
61
|
+
}, [A]), d(() => {
|
|
62
|
+
T.phase !== "listening" && I((e) => e === "nothing-heard" ? null : e);
|
|
63
63
|
}, [T.phase]), d(() => {
|
|
64
|
-
if (T.phase !== "speaking" ||
|
|
64
|
+
if (T.phase !== "speaking" || A !== null) return;
|
|
65
65
|
let e = setTimeout(() => {
|
|
66
|
-
|
|
66
|
+
P.current || E({ type: "speech-ended" });
|
|
67
67
|
}, g);
|
|
68
68
|
return () => clearTimeout(e);
|
|
69
|
-
}, [T.phase,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
}, [T.phase, A]), d(() => {
|
|
70
|
+
let e = i(T);
|
|
71
|
+
k(e), e ? K.isActive || K.start() : K.isActive && K.stop();
|
|
72
|
+
}, [
|
|
73
|
+
T,
|
|
74
|
+
K,
|
|
75
|
+
k
|
|
76
|
+
]), d(() => {
|
|
77
|
+
K.error === "not-allowed" || K.error === "audio-capture" ? E({
|
|
73
78
|
type: "fail",
|
|
74
79
|
error: "mic-denied"
|
|
75
|
-
}) :
|
|
80
|
+
}) : K.error === "language-not-supported" ? E({
|
|
76
81
|
type: "fail",
|
|
77
82
|
error: "no-speech-support"
|
|
78
|
-
}) :
|
|
79
|
-
}, [
|
|
80
|
-
|
|
81
|
-
}, [
|
|
82
|
-
if (
|
|
83
|
-
let e = setTimeout(() =>
|
|
83
|
+
}) : K.error === "network" ? I("network") : K.error === "unknown" && I("recognition-failed");
|
|
84
|
+
}, [K.error]), d(() => {
|
|
85
|
+
K.error !== null || !K.isListening || I((e) => e === "network" || e === "recognition-failed" ? null : e);
|
|
86
|
+
}, [K.error, K.isListening]), d(() => {
|
|
87
|
+
if (K.isListening && I((e) => e === "not-capturing" ? null : e), !i(T) || K.isListening) return;
|
|
88
|
+
let e = setTimeout(() => I("not-capturing"), v);
|
|
84
89
|
return () => clearTimeout(e);
|
|
85
|
-
}, [T,
|
|
86
|
-
if (T.phase !== "listening" || T.muted || !
|
|
87
|
-
let e = setTimeout(() =>
|
|
90
|
+
}, [T, K.isListening]), d(() => {
|
|
91
|
+
if (T.phase !== "listening" || T.muted || !K.isListening || s(T) !== "") return;
|
|
92
|
+
let e = setTimeout(() => I("nothing-heard"), y);
|
|
88
93
|
return () => clearTimeout(e);
|
|
89
|
-
}, [T,
|
|
90
|
-
s(T) !== "" &&
|
|
94
|
+
}, [T, K.isListening]), d(() => {
|
|
95
|
+
s(T) !== "" && I(null);
|
|
91
96
|
}, [T]);
|
|
92
|
-
let
|
|
93
|
-
if (
|
|
97
|
+
let J = m(null), Y = u(() => {
|
|
98
|
+
if (R(!1), B(!1), !K.isSupported) {
|
|
94
99
|
E({
|
|
95
100
|
type: "fail",
|
|
96
101
|
error: "no-speech-support"
|
|
@@ -117,47 +122,47 @@ function x({ onSubmit: x, latestReply: S, language: C }) {
|
|
|
117
122
|
e.volume = 0, e.play().catch(() => {});
|
|
118
123
|
}
|
|
119
124
|
} catch {}
|
|
120
|
-
O(!0),
|
|
125
|
+
O(!0), I(null), N.current = H.current?.id ?? null, J.current = `vs-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`, E({ type: "start" });
|
|
121
126
|
}, [
|
|
122
|
-
|
|
127
|
+
K.isSupported,
|
|
123
128
|
D.isBlocked,
|
|
124
129
|
O
|
|
125
|
-
]),
|
|
126
|
-
|
|
127
|
-
}, [
|
|
130
|
+
]), X = u(() => {
|
|
131
|
+
R(!1), B(!1), J.current = null, E({ type: "end" }), j(), O(!1);
|
|
132
|
+
}, [j, O]), Z = u(() => {
|
|
128
133
|
E({
|
|
129
134
|
type: "mute",
|
|
130
|
-
muted: !
|
|
135
|
+
muted: !V.current.muted
|
|
131
136
|
});
|
|
132
137
|
}, []);
|
|
133
138
|
return d(() => () => {
|
|
134
|
-
O(!1);
|
|
135
|
-
}, [O]), f(() => ({
|
|
139
|
+
O(!1), k(!1);
|
|
140
|
+
}, [O, k]), f(() => ({
|
|
136
141
|
session: T,
|
|
137
|
-
notice:
|
|
142
|
+
notice: F,
|
|
138
143
|
spokenChunks: D.spokenChunks,
|
|
139
|
-
capturing:
|
|
144
|
+
capturing: K.isListening,
|
|
140
145
|
active: T.phase !== "idle" && (T.phase !== "ended" || T.error !== null),
|
|
141
|
-
interrupting:
|
|
142
|
-
awaitingEndpoint:
|
|
143
|
-
available:
|
|
144
|
-
start:
|
|
145
|
-
end:
|
|
146
|
-
toggleMute:
|
|
147
|
-
interrupt:
|
|
146
|
+
interrupting: L,
|
|
147
|
+
awaitingEndpoint: z,
|
|
148
|
+
available: K.isSupported && !D.isBlocked,
|
|
149
|
+
start: Y,
|
|
150
|
+
end: X,
|
|
151
|
+
toggleMute: Z,
|
|
152
|
+
interrupt: G
|
|
148
153
|
}), [
|
|
149
154
|
T,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
+
F,
|
|
156
|
+
L,
|
|
157
|
+
z,
|
|
158
|
+
K.isListening,
|
|
159
|
+
K.isSupported,
|
|
155
160
|
D.isBlocked,
|
|
156
161
|
D.spokenChunks,
|
|
157
|
-
J,
|
|
158
162
|
Y,
|
|
159
163
|
X,
|
|
160
|
-
|
|
164
|
+
Z,
|
|
165
|
+
G
|
|
161
166
|
]);
|
|
162
167
|
}
|
|
163
168
|
//#endregion
|
package/dist/shared-assistant.js
CHANGED
|
@@ -4,90 +4,90 @@ import { buildSandboxContextInput as a, executeSandboxGraphQL as o } from "./sha
|
|
|
4
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
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
6
|
import { getCapability as S, isUnknownFieldError as C, markSupported as w, markUnsupported as T } from "./shared/assistant/capabilities.js";
|
|
7
|
-
import {
|
|
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 {
|
|
7
|
+
import { abortAssistantTurn as E, approvePendingWrite as D, buildAssistantSandboxEnv as O, buildPromptRequestBody as k, checkAssistantAiCredits as A, createAssistantSandbox as j, createAssistantSession as M, downloadAssistantArtifact as N, extendAssistantSandboxTTL as P, findExistingSandbox as F, getAssistantArtifacts as I, getAssistantMessages as L, getAssistantSession as R, getAssistantStreamAccess as z, modeRequiresConfirmWrites as B, releaseSupersededAssistantSandboxes as V, reportAssistantAiTokenUsage as H, selectExistingAssistantSandbox as U, selectSupersededAssistantSandboxes as W, sendAssistantPromptAsync as G, sendHeartbeat as K, stopReapedAssistantSandbox as q, waitForAssistantServiceReady as J, waitForSandboxRunning as Y } from "./shared/assistant/api.js";
|
|
8
|
+
import { AssistantRuntimeManager as X } from "./shared/assistant/runtime.js";
|
|
9
|
+
import { buildProgress as Z, getAssistantMedia as Q, getAssistantText as $, getRawMessageCreatedAt as ee, getToolProgress as te, isReapedSandboxConnectionError as ne, isRecoverable as re, mapSessionToHistory as ie, mergeMessagesById as ae, sanitize as oe } from "./shared/assistant/progress.js";
|
|
10
|
+
import { createSandboxAssistantTransport as se } from "./shared/assistant/createSandboxAssistantTransport.js";
|
|
11
|
+
import { useSandboxAssistantTransport as ce } from "./shared/assistant/useSandboxAssistantTransport.js";
|
|
12
|
+
import { chatTurns as le, groupBySession as ue, groupConsecutiveBySession as de, isVoiceTurn as fe, voiceMarker as pe, voiceSessionIdOf as me, voiceTurnsOnly as he } from "./shared/assistant/voice/turnVisibility.js";
|
|
13
|
+
import { browserSpeechEngine as ge } from "./shared/assistant/speech/browserSpeechEngine.js";
|
|
14
|
+
import { HOSTED_TTS_TIER as _e, HOSTED_VOICES as ve, hostedLocaleFor as ye, hostedSupportsLanguage as be } from "./shared/assistant/speech/hostedVoiceCatalogue.js";
|
|
15
|
+
import { HOSTED_TTS_MAX_CHARS as xe, SPEAKING_RATE_MAX as Se, SPEAKING_RATE_MAX_STREAMING as Ce, SPEAKING_RATE_MAX_SYNC as we, SPEAKING_RATE_MIN as Te, base64ToBytes as Ee, buildRequest as De, classifyHttpFailure as Oe, decodeAudioResponse as ke, shouldDisableEngine as Ae, splitForVendor as je } from "./shared/assistant/speech/hostedTtsProtocol.js";
|
|
16
|
+
import { createHostedTtsEngine as Me } from "./shared/assistant/speech/hostedTtsSpeechEngine.js";
|
|
17
|
+
import { createRoutingSpeechEngine as Ne } from "./shared/assistant/speech/routingSpeechEngine.js";
|
|
18
|
+
import { configureSpeechEngine as Pe, createSpeechEngines as Fe, getSpeechEngine as Ie, readSpeechEngineConfig as Le, resetSpeechEngine as Re } from "./shared/assistant/speech/createSpeechEngine.js";
|
|
19
|
+
import { micIsInterrupt as ze, showsAssistantCaption as Be, showsUserCaption as Ve, voiceStageState as He, waveformIsActive as Ue, waveformIsSettled as We } from "./shared/assistant/voice/voiceStageState.js";
|
|
20
|
+
import { ENDPOINT_GRACE_MS as Ge, INITIAL_SESSION as Ke, INTERRUPT_MAX_MS as qe, INTERRUPT_MIN_MS as Je, SILENCE_SUBMIT_MS as Ye, isCapturing as Xe, isEcho as Ze, isSubmittable as Qe, orbMode as $e, planReplyConsumption as et, spokenSoFar as tt, voiceSessionReducer as nt } from "./shared/assistant/voice/voiceSession.js";
|
|
21
|
+
import { SPEECH_LANG as rt, VOICE_LIST_TIMEOUT_MS as it, isSpeechBlocked as at, languageDisplayName as ot, normalizeLangTag as st, primaryLanguageSubtag as ct, selectVoiceForLocale as lt, speechGate as ut, speechLangForLocale as dt, voiceAvailability as ft, voiceQualityRank as pt, voicesForLocale as mt } from "./shared/assistant/voice/speechVoices.js";
|
|
22
|
+
import { buildContinuedFromVoiceNote as ht, buildVoiceTranscriptMarkdown as gt, voiceTranscriptFilename as _t } from "./shared/assistant/voice/voiceTranscript.js";
|
|
23
|
+
import { DEFAULT_SPEAKABLE_LABELS as vt, MAX_SPEAKABLE_CHARS as yt, MAX_SPOKEN_TABLE_ROWS as bt, SPEECH_CHUNK_CHARS as xt, SPEECH_CHUNK_CJK_CHARS as St, chunkForSpeech as Ct, containsCjk as wt, speakableEmail as Tt, splitTableRow as Et, toSpeakableText as Dt } from "./shared/assistant/voice/speakableText.js";
|
|
24
|
+
import { PREVIEW_LANGUAGES as Ot, voicePreviewText as kt } from "./shared/assistant/voice/voicePreview.js";
|
|
25
|
+
import { MINI_CAPTION_BUDGET as At, showPreviousChunk as jt } from "./shared/assistant/voice/miniCaptionBudget.js";
|
|
26
|
+
import { POLL_FAST_MS as Mt, POLL_FAST_UNTIL_MS as Nt, POLL_SLOW_MS as Pt, POLL_STEADY_MS as Ft, POLL_STEADY_UNTIL_MS as It, pollDelayMs as Lt } from "./shared/assistant/voice/assistantPollSchedule.js";
|
|
27
|
+
import { toCaptionText as Rt } from "./shared/assistant/voice/captionText.js";
|
|
28
|
+
import { ASSISTANT_LANGUAGES as zt, DEFAULT_SPEECH_RATE as Bt, findAssistantLanguage as Vt, resolveAssistantLanguage as Ht } from "./shared/assistant/voice/languages.js";
|
|
29
|
+
import { replyFollowsInput as Ut, resolveLanguagePair as Wt } from "./shared/assistant/voice/languagePair.js";
|
|
30
|
+
import { findPendingWrite as Gt, parseConfirmationRefusal as Kt } from "./shared/assistant/pendingWrite.js";
|
|
31
|
+
import { AssistantProductProvider as qt, resolveModeConfig as Jt, useAssistantPageLabel as Yt, useAssistantProduct as Xt, useAssistantProductOrNull as Zt, useAssistantStorageFolders as Qt } from "./shared/assistant/product.js";
|
|
32
|
+
import { AssistantI18nProvider as $t, assistantTranslationKey as en, useAssistantI18nNamespace as tn, useAssistantTr as nn } from "./shared/assistant/i18n.js";
|
|
33
|
+
import { SPOKEN_LABEL_LANGUAGES as rn, speechLabelsFor as an } from "./shared/assistant/voice/speechLabels.js";
|
|
34
|
+
import { detectScriptLocale as on, resolveSpeechLocale as sn } from "./shared/assistant/voice/replyLanguage.js";
|
|
35
|
+
import { IDLE_PLAYBACK as cn, isSpeakingMessage as ln, requiresCancel as un, speechPlaybackReducer as dn } from "./shared/assistant/voice/speechPlayback.js";
|
|
36
|
+
import { MAX_INLINE_IMAGE_BASE64_BYTES as fn, MAX_REQUEST_BODY_BYTES as pn } from "./shared/assistant/gatewayLimits.js";
|
|
37
|
+
import { BOILERPLATE_PAGE_SHARE as mn, MAX_BOILERPLATE_LINE_CHARS as hn, MAX_EXTRACTED_CHARS as gn, MAX_PDF_PAGES_SCANNED as _n, MIN_PAGE_TEXT_CHARS as vn, MIN_TEXT_PAGE_SHARE as yn, columnLetterToIndex as bn, decodeXmlEntities as xn, docxXmlToText as Sn, fitPdfPages as Cn, formatPageRanges as wn, isMostlyImagePages as Tn, joinSheets as En, pageMarker as Dn, parseSharedStrings as On, parseWorkbookSheets as kn, pdfTextItemsToPage as An, sheetXmlToRows as jn, summarisePageText as Mn, truncatePagesForInline as Nn } from "./shared/assistant/documentText.js";
|
|
38
|
+
import { ATTACHMENT_ACCEPT as Pn, AttachmentRejectedError as Fn, INLINE_IMAGE_MAX_DIM as In, INLINE_IMAGE_QUALITY as Ln, MAX_ATTACHMENTS as Rn, MAX_FILE_BYTES as zn, MAX_INLINE_CHARS_PER_FILE as Bn, MAX_INLINE_CHARS_TOTAL as Vn, MAX_INLINE_IMAGE_BASE64_CHARS as Hn, MAX_INLINE_IMAGE_PARTS as Un, MAX_INLINE_TURN_BODY_BYTES as Wn, MAX_TURN_BODY_BYTES as Gn, PROMPT_ENVELOPE_RESERVE_BYTES as Kn, TURN_BODY_HEADROOM_BYTES as qn, buildAttachmentPromptBlock as Jn, buildPromptParts as Yn, buildPromptWithAttachments as Xn, classifyAttachment as Zn, countInlineImageCandidates as Qn, countInlinedImageParts as $n, detectDocumentFormat as er, estimateTurnBodyBytes as tr, formatBytes as nr, getAttachmentSendBlocker as rr, getExtension as ir, getSendableAttachments as ar, hasAttachmentWorkInFlight as or, parseDataUrl as sr, toMessageAttachment as cr, truncateForInline as lr, validateFile as ur } from "./shared/assistant/attachments.js";
|
|
39
|
+
import { useAssistantStore as dr } from "./shared/assistant/store.js";
|
|
40
|
+
import { isTurnInFlight as fr, planTurnAbort as pr } from "./shared/assistant/turnState.js";
|
|
41
|
+
import { AssistantToolActivity as mr, parseToolActivity as hr } from "./shared/assistant/ui/AssistantToolActivity.js";
|
|
42
|
+
import { AssistantSpeechProvider as gr, useAssistantSpeech as _r } from "./shared/assistant/ui/AssistantSpeechProvider.js";
|
|
43
|
+
import { useVoiceSession as vr } from "./shared/assistant/ui/useVoiceSession.js";
|
|
44
|
+
import { copyToClipboard as yr } from "./shared/assistant/clipboard.js";
|
|
45
|
+
import { getActorId as br, getOrganizationId as xr, getWorkspaceId as Sr } from "./shared/assistant/context.js";
|
|
46
|
+
import { ATTACHMENT_SOURCES as Cr, availableAttachmentSources as wr, deviceHasCamera as Tr } from "./shared/assistant/attachmentSources.js";
|
|
47
|
+
import { SANDBOX_READY_TTL_MS as Er, createReadinessTracker as Dr, isRecentlyVerified as Or } from "./shared/assistant/sandboxReadiness.js";
|
|
48
|
+
import { AssistantAutoSpeakToggle as kr } from "./shared/assistant/ui/AssistantAutoSpeakToggle.js";
|
|
49
|
+
import { AssistantMarkdownImage as Ar, imageHostLabel as jr, isRemoteImageSrc as Mr } from "./shared/assistant/ui/AssistantMarkdownImage.js";
|
|
50
|
+
import { AssistantMarkdownRenderer as Nr, assistantUrlTransform as Pr } from "./shared/assistant/ui/AssistantMarkdownRenderer.js";
|
|
51
|
+
import { AssistantMessageAttachments as Fr } from "./shared/assistant/ui/AssistantMessageAttachments.js";
|
|
52
|
+
import { AssistantPendingWriteCard as Ir } from "./shared/assistant/ui/AssistantPendingWriteCard.js";
|
|
53
|
+
import { AssistantLanguageMenu as Lr } from "./shared/assistant/ui/AssistantLanguageMenu.js";
|
|
54
|
+
import { AssistantReplyLanguageSelector as Rr } from "./shared/assistant/ui/AssistantReplyLanguageSelector.js";
|
|
55
|
+
import { AssistantSpeakButton as zr } from "./shared/assistant/ui/AssistantSpeakButton.js";
|
|
56
|
+
import { AssistantSpokenTurnsNotice as Br } from "./shared/assistant/ui/AssistantSpokenTurnsNotice.js";
|
|
57
|
+
import { AssistantAttachmentButton as Vr } from "./shared/assistant/ui/composer/AssistantAttachmentButton.js";
|
|
58
|
+
import { AssistantAttachmentChips as Hr } from "./shared/assistant/ui/composer/AssistantAttachmentChips.js";
|
|
59
|
+
import { AssistantLanguageSelector as Ur, FOLLOW_APP_LOCALE as Wr } from "./shared/assistant/ui/composer/AssistantLanguageSelector.js";
|
|
60
|
+
import { ASSISTANT_MODE_META as Gr, AssistantModeSelector as Kr, nextModeIndex as qr } from "./shared/assistant/ui/composer/AssistantModeSelector.js";
|
|
61
|
+
import { AssistantVoiceButton as Jr } from "./shared/assistant/ui/composer/AssistantVoiceButton.js";
|
|
62
|
+
import { AUTO_VOICE as Yr, AssistantVoiceSelector as Xr } from "./shared/assistant/ui/composer/AssistantVoiceSelector.js";
|
|
63
|
+
import { AssistantVoiceOrb as Zr } from "./shared/assistant/ui/voice/AssistantVoiceOrb.js";
|
|
64
|
+
import { AssistantVoiceSessionButton as Qr } from "./shared/assistant/ui/voice/AssistantVoiceSessionButton.js";
|
|
65
|
+
import { CAPTION_SCROLL_ATTR as $r, VoiceCaption as ei } from "./shared/assistant/ui/voice/VoiceCaption.js";
|
|
66
|
+
import { VoiceConversationView as ti } from "./shared/assistant/ui/voice/VoiceConversationView.js";
|
|
67
|
+
import { VoiceWaveform as ni } from "./shared/assistant/ui/voice/VoiceWaveform.js";
|
|
68
|
+
import { VoiceMiniController as ri } from "./shared/assistant/ui/voice/VoiceMiniController.js";
|
|
69
|
+
import { VoiceStage as ii } from "./shared/assistant/ui/voice/VoiceStage.js";
|
|
70
|
+
import { VoiceTranscriptDrawer as ai } from "./shared/assistant/ui/voice/VoiceTranscriptDrawer.js";
|
|
71
|
+
import { downloadFile as oi, exportConversation as si } from "./shared/assistant/exportConversation.js";
|
|
72
|
+
import { AssistantMoreMenu as ci } from "./shared/assistant/ui/AssistantMoreMenu.js";
|
|
73
|
+
import { AssistantHeader as li } from "./shared/assistant/ui/AssistantHeader.js";
|
|
74
|
+
import { AssistantConversationList as ui } from "./shared/assistant/ui/AssistantConversationList.js";
|
|
75
|
+
import { AssistantEmptyState as di } from "./shared/assistant/ui/AssistantEmptyState.js";
|
|
76
|
+
import { AssistantMessageItem as fi } from "./shared/assistant/ui/AssistantMessageItem.js";
|
|
77
|
+
import { AssistantMessageList as pi } from "./shared/assistant/ui/AssistantMessageList.js";
|
|
78
|
+
import { AssistantVoiceSession as mi } from "./shared/assistant/ui/voice/AssistantVoiceSession.js";
|
|
79
|
+
import { useAssistantApiAccess as hi } from "./shared/assistant/useAssistantApiAccess.js";
|
|
80
|
+
import { useConversationTurns as gi } from "./shared/assistant/useConversationTurns.js";
|
|
81
|
+
import { isMultimodalBodyRejection as _i, isRecoverableAssistantError as vi } from "./shared/assistant/transportErrors.js";
|
|
82
|
+
import { aiCreditsUpdatedEventName as yi, dispatchAssistantQuotaExhausted as bi, notifyAiCreditsUpdated as xi } from "./shared/assistant/aiCredits.js";
|
|
83
|
+
import { useWorkspaceWriteAccess as Si } from "./shared/assistant/useWorkspaceWriteAccess.js";
|
|
84
|
+
import { extractDocumentText as Ci } from "./shared/assistant/documentExtract.js";
|
|
85
|
+
import { useAssistantAttachments as wi } from "./shared/assistant/useAssistantAttachments.js";
|
|
86
|
+
import { AssistantComposer as Ti } from "./shared/assistant/ui/composer/AssistantComposer.js";
|
|
87
|
+
import { isProdRuntime as Ei } from "./shared/assistant/env.js";
|
|
88
|
+
import { useAssistantHeartbeat as Di } from "./shared/assistant/useAssistantHeartbeat.js";
|
|
89
|
+
import { useAssistantKeyboardShortcuts as Oi } from "./shared/assistant/useAssistantKeyboardShortcuts.js";
|
|
90
|
+
import { AssistantApiCallsConsentDialog as ki } from "./shared/assistant/ui/AssistantApiCallsConsentDialog.js";
|
|
91
|
+
import { AssistantChatArea as Ai } from "./shared/assistant/ui/AssistantChatArea.js";
|
|
92
|
+
import { AIAssistantPanel as ji } from "./shared/assistant/ui/AIAssistantPanel.js";
|
|
93
|
+
export { ji as AIAssistantPanel, g as ASSISTANT_API_AUTH_STRATEGY, zt as ASSISTANT_LANGUAGES, Gr as ASSISTANT_MODE_META, Pn as ATTACHMENT_ACCEPT, Cr as ATTACHMENT_SOURCES, Yr as AUTO_VOICE, ki as AssistantApiCallsConsentDialog, Vr as AssistantAttachmentButton, Hr as AssistantAttachmentChips, kr as AssistantAutoSpeakToggle, Ai as AssistantChatArea, Ti as AssistantComposer, ui as AssistantConversationList, di as AssistantEmptyState, li as AssistantHeader, $t as AssistantI18nProvider, Lr as AssistantLanguageMenu, Ur as AssistantLanguageSelector, Ar as AssistantMarkdownImage, Nr as AssistantMarkdownRenderer, Fr as AssistantMessageAttachments, fi as AssistantMessageItem, pi as AssistantMessageList, Kr as AssistantModeSelector, ci as AssistantMoreMenu, Ir as AssistantPendingWriteCard, qt as AssistantProductProvider, Rr as AssistantReplyLanguageSelector, X as AssistantRuntimeManager, zr as AssistantSpeakButton, gr as AssistantSpeechProvider, Br as AssistantSpokenTurnsNotice, mr as AssistantToolActivity, Jr as AssistantVoiceButton, Zr as AssistantVoiceOrb, Xr as AssistantVoiceSelector, mi as AssistantVoiceSession, Qr as AssistantVoiceSessionButton, Fn as AttachmentRejectedError, mn as BOILERPLATE_PAGE_SHARE, $r 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, Wr 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, In as INLINE_IMAGE_MAX_DIM, Ln as INLINE_IMAGE_QUALITY, qe as INTERRUPT_MAX_MS, Je as INTERRUPT_MIN_MS, Rn as MAX_ATTACHMENTS, hn as MAX_BOILERPLATE_LINE_CHARS, gn as MAX_EXTRACTED_CHARS, zn as MAX_FILE_BYTES, Bn as MAX_INLINE_CHARS_PER_FILE, Vn as MAX_INLINE_CHARS_TOTAL, fn as MAX_INLINE_IMAGE_BASE64_BYTES, Hn as MAX_INLINE_IMAGE_BASE64_CHARS, Un as MAX_INLINE_IMAGE_PARTS, Wn as MAX_INLINE_TURN_BODY_BYTES, _n as MAX_PDF_PAGES_SCANNED, pn as MAX_REQUEST_BODY_BYTES, yt as MAX_SPEAKABLE_CHARS, bt as MAX_SPOKEN_TABLE_ROWS, Gn as MAX_TURN_BODY_BYTES, At as MINI_CAPTION_BUDGET, vn as MIN_PAGE_TEXT_CHARS, yn 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, Kn as PROMPT_ENVELOPE_RESERVE_BYTES, f as PROXY_SANDBOX_REQUEST, p as REPORT_AI_TOKEN_USAGE, Er 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, qn as TURN_BODY_HEADROOM_BYTES, it as VOICE_LIST_TIMEOUT_MS, ei as VoiceCaption, ti as VoiceConversationView, ri as VoiceMiniController, ii as VoiceStage, ai as VoiceTranscriptDrawer, ni as VoiceWaveform, h as WAIT_FOR_SANDBOX_RUNNING, E as abortAssistantTurn, yi as aiCreditsUpdatedEventName, D as approvePendingWrite, en as assistantTranslationKey, Pr as assistantUrlTransform, wr as availableAttachmentSources, Ee as base64ToBytes, ge as browserSpeechEngine, O as buildAssistantSandboxEnv, Jn as buildAttachmentPromptBlock, ht as buildContinuedFromVoiceNote, Z as buildProgress, Yn as buildPromptParts, k as buildPromptRequestBody, Xn as buildPromptWithAttachments, De as buildRequest, a as buildSandboxContextInput, gt as buildVoiceTranscriptMarkdown, le as chatTurns, A as checkAssistantAiCredits, Ct as chunkForSpeech, Zn as classifyAttachment, Oe as classifyHttpFailure, t as classifyQuotaError, bn as columnLetterToIndex, Pe as configureSpeechEngine, wt as containsCjk, yr as copyToClipboard, Qn as countInlineImageCandidates, $n as countInlinedImageParts, j as createAssistantSandbox, M as createAssistantSession, Me as createHostedTtsEngine, Dr as createReadinessTracker, Ne as createRoutingSpeechEngine, se as createSandboxAssistantTransport, Fe as createSpeechEngines, ke as decodeAudioResponse, xn as decodeXmlEntities, n as describeQuotaError, er as detectDocumentFormat, on as detectScriptLocale, Tr as deviceHasCamera, bi as dispatchAssistantQuotaExhausted, Sn as docxXmlToText, N as downloadAssistantArtifact, oi as downloadFile, tr as estimateTurnBodyBytes, o as executeSandboxGraphQL, si as exportConversation, P as extendAssistantSandboxTTL, Ci as extractDocumentText, Vt as findAssistantLanguage, F as findExistingSandbox, Gt as findPendingWrite, Cn as fitPdfPages, nr as formatBytes, wn as formatPageRanges, br as getActorId, I as getAssistantArtifacts, Q as getAssistantMedia, L as getAssistantMessages, R as getAssistantSession, z as getAssistantStreamAccess, $ as getAssistantText, rr as getAttachmentSendBlocker, S as getCapability, ir as getExtension, _ as getImageForMode, v as getImageTagForMode, xr as getOrganizationId, ee as getRawMessageCreatedAt, y as getResourcesForMode, b as getSandboxImageRegistry, ar as getSendableAttachments, Ie as getSpeechEngine, te as getToolProgress, Sr as getWorkspaceId, ue as groupBySession, de as groupConsecutiveBySession, or as hasAttachmentWorkInFlight, ye as hostedLocaleFor, be as hostedSupportsLanguage, jr as imageHostLabel, Xe as isCapturing, Ze as isEcho, Tn as isMostlyImagePages, _i as isMultimodalBodyRejection, Ei as isProdRuntime, r as isQuotaExhaustedError, ne as isReapedSandboxConnectionError, Or as isRecentlyVerified, re as isRecoverable, vi as isRecoverableAssistantError, Mr as isRemoteImageSrc, ln as isSpeakingMessage, at as isSpeechBlocked, Qe as isSubmittable, fr as isTurnInFlight, C as isUnknownFieldError, fe as isVoiceTurn, En as joinSheets, ot as languageDisplayName, ie as mapSessionToHistory, w as markSupported, T as markUnsupported, ae as mergeMessagesById, ze as micIsInterrupt, B as modeRequiresConfirmWrites, qr as nextModeIndex, st as normalizeLangTag, xi as notifyAiCreditsUpdated, $e as orbMode, Dn as pageMarker, Kt as parseConfirmationRefusal, sr as parseDataUrl, On as parseSharedStrings, hr as parseToolActivity, kn as parseWorkbookSheets, An as pdfTextItemsToPage, et as planReplyConsumption, pr as planTurnAbort, Lt as pollDelayMs, ct as primaryLanguageSubtag, i as quotaExhaustedEventName, Le as readSpeechEngineConfig, V as releaseSupersededAssistantSandboxes, Ut as replyFollowsInput, H as reportAssistantAiTokenUsage, un 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, jn 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, dn as speechPlaybackReducer, je as splitForVendor, Et as splitTableRow, tt as spokenSoFar, q as stopReapedAssistantSandbox, Mn as summarisePageText, Rt as toCaptionText, cr as toMessageAttachment, Dt as toSpeakableText, lr as truncateForInline, Nn as truncatePagesForInline, hi as useAssistantApiAccess, wi as useAssistantAttachments, Di as useAssistantHeartbeat, tn as useAssistantI18nNamespace, Oi as useAssistantKeyboardShortcuts, Yt as useAssistantPageLabel, Xt as useAssistantProduct, Zt as useAssistantProductOrNull, _r as useAssistantSpeech, Qt as useAssistantStorageFolders, dr as useAssistantStore, nn as useAssistantTr, gi as useConversationTurns, ce as useSandboxAssistantTransport, e as useVoiceInput, vr as useVoiceSession, Si as useWorkspaceWriteAccess, ur 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 };
|