@burdenoff/fe-libs 2026.922.3 → 2026.923.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/ui/useVoiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/ui/useVoiceSession.js +1 -1
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +106 -101
- package/dist/shared/assistant/voice/useVoiceInput.d.ts +54 -1
- package/dist/shared/assistant/voice/useVoiceInput.d.ts.map +1 -1
- package/dist/shared/assistant/voice/useVoiceInput.js +60 -56
- package/dist/shared-assistant.js +131 -131
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVoiceSession.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/useVoiceSession.ts"],"names":[],"mappings":"AAUA,OAAO,EAWL,KAAK,oBAAoB,EAE1B,MAAM,uBAAuB,CAAC;AAsC/B;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"useVoiceSession.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/useVoiceSession.ts"],"names":[],"mappings":"AAUA,OAAO,EAWL,KAAK,oBAAoB,EAE1B,MAAM,uBAAuB,CAAC;AAsC/B;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAC5B,SAAS,GAAG,eAAe,GAAG,eAAe,GAAG,oBAAoB,CAAC;AAMvE,UAAU,OAAO;IACf,+EAA+E;IAC/E;;;;;;;OAOG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD;;;;OAIG;IACH,WAAW,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACjD,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,OAAO;;IA4iBtE,qEAAqE;;IAErE;;;;;;;OAOG;;;;;IAEH,+DAA+D;;IAE/D;;;;;;;OAOG;;IAIH,0EAA0E;;IAE1E,6DAA6D;;IAE7D,sDAAsD;;;;;;EA4B3D"}
|
|
@@ -68,7 +68,7 @@ function x({ onSubmit: x, latestReply: S, language: C }) {
|
|
|
68
68
|
return () => clearTimeout(e);
|
|
69
69
|
}, [T.phase, A]), d(() => {
|
|
70
70
|
let e = i(T);
|
|
71
|
-
k(e), e ? K.isActive || K.start() : K.isActive && K.stop();
|
|
71
|
+
k(e), e ? K.isActive || K.start("auto") : K.isActive && K.stop();
|
|
72
72
|
}, [
|
|
73
73
|
T,
|
|
74
74
|
K,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantVoiceSession.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/voice/AssistantVoiceSession.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAI1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAgB7D,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,gFAAgF;AAChF,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAElD,UAAU,KAAK;IACb,OAAO,EAAE,oBAAoB,CAAC;IAC9B,iEAAiE;IACjE,KAAK,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAC3C,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,6EAA6E;IAC7E,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACnC,gEAAgE;IAChE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACpC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,iBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0EAA0E;IAC1E,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,4DAA4D;IAC5D,YAAY,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC1D,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,mFAAmF;IACnF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"AssistantVoiceSession.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/voice/AssistantVoiceSession.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAI1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAgB7D,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,gFAAgF;AAChF,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAElD,UAAU,KAAK;IACb,OAAO,EAAE,oBAAoB,CAAC;IAC9B,iEAAiE;IACjE,KAAK,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAC3C,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,6EAA6E;IAC7E,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACnC,gEAAgE;IAChE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACpC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,iBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0EAA0E;IAC1E,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,4DAA4D;IAC5D,YAAY,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC1D,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,mFAAmF;IACnF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,KAAK,CAyoB3C,CAAC"}
|
|
@@ -1,118 +1,123 @@
|
|
|
1
1
|
import { useAssistantTr as e } from "../../i18n.js";
|
|
2
2
|
import { micIsInterrupt as t, showsAssistantCaption as n, voiceStageState as r } from "../../voice/voiceStageState.js";
|
|
3
|
-
import { VOICE_THINKING_LABEL as i, composeVoiceStatus as
|
|
4
|
-
import { spokenSoFar as
|
|
5
|
-
import { AssistantAttachmentButton as
|
|
6
|
-
import { AssistantAttachmentChips as
|
|
7
|
-
import { AssistantVoiceOrb as
|
|
3
|
+
import { VOICE_THINKING_LABEL as i, composeVoiceStatus as ee, voiceStatusSuffix as te } from "../../voice/voiceStatus.js";
|
|
4
|
+
import { spokenSoFar as a } from "../../voice/voiceSession.js";
|
|
5
|
+
import { AssistantAttachmentButton as o } from "../composer/AssistantAttachmentButton.js";
|
|
6
|
+
import { AssistantAttachmentChips as ne } from "../composer/AssistantAttachmentChips.js";
|
|
7
|
+
import { AssistantVoiceOrb as s } from "./AssistantVoiceOrb.js";
|
|
8
8
|
import { VoiceMiniController as c } from "./VoiceMiniController.js";
|
|
9
9
|
import { VoiceStage as l } from "./VoiceStage.js";
|
|
10
10
|
import { VoiceTranscriptDrawer as u } from "./VoiceTranscriptDrawer.js";
|
|
11
11
|
import { useCallback as d, useEffect as f, useRef as p, useState as m } from "react";
|
|
12
|
-
import { Maximize2 as re, Minimize2 as
|
|
13
|
-
import { jsx as
|
|
12
|
+
import { Maximize2 as re, Minimize2 as h, ScrollText as g, X as _ } from "lucide-react";
|
|
13
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
14
14
|
//#region src/shared/assistant/ui/voice/AssistantVoiceSession.tsx
|
|
15
|
-
var
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
}, [
|
|
15
|
+
var b = ({ session: b, turns: oe = [], onSaveTranscript: se, onContinueInChat: ce, notice: x = null, spoken: S, onInterrupt: C, onToggleMute: w, attachments: T = [], onAttachFiles: E, onRemoveAttachment: le, onRetryAttachment: ue, canAttachMore: de = !0, preparingAttachments: D = 0, spokenChunks: O = null, onEnd: k, capturing: A = !0, interrupting: fe = !1, awaitingEndpoint: pe = !1 }) => {
|
|
16
|
+
let j = e(), { muted: M, error: N } = b, P = p(null), F = p(null), [I, L] = m("mini"), R = I === "full", z = I === "mini", B = I === "mini" ? "panel" : I === "panel" ? "full" : "mini", [V, H] = m(!1), U = p(!1), W = p(w);
|
|
17
|
+
W.current = w;
|
|
18
|
+
let G = d(() => {
|
|
19
|
+
b.phase === "listening" && (M || U.current || a(b) || (U.current = !0, W.current()));
|
|
20
|
+
}, [M, b]), K = d(() => {
|
|
21
|
+
U.current && (U.current = !1, W.current());
|
|
22
|
+
}, []), me = G;
|
|
21
23
|
f(() => {
|
|
22
24
|
let e = () => {
|
|
23
|
-
|
|
25
|
+
document.visibilityState === "hidden" ? G() : K();
|
|
24
26
|
};
|
|
27
|
+
return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
|
|
28
|
+
}, [G, K]), f(() => {
|
|
29
|
+
let e = K;
|
|
25
30
|
return window.addEventListener("focus", e), () => {
|
|
26
|
-
window.removeEventListener("focus", e),
|
|
31
|
+
window.removeEventListener("focus", e), U.current = !1;
|
|
27
32
|
};
|
|
28
33
|
}, []), f(() => {
|
|
29
|
-
|
|
34
|
+
P.current?.focus();
|
|
30
35
|
}, []), f(() => {
|
|
31
36
|
let e = (e) => {
|
|
32
37
|
if (e.key === "Escape") {
|
|
33
|
-
if (
|
|
34
|
-
|
|
38
|
+
if (V) {
|
|
39
|
+
H(!1);
|
|
35
40
|
return;
|
|
36
41
|
}
|
|
37
|
-
|
|
42
|
+
k();
|
|
38
43
|
return;
|
|
39
44
|
}
|
|
40
|
-
if (e.key !== "Tab" || !
|
|
41
|
-
let t = (
|
|
45
|
+
if (e.key !== "Tab" || !R) return;
|
|
46
|
+
let t = (V ? F.current?.querySelector("[data-testid=\"assistant-voice-transcript\"]") : F.current)?.querySelectorAll("button:not([disabled])");
|
|
42
47
|
if (!t || t.length === 0) return;
|
|
43
48
|
let n = t[0], r = t[t.length - 1];
|
|
44
49
|
!n || !r || (e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus()));
|
|
45
50
|
};
|
|
46
51
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
47
52
|
}, [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
k,
|
|
54
|
+
R,
|
|
55
|
+
V
|
|
51
56
|
]);
|
|
52
|
-
let q =
|
|
53
|
-
snapshot:
|
|
54
|
-
capturing:
|
|
55
|
-
interrupting:
|
|
56
|
-
awaitingEndpoint:
|
|
57
|
+
let q = x !== null && N === null, J = a(b), Y = r({
|
|
58
|
+
snapshot: b,
|
|
59
|
+
capturing: A,
|
|
60
|
+
interrupting: fe,
|
|
61
|
+
awaitingEndpoint: pe
|
|
57
62
|
}), X = (() => {
|
|
58
63
|
switch (Y) {
|
|
59
|
-
case "connecting": return
|
|
60
|
-
case "endpoint-grace": return
|
|
61
|
-
case "interrupting": return
|
|
62
|
-
case "thinking": return
|
|
63
|
-
case "speaking": return
|
|
64
|
+
case "connecting": return j("voiceSession.connecting", "Starting the microphone…");
|
|
65
|
+
case "endpoint-grace": return j("voiceSession.endpointGrace", "Still listening — take your time");
|
|
66
|
+
case "interrupting": return j("voiceSession.interrupting", "Stopped — go ahead");
|
|
67
|
+
case "thinking": return j(i.key, i.fallback);
|
|
68
|
+
case "speaking": return j("voiceSession.speaking", "Speaking — tap to stop");
|
|
64
69
|
case "mic-error":
|
|
65
70
|
case "ended": return "";
|
|
66
|
-
case "listening": return
|
|
71
|
+
case "listening": return M ? j("voiceSession.muted", "Microphone off") : j("voiceSession.listening", "Listening…");
|
|
67
72
|
default: return Y;
|
|
68
73
|
}
|
|
69
|
-
})(), Z =
|
|
70
|
-
tr:
|
|
74
|
+
})(), Z = te({
|
|
75
|
+
tr: j,
|
|
71
76
|
stage: Y,
|
|
72
|
-
muted:
|
|
77
|
+
muted: M,
|
|
73
78
|
label: X
|
|
74
|
-
}), Q =
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
ref:
|
|
77
|
-
className: `flex flex-col items-center justify-between bg-bg-sunken ${
|
|
79
|
+
}), Q = ee(X, Z), $ = Y === "thinking";
|
|
80
|
+
return /* @__PURE__ */ y("div", {
|
|
81
|
+
ref: F,
|
|
82
|
+
className: `flex flex-col items-center justify-between bg-bg-sunken ${I === "full" ? "fixed inset-x-0 bottom-0 top-14 z-[60] px-6 py-8" : I === "panel" ? "absolute inset-0 z-20 px-4 py-6" : "absolute inset-x-0 bottom-0 z-20 h-[11.25rem] border-t border-border-subtle px-3 py-3 shadow-lg"}`,
|
|
78
83
|
role: "dialog",
|
|
79
|
-
"aria-modal":
|
|
80
|
-
"aria-label":
|
|
84
|
+
"aria-modal": R || void 0,
|
|
85
|
+
"aria-label": j("voiceSession.title", "Voice conversation"),
|
|
81
86
|
"data-testid": "assistant-voice-session",
|
|
82
87
|
children: [
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
ref:
|
|
88
|
+
/* @__PURE__ */ y("button", {
|
|
89
|
+
ref: P,
|
|
85
90
|
type: "button",
|
|
86
|
-
onClick:
|
|
87
|
-
className: `absolute ${
|
|
88
|
-
title:
|
|
91
|
+
onClick: k,
|
|
92
|
+
className: `absolute ${R ? "right-6 top-6 h-14 gap-2 px-5 text-base" : z ? "right-12 top-2 h-8 gap-1.5 px-2.5 text-xs" : "right-3 top-3 h-11 gap-2 px-4 text-sm"} flex items-center justify-center rounded-full border border-border-default bg-bg-elevated text-text-secondary hover:bg-bg-sunken transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong`,
|
|
93
|
+
title: j("voiceSession.end", "End the voice conversation"),
|
|
89
94
|
"data-testid": "assistant-voice-end",
|
|
90
|
-
children: [/* @__PURE__ */
|
|
91
|
-
className:
|
|
95
|
+
children: [/* @__PURE__ */ v(_, {
|
|
96
|
+
className: R ? "size-6" : z ? "size-4" : "size-5",
|
|
92
97
|
"aria-hidden": "true"
|
|
93
|
-
}), /* @__PURE__ */
|
|
94
|
-
className: `truncate whitespace-nowrap font-medium ${
|
|
95
|
-
children:
|
|
98
|
+
}), /* @__PURE__ */ v("span", {
|
|
99
|
+
className: `truncate whitespace-nowrap font-medium ${z ? "max-w-[3.5rem] text-xs" : "max-w-[7rem]"}`,
|
|
100
|
+
children: j("voiceSession.endShort", "End")
|
|
96
101
|
})]
|
|
97
102
|
}),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
className: `flex flex-col items-center ${
|
|
100
|
-
children: q ? /* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ v("div", {
|
|
104
|
+
className: `flex flex-col items-center ${z ? "px-3" : `min-h-[1.5rem] ${q ? R ? "pt-14" : "pt-10" : ""}`}`,
|
|
105
|
+
children: q ? /* @__PURE__ */ v("p", {
|
|
101
106
|
className: "max-w-xs text-center text-xs text-status-warning",
|
|
102
107
|
"data-testid": "assistant-voice-notice",
|
|
103
|
-
children:
|
|
108
|
+
children: ie(x, j)
|
|
104
109
|
}) : null
|
|
105
110
|
}),
|
|
106
111
|
(() => {
|
|
107
|
-
let e = /* @__PURE__ */
|
|
108
|
-
session:
|
|
109
|
-
compact:
|
|
112
|
+
let e = /* @__PURE__ */ v(s, {
|
|
113
|
+
session: b,
|
|
114
|
+
compact: z,
|
|
110
115
|
connecting: Y === "connecting",
|
|
111
|
-
onPress: t(Y) ?
|
|
112
|
-
label: t(Y) ?
|
|
113
|
-
}), r = n(Y) ?
|
|
114
|
-
return
|
|
115
|
-
spokenChunks:
|
|
116
|
+
onPress: t(Y) ? C : w,
|
|
117
|
+
label: t(Y) ? j("voiceSession.interrupt", "Stop the assistant and speak") : M ? j("voiceSession.unmute", "Turn the microphone on") : j("voiceSession.mute", "Turn the microphone off")
|
|
118
|
+
}), r = n(Y) ? S : J || null, i = N === null ? null : ae(N, j);
|
|
119
|
+
return z ? /* @__PURE__ */ v(c, {
|
|
120
|
+
spokenChunks: O,
|
|
116
121
|
state: Y,
|
|
117
122
|
caption: r,
|
|
118
123
|
statusText: Q,
|
|
@@ -120,12 +125,12 @@ var _ = ({ session: _, turns: y = [], onSaveTranscript: b, onContinueInChat: x,
|
|
|
120
125
|
rotateStatus: $,
|
|
121
126
|
errorText: i,
|
|
122
127
|
control: e
|
|
123
|
-
}) : /* @__PURE__ */
|
|
128
|
+
}) : /* @__PURE__ */ v(l, {
|
|
124
129
|
state: Y,
|
|
125
130
|
userCaption: J || null,
|
|
126
|
-
spokenChunks:
|
|
127
|
-
assistantCaption:
|
|
128
|
-
expanded:
|
|
131
|
+
spokenChunks: O,
|
|
132
|
+
assistantCaption: S,
|
|
133
|
+
expanded: R,
|
|
129
134
|
statusText: Q,
|
|
130
135
|
statusSuffix: Z,
|
|
131
136
|
rotateStatus: $,
|
|
@@ -133,54 +138,54 @@ var _ = ({ session: _, turns: y = [], onSaveTranscript: b, onContinueInChat: x,
|
|
|
133
138
|
control: e
|
|
134
139
|
});
|
|
135
140
|
})(),
|
|
136
|
-
|
|
137
|
-
turns:
|
|
138
|
-
onClose: () =>
|
|
139
|
-
onSave:
|
|
140
|
-
onContinueInChat:
|
|
141
|
+
V ? /* @__PURE__ */ v(u, {
|
|
142
|
+
turns: oe,
|
|
143
|
+
onClose: () => H(!1),
|
|
144
|
+
onSave: se,
|
|
145
|
+
onContinueInChat: ce
|
|
141
146
|
}) : null,
|
|
142
|
-
E ? /* @__PURE__ */
|
|
143
|
-
className: `absolute ${
|
|
144
|
-
children: /* @__PURE__ */
|
|
147
|
+
E ? /* @__PURE__ */ v("div", {
|
|
148
|
+
className: `absolute ${R ? "left-6 top-6" : z ? "left-11 top-2" : "left-3 top-3"}`,
|
|
149
|
+
children: /* @__PURE__ */ v(o, {
|
|
145
150
|
onFiles: (e) => {
|
|
146
|
-
E(e),
|
|
151
|
+
E(e), L((e) => e === "mini" ? "panel" : e);
|
|
147
152
|
},
|
|
148
|
-
onPickerOpen:
|
|
153
|
+
onPickerOpen: me,
|
|
149
154
|
direction: "down",
|
|
150
|
-
canAddMore:
|
|
155
|
+
canAddMore: de
|
|
151
156
|
})
|
|
152
157
|
}) : null,
|
|
153
|
-
(T.length > 0 ||
|
|
154
|
-
className: `absolute ${
|
|
158
|
+
(T.length > 0 || D > 0) && !z ? /* @__PURE__ */ v("div", {
|
|
159
|
+
className: `absolute ${R ? "bottom-24 left-24 right-24" : "bottom-16 left-16 right-16"}`,
|
|
155
160
|
"data-testid": "assistant-voice-attachments",
|
|
156
|
-
children: /* @__PURE__ */
|
|
161
|
+
children: /* @__PURE__ */ v(ne, {
|
|
157
162
|
attachments: T,
|
|
158
|
-
onRemove:
|
|
159
|
-
onRetry:
|
|
160
|
-
preparingCount:
|
|
163
|
+
onRemove: le ?? (() => void 0),
|
|
164
|
+
onRetry: ue ?? (() => void 0),
|
|
165
|
+
preparingCount: D
|
|
161
166
|
})
|
|
162
167
|
}) : null,
|
|
163
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ v("button", {
|
|
164
169
|
type: "button",
|
|
165
|
-
onClick: () =>
|
|
166
|
-
className: `absolute ${
|
|
167
|
-
"aria-pressed":
|
|
168
|
-
"aria-label":
|
|
170
|
+
onClick: () => H((e) => !e),
|
|
171
|
+
className: `absolute ${R ? "bottom-6 right-6 size-14" : z ? "right-2 top-2 size-8" : "bottom-3 right-3 size-11"} flex items-center justify-center rounded-full bg-bg-elevated text-text-secondary transition-colors hover:bg-bg-raised hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong`,
|
|
172
|
+
"aria-pressed": V,
|
|
173
|
+
"aria-label": j("voiceSession.transcriptTitle", "Voice transcript"),
|
|
169
174
|
"data-testid": "assistant-voice-transcript-toggle",
|
|
170
|
-
children: /* @__PURE__ */
|
|
175
|
+
children: /* @__PURE__ */ v(g, { className: R ? "size-6" : z ? "size-4" : "size-5" })
|
|
171
176
|
}),
|
|
172
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ v("button", {
|
|
173
178
|
type: "button",
|
|
174
|
-
onClick: () =>
|
|
175
|
-
className: `absolute ${
|
|
176
|
-
"aria-label":
|
|
179
|
+
onClick: () => L(B),
|
|
180
|
+
className: `absolute ${R ? "bottom-6 left-6 size-14" : z ? "left-2 top-2 size-8" : "bottom-3 left-3 size-11"} flex items-center justify-center rounded-full bg-bg-elevated text-text-secondary transition-colors hover:bg-bg-raised hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong`,
|
|
181
|
+
"aria-label": B === "panel" ? j("voiceSession.expandPanel", "Show the conversation in the panel") : B === "full" ? j("voiceSession.expand", "Expand the conversation to full screen") : j("voiceSession.collapse", "Shrink to the compact controller"),
|
|
177
182
|
"data-testid": "assistant-voice-expand",
|
|
178
|
-
children:
|
|
183
|
+
children: R ? /* @__PURE__ */ v(h, { className: "size-5" }) : /* @__PURE__ */ v(re, { className: z ? "size-4" : "size-5" })
|
|
179
184
|
})
|
|
180
185
|
]
|
|
181
186
|
});
|
|
182
187
|
};
|
|
183
|
-
function
|
|
188
|
+
function ie(e, t) {
|
|
184
189
|
switch (e) {
|
|
185
190
|
case "network": return t("voiceSession.noticeNetwork", "Speech recognition lost its connection. Check your network — it will retry.");
|
|
186
191
|
case "not-capturing": return t("voiceSession.noticeNotCapturing", "The microphone did not start. Check that this site is allowed to use it, then try again.");
|
|
@@ -189,7 +194,7 @@ function se(e, t) {
|
|
|
189
194
|
default: return e;
|
|
190
195
|
}
|
|
191
196
|
}
|
|
192
|
-
function
|
|
197
|
+
function ae(e, t) {
|
|
193
198
|
switch (e) {
|
|
194
199
|
case "mic-denied": return t("voiceSession.micDenied", "Microphone access is blocked. Allow it in your browser settings to talk.");
|
|
195
200
|
case "no-speech-support": return t("voiceSession.noSpeechSupport", "This browser cannot listen. Try a different browser, or type instead.");
|
|
@@ -198,4 +203,4 @@ function v(e, t) {
|
|
|
198
203
|
}
|
|
199
204
|
}
|
|
200
205
|
//#endregion
|
|
201
|
-
export {
|
|
206
|
+
export { b as AssistantVoiceSession };
|
|
@@ -31,6 +31,54 @@
|
|
|
31
31
|
* - **`stop()` resolves the final transcript** through `onFinalize`, so the
|
|
32
32
|
* composer can commit exactly once when the user stops.
|
|
33
33
|
*/
|
|
34
|
+
/**
|
|
35
|
+
* How long to refuse a restart after `recognition.start()` THREW.
|
|
36
|
+
*
|
|
37
|
+
* ★ Deliberately short. It is not a backoff schedule — it exists only to stop
|
|
38
|
+
* an unbounded retry, because the caller that drives `start()` is a React
|
|
39
|
+
* effect, not a loop with a delay. Long enough that a wedged recogniser is
|
|
40
|
+
* retried tens of times a minute instead of once per render; short enough that
|
|
41
|
+
* the mic comes back promptly once whatever held it lets go.
|
|
42
|
+
*/
|
|
43
|
+
export declare const START_RETRY_COOLDOWN_MS = 2000;
|
|
44
|
+
/**
|
|
45
|
+
* Who asked for a start.
|
|
46
|
+
*
|
|
47
|
+
* ★ The cooldown exists to bound the AUTOMATIC retry — `useVoiceSession`'s
|
|
48
|
+
* reconciliation effect, whose dependency array holds a fresh object literal
|
|
49
|
+
* every render, so it re-asks on essentially every re-render. A person pressing
|
|
50
|
+
* the microphone button is not that, and must always get a real attempt at the
|
|
51
|
+
* browser API: the throw it is recovering from is usually transient, so refusing
|
|
52
|
+
* the press guarantees the failure it was trying to escape — silently, with the
|
|
53
|
+
* button looking dead.
|
|
54
|
+
*/
|
|
55
|
+
export type StartSource = 'auto' | 'manual';
|
|
56
|
+
/**
|
|
57
|
+
* Should a start be refused because one just threw?
|
|
58
|
+
*
|
|
59
|
+
* ★ Extracted and exported so the DECISION can be tested for real. This hook
|
|
60
|
+
* cannot be driven in the test runner — there is no `SpeechRecognition` and the
|
|
61
|
+
* render tests use `renderToStaticMarkup`, which runs no effects — so every
|
|
62
|
+
* other guard here asserts on source TEXT. Two such guards were silently
|
|
63
|
+
* no-ops earlier in this same piece of work. A pure function is the one part
|
|
64
|
+
* that can be checked by running it, so the arithmetic lives here rather than
|
|
65
|
+
* inline where only a grep could reach it.
|
|
66
|
+
*
|
|
67
|
+
* ★★ `now` is MONOTONIC (`performance.now()`), never `Date.now()`. Wall-clock
|
|
68
|
+
* time moves: an NTP correction, a timezone change or a device waking from
|
|
69
|
+
* sleep can jump it forwards or backwards by more than this window, which would
|
|
70
|
+
* either release the gate instantly or hold the microphone shut long past the
|
|
71
|
+
* two seconds it is allowed. `fetch.ts` already uses `performance.now()` for the
|
|
72
|
+
* same shape of short relative gate.
|
|
73
|
+
*
|
|
74
|
+
* ★★ And the "never failed" sentinel is -Infinity, NOT 0 — because
|
|
75
|
+
* `performance.now()` starts at 0 at page load. With 0 as the sentinel, every
|
|
76
|
+
* call in the first two seconds of a page's life would satisfy
|
|
77
|
+
* `now - 0 < 2000` and be refused, so the microphone would be dead on arrival
|
|
78
|
+
* for anyone who reached for it immediately. -Infinity yields Infinity here and
|
|
79
|
+
* can never be inside the window.
|
|
80
|
+
*/
|
|
81
|
+
export declare function startIsCoolingDown(lastFailureAt: number, now: number): boolean;
|
|
34
82
|
export type VoiceInputError = 'not-allowed' | 'no-speech' | 'audio-capture' | 'network' | 'language-not-supported' | 'unknown';
|
|
35
83
|
export interface UseVoiceInputOptions {
|
|
36
84
|
/**
|
|
@@ -71,7 +119,12 @@ export interface UseVoiceInputResult {
|
|
|
71
119
|
* leaving the user to guess which language the browser rejected.
|
|
72
120
|
*/
|
|
73
121
|
language: string;
|
|
74
|
-
|
|
122
|
+
/**
|
|
123
|
+
* ★ `source` defaults to 'manual'. Only the AUTOMATIC retry — the caller that
|
|
124
|
+
* re-asks on every render — is subject to the post-failure cooldown; a person
|
|
125
|
+
* pressing the button always gets a real attempt.
|
|
126
|
+
*/
|
|
127
|
+
start: (source?: StartSource) => void;
|
|
75
128
|
stop: () => void;
|
|
76
129
|
/** Start if idle, stop if listening — what the mic button binds to. */
|
|
77
130
|
toggle: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVoiceInput.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/voice/useVoiceInput.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AA+DH,MAAM,MAAM,eAAe,GACzB,aAAa,GAAG,WAAW,GAAG,eAAe,GAAG,SAAS,GAAG,wBAAwB,GAAG,SAAS,CAAC;AA+BnG,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,8EAA8E;IAC9E,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;;OAMG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,eAAe,GAAG,IAAI,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"useVoiceInput.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/voice/useVoiceInput.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AA+DH;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAW5C;;;;;;;;;;GAUG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAE9E;AAED,MAAM,MAAM,eAAe,GACzB,aAAa,GAAG,WAAW,GAAG,eAAe,GAAG,SAAS,GAAG,wBAAwB,GAAG,SAAS,CAAC;AA+BnG,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,8EAA8E;IAC9E,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;;OAMG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,eAAe,GAAG,IAAI,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;IACtC,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,uEAAuE;IACvE,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,wBAAgB,aAAa,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,oBAAoB,GAAG,mBAAmB,CAmO5G"}
|
|
@@ -17,7 +17,11 @@ function o() {
|
|
|
17
17
|
let e = window;
|
|
18
18
|
return e.SpeechRecognition ?? e.webkitSpeechRecognition ?? null;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
var s = 2e3, c = 2;
|
|
21
|
+
function l(e, t) {
|
|
22
|
+
return t - e < s;
|
|
23
|
+
}
|
|
24
|
+
function u(e) {
|
|
21
25
|
switch (e) {
|
|
22
26
|
case "not-allowed":
|
|
23
27
|
case "service-not-allowed": return "not-allowed";
|
|
@@ -28,73 +32,73 @@ function s(e) {
|
|
|
28
32
|
default: return "unknown";
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
|
-
function
|
|
32
|
-
let { locale:
|
|
35
|
+
function d({ onFinalize: s, language: d }) {
|
|
36
|
+
let { locale: f } = e(), [p, m] = i(!1), [h, g] = i(!1), [_, v] = i(""), [y, b] = i(null), x = r(null), S = r(0), C = r(-Infinity), w = r(0), T = r(s);
|
|
33
37
|
n(() => {
|
|
34
|
-
|
|
35
|
-
}, [
|
|
36
|
-
let
|
|
38
|
+
T.current = s;
|
|
39
|
+
}, [s]);
|
|
40
|
+
let E = o() !== null, D = d ?? a[f] ?? "en-US";
|
|
37
41
|
n(() => () => {
|
|
38
|
-
|
|
42
|
+
x.current?.abort(), x.current = null;
|
|
39
43
|
}, []);
|
|
40
|
-
let
|
|
41
|
-
let
|
|
42
|
-
if (!
|
|
43
|
-
let
|
|
44
|
-
|
|
45
|
-
let
|
|
46
|
-
|
|
47
|
-
if (
|
|
48
|
-
let t = "",
|
|
49
|
-
for (let
|
|
50
|
-
let i = e.results[
|
|
51
|
-
i.isFinal ? t += a :
|
|
44
|
+
let O = t((e = "manual") => {
|
|
45
|
+
let t = o();
|
|
46
|
+
if (!t || x.current || e === "auto" && l(C.current, performance.now())) return;
|
|
47
|
+
let n = new t();
|
|
48
|
+
n.continuous = !0, n.interimResults = !0, n.lang = D;
|
|
49
|
+
let r = S.current;
|
|
50
|
+
n.onresult = (e) => {
|
|
51
|
+
if (r !== S.current) return;
|
|
52
|
+
let t = "", n = "";
|
|
53
|
+
for (let r = e.resultIndex; r < e.results.length; r += 1) {
|
|
54
|
+
let i = e.results[r], a = i[0]?.transcript ?? "";
|
|
55
|
+
i.isFinal ? t += a : n += a;
|
|
52
56
|
}
|
|
53
|
-
t.trim() &&
|
|
54
|
-
},
|
|
55
|
-
if (
|
|
56
|
-
let t =
|
|
57
|
-
t !== "no-speech" &&
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
},
|
|
57
|
+
t.trim() && T.current(t.trim()), v(n.trim());
|
|
58
|
+
}, n.onerror = (e) => {
|
|
59
|
+
if (r !== S.current) return;
|
|
60
|
+
let t = u(e.error);
|
|
61
|
+
t !== "no-speech" && b(t);
|
|
62
|
+
}, n.onend = () => {
|
|
63
|
+
r === S.current && (x.current = null, g(!1), m(!1), v(""));
|
|
64
|
+
}, n.onstart = () => {
|
|
65
|
+
r === S.current && (g(!1), m(!0));
|
|
66
|
+
}, g(!0);
|
|
63
67
|
try {
|
|
64
|
-
|
|
68
|
+
n.start();
|
|
65
69
|
} catch {
|
|
66
|
-
|
|
70
|
+
C.current = performance.now(), w.current += 1, w.current >= c && b("unknown"), x.current = null, g(!1), m(!1);
|
|
67
71
|
return;
|
|
68
72
|
}
|
|
69
|
-
|
|
70
|
-
}, [
|
|
71
|
-
let e =
|
|
72
|
-
|
|
73
|
-
}, []),
|
|
73
|
+
x.current = n, w.current = 0, b(null), v("");
|
|
74
|
+
}, [D]), k = t(() => {
|
|
75
|
+
let e = x.current;
|
|
76
|
+
x.current = null, S.current += 1, e?.stop(), g(!1), m(!1), v("");
|
|
77
|
+
}, []), A = r(D);
|
|
74
78
|
n(() => {
|
|
75
|
-
|
|
76
|
-
}, [
|
|
77
|
-
let
|
|
78
|
-
|
|
79
|
+
A.current !== D && (A.current = D, k(), b(null));
|
|
80
|
+
}, [D, k]);
|
|
81
|
+
let j = t(() => {
|
|
82
|
+
p || h ? k() : O();
|
|
79
83
|
}, [
|
|
80
|
-
d,
|
|
81
84
|
p,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
+
h,
|
|
86
|
+
O,
|
|
87
|
+
k
|
|
88
|
+
]), M = t(() => b(null), []);
|
|
85
89
|
return {
|
|
86
|
-
isSupported:
|
|
87
|
-
isListening:
|
|
88
|
-
isStarting:
|
|
89
|
-
isActive:
|
|
90
|
-
interim:
|
|
91
|
-
error:
|
|
92
|
-
language:
|
|
93
|
-
start:
|
|
94
|
-
stop:
|
|
95
|
-
toggle:
|
|
96
|
-
clearError:
|
|
90
|
+
isSupported: E,
|
|
91
|
+
isListening: p,
|
|
92
|
+
isStarting: h,
|
|
93
|
+
isActive: p || h,
|
|
94
|
+
interim: _,
|
|
95
|
+
error: y,
|
|
96
|
+
language: D,
|
|
97
|
+
start: O,
|
|
98
|
+
stop: k,
|
|
99
|
+
toggle: j,
|
|
100
|
+
clearError: M
|
|
97
101
|
};
|
|
98
102
|
}
|
|
99
103
|
//#endregion
|
|
100
|
-
export {
|
|
104
|
+
export { s as START_RETRY_COOLDOWN_MS, l as startIsCoolingDown, d as useVoiceInput };
|
package/dist/shared-assistant.js
CHANGED
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AssistantProductProvider as
|
|
3
|
-
import { AssistantI18nProvider as
|
|
4
|
-
import { copyToClipboard as
|
|
5
|
-
import { AssistantMarkdownImage as
|
|
6
|
-
import { AssistantMarkdownRenderer as
|
|
7
|
-
import { classifyQuotaError as
|
|
8
|
-
import { buildSandboxContextInput as
|
|
9
|
-
import { CHECK_AI_CREDITS as
|
|
10
|
-
import { ASSISTANT_MODE_FALLBACK_LABELS as
|
|
11
|
-
import { PRODUCT_ASSISTANT_MODE_ID_MAX_LENGTH as
|
|
12
|
-
import { ASSISTANT_API_AUTH_STRATEGY as
|
|
13
|
-
import { getCapability as
|
|
14
|
-
import { MAX_INLINE_IMAGE_BASE64_BYTES as
|
|
15
|
-
import { abortAssistantTurn as
|
|
16
|
-
import { AssistantRuntimeManager as
|
|
17
|
-
import { buildProgress as
|
|
18
|
-
import { createSandboxAssistantTransport as
|
|
19
|
-
import { useSandboxAssistantTransport as
|
|
20
|
-
import { BUILT_IN_MODE_CAPABILITIES as
|
|
21
|
-
import { DEFAULT_STREAM_BUDGET_MS as
|
|
22
|
-
import { chatTurns as
|
|
23
|
-
import { browserSpeechEngine as
|
|
24
|
-
import { HOSTED_TTS_TIER as
|
|
25
|
-
import { HOSTED_DISABLE_MS as
|
|
26
|
-
import { createHostedTtsEngine as
|
|
27
|
-
import { HOSTED_VOICE_RANK as
|
|
28
|
-
import { createRoutingSpeechEngine as
|
|
29
|
-
import { configureSpeechEngine as
|
|
30
|
-
import { micIsInterrupt as
|
|
31
|
-
import { PHRASE_ROTATE_MS as
|
|
32
|
-
import { VOICE_MUTED_LABEL as
|
|
33
|
-
import { IDLE_ROTATION_CLOCK as
|
|
34
|
-
import { ENDPOINT_GRACE_MS as
|
|
35
|
-
import { buildContinuedFromVoiceNote as
|
|
36
|
-
import { DEFAULT_SPEAKABLE_LABELS as
|
|
37
|
-
import { PREVIEW_LANGUAGES as
|
|
38
|
-
import { MINI_CAPTION_BUDGET as
|
|
39
|
-
import { POLL_FAST_MS as
|
|
40
|
-
import { toCaptionText as
|
|
41
|
-
import { ASSISTANT_LANGUAGES as
|
|
42
|
-
import { replyFollowsInput as
|
|
43
|
-
import { findPendingWrite as
|
|
44
|
-
import { BOILERPLATE_PAGE_SHARE as
|
|
45
|
-
import { ATTACHMENT_ACCEPT as
|
|
46
|
-
import { ATTACHMENT_SOURCES as
|
|
47
|
-
import { ASSISTANT_I18N_COMPUTED_COPY as
|
|
48
|
-
import { ADMIN_MODE_ACCESS_WAIT_MS as
|
|
49
|
-
import { buildBoundedAttachmentTurn as
|
|
50
|
-
import { LEGACY_WRITE_CONSENT_KEY as
|
|
51
|
-
import { SPOKEN_LABEL_LANGUAGES as
|
|
52
|
-
import { detectScriptLocale as
|
|
53
|
-
import { IDLE_PLAYBACK as
|
|
54
|
-
import { mergePersistedAssistantState as
|
|
55
|
-
import { isTurnInFlight as
|
|
56
|
-
import { isLegacyFiller as
|
|
57
|
-
import { getAssistantDisplayContent as
|
|
58
|
-
import { elapsedSince as
|
|
59
|
-
import { buildAssistantProgress as
|
|
60
|
-
import { AssistantToolActivity as
|
|
61
|
-
import { countSpokenTurns as
|
|
62
|
-
import { AssistantAvatar as
|
|
63
|
-
import { AssistantSpeechProvider as
|
|
64
|
-
import { useVoiceSession as
|
|
65
|
-
import { getActorId as
|
|
66
|
-
import { SANDBOX_READY_TTL_MS as
|
|
67
|
-
import { AssistantAutoSpeakToggle as
|
|
68
|
-
import { AssistantMessageAttachments as
|
|
69
|
-
import { AssistantPendingWriteCard as
|
|
70
|
-
import { AssistantLanguageMenu as
|
|
71
|
-
import { AssistantReplyLanguageSelector as
|
|
72
|
-
import { AssistantSpeakButton as
|
|
73
|
-
import { AssistantSpokenTurnsNotice as
|
|
74
|
-
import { AssistantConnectSourceProvider as
|
|
75
|
-
import { AssistantConnectSourceItem as
|
|
76
|
-
import { ASSISTANT_OVERLAY_ATTR as
|
|
77
|
-
import { useDropdownEscape as
|
|
78
|
-
import { AssistantAttachmentButton as
|
|
79
|
-
import { AssistantAttachmentChips as
|
|
80
|
-
import { AssistantPreviewProvider as
|
|
81
|
-
import { IDLE_PREVIEW_STATE as
|
|
82
|
-
import { IDLE_PREVIEW as
|
|
83
|
-
import { createRunIdentityCache as
|
|
84
|
-
import { IDLE_ACTIVE_TAB as
|
|
85
|
-
import { AssistantStepRail as
|
|
86
|
-
import { AssistantEntityPreview as
|
|
87
|
-
import { useOverlayFocus as
|
|
88
|
-
import { REDUCED_MOTION_ATTRIBUTE as
|
|
89
|
-
import { useAssistantPreviewBridge as
|
|
90
|
-
import { HostedPreviewBridgeContext as
|
|
91
|
-
import { AssistantPreviewBridgeHost as
|
|
92
|
-
import { AssistantPreviewOverlay as
|
|
93
|
-
import { AssistantLanguageSelector as
|
|
94
|
-
import { ASSISTANT_MODE_META as
|
|
95
|
-
import { AssistantVoiceButton as
|
|
96
|
-
import { AUTO_VOICE as
|
|
97
|
-
import { AssistantVoiceOrb as
|
|
98
|
-
import { AssistantVoiceSessionButton as
|
|
99
|
-
import { CAPTION_SCROLL_ATTR as
|
|
100
|
-
import { VoiceConversationView as
|
|
101
|
-
import { VoiceWaveform as
|
|
102
|
-
import { VoiceStatusLine as
|
|
103
|
-
import { VoiceMiniController as
|
|
104
|
-
import { VoiceStage as
|
|
105
|
-
import { VoiceTranscriptDrawer as
|
|
106
|
-
import { downloadFile as
|
|
107
|
-
import { AssistantMoreMenu as
|
|
108
|
-
import { AssistantHeader as
|
|
109
|
-
import { AssistantConversationList as
|
|
110
|
-
import { AssistantEmptyState as
|
|
111
|
-
import { AssistantTurnActivity as
|
|
112
|
-
import { AssistantMessageItem as
|
|
113
|
-
import { AssistantMessageList as
|
|
114
|
-
import { AssistantVoiceSession as
|
|
115
|
-
import { useAssistantApiAccess as
|
|
116
|
-
import { useConversationTurns as
|
|
117
|
-
import { isMultimodalBodyRejection as
|
|
118
|
-
import { aiCreditsUpdatedEventName as
|
|
119
|
-
import { useWorkspaceWriteAccess as
|
|
120
|
-
import { extractDocumentText as
|
|
121
|
-
import { useAssistantAttachments as
|
|
122
|
-
import { AssistantComposer as
|
|
123
|
-
import { isProdRuntime as
|
|
124
|
-
import { useAssistantHeartbeat as
|
|
125
|
-
import { useAssistantKeyboardShortcuts as
|
|
126
|
-
import { AssistantApiCallsConsentDialog as
|
|
127
|
-
import { AssistantChatArea as
|
|
128
|
-
import { AIAssistantPanel as
|
|
129
|
-
import { ASSISTANT_BOTTOM_CHROME_CLEARANCE as
|
|
130
|
-
import { AssistantOverlay as
|
|
131
|
-
export { Ei as ADMIN_MODE_ACCESS_WAIT_MS, Cs as AIAssistantPanel, q as ASSISTANT_API_AUTH_STRATEGY, ws as ASSISTANT_BOTTOM_CHROME_CLEARANCE, Ts as ASSISTANT_DIALOG_SELECTOR, Es as ASSISTANT_DOCKED_DESKTOP_CLASS, Ds as ASSISTANT_DOCK_WIDTH_PX, Os as ASSISTANT_DOCK_WIDTH_VAR, ks as ASSISTANT_FLOATING_DESKTOP_CLASS, xi as ASSISTANT_I18N_COMPUTED_COPY, Si as ASSISTANT_I18N_LITERAL_COPY, Ci as ASSISTANT_I18N_MANIFEST, sr as ASSISTANT_LANGUAGES, L as ASSISTANT_MODE_FALLBACK_LABELS, R as ASSISTANT_MODE_IDS, Mo as ASSISTANT_MODE_META, Fa as ASSISTANT_OVERLAY_ATTR, As as ASSISTANT_OVERLAY_DEFAULT_TOP_PX, js as ASSISTANT_OVERLAY_DESKTOP_QUERY, Ms as ASSISTANT_OVERLAY_TOP_VAR, Ia as ASSISTANT_PANEL_ATTR, Ns as ASSISTANT_SHEET_BASE_CLASS, Ps as ASSISTANT_SHEET_COMPACT_CLASS, Fs as ASSISTANT_SHEET_EXPANDED_CLASS, Is as ASSISTANT_TOGGLE_SHORTCUT_LABEL, Fr as ATTACHMENT_ACCEPT, vi as ATTACHMENT_SOURCES, Lo as AUTO_VOICE, xs as AssistantApiCallsConsentDialog, Ga as AssistantAttachmentButton, Ka as AssistantAttachmentChips, Ta as AssistantAutoSpeakToggle, ha as AssistantAvatar, Ss as AssistantChatArea, _s as AssistantComposer, Pa as AssistantConnectSourceItem, Ma as AssistantConnectSourceProvider, es as AssistantConversationList, ts as AssistantEmptyState, _o as AssistantEntityPreview, $o as AssistantHeader, s as AssistantI18nProvider, Oa as AssistantLanguageMenu, Ao as AssistantLanguageSelector, f as AssistantMarkdownImage, h as AssistantMarkdownRenderer, Ea as AssistantMessageAttachments, is as AssistantMessageItem, as as AssistantMessageList, No as AssistantModeSelector, Qo as AssistantMoreMenu, g as AssistantNavigateProvider, Ys as AssistantOverlay, Xs as AssistantOverlayProvider, Da as AssistantPendingWriteCard, Oo as AssistantPreviewBridgeHost, ko as AssistantPreviewOverlay, qa as AssistantPreviewProvider, t as AssistantProductProvider, ka as AssistantReplyLanguageSelector, Pe as AssistantRuntimeManager, Aa as AssistantSpeakButton, ga as AssistantSpeechProvider, ja as AssistantSpokenTurnsNotice, go as AssistantStepRail, da as AssistantToolActivity, ns as AssistantTurnActivity, Io as AssistantVoiceButton, zo as AssistantVoiceOrb, Ro as AssistantVoiceSelector, os as AssistantVoiceSession, Bo as AssistantVoiceSessionButton, Ir as AttachmentRejectedError, hr as BOILERPLATE_PAGE_SHARE, qe as BUILT_IN_MODE_CAPABILITIES, Vo as CAPTION_SCROLL_ATTR, O as CHECK_AI_CREDITS, k as CREATE_SANDBOX, Lr as DEFAULT_INLINE_LIMITS, Bn as DEFAULT_SPEAKABLE_LABELS, cr as DEFAULT_SPEECH_RATE, tt as DEFAULT_STREAM_BUDGET_MS, Tn as ENDPOINT_GRACE_MS, A as EXTEND_SANDBOX_TTL, jo as FOLLOW_APP_LOCALE, j as GET_ACTIVE_SANDBOXES, M as GET_SANDBOX, yt as HOSTED_DISABLE_MS, bt as HOSTED_TTS_MAX_CHARS, ht as HOSTED_TTS_TIER, gt as HOSTED_VOICES, Pt as HOSTED_VOICE_RANK, To as HostedPreviewBridgeContext, co as IDLE_ACTIVE_TAB, Ui as IDLE_PLAYBACK, $a as IDLE_PREVIEW, Ya as IDLE_PREVIEW_STATE, bn as IDLE_ROTATION_CLOCK, nt as INCOMPLETE_TURN_NOTICES, En as INITIAL_SESSION, Rr as INLINE_IMAGE_MAX_DIM, zr as INLINE_IMAGE_QUALITY, Dn as INTERRUPT_MAX_MS, On as INTERRUPT_MIN_MS, Mi as LEGACY_WRITE_CONSENT_KEY, Je as MAX_ASSISTANT_STREAM_BUDGET_MS, Br as MAX_ATTACHMENTS, gr as MAX_BOILERPLATE_LINE_CHARS, Vr as MAX_CONFIGURABLE_INLINE_CHARS, _r as MAX_EXTRACTED_CHARS, Hr as MAX_FILE_BYTES, Ur as MAX_INLINE_CHARS_PER_FILE, Wr as MAX_INLINE_CHARS_TOTAL, ie as MAX_INLINE_IMAGE_BASE64_BYTES, Gr as MAX_INLINE_IMAGE_BASE64_CHARS, Kr as MAX_INLINE_IMAGE_PARTS, qr as MAX_INLINE_TURN_BODY_BYTES, vr as MAX_PDF_PAGES_SCANNED, ae as MAX_REQUEST_BODY_BYTES, Vn as MAX_SPEAKABLE_CHARS, Hn as MAX_SPOKEN_TABLE_ROWS, Jr as MAX_TURN_BODY_BYTES, Qn as MINI_CAPTION_BUDGET, yr as MIN_PAGE_TEXT_CHARS, br as MIN_TEXT_PAGE_SHARE, eo as NO_OWNER, La as NO_PANEL_OVERLAY, cn as PHRASE_ROTATE_MS, er as POLL_FAST_MS, tr as POLL_FAST_UNTIL_MS, nr as POLL_SLOW_MS, rr as POLL_STEADY_MS, ir as POLL_STEADY_UNTIL_MS, Xn as PREVIEW_LANGUAGES, V as PRODUCT_ASSISTANT_MODE_ID_MAX_LENGTH, H as PRODUCT_ASSISTANT_MODE_ID_PATTERN, Yr as PROMPT_ENVELOPE_RESERVE_BYTES, Xr as PROVIDER_READABLE_FILE_MEDIA_TYPES, N as PROXY_SANDBOX_REQUEST, yo as REDUCED_MOTION_ATTRIBUTE, bo as REDUCED_MOTION_QUERY, P as REPORT_AI_TOKEN_USAGE, oe as REQUEST_TOO_LARGE_REFUSAL, Sa as SANDBOX_READY_TTL_MS, kn as SILENCE_SUBMIT_MS, xt as SPEAKING_RATE_MAX, St as SPEAKING_RATE_MAX_STREAMING, Ct as SPEAKING_RATE_MAX_SYNC, wt as SPEAKING_RATE_MIN, Un as SPEECH_CHUNK_CHARS, Wn as SPEECH_CHUNK_CJK_CHARS, Ft as SPEECH_LANG, zi as SPOKEN_LABEL_LANGUAGES, ln as STAGE_COPY, F as STOP_ASSISTANT_SANDBOX, rt as STREAM_BUDGET_MS, Ni as TAKE_ACTION_ENGLISH, un as THINKING_PHRASES, Zr as TURN_BODY_HEADROOM_BYTES, rs as TurnActivityLine, Ye as UNAVAILABLE_MODE_REFUSAL, Xe as UNDECLARED_MODE_CAPABILITIES, It as VOICE_LIST_TIMEOUT_MS, hn as VOICE_MUTED_LABEL, gn as VOICE_THINKING_LABEL, Ho as VoiceCaption, Uo as VoiceConversationView, qo as VoiceMiniController, Jo as VoiceStage, Go as VoiceStatusLine, Ko as VoiceStatusText, Yo as VoiceTranscriptDrawer, Wo as VoiceWaveform, I as WAIT_FOR_SANDBOX_RUNNING, se as abortAssistantTurn, Ls as aboveAssistantBottomChrome, Ra as activePanelOverlay, Ze as adminOnlyModeSendRefusal, Di as adminOnlyModeSendRefusalAfterAccess, xn as advanceRotationClock, ds as aiCreditsUpdatedEventName, to as applyPreviewEvent, ce as approvePendingWrite, wi as assistantI18nSeedCopy, z as assistantModeFallbackLabel, Ti as assistantModeI18nCopy, Po as assistantModeMeta, Rs as assistantOverlayClassName, zs as assistantOverlayEscapeAction, Bs as assistantOverlayKeys, za as assistantPanelOwnsEscape, Vs as assistantQuotaKindOf, _ as assistantRoutePath, c as assistantTranslationKey, v as assistantUrlTransform, yi as availableAttachmentSources, Tt as base64ToBytes, y as browserShouldHandle, mt as browserSpeechEngine, ua as buildAssistantProgress, le as buildAssistantSandboxEnv, Qr as buildAttachmentPromptBlock, ji as buildBoundedAttachmentTurn, Ln as buildContinuedFromVoiceNote, Fe as buildProgress, ue as buildPromptGatewayRequest, $r as buildPromptParts, de as buildPromptRequestBody, ei as buildPromptWithAttachments, Et as buildRequest, E as buildSandboxContextInput, Rn as buildVoiceTranscriptMarkdown, U as builtInModeExtendedBy, st as chatTurns, fe as checkAssistantAiCredits, Gn as chunkForSpeech, b as classifyAssistantHref, ti as classifyAttachment, Dt as classifyHttpFailure, S as classifyQuotaError, xr as columnLetterToIndex, _n as composeVoiceStatus, Yt as configureSpeechEngine, Kn as containsCjk, d as copyToClipboard, ni as countInlineImageCandidates, ri as countInlinedImageParts, pa as countSpokenTurns, Oi as createAdminModeAccessGate, Hs as createAssistantNavigate, no as createAssistantPreviewSurface, pe as createAssistantSandbox, me as createAssistantSession, Mt as createHostedTtsEngine, Ca as createReadinessTracker, Jt as createRoutingSpeechEngine, oo as createRunIdentityCache, Ge as createSandboxAssistantTransport, Xt as createSpeechEngines, ro as currentPreviewOwner, W as declareAssistantMode, Ot as decodeAudioResponse, Sr as decodeXmlEntities, C as describeQuotaError, ii as detectDocumentFormat, Vi as detectScriptLocale, bi as deviceHasCamera, kt as disableDurationMs, fs as dispatchAssistantQuotaExhausted, Cr as docxXmlToText, he as downloadAssistantArtifact, Xo as downloadFile, aa as elapsedSince, Ba as escapeDismisses, ai as estimateTurnBodyBytes, D as executeSandboxGraphQL, Zo as exportConversation, ge as extendAssistantSandboxTTL, hs as extractDocumentText, lr as findAssistantLanguage, Qe as findAssistantModeConfig, _e as findExistingSandbox, pr as findPendingWrite, wr as fitPdfPages, Va as focusIsInsidePanel, oi as formatBytes, Tr as formatPageRanges, ve as forwardsUserTokensToSandbox, ya as getActorId, ye as getAssistantArtifacts, ia as getAssistantDisplayContent, Ie as getAssistantMedia, be as getAssistantMessages, xe as getAssistantSession, Se as getAssistantStreamAccess, Le as getAssistantText, si as getAttachmentSendBlocker, ee as getCapability, ci as getExtension, J as getImageForMode, Y as getImageTagForMode, ba as getOrganizationId, Re as getRawMessageCreatedAt, X as getResourcesForMode, Z as getSandboxImageRegistry, li as getSendableAttachments, Zt as getSpeechEngine, ze as getToolProgress, xa as getWorkspaceId, ct as groupBySession, lt as groupConsecutiveBySession, ui as hasAttachmentWorkInFlight, _t as hostedLocaleFor, vt as hostedSupportsLanguage, p as imageHostLabel, it as incompleteTurnNotice, G as isAssistantModeId, Us as isAssistantToggleShortcut, Xa as isBlankProse, B as isBuiltInAssistantMode, An as isCapturing, jn as isEcho, Lt as isHostedVoice, ea as isLegacyFiller, ta as isLegacyStopped, Er as isMostlyImagePages, ls as isMultimodalBodyRejection, vs as isProdRuntime, K as isProductAssistantModeId, di as isProviderReadableFilePart, w as isQuotaExhaustedError, Be as isReapedSandboxConnectionError, wa as isRecentlyVerified, Ve as isRecoverable, us as isRecoverableAssistantError, m as isRemoteImageSrc, Za as isRunningStatus, Wi as isSpeakingMessage, Rt as isSpeechBlocked, na as isStageCopy, Mn as isSubmittable, Zi as isTurnInFlight, te as isUnknownFieldError, ut as isVoiceTurn, Pi as isWriteModeAcknowledged, Dr as joinSheets, zt as languageDisplayName, fi as largestInlineCharsPerFile, He as mapSessionToHistory, ne as markSupported, re as markUnsupported, Ue as mergeMessagesById, Ji as mergePersistedAssistantState, tn as micIsInterrupt, Ce as modeRequiresConfirmWrites, oa as msUntilNextPhrase, lo as nextActiveTab, Ws as nextAssistantOpenState, Fo as nextModeIndex, Ha as nextPanelOverlays, Qa as nextPreviewEvents, Bt as normalizeLangTag, ps as notifyAiCreditsUpdated, Nn as orbMode, Or as pageMarker, Eo as panelOwnedPreviewBridge, Ua as panelOwnsEscape, mr as parseConfirmationRefusal, pi as parseDataUrl, kr as parseSharedStrings, fa as parseToolActivity, Ar as parseWorkbookSheets, jr as pdfTextItemsToPage, uo as pinActiveTab, Qi as planAbandonedTurn, Pn as planReplyConsumption, $i as planTurnAbort, ar as pollDelayMs, Vt as primaryLanguageSubtag, we as promptGatewayRequestBytes, Gs as publishedAssistantDockWidth, Gi as publishedChunks, T as quotaExhaustedEventName, Ks as readAssistantOverlayFlag, xo as readReducedMotion, Qt as readSpeechEngineConfig, Te as releaseSupersededAssistantSandboxes, dr as replyFollowsInput, Ee as reportAssistantAiTokenUsage, qs as requestedAssistantOpenState, Ki as requiresCancel, $t as resetSpeechEngine, Yi as resolveActiveModeSandbox, mi as resolveAssistantInlineLimits, ur as resolveAssistantLanguage, $e as resolveAssistantModeCapabilities, ki as resolveAssistantSendModeAfterAccess, fr as resolveLanguagePair, n as resolveModeConfig, Q as resolveSandboxAssistantMode, Hi as resolveSpeechLocale, Fi as restoreAcknowledgedWriteModes, Nt as retryDelayMs, Sn as rotationElapsedMs, io as runBelongsTo, so as runIdentities, ao as sameOwner, $ as sandboxBaseModeFor, We as sanitize, De as selectExistingAssistantSandbox, Oe as selectSupersededAssistantSandboxes, Ht as selectVoiceForLocale, ke as sendAssistantPromptAsync, Ae as sendHeartbeat, Mr as sheetXmlToRows, At as shouldDisableEngine, fo as shouldPinOnMove, po as shouldPinOnSelect, $n as showPreviousChunk, nn as showsAssistantCaption, rn as showsUserCaption, qn as speakableEmail, Ut as speechGate, Bi as speechLabelsFor, Wt as speechLangForLocale, qi as speechPlaybackReducer, jt as splitForVendor, Jn as splitTableRow, Fn as spokenSoFar, ma as spokenTurnText, dn as stageText, sa as startPhraseTicker, Cn as startRotationTicker, fn as statusStageCopy, mo as stepsFromToolActivity, je as stopReapedAssistantSandbox, at as streamBudgetMs, ra as stripLegacyFillerPrefix, So as subscribeReducedMotion, en as subscribeSpeechEngine, Nr as summarisePageText, wn as syncRotationClock, ho as tabForArrowKey, pn as thinkingPhrase, mn as thinkingPhraseEntry, or as toCaptionText, hi as toMessageAttachment, Yn as toSpeakableText, gi as truncateForInline, Pr as truncatePagesForInline, ca as turnActivityCopy, la as turnActivityStage, et as unofferedModeSendRefusal, Ai as unofferedModeSendRefusalAfterAccess, ss as useAssistantApiAccess, gs as useAssistantAttachments, Na as useAssistantConnectSource, Zs as useAssistantDockWidth, ys as useAssistantHeartbeat, l as useAssistantI18nNamespace, bs as useAssistantKeyboardShortcuts, x as useAssistantNavigate, Qs as useAssistantOverlayOrNull, r as useAssistantPageLabel, Ja as useAssistantPreview, wo as useAssistantPreviewBridge, i as useAssistantProduct, a as useAssistantProductOrNull, $s as useAssistantQuotaExhausted, _a as useAssistantSpeech, o as useAssistantStorageFolders, Xi as useAssistantStore, u as useAssistantTr, cs as useConversationTurns, Wa as useDropdownEscape, Do as useHostedAssistantPreviewBridge, vo as useOverlayFocus, Co as usePrefersReducedMotion, Ke as useSandboxAssistantTransport, e as useVoiceInput, va as useVoiceSession, ms as useWorkspaceWriteAccess, _i as validateFile, Gt as voiceAvailability, dt as voiceMarker, Zn as voicePreviewText, Kt as voiceQualityRank, ft as voiceSessionIdOf, In as voiceSessionReducer, an as voiceStageState, vn as voiceStatusParts, yn as voiceStatusSuffix, zn as voiceTranscriptFilename, pt as voiceTurnsOnly, qt as voicesForLocale, Me as waitForAssistantServiceReady, Ne as waitForSandboxRunning, on as waveformIsActive, sn as waveformIsSettled, ot as withIncompleteTurnNotice, Ii as withWriteModeAcknowledged, Js as writeAssistantOverlayFlag, Li as writeModeConsentCopy, Ri as writeModeSendRefusal };
|
|
1
|
+
import { START_RETRY_COOLDOWN_MS as e, startIsCoolingDown as t, useVoiceInput as n } from "./shared/assistant/voice/useVoiceInput.js";
|
|
2
|
+
import { AssistantProductProvider as r, resolveModeConfig as i, useAssistantPageLabel as a, useAssistantProduct as o, useAssistantProductOrNull as s, useAssistantStorageFolders as c } from "./shared/assistant/product.js";
|
|
3
|
+
import { AssistantI18nProvider as l, assistantTranslationKey as u, useAssistantI18nNamespace as d, useAssistantTr as f } from "./shared/assistant/i18n.js";
|
|
4
|
+
import { copyToClipboard as p } from "./shared/assistant/clipboard.js";
|
|
5
|
+
import { AssistantMarkdownImage as m, imageHostLabel as h, isRemoteImageSrc as g } from "./shared/assistant/ui/AssistantMarkdownImage.js";
|
|
6
|
+
import { AssistantMarkdownRenderer as _, AssistantNavigateProvider as v, assistantRoutePath as y, assistantUrlTransform as b, browserShouldHandle as x, classifyAssistantHref as S, useAssistantNavigate as C } from "./shared/assistant/ui/AssistantMarkdownRenderer.js";
|
|
7
|
+
import { classifyQuotaError as w, describeQuotaError as T, isQuotaExhaustedError as E, quotaExhaustedEventName as D } from "./shared/assistant/quota.js";
|
|
8
|
+
import { buildSandboxContextInput as O, executeSandboxGraphQL as k } from "./shared/assistant/gatewayClient.js";
|
|
9
|
+
import { CHECK_AI_CREDITS as A, CREATE_SANDBOX as j, EXTEND_SANDBOX_TTL as M, GET_ACTIVE_SANDBOXES as N, GET_SANDBOX as P, PROXY_SANDBOX_REQUEST as F, REPORT_AI_TOKEN_USAGE as I, STOP_ASSISTANT_SANDBOX as L, WAIT_FOR_SANDBOX_RUNNING as R } from "./shared/assistant/operations.js";
|
|
10
|
+
import { ASSISTANT_MODE_FALLBACK_LABELS as z, ASSISTANT_MODE_IDS as B, assistantModeFallbackLabel as V, isBuiltInAssistantMode as H } from "./shared/assistant/modeCopy.js";
|
|
11
|
+
import { PRODUCT_ASSISTANT_MODE_ID_MAX_LENGTH as U, PRODUCT_ASSISTANT_MODE_ID_PATTERN as W, builtInModeExtendedBy as G, declareAssistantMode as K, isAssistantModeId as q, isProductAssistantModeId as J } from "./shared/assistant/modeIds.js";
|
|
12
|
+
import { ASSISTANT_API_AUTH_STRATEGY as Y, getImageForMode as X, getImageTagForMode as Z, getResourcesForMode as Q, getSandboxImageRegistry as $, resolveSandboxAssistantMode as ee, sandboxBaseModeFor as te } from "./shared/assistant/images.js";
|
|
13
|
+
import { getCapability as ne, isUnknownFieldError as re, markSupported as ie, markUnsupported as ae } from "./shared/assistant/capabilities.js";
|
|
14
|
+
import { MAX_INLINE_IMAGE_BASE64_BYTES as oe, MAX_REQUEST_BODY_BYTES as se, REQUEST_TOO_LARGE_REFUSAL as ce } from "./shared/assistant/gatewayLimits.js";
|
|
15
|
+
import { abortAssistantTurn as le, approvePendingWrite as ue, buildAssistantSandboxEnv as de, buildPromptGatewayRequest as fe, buildPromptRequestBody as pe, checkAssistantAiCredits as me, createAssistantSandbox as he, createAssistantSession as ge, downloadAssistantArtifact as _e, extendAssistantSandboxTTL as ve, findExistingSandbox as ye, forwardsUserTokensToSandbox as be, getAssistantArtifacts as xe, getAssistantMessages as Se, getAssistantSession as Ce, getAssistantStreamAccess as we, modeRequiresConfirmWrites as Te, promptGatewayRequestBytes as Ee, releaseSupersededAssistantSandboxes as De, reportAssistantAiTokenUsage as Oe, selectExistingAssistantSandbox as ke, selectSupersededAssistantSandboxes as Ae, sendAssistantPromptAsync as je, sendHeartbeat as Me, stopReapedAssistantSandbox as Ne, waitForAssistantServiceReady as Pe, waitForSandboxRunning as Fe } from "./shared/assistant/api.js";
|
|
16
|
+
import { AssistantRuntimeManager as Ie } from "./shared/assistant/runtime.js";
|
|
17
|
+
import { buildProgress as Le, getAssistantMedia as Re, getAssistantText as ze, getRawMessageCreatedAt as Be, getToolProgress as Ve, isReapedSandboxConnectionError as He, isRecoverable as Ue, mapSessionToHistory as We, mergeMessagesById as Ge, sanitize as Ke } from "./shared/assistant/progress.js";
|
|
18
|
+
import { createSandboxAssistantTransport as qe } from "./shared/assistant/createSandboxAssistantTransport.js";
|
|
19
|
+
import { useSandboxAssistantTransport as Je } from "./shared/assistant/useSandboxAssistantTransport.js";
|
|
20
|
+
import { BUILT_IN_MODE_CAPABILITIES as Ye, MAX_ASSISTANT_STREAM_BUDGET_MS as Xe, UNAVAILABLE_MODE_REFUSAL as Ze, UNDECLARED_MODE_CAPABILITIES as Qe, adminOnlyModeSendRefusal as $e, findAssistantModeConfig as et, resolveAssistantModeCapabilities as tt, unofferedModeSendRefusal as nt } from "./shared/assistant/modeCapabilities.js";
|
|
21
|
+
import { DEFAULT_STREAM_BUDGET_MS as rt, INCOMPLETE_TURN_NOTICES as it, STREAM_BUDGET_MS as at, incompleteTurnNotice as ot, streamBudgetMs as st, withIncompleteTurnNotice as ct } from "./shared/assistant/streamBudget.js";
|
|
22
|
+
import { chatTurns as lt, groupBySession as ut, groupConsecutiveBySession as dt, isVoiceTurn as ft, voiceMarker as pt, voiceSessionIdOf as mt, voiceTurnsOnly as ht } from "./shared/assistant/voice/turnVisibility.js";
|
|
23
|
+
import { browserSpeechEngine as gt } from "./shared/assistant/speech/browserSpeechEngine.js";
|
|
24
|
+
import { HOSTED_TTS_TIER as _t, HOSTED_VOICES as vt, hostedLocaleFor as yt, hostedSupportsLanguage as bt } from "./shared/assistant/speech/hostedVoiceCatalogue.js";
|
|
25
|
+
import { HOSTED_DISABLE_MS as xt, HOSTED_TTS_MAX_CHARS as St, SPEAKING_RATE_MAX as Ct, SPEAKING_RATE_MAX_STREAMING as wt, SPEAKING_RATE_MAX_SYNC as Tt, SPEAKING_RATE_MIN as Et, base64ToBytes as Dt, buildRequest as Ot, classifyHttpFailure as kt, decodeAudioResponse as At, disableDurationMs as jt, shouldDisableEngine as Mt, splitForVendor as Nt } from "./shared/assistant/speech/hostedTtsProtocol.js";
|
|
26
|
+
import { createHostedTtsEngine as Pt, retryDelayMs as Ft } from "./shared/assistant/speech/hostedTtsSpeechEngine.js";
|
|
27
|
+
import { HOSTED_VOICE_RANK as It, SPEECH_LANG as Lt, VOICE_LIST_TIMEOUT_MS as Rt, isHostedVoice as zt, isSpeechBlocked as Bt, languageDisplayName as Vt, normalizeLangTag as Ht, primaryLanguageSubtag as Ut, selectVoiceForLocale as Wt, speechGate as Gt, speechLangForLocale as Kt, voiceAvailability as qt, voiceQualityRank as Jt, voicesForLocale as Yt } from "./shared/assistant/voice/speechVoices.js";
|
|
28
|
+
import { createRoutingSpeechEngine as Xt } from "./shared/assistant/speech/routingSpeechEngine.js";
|
|
29
|
+
import { configureSpeechEngine as Zt, createSpeechEngines as Qt, getSpeechEngine as $t, readSpeechEngineConfig as en, resetSpeechEngine as tn, subscribeSpeechEngine as nn } from "./shared/assistant/speech/createSpeechEngine.js";
|
|
30
|
+
import { micIsInterrupt as rn, showsAssistantCaption as an, showsUserCaption as on, voiceStageState as sn, waveformIsActive as cn, waveformIsSettled as ln } from "./shared/assistant/voice/voiceStageState.js";
|
|
31
|
+
import { PHRASE_ROTATE_MS as un, STAGE_COPY as dn, THINKING_PHRASES as fn, stageText as pn, statusStageCopy as mn, thinkingPhrase as hn, thinkingPhraseEntry as gn } from "./shared/assistant/stageCopy.js";
|
|
32
|
+
import { VOICE_MUTED_LABEL as _n, VOICE_THINKING_LABEL as vn, composeVoiceStatus as yn, voiceStatusParts as bn, voiceStatusSuffix as xn } from "./shared/assistant/voice/voiceStatus.js";
|
|
33
|
+
import { IDLE_ROTATION_CLOCK as Sn, advanceRotationClock as Cn, rotationElapsedMs as wn, startRotationTicker as Tn, syncRotationClock as En } from "./shared/assistant/voice/rotationClock.js";
|
|
34
|
+
import { ENDPOINT_GRACE_MS as Dn, INITIAL_SESSION as On, INTERRUPT_MAX_MS as kn, INTERRUPT_MIN_MS as An, SILENCE_SUBMIT_MS as jn, isCapturing as Mn, isEcho as Nn, isSubmittable as Pn, orbMode as Fn, planReplyConsumption as In, spokenSoFar as Ln, voiceSessionReducer as Rn } from "./shared/assistant/voice/voiceSession.js";
|
|
35
|
+
import { buildContinuedFromVoiceNote as zn, buildVoiceTranscriptMarkdown as Bn, voiceTranscriptFilename as Vn } from "./shared/assistant/voice/voiceTranscript.js";
|
|
36
|
+
import { DEFAULT_SPEAKABLE_LABELS as Hn, MAX_SPEAKABLE_CHARS as Un, MAX_SPOKEN_TABLE_ROWS as Wn, SPEECH_CHUNK_CHARS as Gn, SPEECH_CHUNK_CJK_CHARS as Kn, chunkForSpeech as qn, containsCjk as Jn, speakableEmail as Yn, splitTableRow as Xn, toSpeakableText as Zn } from "./shared/assistant/voice/speakableText.js";
|
|
37
|
+
import { PREVIEW_LANGUAGES as Qn, voicePreviewText as $n } from "./shared/assistant/voice/voicePreview.js";
|
|
38
|
+
import { MINI_CAPTION_BUDGET as er, showPreviousChunk as tr } from "./shared/assistant/voice/miniCaptionBudget.js";
|
|
39
|
+
import { POLL_FAST_MS as nr, POLL_FAST_UNTIL_MS as rr, POLL_SLOW_MS as ir, POLL_STEADY_MS as ar, POLL_STEADY_UNTIL_MS as or, pollDelayMs as sr } from "./shared/assistant/voice/assistantPollSchedule.js";
|
|
40
|
+
import { toCaptionText as cr } from "./shared/assistant/voice/captionText.js";
|
|
41
|
+
import { ASSISTANT_LANGUAGES as lr, DEFAULT_SPEECH_RATE as ur, findAssistantLanguage as dr, resolveAssistantLanguage as fr } from "./shared/assistant/voice/languages.js";
|
|
42
|
+
import { replyFollowsInput as pr, resolveLanguagePair as mr } from "./shared/assistant/voice/languagePair.js";
|
|
43
|
+
import { findPendingWrite as hr, parseConfirmationRefusal as gr } from "./shared/assistant/pendingWrite.js";
|
|
44
|
+
import { BOILERPLATE_PAGE_SHARE as _r, MAX_BOILERPLATE_LINE_CHARS as vr, MAX_EXTRACTED_CHARS as yr, MAX_PDF_PAGES_SCANNED as br, MIN_PAGE_TEXT_CHARS as xr, MIN_TEXT_PAGE_SHARE as Sr, columnLetterToIndex as Cr, decodeXmlEntities as wr, docxXmlToText as Tr, fitPdfPages as Er, formatPageRanges as Dr, isMostlyImagePages as Or, joinSheets as kr, pageMarker as Ar, parseSharedStrings as jr, parseWorkbookSheets as Mr, pdfTextItemsToPage as Nr, sheetXmlToRows as Pr, summarisePageText as Fr, truncatePagesForInline as Ir } from "./shared/assistant/documentText.js";
|
|
45
|
+
import { ATTACHMENT_ACCEPT as Lr, AttachmentRejectedError as Rr, DEFAULT_INLINE_LIMITS as zr, INLINE_IMAGE_MAX_DIM as Br, INLINE_IMAGE_QUALITY as Vr, MAX_ATTACHMENTS as Hr, MAX_CONFIGURABLE_INLINE_CHARS as Ur, MAX_FILE_BYTES as Wr, MAX_INLINE_CHARS_PER_FILE as Gr, MAX_INLINE_CHARS_TOTAL as Kr, MAX_INLINE_IMAGE_BASE64_CHARS as qr, MAX_INLINE_IMAGE_PARTS as Jr, MAX_INLINE_TURN_BODY_BYTES as Yr, MAX_TURN_BODY_BYTES as Xr, PROMPT_ENVELOPE_RESERVE_BYTES as Zr, PROVIDER_READABLE_FILE_MEDIA_TYPES as Qr, TURN_BODY_HEADROOM_BYTES as $r, buildAttachmentPromptBlock as ei, buildPromptParts as ti, buildPromptWithAttachments as ni, classifyAttachment as ri, countInlineImageCandidates as ii, countInlinedImageParts as ai, detectDocumentFormat as oi, estimateTurnBodyBytes as si, formatBytes as ci, getAttachmentSendBlocker as li, getExtension as ui, getSendableAttachments as di, hasAttachmentWorkInFlight as fi, isProviderReadableFilePart as pi, largestInlineCharsPerFile as mi, parseDataUrl as hi, resolveAssistantInlineLimits as gi, toMessageAttachment as _i, truncateForInline as vi, validateFile as yi } from "./shared/assistant/attachments.js";
|
|
46
|
+
import { ATTACHMENT_SOURCES as bi, availableAttachmentSources as xi, deviceHasCamera as Si } from "./shared/assistant/attachmentSources.js";
|
|
47
|
+
import { ASSISTANT_I18N_COMPUTED_COPY as Ci, ASSISTANT_I18N_LITERAL_COPY as wi, ASSISTANT_I18N_MANIFEST as Ti, assistantI18nSeedCopy as Ei, assistantModeI18nCopy as Di } from "./shared/assistant/i18nManifest.js";
|
|
48
|
+
import { ADMIN_MODE_ACCESS_WAIT_MS as Oi, adminOnlyModeSendRefusalAfterAccess as ki, createAdminModeAccessGate as Ai, resolveAssistantSendModeAfterAccess as ji, unofferedModeSendRefusalAfterAccess as Mi } from "./shared/assistant/adminModeSendGate.js";
|
|
49
|
+
import { buildBoundedAttachmentTurn as Ni } from "./shared/assistant/attachmentTurn.js";
|
|
50
|
+
import { LEGACY_WRITE_CONSENT_KEY as Pi, TAKE_ACTION_ENGLISH as Fi, isWriteModeAcknowledged as Ii, restoreAcknowledgedWriteModes as Li, withWriteModeAcknowledged as Ri, writeModeConsentCopy as zi, writeModeSendRefusal as Bi } from "./shared/assistant/writeModeConsent.js";
|
|
51
|
+
import { SPOKEN_LABEL_LANGUAGES as Vi, speechLabelsFor as Hi } from "./shared/assistant/voice/speechLabels.js";
|
|
52
|
+
import { detectScriptLocale as Ui, resolveSpeechLocale as Wi } from "./shared/assistant/voice/replyLanguage.js";
|
|
53
|
+
import { IDLE_PLAYBACK as Gi, isSpeakingMessage as Ki, publishedChunks as qi, requiresCancel as Ji, speechPlaybackReducer as Yi } from "./shared/assistant/voice/speechPlayback.js";
|
|
54
|
+
import { mergePersistedAssistantState as Xi, resolveActiveModeSandbox as Zi, useAssistantStore as Qi } from "./shared/assistant/store.js";
|
|
55
|
+
import { isTurnInFlight as $i, planAbandonedTurn as ea, planTurnAbort as ta } from "./shared/assistant/turnState.js";
|
|
56
|
+
import { isLegacyFiller as na, isLegacyStopped as ra, isStageCopy as ia, stripLegacyFillerPrefix as aa } from "./shared/assistant/legacyFiller.js";
|
|
57
|
+
import { getAssistantDisplayContent as oa } from "./shared/assistant/displayContent.js";
|
|
58
|
+
import { elapsedSince as sa, msUntilNextPhrase as ca, startPhraseTicker as la, turnActivityCopy as ua, turnActivityStage as da } from "./shared/assistant/turnActivity.js";
|
|
59
|
+
import { buildAssistantProgress as fa } from "./shared/assistant/turnProgress.js";
|
|
60
|
+
import { AssistantToolActivity as pa, parseToolActivity as ma } from "./shared/assistant/ui/AssistantToolActivity.js";
|
|
61
|
+
import { countSpokenTurns as ha, spokenTurnText as ga } from "./shared/assistant/spokenTurns.js";
|
|
62
|
+
import { AssistantAvatar as _a } from "./shared/assistant/ui/AssistantAvatar.js";
|
|
63
|
+
import { AssistantSpeechProvider as va, useAssistantSpeech as ya } from "./shared/assistant/ui/AssistantSpeechProvider.js";
|
|
64
|
+
import { useVoiceSession as ba } from "./shared/assistant/ui/useVoiceSession.js";
|
|
65
|
+
import { getActorId as xa, getOrganizationId as Sa, getWorkspaceId as Ca } from "./shared/assistant/context.js";
|
|
66
|
+
import { SANDBOX_READY_TTL_MS as wa, createReadinessTracker as Ta, isRecentlyVerified as Ea } from "./shared/assistant/sandboxReadiness.js";
|
|
67
|
+
import { AssistantAutoSpeakToggle as Da } from "./shared/assistant/ui/AssistantAutoSpeakToggle.js";
|
|
68
|
+
import { AssistantMessageAttachments as Oa } from "./shared/assistant/ui/AssistantMessageAttachments.js";
|
|
69
|
+
import { AssistantPendingWriteCard as ka } from "./shared/assistant/ui/AssistantPendingWriteCard.js";
|
|
70
|
+
import { AssistantLanguageMenu as Aa } from "./shared/assistant/ui/AssistantLanguageMenu.js";
|
|
71
|
+
import { AssistantReplyLanguageSelector as ja } from "./shared/assistant/ui/AssistantReplyLanguageSelector.js";
|
|
72
|
+
import { AssistantSpeakButton as Ma } from "./shared/assistant/ui/AssistantSpeakButton.js";
|
|
73
|
+
import { AssistantSpokenTurnsNotice as Na } from "./shared/assistant/ui/AssistantSpokenTurnsNotice.js";
|
|
74
|
+
import { AssistantConnectSourceProvider as Pa, useAssistantConnectSource as Fa } from "./shared/assistant/ui/composer/connectSource.js";
|
|
75
|
+
import { AssistantConnectSourceItem as Ia } from "./shared/assistant/ui/composer/AssistantConnectSourceItem.js";
|
|
76
|
+
import { ASSISTANT_OVERLAY_ATTR as La, ASSISTANT_PANEL_ATTR as Ra, NO_PANEL_OVERLAY as za, activePanelOverlay as Ba, assistantPanelOwnsEscape as Va, escapeDismisses as Ha, focusIsInsidePanel as Ua, nextPanelOverlays as Wa, panelOwnsEscape as Ga } from "./shared/assistant/ui/panelOverlays.js";
|
|
77
|
+
import { useDropdownEscape as Ka } from "./shared/assistant/ui/useDropdownEscape.js";
|
|
78
|
+
import { AssistantAttachmentButton as qa } from "./shared/assistant/ui/composer/AssistantAttachmentButton.js";
|
|
79
|
+
import { AssistantAttachmentChips as Ja } from "./shared/assistant/ui/composer/AssistantAttachmentChips.js";
|
|
80
|
+
import { AssistantPreviewProvider as Ya, useAssistantPreview as Xa } from "./shared/assistant/preview/context.js";
|
|
81
|
+
import { IDLE_PREVIEW_STATE as Za, isBlankProse as Qa, isRunningStatus as $a, nextPreviewEvents as eo } from "./shared/assistant/preview/previewTransitions.js";
|
|
82
|
+
import { IDLE_PREVIEW as to, NO_OWNER as no, applyPreviewEvent as ro, createAssistantPreviewSurface as io, currentPreviewOwner as ao, runBelongsTo as oo, sameOwner as so } from "./shared/assistant/preview/surfaceState.js";
|
|
83
|
+
import { createRunIdentityCache as co, runIdentities as lo } from "./shared/assistant/preview/runIdentity.js";
|
|
84
|
+
import { IDLE_ACTIVE_TAB as uo, nextActiveTab as fo, pinActiveTab as po, shouldPinOnMove as mo, shouldPinOnSelect as ho, stepsFromToolActivity as go, tabForArrowKey as _o } from "./shared/assistant/preview/entity/entityPreviewState.js";
|
|
85
|
+
import { AssistantStepRail as vo } from "./shared/assistant/preview/entity/AssistantStepRail.js";
|
|
86
|
+
import { AssistantEntityPreview as yo } from "./shared/assistant/preview/entity/AssistantEntityPreview.js";
|
|
87
|
+
import { useOverlayFocus as bo } from "./shared/assistant/ui/useOverlayFocus.js";
|
|
88
|
+
import { REDUCED_MOTION_ATTRIBUTE as xo, REDUCED_MOTION_QUERY as So, readReducedMotion as Co, subscribeReducedMotion as wo, usePrefersReducedMotion as To } from "./shared/assistant/ui/usePrefersReducedMotion.js";
|
|
89
|
+
import { useAssistantPreviewBridge as Eo } from "./shared/assistant/preview/useAssistantPreviewBridge.js";
|
|
90
|
+
import { HostedPreviewBridgeContext as Do, panelOwnedPreviewBridge as Oo, useHostedAssistantPreviewBridge as ko } from "./shared/assistant/preview/bridgeHostContext.js";
|
|
91
|
+
import { AssistantPreviewBridgeHost as Ao } from "./shared/assistant/preview/bridgeHost.js";
|
|
92
|
+
import { AssistantPreviewOverlay as jo } from "./shared/assistant/preview/AssistantPreviewOverlay.js";
|
|
93
|
+
import { AssistantLanguageSelector as Mo, FOLLOW_APP_LOCALE as No } from "./shared/assistant/ui/composer/AssistantLanguageSelector.js";
|
|
94
|
+
import { ASSISTANT_MODE_META as Po, AssistantModeSelector as Fo, assistantModeMeta as Io, nextModeIndex as Lo } from "./shared/assistant/ui/composer/AssistantModeSelector.js";
|
|
95
|
+
import { AssistantVoiceButton as Ro } from "./shared/assistant/ui/composer/AssistantVoiceButton.js";
|
|
96
|
+
import { AUTO_VOICE as zo, AssistantVoiceSelector as Bo } from "./shared/assistant/ui/composer/AssistantVoiceSelector.js";
|
|
97
|
+
import { AssistantVoiceOrb as Vo } from "./shared/assistant/ui/voice/AssistantVoiceOrb.js";
|
|
98
|
+
import { AssistantVoiceSessionButton as Ho } from "./shared/assistant/ui/voice/AssistantVoiceSessionButton.js";
|
|
99
|
+
import { CAPTION_SCROLL_ATTR as Uo, VoiceCaption as Wo } from "./shared/assistant/ui/voice/VoiceCaption.js";
|
|
100
|
+
import { VoiceConversationView as Go } from "./shared/assistant/ui/voice/VoiceConversationView.js";
|
|
101
|
+
import { VoiceWaveform as Ko } from "./shared/assistant/ui/voice/VoiceWaveform.js";
|
|
102
|
+
import { VoiceStatusLine as qo, VoiceStatusText as Jo } from "./shared/assistant/ui/voice/VoiceStatusText.js";
|
|
103
|
+
import { VoiceMiniController as Yo } from "./shared/assistant/ui/voice/VoiceMiniController.js";
|
|
104
|
+
import { VoiceStage as Xo } from "./shared/assistant/ui/voice/VoiceStage.js";
|
|
105
|
+
import { VoiceTranscriptDrawer as Zo } from "./shared/assistant/ui/voice/VoiceTranscriptDrawer.js";
|
|
106
|
+
import { downloadFile as Qo, exportConversation as $o } from "./shared/assistant/exportConversation.js";
|
|
107
|
+
import { AssistantMoreMenu as es } from "./shared/assistant/ui/AssistantMoreMenu.js";
|
|
108
|
+
import { AssistantHeader as ts } from "./shared/assistant/ui/AssistantHeader.js";
|
|
109
|
+
import { AssistantConversationList as ns } from "./shared/assistant/ui/AssistantConversationList.js";
|
|
110
|
+
import { AssistantEmptyState as rs } from "./shared/assistant/ui/AssistantEmptyState.js";
|
|
111
|
+
import { AssistantTurnActivity as is, TurnActivityLine as as } from "./shared/assistant/ui/AssistantTurnActivity.js";
|
|
112
|
+
import { AssistantMessageItem as os } from "./shared/assistant/ui/AssistantMessageItem.js";
|
|
113
|
+
import { AssistantMessageList as ss } from "./shared/assistant/ui/AssistantMessageList.js";
|
|
114
|
+
import { AssistantVoiceSession as cs } from "./shared/assistant/ui/voice/AssistantVoiceSession.js";
|
|
115
|
+
import { useAssistantApiAccess as ls } from "./shared/assistant/useAssistantApiAccess.js";
|
|
116
|
+
import { useConversationTurns as us } from "./shared/assistant/useConversationTurns.js";
|
|
117
|
+
import { isMultimodalBodyRejection as ds, isRecoverableAssistantError as fs } from "./shared/assistant/transportErrors.js";
|
|
118
|
+
import { aiCreditsUpdatedEventName as ps, dispatchAssistantQuotaExhausted as ms, notifyAiCreditsUpdated as hs } from "./shared/assistant/aiCredits.js";
|
|
119
|
+
import { useWorkspaceWriteAccess as gs } from "./shared/assistant/useWorkspaceWriteAccess.js";
|
|
120
|
+
import { extractDocumentText as _s } from "./shared/assistant/documentExtract.js";
|
|
121
|
+
import { useAssistantAttachments as vs } from "./shared/assistant/useAssistantAttachments.js";
|
|
122
|
+
import { AssistantComposer as ys } from "./shared/assistant/ui/composer/AssistantComposer.js";
|
|
123
|
+
import { isProdRuntime as bs } from "./shared/assistant/env.js";
|
|
124
|
+
import { useAssistantHeartbeat as xs } from "./shared/assistant/useAssistantHeartbeat.js";
|
|
125
|
+
import { useAssistantKeyboardShortcuts as Ss } from "./shared/assistant/useAssistantKeyboardShortcuts.js";
|
|
126
|
+
import { AssistantApiCallsConsentDialog as Cs } from "./shared/assistant/ui/AssistantApiCallsConsentDialog.js";
|
|
127
|
+
import { AssistantChatArea as ws } from "./shared/assistant/ui/AssistantChatArea.js";
|
|
128
|
+
import { AIAssistantPanel as Ts } from "./shared/assistant/ui/AIAssistantPanel.js";
|
|
129
|
+
import { ASSISTANT_BOTTOM_CHROME_CLEARANCE as Es, ASSISTANT_DIALOG_SELECTOR as Ds, ASSISTANT_DOCKED_DESKTOP_CLASS as Os, ASSISTANT_DOCK_WIDTH_PX as ks, ASSISTANT_DOCK_WIDTH_VAR as As, ASSISTANT_FLOATING_DESKTOP_CLASS as js, ASSISTANT_OVERLAY_DEFAULT_TOP_PX as Ms, ASSISTANT_OVERLAY_DESKTOP_QUERY as Ns, ASSISTANT_OVERLAY_TOP_VAR as Ps, ASSISTANT_SHEET_BASE_CLASS as Fs, ASSISTANT_SHEET_COMPACT_CLASS as Is, ASSISTANT_SHEET_EXPANDED_CLASS as Ls, ASSISTANT_TOGGLE_SHORTCUT_LABEL as Rs, aboveAssistantBottomChrome as zs, assistantOverlayClassName as Bs, assistantOverlayEscapeAction as Vs, assistantOverlayKeys as Hs, assistantQuotaKindOf as Us, createAssistantNavigate as Ws, isAssistantToggleShortcut as Gs, nextAssistantOpenState as Ks, publishedAssistantDockWidth as qs, readAssistantOverlayFlag as Js, requestedAssistantOpenState as Ys, writeAssistantOverlayFlag as Xs } from "./shared/assistant/ui/assistantOverlayState.js";
|
|
130
|
+
import { AssistantOverlay as Zs, AssistantOverlayProvider as Qs, useAssistantDockWidth as $s, useAssistantOverlayOrNull as ec, useAssistantQuotaExhausted as tc } from "./shared/assistant/ui/AssistantOverlay.js";
|
|
131
|
+
export { Oi as ADMIN_MODE_ACCESS_WAIT_MS, Ts as AIAssistantPanel, Y as ASSISTANT_API_AUTH_STRATEGY, Es as ASSISTANT_BOTTOM_CHROME_CLEARANCE, Ds as ASSISTANT_DIALOG_SELECTOR, Os as ASSISTANT_DOCKED_DESKTOP_CLASS, ks as ASSISTANT_DOCK_WIDTH_PX, As as ASSISTANT_DOCK_WIDTH_VAR, js as ASSISTANT_FLOATING_DESKTOP_CLASS, Ci as ASSISTANT_I18N_COMPUTED_COPY, wi as ASSISTANT_I18N_LITERAL_COPY, Ti as ASSISTANT_I18N_MANIFEST, lr as ASSISTANT_LANGUAGES, z as ASSISTANT_MODE_FALLBACK_LABELS, B as ASSISTANT_MODE_IDS, Po as ASSISTANT_MODE_META, La as ASSISTANT_OVERLAY_ATTR, Ms as ASSISTANT_OVERLAY_DEFAULT_TOP_PX, Ns as ASSISTANT_OVERLAY_DESKTOP_QUERY, Ps as ASSISTANT_OVERLAY_TOP_VAR, Ra as ASSISTANT_PANEL_ATTR, Fs as ASSISTANT_SHEET_BASE_CLASS, Is as ASSISTANT_SHEET_COMPACT_CLASS, Ls as ASSISTANT_SHEET_EXPANDED_CLASS, Rs as ASSISTANT_TOGGLE_SHORTCUT_LABEL, Lr as ATTACHMENT_ACCEPT, bi as ATTACHMENT_SOURCES, zo as AUTO_VOICE, Cs as AssistantApiCallsConsentDialog, qa as AssistantAttachmentButton, Ja as AssistantAttachmentChips, Da as AssistantAutoSpeakToggle, _a as AssistantAvatar, ws as AssistantChatArea, ys as AssistantComposer, Ia as AssistantConnectSourceItem, Pa as AssistantConnectSourceProvider, ns as AssistantConversationList, rs as AssistantEmptyState, yo as AssistantEntityPreview, ts as AssistantHeader, l as AssistantI18nProvider, Aa as AssistantLanguageMenu, Mo as AssistantLanguageSelector, m as AssistantMarkdownImage, _ as AssistantMarkdownRenderer, Oa as AssistantMessageAttachments, os as AssistantMessageItem, ss as AssistantMessageList, Fo as AssistantModeSelector, es as AssistantMoreMenu, v as AssistantNavigateProvider, Zs as AssistantOverlay, Qs as AssistantOverlayProvider, ka as AssistantPendingWriteCard, Ao as AssistantPreviewBridgeHost, jo as AssistantPreviewOverlay, Ya as AssistantPreviewProvider, r as AssistantProductProvider, ja as AssistantReplyLanguageSelector, Ie as AssistantRuntimeManager, Ma as AssistantSpeakButton, va as AssistantSpeechProvider, Na as AssistantSpokenTurnsNotice, vo as AssistantStepRail, pa as AssistantToolActivity, is as AssistantTurnActivity, Ro as AssistantVoiceButton, Vo as AssistantVoiceOrb, Bo as AssistantVoiceSelector, cs as AssistantVoiceSession, Ho as AssistantVoiceSessionButton, Rr as AttachmentRejectedError, _r as BOILERPLATE_PAGE_SHARE, Ye as BUILT_IN_MODE_CAPABILITIES, Uo as CAPTION_SCROLL_ATTR, A as CHECK_AI_CREDITS, j as CREATE_SANDBOX, zr as DEFAULT_INLINE_LIMITS, Hn as DEFAULT_SPEAKABLE_LABELS, ur as DEFAULT_SPEECH_RATE, rt as DEFAULT_STREAM_BUDGET_MS, Dn as ENDPOINT_GRACE_MS, M as EXTEND_SANDBOX_TTL, No as FOLLOW_APP_LOCALE, N as GET_ACTIVE_SANDBOXES, P as GET_SANDBOX, xt as HOSTED_DISABLE_MS, St as HOSTED_TTS_MAX_CHARS, _t as HOSTED_TTS_TIER, vt as HOSTED_VOICES, It as HOSTED_VOICE_RANK, Do as HostedPreviewBridgeContext, uo as IDLE_ACTIVE_TAB, Gi as IDLE_PLAYBACK, to as IDLE_PREVIEW, Za as IDLE_PREVIEW_STATE, Sn as IDLE_ROTATION_CLOCK, it as INCOMPLETE_TURN_NOTICES, On as INITIAL_SESSION, Br as INLINE_IMAGE_MAX_DIM, Vr as INLINE_IMAGE_QUALITY, kn as INTERRUPT_MAX_MS, An as INTERRUPT_MIN_MS, Pi as LEGACY_WRITE_CONSENT_KEY, Xe as MAX_ASSISTANT_STREAM_BUDGET_MS, Hr as MAX_ATTACHMENTS, vr as MAX_BOILERPLATE_LINE_CHARS, Ur as MAX_CONFIGURABLE_INLINE_CHARS, yr as MAX_EXTRACTED_CHARS, Wr as MAX_FILE_BYTES, Gr as MAX_INLINE_CHARS_PER_FILE, Kr as MAX_INLINE_CHARS_TOTAL, oe as MAX_INLINE_IMAGE_BASE64_BYTES, qr as MAX_INLINE_IMAGE_BASE64_CHARS, Jr as MAX_INLINE_IMAGE_PARTS, Yr as MAX_INLINE_TURN_BODY_BYTES, br as MAX_PDF_PAGES_SCANNED, se as MAX_REQUEST_BODY_BYTES, Un as MAX_SPEAKABLE_CHARS, Wn as MAX_SPOKEN_TABLE_ROWS, Xr as MAX_TURN_BODY_BYTES, er as MINI_CAPTION_BUDGET, xr as MIN_PAGE_TEXT_CHARS, Sr as MIN_TEXT_PAGE_SHARE, no as NO_OWNER, za as NO_PANEL_OVERLAY, un as PHRASE_ROTATE_MS, nr as POLL_FAST_MS, rr as POLL_FAST_UNTIL_MS, ir as POLL_SLOW_MS, ar as POLL_STEADY_MS, or as POLL_STEADY_UNTIL_MS, Qn as PREVIEW_LANGUAGES, U as PRODUCT_ASSISTANT_MODE_ID_MAX_LENGTH, W as PRODUCT_ASSISTANT_MODE_ID_PATTERN, Zr as PROMPT_ENVELOPE_RESERVE_BYTES, Qr as PROVIDER_READABLE_FILE_MEDIA_TYPES, F as PROXY_SANDBOX_REQUEST, xo as REDUCED_MOTION_ATTRIBUTE, So as REDUCED_MOTION_QUERY, I as REPORT_AI_TOKEN_USAGE, ce as REQUEST_TOO_LARGE_REFUSAL, wa as SANDBOX_READY_TTL_MS, jn as SILENCE_SUBMIT_MS, Ct as SPEAKING_RATE_MAX, wt as SPEAKING_RATE_MAX_STREAMING, Tt as SPEAKING_RATE_MAX_SYNC, Et as SPEAKING_RATE_MIN, Gn as SPEECH_CHUNK_CHARS, Kn as SPEECH_CHUNK_CJK_CHARS, Lt as SPEECH_LANG, Vi as SPOKEN_LABEL_LANGUAGES, dn as STAGE_COPY, e as START_RETRY_COOLDOWN_MS, L as STOP_ASSISTANT_SANDBOX, at as STREAM_BUDGET_MS, Fi as TAKE_ACTION_ENGLISH, fn as THINKING_PHRASES, $r as TURN_BODY_HEADROOM_BYTES, as as TurnActivityLine, Ze as UNAVAILABLE_MODE_REFUSAL, Qe as UNDECLARED_MODE_CAPABILITIES, Rt as VOICE_LIST_TIMEOUT_MS, _n as VOICE_MUTED_LABEL, vn as VOICE_THINKING_LABEL, Wo as VoiceCaption, Go as VoiceConversationView, Yo as VoiceMiniController, Xo as VoiceStage, qo as VoiceStatusLine, Jo as VoiceStatusText, Zo as VoiceTranscriptDrawer, Ko as VoiceWaveform, R as WAIT_FOR_SANDBOX_RUNNING, le as abortAssistantTurn, zs as aboveAssistantBottomChrome, Ba as activePanelOverlay, $e as adminOnlyModeSendRefusal, ki as adminOnlyModeSendRefusalAfterAccess, Cn as advanceRotationClock, ps as aiCreditsUpdatedEventName, ro as applyPreviewEvent, ue as approvePendingWrite, Ei as assistantI18nSeedCopy, V as assistantModeFallbackLabel, Di as assistantModeI18nCopy, Io as assistantModeMeta, Bs as assistantOverlayClassName, Vs as assistantOverlayEscapeAction, Hs as assistantOverlayKeys, Va as assistantPanelOwnsEscape, Us as assistantQuotaKindOf, y as assistantRoutePath, u as assistantTranslationKey, b as assistantUrlTransform, xi as availableAttachmentSources, Dt as base64ToBytes, x as browserShouldHandle, gt as browserSpeechEngine, fa as buildAssistantProgress, de as buildAssistantSandboxEnv, ei as buildAttachmentPromptBlock, Ni as buildBoundedAttachmentTurn, zn as buildContinuedFromVoiceNote, Le as buildProgress, fe as buildPromptGatewayRequest, ti as buildPromptParts, pe as buildPromptRequestBody, ni as buildPromptWithAttachments, Ot as buildRequest, O as buildSandboxContextInput, Bn as buildVoiceTranscriptMarkdown, G as builtInModeExtendedBy, lt as chatTurns, me as checkAssistantAiCredits, qn as chunkForSpeech, S as classifyAssistantHref, ri as classifyAttachment, kt as classifyHttpFailure, w as classifyQuotaError, Cr as columnLetterToIndex, yn as composeVoiceStatus, Zt as configureSpeechEngine, Jn as containsCjk, p as copyToClipboard, ii as countInlineImageCandidates, ai as countInlinedImageParts, ha as countSpokenTurns, Ai as createAdminModeAccessGate, Ws as createAssistantNavigate, io as createAssistantPreviewSurface, he as createAssistantSandbox, ge as createAssistantSession, Pt as createHostedTtsEngine, Ta as createReadinessTracker, Xt as createRoutingSpeechEngine, co as createRunIdentityCache, qe as createSandboxAssistantTransport, Qt as createSpeechEngines, ao as currentPreviewOwner, K as declareAssistantMode, At as decodeAudioResponse, wr as decodeXmlEntities, T as describeQuotaError, oi as detectDocumentFormat, Ui as detectScriptLocale, Si as deviceHasCamera, jt as disableDurationMs, ms as dispatchAssistantQuotaExhausted, Tr as docxXmlToText, _e as downloadAssistantArtifact, Qo as downloadFile, sa as elapsedSince, Ha as escapeDismisses, si as estimateTurnBodyBytes, k as executeSandboxGraphQL, $o as exportConversation, ve as extendAssistantSandboxTTL, _s as extractDocumentText, dr as findAssistantLanguage, et as findAssistantModeConfig, ye as findExistingSandbox, hr as findPendingWrite, Er as fitPdfPages, Ua as focusIsInsidePanel, ci as formatBytes, Dr as formatPageRanges, be as forwardsUserTokensToSandbox, xa as getActorId, xe as getAssistantArtifacts, oa as getAssistantDisplayContent, Re as getAssistantMedia, Se as getAssistantMessages, Ce as getAssistantSession, we as getAssistantStreamAccess, ze as getAssistantText, li as getAttachmentSendBlocker, ne as getCapability, ui as getExtension, X as getImageForMode, Z as getImageTagForMode, Sa as getOrganizationId, Be as getRawMessageCreatedAt, Q as getResourcesForMode, $ as getSandboxImageRegistry, di as getSendableAttachments, $t as getSpeechEngine, Ve as getToolProgress, Ca as getWorkspaceId, ut as groupBySession, dt as groupConsecutiveBySession, fi as hasAttachmentWorkInFlight, yt as hostedLocaleFor, bt as hostedSupportsLanguage, h as imageHostLabel, ot as incompleteTurnNotice, q as isAssistantModeId, Gs as isAssistantToggleShortcut, Qa as isBlankProse, H as isBuiltInAssistantMode, Mn as isCapturing, Nn as isEcho, zt as isHostedVoice, na as isLegacyFiller, ra as isLegacyStopped, Or as isMostlyImagePages, ds as isMultimodalBodyRejection, bs as isProdRuntime, J as isProductAssistantModeId, pi as isProviderReadableFilePart, E as isQuotaExhaustedError, He as isReapedSandboxConnectionError, Ea as isRecentlyVerified, Ue as isRecoverable, fs as isRecoverableAssistantError, g as isRemoteImageSrc, $a as isRunningStatus, Ki as isSpeakingMessage, Bt as isSpeechBlocked, ia as isStageCopy, Pn as isSubmittable, $i as isTurnInFlight, re as isUnknownFieldError, ft as isVoiceTurn, Ii as isWriteModeAcknowledged, kr as joinSheets, Vt as languageDisplayName, mi as largestInlineCharsPerFile, We as mapSessionToHistory, ie as markSupported, ae as markUnsupported, Ge as mergeMessagesById, Xi as mergePersistedAssistantState, rn as micIsInterrupt, Te as modeRequiresConfirmWrites, ca as msUntilNextPhrase, fo as nextActiveTab, Ks as nextAssistantOpenState, Lo as nextModeIndex, Wa as nextPanelOverlays, eo as nextPreviewEvents, Ht as normalizeLangTag, hs as notifyAiCreditsUpdated, Fn as orbMode, Ar as pageMarker, Oo as panelOwnedPreviewBridge, Ga as panelOwnsEscape, gr as parseConfirmationRefusal, hi as parseDataUrl, jr as parseSharedStrings, ma as parseToolActivity, Mr as parseWorkbookSheets, Nr as pdfTextItemsToPage, po as pinActiveTab, ea as planAbandonedTurn, In as planReplyConsumption, ta as planTurnAbort, sr as pollDelayMs, Ut as primaryLanguageSubtag, Ee as promptGatewayRequestBytes, qs as publishedAssistantDockWidth, qi as publishedChunks, D as quotaExhaustedEventName, Js as readAssistantOverlayFlag, Co as readReducedMotion, en as readSpeechEngineConfig, De as releaseSupersededAssistantSandboxes, pr as replyFollowsInput, Oe as reportAssistantAiTokenUsage, Ys as requestedAssistantOpenState, Ji as requiresCancel, tn as resetSpeechEngine, Zi as resolveActiveModeSandbox, gi as resolveAssistantInlineLimits, fr as resolveAssistantLanguage, tt as resolveAssistantModeCapabilities, ji as resolveAssistantSendModeAfterAccess, mr as resolveLanguagePair, i as resolveModeConfig, ee as resolveSandboxAssistantMode, Wi as resolveSpeechLocale, Li as restoreAcknowledgedWriteModes, Ft as retryDelayMs, wn as rotationElapsedMs, oo as runBelongsTo, lo as runIdentities, so as sameOwner, te as sandboxBaseModeFor, Ke as sanitize, ke as selectExistingAssistantSandbox, Ae as selectSupersededAssistantSandboxes, Wt as selectVoiceForLocale, je as sendAssistantPromptAsync, Me as sendHeartbeat, Pr as sheetXmlToRows, Mt as shouldDisableEngine, mo as shouldPinOnMove, ho as shouldPinOnSelect, tr as showPreviousChunk, an as showsAssistantCaption, on as showsUserCaption, Yn as speakableEmail, Gt as speechGate, Hi as speechLabelsFor, Kt as speechLangForLocale, Yi as speechPlaybackReducer, Nt as splitForVendor, Xn as splitTableRow, Ln as spokenSoFar, ga as spokenTurnText, pn as stageText, t as startIsCoolingDown, la as startPhraseTicker, Tn as startRotationTicker, mn as statusStageCopy, go as stepsFromToolActivity, Ne as stopReapedAssistantSandbox, st as streamBudgetMs, aa as stripLegacyFillerPrefix, wo as subscribeReducedMotion, nn as subscribeSpeechEngine, Fr as summarisePageText, En as syncRotationClock, _o as tabForArrowKey, hn as thinkingPhrase, gn as thinkingPhraseEntry, cr as toCaptionText, _i as toMessageAttachment, Zn as toSpeakableText, vi as truncateForInline, Ir as truncatePagesForInline, ua as turnActivityCopy, da as turnActivityStage, nt as unofferedModeSendRefusal, Mi as unofferedModeSendRefusalAfterAccess, ls as useAssistantApiAccess, vs as useAssistantAttachments, Fa as useAssistantConnectSource, $s as useAssistantDockWidth, xs as useAssistantHeartbeat, d as useAssistantI18nNamespace, Ss as useAssistantKeyboardShortcuts, C as useAssistantNavigate, ec as useAssistantOverlayOrNull, a as useAssistantPageLabel, Xa as useAssistantPreview, Eo as useAssistantPreviewBridge, o as useAssistantProduct, s as useAssistantProductOrNull, tc as useAssistantQuotaExhausted, ya as useAssistantSpeech, c as useAssistantStorageFolders, Qi as useAssistantStore, f as useAssistantTr, us as useConversationTurns, Ka as useDropdownEscape, ko as useHostedAssistantPreviewBridge, bo as useOverlayFocus, To as usePrefersReducedMotion, Je as useSandboxAssistantTransport, n as useVoiceInput, ba as useVoiceSession, gs as useWorkspaceWriteAccess, yi as validateFile, qt as voiceAvailability, pt as voiceMarker, $n as voicePreviewText, Jt as voiceQualityRank, mt as voiceSessionIdOf, Rn as voiceSessionReducer, sn as voiceStageState, bn as voiceStatusParts, xn as voiceStatusSuffix, Vn as voiceTranscriptFilename, ht as voiceTurnsOnly, Yt as voicesForLocale, Pe as waitForAssistantServiceReady, Fe as waitForSandboxRunning, cn as waveformIsActive, ln as waveformIsSettled, ct as withIncompleteTurnNotice, Ri as withWriteModeAcknowledged, Xs as writeAssistantOverlayFlag, zi as writeModeConsentCopy, Bi as writeModeSendRefusal };
|