@burdenoff/fe-libs 2026.923.1 → 2026.923.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/shared/assistant/ui/AIAssistantPanel.d.ts +15 -0
- package/dist/shared/assistant/ui/AIAssistantPanel.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AIAssistantPanel.js +34 -33
- package/dist/shared/assistant/ui/AssistantOverlay.d.ts +2 -1
- package/dist/shared/assistant/ui/AssistantOverlay.d.ts.map +1 -1
- package/dist/shared/assistant/ui/composer/AssistantAttachmentButton.d.ts.map +1 -1
- package/dist/shared/assistant/ui/composer/AssistantAttachmentButton.js +49 -49
- package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.d.ts +16 -0
- package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.d.ts.map +1 -1
- package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.js +32 -36
- package/dist/shared/assistant/ui/composer/connectSource.d.ts +49 -2
- package/dist/shared/assistant/ui/composer/connectSource.d.ts.map +1 -1
- package/dist/shared/assistant/ui/composer/connectSource.js +44 -9
- package/dist/shared/assistant/ui/useVoiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/ui/useVoiceSession.js +1 -1
- 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
|
@@ -36,6 +36,21 @@ export type AIAssistantPanelProps = PanelProps & {
|
|
|
36
36
|
* opens in a new tab.
|
|
37
37
|
*/
|
|
38
38
|
connectSourceHref?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Open this product's OWN connection surface in place, instead of navigating
|
|
41
|
+
* to `connectSourceHref`.
|
|
42
|
+
*
|
|
43
|
+
* ★ Preferred over `connectSourceHref` when both are given. Navigating away
|
|
44
|
+
* tears the user out of the conversation they were having, which is exactly
|
|
45
|
+
* what was reported: "connect-source is opening the page but I need a popup
|
|
46
|
+
* in the centre."
|
|
47
|
+
*
|
|
48
|
+
* ★ The product supplies this, not this library. The connection screen lives
|
|
49
|
+
* in `microfe-integrations` — Layer 2 — and this is Layer 0/1, so it cannot
|
|
50
|
+
* render that surface itself. A host renders it inside a dialog of its own
|
|
51
|
+
* and hands the opener here; nothing below needs to know what it shows.
|
|
52
|
+
*/
|
|
53
|
+
onConnectSource?: () => void;
|
|
39
54
|
/**
|
|
40
55
|
* An optional product preview surface, shown as an overlay over the chat.
|
|
41
56
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AIAssistantPanel.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AIAssistantPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAU,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAMtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAIvE,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,6BAA6B,CAAC;AAkBrC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAGnE,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG;IAC/C,gEAAgE;IAChE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B;;;;;;;;;OASG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,0BAA0B,CAAC;CACtC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"AIAssistantPanel.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AIAssistantPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAU,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAMtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAIvE,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,6BAA6B,CAAC;AAkBrC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAGnE,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG;IAC/C,gEAAgE;IAChE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B;;;;;;;;;OASG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;;;;;;;;OAaG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,0BAA0B,CAAC;CACtC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAqOtD,CAAC"}
|
|
@@ -18,31 +18,31 @@ import { AssistantChatArea as x } from "./AssistantChatArea.js";
|
|
|
18
18
|
import { useRef as S, useState as C } from "react";
|
|
19
19
|
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
20
20
|
//#region src/shared/assistant/ui/AIAssistantPanel.tsx
|
|
21
|
-
var E = ({ onClose: E, visible: D, docked: O, onToggleDock: k, writeAccess: A, onNavigate: j, connectSourceHref: M,
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
let
|
|
25
|
-
f(p(
|
|
26
|
-
let
|
|
27
|
-
historyOpen:
|
|
28
|
-
previewOpen:
|
|
29
|
-
}),
|
|
21
|
+
var E = ({ onClose: E, visible: D, docked: O, onToggleDock: k, writeAccess: A, onNavigate: j, connectSourceHref: M, onConnectSource: N, preview: P }) => {
|
|
22
|
+
let F = t(), [I, L] = C(!1);
|
|
23
|
+
I && !P && L(!1);
|
|
24
|
+
let R = I && !!P;
|
|
25
|
+
f(p(P, m()));
|
|
26
|
+
let z = S(null), { conversations: B, activeConversationId: V, conversationListOpen: H, setConversationListOpen: U, createConversation: W } = r(), G = H || R, K = c({
|
|
27
|
+
historyOpen: H,
|
|
28
|
+
previewOpen: R
|
|
29
|
+
}), q = (e) => {
|
|
30
30
|
let t = u({
|
|
31
|
-
historyOpen:
|
|
32
|
-
previewOpen:
|
|
31
|
+
historyOpen: H,
|
|
32
|
+
previewOpen: R
|
|
33
33
|
}, e);
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
y(
|
|
37
|
-
let
|
|
34
|
+
U(t.historyOpen), L(t.previewOpen);
|
|
35
|
+
}, J = B.find((e) => e.id === V);
|
|
36
|
+
y(J?.backendSessionId ?? null, J?.mode ?? null, D ?? !0), v(D ?? !0);
|
|
37
|
+
let Y = e(D !== !1);
|
|
38
38
|
return b({
|
|
39
|
-
panelRef:
|
|
39
|
+
panelRef: z,
|
|
40
40
|
onClose: () => {
|
|
41
41
|
if (l({
|
|
42
|
-
historyOpen:
|
|
43
|
-
previewOpen:
|
|
42
|
+
historyOpen: H,
|
|
43
|
+
previewOpen: R
|
|
44
44
|
}) === "overlay") {
|
|
45
|
-
|
|
45
|
+
U(!1), L(!1);
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
48
|
E();
|
|
@@ -50,41 +50,42 @@ var E = ({ onClose: E, visible: D, docked: O, onToggleDock: k, writeAccess: A, o
|
|
|
50
50
|
}), /* @__PURE__ */ w(i, {
|
|
51
51
|
visible: D ?? !0,
|
|
52
52
|
children: /* @__PURE__ */ w(d, {
|
|
53
|
-
value:
|
|
53
|
+
value: P,
|
|
54
54
|
children: /* @__PURE__ */ w(n, {
|
|
55
55
|
value: j,
|
|
56
56
|
children: /* @__PURE__ */ w(a, {
|
|
57
57
|
value: M,
|
|
58
|
+
onOpen: N,
|
|
58
59
|
children: /* @__PURE__ */ T("div", {
|
|
59
|
-
ref:
|
|
60
|
+
ref: z,
|
|
60
61
|
className: "relative flex h-full w-full flex-col bg-bg-surface",
|
|
61
62
|
role: "complementary",
|
|
62
|
-
"aria-label":
|
|
63
|
+
"aria-label": F("panel.ariaLabel", "AI Assistant"),
|
|
63
64
|
"data-testid": "ai-assistant-panel",
|
|
64
65
|
[s]: "",
|
|
65
|
-
...
|
|
66
|
+
...K ? { [o]: K } : {},
|
|
66
67
|
tabIndex: -1,
|
|
67
68
|
children: [
|
|
68
69
|
/* @__PURE__ */ w("div", {
|
|
69
70
|
className: "contents",
|
|
70
|
-
inert:
|
|
71
|
+
inert: G || void 0,
|
|
71
72
|
children: /* @__PURE__ */ w(g, {
|
|
72
|
-
contextLabel:
|
|
73
|
-
onNewConversation: () =>
|
|
74
|
-
onOpenHistory: () =>
|
|
75
|
-
historyOpen:
|
|
76
|
-
onTogglePreview: () =>
|
|
77
|
-
previewOpen:
|
|
73
|
+
contextLabel: Y,
|
|
74
|
+
onNewConversation: () => W(),
|
|
75
|
+
onOpenHistory: () => q("history"),
|
|
76
|
+
historyOpen: H,
|
|
77
|
+
onTogglePreview: () => q("preview"),
|
|
78
|
+
previewOpen: R,
|
|
78
79
|
onClose: E,
|
|
79
80
|
docked: O,
|
|
80
81
|
onToggleDock: k
|
|
81
82
|
})
|
|
82
83
|
}),
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
H && /* @__PURE__ */ w(_, {}),
|
|
85
|
+
R && /* @__PURE__ */ w(h, { onClose: () => L(!1) }),
|
|
85
86
|
/* @__PURE__ */ w("div", {
|
|
86
87
|
className: "contents",
|
|
87
|
-
inert:
|
|
88
|
+
inert: G || void 0,
|
|
88
89
|
children: /* @__PURE__ */ w(x, {
|
|
89
90
|
visible: D ?? !0,
|
|
90
91
|
writeAccess: A
|
|
@@ -79,7 +79,8 @@ export interface AssistantOverlayProps {
|
|
|
79
79
|
panelId?: string;
|
|
80
80
|
/**
|
|
81
81
|
* Extra props for the default `AIAssistantPanel` — `writeAccess`,
|
|
82
|
-
* `connectSourceHref`, `preview`. The overlay's own props
|
|
82
|
+
* `connectSourceHref`, `onConnectSource`, `preview`. The overlay's own props
|
|
83
|
+
* always win.
|
|
83
84
|
*
|
|
84
85
|
* ★★ `preview` is bridged HERE, by the overlay, not by the panel — so a
|
|
85
86
|
* product surface outside the panel keeps following a run after the assistant
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantOverlay.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantOverlay.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAUL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAI1C,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,EAmBL,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,+EAA+E;IAC/E,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,oBAAoB,CAAC;CAC5B;AAID,uEAAuE;AACvE,wBAAgB,yBAAyB,IAAI,4BAA4B,GAAG,IAAI,CAE/E;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AA6BD;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,WAAW,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,GACnD,IAAI,CAaN;AAID,MAAM,WAAW,6BAA6B;IAC5C;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;KACtD,CAAC;IACF,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,KAAK,EACL,QAAQ,GACT,EAAE,6BAA6B,2CAkE/B;AAED,mDAAmD;AACnD,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC;AAED,MAAM,WAAW,qBAAqB;IACpC,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB
|
|
1
|
+
{"version":3,"file":"AssistantOverlay.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantOverlay.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAUL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAI1C,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,EAmBL,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,+EAA+E;IAC/E,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,oBAAoB,CAAC;CAC5B;AAID,uEAAuE;AACvE,wBAAgB,yBAAyB,IAAI,4BAA4B,GAAG,IAAI,CAE/E;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AA6BD;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,WAAW,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,GACnD,IAAI,CAaN;AAID,MAAM,WAAW,6BAA6B;IAC5C;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;KACtD,CAAC;IACF,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,KAAK,EACL,QAAQ,GACT,EAAE,6BAA6B,2CAkE/B;AAED,mDAAmD;AACnD,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC;AAED,MAAM,WAAW,qBAAqB;IACpC,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,qBAAqB,EAAE,MAAM,0BAA0B,CAAC,CAAC;IAC3E;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,0BAA0B,KAAK,SAAS,CAAC;IAC/D;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,kFAAkF;IAClF,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9C,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,kEAAkE;IAClE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kFAAkF;IAClF,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAOD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,kDAI5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantAttachmentButton.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantAttachmentButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AssistantAttachmentButton.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantAttachmentButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAiBf,UAAU,KAAK;IACb,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC1B,wEAAwE;IACxE,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AASD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,KAAK,CA2L/C,CAAC"}
|
|
@@ -1,88 +1,88 @@
|
|
|
1
1
|
import { useAssistantTr as e } from "../../i18n.js";
|
|
2
2
|
import "../../attachments.js";
|
|
3
3
|
import { availableAttachmentSources as t, deviceHasCamera as n } from "../../attachmentSources.js";
|
|
4
|
-
import {
|
|
5
|
-
import { AssistantConnectSourceItem as
|
|
6
|
-
import { useDropdownEscape as
|
|
7
|
-
import { useCallback as
|
|
8
|
-
import { Camera as
|
|
9
|
-
import { jsx as
|
|
4
|
+
import { hasConnectSource as r, useAssistantConnectSource as i } from "./connectSource.js";
|
|
5
|
+
import { AssistantConnectSourceItem as a } from "./AssistantConnectSourceItem.js";
|
|
6
|
+
import { useDropdownEscape as o } from "../useDropdownEscape.js";
|
|
7
|
+
import { useCallback as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
8
|
+
import { Camera as f, FileText as p, FolderOpen as m, ImageIcon as h, Plus as g } from "lucide-react";
|
|
9
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
10
10
|
//#region src/shared/assistant/ui/composer/AssistantAttachmentButton.tsx
|
|
11
|
-
var
|
|
12
|
-
camera:
|
|
13
|
-
gallery:
|
|
14
|
-
documents:
|
|
15
|
-
files:
|
|
16
|
-
},
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
if (!
|
|
11
|
+
var y = {
|
|
12
|
+
camera: f,
|
|
13
|
+
gallery: h,
|
|
14
|
+
documents: p,
|
|
15
|
+
files: m
|
|
16
|
+
}, b = ({ onFiles: f, onPickerOpen: p, direction: m = "up", canAddMore: h, disabled: b = !1 }) => {
|
|
17
|
+
let x = e(), S = u(null), C = u(null), w = u(null), [T, E] = d(!1), D = u(p);
|
|
18
|
+
D.current = p;
|
|
19
|
+
let O = l(() => t(n()), []), k = r(i()), A = h || k, j = h ? k ? `${x("composer.attach", "Attach files or photos")} · ${x("composer.connectSource", "Connect a source")}` : x("composer.attach", "Attach files or photos") : x("composer.attachFull", "Attachment limit reached ({{max}})", { max: 5 });
|
|
20
|
+
o(T, C, w, () => E(!1)), c(() => {
|
|
21
|
+
if (!T) return;
|
|
22
22
|
let e = (e) => {
|
|
23
23
|
let t = e.target;
|
|
24
|
-
|
|
24
|
+
C.current?.contains(t) || w.current?.contains(t) || E(!1);
|
|
25
25
|
};
|
|
26
26
|
return window.addEventListener("mousedown", e), () => {
|
|
27
27
|
window.removeEventListener("mousedown", e);
|
|
28
28
|
};
|
|
29
|
-
}, [
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
}, [
|
|
33
|
-
let t =
|
|
34
|
-
t && (t.accept = e.accept, t.multiple = e.multiple, e.capture ? t.setAttribute("capture", e.capture) : t.removeAttribute("capture"),
|
|
29
|
+
}, [T]);
|
|
30
|
+
let M = s((e) => {
|
|
31
|
+
f(e.target.files), e.target.value = "";
|
|
32
|
+
}, [f]), N = s((e) => {
|
|
33
|
+
let t = S.current;
|
|
34
|
+
t && (t.accept = e.accept, t.multiple = e.multiple, e.capture ? t.setAttribute("capture", e.capture) : t.removeAttribute("capture"), E(!1), D.current?.(), t.click());
|
|
35
35
|
}, []);
|
|
36
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ v("div", {
|
|
37
37
|
className: "relative flex-shrink-0",
|
|
38
38
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
ref:
|
|
39
|
+
/* @__PURE__ */ _("input", {
|
|
40
|
+
ref: S,
|
|
41
41
|
type: "file",
|
|
42
42
|
multiple: !0,
|
|
43
43
|
className: "hidden",
|
|
44
|
-
onChange:
|
|
44
|
+
onChange: M,
|
|
45
45
|
tabIndex: -1,
|
|
46
46
|
"aria-hidden": "true",
|
|
47
47
|
"data-testid": "assistant-attach-input"
|
|
48
48
|
}),
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
ref:
|
|
49
|
+
/* @__PURE__ */ _("button", {
|
|
50
|
+
ref: w,
|
|
51
51
|
type: "button",
|
|
52
|
-
onClick: () =>
|
|
53
|
-
disabled:
|
|
54
|
-
title:
|
|
55
|
-
"aria-label":
|
|
52
|
+
onClick: () => E((e) => !e),
|
|
53
|
+
disabled: b || !A,
|
|
54
|
+
title: j,
|
|
55
|
+
"aria-label": j,
|
|
56
56
|
"aria-haspopup": "menu",
|
|
57
|
-
"aria-expanded":
|
|
57
|
+
"aria-expanded": T,
|
|
58
58
|
className: "flex size-9 items-center justify-center rounded-full border border-border-subtle bg-bg-elevated text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:cursor-not-allowed disabled:text-text-muted disabled:hover:bg-bg-elevated",
|
|
59
59
|
"data-testid": "assistant-attach",
|
|
60
|
-
children: /* @__PURE__ */ g
|
|
60
|
+
children: /* @__PURE__ */ _(g, { className: "size-4" })
|
|
61
61
|
}),
|
|
62
|
-
|
|
63
|
-
ref:
|
|
62
|
+
T ? /* @__PURE__ */ v("div", {
|
|
63
|
+
ref: C,
|
|
64
64
|
role: "menu",
|
|
65
|
-
"aria-label":
|
|
66
|
-
className: `absolute ${
|
|
65
|
+
"aria-label": x("composer.attachSource", "Attach from"),
|
|
66
|
+
className: `absolute ${m === "up" ? "bottom-full mb-2" : "top-full mt-2"} left-0 z-30 min-w-44 overflow-hidden rounded-xl border border-border-default bg-bg-elevated py-1 shadow-lg`,
|
|
67
67
|
"data-testid": "assistant-attach-menu",
|
|
68
|
-
children: [
|
|
69
|
-
let t =
|
|
70
|
-
return /* @__PURE__ */
|
|
68
|
+
children: [O.map((e) => {
|
|
69
|
+
let t = y[e.id];
|
|
70
|
+
return /* @__PURE__ */ v("button", {
|
|
71
71
|
type: "button",
|
|
72
72
|
role: "menuitem",
|
|
73
|
-
disabled: !
|
|
74
|
-
onClick: () =>
|
|
73
|
+
disabled: !h,
|
|
74
|
+
onClick: () => N(e),
|
|
75
75
|
className: "flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm text-text-primary transition-colors hover:bg-bg-sunken focus:outline-none focus-visible:bg-bg-sunken disabled:cursor-not-allowed disabled:text-text-muted disabled:hover:bg-transparent",
|
|
76
76
|
"data-testid": `assistant-attach-source-${e.id}`,
|
|
77
|
-
children: [/* @__PURE__ */
|
|
77
|
+
children: [/* @__PURE__ */ _(t, {
|
|
78
78
|
className: "size-4 flex-shrink-0 text-text-secondary",
|
|
79
79
|
"aria-hidden": "true"
|
|
80
|
-
}),
|
|
80
|
+
}), x(e.labelKey, e.labelFallback)]
|
|
81
81
|
}, e.id);
|
|
82
|
-
}), /* @__PURE__ */
|
|
82
|
+
}), /* @__PURE__ */ _(a, { onActivate: () => E(!1) })]
|
|
83
83
|
}) : null
|
|
84
84
|
]
|
|
85
85
|
});
|
|
86
86
|
};
|
|
87
87
|
//#endregion
|
|
88
|
-
export {
|
|
88
|
+
export { b as AssistantAttachmentButton };
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* What clicking "Connect a source" does when the product opens its own surface.
|
|
4
|
+
*
|
|
5
|
+
* ★★ EXPORTED SO A TEST CAN EXECUTE IT. Everything in this package renders with
|
|
6
|
+
* `renderToStaticMarkup`, which never fires an event, and there is no jsdom
|
|
7
|
+
* here — so an inline arrow in the JSX is untestable by construction: deleting
|
|
8
|
+
* `open()` from it would leave the markup byte-identical and every test green,
|
|
9
|
+
* silently restoring the exact bug this exists to fix. Extracting it means the
|
|
10
|
+
* behaviour is actually run, and the invariant suite pins that the button still
|
|
11
|
+
* uses this and has not grown a second inline copy.
|
|
12
|
+
*
|
|
13
|
+
* ★ THE MENU CLOSES FIRST. `open()` hands focus to the surface it opens; a menu
|
|
14
|
+
* closing afterwards would restore focus to the trigger and take it straight
|
|
15
|
+
* back off the dialog the user just asked for.
|
|
16
|
+
*/
|
|
17
|
+
export declare function connectSourceActivation(open: () => void, onActivate?: () => void): () => void;
|
|
2
18
|
export interface AssistantConnectSourceItemProps {
|
|
3
19
|
/** Close the surrounding menu. Fired only when this item actually acts. */
|
|
4
20
|
onActivate?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantConnectSourceItem.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantConnectSourceItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAe,KAAK,EAAE,EAAmB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AssistantConnectSourceItem.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantConnectSourceItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAe,KAAK,EAAE,EAAmB,MAAM,OAAO,CAAC;AAc9D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,IAAI,EAChB,UAAU,CAAC,EAAE,MAAM,IAAI,GACtB,MAAM,IAAI,CAKZ;AAED,MAAM,WAAW,+BAA+B;IAC9C,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,eAAO,MAAM,0BAA0B,EAAE,EAAE,CAAC,+BAA+B,CAsF1E,CAAC"}
|
|
@@ -1,52 +1,48 @@
|
|
|
1
1
|
import { useAssistantTr as e } from "../../i18n.js";
|
|
2
2
|
import { assistantRoutePath as t, classifyAssistantHref as n, useAssistantNavigate as r } from "../AssistantMarkdownRenderer.js";
|
|
3
|
-
import {
|
|
4
|
-
import { useCallback as
|
|
5
|
-
import { Link2 as
|
|
6
|
-
import { jsx as
|
|
3
|
+
import { connectSourceHrefRenders as i, useAssistantConnectSource as a } from "./connectSource.js";
|
|
4
|
+
import { useCallback as o } from "react";
|
|
5
|
+
import { Link2 as s } from "lucide-react";
|
|
6
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
7
|
//#region src/shared/assistant/ui/composer/AssistantConnectSourceItem.tsx
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (!r) try {
|
|
13
|
-
r = typeof window > "u" ? void 0 : window.location.origin;
|
|
14
|
-
} catch {
|
|
15
|
-
r = void 0;
|
|
16
|
-
}
|
|
17
|
-
if (!r) return !1;
|
|
18
|
-
try {
|
|
19
|
-
let { protocol: e } = new URL(n, r);
|
|
20
|
-
return e === "https:" || e === "http:";
|
|
21
|
-
} catch {
|
|
22
|
-
return !1;
|
|
23
|
-
}
|
|
8
|
+
function u(e, t) {
|
|
9
|
+
return () => {
|
|
10
|
+
t?.(), e();
|
|
11
|
+
};
|
|
24
12
|
}
|
|
25
|
-
var
|
|
26
|
-
let
|
|
27
|
-
e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || (
|
|
13
|
+
var d = ({ onActivate: d }) => {
|
|
14
|
+
let f = e(), { href: p, open: m } = a(), h = r(), g = n(p), _ = g === "internal" ? t(p) : null, v = o((e) => {
|
|
15
|
+
e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || (d?.(), !(!h || !_) && (e.preventDefault(), h(_)));
|
|
28
16
|
}, [
|
|
29
|
-
p,
|
|
30
17
|
h,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
href: f,
|
|
18
|
+
_,
|
|
19
|
+
d
|
|
20
|
+
]), y = f("composer.connectSource", "Connect a source");
|
|
21
|
+
return m ? /* @__PURE__ */ l("button", {
|
|
22
|
+
type: "button",
|
|
37
23
|
role: "menuitem",
|
|
38
|
-
onClick:
|
|
39
|
-
|
|
24
|
+
onClick: u(m, d),
|
|
25
|
+
className: "flex w-full items-center gap-2.5 border-t border-border-subtle px-3 py-2 text-left text-sm text-text-primary transition-colors hover:bg-bg-sunken focus:outline-none focus-visible:bg-bg-sunken",
|
|
26
|
+
"data-testid": "assistant-connect-source",
|
|
27
|
+
children: [/* @__PURE__ */ c(s, {
|
|
28
|
+
className: "size-4 flex-shrink-0 text-text-secondary",
|
|
29
|
+
"aria-hidden": "true"
|
|
30
|
+
}), y]
|
|
31
|
+
}) : i(p) ? /* @__PURE__ */ l("a", {
|
|
32
|
+
href: p,
|
|
33
|
+
role: "menuitem",
|
|
34
|
+
onClick: v,
|
|
35
|
+
...g === "external" ? {
|
|
40
36
|
target: "_blank",
|
|
41
37
|
rel: "noopener noreferrer"
|
|
42
38
|
} : {},
|
|
43
39
|
className: "flex w-full items-center gap-2.5 border-t border-border-subtle px-3 py-2 text-left text-sm text-text-primary transition-colors hover:bg-bg-sunken focus:outline-none focus-visible:bg-bg-sunken",
|
|
44
40
|
"data-testid": "assistant-connect-source",
|
|
45
|
-
children: [/* @__PURE__ */ s
|
|
41
|
+
children: [/* @__PURE__ */ c(s, {
|
|
46
42
|
className: "size-4 flex-shrink-0 text-text-secondary",
|
|
47
43
|
"aria-hidden": "true"
|
|
48
|
-
}),
|
|
49
|
-
});
|
|
44
|
+
}), y]
|
|
45
|
+
}) : null;
|
|
50
46
|
};
|
|
51
47
|
//#endregion
|
|
52
|
-
export {
|
|
48
|
+
export { d as AssistantConnectSourceItem, u as connectSourceActivation };
|
|
@@ -1,8 +1,55 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
+
/** How a product offers "connect a source". Both fields absent = the off-switch. */
|
|
3
|
+
export interface AssistantConnectSource {
|
|
4
|
+
/** Route to send the user to. Used only when `open` is absent. */
|
|
5
|
+
href: string | null;
|
|
6
|
+
/**
|
|
7
|
+
* Open the product's OWN connection surface in place, over the current page.
|
|
8
|
+
*
|
|
9
|
+
* ★ Preferred over `href` when both are supplied. Navigating away tears the
|
|
10
|
+
* user out of the conversation they were having — which is the whole reason
|
|
11
|
+
* this was asked for: "connect-source is opening the page but I need a popup
|
|
12
|
+
* in the centre".
|
|
13
|
+
*
|
|
14
|
+
* ★ The product supplies this, not fe-libs, because the connection surface
|
|
15
|
+
* lives in `microfe-integrations` — Layer 2 — and this library is Layer 0/1.
|
|
16
|
+
* A host app can render the already-exported `IntegrationsRoot` inside its own
|
|
17
|
+
* dialog; nothing here needs to know what it renders. That also keeps the
|
|
18
|
+
* feedback's rule intact: reuse the existing connection screen, do not build a
|
|
19
|
+
* second connection-management implementation.
|
|
20
|
+
*/
|
|
21
|
+
open: (() => void) | null;
|
|
22
|
+
}
|
|
2
23
|
export declare const AssistantConnectSourceProvider: FC<{
|
|
3
24
|
value?: string;
|
|
25
|
+
onOpen?: () => void;
|
|
4
26
|
children: ReactNode;
|
|
5
27
|
}>;
|
|
6
|
-
/**
|
|
7
|
-
|
|
28
|
+
/**
|
|
29
|
+
* What the product offers, if anything.
|
|
30
|
+
*
|
|
31
|
+
* ★ Returns a stable EMPTY when nothing is configured, so callers can read
|
|
32
|
+
* `.href`/`.open` without null-checking the container first.
|
|
33
|
+
*/
|
|
34
|
+
export declare function useAssistantConnectSource(): AssistantConnectSource;
|
|
35
|
+
/**
|
|
36
|
+
* Would this href actually RENDER as the menu item?
|
|
37
|
+
*
|
|
38
|
+
* ★★ ONE PREDICATE, TWO CALLERS — and the bug it exists to prevent. The trigger
|
|
39
|
+
* decides whether to promise "connect a source" in its label and whether to stay
|
|
40
|
+
* openable at the attachment limit; the item decides whether to render at all.
|
|
41
|
+
* When those were two separate tests, `Boolean(href)` said yes for a `mailto:`,
|
|
42
|
+
* a `tel:`, a bare `#fragment` or a whitespace string, while the item's own
|
|
43
|
+
* guard said no — so the trigger advertised, to sighted and screen-reader users
|
|
44
|
+
* alike, an entry the opened menu did not contain. Deriving both from this
|
|
45
|
+
* function makes that disagreement unrepresentable.
|
|
46
|
+
*/
|
|
47
|
+
export declare function connectSourceHrefRenders(href: string | null | undefined, baseOrigin?: string): href is string;
|
|
48
|
+
/**
|
|
49
|
+
* True when there is any way at all to connect a source.
|
|
50
|
+
*
|
|
51
|
+
* ★ A handler needs no URL, so it short-circuits. A href has to survive the
|
|
52
|
+
* same test the item applies before it counts as a capability.
|
|
53
|
+
*/
|
|
54
|
+
export declare function hasConnectSource(source: AssistantConnectSource): boolean;
|
|
8
55
|
//# sourceMappingURL=connectSource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectSource.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/connectSource.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"connectSource.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/connectSource.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAIL,KAAK,EAAE,EACP,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAMf,oFAAoF;AACpF,MAAM,WAAW,sBAAsB;IACrC,kEAAkE;IAClE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;;;;;;;;;;;;;OAcG;IACH,IAAI,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;CAC3B;AAOD,eAAO,MAAM,8BAA8B,EAAE,EAAE,CAAC;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAYA,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,yBAAyB,IAAI,sBAAsB,CAElE;AA8BD;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,UAAU,CAAC,EAAE,MAAM,GAClB,IAAI,IAAI,MAAM,CAMhB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAExE"}
|
|
@@ -1,12 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { assistantRoutePath as e, classifyAssistantHref as t } from "../AssistantMarkdownRenderer.js";
|
|
2
|
+
import { createContext as n, useContext as r, useMemo as i } from "react";
|
|
3
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
3
4
|
//#region src/shared/assistant/ui/composer/connectSource.tsx
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
var o = n({
|
|
6
|
+
href: null,
|
|
7
|
+
open: null
|
|
8
|
+
}), s = ({ value: e, onOpen: t, children: n }) => {
|
|
9
|
+
let r = i(() => ({
|
|
10
|
+
href: e ?? null,
|
|
11
|
+
open: t ?? null
|
|
12
|
+
}), [e, t]);
|
|
13
|
+
return /* @__PURE__ */ a(o.Provider, {
|
|
14
|
+
value: r,
|
|
15
|
+
children: n
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
function c() {
|
|
19
|
+
return r(o);
|
|
20
|
+
}
|
|
21
|
+
function l(e, t) {
|
|
22
|
+
let n = (e ?? "").trim();
|
|
23
|
+
if (!n) return !1;
|
|
24
|
+
let r = t;
|
|
25
|
+
if (!r) try {
|
|
26
|
+
r = typeof window > "u" ? void 0 : window.location.origin;
|
|
27
|
+
} catch {
|
|
28
|
+
r = void 0;
|
|
29
|
+
}
|
|
30
|
+
if (!r) return !1;
|
|
31
|
+
try {
|
|
32
|
+
let { protocol: e } = new URL(n, r);
|
|
33
|
+
return e === "https:" || e === "http:";
|
|
34
|
+
} catch {
|
|
35
|
+
return !1;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function u(n, r) {
|
|
39
|
+
if (!n) return !1;
|
|
40
|
+
let i = t(n, r);
|
|
41
|
+
return i === "internal" ? e(n, r) !== null : i === "external" && l(n, r);
|
|
42
|
+
}
|
|
43
|
+
function d(e) {
|
|
44
|
+
return !!e.open || u(e.href);
|
|
10
45
|
}
|
|
11
46
|
//#endregion
|
|
12
|
-
export {
|
|
47
|
+
export { s as AssistantConnectSourceProvider, u as connectSourceHrefRenders, d as hasConnectSource, c as useAssistantConnectSource };
|
|
@@ -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,
|
|
@@ -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, connectSourceHrefRenders as Fa, hasConnectSource as Ia, useAssistantConnectSource as La } from "./shared/assistant/ui/composer/connectSource.js";
|
|
75
|
+
import { AssistantConnectSourceItem as Ra, connectSourceActivation as za } from "./shared/assistant/ui/composer/AssistantConnectSourceItem.js";
|
|
76
|
+
import { ASSISTANT_OVERLAY_ATTR as Ba, ASSISTANT_PANEL_ATTR as Va, NO_PANEL_OVERLAY as Ha, activePanelOverlay as Ua, assistantPanelOwnsEscape as Wa, escapeDismisses as Ga, focusIsInsidePanel as Ka, nextPanelOverlays as qa, panelOwnsEscape as Ja } from "./shared/assistant/ui/panelOverlays.js";
|
|
77
|
+
import { useDropdownEscape as Ya } from "./shared/assistant/ui/useDropdownEscape.js";
|
|
78
|
+
import { AssistantAttachmentButton as Xa } from "./shared/assistant/ui/composer/AssistantAttachmentButton.js";
|
|
79
|
+
import { AssistantAttachmentChips as Za } from "./shared/assistant/ui/composer/AssistantAttachmentChips.js";
|
|
80
|
+
import { AssistantPreviewProvider as Qa, useAssistantPreview as $a } from "./shared/assistant/preview/context.js";
|
|
81
|
+
import { IDLE_PREVIEW_STATE as eo, isBlankProse as to, isRunningStatus as no, nextPreviewEvents as ro } from "./shared/assistant/preview/previewTransitions.js";
|
|
82
|
+
import { IDLE_PREVIEW as io, NO_OWNER as ao, applyPreviewEvent as oo, createAssistantPreviewSurface as so, currentPreviewOwner as co, runBelongsTo as lo, sameOwner as uo } from "./shared/assistant/preview/surfaceState.js";
|
|
83
|
+
import { createRunIdentityCache as fo, runIdentities as po } from "./shared/assistant/preview/runIdentity.js";
|
|
84
|
+
import { IDLE_ACTIVE_TAB as mo, nextActiveTab as ho, pinActiveTab as go, shouldPinOnMove as _o, shouldPinOnSelect as vo, stepsFromToolActivity as yo, tabForArrowKey as bo } from "./shared/assistant/preview/entity/entityPreviewState.js";
|
|
85
|
+
import { AssistantStepRail as xo } from "./shared/assistant/preview/entity/AssistantStepRail.js";
|
|
86
|
+
import { AssistantEntityPreview as So } from "./shared/assistant/preview/entity/AssistantEntityPreview.js";
|
|
87
|
+
import { useOverlayFocus as Co } from "./shared/assistant/ui/useOverlayFocus.js";
|
|
88
|
+
import { REDUCED_MOTION_ATTRIBUTE as wo, REDUCED_MOTION_QUERY as To, readReducedMotion as Eo, subscribeReducedMotion as Do, usePrefersReducedMotion as Oo } from "./shared/assistant/ui/usePrefersReducedMotion.js";
|
|
89
|
+
import { useAssistantPreviewBridge as ko } from "./shared/assistant/preview/useAssistantPreviewBridge.js";
|
|
90
|
+
import { HostedPreviewBridgeContext as Ao, panelOwnedPreviewBridge as jo, useHostedAssistantPreviewBridge as Mo } from "./shared/assistant/preview/bridgeHostContext.js";
|
|
91
|
+
import { AssistantPreviewBridgeHost as No } from "./shared/assistant/preview/bridgeHost.js";
|
|
92
|
+
import { AssistantPreviewOverlay as Po } from "./shared/assistant/preview/AssistantPreviewOverlay.js";
|
|
93
|
+
import { AssistantLanguageSelector as Fo, FOLLOW_APP_LOCALE as Io } from "./shared/assistant/ui/composer/AssistantLanguageSelector.js";
|
|
94
|
+
import { ASSISTANT_MODE_META as Lo, AssistantModeSelector as Ro, assistantModeMeta as zo, nextModeIndex as Bo } from "./shared/assistant/ui/composer/AssistantModeSelector.js";
|
|
95
|
+
import { AssistantVoiceButton as Vo } from "./shared/assistant/ui/composer/AssistantVoiceButton.js";
|
|
96
|
+
import { AUTO_VOICE as Ho, AssistantVoiceSelector as Uo } from "./shared/assistant/ui/composer/AssistantVoiceSelector.js";
|
|
97
|
+
import { AssistantVoiceOrb as Wo } from "./shared/assistant/ui/voice/AssistantVoiceOrb.js";
|
|
98
|
+
import { AssistantVoiceSessionButton as Go } from "./shared/assistant/ui/voice/AssistantVoiceSessionButton.js";
|
|
99
|
+
import { CAPTION_SCROLL_ATTR as Ko, VoiceCaption as qo } from "./shared/assistant/ui/voice/VoiceCaption.js";
|
|
100
|
+
import { VoiceConversationView as Jo } from "./shared/assistant/ui/voice/VoiceConversationView.js";
|
|
101
|
+
import { VoiceWaveform as Yo } from "./shared/assistant/ui/voice/VoiceWaveform.js";
|
|
102
|
+
import { VoiceStatusLine as Xo, VoiceStatusText as Zo } from "./shared/assistant/ui/voice/VoiceStatusText.js";
|
|
103
|
+
import { VoiceMiniController as Qo } from "./shared/assistant/ui/voice/VoiceMiniController.js";
|
|
104
|
+
import { VoiceStage as $o } from "./shared/assistant/ui/voice/VoiceStage.js";
|
|
105
|
+
import { VoiceTranscriptDrawer as es } from "./shared/assistant/ui/voice/VoiceTranscriptDrawer.js";
|
|
106
|
+
import { downloadFile as ts, exportConversation as ns } from "./shared/assistant/exportConversation.js";
|
|
107
|
+
import { AssistantMoreMenu as rs } from "./shared/assistant/ui/AssistantMoreMenu.js";
|
|
108
|
+
import { AssistantHeader as is } from "./shared/assistant/ui/AssistantHeader.js";
|
|
109
|
+
import { AssistantConversationList as as } from "./shared/assistant/ui/AssistantConversationList.js";
|
|
110
|
+
import { AssistantEmptyState as os } from "./shared/assistant/ui/AssistantEmptyState.js";
|
|
111
|
+
import { AssistantTurnActivity as ss, TurnActivityLine as cs } from "./shared/assistant/ui/AssistantTurnActivity.js";
|
|
112
|
+
import { AssistantMessageItem as ls } from "./shared/assistant/ui/AssistantMessageItem.js";
|
|
113
|
+
import { AssistantMessageList as us } from "./shared/assistant/ui/AssistantMessageList.js";
|
|
114
|
+
import { AssistantVoiceSession as ds } from "./shared/assistant/ui/voice/AssistantVoiceSession.js";
|
|
115
|
+
import { useAssistantApiAccess as fs } from "./shared/assistant/useAssistantApiAccess.js";
|
|
116
|
+
import { useConversationTurns as ps } from "./shared/assistant/useConversationTurns.js";
|
|
117
|
+
import { isMultimodalBodyRejection as ms, isRecoverableAssistantError as hs } from "./shared/assistant/transportErrors.js";
|
|
118
|
+
import { aiCreditsUpdatedEventName as gs, dispatchAssistantQuotaExhausted as _s, notifyAiCreditsUpdated as vs } from "./shared/assistant/aiCredits.js";
|
|
119
|
+
import { useWorkspaceWriteAccess as ys } from "./shared/assistant/useWorkspaceWriteAccess.js";
|
|
120
|
+
import { extractDocumentText as bs } from "./shared/assistant/documentExtract.js";
|
|
121
|
+
import { useAssistantAttachments as xs } from "./shared/assistant/useAssistantAttachments.js";
|
|
122
|
+
import { AssistantComposer as Ss } from "./shared/assistant/ui/composer/AssistantComposer.js";
|
|
123
|
+
import { isProdRuntime as Cs } from "./shared/assistant/env.js";
|
|
124
|
+
import { useAssistantHeartbeat as ws } from "./shared/assistant/useAssistantHeartbeat.js";
|
|
125
|
+
import { useAssistantKeyboardShortcuts as Ts } from "./shared/assistant/useAssistantKeyboardShortcuts.js";
|
|
126
|
+
import { AssistantApiCallsConsentDialog as Es } from "./shared/assistant/ui/AssistantApiCallsConsentDialog.js";
|
|
127
|
+
import { AssistantChatArea as Ds } from "./shared/assistant/ui/AssistantChatArea.js";
|
|
128
|
+
import { AIAssistantPanel as Os } from "./shared/assistant/ui/AIAssistantPanel.js";
|
|
129
|
+
import { ASSISTANT_BOTTOM_CHROME_CLEARANCE as ks, ASSISTANT_DIALOG_SELECTOR as As, ASSISTANT_DOCKED_DESKTOP_CLASS as js, ASSISTANT_DOCK_WIDTH_PX as Ms, ASSISTANT_DOCK_WIDTH_VAR as Ns, ASSISTANT_FLOATING_DESKTOP_CLASS as Ps, ASSISTANT_OVERLAY_DEFAULT_TOP_PX as Fs, ASSISTANT_OVERLAY_DESKTOP_QUERY as Is, ASSISTANT_OVERLAY_TOP_VAR as Ls, ASSISTANT_SHEET_BASE_CLASS as Rs, ASSISTANT_SHEET_COMPACT_CLASS as zs, ASSISTANT_SHEET_EXPANDED_CLASS as Bs, ASSISTANT_TOGGLE_SHORTCUT_LABEL as Vs, aboveAssistantBottomChrome as Hs, assistantOverlayClassName as Us, assistantOverlayEscapeAction as Ws, assistantOverlayKeys as Gs, assistantQuotaKindOf as Ks, createAssistantNavigate as qs, isAssistantToggleShortcut as Js, nextAssistantOpenState as Ys, publishedAssistantDockWidth as Xs, readAssistantOverlayFlag as Zs, requestedAssistantOpenState as Qs, writeAssistantOverlayFlag as $s } from "./shared/assistant/ui/assistantOverlayState.js";
|
|
130
|
+
import { AssistantOverlay as ec, AssistantOverlayProvider as tc, useAssistantDockWidth as nc, useAssistantOverlayOrNull as rc, useAssistantQuotaExhausted as ic } from "./shared/assistant/ui/AssistantOverlay.js";
|
|
131
|
+
export { Oi as ADMIN_MODE_ACCESS_WAIT_MS, Os as AIAssistantPanel, Y as ASSISTANT_API_AUTH_STRATEGY, ks as ASSISTANT_BOTTOM_CHROME_CLEARANCE, As as ASSISTANT_DIALOG_SELECTOR, js as ASSISTANT_DOCKED_DESKTOP_CLASS, Ms as ASSISTANT_DOCK_WIDTH_PX, Ns as ASSISTANT_DOCK_WIDTH_VAR, Ps 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, Lo as ASSISTANT_MODE_META, Ba as ASSISTANT_OVERLAY_ATTR, Fs as ASSISTANT_OVERLAY_DEFAULT_TOP_PX, Is as ASSISTANT_OVERLAY_DESKTOP_QUERY, Ls as ASSISTANT_OVERLAY_TOP_VAR, Va as ASSISTANT_PANEL_ATTR, Rs as ASSISTANT_SHEET_BASE_CLASS, zs as ASSISTANT_SHEET_COMPACT_CLASS, Bs as ASSISTANT_SHEET_EXPANDED_CLASS, Vs as ASSISTANT_TOGGLE_SHORTCUT_LABEL, Lr as ATTACHMENT_ACCEPT, bi as ATTACHMENT_SOURCES, Ho as AUTO_VOICE, Es as AssistantApiCallsConsentDialog, Xa as AssistantAttachmentButton, Za as AssistantAttachmentChips, Da as AssistantAutoSpeakToggle, _a as AssistantAvatar, Ds as AssistantChatArea, Ss as AssistantComposer, Ra as AssistantConnectSourceItem, Pa as AssistantConnectSourceProvider, as as AssistantConversationList, os as AssistantEmptyState, So as AssistantEntityPreview, is as AssistantHeader, l as AssistantI18nProvider, Aa as AssistantLanguageMenu, Fo as AssistantLanguageSelector, m as AssistantMarkdownImage, _ as AssistantMarkdownRenderer, Oa as AssistantMessageAttachments, ls as AssistantMessageItem, us as AssistantMessageList, Ro as AssistantModeSelector, rs as AssistantMoreMenu, v as AssistantNavigateProvider, ec as AssistantOverlay, tc as AssistantOverlayProvider, ka as AssistantPendingWriteCard, No as AssistantPreviewBridgeHost, Po as AssistantPreviewOverlay, Qa as AssistantPreviewProvider, r as AssistantProductProvider, ja as AssistantReplyLanguageSelector, Ie as AssistantRuntimeManager, Ma as AssistantSpeakButton, va as AssistantSpeechProvider, Na as AssistantSpokenTurnsNotice, xo as AssistantStepRail, pa as AssistantToolActivity, ss as AssistantTurnActivity, Vo as AssistantVoiceButton, Wo as AssistantVoiceOrb, Uo as AssistantVoiceSelector, ds as AssistantVoiceSession, Go as AssistantVoiceSessionButton, Rr as AttachmentRejectedError, _r as BOILERPLATE_PAGE_SHARE, Ye as BUILT_IN_MODE_CAPABILITIES, Ko 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, Io 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, Ao as HostedPreviewBridgeContext, mo as IDLE_ACTIVE_TAB, Gi as IDLE_PLAYBACK, io as IDLE_PREVIEW, eo 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, ao as NO_OWNER, Ha 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, wo as REDUCED_MOTION_ATTRIBUTE, To 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, cs 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, qo as VoiceCaption, Jo as VoiceConversationView, Qo as VoiceMiniController, $o as VoiceStage, Xo as VoiceStatusLine, Zo as VoiceStatusText, es as VoiceTranscriptDrawer, Yo as VoiceWaveform, R as WAIT_FOR_SANDBOX_RUNNING, le as abortAssistantTurn, Hs as aboveAssistantBottomChrome, Ua as activePanelOverlay, $e as adminOnlyModeSendRefusal, ki as adminOnlyModeSendRefusalAfterAccess, Cn as advanceRotationClock, gs as aiCreditsUpdatedEventName, oo as applyPreviewEvent, ue as approvePendingWrite, Ei as assistantI18nSeedCopy, V as assistantModeFallbackLabel, Di as assistantModeI18nCopy, zo as assistantModeMeta, Us as assistantOverlayClassName, Ws as assistantOverlayEscapeAction, Gs as assistantOverlayKeys, Wa as assistantPanelOwnsEscape, Ks 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, za as connectSourceActivation, Fa as connectSourceHrefRenders, Jn as containsCjk, p as copyToClipboard, ii as countInlineImageCandidates, ai as countInlinedImageParts, ha as countSpokenTurns, Ai as createAdminModeAccessGate, qs as createAssistantNavigate, so as createAssistantPreviewSurface, he as createAssistantSandbox, ge as createAssistantSession, Pt as createHostedTtsEngine, Ta as createReadinessTracker, Xt as createRoutingSpeechEngine, fo as createRunIdentityCache, qe as createSandboxAssistantTransport, Qt as createSpeechEngines, co 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, _s as dispatchAssistantQuotaExhausted, Tr as docxXmlToText, _e as downloadAssistantArtifact, ts as downloadFile, sa as elapsedSince, Ga as escapeDismisses, si as estimateTurnBodyBytes, k as executeSandboxGraphQL, ns as exportConversation, ve as extendAssistantSandboxTTL, bs as extractDocumentText, dr as findAssistantLanguage, et as findAssistantModeConfig, ye as findExistingSandbox, hr as findPendingWrite, Er as fitPdfPages, Ka 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, Ia as hasConnectSource, yt as hostedLocaleFor, bt as hostedSupportsLanguage, h as imageHostLabel, ot as incompleteTurnNotice, q as isAssistantModeId, Js as isAssistantToggleShortcut, to as isBlankProse, H as isBuiltInAssistantMode, Mn as isCapturing, Nn as isEcho, zt as isHostedVoice, na as isLegacyFiller, ra as isLegacyStopped, Or as isMostlyImagePages, ms as isMultimodalBodyRejection, Cs as isProdRuntime, J as isProductAssistantModeId, pi as isProviderReadableFilePart, E as isQuotaExhaustedError, He as isReapedSandboxConnectionError, Ea as isRecentlyVerified, Ue as isRecoverable, hs as isRecoverableAssistantError, g as isRemoteImageSrc, no 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, ho as nextActiveTab, Ys as nextAssistantOpenState, Bo as nextModeIndex, qa as nextPanelOverlays, ro as nextPreviewEvents, Ht as normalizeLangTag, vs as notifyAiCreditsUpdated, Fn as orbMode, Ar as pageMarker, jo as panelOwnedPreviewBridge, Ja as panelOwnsEscape, gr as parseConfirmationRefusal, hi as parseDataUrl, jr as parseSharedStrings, ma as parseToolActivity, Mr as parseWorkbookSheets, Nr as pdfTextItemsToPage, go as pinActiveTab, ea as planAbandonedTurn, In as planReplyConsumption, ta as planTurnAbort, sr as pollDelayMs, Ut as primaryLanguageSubtag, Ee as promptGatewayRequestBytes, Xs as publishedAssistantDockWidth, qi as publishedChunks, D as quotaExhaustedEventName, Zs as readAssistantOverlayFlag, Eo as readReducedMotion, en as readSpeechEngineConfig, De as releaseSupersededAssistantSandboxes, pr as replyFollowsInput, Oe as reportAssistantAiTokenUsage, Qs 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, lo as runBelongsTo, po as runIdentities, uo 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, _o as shouldPinOnMove, vo 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, yo as stepsFromToolActivity, Ne as stopReapedAssistantSandbox, st as streamBudgetMs, aa as stripLegacyFillerPrefix, Do as subscribeReducedMotion, nn as subscribeSpeechEngine, Fr as summarisePageText, En as syncRotationClock, bo 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, fs as useAssistantApiAccess, xs as useAssistantAttachments, La as useAssistantConnectSource, nc as useAssistantDockWidth, ws as useAssistantHeartbeat, d as useAssistantI18nNamespace, Ts as useAssistantKeyboardShortcuts, C as useAssistantNavigate, rc as useAssistantOverlayOrNull, a as useAssistantPageLabel, $a as useAssistantPreview, ko as useAssistantPreviewBridge, o as useAssistantProduct, s as useAssistantProductOrNull, ic as useAssistantQuotaExhausted, ya as useAssistantSpeech, c as useAssistantStorageFolders, Qi as useAssistantStore, f as useAssistantTr, ps as useConversationTurns, Ya as useDropdownEscape, Mo as useHostedAssistantPreviewBridge, Co as useOverlayFocus, Oo as usePrefersReducedMotion, Je as useSandboxAssistantTransport, n as useVoiceInput, ba as useVoiceSession, ys 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, $s as writeAssistantOverlayFlag, zi as writeModeConsentCopy, Bi as writeModeSendRefusal };
|