@burdenoff/fe-libs 2026.1005.1 → 2026.1005.3
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/chrome/ContextSwitcher.d.ts +2 -0
- package/dist/chrome/ContextSwitcher.d.ts.map +1 -1
- package/dist/chrome/ContextSwitcher.js +70 -67
- package/dist/chrome/contextSwitcher/ProjectList.d.ts +1 -0
- package/dist/chrome/contextSwitcher/ProjectList.d.ts.map +1 -1
- package/dist/chrome/contextSwitcher/ProjectList.js +18 -5
- package/dist/node_modules/fflate/esm/browser.js +3 -3
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +51 -51
- package/dist/node_modules/pdfjs-dist/build/pdf.js +2268 -1656
- package/dist/node_modules/pdfjs-dist/build/pdf.worker.min.js +8719 -7535
- package/dist/shared/assistant/attachments.js +1 -0
- package/dist/shared/assistant/i18nManifest.d.ts +4 -0
- package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
- package/dist/shared/assistant/i18nManifest.js +4 -0
- package/dist/shared/assistant/images.js +1 -1
- package/dist/shared/assistant/index.d.ts +16 -0
- package/dist/shared/assistant/index.d.ts.map +1 -1
- package/dist/shared/assistant/runtime.js +1 -0
- package/dist/shared/assistant/speech/browserSpeechEngine.d.ts.map +1 -1
- package/dist/shared/assistant/speech/browserSpeechEngine.js +46 -45
- package/dist/shared/assistant/speech/createSpeechEngine.js +1 -1
- package/dist/shared/assistant/speech/hostedTtsSpeechEngine.d.ts.map +1 -1
- package/dist/shared/assistant/speech/hostedTtsSpeechEngine.js +80 -79
- package/dist/shared/assistant/store.d.ts +3 -0
- package/dist/shared/assistant/store.d.ts.map +1 -1
- package/dist/shared/assistant/store.js +43 -35
- package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.js +1076 -1074
- package/dist/shared/assistant/ui/AssistantMoreMenu.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantMoreMenu.js +59 -57
- package/dist/shared/assistant/ui/composer/AssistantHandsFreeInterruptToggle.d.ts +17 -0
- package/dist/shared/assistant/ui/composer/AssistantHandsFreeInterruptToggle.d.ts.map +1 -0
- package/dist/shared/assistant/ui/composer/AssistantHandsFreeInterruptToggle.js +34 -0
- package/dist/shared/assistant/ui/useVoiceSession.d.ts +29 -2
- package/dist/shared/assistant/ui/useVoiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/ui/useVoiceSession.js +247 -213
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +2 -0
- package/dist/shared/assistant/uiActions/deixis.js +1 -1
- package/dist/shared/assistant/voice/handsfree/audioTrackTransport.d.ts +33 -0
- package/dist/shared/assistant/voice/handsfree/audioTrackTransport.d.ts.map +1 -0
- package/dist/shared/assistant/voice/handsfree/audioTrackTransport.js +98 -0
- package/dist/shared/assistant/voice/handsfree/backendStreamTransport.d.ts +34 -0
- package/dist/shared/assistant/voice/handsfree/backendStreamTransport.d.ts.map +1 -0
- package/dist/shared/assistant/voice/handsfree/backendStreamTransport.js +130 -0
- package/dist/shared/assistant/voice/handsfree/bargeIn.d.ts +43 -0
- package/dist/shared/assistant/voice/handsfree/bargeIn.d.ts.map +1 -0
- package/dist/shared/assistant/voice/handsfree/bargeIn.js +32 -0
- package/dist/shared/assistant/voice/handsfree/captureWorklet.d.ts +47 -0
- package/dist/shared/assistant/voice/handsfree/captureWorklet.d.ts.map +1 -0
- package/dist/shared/assistant/voice/handsfree/captureWorklet.js +85 -0
- package/dist/shared/assistant/voice/handsfree/echoGate.d.ts +140 -0
- package/dist/shared/assistant/voice/handsfree/echoGate.d.ts.map +1 -0
- package/dist/shared/assistant/voice/handsfree/echoGate.js +198 -0
- package/dist/shared/assistant/voice/handsfree/handsFreeController.d.ts +77 -0
- package/dist/shared/assistant/voice/handsfree/handsFreeController.d.ts.map +1 -0
- package/dist/shared/assistant/voice/handsfree/handsFreeController.js +126 -0
- package/dist/shared/assistant/voice/handsfree/handsFreeRuntime.d.ts +15 -0
- package/dist/shared/assistant/voice/handsfree/handsFreeRuntime.d.ts.map +1 -0
- package/dist/shared/assistant/voice/handsfree/handsFreeRuntime.js +78 -0
- package/dist/shared/assistant/voice/handsfree/handsFreeSetting.d.ts +26 -0
- package/dist/shared/assistant/voice/handsfree/handsFreeSetting.d.ts.map +1 -0
- package/dist/shared/assistant/voice/handsfree/handsFreeSetting.js +25 -0
- package/dist/shared/assistant/voice/handsfree/micCapture.d.ts +21 -0
- package/dist/shared/assistant/voice/handsfree/micCapture.d.ts.map +1 -0
- package/dist/shared/assistant/voice/handsfree/micCapture.js +73 -0
- package/dist/shared/assistant/voice/handsfree/playbackReference.d.ts +38 -0
- package/dist/shared/assistant/voice/handsfree/playbackReference.d.ts.map +1 -0
- package/dist/shared/assistant/voice/handsfree/playbackReference.js +55 -0
- package/dist/shared/assistant/voice/handsfree/preRollRing.d.ts +32 -0
- package/dist/shared/assistant/voice/handsfree/preRollRing.d.ts.map +1 -0
- package/dist/shared/assistant/voice/handsfree/preRollRing.js +34 -0
- package/dist/shared/assistant/voice/handsfree/sttTransport.d.ts +94 -0
- package/dist/shared/assistant/voice/handsfree/sttTransport.d.ts.map +1 -0
- package/dist/shared/assistant/voice/handsfree/sttTransport.js +27 -0
- package/dist/shared/assistant/voice/handsfree/useHandsFreeInterrupt.d.ts +33 -0
- package/dist/shared/assistant/voice/handsfree/useHandsFreeInterrupt.d.ts.map +1 -0
- package/dist/shared/assistant/voice/handsfree/useHandsFreeInterrupt.js +70 -0
- package/dist/shared/assistant/voice/handsfree/vad.d.ts +55 -0
- package/dist/shared/assistant/voice/handsfree/vad.d.ts.map +1 -0
- package/dist/shared/assistant/voice/handsfree/vad.js +41 -0
- package/dist/shared/assistant/voice/handsfree/webSpeechTransport.d.ts +3 -0
- package/dist/shared/assistant/voice/handsfree/webSpeechTransport.d.ts.map +1 -0
- package/dist/shared/assistant/voice/handsfree/webSpeechTransport.js +16 -0
- package/dist/shared/assistant/voice/voiceSession.d.ts +9 -0
- package/dist/shared/assistant/voice/voiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/voice/voiceSession.js +2 -2
- package/dist/shared/assistant/voice/voiceTranscript.js +14 -14
- package/dist/shared/config/gatewayUrls.js +2 -2
- package/dist/shared/graphql/workspaceToken.d.ts +1 -0
- package/dist/shared/graphql/workspaceToken.d.ts.map +1 -1
- package/dist/shared/graphql/workspaceToken.js +18 -14
- package/dist/shared/plugins/iframe-mount/client/message-bus.js +1 -0
- package/dist/shared/plugins/iframe-mount/client/rpc.js +1 -0
- package/dist/shared/providers/shell/ActiveContextProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/ActiveContextProvider.js +165 -144
- package/dist/shared/providers/shell/AuthTokenProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/AuthTokenProvider.js +51 -46
- package/dist/shared/providers/shell/WorkspaceWideSelection.d.ts +10 -0
- package/dist/shared/providers/shell/WorkspaceWideSelection.d.ts.map +1 -0
- package/dist/shared/providers/shell/WorkspaceWideSelection.js +37 -0
- package/dist/shared/providers/shell/index.d.ts +2 -0
- package/dist/shared/providers/shell/index.d.ts.map +1 -1
- package/dist/shared/tours/TourTooltip.js +8 -8
- package/dist/shared/utils/format.js +1 -1
- package/dist/shared/utils/gatewayFetchRewrite.js +1 -1
- package/dist/shared-assistant.js +218 -202
- package/dist/shared-providers-shell.js +25 -24
- package/package.json +18 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantMoreMenu.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantMoreMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AssistantMoreMenu.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantMoreMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAmB7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,iBAAiB,EAAE,EA4M/B,CAAC"}
|
|
@@ -5,116 +5,118 @@ import { AssistantLanguageMenu as r } from "./AssistantLanguageMenu.js";
|
|
|
5
5
|
import { useDropdownEscape as i } from "./useDropdownEscape.js";
|
|
6
6
|
import { AssistantVoiceSelector as a } from "./composer/AssistantVoiceSelector.js";
|
|
7
7
|
import { AssistantVoiceGraceSelector as o } from "./composer/AssistantVoiceGraceSelector.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
import { AssistantHandsFreeInterruptToggle as s } from "./composer/AssistantHandsFreeInterruptToggle.js";
|
|
9
|
+
import { downloadFile as c, exportConversation as l } from "../exportConversation.js";
|
|
10
|
+
import { useEffect as u, useRef as d, useState as f } from "react";
|
|
11
|
+
import { Check as p, FileJson as m, FileText as h, MoreHorizontal as g, Play as _, Volume2 as v } from "lucide-react";
|
|
12
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
12
13
|
//#region src/shared/assistant/ui/AssistantMoreMenu.tsx
|
|
13
|
-
var
|
|
14
|
-
let
|
|
15
|
-
i(
|
|
16
|
-
if (!
|
|
14
|
+
var S = () => {
|
|
15
|
+
let S = e(), [C, w] = f(!1), T = d(null), E = d(null), { conversations: D, activeConversationId: O, processingByConversationId: k } = t(), A = D.find((e) => e.id === O), j = !!(A && A.messages.length > 0), { isSupported: M, isBlocked: N, disabledReason: P, autoSpeakEnabled: F, setAutoSpeak: I, stop: L, previewVoice: R, activeVoiceName: z } = n(), B = N && !F;
|
|
16
|
+
i(C, T, E, () => w(!1)), u(() => {
|
|
17
|
+
if (!C) return;
|
|
17
18
|
let e = (e) => {
|
|
18
19
|
let t = e.target;
|
|
19
|
-
|
|
20
|
+
T.current?.contains(t) || E.current?.contains(t) || w(!1);
|
|
20
21
|
};
|
|
21
22
|
return document.addEventListener("mousedown", e), () => {
|
|
22
23
|
document.removeEventListener("mousedown", e);
|
|
23
24
|
};
|
|
24
|
-
}, [
|
|
25
|
-
let
|
|
26
|
-
if (!
|
|
27
|
-
let { content: t, filename: n, mimeType: r } =
|
|
28
|
-
processing:
|
|
29
|
-
tr:
|
|
25
|
+
}, [C]);
|
|
26
|
+
let V = (e) => {
|
|
27
|
+
if (!A) return;
|
|
28
|
+
let { content: t, filename: n, mimeType: r } = l(A, e, {
|
|
29
|
+
processing: k[A.id],
|
|
30
|
+
tr: S
|
|
30
31
|
});
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
return /* @__PURE__ */
|
|
32
|
+
c(t, n, r), w(!1);
|
|
33
|
+
}, H = () => {
|
|
34
|
+
F && L(), I(!F);
|
|
35
|
+
}, U = S("header.more", "More options");
|
|
36
|
+
return /* @__PURE__ */ x("div", {
|
|
36
37
|
className: "relative",
|
|
37
|
-
children: [/* @__PURE__ */
|
|
38
|
-
ref:
|
|
38
|
+
children: [/* @__PURE__ */ b("button", {
|
|
39
|
+
ref: E,
|
|
39
40
|
type: "button",
|
|
40
|
-
onClick: () =>
|
|
41
|
+
onClick: () => w((e) => !e),
|
|
41
42
|
className: "rounded p-1 transition-colors hover:bg-bg-elevated",
|
|
42
|
-
"aria-label":
|
|
43
|
+
"aria-label": U,
|
|
43
44
|
"aria-haspopup": "menu",
|
|
44
|
-
"aria-expanded":
|
|
45
|
+
"aria-expanded": C,
|
|
45
46
|
"data-testid": "assistant-more",
|
|
46
|
-
children: /* @__PURE__ */
|
|
47
|
-
}),
|
|
48
|
-
ref:
|
|
47
|
+
children: /* @__PURE__ */ b(g, { className: "size-4 text-text-secondary" })
|
|
48
|
+
}), C ? /* @__PURE__ */ x("div", {
|
|
49
|
+
ref: T,
|
|
49
50
|
role: "menu",
|
|
50
|
-
"aria-label":
|
|
51
|
+
"aria-label": U,
|
|
51
52
|
className: "absolute right-0 top-full z-50 mt-1 min-w-56 overflow-hidden rounded-xl border border-border-default bg-bg-surface py-1 shadow-lg",
|
|
52
53
|
"data-testid": "assistant-more-menu",
|
|
53
54
|
children: [
|
|
54
|
-
|
|
55
|
+
M ? /* @__PURE__ */ x("button", {
|
|
55
56
|
type: "button",
|
|
56
57
|
role: "menuitemcheckbox",
|
|
57
|
-
"aria-checked":
|
|
58
|
-
onClick:
|
|
59
|
-
disabled:
|
|
60
|
-
title:
|
|
58
|
+
"aria-checked": F,
|
|
59
|
+
onClick: H,
|
|
60
|
+
disabled: B,
|
|
61
|
+
title: B ? P ?? void 0 : void 0,
|
|
61
62
|
className: "flex w-full items-center gap-2.5 px-3 py-2 text-left text-xs text-text-primary transition-colors hover:bg-bg-elevated disabled:cursor-not-allowed disabled:text-text-muted disabled:hover:bg-transparent",
|
|
62
63
|
"data-testid": "assistant-auto-speak",
|
|
63
64
|
children: [
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ b(v, {
|
|
65
66
|
className: "size-3.5 flex-shrink-0 text-text-secondary",
|
|
66
67
|
"aria-hidden": "true"
|
|
67
68
|
}),
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ b("span", {
|
|
69
70
|
className: "flex-1",
|
|
70
|
-
children:
|
|
71
|
+
children: S("header.autoRead", "Auto-read replies")
|
|
71
72
|
}),
|
|
72
|
-
|
|
73
|
+
F ? /* @__PURE__ */ b(p, { className: "size-3.5 flex-shrink-0 text-action-primary-bg" }) : null
|
|
73
74
|
]
|
|
74
75
|
}) : null,
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ b(r, {}),
|
|
77
|
+
/* @__PURE__ */ x("div", {
|
|
77
78
|
className: "flex items-center gap-1 px-3 py-1.5",
|
|
78
79
|
"data-testid": "assistant-more-voice",
|
|
79
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ b(a, {}), z ? /* @__PURE__ */ x("button", {
|
|
80
81
|
type: "button",
|
|
81
|
-
onClick: () =>
|
|
82
|
+
onClick: () => R(z),
|
|
82
83
|
className: "flex items-center gap-1 rounded-md px-1.5 py-1 text-[11px] text-text-muted transition-colors hover:bg-bg-elevated hover:text-text-secondary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong",
|
|
83
|
-
"aria-label":
|
|
84
|
+
"aria-label": S("voice.preview", "Hear this voice"),
|
|
84
85
|
"data-testid": "assistant-voice-preview",
|
|
85
|
-
children: [/* @__PURE__ */
|
|
86
|
+
children: [/* @__PURE__ */ b(_, {
|
|
86
87
|
className: "size-3",
|
|
87
88
|
"aria-hidden": "true"
|
|
88
|
-
}),
|
|
89
|
+
}), S("voice.previewShort", "Preview")]
|
|
89
90
|
}) : null]
|
|
90
91
|
}),
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
/* @__PURE__ */ b(o, {}),
|
|
93
|
+
/* @__PURE__ */ b(s, {}),
|
|
94
|
+
j ? /* @__PURE__ */ x(y, { children: [
|
|
95
|
+
/* @__PURE__ */ b("div", {
|
|
94
96
|
className: "my-1 border-t border-border-subtle",
|
|
95
97
|
role: "separator"
|
|
96
98
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ x("button", {
|
|
98
100
|
type: "button",
|
|
99
101
|
role: "menuitem",
|
|
100
|
-
onClick: () =>
|
|
102
|
+
onClick: () => V("json"),
|
|
101
103
|
className: "flex w-full items-center gap-2.5 px-3 py-2 text-left text-xs text-text-primary transition-colors hover:bg-bg-elevated",
|
|
102
104
|
"data-testid": "export-json",
|
|
103
|
-
children: [/* @__PURE__ */
|
|
105
|
+
children: [/* @__PURE__ */ b(m, {
|
|
104
106
|
className: "size-3.5 flex-shrink-0 text-text-secondary",
|
|
105
107
|
"aria-hidden": "true"
|
|
106
|
-
}),
|
|
108
|
+
}), S("export.json", "Export as JSON")]
|
|
107
109
|
}),
|
|
108
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ x("button", {
|
|
109
111
|
type: "button",
|
|
110
112
|
role: "menuitem",
|
|
111
|
-
onClick: () =>
|
|
113
|
+
onClick: () => V("markdown"),
|
|
112
114
|
className: "flex w-full items-center gap-2.5 px-3 py-2 text-left text-xs text-text-primary transition-colors hover:bg-bg-elevated",
|
|
113
115
|
"data-testid": "export-markdown",
|
|
114
|
-
children: [/* @__PURE__ */
|
|
116
|
+
children: [/* @__PURE__ */ b(h, {
|
|
115
117
|
className: "size-3.5 flex-shrink-0 text-text-secondary",
|
|
116
118
|
"aria-hidden": "true"
|
|
117
|
-
}),
|
|
119
|
+
}), S("export.markdown", "Export as Markdown")]
|
|
118
120
|
})
|
|
119
121
|
] }) : null
|
|
120
122
|
]
|
|
@@ -122,4 +124,4 @@ var x = () => {
|
|
|
122
124
|
});
|
|
123
125
|
};
|
|
124
126
|
//#endregion
|
|
125
|
-
export {
|
|
127
|
+
export { S as AssistantMoreMenu };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* "Hands-free interrupt (beta)" (BOFF-8613, H3): let the assistant listen while
|
|
4
|
+
* it answers, so speaking over it stops it and the correction is heard. Default
|
|
5
|
+
* OFF; with it off nothing of this feature runs.
|
|
6
|
+
*
|
|
7
|
+
* Beta, and honest about its limit: it works best with headphones, because on a
|
|
8
|
+
* speaker the assistant's own voice is what the microphone hears. Tap-to-
|
|
9
|
+
* interrupt on the orb is always there as the fallback.
|
|
10
|
+
*
|
|
11
|
+
* A real checkbox inside its `<label>`, so the visible words are the accessible
|
|
12
|
+
* name (WCAG 2.5.3) and it is reachable by keyboard and speech control. Renders
|
|
13
|
+
* nothing where this browser can neither capture nor recognise speech: a
|
|
14
|
+
* setting that cannot do anything is not offered.
|
|
15
|
+
*/
|
|
16
|
+
export declare const AssistantHandsFreeInterruptToggle: FC;
|
|
17
|
+
//# sourceMappingURL=AssistantHandsFreeInterruptToggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssistantHandsFreeInterruptToggle.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantHandsFreeInterruptToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAOhC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iCAAiC,EAAE,EAkC/C,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { isSpeechRecognitionSupported as e } from "../../voice/useVoiceInput.js";
|
|
2
|
+
import { useAssistantTr as t } from "../../i18n.js";
|
|
3
|
+
import { useAssistantStore as n } from "../../store.js";
|
|
4
|
+
import { isMicCaptureSupported as r } from "../../voice/handsfree/micCapture.js";
|
|
5
|
+
import { Mic as i } from "lucide-react";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
//#region src/shared/assistant/ui/composer/AssistantHandsFreeInterruptToggle.tsx
|
|
8
|
+
var s = () => {
|
|
9
|
+
let s = t(), c = n((e) => e.handsFreeInterrupt), l = n((e) => e.setHandsFreeInterrupt);
|
|
10
|
+
return !e() && !r() ? null : /* @__PURE__ */ o("label", {
|
|
11
|
+
className: "flex items-center gap-2.5 px-3 py-2 text-xs text-text-primary focus-within:ring-2 focus-within:ring-inset focus-within:ring-border-strong",
|
|
12
|
+
title: s("voice.handsFreeHint", "Let the assistant listen while it answers, so you can speak over it to correct it. Works best with headphones. You can always tap to interrupt."),
|
|
13
|
+
"data-testid": "assistant-hands-free-interrupt",
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ a(i, {
|
|
16
|
+
className: "size-3.5 flex-shrink-0 text-text-secondary",
|
|
17
|
+
"aria-hidden": "true"
|
|
18
|
+
}),
|
|
19
|
+
/* @__PURE__ */ a("span", {
|
|
20
|
+
className: "flex-1",
|
|
21
|
+
children: s("voice.handsFreeLabel", "Hands-free interrupt (beta)")
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ a("input", {
|
|
24
|
+
type: "checkbox",
|
|
25
|
+
checked: c,
|
|
26
|
+
onChange: (e) => l(e.target.checked),
|
|
27
|
+
className: "size-4 accent-current",
|
|
28
|
+
"data-testid": "assistant-hands-free-interrupt-checkbox"
|
|
29
|
+
})
|
|
30
|
+
]
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { s as AssistantHandsFreeInterruptToggle };
|
|
@@ -10,7 +10,11 @@ import { VoiceSessionSnapshot } from '../voice/voiceSession';
|
|
|
10
10
|
* dead, and nothing anywhere said otherwise. `useVoiceInput` reports `network`
|
|
11
11
|
* and `unknown` and the session ignored both.
|
|
12
12
|
*/
|
|
13
|
-
export type VoiceSessionNotice = "network" | "not-capturing" | "nothing-heard" | "recognition-failed"
|
|
13
|
+
export type VoiceSessionNotice = "network" | "not-capturing" | "nothing-heard" | "recognition-failed"
|
|
14
|
+
/** H3: a barge-in stopped the assistant but no words followed (a cough, a door). */
|
|
15
|
+
| "hands-free-nothing-heard"
|
|
16
|
+
/** H3: hands-free gave up for this conversation; the tap-first path is in charge. */
|
|
17
|
+
| "hands-free-fallback";
|
|
14
18
|
/**
|
|
15
19
|
* A line the PANEL says in the voice conversation, outside any turn (BOFF-7803
|
|
16
20
|
* FE9: the readback of a change that waits for its button).
|
|
@@ -71,6 +75,18 @@ interface Options {
|
|
|
71
75
|
* the submit timer waits (`planSubmitTimer`); anything else is the default.
|
|
72
76
|
*/
|
|
73
77
|
graceMs?: VoiceGraceMs | number;
|
|
78
|
+
/**
|
|
79
|
+
* BOFF-8613 H3: the viewer's "Hands-free interrupt (beta)" setting. Default
|
|
80
|
+
* OFF; with it off nothing of the hands-free capture exists at runtime.
|
|
81
|
+
*/
|
|
82
|
+
handsFreeInterrupt?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* H3: the user's voice started while the assistant was answering. The audio
|
|
85
|
+
* is already stopped and the session is back to `listening`; the owner of the
|
|
86
|
+
* turn cancels it through the existing abort wiring (guarded
|
|
87
|
+
* `POST /sessions/:id/abort`, `markTurnSuperseded`, `speechFeed.abort`).
|
|
88
|
+
*/
|
|
89
|
+
onBargeIn?: () => void;
|
|
74
90
|
/**
|
|
75
91
|
* H2: a correction was heard while a turn was still being prepared. Cancel
|
|
76
92
|
* that turn — abort it on the sandbox, record it as superseded
|
|
@@ -98,7 +114,7 @@ export interface VoiceSubmitMeta {
|
|
|
98
114
|
* microphone's lifetime, and turning "auto-speak is currently on" back off again
|
|
99
115
|
* when the session ends.
|
|
100
116
|
*/
|
|
101
|
-
export declare function useVoiceSession({ onSubmit, latestReply, language, graceMs: graceChoice, onSupersede, }: Options): {
|
|
117
|
+
export declare function useVoiceSession({ onSubmit, latestReply, language, graceMs: graceChoice, onSupersede, handsFreeInterrupt, onBargeIn, }: Options): {
|
|
102
118
|
session: Readonly<VoiceSessionSnapshot>;
|
|
103
119
|
/** A recoverable problem worth showing, or null when all is well. */
|
|
104
120
|
notice: VoiceSessionNotice | null;
|
|
@@ -130,6 +146,17 @@ export declare function useVoiceSession({ onSubmit, latestReply, language, grace
|
|
|
130
146
|
holding: boolean;
|
|
131
147
|
/** H2: what is being collected corrects a turn that was superseded. */
|
|
132
148
|
correcting: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* H3: the hands-free interrupt state. `nothingHeard` is a barge-in that
|
|
151
|
+
* produced no words ("Say that again, or tap to replay"); `mode` says
|
|
152
|
+
* whether it is running, unavailable, or has fallen back to tap-first.
|
|
153
|
+
*/
|
|
154
|
+
handsFree: {
|
|
155
|
+
mode: import('..').HandsFreeMode;
|
|
156
|
+
nothingHeard: boolean;
|
|
157
|
+
transportKind: import('..').SttTransportKind | null;
|
|
158
|
+
fallbackReason: import('..').FallbackReason | null;
|
|
159
|
+
};
|
|
133
160
|
/** Can a session be offered at all on this device? */
|
|
134
161
|
available: boolean;
|
|
135
162
|
start: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVoiceSession.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/useVoiceSession.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useVoiceSession.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/useVoiceSession.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAe,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIpE,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAgBL,KAAK,oBAAoB,EAE1B,MAAM,uBAAuB,CAAC;AAsC/B;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAC1B,SAAS,GACT,eAAe,GACf,eAAe,GACf,oBAAoB;AACtB,oFAAoF;GAClF,0BAA0B;AAC5B,qFAAqF;GACnF,qBAAqB,CAAC;AAE1B;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,iFAAiF;IACjF,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC;CAC7B;AAMD,UAAU,OAAO;IACf,+EAA+E;IAC/E;;;;;;;OAOG;IACH,QAAQ,EAAE,CACR,IAAI,EAAE,MAAM,EACZ,cAAc,EAAE,MAAM;IACtB;;;OAGG;IACH,MAAM,EAAE,eAAe;IACvB;;;;;OAKG;IACH,IAAI,EAAE,eAAe,KAClB,IAAI,CAAC;IACV;;;;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;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;IAChC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,oEAAoE;AACpE,MAAM,WAAW,eAAe;IAC9B,gEAAgE;IAChE,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,OAAO,EAAE,WAAW,EACpB,WAAW,EACX,kBAAkB,EAClB,SAAS,GACV,EAAE,OAAO;;IA48BJ,qEAAqE;;IAQrE;;;;;;;OAOG;;IAEH,+DAA+D;;IAE/D;;;;;;;OAOG;;IAIH,0EAA0E;;IAE1E,6DAA6D;;IAE7D,kEAAkE;;IAElE,uEAAuE;;IAEvE;;;;OAIG;;;;;;;IAOH,sDAAsD;;;;uCA3HvC,MAAM;;;IAkIrB,qDAAqD;;IAErD,uDAAuD;;IAEvD,0EAA0E;qBAr4B1C,iBAAiB;IAu4BjD;;;OAGG;+BAr5BuC,OAAO;IAu5BjD;;;OAGG;0BAp3BE,iBAAiB;EAu5B3B"}
|