@burdenoff/fe-libs 2026.912.5 → 2026.913.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/shared/assistant/attachments.d.ts +23 -0
- package/dist/shared/assistant/attachments.d.ts.map +1 -1
- package/dist/shared/assistant/attachments.js +100 -94
- package/dist/shared/assistant/index.d.ts +1 -0
- package/dist/shared/assistant/index.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantAvatar.d.ts +26 -0
- package/dist/shared/assistant/ui/AssistantAvatar.d.ts.map +1 -0
- package/dist/shared/assistant/ui/AssistantAvatar.js +12 -0
- package/dist/shared/assistant/ui/AssistantMessageItem.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantMessageItem.js +19 -21
- package/dist/shared/assistant/ui/AssistantToolActivity.js +1 -1
- package/dist/shared/assistant/ui/composer/AssistantAttachmentChips.d.ts.map +1 -1
- package/dist/shared/assistant/ui/composer/AssistantAttachmentChips.js +2 -2
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +1 -1
- package/dist/shared/assistant/ui/voice/VoiceWaveform.js +1 -1
- package/dist/shared-assistant.js +69 -68
- package/package.json +1 -1
|
@@ -4,6 +4,29 @@ export declare const MAX_ATTACHMENTS = 5;
|
|
|
4
4
|
/** Per-file ceiling before downscaling (images) / rejection (everything else). */
|
|
5
5
|
export declare const MAX_FILE_BYTES: number;
|
|
6
6
|
/** Per-file inline budget for text-like content, in characters. */
|
|
7
|
+
/**
|
|
8
|
+
* Media types a provider will accept as a URL-only `file` part.
|
|
9
|
+
*
|
|
10
|
+
* ★ An ALLOW-list on purpose. The provider SDK throws
|
|
11
|
+
* `UnsupportedFunctionalityError: media type: <x>` for anything outside its
|
|
12
|
+
* accepted set, and that throw kills the turn silently — so an unknown type
|
|
13
|
+
* must be DROPPED, never forwarded hopefully. Widen this only once the
|
|
14
|
+
* provider genuinely accepts the type.
|
|
15
|
+
*
|
|
16
|
+
* `text/plain` is here because it is the one text type providers take
|
|
17
|
+
* verbatim. Every other text type (`text/markdown`, `text/csv`, …) is dropped
|
|
18
|
+
* and reaches the model through the inlined prompt block instead — the same
|
|
19
|
+
* content, by a channel that cannot fail.
|
|
20
|
+
*/
|
|
21
|
+
export declare const PROVIDER_READABLE_FILE_MEDIA_TYPES: readonly ["application/pdf", "text/plain"];
|
|
22
|
+
/**
|
|
23
|
+
* Whether a `file` part carrying this media type is safe to send.
|
|
24
|
+
*
|
|
25
|
+
* Case- and parameter-insensitive, because a browser may report
|
|
26
|
+
* `text/plain; charset=utf-8`. Images are accepted for completeness though
|
|
27
|
+
* they normally travel as `image` parts with inline bytes.
|
|
28
|
+
*/
|
|
29
|
+
export declare function isProviderReadableFilePart(mimeType: string | undefined): boolean;
|
|
7
30
|
export declare const MAX_INLINE_CHARS_PER_FILE = 8000;
|
|
8
31
|
/** Total inline budget across all attachments in one turn. */
|
|
9
32
|
export declare const MAX_INLINE_CHARS_TOTAL = 20000;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/attachments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAExB,eAAO,MAAM,eAAe,IAAI,CAAC;AAEjC,kFAAkF;AAClF,eAAO,MAAM,cAAc,QAAmB,CAAC;AAE/C,mEAAmE;AACnE,eAAO,MAAM,yBAAyB,OAAQ,CAAC;AAE/C,8DAA8D;AAC9D,eAAO,MAAM,sBAAsB,QAAS,CAAC;AAE7C,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC;AAEpE,MAAM,MAAM,yBAAyB,GACjC,SAAS,GACT,WAAW,GACX,OAAO,GACP,OAAO,CAAC;AAEZ,MAAM,MAAM,mBAAmB,GAC3B,UAAU,GACV,WAAW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;AACH,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,UAAY,CAAC;AAEvD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,SAAyB,CAAC;AAE1D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB,QAAS,CAAC;AAE/C,0DAA0D;AAC1D,eAAO,MAAM,0BAA0B,QACS,CAAC;AAEjD;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAWxC;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,mBAAmB,EAAE,GAC5B,MAAM,CAIR;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,mBAAmB,EAAE,GACjC,MAAM,CAMR;AAED,iDAAiD;AACjD,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,mBAAmB,EAAE,GAAG,SAAS,GACvC,MAAM,CAIR;AAED,kFAAkF;AAClF,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,GACd;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAG7C;AAwHD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,mBAAmB,EAAE,GACjC,mBAAmB,EAAE,GAAG,SAAS,CA4DnC"}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { MAX_REQUEST_BODY_BYTES as e } from "./gatewayLimits.js";
|
|
2
2
|
import { formatPageRanges as t, isMostlyImagePages as n, truncatePagesForInline as r } from "./documentText.js";
|
|
3
3
|
//#region src/shared/assistant/attachments.ts
|
|
4
|
-
var i = 5, a = 10 * 1024 * 1024, o =
|
|
4
|
+
var i = 5, a = 10 * 1024 * 1024, o = ["application/pdf", "text/plain"];
|
|
5
|
+
function s(e) {
|
|
6
|
+
if (!e) return !1;
|
|
7
|
+
let t = e.split(";")[0]?.trim().toLowerCase() ?? "";
|
|
8
|
+
return t.startsWith("image/") ? !0 : o.includes(t);
|
|
9
|
+
}
|
|
10
|
+
var c = 8e3, l = 2e4, u = class extends Error {
|
|
5
11
|
constructor(e) {
|
|
6
12
|
super(e), this.reason = e, this.name = "AttachmentRejectedError";
|
|
7
13
|
}
|
|
8
14
|
};
|
|
9
|
-
function
|
|
15
|
+
function d(e) {
|
|
10
16
|
return {
|
|
11
17
|
id: e.id,
|
|
12
18
|
filename: e.filename,
|
|
@@ -16,7 +22,7 @@ function l(e) {
|
|
|
16
22
|
fileId: e.fileId
|
|
17
23
|
};
|
|
18
24
|
}
|
|
19
|
-
var
|
|
25
|
+
var f = new Set([
|
|
20
26
|
"txt",
|
|
21
27
|
"md",
|
|
22
28
|
"markdown",
|
|
@@ -40,48 +46,48 @@ var u = new Set([
|
|
|
40
46
|
"toml",
|
|
41
47
|
"conf"
|
|
42
48
|
]);
|
|
43
|
-
function
|
|
49
|
+
function p(e) {
|
|
44
50
|
let t = e.lastIndexOf(".");
|
|
45
51
|
return t >= 0 ? e.slice(t + 1).toLowerCase() : "";
|
|
46
52
|
}
|
|
47
|
-
function
|
|
48
|
-
return e.startsWith("image/") ? "image" : e.startsWith("text/") || e === "application/json" || e === "application/xml" || e === "application/x-yaml" ||
|
|
53
|
+
function m(e, t) {
|
|
54
|
+
return e.startsWith("image/") ? "image" : e.startsWith("text/") || e === "application/json" || e === "application/xml" || e === "application/x-yaml" || f.has(p(t)) ? "text" : "document";
|
|
49
55
|
}
|
|
50
|
-
var
|
|
56
|
+
var h = {
|
|
51
57
|
"application/pdf": "pdf",
|
|
52
58
|
"application/x-pdf": "pdf",
|
|
53
59
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "docx",
|
|
54
60
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "xlsx"
|
|
55
|
-
},
|
|
61
|
+
}, g = {
|
|
56
62
|
pdf: "pdf",
|
|
57
63
|
docx: "docx",
|
|
58
64
|
xlsx: "xlsx"
|
|
59
65
|
};
|
|
60
|
-
function
|
|
61
|
-
return
|
|
66
|
+
function ee(e, t) {
|
|
67
|
+
return h[e.toLowerCase()] ?? g[p(t)] ?? null;
|
|
62
68
|
}
|
|
63
|
-
var
|
|
69
|
+
var _ = [
|
|
64
70
|
"image/*",
|
|
65
71
|
"text/*",
|
|
66
|
-
...[...
|
|
67
|
-
...Object.keys(
|
|
72
|
+
...[...f].map((e) => `.${e}`),
|
|
73
|
+
...Object.keys(g).map((e) => `.${e}`)
|
|
68
74
|
].join(",");
|
|
69
|
-
function
|
|
75
|
+
function v(e) {
|
|
70
76
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
71
77
|
}
|
|
72
|
-
function
|
|
78
|
+
function y(e, t) {
|
|
73
79
|
return e > 0 || t.some((e) => e.status === "pending" || e.status === "uploading");
|
|
74
80
|
}
|
|
75
|
-
function
|
|
81
|
+
function b(e) {
|
|
76
82
|
return e.filter((e) => e.status === "ready");
|
|
77
83
|
}
|
|
78
|
-
function b(e, t) {
|
|
79
|
-
return v(e, t) ? "in-flight" : t.some((e) => e.status === "error") ? "failed" : null;
|
|
80
|
-
}
|
|
81
84
|
function x(e, t) {
|
|
82
|
-
return t
|
|
85
|
+
return y(e, t) ? "in-flight" : t.some((e) => e.status === "error") ? "failed" : null;
|
|
83
86
|
}
|
|
84
87
|
function S(e, t) {
|
|
88
|
+
return t >= 5 ? "too-many" : e.size === 0 ? "empty" : e.size > 10485760 && !e.type.startsWith("image/") ? "too-large" : null;
|
|
89
|
+
}
|
|
90
|
+
function C(e, t) {
|
|
85
91
|
if (e.length <= t) return {
|
|
86
92
|
text: e,
|
|
87
93
|
truncated: !1
|
|
@@ -92,20 +98,20 @@ function S(e, t) {
|
|
|
92
98
|
truncated: !0
|
|
93
99
|
};
|
|
94
100
|
}
|
|
95
|
-
function
|
|
101
|
+
function w(e) {
|
|
96
102
|
return [
|
|
97
103
|
" ```",
|
|
98
104
|
...e.split("\n").map((e) => ` ${e}`),
|
|
99
105
|
" ```"
|
|
100
106
|
];
|
|
101
107
|
}
|
|
102
|
-
function
|
|
108
|
+
function T(e) {
|
|
103
109
|
return e?.pageNumbers?.length ? e.pageNumbers : e?.pagesIncluded ? Array.from({ length: e.pagesIncluded }, (e, t) => t + 1) : [];
|
|
104
110
|
}
|
|
105
|
-
function
|
|
111
|
+
function E(e) {
|
|
106
112
|
let n = e.extraction, r = [];
|
|
107
113
|
if (n?.pageCount) {
|
|
108
|
-
let e =
|
|
114
|
+
let e = T(n);
|
|
109
115
|
e.length >= n.pageCount ? r.push(`${n.pageCount} page${n.pageCount === 1 ? "" : "s"}`) : e.length === 1 ? r.push(`page ${e[0]} of ${n.pageCount}`) : r.push(`pages ${t(e)} of ${n.pageCount}`);
|
|
110
116
|
}
|
|
111
117
|
if (n?.sheetNames?.length && r.push(`sheets: ${n.sheetNames.join(", ")}`), e.textTruncated && e.textContent) {
|
|
@@ -114,11 +120,11 @@ function T(e) {
|
|
|
114
120
|
}
|
|
115
121
|
return r.length > 0 ? ` (${r.join("; ")})` : "";
|
|
116
122
|
}
|
|
117
|
-
var
|
|
118
|
-
function
|
|
123
|
+
var D = " Do NOT guess at, summarise or characterise its contents — you have not seen them.", O = [" Fetch the URL above if you can; otherwise ask the user to paste the relevant section as text.", D];
|
|
124
|
+
function k(e) {
|
|
119
125
|
let n = e.extraction;
|
|
120
126
|
if (!n?.pageCount) return [];
|
|
121
|
-
let r = new Set(
|
|
127
|
+
let r = new Set(T(n)), i = new Set(n.imagePages ?? []), a = [...i].filter((e) => !r.has(e)).sort((e, t) => e - t), o = [];
|
|
122
128
|
if (a.length > 0) {
|
|
123
129
|
let e = a.length === 1 ? `Page ${a[0]}` : `Pages ${t(a)}`;
|
|
124
130
|
o.push(` ${e} of this document contain no extractable text — they are images.`, " Nothing about those pages is available to you.");
|
|
@@ -129,31 +135,31 @@ function O(e) {
|
|
|
129
135
|
let e = s.length === 1 ? `Page ${s[0]}` : `Pages ${t(s)}`;
|
|
130
136
|
o.push(` ${e} of this document ${s.length === 1 ? "was" : "were"} not read at all.`);
|
|
131
137
|
}
|
|
132
|
-
return o.length > 0 && o.push(
|
|
138
|
+
return o.length > 0 && o.push(D), o;
|
|
133
139
|
}
|
|
134
|
-
function
|
|
140
|
+
function A(e) {
|
|
135
141
|
let t = e.extraction;
|
|
136
142
|
if (!t || t.status === "unsupported") return [" Binary file — contents not inlined. Fetch the URL above if you can; otherwise ask the user", " to paste the relevant section as text."];
|
|
137
143
|
if (t.status === "no-text") return t.format === "docx" || t.format === "xlsx" ? [
|
|
138
144
|
" NO TEXT AVAILABLE — this document holds no readable text; it is either empty or contains only",
|
|
139
145
|
" images, charts or drawings, none of which carry text. No text could be extracted.",
|
|
140
|
-
...
|
|
146
|
+
...O
|
|
141
147
|
] : [
|
|
142
148
|
` NO TEXT AVAILABLE — this document appears to be scanned images; no text could be extracted${t.pagesScanned && t.pageCount && t.pagesScanned < t.pageCount ? ` (the first ${t.pagesScanned} of ${t.pageCount} pages were checked)` : ""}.`,
|
|
143
149
|
" There is no text layer to read, so nothing about its contents is available to you.",
|
|
144
|
-
...
|
|
150
|
+
...O
|
|
145
151
|
];
|
|
146
152
|
if (t.status === "encrypted") return [
|
|
147
153
|
" NO TEXT AVAILABLE — this document is encrypted or password-protected; it could not be opened",
|
|
148
154
|
" and no text could be extracted.",
|
|
149
|
-
...
|
|
155
|
+
...O
|
|
150
156
|
];
|
|
151
|
-
if (t.status === "corrupt") return [` NO TEXT AVAILABLE — this file could not be read${t.detail ? ` (${t.detail})` : ""}; no text could be extracted.`, ...
|
|
157
|
+
if (t.status === "corrupt") return [` NO TEXT AVAILABLE — this file could not be read${t.detail ? ` (${t.detail})` : ""}; no text could be extracted.`, ...O];
|
|
152
158
|
if (!e.textContent) return [
|
|
153
159
|
" Text WAS extracted from this document but is omitted because this turn ran out of inline budget,",
|
|
154
160
|
" not because it is unavailable. Ask the user which part matters so they can re-send just that",
|
|
155
161
|
" section, or fetch the URL above if you can.",
|
|
156
|
-
|
|
162
|
+
D
|
|
157
163
|
];
|
|
158
164
|
let r = t.pagesScanned ?? t.pageCount ?? 0, i = t.textPageCount;
|
|
159
165
|
if (t.pageCount && i !== void 0 && n(i, r)) {
|
|
@@ -162,25 +168,25 @@ function k(e) {
|
|
|
162
168
|
` NOT READ — this document is mostly images. Only ${i} of its ${t.pageCount} page${t.pageCount === 1 ? "" : "s"} carr${i === 1 ? "ies" : "y"} a text layer;`,
|
|
163
169
|
` the other ${n} contain no extractable text at all. Treat this as a document you have NOT`,
|
|
164
170
|
" read: the fragment below is the whole of what was available, not a summary of the document.",
|
|
165
|
-
...
|
|
166
|
-
` The only extractable text${
|
|
167
|
-
...
|
|
171
|
+
...k(e),
|
|
172
|
+
` The only extractable text${E(e)}:`,
|
|
173
|
+
...w(e.textContent)
|
|
168
174
|
];
|
|
169
175
|
}
|
|
170
176
|
return [
|
|
171
|
-
` Extracted text${
|
|
172
|
-
...
|
|
173
|
-
...
|
|
177
|
+
` Extracted text${E(e)}:`,
|
|
178
|
+
...w(e.textContent),
|
|
179
|
+
...k(e)
|
|
174
180
|
];
|
|
175
181
|
}
|
|
176
|
-
function
|
|
177
|
-
let r = [`[${t + 1}] ${e.filename} — ${e.mimeType}, ${
|
|
178
|
-
return e.downloadUrl && r.push(` URL: ${e.downloadUrl}`), e.kind === "text" && e.textContent ? r.push(e.textTruncated ? ` Contents (first ${e.textContent.length} characters of ${
|
|
182
|
+
function j(e, t, n = M) {
|
|
183
|
+
let r = [`[${t + 1}] ${e.filename} — ${e.mimeType}, ${v(e.size)}`];
|
|
184
|
+
return e.downloadUrl && r.push(` URL: ${e.downloadUrl}`), e.kind === "text" && e.textContent ? r.push(e.textTruncated ? ` Contents (first ${e.textContent.length} characters of ${v(e.size)}; truncated):` : " Contents:", ...w(e.textContent)) : e.kind === "document" ? r.push(...A(e)) : e.kind === "image" ? n.has(e.id) ? r.push(" NOT VIEWABLE IN THIS MESSAGE — this image did not fit the request-size budget, so only its URL", " travelled; its pixels are NOT attached. Fetch the URL above if you can; otherwise ask the user", " to describe it.", D) : r.push(" If this image is attached to the message as an image you can view, answer from what you see in it.", " If you cannot view attached images, say so plainly and ask the user to describe it — never guess.") : e.kind === "text" ? r.push(" Text file — contents omitted because this turn ran out of inline budget, not because they are", " unavailable. Fetch the URL above if you can; otherwise ask the user which part matters so they", " can re-send just that section.") : r.push(" Binary file — contents not inlined. Fetch the URL above if you can; otherwise ask the user", " to paste the relevant section as text."), r.join("\n");
|
|
179
185
|
}
|
|
180
|
-
var
|
|
181
|
-
function
|
|
182
|
-
let n =
|
|
183
|
-
let t = !!e.extraction, a = Math.min(n,
|
|
186
|
+
var M = /* @__PURE__ */ new Set();
|
|
187
|
+
function N(e, t) {
|
|
188
|
+
let n = l, i = t, a = [...e], o = (e) => {
|
|
189
|
+
let t = !!e.extraction, a = Math.min(n, c, t ? i : Infinity);
|
|
184
190
|
if (a <= 0) return {
|
|
185
191
|
...e,
|
|
186
192
|
textContent: void 0,
|
|
@@ -203,50 +209,50 @@ function M(e, t) {
|
|
|
203
209
|
} } : {}
|
|
204
210
|
});
|
|
205
211
|
}
|
|
206
|
-
let { text:
|
|
207
|
-
return n -=
|
|
212
|
+
let { text: o, truncated: s } = C(e.textContent ?? "", a);
|
|
213
|
+
return n -= o.length, t && (i -= o.length), {
|
|
208
214
|
...e,
|
|
209
|
-
textContent:
|
|
210
|
-
textTruncated: e.textTruncated ||
|
|
215
|
+
textContent: o,
|
|
216
|
+
textTruncated: e.textTruncated || s
|
|
211
217
|
};
|
|
212
218
|
};
|
|
213
219
|
for (let t of [!1, !0]) e.forEach((e, n) => {
|
|
214
|
-
e.textContent && !!e.extraction === t && (a[n] =
|
|
220
|
+
e.textContent && !!e.extraction === t && (a[n] = o(e));
|
|
215
221
|
});
|
|
216
222
|
return a;
|
|
217
223
|
}
|
|
218
|
-
function
|
|
219
|
-
let r =
|
|
224
|
+
function P(e, t, n) {
|
|
225
|
+
let r = N(e, t);
|
|
220
226
|
return [
|
|
221
227
|
"",
|
|
222
228
|
`--- Attachments (${e.length}) ---`,
|
|
223
229
|
"The user attached the following file(s) to this message.",
|
|
224
|
-
...r.map((e, t) =>
|
|
230
|
+
...r.map((e, t) => j(e, t, n)),
|
|
225
231
|
"--- End attachments ---"
|
|
226
232
|
].join("\n");
|
|
227
233
|
}
|
|
228
|
-
var
|
|
229
|
-
function
|
|
230
|
-
let n =
|
|
234
|
+
var F = 2048;
|
|
235
|
+
function I(e, t) {
|
|
236
|
+
let n = Q(e);
|
|
231
237
|
if (n.length === 0) return {
|
|
232
|
-
documentChars:
|
|
233
|
-
demotedImageIds:
|
|
238
|
+
documentChars: l,
|
|
239
|
+
demotedImageIds: M
|
|
234
240
|
};
|
|
235
241
|
let r = (r, i, a) => {
|
|
236
|
-
let o = new Set(n.slice(0, r).map((e) => e.id)), s =
|
|
237
|
-
return
|
|
242
|
+
let o = new Set(n.slice(0, r).map((e) => e.id)), s = P(e, i, a), c = t ? `${t}\n${s}` : s.trimStart(), { media: l } = $(e, o);
|
|
243
|
+
return J(c, [{
|
|
238
244
|
type: "text",
|
|
239
245
|
text: c
|
|
240
|
-
}, ...l]) +
|
|
246
|
+
}, ...l]) + F <= U;
|
|
241
247
|
};
|
|
242
248
|
for (let e = n.length; e >= 0; --e) {
|
|
243
249
|
let t = new Set(n.slice(e).map((e) => e.id));
|
|
244
250
|
if (r(e, 2e4, t)) return {
|
|
245
|
-
documentChars:
|
|
251
|
+
documentChars: l,
|
|
246
252
|
demotedImageIds: t
|
|
247
253
|
};
|
|
248
254
|
if (!r(e, 0, t)) continue;
|
|
249
|
-
let i = 0, a =
|
|
255
|
+
let i = 0, a = l;
|
|
250
256
|
for (; i < a;) {
|
|
251
257
|
let n = Math.ceil((i + a) / 2);
|
|
252
258
|
r(e, n, t) ? i = n : a = n - 1;
|
|
@@ -257,57 +263,57 @@ function F(e, t) {
|
|
|
257
263
|
};
|
|
258
264
|
}
|
|
259
265
|
return {
|
|
260
|
-
documentChars:
|
|
266
|
+
documentChars: l,
|
|
261
267
|
demotedImageIds: new Set(n.map((e) => e.id))
|
|
262
268
|
};
|
|
263
269
|
}
|
|
264
|
-
function
|
|
265
|
-
let n =
|
|
270
|
+
function L(e, t = "") {
|
|
271
|
+
let n = b(e);
|
|
266
272
|
if (n.length === 0) return "";
|
|
267
|
-
let r =
|
|
268
|
-
return
|
|
273
|
+
let r = I(n, t);
|
|
274
|
+
return P(n, r.documentChars, r.demotedImageIds);
|
|
269
275
|
}
|
|
270
|
-
function
|
|
271
|
-
let n =
|
|
276
|
+
function R(e, t) {
|
|
277
|
+
let n = L(t, e);
|
|
272
278
|
return n ? e ? `${e}\n${n}` : n.trimStart() : e;
|
|
273
279
|
}
|
|
274
|
-
var
|
|
275
|
-
function
|
|
276
|
-
return
|
|
280
|
+
var z = 3, B = 15e5, V = e, H = 32768, U = V - H, W = 768, G = .6, K = typeof TextEncoder == "function" ? new TextEncoder() : null;
|
|
281
|
+
function q(e) {
|
|
282
|
+
return K ? K.encode(e).length : e.length;
|
|
277
283
|
}
|
|
278
|
-
function
|
|
279
|
-
return
|
|
284
|
+
function J(e, t) {
|
|
285
|
+
return q(JSON.stringify({
|
|
280
286
|
prompt: e,
|
|
281
287
|
parts: t ?? []
|
|
282
288
|
}));
|
|
283
289
|
}
|
|
284
|
-
function J(e) {
|
|
285
|
-
return y(e).filter((e) => e.kind === "image" && !!(e.inlineDataUrl ?? e.previewUrl)).length;
|
|
286
|
-
}
|
|
287
290
|
function Y(e) {
|
|
288
|
-
return (e
|
|
291
|
+
return b(e).filter((e) => e.kind === "image" && !!(e.inlineDataUrl ?? e.previewUrl)).length;
|
|
289
292
|
}
|
|
290
293
|
function X(e) {
|
|
294
|
+
return (e ?? []).filter((e) => e.type === "image" && !!e.data).length;
|
|
295
|
+
}
|
|
296
|
+
function Z(e) {
|
|
291
297
|
let t = /^data:([a-z0-9.+/-]+);base64,(.*)$/i.exec(e);
|
|
292
298
|
return t ? {
|
|
293
299
|
mimeType: t[1],
|
|
294
300
|
base64: t[2]
|
|
295
301
|
} : null;
|
|
296
302
|
}
|
|
297
|
-
function
|
|
303
|
+
function Q(e) {
|
|
298
304
|
let t = [], n = 0;
|
|
299
305
|
for (let r of e) {
|
|
300
306
|
if (r.kind !== "image") continue;
|
|
301
|
-
let e = r.inlineDataUrl ?? r.previewUrl, i = e ?
|
|
307
|
+
let e = r.inlineDataUrl ?? r.previewUrl, i = e ? Z(e) : null;
|
|
302
308
|
i && (t.length >= 3 || n + i.base64.length > 15e5 || (t.push(r), n += i.base64.length));
|
|
303
309
|
}
|
|
304
310
|
return t;
|
|
305
311
|
}
|
|
306
|
-
function
|
|
312
|
+
function $(e, t) {
|
|
307
313
|
let n = [], r = [];
|
|
308
314
|
for (let i of e) {
|
|
309
315
|
if (i.kind === "image") {
|
|
310
|
-
let e = i.inlineDataUrl ?? i.previewUrl, a = e ?
|
|
316
|
+
let e = i.inlineDataUrl ?? i.previewUrl, a = e ? Z(e) : null;
|
|
311
317
|
if (a && t.has(i.id)) {
|
|
312
318
|
r.push(n.length), n.push({
|
|
313
319
|
type: "image",
|
|
@@ -326,7 +332,7 @@ function Q(e, t) {
|
|
|
326
332
|
});
|
|
327
333
|
continue;
|
|
328
334
|
}
|
|
329
|
-
i.downloadUrl && n.push({
|
|
335
|
+
i.downloadUrl && s(i.mimeType) && n.push({
|
|
330
336
|
type: "file",
|
|
331
337
|
mimeType: i.mimeType,
|
|
332
338
|
url: i.downloadUrl,
|
|
@@ -338,15 +344,15 @@ function Q(e, t) {
|
|
|
338
344
|
inlinedIndices: r
|
|
339
345
|
};
|
|
340
346
|
}
|
|
341
|
-
function
|
|
342
|
-
let n =
|
|
347
|
+
function te(e, t) {
|
|
348
|
+
let n = b(t);
|
|
343
349
|
if (n.length === 0) return;
|
|
344
|
-
let { media: r, inlinedIndices: i } =
|
|
350
|
+
let { media: r, inlinedIndices: i } = $(n, new Set(Q(n).map((e) => e.id)));
|
|
345
351
|
if (r.length !== 0) {
|
|
346
|
-
for (; i.length > 0 &&
|
|
352
|
+
for (; i.length > 0 && J(e, [{
|
|
347
353
|
type: "text",
|
|
348
354
|
text: e
|
|
349
|
-
}, ...r]) >
|
|
355
|
+
}, ...r]) > U;) {
|
|
350
356
|
let e = i.pop();
|
|
351
357
|
if (e === void 0) break;
|
|
352
358
|
let t = r[e];
|
|
@@ -357,14 +363,14 @@ function $(e, t) {
|
|
|
357
363
|
name: t.name
|
|
358
364
|
} : r.splice(e, 1));
|
|
359
365
|
}
|
|
360
|
-
if (r.length !== 0 && !(
|
|
366
|
+
if (r.length !== 0 && !(J(e, [{
|
|
361
367
|
type: "text",
|
|
362
368
|
text: e
|
|
363
|
-
}, ...r]) >
|
|
369
|
+
}, ...r]) > U)) return [{
|
|
364
370
|
type: "text",
|
|
365
371
|
text: e
|
|
366
372
|
}, ...r];
|
|
367
373
|
}
|
|
368
374
|
}
|
|
369
375
|
//#endregion
|
|
370
|
-
export {
|
|
376
|
+
export { _ as ATTACHMENT_ACCEPT, u as AttachmentRejectedError, W as INLINE_IMAGE_MAX_DIM, G as INLINE_IMAGE_QUALITY, i as MAX_ATTACHMENTS, a as MAX_FILE_BYTES, c as MAX_INLINE_CHARS_PER_FILE, l as MAX_INLINE_CHARS_TOTAL, B as MAX_INLINE_IMAGE_BASE64_CHARS, z as MAX_INLINE_IMAGE_PARTS, U as MAX_INLINE_TURN_BODY_BYTES, V as MAX_TURN_BODY_BYTES, F as PROMPT_ENVELOPE_RESERVE_BYTES, o as PROVIDER_READABLE_FILE_MEDIA_TYPES, H as TURN_BODY_HEADROOM_BYTES, L as buildAttachmentPromptBlock, te as buildPromptParts, R as buildPromptWithAttachments, m as classifyAttachment, Y as countInlineImageCandidates, X as countInlinedImageParts, ee as detectDocumentFormat, J as estimateTurnBodyBytes, v as formatBytes, x as getAttachmentSendBlocker, p as getExtension, b as getSendableAttachments, y as hasAttachmentWorkInFlight, s as isProviderReadableFilePart, Z as parseDataUrl, d as toMessageAttachment, C as truncateForInline, S as validateFile };
|
|
@@ -72,6 +72,7 @@ export * from './turnState';
|
|
|
72
72
|
export * from './stageCopy';
|
|
73
73
|
export * from './gatewayLimits';
|
|
74
74
|
export * from './documentText';
|
|
75
|
+
export * from './ui/AssistantAvatar';
|
|
75
76
|
export * from './ui/AssistantToolActivity';
|
|
76
77
|
export * from './ui/AssistantSpeechProvider';
|
|
77
78
|
export * from './ui/useVoiceSession';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AAGxB,cAAc,wBAAwB,CAAC;AAKvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAG9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9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AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AAErC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAE1C,cAAc,kCAAkC,CAAC;AAEjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAElC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAE1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAE1C,cAAc,iCAAiC,CAAC;AAGhD,cAAc,OAAO,CAAC;AACtB,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The assistant's brand mark beside each of its messages.
|
|
4
|
+
*
|
|
5
|
+
* ★★ `active` must be the turn's IN-FLIGHT flag — `isStreaming`, which
|
|
6
|
+
* `AssistantChatArea` derives through `isTurnInFlight`. That flag is already
|
|
7
|
+
* true on the first frame of `provisioning`, so the cold-start wait animates
|
|
8
|
+
* too, and it goes false on complete, on error, on interrupt (the processing
|
|
9
|
+
* entry is deleted) and while an approval is pending (the turn settles to
|
|
10
|
+
* `complete` first). Keying off "has text" would miss the whole wait before the
|
|
11
|
+
* first token; keying off the message id latches forever — the bug recorded
|
|
12
|
+
* beside `activeStreamingMessageId`.
|
|
13
|
+
*
|
|
14
|
+
* ★ Every settled message draws this same avatar, so the motion MUST be gated on
|
|
15
|
+
* `active` or the entire transcript breathes.
|
|
16
|
+
*
|
|
17
|
+
* ★ Motion is `motion-safe:` only. An OS reduced-motion preference reaches this
|
|
18
|
+
* through that media query; the product's own preference through
|
|
19
|
+
* `:root[data-reduce-motion]` in tokens.css. Both paths stop it. It is purely
|
|
20
|
+
* decorative — the transcript's `aria-busy` already conveys the state — so it is
|
|
21
|
+
* hidden from assistive technology.
|
|
22
|
+
*/
|
|
23
|
+
export declare const AssistantAvatar: FC<{
|
|
24
|
+
active?: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
//# sourceMappingURL=AssistantAvatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssistantAvatar.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAcpD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Sparkles as e } from "lucide-react";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/shared/assistant/ui/AssistantAvatar.tsx
|
|
4
|
+
var n = ({ active: n = !1 }) => /* @__PURE__ */ t("div", {
|
|
5
|
+
"aria-hidden": "true",
|
|
6
|
+
"data-testid": "assistant-avatar",
|
|
7
|
+
"data-active": n ? "true" : void 0,
|
|
8
|
+
className: "mt-0.5 flex size-6 flex-shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-action-primary-bg/25 to-action-primary-bg/5 text-action-primary-bg" + (n ? " motion-safe:animate-pulse" : ""),
|
|
9
|
+
children: /* @__PURE__ */ t(e, { className: "size-3.5" })
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as AssistantAvatar };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantMessageItem.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantMessageItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AssistantMessageItem.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantMessageItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAsBnD,OAAO,KAAK,EAGV,OAAO,EACR,MAAM,iBAAiB,CAAC;AAIzB,UAAU,KAAK;IACb,mEAAmE;IACnE,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,6EAA6E;IAC7E,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAyCD,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,KAAK,CAmS1C,CAAC"}
|
|
@@ -5,15 +5,16 @@ import { useAssistantTr as n } from "../i18n.js";
|
|
|
5
5
|
import { copyToClipboard as r } from "../clipboard.js";
|
|
6
6
|
import { AssistantMarkdownRenderer as i } from "./AssistantMarkdownRenderer.js";
|
|
7
7
|
import { downloadAssistantArtifact as a } from "../api.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
8
|
+
import { AssistantAvatar as o } from "./AssistantAvatar.js";
|
|
9
|
+
import { AssistantToolActivity as s, parseToolActivity as c } from "./AssistantToolActivity.js";
|
|
10
|
+
import { useAssistantSpeech as l } from "./AssistantSpeechProvider.js";
|
|
11
|
+
import { AssistantMessageAttachments as u } from "./AssistantMessageAttachments.js";
|
|
12
|
+
import { AssistantPendingWriteCard as d } from "./AssistantPendingWriteCard.js";
|
|
13
|
+
import { AssistantSpeakButton as f } from "./AssistantSpeakButton.js";
|
|
14
|
+
import { SaveToFilesButton as p } from "../../../storage/SaveToFilesButton.js";
|
|
14
15
|
import "../../../storage/index.js";
|
|
15
|
-
import { useMemo as
|
|
16
|
-
import { Check as
|
|
16
|
+
import { useMemo as m, useState as h } from "react";
|
|
17
|
+
import { Check as g, Copy as _, RotateCcw as v } from "lucide-react";
|
|
17
18
|
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
18
19
|
//#region src/shared/assistant/ui/AssistantMessageItem.tsx
|
|
19
20
|
function S(e) {
|
|
@@ -32,10 +33,10 @@ function T(e, t, n) {
|
|
|
32
33
|
s.href = o, s.download = t, document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(o);
|
|
33
34
|
}
|
|
34
35
|
var E = ({ onApprovePendingWrite: w, approvingWriteRef: E = null, message: D, isStreaming: O, isFailed: k, isLastAssistant: A, onRetry: j }) => {
|
|
35
|
-
let M = n(), N = t(), { getAccessToken: P, getWorkspaceToken: F } = e(), I =
|
|
36
|
+
let M = n(), N = t(), { getAccessToken: P, getWorkspaceToken: F } = e(), I = l(), [L, R] = h(null), [z, B] = h(!1), V = D.role === "user", H = m(() => S(D), [D]), U = m(() => C(H), [H]), { steps: W, text: G } = m(() => V ? {
|
|
36
37
|
steps: [],
|
|
37
38
|
text: D.content
|
|
38
|
-
} :
|
|
39
|
+
} : c(D.content), [V, D.content]), K = () => {
|
|
39
40
|
r(G || D.content).then((e) => {
|
|
40
41
|
e && (B(!0), setTimeout(() => B(!1), 2e3));
|
|
41
42
|
});
|
|
@@ -81,7 +82,7 @@ var E = ({ onApprovePendingWrite: w, approvingWriteRef: E = null, message: D, is
|
|
|
81
82
|
children: D.content
|
|
82
83
|
})
|
|
83
84
|
}),
|
|
84
|
-
/* @__PURE__ */ b(
|
|
85
|
+
/* @__PURE__ */ b(u, { attachments: e }),
|
|
85
86
|
/* @__PURE__ */ b("div", {
|
|
86
87
|
className: "mt-1 pr-1 text-right text-[10px] text-text-muted",
|
|
87
88
|
children: J
|
|
@@ -93,14 +94,11 @@ var E = ({ onApprovePendingWrite: w, approvingWriteRef: E = null, message: D, is
|
|
|
93
94
|
return /* @__PURE__ */ x("div", {
|
|
94
95
|
className: "flex gap-2.5",
|
|
95
96
|
"data-testid": "assistant-message-assistant",
|
|
96
|
-
children: [/* @__PURE__ */ b("div", {
|
|
97
|
-
className: "mt-0.5 flex size-6 flex-shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-action-primary-bg/25 to-action-primary-bg/5 text-action-primary-bg",
|
|
98
|
-
children: /* @__PURE__ */ b(v, { className: "size-3.5" })
|
|
99
|
-
}), /* @__PURE__ */ x("div", {
|
|
97
|
+
children: [/* @__PURE__ */ b(o, { active: O }), /* @__PURE__ */ x("div", {
|
|
100
98
|
className: "min-w-0 flex-1",
|
|
101
99
|
children: [
|
|
102
|
-
W.length > 0 && /* @__PURE__ */ b(
|
|
103
|
-
H?.pendingWrite ? /* @__PURE__ */ b(
|
|
100
|
+
W.length > 0 && /* @__PURE__ */ b(s, { steps: W }),
|
|
101
|
+
H?.pendingWrite ? /* @__PURE__ */ b(d, {
|
|
104
102
|
pendingWrite: H.pendingWrite,
|
|
105
103
|
onApprove: w,
|
|
106
104
|
approving: E !== null && E === H.pendingWrite.reference
|
|
@@ -122,7 +120,7 @@ var E = ({ onApprovePendingWrite: w, approvingWriteRef: E = null, message: D, is
|
|
|
122
120
|
className: "flex flex-wrap gap-2",
|
|
123
121
|
children: U.map((e) => {
|
|
124
122
|
let t = `${e.name}${e.type === "directory" ? ".tar.gz" : ""}`;
|
|
125
|
-
return /* @__PURE__ */ b(
|
|
123
|
+
return /* @__PURE__ */ b(p, {
|
|
126
124
|
label: t,
|
|
127
125
|
disabled: L === e.path,
|
|
128
126
|
testId: `assistant-artifact-${e.name}`,
|
|
@@ -148,11 +146,11 @@ var E = ({ onApprovePendingWrite: w, approvingWriteRef: E = null, message: D, is
|
|
|
148
146
|
className: "flex items-center gap-1 rounded-md px-1.5 py-1 text-[11px] text-text-muted transition-colors hover:bg-bg-elevated hover:text-text-secondary",
|
|
149
147
|
"aria-label": M("message.copy", "Copy message"),
|
|
150
148
|
"data-testid": "assistant-message-copy",
|
|
151
|
-
children: z ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(
|
|
149
|
+
children: z ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(g, { className: "size-3 text-status-success-text" }), /* @__PURE__ */ b("span", { children: M("message.copied", "Copied") })] }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(_, { className: "size-3" }), /* @__PURE__ */ b("span", { children: M("message.copy", "Copy") })] })
|
|
152
150
|
}),
|
|
153
151
|
G && I.isSupported && (() => {
|
|
154
152
|
let e = I.blockedFor(D.id) ?? I.disabledReason, t = !!e && !!A, n = t ? `speak-reason-${D.id}` : void 0;
|
|
155
|
-
return /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(
|
|
153
|
+
return /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(f, {
|
|
156
154
|
isSpeaking: I.isSpeaking(D.id),
|
|
157
155
|
disabled: e !== null,
|
|
158
156
|
disabledReason: e,
|
|
@@ -171,7 +169,7 @@ var E = ({ onApprovePendingWrite: w, approvingWriteRef: E = null, message: D, is
|
|
|
171
169
|
className: `flex items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-colors hover:bg-bg-elevated ${k ? "text-status-error-text" : "text-text-muted hover:text-text-secondary"}`,
|
|
172
170
|
"aria-label": M("message.retry", "Retry"),
|
|
173
171
|
"data-testid": "assistant-message-retry",
|
|
174
|
-
children: [/* @__PURE__ */ b(
|
|
172
|
+
children: [/* @__PURE__ */ b(v, { className: "size-3" }), /* @__PURE__ */ b("span", { children: M("message.retry", "Retry") })]
|
|
175
173
|
})
|
|
176
174
|
]
|
|
177
175
|
}),
|
|
@@ -44,7 +44,7 @@ function f({ status: e }) {
|
|
|
44
44
|
"aria-hidden": "true"
|
|
45
45
|
});
|
|
46
46
|
case "running": return /* @__PURE__ */ o(r, {
|
|
47
|
-
className: "size-3.5 animate-spin text-action-primary-bg",
|
|
47
|
+
className: "size-3.5 motion-safe:animate-spin text-action-primary-bg",
|
|
48
48
|
"aria-hidden": "true"
|
|
49
49
|
});
|
|
50
50
|
default: return /* @__PURE__ */ o(n, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantAttachmentChips.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantAttachmentChips.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAUhC,OAAO,EAAe,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE1E,UAAU,KAAK;IACb,WAAW,EAAE,mBAAmB,EAAE,CAAC;IACnC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,qEAAqE;IACrE,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"AssistantAttachmentChips.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/composer/AssistantAttachmentChips.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAUhC,OAAO,EAAe,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE1E,UAAU,KAAK;IACb,WAAW,EAAE,mBAAmB,EAAE,CAAC;IACnC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,qEAAqE;IACrE,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,KAAK,CA2H9C,CAAC"}
|
|
@@ -43,7 +43,7 @@ var u = ({ attachments: u, onRemove: d, onRetry: f, preparingCount: p = 0, disab
|
|
|
43
43
|
children: /* @__PURE__ */ c(o, { className: "size-3" })
|
|
44
44
|
}),
|
|
45
45
|
u ? /* @__PURE__ */ c(i, {
|
|
46
|
-
className: "size-3.5 flex-shrink-0 animate-spin text-text-muted",
|
|
46
|
+
className: "size-3.5 flex-shrink-0 motion-safe:animate-spin text-text-muted",
|
|
47
47
|
"aria-label": h("attachments.uploading", "Uploading…")
|
|
48
48
|
}) : /* @__PURE__ */ c("button", {
|
|
49
49
|
type: "button",
|
|
@@ -60,7 +60,7 @@ var u = ({ attachments: u, onRemove: d, onRetry: f, preparingCount: p = 0, disab
|
|
|
60
60
|
className: "flex items-center gap-1.5 rounded-lg border border-border-subtle bg-bg-sunken px-2 py-1 text-xs text-text-muted",
|
|
61
61
|
"data-testid": "assistant-attachment-preparing",
|
|
62
62
|
children: [/* @__PURE__ */ c(i, {
|
|
63
|
-
className: "size-3 animate-spin",
|
|
63
|
+
className: "size-3 motion-safe:animate-spin",
|
|
64
64
|
"aria-hidden": "true"
|
|
65
65
|
}), h("attachments.preparing", "Reading file…")]
|
|
66
66
|
}, `preparing-${t}`))]
|
|
@@ -121,7 +121,7 @@ var _ = 200, v = ({ writeAccessDenied: v = !1, onSend: y, disabled: b = !1, plac
|
|
|
121
121
|
className: `flex size-9 flex-shrink-0 items-center justify-center rounded-full shadow-sm transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong ${X ? "bg-action-primary-bg text-action-primary-text hover:scale-105 hover:bg-action-primary-bg-hover" : "bg-bg-elevated text-text-muted"}`,
|
|
122
122
|
"aria-label": T("chatInput.send", "Send message"),
|
|
123
123
|
"data-testid": "assistant-send",
|
|
124
|
-
children: b || P ? /* @__PURE__ */ h(m, { className: "size-4 animate-spin" }) : /* @__PURE__ */ h(p, { className: "size-4" })
|
|
124
|
+
children: b || P ? /* @__PURE__ */ h(m, { className: "size-4 motion-safe:animate-spin" }) : /* @__PURE__ */ h(p, { className: "size-4" })
|
|
125
125
|
})
|
|
126
126
|
]
|
|
127
127
|
}),
|
|
@@ -17,7 +17,7 @@ var t = [
|
|
|
17
17
|
"inline-block rounded-full transition-[height,opacity] duration-300",
|
|
18
18
|
a ? "w-1.5" : "w-1",
|
|
19
19
|
r === "speaking" ? "bg-brand-primary" : "bg-text-muted",
|
|
20
|
-
n ? i ? "animate-pulse [animation-duration:2.4s] opacity-70" : "animate-pulse" : "opacity-40"
|
|
20
|
+
n ? i ? "motion-safe:animate-pulse [animation-duration:2.4s] opacity-70" : "motion-safe:animate-pulse" : "opacity-40"
|
|
21
21
|
].join(" "),
|
|
22
22
|
style: {
|
|
23
23
|
height: n ? `${(i ? [
|
package/dist/shared-assistant.js
CHANGED
|
@@ -39,71 +39,72 @@ import { detectScriptLocale as Sn, resolveSpeechLocale as Cn } from "./shared/as
|
|
|
39
39
|
import { IDLE_PLAYBACK as wn, isSpeakingMessage as Tn, publishedChunks as En, requiresCancel as Dn, speechPlaybackReducer as On } from "./shared/assistant/voice/speechPlayback.js";
|
|
40
40
|
import { MAX_INLINE_IMAGE_BASE64_BYTES as kn, MAX_REQUEST_BODY_BYTES as An } from "./shared/assistant/gatewayLimits.js";
|
|
41
41
|
import { BOILERPLATE_PAGE_SHARE as jn, MAX_BOILERPLATE_LINE_CHARS as Mn, MAX_EXTRACTED_CHARS as Nn, MAX_PDF_PAGES_SCANNED as Pn, MIN_PAGE_TEXT_CHARS as Fn, MIN_TEXT_PAGE_SHARE as In, columnLetterToIndex as Ln, decodeXmlEntities as Rn, docxXmlToText as zn, fitPdfPages as Bn, formatPageRanges as Vn, isMostlyImagePages as Hn, joinSheets as Un, pageMarker as Wn, parseSharedStrings as Gn, parseWorkbookSheets as Kn, pdfTextItemsToPage as qn, sheetXmlToRows as Jn, summarisePageText as Yn, truncatePagesForInline as Xn } from "./shared/assistant/documentText.js";
|
|
42
|
-
import { ATTACHMENT_ACCEPT as Zn, AttachmentRejectedError as Qn, INLINE_IMAGE_MAX_DIM as $n, INLINE_IMAGE_QUALITY as er, MAX_ATTACHMENTS as tr, MAX_FILE_BYTES as nr, MAX_INLINE_CHARS_PER_FILE as rr, MAX_INLINE_CHARS_TOTAL as ir, MAX_INLINE_IMAGE_BASE64_CHARS as ar, MAX_INLINE_IMAGE_PARTS as or, MAX_INLINE_TURN_BODY_BYTES as sr, MAX_TURN_BODY_BYTES as cr, PROMPT_ENVELOPE_RESERVE_BYTES as lr,
|
|
43
|
-
import { useAssistantStore as
|
|
44
|
-
import { isTurnInFlight as
|
|
45
|
-
import { PHRASE_ROTATE_MS as
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
106
|
-
import {
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
|
|
42
|
+
import { ATTACHMENT_ACCEPT as Zn, AttachmentRejectedError as Qn, INLINE_IMAGE_MAX_DIM as $n, INLINE_IMAGE_QUALITY as er, MAX_ATTACHMENTS as tr, MAX_FILE_BYTES as nr, MAX_INLINE_CHARS_PER_FILE as rr, MAX_INLINE_CHARS_TOTAL as ir, MAX_INLINE_IMAGE_BASE64_CHARS as ar, MAX_INLINE_IMAGE_PARTS as or, MAX_INLINE_TURN_BODY_BYTES as sr, MAX_TURN_BODY_BYTES as cr, PROMPT_ENVELOPE_RESERVE_BYTES as lr, PROVIDER_READABLE_FILE_MEDIA_TYPES as ur, TURN_BODY_HEADROOM_BYTES as dr, buildAttachmentPromptBlock as fr, buildPromptParts as pr, buildPromptWithAttachments as mr, classifyAttachment as hr, countInlineImageCandidates as gr, countInlinedImageParts as _r, detectDocumentFormat as vr, estimateTurnBodyBytes as yr, formatBytes as br, getAttachmentSendBlocker as xr, getExtension as Sr, getSendableAttachments as Cr, hasAttachmentWorkInFlight as wr, isProviderReadableFilePart as Tr, parseDataUrl as Er, toMessageAttachment as Dr, truncateForInline as Or, validateFile as kr } from "./shared/assistant/attachments.js";
|
|
43
|
+
import { useAssistantStore as Ar } from "./shared/assistant/store.js";
|
|
44
|
+
import { isTurnInFlight as jr, planAbandonedTurn as Mr, planTurnAbort as Nr } from "./shared/assistant/turnState.js";
|
|
45
|
+
import { PHRASE_ROTATE_MS as Pr, STAGE_COPY as Fr, THINKING_PHRASES as Ir, isStageCopy as Lr, stageText as Rr, statusStageCopy as zr, thinkingPhrase as Br } from "./shared/assistant/stageCopy.js";
|
|
46
|
+
import { AssistantAvatar as Vr } from "./shared/assistant/ui/AssistantAvatar.js";
|
|
47
|
+
import { AssistantToolActivity as Hr, parseToolActivity as Ur } from "./shared/assistant/ui/AssistantToolActivity.js";
|
|
48
|
+
import { AssistantSpeechProvider as Wr, useAssistantSpeech as Gr } from "./shared/assistant/ui/AssistantSpeechProvider.js";
|
|
49
|
+
import { useVoiceSession as Kr } from "./shared/assistant/ui/useVoiceSession.js";
|
|
50
|
+
import { getActorId as qr, getOrganizationId as Jr, getWorkspaceId as Yr } from "./shared/assistant/context.js";
|
|
51
|
+
import { ATTACHMENT_SOURCES as Xr, availableAttachmentSources as Zr, deviceHasCamera as Qr } from "./shared/assistant/attachmentSources.js";
|
|
52
|
+
import { SANDBOX_READY_TTL_MS as $r, createReadinessTracker as ei, isRecentlyVerified as ti } from "./shared/assistant/sandboxReadiness.js";
|
|
53
|
+
import { AssistantAutoSpeakToggle as ni } from "./shared/assistant/ui/AssistantAutoSpeakToggle.js";
|
|
54
|
+
import { AssistantMessageAttachments as ri } from "./shared/assistant/ui/AssistantMessageAttachments.js";
|
|
55
|
+
import { AssistantPendingWriteCard as ii } from "./shared/assistant/ui/AssistantPendingWriteCard.js";
|
|
56
|
+
import { AssistantLanguageMenu as ai } from "./shared/assistant/ui/AssistantLanguageMenu.js";
|
|
57
|
+
import { AssistantReplyLanguageSelector as oi } from "./shared/assistant/ui/AssistantReplyLanguageSelector.js";
|
|
58
|
+
import { AssistantSpeakButton as si } from "./shared/assistant/ui/AssistantSpeakButton.js";
|
|
59
|
+
import { AssistantSpokenTurnsNotice as ci } from "./shared/assistant/ui/AssistantSpokenTurnsNotice.js";
|
|
60
|
+
import { AssistantConnectSourceProvider as li, useAssistantConnectSource as ui } from "./shared/assistant/ui/composer/connectSource.js";
|
|
61
|
+
import { AssistantConnectSourceItem as di } from "./shared/assistant/ui/composer/AssistantConnectSourceItem.js";
|
|
62
|
+
import { ASSISTANT_OVERLAY_ATTR as fi, ASSISTANT_PANEL_ATTR as pi, NO_PANEL_OVERLAY as mi, activePanelOverlay as hi, assistantPanelOwnsEscape as gi, escapeDismisses as _i, focusIsInsidePanel as vi, nextPanelOverlays as yi, panelOwnsEscape as bi } from "./shared/assistant/ui/panelOverlays.js";
|
|
63
|
+
import { useDropdownEscape as xi } from "./shared/assistant/ui/useDropdownEscape.js";
|
|
64
|
+
import { AssistantAttachmentButton as Si } from "./shared/assistant/ui/composer/AssistantAttachmentButton.js";
|
|
65
|
+
import { AssistantAttachmentChips as Ci } from "./shared/assistant/ui/composer/AssistantAttachmentChips.js";
|
|
66
|
+
import { AssistantPreviewProvider as wi, useAssistantPreview as Ti } from "./shared/assistant/preview/context.js";
|
|
67
|
+
import { IDLE_PREVIEW_STATE as Ei, isRunningStatus as Di, nextPreviewEvents as Oi } from "./shared/assistant/preview/previewTransitions.js";
|
|
68
|
+
import { IDLE_PREVIEW as ki, NO_OWNER as Ai, applyPreviewEvent as ji, createAssistantPreviewSurface as Mi, currentPreviewOwner as Ni, runBelongsTo as Pi, sameOwner as Fi } from "./shared/assistant/preview/surfaceState.js";
|
|
69
|
+
import { createRunIdentityCache as Ii, runIdentities as Li } from "./shared/assistant/preview/runIdentity.js";
|
|
70
|
+
import { IDLE_ACTIVE_TAB as Ri, nextActiveTab as zi, pinActiveTab as Bi, shouldPinOnMove as Vi, shouldPinOnSelect as Hi, stepsFromToolActivity as Ui, tabForArrowKey as Wi } from "./shared/assistant/preview/entity/entityPreviewState.js";
|
|
71
|
+
import { AssistantStepRail as Gi } from "./shared/assistant/preview/entity/AssistantStepRail.js";
|
|
72
|
+
import { AssistantEntityPreview as Ki } from "./shared/assistant/preview/entity/AssistantEntityPreview.js";
|
|
73
|
+
import { useOverlayFocus as qi } from "./shared/assistant/ui/useOverlayFocus.js";
|
|
74
|
+
import { useAssistantPreviewBridge as Ji } from "./shared/assistant/preview/useAssistantPreviewBridge.js";
|
|
75
|
+
import { AssistantPreviewOverlay as Yi } from "./shared/assistant/preview/AssistantPreviewOverlay.js";
|
|
76
|
+
import { AssistantLanguageSelector as Xi, FOLLOW_APP_LOCALE as Zi } from "./shared/assistant/ui/composer/AssistantLanguageSelector.js";
|
|
77
|
+
import { ASSISTANT_MODE_META as Qi, AssistantModeSelector as $i, nextModeIndex as ea } from "./shared/assistant/ui/composer/AssistantModeSelector.js";
|
|
78
|
+
import { AssistantVoiceButton as ta } from "./shared/assistant/ui/composer/AssistantVoiceButton.js";
|
|
79
|
+
import { AUTO_VOICE as na, AssistantVoiceSelector as ra } from "./shared/assistant/ui/composer/AssistantVoiceSelector.js";
|
|
80
|
+
import { AssistantVoiceOrb as ia } from "./shared/assistant/ui/voice/AssistantVoiceOrb.js";
|
|
81
|
+
import { AssistantVoiceSessionButton as aa } from "./shared/assistant/ui/voice/AssistantVoiceSessionButton.js";
|
|
82
|
+
import { CAPTION_SCROLL_ATTR as oa, VoiceCaption as sa } from "./shared/assistant/ui/voice/VoiceCaption.js";
|
|
83
|
+
import { VoiceConversationView as ca } from "./shared/assistant/ui/voice/VoiceConversationView.js";
|
|
84
|
+
import { VoiceWaveform as la } from "./shared/assistant/ui/voice/VoiceWaveform.js";
|
|
85
|
+
import { VoiceMiniController as ua } from "./shared/assistant/ui/voice/VoiceMiniController.js";
|
|
86
|
+
import { VoiceStage as da } from "./shared/assistant/ui/voice/VoiceStage.js";
|
|
87
|
+
import { VoiceTranscriptDrawer as fa } from "./shared/assistant/ui/voice/VoiceTranscriptDrawer.js";
|
|
88
|
+
import { downloadFile as pa, exportConversation as ma } from "./shared/assistant/exportConversation.js";
|
|
89
|
+
import { AssistantMoreMenu as ha } from "./shared/assistant/ui/AssistantMoreMenu.js";
|
|
90
|
+
import { AssistantHeader as ga } from "./shared/assistant/ui/AssistantHeader.js";
|
|
91
|
+
import { AssistantConversationList as _a } from "./shared/assistant/ui/AssistantConversationList.js";
|
|
92
|
+
import { AssistantEmptyState as va } from "./shared/assistant/ui/AssistantEmptyState.js";
|
|
93
|
+
import { AssistantMessageItem as ya } from "./shared/assistant/ui/AssistantMessageItem.js";
|
|
94
|
+
import { AssistantMessageList as ba } from "./shared/assistant/ui/AssistantMessageList.js";
|
|
95
|
+
import { AssistantVoiceSession as xa } from "./shared/assistant/ui/voice/AssistantVoiceSession.js";
|
|
96
|
+
import { useAssistantApiAccess as Sa } from "./shared/assistant/useAssistantApiAccess.js";
|
|
97
|
+
import { useConversationTurns as Ca } from "./shared/assistant/useConversationTurns.js";
|
|
98
|
+
import { isMultimodalBodyRejection as wa, isRecoverableAssistantError as Ta } from "./shared/assistant/transportErrors.js";
|
|
99
|
+
import { aiCreditsUpdatedEventName as Ea, dispatchAssistantQuotaExhausted as Da, notifyAiCreditsUpdated as Oa } from "./shared/assistant/aiCredits.js";
|
|
100
|
+
import { useWorkspaceWriteAccess as ka } from "./shared/assistant/useWorkspaceWriteAccess.js";
|
|
101
|
+
import { extractDocumentText as Aa } from "./shared/assistant/documentExtract.js";
|
|
102
|
+
import { useAssistantAttachments as ja } from "./shared/assistant/useAssistantAttachments.js";
|
|
103
|
+
import { AssistantComposer as Ma } from "./shared/assistant/ui/composer/AssistantComposer.js";
|
|
104
|
+
import { isProdRuntime as Na } from "./shared/assistant/env.js";
|
|
105
|
+
import { useAssistantHeartbeat as Pa } from "./shared/assistant/useAssistantHeartbeat.js";
|
|
106
|
+
import { useAssistantKeyboardShortcuts as Fa } from "./shared/assistant/useAssistantKeyboardShortcuts.js";
|
|
107
|
+
import { AssistantApiCallsConsentDialog as Ia } from "./shared/assistant/ui/AssistantApiCallsConsentDialog.js";
|
|
108
|
+
import { AssistantChatArea as La } from "./shared/assistant/ui/AssistantChatArea.js";
|
|
109
|
+
import { AIAssistantPanel as Ra } from "./shared/assistant/ui/AIAssistantPanel.js";
|
|
110
|
+
export { Ra as AIAssistantPanel, L as ASSISTANT_API_AUTH_STRATEGY, fn as ASSISTANT_LANGUAGES, Qi as ASSISTANT_MODE_META, fi as ASSISTANT_OVERLAY_ATTR, pi as ASSISTANT_PANEL_ATTR, Zn as ATTACHMENT_ACCEPT, Xr as ATTACHMENT_SOURCES, na as AUTO_VOICE, Ia as AssistantApiCallsConsentDialog, Si as AssistantAttachmentButton, Ci as AssistantAttachmentChips, ni as AssistantAutoSpeakToggle, Vr as AssistantAvatar, La as AssistantChatArea, Ma as AssistantComposer, di as AssistantConnectSourceItem, li as AssistantConnectSourceProvider, _a as AssistantConversationList, va as AssistantEmptyState, Ki as AssistantEntityPreview, ga as AssistantHeader, s as AssistantI18nProvider, ai as AssistantLanguageMenu, Xi as AssistantLanguageSelector, f as AssistantMarkdownImage, h as AssistantMarkdownRenderer, ri as AssistantMessageAttachments, ya as AssistantMessageItem, ba as AssistantMessageList, $i as AssistantModeSelector, ha as AssistantMoreMenu, g as AssistantNavigateProvider, ii as AssistantPendingWriteCard, Yi as AssistantPreviewOverlay, wi as AssistantPreviewProvider, t as AssistantProductProvider, oi as AssistantReplyLanguageSelector, _e as AssistantRuntimeManager, si as AssistantSpeakButton, Wr as AssistantSpeechProvider, ci as AssistantSpokenTurnsNotice, Gi as AssistantStepRail, Hr as AssistantToolActivity, ta as AssistantVoiceButton, ia as AssistantVoiceOrb, ra as AssistantVoiceSelector, xa as AssistantVoiceSession, aa as AssistantVoiceSessionButton, Qn as AttachmentRejectedError, jn as BOILERPLATE_PAGE_SHARE, oa as CAPTION_SCROLL_ATTR, O as CHECK_AI_CREDITS, k as CREATE_SANDBOX, Wt as DEFAULT_SPEAKABLE_LABELS, pn as DEFAULT_SPEECH_RATE, Ae as DEFAULT_STREAM_BUDGET_MS, _t as ENDPOINT_GRACE_MS, A as EXTEND_SANDBOX_TTL, Zi as FOLLOW_APP_LOCALE, j as GET_ACTIVE_SANDBOXES, M as GET_SANDBOX, qe as HOSTED_TTS_MAX_CHARS, Ue as HOSTED_TTS_TIER, We as HOSTED_VOICES, Ri as IDLE_ACTIVE_TAB, wn as IDLE_PLAYBACK, ki as IDLE_PREVIEW, Ei as IDLE_PREVIEW_STATE, vt as INITIAL_SESSION, $n as INLINE_IMAGE_MAX_DIM, er as INLINE_IMAGE_QUALITY, yt as INTERRUPT_MAX_MS, bt as INTERRUPT_MIN_MS, tr as MAX_ATTACHMENTS, Mn as MAX_BOILERPLATE_LINE_CHARS, Nn as MAX_EXTRACTED_CHARS, nr as MAX_FILE_BYTES, rr as MAX_INLINE_CHARS_PER_FILE, ir as MAX_INLINE_CHARS_TOTAL, kn as MAX_INLINE_IMAGE_BASE64_BYTES, ar as MAX_INLINE_IMAGE_BASE64_CHARS, or as MAX_INLINE_IMAGE_PARTS, sr as MAX_INLINE_TURN_BODY_BYTES, Pn as MAX_PDF_PAGES_SCANNED, An as MAX_REQUEST_BODY_BYTES, Gt as MAX_SPEAKABLE_CHARS, Kt as MAX_SPOKEN_TABLE_ROWS, cr as MAX_TURN_BODY_BYTES, nn as MINI_CAPTION_BUDGET, Fn as MIN_PAGE_TEXT_CHARS, In as MIN_TEXT_PAGE_SHARE, Ai as NO_OWNER, mi as NO_PANEL_OVERLAY, Pr as PHRASE_ROTATE_MS, an as POLL_FAST_MS, on as POLL_FAST_UNTIL_MS, sn as POLL_SLOW_MS, cn as POLL_STEADY_MS, ln as POLL_STEADY_UNTIL_MS, en as PREVIEW_LANGUAGES, lr as PROMPT_ENVELOPE_RESERVE_BYTES, ur as PROVIDER_READABLE_FILE_MEDIA_TYPES, N as PROXY_SANDBOX_REQUEST, P as REPORT_AI_TOKEN_USAGE, $r as SANDBOX_READY_TTL_MS, xt as SILENCE_SUBMIT_MS, Je as SPEAKING_RATE_MAX, Ye as SPEAKING_RATE_MAX_STREAMING, Xe as SPEAKING_RATE_MAX_SYNC, Ze as SPEAKING_RATE_MIN, qt as SPEECH_CHUNK_CHARS, Jt as SPEECH_CHUNK_CJK_CHARS, kt as SPEECH_LANG, bn as SPOKEN_LABEL_LANGUAGES, Fr as STAGE_COPY, F as STOP_ASSISTANT_SANDBOX, je as STREAM_BUDGET_MS, Ir as THINKING_PHRASES, dr as TURN_BODY_HEADROOM_BYTES, At as VOICE_LIST_TIMEOUT_MS, sa as VoiceCaption, ca as VoiceConversationView, ua as VoiceMiniController, da as VoiceStage, fa as VoiceTranscriptDrawer, la as VoiceWaveform, I as WAIT_FOR_SANDBOX_RUNNING, q as abortAssistantTurn, hi as activePanelOverlay, Ea as aiCreditsUpdatedEventName, ji as applyPreviewEvent, J as approvePendingWrite, gi as assistantPanelOwnsEscape, _ as assistantRoutePath, c as assistantTranslationKey, v as assistantUrlTransform, Zr as availableAttachmentSources, Qe as base64ToBytes, y as browserShouldHandle, He as browserSpeechEngine, Y as buildAssistantSandboxEnv, fr as buildAttachmentPromptBlock, Vt as buildContinuedFromVoiceNote, ve as buildProgress, pr as buildPromptParts, X as buildPromptRequestBody, mr as buildPromptWithAttachments, $e as buildRequest, E as buildSandboxContextInput, Ht as buildVoiceTranscriptMarkdown, Fe as chatTurns, Z as checkAssistantAiCredits, Yt as chunkForSpeech, b as classifyAssistantHref, hr as classifyAttachment, et as classifyHttpFailure, S as classifyQuotaError, Ln as columnLetterToIndex, ot as configureSpeechEngine, Xt as containsCjk, d as copyToClipboard, gr as countInlineImageCandidates, _r as countInlinedImageParts, Mi as createAssistantPreviewSurface, Q as createAssistantSandbox, $ as createAssistantSession, it as createHostedTtsEngine, ei as createReadinessTracker, at as createRoutingSpeechEngine, Ii as createRunIdentityCache, Oe as createSandboxAssistantTransport, st as createSpeechEngines, Ni as currentPreviewOwner, tt as decodeAudioResponse, Rn as decodeXmlEntities, C as describeQuotaError, vr as detectDocumentFormat, Sn as detectScriptLocale, Qr as deviceHasCamera, Da as dispatchAssistantQuotaExhausted, zn as docxXmlToText, ee as downloadAssistantArtifact, pa as downloadFile, _i as escapeDismisses, yr as estimateTurnBodyBytes, D as executeSandboxGraphQL, ma as exportConversation, te as extendAssistantSandboxTTL, Aa as extractDocumentText, mn as findAssistantLanguage, ne as findExistingSandbox, vn as findPendingWrite, Bn as fitPdfPages, vi as focusIsInsidePanel, br as formatBytes, Vn as formatPageRanges, qr as getActorId, re as getAssistantArtifacts, ye as getAssistantMedia, ie as getAssistantMessages, ae as getAssistantSession, oe as getAssistantStreamAccess, be as getAssistantText, xr as getAttachmentSendBlocker, U as getCapability, Sr as getExtension, R as getImageForMode, z as getImageTagForMode, Jr as getOrganizationId, xe as getRawMessageCreatedAt, B as getResourcesForMode, V as getSandboxImageRegistry, Cr as getSendableAttachments, ct as getSpeechEngine, Se as getToolProgress, Yr as getWorkspaceId, Ie as groupBySession, Le as groupConsecutiveBySession, wr as hasAttachmentWorkInFlight, Ge as hostedLocaleFor, Ke as hostedSupportsLanguage, p as imageHostLabel, Me as incompleteTurnNotice, St as isCapturing, Ct as isEcho, Hn as isMostlyImagePages, wa as isMultimodalBodyRejection, Na as isProdRuntime, Tr as isProviderReadableFilePart, w as isQuotaExhaustedError, Ce as isReapedSandboxConnectionError, ti as isRecentlyVerified, we as isRecoverable, Ta as isRecoverableAssistantError, m as isRemoteImageSrc, Di as isRunningStatus, Tn as isSpeakingMessage, jt as isSpeechBlocked, Lr as isStageCopy, wt as isSubmittable, jr as isTurnInFlight, W as isUnknownFieldError, Re as isVoiceTurn, Un as joinSheets, Mt as languageDisplayName, Te as mapSessionToHistory, G as markSupported, K as markUnsupported, Ee as mergeMessagesById, dt as micIsInterrupt, se as modeRequiresConfirmWrites, zi as nextActiveTab, ea as nextModeIndex, yi as nextPanelOverlays, Oi as nextPreviewEvents, Nt as normalizeLangTag, Oa as notifyAiCreditsUpdated, Tt as orbMode, Wn as pageMarker, bi as panelOwnsEscape, yn as parseConfirmationRefusal, Er as parseDataUrl, Gn as parseSharedStrings, Ur as parseToolActivity, Kn as parseWorkbookSheets, qn as pdfTextItemsToPage, Bi as pinActiveTab, Mr as planAbandonedTurn, Et as planReplyConsumption, Nr as planTurnAbort, un as pollDelayMs, Pt as primaryLanguageSubtag, En as publishedChunks, T as quotaExhaustedEventName, lt as readSpeechEngineConfig, ce as releaseSupersededAssistantSandboxes, gn as replyFollowsInput, le as reportAssistantAiTokenUsage, Dn as requiresCancel, ut as resetSpeechEngine, hn as resolveAssistantLanguage, _n as resolveLanguagePair, n as resolveModeConfig, H as resolveSandboxAssistantMode, Cn as resolveSpeechLocale, Pi as runBelongsTo, Li as runIdentities, Fi as sameOwner, De as sanitize, ue as selectExistingAssistantSandbox, de as selectSupersededAssistantSandboxes, Ft as selectVoiceForLocale, fe as sendAssistantPromptAsync, pe as sendHeartbeat, Jn as sheetXmlToRows, nt as shouldDisableEngine, Vi as shouldPinOnMove, Hi as shouldPinOnSelect, rn as showPreviousChunk, ft as showsAssistantCaption, pt as showsUserCaption, Zt as speakableEmail, It as speechGate, xn as speechLabelsFor, Lt as speechLangForLocale, On as speechPlaybackReducer, rt as splitForVendor, Qt as splitTableRow, Dt as spokenSoFar, Rr as stageText, zr as statusStageCopy, Ui as stepsFromToolActivity, me as stopReapedAssistantSandbox, Ne as streamBudgetMs, Yn as summarisePageText, Wi as tabForArrowKey, Br as thinkingPhrase, dn as toCaptionText, Dr as toMessageAttachment, $t as toSpeakableText, Or as truncateForInline, Xn as truncatePagesForInline, Sa as useAssistantApiAccess, ja as useAssistantAttachments, ui as useAssistantConnectSource, Pa as useAssistantHeartbeat, l as useAssistantI18nNamespace, Fa as useAssistantKeyboardShortcuts, x as useAssistantNavigate, r as useAssistantPageLabel, Ti as useAssistantPreview, Ji as useAssistantPreviewBridge, i as useAssistantProduct, a as useAssistantProductOrNull, Gr as useAssistantSpeech, o as useAssistantStorageFolders, Ar as useAssistantStore, u as useAssistantTr, Ca as useConversationTurns, xi as useDropdownEscape, qi as useOverlayFocus, ke as useSandboxAssistantTransport, e as useVoiceInput, Kr as useVoiceSession, ka as useWorkspaceWriteAccess, kr as validateFile, Rt as voiceAvailability, ze as voiceMarker, tn as voicePreviewText, zt as voiceQualityRank, Be as voiceSessionIdOf, Ot as voiceSessionReducer, mt as voiceStageState, Ut as voiceTranscriptFilename, Ve as voiceTurnsOnly, Bt as voicesForLocale, he as waitForAssistantServiceReady, ge as waitForSandboxRunning, ht as waveformIsActive, gt as waveformIsSettled, Pe as withIncompleteTurnNotice };
|