@burdenoff/fe-libs 2026.905.8 → 2026.906.1
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/index.d.ts +1 -0
- package/dist/shared/assistant/index.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantLanguageMenu.d.ts +27 -0
- package/dist/shared/assistant/ui/AssistantLanguageMenu.d.ts.map +1 -0
- package/dist/shared/assistant/ui/AssistantLanguageMenu.js +91 -0
- package/dist/shared/assistant/ui/AssistantMoreMenu.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantMoreMenu.js +1 -1
- package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts.map +1 -1
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +107 -114
- package/dist/shared-assistant.js +41 -40
- package/package.json +1 -1
|
@@ -81,6 +81,7 @@ export * from './ui/AssistantMarkdownImage';
|
|
|
81
81
|
export * from './ui/AssistantMarkdownRenderer';
|
|
82
82
|
export * from './ui/AssistantMessageAttachments';
|
|
83
83
|
export * from './ui/AssistantPendingWriteCard';
|
|
84
|
+
export * from './ui/AssistantLanguageMenu';
|
|
84
85
|
export * from './ui/AssistantReplyLanguageSelector';
|
|
85
86
|
export * from './ui/AssistantSpeakButton';
|
|
86
87
|
export * from './ui/AssistantSpokenTurnsNotice';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AAGxB,cAAc,wBAAwB,CAAC;AAKvC,cAAc,gBAAgB,CAAC;AA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from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Language, in ONE place.
|
|
4
|
+
*
|
|
5
|
+
* ★★ This replaces two controls that looked identical and lived apart: a globe
|
|
6
|
+
* chip in the composer (the language you SPEAK) and a separate row in this menu
|
|
7
|
+
* (the language the assistant ANSWERS in). Same icon, same kind of list, no
|
|
8
|
+
* visible words telling them apart — so they read as the same setting shown
|
|
9
|
+
* twice, and the person who commissioned the split read them that way too.
|
|
10
|
+
*
|
|
11
|
+
* ★ They are not quite the same, and the difference is worth keeping: reply
|
|
12
|
+
* language also chooses the VOICE, and a farmer may dictate in Tamil but want
|
|
13
|
+
* the answer in English to forward to a buyer. But that is an override, not a
|
|
14
|
+
* peer setting — so it is subordinate here rather than living somewhere else
|
|
15
|
+
* entirely.
|
|
16
|
+
*
|
|
17
|
+
* ★★ The default couples them. `replyLanguage: null` means MATCH THE INPUT, so
|
|
18
|
+
* a user who picks Tamil gets Tamil answers without touching the second row.
|
|
19
|
+
* The second row exists to BREAK that coupling, and announces the language it
|
|
20
|
+
* currently resolves to so "Match my language" is never a mystery.
|
|
21
|
+
*
|
|
22
|
+
* ★ Both stay native `<select>`s. On a phone that opens the OS picker, which
|
|
23
|
+
* already scrolls, searches and localises itself — worth far more across nine
|
|
24
|
+
* Indic languages than a custom dropdown that reimplements all three badly.
|
|
25
|
+
*/
|
|
26
|
+
export declare const AssistantLanguageMenu: FC;
|
|
27
|
+
//# sourceMappingURL=AssistantLanguageMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssistantLanguageMenu.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantLanguageMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAWzC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,qBAAqB,EAAE,EAyGnC,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { useI18n as e } from "../../providers/shell/I18nProvider.js";
|
|
2
|
+
import { ASSISTANT_LANGUAGES as t } from "../voice/languages.js";
|
|
3
|
+
import { resolveLanguagePair as n } from "../voice/languagePair.js";
|
|
4
|
+
import { useAssistantTr as r } from "../i18n.js";
|
|
5
|
+
import { useAssistantStore as i } from "../store.js";
|
|
6
|
+
import { useMemo as a } from "react";
|
|
7
|
+
import { Languages as o } from "lucide-react";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
|
+
//#region src/shared/assistant/ui/AssistantLanguageMenu.tsx
|
|
10
|
+
var l = "__match__", u = () => {
|
|
11
|
+
let u = r(), { locale: d } = e(), f = i((e) => e.assistantLanguage), p = i((e) => e.setAssistantLanguage), m = i((e) => e.replyLanguage), h = i((e) => e.setReplyLanguage), g = a(() => n(f, m, d), [
|
|
12
|
+
f,
|
|
13
|
+
m,
|
|
14
|
+
d
|
|
15
|
+
]), _ = u("language.inputLabel", "Language"), v = u("language.replyLabel", "Assistant replies in"), y = f ?? "";
|
|
16
|
+
return /* @__PURE__ */ c("div", {
|
|
17
|
+
"data-testid": "assistant-language-menu",
|
|
18
|
+
children: [/* @__PURE__ */ c("label", {
|
|
19
|
+
className: "relative flex cursor-pointer items-center gap-2.5 px-3 py-2 text-xs text-text-primary transition-colors hover:bg-bg-elevated focus-within:ring-2 focus-within:ring-border-strong",
|
|
20
|
+
title: `${_}: ${g.input.label}`,
|
|
21
|
+
"data-testid": "assistant-input-language",
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ s(o, {
|
|
24
|
+
className: "size-3.5 flex-shrink-0 text-text-secondary",
|
|
25
|
+
"aria-hidden": "true"
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ s("span", {
|
|
28
|
+
className: "flex-1",
|
|
29
|
+
children: _
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ s("span", {
|
|
32
|
+
className: "text-text-muted",
|
|
33
|
+
children: g.input.label
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ c("select", {
|
|
36
|
+
"aria-label": _,
|
|
37
|
+
value: y,
|
|
38
|
+
onChange: (e) => {
|
|
39
|
+
let t = e.target.value;
|
|
40
|
+
p(t === "" ? null : t);
|
|
41
|
+
},
|
|
42
|
+
className: "absolute inset-0 cursor-pointer opacity-0",
|
|
43
|
+
children: [/* @__PURE__ */ s("option", {
|
|
44
|
+
value: "",
|
|
45
|
+
children: u("voice.languageFollowApp", "Same as interface")
|
|
46
|
+
}), t.map((e) => /* @__PURE__ */ s("option", {
|
|
47
|
+
value: e.code,
|
|
48
|
+
children: e.label
|
|
49
|
+
}, e.code))]
|
|
50
|
+
})
|
|
51
|
+
]
|
|
52
|
+
}), /* @__PURE__ */ c("label", {
|
|
53
|
+
className: "relative flex cursor-pointer items-center gap-2.5 py-2 pl-9 pr-3 text-xs text-text-secondary transition-colors hover:bg-bg-elevated focus-within:ring-2 focus-within:ring-border-strong",
|
|
54
|
+
title: `${v}: ${g.reply.english}`,
|
|
55
|
+
"data-testid": "assistant-reply-language",
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ s("span", {
|
|
58
|
+
className: "flex-1",
|
|
59
|
+
children: v
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ s("span", {
|
|
62
|
+
className: "text-text-muted",
|
|
63
|
+
children: m === null ? `${u("language.replyMatch", "Match my language")} (${g.reply.label})` : g.reply.label
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ c("select", {
|
|
66
|
+
"aria-label": v,
|
|
67
|
+
value: m ?? l,
|
|
68
|
+
onChange: (e) => {
|
|
69
|
+
let t = e.target.value;
|
|
70
|
+
h(t === l ? null : t);
|
|
71
|
+
},
|
|
72
|
+
className: "absolute inset-0 cursor-pointer opacity-0",
|
|
73
|
+
children: [/* @__PURE__ */ c("option", {
|
|
74
|
+
value: l,
|
|
75
|
+
children: [
|
|
76
|
+
u("language.replyMatch", "Match my language"),
|
|
77
|
+
" (",
|
|
78
|
+
g.input.label,
|
|
79
|
+
")"
|
|
80
|
+
]
|
|
81
|
+
}), t.map((e) => /* @__PURE__ */ s("option", {
|
|
82
|
+
value: e.code,
|
|
83
|
+
children: e.label
|
|
84
|
+
}, e.code))]
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
})]
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
//#endregion
|
|
91
|
+
export { u as AssistantLanguageMenu };
|
|
@@ -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;AAgB7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,iBAAiB,EAAE,
|
|
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;AAgB7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAoM/B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useAssistantTr as e } from "../i18n.js";
|
|
2
2
|
import { useAssistantStore as t } from "../store.js";
|
|
3
3
|
import { useAssistantSpeech as n } from "./AssistantSpeechProvider.js";
|
|
4
|
-
import {
|
|
4
|
+
import { AssistantLanguageMenu as r } from "./AssistantLanguageMenu.js";
|
|
5
5
|
import { AssistantVoiceSelector as i } from "./composer/AssistantVoiceSelector.js";
|
|
6
6
|
import { downloadFile as a, exportConversation as o } from "../exportConversation.js";
|
|
7
7
|
import { useEffect as s, useRef as c, useState as l } from "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantComposer.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantComposer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQjD,OAAO,EAGL,KAAK,mBAAmB,EAEzB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"AssistantComposer.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantComposer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQjD,OAAO,EAGL,KAAK,mBAAmB,EAEzB,MAAM,mBAAmB,CAAC;AAO3B,UAAU,KAAK;IACb;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,mBAAmB,EAAE,KAAK,IAAI,CAAC;IACtE,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,qDAAqD;IACrD,cAAc,EAAE,mBAAmB,EAAE,CAAC;IACtC,YAAY,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAID;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,KAAK,CAuZvC,CAAC"}
|
|
@@ -1,185 +1,178 @@
|
|
|
1
1
|
import { useI18n as e } from "../../../providers/shell/I18nProvider.js";
|
|
2
2
|
import { useVoiceInput as t } from "../../voice/useVoiceInput.js";
|
|
3
|
-
import { languageDisplayName as
|
|
4
|
-
import { resolveAssistantLanguage as
|
|
3
|
+
import { languageDisplayName as ee } from "../../voice/speechVoices.js";
|
|
4
|
+
import { resolveAssistantLanguage as n } from "../../voice/languages.js";
|
|
5
5
|
import { useAssistantTr as r } from "../../i18n.js";
|
|
6
6
|
import { getSendableAttachments as i } from "../../attachments.js";
|
|
7
7
|
import { useAssistantStore as a } from "../../store.js";
|
|
8
8
|
import { AssistantAttachmentButton as o } from "./AssistantAttachmentButton.js";
|
|
9
9
|
import { AssistantAttachmentChips as s } from "./AssistantAttachmentChips.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
10
|
+
import { AssistantModeSelector as c } from "./AssistantModeSelector.js";
|
|
11
|
+
import { AssistantVoiceButton as te } from "./AssistantVoiceButton.js";
|
|
12
|
+
import { AssistantVoiceSessionButton as ne } from "../voice/AssistantVoiceSessionButton.js";
|
|
13
|
+
import { useAssistantAttachments as re } from "../../useAssistantAttachments.js";
|
|
14
|
+
import { useCallback as l, useLayoutEffect as ie, useMemo as u, useRef as d, useState as f } from "react";
|
|
15
|
+
import { ArrowUp as p, Loader2 as m } from "lucide-react";
|
|
16
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
18
17
|
//#region src/shared/assistant/ui/composer/AssistantComposer.tsx
|
|
19
|
-
var
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
}, []),
|
|
23
|
-
onFinalize:
|
|
24
|
-
language:
|
|
25
|
-
}),
|
|
26
|
-
|
|
27
|
-
let e =
|
|
28
|
-
e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight,
|
|
29
|
-
}, [
|
|
18
|
+
var _ = 200, v = ({ writeAccessDenied: v = !1, onSend: y, disabled: b = !1, placeholder: x, mode: S, availableModes: C, onModeChange: ae, onStartVoiceSession: w }) => {
|
|
19
|
+
let T = r(), { locale: E } = e(), D = d(null), [O, k] = f(""), [A, j] = f(!1), M = d(0), { attachments: N, isBusy: P, preparingCount: F, sendBlocker: I, rejection: L, addFiles: R, remove: z, retry: B, clear: V, clearRejection: H, canAddMore: U } = re(), oe = l((e) => {
|
|
20
|
+
k((t) => t ? `${t.replace(/\s+$/, "")} ${e}` : e);
|
|
21
|
+
}, []), W = a((e) => e.assistantLanguage), G = t({
|
|
22
|
+
onFinalize: oe,
|
|
23
|
+
language: u(() => n(W, E), [W, E]).tag
|
|
24
|
+
}), K = x ?? T("composer.placeholder", "Ask me anything…"), q = O.trim(), J = i(N), Y = N.filter((e) => e.status === "error"), X = (q.length > 0 || J.length > 0) && !b && I === null;
|
|
25
|
+
ie(() => {
|
|
26
|
+
let e = D.current;
|
|
27
|
+
e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, _)}px`);
|
|
28
|
+
}, [O]);
|
|
30
29
|
let Z = l(() => {
|
|
31
|
-
X && (
|
|
30
|
+
X && (G.isActive && G.stop(), y(O.trim(), J), k(""), V());
|
|
32
31
|
}, [
|
|
33
32
|
X,
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
y,
|
|
34
|
+
O,
|
|
36
35
|
J,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
]),
|
|
36
|
+
V,
|
|
37
|
+
G
|
|
38
|
+
]), se = l((e) => {
|
|
40
39
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Z());
|
|
41
|
-
}, [Z]),
|
|
40
|
+
}, [Z]), ce = l((e) => {
|
|
42
41
|
let t = Array.from(e.clipboardData?.files ?? []);
|
|
43
|
-
t.length !== 0 && (e.preventDefault(),
|
|
44
|
-
}, [
|
|
45
|
-
Array.from(e.dataTransfer?.types ?? []).includes("Files") && (
|
|
46
|
-
}, []),
|
|
47
|
-
|
|
48
|
-
}, []),
|
|
42
|
+
t.length !== 0 && (e.preventDefault(), R(t));
|
|
43
|
+
}, [R]), le = l((e) => {
|
|
44
|
+
Array.from(e.dataTransfer?.types ?? []).includes("Files") && (M.current += 1, j(!0));
|
|
45
|
+
}, []), ue = l(() => {
|
|
46
|
+
M.current = Math.max(0, M.current - 1), M.current === 0 && j(!1);
|
|
47
|
+
}, []), Q = l((e) => {
|
|
49
48
|
Array.from(e.dataTransfer?.types ?? []).includes("Files") && e.preventDefault();
|
|
50
|
-
}, []),
|
|
51
|
-
e.preventDefault(),
|
|
52
|
-
}, [
|
|
49
|
+
}, []), de = l((e) => {
|
|
50
|
+
e.preventDefault(), M.current = 0, j(!1), R(e.dataTransfer?.files ?? null);
|
|
51
|
+
}, [R]), fe = (e) => {
|
|
53
52
|
switch (e) {
|
|
54
|
-
case "too-many": return
|
|
55
|
-
case "too-large": return
|
|
56
|
-
case "empty": return
|
|
57
|
-
case "unreadable": return
|
|
58
|
-
case "unsupported-image": return
|
|
53
|
+
case "too-many": return T("attachments.tooMany", "You can attach up to {{max}} files per message.", { max: 5 });
|
|
54
|
+
case "too-large": return T("attachments.tooLarge", "That file is larger than 10 MB.");
|
|
55
|
+
case "empty": return T("attachments.empty", "That file is empty.");
|
|
56
|
+
case "unreadable": return T("attachments.unreadable", "That file could not be read.");
|
|
57
|
+
case "unsupported-image": return T("attachments.unsupportedImage", "This device can't read that image format, so it can't be resized to send. Save it as JPEG and try again.");
|
|
59
58
|
}
|
|
60
59
|
}, $ = (() => {
|
|
61
|
-
switch (
|
|
62
|
-
case "not-allowed": return
|
|
63
|
-
case "audio-capture": return
|
|
64
|
-
case "network": return
|
|
65
|
-
case "language-not-supported": return
|
|
66
|
-
case "unknown": return
|
|
60
|
+
switch (G.error) {
|
|
61
|
+
case "not-allowed": return T("voice.denied", "Microphone access is blocked. Allow it in your browser settings to dictate.");
|
|
62
|
+
case "audio-capture": return T("voice.noMic", "No microphone was found.");
|
|
63
|
+
case "network": return T("voice.network", "Speech recognition is offline right now.");
|
|
64
|
+
case "language-not-supported": return T("voice.languageNotSupported", "This browser cannot recognise spoken {{language}}. Try a different browser, or type instead.", { language: ee(G.language, E) });
|
|
65
|
+
case "unknown": return T("voice.failed", "Dictation stopped unexpectedly.");
|
|
67
66
|
default: return null;
|
|
68
67
|
}
|
|
69
68
|
})();
|
|
70
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ g("div", {
|
|
71
70
|
className: "flex-shrink-0 px-3 pb-3 pt-1.5",
|
|
72
71
|
children: [
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
onDragEnter:
|
|
75
|
-
onDragLeave:
|
|
76
|
-
onDragOver:
|
|
77
|
-
onDrop:
|
|
78
|
-
className: `rounded-2xl border p-2 shadow-sm transition-colors focus-within:border-action-primary-bg focus-within:ring-2 focus-within:ring-action-primary-bg/15 ${
|
|
72
|
+
/* @__PURE__ */ g("div", {
|
|
73
|
+
onDragEnter: le,
|
|
74
|
+
onDragLeave: ue,
|
|
75
|
+
onDragOver: Q,
|
|
76
|
+
onDrop: de,
|
|
77
|
+
className: `rounded-2xl border p-2 shadow-sm transition-colors focus-within:border-action-primary-bg focus-within:ring-2 focus-within:ring-action-primary-bg/15 ${A ? "border-action-primary-bg border-dashed bg-action-primary-bg/5" : "border-border-default bg-bg-sunken"}`,
|
|
79
78
|
"data-testid": "assistant-composer",
|
|
80
79
|
children: [
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
attachments:
|
|
83
|
-
onRemove:
|
|
84
|
-
onRetry:
|
|
85
|
-
disabled:
|
|
86
|
-
preparingCount:
|
|
80
|
+
/* @__PURE__ */ h(s, {
|
|
81
|
+
attachments: N,
|
|
82
|
+
onRemove: z,
|
|
83
|
+
onRetry: B,
|
|
84
|
+
disabled: b,
|
|
85
|
+
preparingCount: F
|
|
87
86
|
}),
|
|
88
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ g("div", {
|
|
89
88
|
className: "flex items-end gap-2",
|
|
90
89
|
children: [
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
onFiles:
|
|
93
|
-
canAddMore:
|
|
94
|
-
disabled:
|
|
90
|
+
/* @__PURE__ */ h(o, {
|
|
91
|
+
onFiles: R,
|
|
92
|
+
canAddMore: U,
|
|
93
|
+
disabled: b
|
|
95
94
|
}),
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
ref:
|
|
98
|
-
value:
|
|
99
|
-
onChange: (e) =>
|
|
100
|
-
onKeyDown:
|
|
101
|
-
onPaste:
|
|
102
|
-
disabled:
|
|
103
|
-
placeholder:
|
|
95
|
+
/* @__PURE__ */ h("textarea", {
|
|
96
|
+
ref: D,
|
|
97
|
+
value: O,
|
|
98
|
+
onChange: (e) => k(e.target.value),
|
|
99
|
+
onKeyDown: se,
|
|
100
|
+
onPaste: ce,
|
|
101
|
+
disabled: b,
|
|
102
|
+
placeholder: A ? T("composer.dropHere", "Drop files to attach") : K,
|
|
104
103
|
rows: 1,
|
|
105
104
|
className: "min-h-[36px] flex-1 resize-none self-center bg-transparent px-1 py-2 text-[15px] leading-relaxed text-text-primary placeholder:text-text-muted focus:outline-none disabled:opacity-50",
|
|
106
|
-
"aria-label":
|
|
105
|
+
"aria-label": T("chatInput.ariaLabel", "Message input"),
|
|
107
106
|
"data-testid": "assistant-input"
|
|
108
107
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
disabled:
|
|
114
|
-
}),
|
|
115
|
-
K.isSupported && /* @__PURE__ */ m(ne, {
|
|
116
|
-
isListening: K.isListening,
|
|
117
|
-
isStarting: K.isStarting,
|
|
118
|
-
onToggle: K.toggle,
|
|
119
|
-
disabled: y
|
|
108
|
+
G.isSupported && /* @__PURE__ */ h(te, {
|
|
109
|
+
isListening: G.isListening,
|
|
110
|
+
isStarting: G.isStarting,
|
|
111
|
+
onToggle: G.toggle,
|
|
112
|
+
disabled: b
|
|
120
113
|
}),
|
|
121
|
-
|
|
122
|
-
onStart:
|
|
123
|
-
disabled:
|
|
124
|
-
}) : /* @__PURE__ */
|
|
114
|
+
w && q.length === 0 && N.length === 0 && !G.isActive ? /* @__PURE__ */ h(ne, {
|
|
115
|
+
onStart: w,
|
|
116
|
+
disabled: b
|
|
117
|
+
}) : /* @__PURE__ */ h("button", {
|
|
125
118
|
type: "button",
|
|
126
119
|
onClick: Z,
|
|
127
120
|
disabled: !X,
|
|
128
121
|
className: `flex size-9 flex-shrink-0 items-center justify-center rounded-full shadow-sm transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong ${X ? "bg-action-primary-bg text-action-primary-text hover:scale-105 hover:bg-action-primary-bg-hover" : "bg-bg-elevated text-text-muted"}`,
|
|
129
|
-
"aria-label":
|
|
122
|
+
"aria-label": T("chatInput.send", "Send message"),
|
|
130
123
|
"data-testid": "assistant-send",
|
|
131
|
-
children:
|
|
124
|
+
children: b || P ? /* @__PURE__ */ h(m, { className: "size-4 animate-spin" }) : /* @__PURE__ */ h(p, { className: "size-4" })
|
|
132
125
|
})
|
|
133
126
|
]
|
|
134
127
|
}),
|
|
135
|
-
|
|
128
|
+
C.length > 1 && /* @__PURE__ */ h("div", {
|
|
136
129
|
className: "mt-2 px-0.5",
|
|
137
|
-
children: /* @__PURE__ */
|
|
138
|
-
mode:
|
|
139
|
-
availableModes:
|
|
140
|
-
onModeChange:
|
|
141
|
-
disabled:
|
|
130
|
+
children: /* @__PURE__ */ h(c, {
|
|
131
|
+
mode: S,
|
|
132
|
+
availableModes: C,
|
|
133
|
+
onModeChange: ae,
|
|
134
|
+
disabled: b
|
|
142
135
|
})
|
|
143
136
|
})
|
|
144
137
|
]
|
|
145
138
|
}),
|
|
146
|
-
|
|
139
|
+
v ? /* @__PURE__ */ h("p", {
|
|
147
140
|
className: "mt-1.5 px-1 text-center text-[11px] text-status-warning",
|
|
148
141
|
"data-testid": "assistant-write-access-warning",
|
|
149
|
-
children:
|
|
142
|
+
children: T("composer.writeAccessDenied", "Changes may not save — your role in this workspace does not currently allow edits. You can still plan and review an action.")
|
|
150
143
|
}) : null,
|
|
151
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ h("div", {
|
|
152
145
|
className: "mt-1.5 px-1 text-center text-[11px]",
|
|
153
146
|
"aria-live": "polite",
|
|
154
|
-
children:
|
|
147
|
+
children: G.isStarting && !G.isListening ? /* @__PURE__ */ h("p", {
|
|
155
148
|
className: "text-text-muted",
|
|
156
149
|
"data-testid": "assistant-voice-starting",
|
|
157
|
-
children:
|
|
158
|
-
}) :
|
|
150
|
+
children: T("voice.starting", "Starting the microphone…")
|
|
151
|
+
}) : G.isListening ? /* @__PURE__ */ g("p", {
|
|
159
152
|
className: "text-status-error-text",
|
|
160
153
|
"data-testid": "assistant-voice-status",
|
|
161
|
-
children: [/* @__PURE__ */
|
|
162
|
-
}) : $ ? /* @__PURE__ */
|
|
154
|
+
children: [/* @__PURE__ */ h("span", { className: "mr-1 inline-block size-1.5 rounded-full bg-status-error-text align-middle motion-safe:animate-pulse" }), G.interim || T("voice.listening", "Listening… speak now, tap the square to stop")]
|
|
155
|
+
}) : $ ? /* @__PURE__ */ h("p", {
|
|
163
156
|
className: "text-status-error-text",
|
|
164
157
|
"data-testid": "assistant-voice-error",
|
|
165
158
|
children: $
|
|
166
|
-
}) :
|
|
159
|
+
}) : L ? /* @__PURE__ */ h("button", {
|
|
167
160
|
type: "button",
|
|
168
|
-
onClick:
|
|
161
|
+
onClick: H,
|
|
169
162
|
className: "text-status-error-text underline-offset-2 hover:underline",
|
|
170
163
|
"data-testid": "assistant-attachment-rejection",
|
|
171
|
-
children:
|
|
172
|
-
}) :
|
|
164
|
+
children: fe(L)
|
|
165
|
+
}) : I === "failed" ? /* @__PURE__ */ h("p", {
|
|
173
166
|
className: "text-status-error-text",
|
|
174
167
|
"data-testid": "assistant-attachment-blocked",
|
|
175
|
-
children: Y.length === 1 ?
|
|
176
|
-
}) : /* @__PURE__ */
|
|
168
|
+
children: Y.length === 1 ? T("attachments.blockedOne", "{{name}} didn't upload. Retry or remove it before sending.", { name: Y[0].filename }) : T("attachments.blockedMany", "{{count}} attachments didn't upload. Retry or remove them before sending.", { count: Y.length })
|
|
169
|
+
}) : /* @__PURE__ */ h("p", {
|
|
177
170
|
className: "text-text-muted",
|
|
178
|
-
children:
|
|
171
|
+
children: T("composer.hint", "Enter to send · Shift+Enter for newline · drag or paste files to attach")
|
|
179
172
|
})
|
|
180
173
|
})
|
|
181
174
|
]
|
|
182
175
|
});
|
|
183
176
|
};
|
|
184
177
|
//#endregion
|
|
185
|
-
export {
|
|
178
|
+
export { v as AssistantComposer };
|
package/dist/shared-assistant.js
CHANGED
|
@@ -49,43 +49,44 @@ import { AssistantMarkdownImage as Sr, imageHostLabel as Cr, isRemoteImageSrc as
|
|
|
49
49
|
import { AssistantMarkdownRenderer as Tr, assistantUrlTransform as Er } from "./shared/assistant/ui/AssistantMarkdownRenderer.js";
|
|
50
50
|
import { AssistantMessageAttachments as Dr } from "./shared/assistant/ui/AssistantMessageAttachments.js";
|
|
51
51
|
import { AssistantPendingWriteCard as Or } from "./shared/assistant/ui/AssistantPendingWriteCard.js";
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
|
|
52
|
+
import { AssistantLanguageMenu as kr } from "./shared/assistant/ui/AssistantLanguageMenu.js";
|
|
53
|
+
import { AssistantReplyLanguageSelector as Ar } from "./shared/assistant/ui/AssistantReplyLanguageSelector.js";
|
|
54
|
+
import { AssistantSpeakButton as jr } from "./shared/assistant/ui/AssistantSpeakButton.js";
|
|
55
|
+
import { AssistantSpokenTurnsNotice as Mr } from "./shared/assistant/ui/AssistantSpokenTurnsNotice.js";
|
|
56
|
+
import { AssistantAttachmentButton as Nr } from "./shared/assistant/ui/composer/AssistantAttachmentButton.js";
|
|
57
|
+
import { AssistantAttachmentChips as Pr } from "./shared/assistant/ui/composer/AssistantAttachmentChips.js";
|
|
58
|
+
import { AssistantLanguageSelector as Fr, FOLLOW_APP_LOCALE as Ir } from "./shared/assistant/ui/composer/AssistantLanguageSelector.js";
|
|
59
|
+
import { ASSISTANT_MODE_META as Lr, AssistantModeSelector as Rr, nextModeIndex as zr } from "./shared/assistant/ui/composer/AssistantModeSelector.js";
|
|
60
|
+
import { AssistantVoiceButton as Br } from "./shared/assistant/ui/composer/AssistantVoiceButton.js";
|
|
61
|
+
import { AUTO_VOICE as Vr, AssistantVoiceSelector as Hr } from "./shared/assistant/ui/composer/AssistantVoiceSelector.js";
|
|
62
|
+
import { AssistantVoiceOrb as Ur } from "./shared/assistant/ui/voice/AssistantVoiceOrb.js";
|
|
63
|
+
import { AssistantVoiceSessionButton as Wr } from "./shared/assistant/ui/voice/AssistantVoiceSessionButton.js";
|
|
64
|
+
import { VoiceCaption as Gr } from "./shared/assistant/ui/voice/VoiceCaption.js";
|
|
65
|
+
import { VoiceConversationView as Kr } from "./shared/assistant/ui/voice/VoiceConversationView.js";
|
|
66
|
+
import { VoiceWaveform as qr } from "./shared/assistant/ui/voice/VoiceWaveform.js";
|
|
67
|
+
import { VoiceMiniController as Jr } from "./shared/assistant/ui/voice/VoiceMiniController.js";
|
|
68
|
+
import { VoiceStage as Yr } from "./shared/assistant/ui/voice/VoiceStage.js";
|
|
69
|
+
import { VoiceTranscriptDrawer as Xr } from "./shared/assistant/ui/voice/VoiceTranscriptDrawer.js";
|
|
70
|
+
import { downloadFile as Zr, exportConversation as Qr } from "./shared/assistant/exportConversation.js";
|
|
71
|
+
import { AssistantMoreMenu as $r } from "./shared/assistant/ui/AssistantMoreMenu.js";
|
|
72
|
+
import { AssistantHeader as ei } from "./shared/assistant/ui/AssistantHeader.js";
|
|
73
|
+
import { AssistantConversationList as ti } from "./shared/assistant/ui/AssistantConversationList.js";
|
|
74
|
+
import { AssistantEmptyState as ni } from "./shared/assistant/ui/AssistantEmptyState.js";
|
|
75
|
+
import { AssistantMessageItem as ri } from "./shared/assistant/ui/AssistantMessageItem.js";
|
|
76
|
+
import { AssistantMessageList as ii } from "./shared/assistant/ui/AssistantMessageList.js";
|
|
77
|
+
import { AssistantVoiceSession as ai } from "./shared/assistant/ui/voice/AssistantVoiceSession.js";
|
|
78
|
+
import { useAssistantApiAccess as oi } from "./shared/assistant/useAssistantApiAccess.js";
|
|
79
|
+
import { useConversationTurns as si } from "./shared/assistant/useConversationTurns.js";
|
|
80
|
+
import { isMultimodalBodyRejection as ci, isRecoverableAssistantError as li } from "./shared/assistant/transportErrors.js";
|
|
81
|
+
import { aiCreditsUpdatedEventName as ui, dispatchAssistantQuotaExhausted as di, notifyAiCreditsUpdated as fi } from "./shared/assistant/aiCredits.js";
|
|
82
|
+
import { useWorkspaceWriteAccess as pi } from "./shared/assistant/useWorkspaceWriteAccess.js";
|
|
83
|
+
import { extractDocumentText as mi } from "./shared/assistant/documentExtract.js";
|
|
84
|
+
import { useAssistantAttachments as hi } from "./shared/assistant/useAssistantAttachments.js";
|
|
85
|
+
import { AssistantComposer as gi } from "./shared/assistant/ui/composer/AssistantComposer.js";
|
|
86
|
+
import { isProdRuntime as _i } from "./shared/assistant/env.js";
|
|
87
|
+
import { useAssistantHeartbeat as vi } from "./shared/assistant/useAssistantHeartbeat.js";
|
|
88
|
+
import { useAssistantKeyboardShortcuts as yi } from "./shared/assistant/useAssistantKeyboardShortcuts.js";
|
|
89
|
+
import { AssistantApiCallsConsentDialog as bi } from "./shared/assistant/ui/AssistantApiCallsConsentDialog.js";
|
|
90
|
+
import { AssistantChatArea as xi } from "./shared/assistant/ui/AssistantChatArea.js";
|
|
91
|
+
import { AIAssistantPanel as Si } from "./shared/assistant/ui/AIAssistantPanel.js";
|
|
92
|
+
export { Si as AIAssistantPanel, h as ASSISTANT_API_AUTH_STRATEGY, Mt as ASSISTANT_LANGUAGES, Lr as ASSISTANT_MODE_META, Dn as ATTACHMENT_ACCEPT, hr as ATTACHMENT_SOURCES, Vr as AUTO_VOICE, bi as AssistantApiCallsConsentDialog, Nr as AssistantAttachmentButton, Pr as AssistantAttachmentChips, xr as AssistantAutoSpeakToggle, xi as AssistantChatArea, gi as AssistantComposer, ti as AssistantConversationList, ni as AssistantEmptyState, ei as AssistantHeader, Kt as AssistantI18nProvider, kr as AssistantLanguageMenu, Fr as AssistantLanguageSelector, Sr as AssistantMarkdownImage, Tr as AssistantMarkdownRenderer, Dr as AssistantMessageAttachments, ri as AssistantMessageItem, ii as AssistantMessageList, Rr as AssistantModeSelector, $r as AssistantMoreMenu, Or as AssistantPendingWriteCard, Bt as AssistantProductProvider, Ar as AssistantReplyLanguageSelector, G as AssistantRuntimeManager, jr as AssistantSpeakButton, cr as AssistantSpeechProvider, Mr as AssistantSpokenTurnsNotice, or as AssistantToolActivity, Br as AssistantVoiceButton, Ur as AssistantVoiceOrb, Hr as AssistantVoiceSelector, ai as AssistantVoiceSession, Wr as AssistantVoiceSessionButton, On as AttachmentRejectedError, sn as BOILERPLATE_PAGE_SHARE, o as CHECK_AI_CREDITS, s as CREATE_SANDBOX, pt as DEFAULT_SPEAKABLE_LABELS, Nt as DEFAULT_SPEECH_RATE, Be as ENDPOINT_GRACE_MS, c as EXTEND_SANDBOX_TTL, Ir as FOLLOW_APP_LOCALE, l as GET_ACTIVE_SANDBOXES, u as GET_SANDBOX, ge as HOSTED_TTS_MAX_CHARS, fe as HOSTED_TTS_TIER, pe as HOSTED_VOICES, en as IDLE_PLAYBACK, Ve as INITIAL_SESSION, kn as INLINE_IMAGE_MAX_DIM, An as INLINE_IMAGE_QUALITY, He as INTERRUPT_MAX_MS, Ue as INTERRUPT_MIN_MS, jn as MAX_ATTACHMENTS, cn as MAX_BOILERPLATE_LINE_CHARS, ln as MAX_EXTRACTED_CHARS, Mn as MAX_FILE_BYTES, Nn as MAX_INLINE_CHARS_PER_FILE, Pn as MAX_INLINE_CHARS_TOTAL, an as MAX_INLINE_IMAGE_BASE64_BYTES, Fn as MAX_INLINE_IMAGE_BASE64_CHARS, In as MAX_INLINE_IMAGE_PARTS, Ln as MAX_INLINE_TURN_BODY_BYTES, un as MAX_PDF_PAGES_SCANNED, on as MAX_REQUEST_BODY_BYTES, mt as MAX_SPEAKABLE_CHARS, ht as MAX_SPOKEN_TABLE_ROWS, Rn as MAX_TURN_BODY_BYTES, dn as MIN_PAGE_TEXT_CHARS, fn as MIN_TEXT_PAGE_SHARE, Tt as POLL_FAST_MS, Et as POLL_FAST_UNTIL_MS, Dt as POLL_SLOW_MS, Ot as POLL_STEADY_MS, kt as POLL_STEADY_UNTIL_MS, Ct as PREVIEW_LANGUAGES, zn as PROMPT_ENVELOPE_RESERVE_BYTES, d as PROXY_SANDBOX_REQUEST, f as REPORT_AI_TOKEN_USAGE, vr as SANDBOX_READY_TTL_MS, We as SILENCE_SUBMIT_MS, _e as SPEAKING_RATE_MAX, ve as SPEAKING_RATE_MAX_STREAMING, ye as SPEAKING_RATE_MAX_SYNC, be as SPEAKING_RATE_MIN, gt as SPEECH_CHUNK_CHARS, _t as SPEECH_CHUNK_CJK_CHARS, Qe as SPEECH_LANG, Xt as SPOKEN_LABEL_LANGUAGES, p as STOP_ASSISTANT_SANDBOX, Bn as TURN_BODY_HEADROOM_BYTES, $e as VOICE_LIST_TIMEOUT_MS, Gr as VoiceCaption, Kr as VoiceConversationView, Jr as VoiceMiniController, Yr as VoiceStage, Xr as VoiceTranscriptDrawer, qr as VoiceWaveform, m as WAIT_FOR_SANDBOX_RUNNING, ui as aiCreditsUpdatedEventName, qt as assistantTranslationKey, Er as assistantUrlTransform, gr as availableAttachmentSources, xe as base64ToBytes, de as browserSpeechEngine, T as buildAssistantSandboxEnv, Vn as buildAttachmentPromptBlock, ut as buildContinuedFromVoiceNote, K as buildProgress, Hn as buildPromptParts, E as buildPromptRequestBody, Un as buildPromptWithAttachments, Se as buildRequest, i as buildSandboxContextInput, dt as buildVoiceTranscriptMarkdown, ie as chatTurns, D as checkAssistantAiCredits, vt as chunkForSpeech, Wn as classifyAttachment, Ce as classifyHttpFailure, t as classifyQuotaError, pn as columnLetterToIndex, ke as configureSpeechEngine, yt as containsCjk, dr as copyToClipboard, Gn as countInlineImageCandidates, Kn as countInlinedImageParts, O as createAssistantSandbox, k as createAssistantSession, De as createHostedTtsEngine, yr as createReadinessTracker, Oe as createRoutingSpeechEngine, ne as createSandboxAssistantTransport, Ae as createSpeechEngines, we as decodeAudioResponse, mn as decodeXmlEntities, qn as detectDocumentFormat, Qt as detectScriptLocale, _r as deviceHasCamera, di as dispatchAssistantQuotaExhausted, hn as docxXmlToText, A as downloadAssistantArtifact, Zr as downloadFile, Jn as estimateTurnBodyBytes, a as executeSandboxGraphQL, Qr as exportConversation, j as extendAssistantSandboxTTL, mi as extractDocumentText, Pt as findAssistantLanguage, M as findExistingSandbox, Rt as findPendingWrite, gn as fitPdfPages, Yn as formatBytes, _n as formatPageRanges, fr as getActorId, N as getAssistantArtifacts, q as getAssistantMedia, P as getAssistantMessages, F as getAssistantSession, I as getAssistantStreamAccess, J as getAssistantText, Xn as getAttachmentSendBlocker, x as getCapability, Zn as getExtension, g as getImageForMode, _ as getImageTagForMode, pr as getOrganizationId, Y as getRawMessageCreatedAt, v as getResourcesForMode, y as getSandboxImageRegistry, Qn as getSendableAttachments, je as getSpeechEngine, X as getToolProgress, mr as getWorkspaceId, ae as groupBySession, oe as groupConsecutiveBySession, $n as hasAttachmentWorkInFlight, me as hostedLocaleFor, he as hostedSupportsLanguage, Cr as imageHostLabel, Ge as isCapturing, Ke as isEcho, vn as isMostlyImagePages, ci as isMultimodalBodyRejection, _i as isProdRuntime, n as isQuotaExhaustedError, Z as isReapedSandboxConnectionError, br as isRecentlyVerified, Q as isRecoverable, li as isRecoverableAssistantError, wr as isRemoteImageSrc, tn as isSpeakingMessage, et as isSpeechBlocked, qe as isSubmittable, ar as isTurnInFlight, S as isUnknownFieldError, se as isVoiceTurn, yn as joinSheets, tt as languageDisplayName, $ as mapSessionToHistory, C as markSupported, w as markUnsupported, ee as mergeMessagesById, Pe as micIsInterrupt, L as modeRequiresConfirmWrites, zr as nextModeIndex, nt as normalizeLangTag, fi as notifyAiCreditsUpdated, Je as orbMode, bn as pageMarker, zt as parseConfirmationRefusal, er as parseDataUrl, xn as parseSharedStrings, sr as parseToolActivity, Sn as parseWorkbookSheets, Cn as pdfTextItemsToPage, Ye as planReplyConsumption, At as pollDelayMs, rt as primaryLanguageSubtag, r as quotaExhaustedEventName, Me as readSpeechEngineConfig, It as replyFollowsInput, R as reportAssistantAiTokenUsage, nn as requiresCancel, Ne as resetSpeechEngine, Ft as resolveAssistantLanguage, Lt as resolveLanguagePair, Vt as resolveModeConfig, b as resolveSandboxAssistantMode, $t as resolveSpeechLocale, te as sanitize, z as selectExistingAssistantSandbox, it as selectVoiceForLocale, B as sendAssistantPromptAsync, V as sendHeartbeat, wn as sheetXmlToRows, Te as shouldDisableEngine, Fe as showsAssistantCaption, Ie as showsUserCaption, bt as speakableEmail, at as speechGate, Zt as speechLabelsFor, ot as speechLangForLocale, rn as speechPlaybackReducer, Ee as splitForVendor, xt as splitTableRow, Xe as spokenSoFar, H as stopReapedAssistantSandbox, Tn as summarisePageText, jt as toCaptionText, tr as toMessageAttachment, St as toSpeakableText, nr as truncateForInline, En as truncatePagesForInline, oi as useAssistantApiAccess, hi as useAssistantAttachments, vi as useAssistantHeartbeat, Jt as useAssistantI18nNamespace, yi as useAssistantKeyboardShortcuts, Ht as useAssistantPageLabel, Ut as useAssistantProduct, Wt as useAssistantProductOrNull, lr as useAssistantSpeech, Gt as useAssistantStorageFolders, ir as useAssistantStore, Yt as useAssistantTr, si as useConversationTurns, re as useSandboxAssistantTransport, e as useVoiceInput, ur as useVoiceSession, pi as useWorkspaceWriteAccess, rr as validateFile, st as voiceAvailability, ce as voiceMarker, wt as voicePreviewText, ct as voiceQualityRank, le as voiceSessionIdOf, Ze as voiceSessionReducer, Le as voiceStageState, ft as voiceTranscriptFilename, ue as voiceTurnsOnly, lt as voicesForLocale, U as waitForAssistantServiceReady, W as waitForSandboxRunning, Re as waveformIsActive, ze as waveformIsSettled };
|