@burdenoff/fe-libs 2026.909.1 → 2026.909.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/turnState.d.ts +13 -12
- package/dist/shared/assistant/turnState.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.js +3 -2
- package/dist/shared/assistant/ui/voice/AssistantVoiceOrb.d.ts +1 -1
- package/dist/shared/assistant/ui/voice/AssistantVoiceOrb.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/AssistantVoiceOrb.js +2 -2
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +67 -67
- package/dist/shared/assistant/voice/voiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/voice/voiceSession.js +1 -1
- package/dist/shared/assistant/voice/voiceStageState.d.ts +16 -1
- package/dist/shared/assistant/voice/voiceStageState.d.ts.map +1 -1
- package/dist/shared/assistant/voice/voiceStageState.js +1 -1
- package/package.json +1 -1
|
@@ -27,19 +27,20 @@ export declare function isTurnInFlight(status: AssistantConversationStatus | und
|
|
|
27
27
|
* cancelled, leaving the live turn's own completion landing on an entry that no
|
|
28
28
|
* longer describes it. Silently: there is no error on either side.
|
|
29
29
|
*
|
|
30
|
-
* ★ Scope
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* `
|
|
34
|
-
* voice turn can be aborted mid-generation today. Where this earns its place is
|
|
35
|
-
* the host-page `pendingPrompt` route, which starts turns past the voice
|
|
36
|
-
* overlay and CAN be aborted while running.
|
|
30
|
+
* ★ Scope. This now fires in the VOICE flow: the orb is pressable during
|
|
31
|
+
* `thinking` and `micIsInterrupt` covers it, so a user can cut off an answer
|
|
32
|
+
* while it is still being generated. It also covers the host-page
|
|
33
|
+
* `pendingPrompt` route, which starts turns past the voice overlay.
|
|
37
34
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
35
|
+
* Two earlier versions of this comment were wrong in opposite directions, which
|
|
36
|
+
* is why the scope is now stated rather than assumed. The first claimed this
|
|
37
|
+
* guard stopped the cancelled answer being read aloud — it never could. The
|
|
38
|
+
* second said it could not fire from voice at all — true only while the orb was
|
|
39
|
+
* inert during `thinking`, which was the very thing this work removed.
|
|
40
|
+
*
|
|
41
|
+
* ★★ It is still NOT what delivers stale-output rejection. Old TEXT reaching a
|
|
42
|
+
* new caption is a separate defect with a separate fix — see `publishedChunks`
|
|
43
|
+
* in `voice/speechPlayback.ts`. Do not conflate them.
|
|
43
44
|
*
|
|
44
45
|
* ★ `clearProcessing` is addressed the same way `planTurnAbort` is. An
|
|
45
46
|
* abandoned turn may clear the shared entry only while that entry is still its
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turnState.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/turnState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAElE;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,2BAA2B,GAAG,SAAS,GAC9C,OAAO,CAMT;AAED
|
|
1
|
+
{"version":3,"file":"turnState.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/turnState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAElE;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,2BAA2B,GAAG,SAAS,GAC9C,OAAO,CAMT;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,cAAc,EAAE,OAAO,CAAC;IACxB,gEAAgE;IAChE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACzC,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,eAAe,EAAE,OAAO,CAAA;CAAE,CAGjD;AAED,kFAAkF;AAClF,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,iBAAiB,GACjB,YAAY,GACZ,mBAAmB,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAClC,yCAAyC;IACzC,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7C,iEAAiE;IACjE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,CAkB7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantChatArea.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantChatArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAyEf,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAoLvE;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;CACpC;AAED,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,
|
|
1
|
+
{"version":3,"file":"AssistantChatArea.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantChatArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAyEf,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAoLvE;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;CACpC;AAED,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAk1DxD,CAAC"}
|
|
@@ -149,13 +149,14 @@ var j = ({ visible: h = !0, writeAccess: se = "unknown" }) => {
|
|
|
149
149
|
activeTurnId: i,
|
|
150
150
|
alreadyRequested: i ? Nt.current.has(i) : !1
|
|
151
151
|
}).send || !i) return;
|
|
152
|
+
Nt.current.add(i);
|
|
152
153
|
let a = e.sandboxesByMode[e.mode]?.sandboxId, o = Se(), s = e.conversations.find((e) => e.id === t)?.backendSessionId;
|
|
153
|
-
!a || !o || !s ||
|
|
154
|
+
!a || !o || !s || r(a, o, s, {
|
|
154
155
|
accessToken: M(),
|
|
155
156
|
workspaceToken: N(),
|
|
156
157
|
userId: P,
|
|
157
158
|
organizationId: xe()
|
|
158
|
-
})
|
|
159
|
+
});
|
|
159
160
|
}, [
|
|
160
161
|
P,
|
|
161
162
|
M,
|
|
@@ -13,7 +13,7 @@ import { VoiceSessionSnapshot } from '../../voice/voiceSession';
|
|
|
13
13
|
* - listening -> mute (Mic)
|
|
14
14
|
* - muted -> unmute (MicOff)
|
|
15
15
|
* - speaking -> interrupt (Square — the stop glyph, not a microphone)
|
|
16
|
-
* - thinking ->
|
|
16
|
+
* - thinking -> interrupt (Square — stop the answer being generated)
|
|
17
17
|
*
|
|
18
18
|
* Interruption living here is deliberate: it is the biggest target on screen,
|
|
19
19
|
* and it replaced barge-in when the microphone had to be closed during playback
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantVoiceOrb.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/voice/AssistantVoiceOrb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGrE;;;;;;;;;;;;;;;;;;GAkBG;AACH,UAAU,KAAK;IACb,OAAO,EAAE,oBAAoB,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"AssistantVoiceOrb.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/voice/AssistantVoiceOrb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGrE;;;;;;;;;;;;;;;;;;GAkBG;AACH,UAAU,KAAK;IACb,OAAO,EAAE,oBAAoB,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,KAAK,CAkGvC,CAAC"}
|
|
@@ -3,14 +3,14 @@ import { Mic as t, MicOff as n, Square as r } from "lucide-react";
|
|
|
3
3
|
import { jsx as i } from "react/jsx-runtime";
|
|
4
4
|
//#region src/shared/assistant/ui/voice/AssistantVoiceOrb.tsx
|
|
5
5
|
var a = ({ session: a, compact: o = !1, onPress: s, label: c, connecting: l = !1 }) => {
|
|
6
|
-
let u = e(a), { muted: d, phase: f, error: p } = a, m = f === "
|
|
6
|
+
let u = e(a), { muted: d, phase: f, error: p } = a, m = f === "idle" || f === "ended" || p !== null || l, h = d && f !== "speaking" ? "from-bg-elevated to-bg-elevated" : u === "listening" ? "from-action-primary-bg/80 to-action-primary-bg/20" : u === "thinking" ? "from-action-primary-bg/55 to-action-primary-bg/15" : u === "speaking" ? "from-action-primary-bg to-action-primary-bg/40" : "from-bg-elevated to-bg-elevated/40", g = d && f !== "speaking" ? "" : u === "listening" ? "motion-safe:animate-pulse" : u === "thinking" ? "motion-safe:animate-[pulse_1.6s_ease-in-out_infinite]" : u === "speaking" ? "motion-safe:animate-[pulse_0.9s_ease-in-out_infinite]" : "", _ = o ? "h-16 w-40" : "h-24 w-56", v = o ? "size-6" : "size-8", y = f === "speaking" || f === "thinking" ? r : d ? n : t;
|
|
7
7
|
return /* @__PURE__ */ i("button", {
|
|
8
8
|
type: "button",
|
|
9
9
|
onClick: s,
|
|
10
10
|
disabled: m || !s,
|
|
11
11
|
className: `flex ${_} items-center justify-center rounded-full bg-gradient-to-b ${h} ${g} text-text-primary shadow-lg transition-colors duration-300 focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:cursor-default`,
|
|
12
12
|
"aria-label": c,
|
|
13
|
-
"aria-pressed": f === "speaking" ? void 0 : d,
|
|
13
|
+
"aria-pressed": f === "speaking" || f === "thinking" ? void 0 : d,
|
|
14
14
|
"data-testid": "assistant-voice-orb",
|
|
15
15
|
"data-state": u,
|
|
16
16
|
"data-muted": d || void 0,
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":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,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,CAukB3C,CAAC"}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { micIsInterrupt as e,
|
|
2
|
-
import { spokenSoFar as
|
|
3
|
-
import { useAssistantTr as
|
|
4
|
-
import { AssistantAttachmentButton as
|
|
1
|
+
import { micIsInterrupt as e, showsAssistantCaption as t, voiceStageState as n } from "../../voice/voiceStageState.js";
|
|
2
|
+
import { spokenSoFar as r } from "../../voice/voiceSession.js";
|
|
3
|
+
import { useAssistantTr as i } from "../../i18n.js";
|
|
4
|
+
import { AssistantAttachmentButton as ee } from "../composer/AssistantAttachmentButton.js";
|
|
5
5
|
import { AssistantAttachmentChips as a } from "../composer/AssistantAttachmentChips.js";
|
|
6
|
-
import { AssistantVoiceOrb as
|
|
7
|
-
import { VoiceMiniController as
|
|
8
|
-
import { VoiceStage as
|
|
9
|
-
import { VoiceTranscriptDrawer as
|
|
10
|
-
import { useCallback as
|
|
11
|
-
import { Maximize2 as
|
|
12
|
-
import { jsx as
|
|
6
|
+
import { AssistantVoiceOrb as te } from "./AssistantVoiceOrb.js";
|
|
7
|
+
import { VoiceMiniController as o } from "./VoiceMiniController.js";
|
|
8
|
+
import { VoiceStage as s } from "./VoiceStage.js";
|
|
9
|
+
import { VoiceTranscriptDrawer as c } from "./VoiceTranscriptDrawer.js";
|
|
10
|
+
import { useCallback as l, useEffect as u, useRef as d, useState as f } from "react";
|
|
11
|
+
import { Maximize2 as ne, Minimize2 as re, ScrollText as p, X as m } from "lucide-react";
|
|
12
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
13
13
|
//#region src/shared/assistant/ui/voice/AssistantVoiceSession.tsx
|
|
14
|
-
var
|
|
15
|
-
let F =
|
|
16
|
-
J.current =
|
|
17
|
-
let
|
|
18
|
-
I || q.current ||
|
|
19
|
-
}, [I,
|
|
20
|
-
|
|
14
|
+
var _ = ({ session: _, turns: b = [], onSaveTranscript: ie, onContinueInChat: ae, notice: x = null, spoken: S, onInterrupt: oe, onToggleMute: C, attachments: w = [], onAttachFiles: T, onRemoveAttachment: E, onRetryAttachment: D, canAttachMore: O = !0, preparingAttachments: k = 0, spokenChunks: A = null, onEnd: j, capturing: M = !0, interrupting: N = !1, awaitingEndpoint: P = !1 }) => {
|
|
15
|
+
let F = i(), { muted: I, error: L } = _, R = d(null), z = d(null), [B, V] = f("mini"), H = B === "full", U = B === "mini", W = B === "mini" ? "panel" : B === "panel" ? "full" : "mini", [G, K] = f(!1), q = d(!1), J = d(C);
|
|
16
|
+
J.current = C;
|
|
17
|
+
let se = l(() => {
|
|
18
|
+
I || q.current || r(_) || (q.current = !0, J.current());
|
|
19
|
+
}, [I, _]);
|
|
20
|
+
u(() => {
|
|
21
21
|
let e = () => {
|
|
22
22
|
q.current && (q.current = !1, J.current());
|
|
23
23
|
};
|
|
24
24
|
return window.addEventListener("focus", e), () => {
|
|
25
25
|
window.removeEventListener("focus", e), q.current = !1;
|
|
26
26
|
};
|
|
27
|
-
}, []),
|
|
27
|
+
}, []), u(() => {
|
|
28
28
|
R.current?.focus();
|
|
29
|
-
}, []),
|
|
29
|
+
}, []), u(() => {
|
|
30
30
|
let e = (e) => {
|
|
31
31
|
if (e.key === "Escape") {
|
|
32
32
|
if (G) {
|
|
33
33
|
K(!1);
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
j();
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
39
|
if (e.key !== "Tab" || !H) return;
|
|
@@ -44,13 +44,13 @@ var v = ({ session: v, turns: b = [], onSaveTranscript: x, onContinueInChat: S,
|
|
|
44
44
|
};
|
|
45
45
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
46
46
|
}, [
|
|
47
|
-
|
|
47
|
+
j,
|
|
48
48
|
H,
|
|
49
49
|
G
|
|
50
50
|
]);
|
|
51
|
-
let Y =
|
|
52
|
-
snapshot:
|
|
53
|
-
capturing:
|
|
51
|
+
let Y = x !== null && L === null, X = r(_), Z = n({
|
|
52
|
+
snapshot: _,
|
|
53
|
+
capturing: M,
|
|
54
54
|
interrupting: N,
|
|
55
55
|
awaitingEndpoint: P
|
|
56
56
|
}), Q = (() => {
|
|
@@ -66,7 +66,7 @@ var v = ({ session: v, turns: b = [], onSaveTranscript: x, onContinueInChat: S,
|
|
|
66
66
|
default: return Z;
|
|
67
67
|
}
|
|
68
68
|
})(), $ = I && Z !== "listening" && Q !== "" ? `${Q} · ${F("voiceSession.muted", "Microphone off")}` : Q;
|
|
69
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ g("div", {
|
|
70
70
|
ref: z,
|
|
71
71
|
className: `flex flex-col items-center justify-between bg-bg-sunken ${B === "full" ? "fixed inset-x-0 bottom-0 top-14 z-[60] px-6 py-8" : B === "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"}`,
|
|
72
72
|
role: "dialog",
|
|
@@ -74,103 +74,103 @@ var v = ({ session: v, turns: b = [], onSaveTranscript: x, onContinueInChat: S,
|
|
|
74
74
|
"aria-label": F("voiceSession.title", "Voice conversation"),
|
|
75
75
|
"data-testid": "assistant-voice-session",
|
|
76
76
|
children: [
|
|
77
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ g("button", {
|
|
78
78
|
ref: R,
|
|
79
79
|
type: "button",
|
|
80
|
-
onClick:
|
|
80
|
+
onClick: j,
|
|
81
81
|
className: `absolute ${H ? "right-6 top-6 h-14 gap-2 px-5 text-base" : U ? "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`,
|
|
82
82
|
title: F("voiceSession.end", "End the voice conversation"),
|
|
83
83
|
"data-testid": "assistant-voice-end",
|
|
84
|
-
children: [/* @__PURE__ */
|
|
84
|
+
children: [/* @__PURE__ */ h(m, {
|
|
85
85
|
className: H ? "size-6" : U ? "size-4" : "size-5",
|
|
86
86
|
"aria-hidden": "true"
|
|
87
|
-
}), /* @__PURE__ */
|
|
87
|
+
}), /* @__PURE__ */ h("span", {
|
|
88
88
|
className: `truncate whitespace-nowrap font-medium ${U ? "max-w-[3.5rem] text-xs" : "max-w-[7rem]"}`,
|
|
89
89
|
children: F("voiceSession.endShort", "End")
|
|
90
90
|
})]
|
|
91
91
|
}),
|
|
92
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ h("div", {
|
|
93
93
|
className: `flex flex-col items-center ${U ? "px-3" : `min-h-[1.5rem] ${Y ? H ? "pt-14" : "pt-10" : ""}`}`,
|
|
94
|
-
children: Y ? /* @__PURE__ */
|
|
94
|
+
children: Y ? /* @__PURE__ */ h("p", {
|
|
95
95
|
className: "max-w-xs text-center text-xs text-status-warning",
|
|
96
96
|
"data-testid": "assistant-voice-notice",
|
|
97
|
-
children:
|
|
97
|
+
children: v(x, F)
|
|
98
98
|
}) : null
|
|
99
99
|
}),
|
|
100
100
|
(() => {
|
|
101
|
-
let
|
|
102
|
-
session:
|
|
101
|
+
let n = /* @__PURE__ */ h(te, {
|
|
102
|
+
session: _,
|
|
103
103
|
compact: U,
|
|
104
104
|
connecting: Z === "connecting",
|
|
105
|
-
onPress: e(Z) ?
|
|
105
|
+
onPress: e(Z) ? oe : C,
|
|
106
106
|
label: e(Z) ? F("voiceSession.interrupt", "Stop the assistant and speak") : I ? F("voiceSession.unmute", "Turn the microphone on") : F("voiceSession.mute", "Turn the microphone off")
|
|
107
|
-
}),
|
|
108
|
-
return U ? /* @__PURE__ */
|
|
109
|
-
spokenChunks:
|
|
107
|
+
}), r = t(Z) ? S : X || null, i = L === null ? null : y(L, F);
|
|
108
|
+
return U ? /* @__PURE__ */ h(o, {
|
|
109
|
+
spokenChunks: A,
|
|
110
110
|
state: Z,
|
|
111
|
-
caption:
|
|
111
|
+
caption: r,
|
|
112
112
|
statusText: $,
|
|
113
|
-
errorText:
|
|
114
|
-
control:
|
|
115
|
-
}) : /* @__PURE__ */
|
|
113
|
+
errorText: i,
|
|
114
|
+
control: n
|
|
115
|
+
}) : /* @__PURE__ */ h(s, {
|
|
116
116
|
state: Z,
|
|
117
117
|
userCaption: X || null,
|
|
118
|
-
spokenChunks:
|
|
119
|
-
assistantCaption:
|
|
118
|
+
spokenChunks: A,
|
|
119
|
+
assistantCaption: S,
|
|
120
120
|
expanded: H,
|
|
121
121
|
statusText: $,
|
|
122
|
-
errorText:
|
|
123
|
-
control:
|
|
122
|
+
errorText: i,
|
|
123
|
+
control: n
|
|
124
124
|
});
|
|
125
125
|
})(),
|
|
126
|
-
G ? /* @__PURE__ */
|
|
126
|
+
G ? /* @__PURE__ */ h(c, {
|
|
127
127
|
turns: b,
|
|
128
128
|
onClose: () => K(!1),
|
|
129
|
-
onSave:
|
|
130
|
-
onContinueInChat:
|
|
129
|
+
onSave: ie,
|
|
130
|
+
onContinueInChat: ae
|
|
131
131
|
}) : null,
|
|
132
|
-
|
|
132
|
+
T ? /* @__PURE__ */ h("div", {
|
|
133
133
|
className: `absolute ${H ? "left-6 top-6" : U ? "left-11 top-2" : "left-3 top-3"}`,
|
|
134
|
-
children: /* @__PURE__ */
|
|
134
|
+
children: /* @__PURE__ */ h(ee, {
|
|
135
135
|
onFiles: (e) => {
|
|
136
|
-
|
|
136
|
+
T(e), V((e) => e === "mini" ? "panel" : e);
|
|
137
137
|
},
|
|
138
|
-
onPickerOpen:
|
|
138
|
+
onPickerOpen: se,
|
|
139
139
|
direction: "down",
|
|
140
|
-
canAddMore:
|
|
140
|
+
canAddMore: O
|
|
141
141
|
})
|
|
142
142
|
}) : null,
|
|
143
|
-
(
|
|
143
|
+
(w.length > 0 || k > 0) && !U ? /* @__PURE__ */ h("div", {
|
|
144
144
|
className: `absolute ${H ? "bottom-24 left-24 right-24" : "bottom-16 left-16 right-16"}`,
|
|
145
145
|
"data-testid": "assistant-voice-attachments",
|
|
146
|
-
children: /* @__PURE__ */
|
|
147
|
-
attachments:
|
|
148
|
-
onRemove:
|
|
149
|
-
onRetry:
|
|
150
|
-
preparingCount:
|
|
146
|
+
children: /* @__PURE__ */ h(a, {
|
|
147
|
+
attachments: w,
|
|
148
|
+
onRemove: E ?? (() => void 0),
|
|
149
|
+
onRetry: D ?? (() => void 0),
|
|
150
|
+
preparingCount: k
|
|
151
151
|
})
|
|
152
152
|
}) : null,
|
|
153
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ h("button", {
|
|
154
154
|
type: "button",
|
|
155
155
|
onClick: () => K((e) => !e),
|
|
156
156
|
className: `absolute ${H ? "bottom-6 right-6 size-14" : U ? "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`,
|
|
157
157
|
"aria-pressed": G,
|
|
158
158
|
"aria-label": F("voiceSession.transcript", "Voice transcript"),
|
|
159
159
|
"data-testid": "assistant-voice-transcript-toggle",
|
|
160
|
-
children: /* @__PURE__ */
|
|
160
|
+
children: /* @__PURE__ */ h(p, { className: H ? "size-6" : U ? "size-4" : "size-5" })
|
|
161
161
|
}),
|
|
162
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ h("button", {
|
|
163
163
|
type: "button",
|
|
164
164
|
onClick: () => V(W),
|
|
165
165
|
className: `absolute ${H ? "bottom-6 left-6 size-14" : U ? "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`,
|
|
166
166
|
"aria-label": W === "panel" ? F("voiceSession.expandPanel", "Show the conversation in the panel") : W === "full" ? F("voiceSession.expand", "Expand the conversation to full screen") : F("voiceSession.collapse", "Shrink to the compact controller"),
|
|
167
167
|
"data-testid": "assistant-voice-expand",
|
|
168
|
-
children: H ? /* @__PURE__ */
|
|
168
|
+
children: H ? /* @__PURE__ */ h(re, { className: "size-5" }) : /* @__PURE__ */ h(ne, { className: U ? "size-4" : "size-5" })
|
|
169
169
|
})
|
|
170
170
|
]
|
|
171
171
|
});
|
|
172
172
|
};
|
|
173
|
-
function
|
|
173
|
+
function v(e, t) {
|
|
174
174
|
switch (e) {
|
|
175
175
|
case "network": return t("voiceSession.noticeNetwork", "Speech recognition lost its connection. Check your network — it will retry.");
|
|
176
176
|
case "not-capturing": return t("voiceSession.noticeNotCapturing", "The microphone did not start. Check that this site is allowed to use it, then try again.");
|
|
@@ -188,4 +188,4 @@ function y(e, t) {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
//#endregion
|
|
191
|
-
export {
|
|
191
|
+
export { _ as AssistantVoiceSession };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voiceSession.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/voice/voiceSession.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,8EAA8E;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,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAY7E;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAClC,KAAK,EAAE,iBAAiB,EACxB,eAAe,EAAE,MAAM,GAAG,IAAI,GAC7B;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAItC;AAED,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,oBAAoB,CAMzD,CAAC;AAEH;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,oBAAoB,EAC9B,KAAK,EAAE,iBAAiB,EACxB,UAAU,GAAE,MAAM,GAAG,IAAW,GAC/B,oBAAoB,CA6FtB;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,oBAAoB,GAAG,OAAO,CAKnE;AAED,gFAAgF;AAChF,wBAAgB,OAAO,CAAC,QAAQ,EAAE,oBAAoB,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,CAatG"}
|
|
@@ -25,7 +25,22 @@ export declare function voiceStageState({ snapshot, capturing, interrupting, awa
|
|
|
25
25
|
export declare function showsUserCaption(state: VoiceStageState): boolean;
|
|
26
26
|
/** Does this stage show the assistant's caption? */
|
|
27
27
|
export declare function showsAssistantCaption(state: VoiceStageState): boolean;
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Is the microphone control an INTERRUPT rather than a mute toggle?
|
|
30
|
+
*
|
|
31
|
+
* ★★ `thinking` too, as of the cancellation work. It used to be `speaking`
|
|
32
|
+
* only, which meant the orb was inert for the whole time the model was
|
|
33
|
+
* generating — the user could only stop an answer that had already finished,
|
|
34
|
+
* which is not really interrupting. Everything that makes stopping a running
|
|
35
|
+
* turn safe now ships: the sandbox `/abort` route (verified in prod),
|
|
36
|
+
* `planTurnAbort` so a late abort cannot kill a newer turn, `planAbandonedTurn`
|
|
37
|
+
* so the cancelled turn's own loop stops, and `publishedChunks` so its caption
|
|
38
|
+
* cannot survive it. Those guards existed for an action the UI did not allow.
|
|
39
|
+
*
|
|
40
|
+
* ★ This is NOT the same question as "does this stage show the assistant's
|
|
41
|
+
* caption" — use `showsAssistantCaption` for that. The two coincided while both
|
|
42
|
+
* meant `speaking`, and one call site was reading this one to pick a caption.
|
|
43
|
+
*/
|
|
29
44
|
export declare function micIsInterrupt(state: VoiceStageState): boolean;
|
|
30
45
|
/**
|
|
31
46
|
* Does this stage show a LIVE waveform?
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voiceStageState.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/voice/voiceStageState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,MAAM,MAAM,eAAe,GACzB,YAAY,GAAG,WAAW,GAAG,gBAAgB,GAAG,UAAU,GAAG,UAAU,GAAG,cAAc,GAAG,WAAW,GAAG,OAAO,CAAC;AAEnH,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,kEAAkE;IAClE,SAAS,EAAE,OAAO,CAAC;IACnB,oFAAoF;IACpF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,SAAS,EACT,YAAoB,EACpB,gBAAwB,GACzB,EAAE,WAAW,GAAG,eAAe,CAwB/B;AAED,6EAA6E;AAC7E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAKhE;AAED,oDAAoD;AACpD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAErE;AAED
|
|
1
|
+
{"version":3,"file":"voiceStageState.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/voice/voiceStageState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,MAAM,MAAM,eAAe,GACzB,YAAY,GAAG,WAAW,GAAG,gBAAgB,GAAG,UAAU,GAAG,UAAU,GAAG,cAAc,GAAG,WAAW,GAAG,OAAO,CAAC;AAEnH,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,kEAAkE;IAClE,SAAS,EAAE,OAAO,CAAC;IACnB,oFAAoF;IACpF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,SAAS,EACT,YAAoB,EACpB,gBAAwB,GACzB,EAAE,WAAW,GAAG,eAAe,CAwB/B;AAED,6EAA6E;AAC7E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAKhE;AAED,oDAAoD;AACpD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAErE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAE9D;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAEhE;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAEjE"}
|