@burdenoff/fe-libs 2026.906.3 → 2026.906.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/shared/assistant/index.d.ts +1 -0
- package/dist/shared/assistant/index.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantSpeechProvider.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantSpeechProvider.js +100 -88
- package/dist/shared/assistant/ui/useVoiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/ui/useVoiceSession.js +3 -1
- package/dist/shared/assistant/ui/voice/VoiceCaption.d.ts +6 -0
- package/dist/shared/assistant/ui/voice/VoiceCaption.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/VoiceCaption.js +27 -14
- package/dist/shared/assistant/ui/voice/VoiceMiniController.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/VoiceMiniController.js +28 -27
- package/dist/shared/assistant/ui/voice/VoiceStage.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/VoiceStage.js +1 -0
- package/dist/shared/assistant/voice/miniCaptionBudget.d.ts +46 -0
- package/dist/shared/assistant/voice/miniCaptionBudget.d.ts.map +1 -0
- package/dist/shared/assistant/voice/miniCaptionBudget.js +15 -0
- package/dist/shared-assistant.js +69 -68
- package/package.json +1 -1
|
@@ -50,6 +50,7 @@ export * from './voice/speechVoices';
|
|
|
50
50
|
export * from './voice/voiceTranscript';
|
|
51
51
|
export * from './voice/speakableText';
|
|
52
52
|
export * from './voice/voicePreview';
|
|
53
|
+
export * from './voice/miniCaptionBudget';
|
|
53
54
|
export * from './voice/assistantPollSchedule';
|
|
54
55
|
export * from './voice/captionText';
|
|
55
56
|
export * from './voice/languagePair';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AA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AC;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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantSpeechProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantSpeechProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EASL,KAAK,EAAE,EACP,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AA2B/D,OAAO,EAQL,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"AssistantSpeechProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantSpeechProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EASL,KAAK,EAAE,EACP,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AA2B/D,OAAO,EAQL,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAiB/B,MAAM,WAAW,2BAA2B;IAC1C,gFAAgF;IAChF,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,iBAAiB,CAAC;IAChC;;;;OAIG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,6EAA6E;IAC7E,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;;;;;OAMG;IACH,UAAU,EAAE,CAAC,SAAS,EAAE,MA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BAAuB,EAAE,EAAE,CAAC,KAAK,CA6vB7C,CAAC"}
|
|
@@ -26,7 +26,7 @@ var de = {
|
|
|
26
26
|
emailAt: "at",
|
|
27
27
|
emailDot: "dot",
|
|
28
28
|
nestedItem: ""
|
|
29
|
-
}, S = h({
|
|
29
|
+
}, fe = 4e3, S = h({
|
|
30
30
|
isSupported: !1,
|
|
31
31
|
availability: "unsupported",
|
|
32
32
|
isBlocked: !0,
|
|
@@ -51,26 +51,30 @@ function C() {
|
|
|
51
51
|
return _(S);
|
|
52
52
|
}
|
|
53
53
|
var w = ({ children: h, visible: _ = !0, engine: C = n() }) => {
|
|
54
|
-
let w = ne(), { locale: T } = e(), [E, D] = le(oe, ae), [O, k] = x(() => C.listVoices()), [A,
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
let w = ne(), { locale: T } = e(), [E, D] = le(oe, ae), [O, k] = x(() => C.listVoices()), [A, j] = x(!1), [M, N] = x(() => /* @__PURE__ */ new Map()), P = b(0), F = b(null);
|
|
55
|
+
v(() => () => {
|
|
56
|
+
F.current !== null && clearTimeout(F.current);
|
|
57
|
+
}, []);
|
|
58
|
+
let [I, L] = x(null), R = b(null), z = b(() => {}), B = g(() => {
|
|
59
|
+
R.current?.(), R.current = null;
|
|
60
|
+
}, []), V = m((e) => e.autoSpeakEnabled), H = m((e) => e.setAutoSpeak), [U, pe] = x(!1), me = m((e) => e.activeConversationId), W = y(() => C.isSupported(), [C]);
|
|
57
61
|
v(() => {
|
|
58
|
-
if (!
|
|
62
|
+
if (!W) return;
|
|
59
63
|
let e = () => {
|
|
60
|
-
k(C.listVoices()),
|
|
64
|
+
k(C.listVoices()), N((e) => e.size === 0 ? e : /* @__PURE__ */ new Map());
|
|
61
65
|
};
|
|
62
66
|
return e(), C.subscribeVoices(e);
|
|
63
|
-
}, [C,
|
|
64
|
-
let
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
}, [C, W]);
|
|
68
|
+
let he = m((e) => e.assistantLanguage), ge = m((e) => e.replyLanguage), G = m((e) => e.preferredVoices), _e = m((e) => e.setPreferredVoice), K = y(() => te(he, ge, T).reply, [
|
|
69
|
+
he,
|
|
70
|
+
ge,
|
|
67
71
|
T
|
|
68
|
-
]), q = K.code, J = g((e) => f(e)?.tag ?? s(e), []),
|
|
69
|
-
|
|
72
|
+
]), q = K.code, J = g((e) => f(e)?.tag ?? s(e), []), ve = g((e) => f(e)?.rate ?? .9, []), Y = y(() => c(W, O, K.tag, A), [
|
|
73
|
+
W,
|
|
70
74
|
O,
|
|
71
75
|
K,
|
|
72
76
|
A
|
|
73
|
-
]),
|
|
77
|
+
]), ye = y(() => ({
|
|
74
78
|
codeBlock: w("speech.codeBlock", "Code block"),
|
|
75
79
|
image: w("speech.image", "image"),
|
|
76
80
|
link: w("speech.link", "link"),
|
|
@@ -80,8 +84,8 @@ var w = ({ children: h, visible: _ = !0, engine: C = n() }) => {
|
|
|
80
84
|
emailAt: w("speech.emailAt", "at"),
|
|
81
85
|
emailDot: w("speech.emailDot", "dot")
|
|
82
86
|
}), [w]), X = g(() => {
|
|
83
|
-
|
|
84
|
-
}, [
|
|
87
|
+
B(), C.cancel(), D({ type: "stop" });
|
|
88
|
+
}, [B, C]), be = g((e) => {
|
|
85
89
|
let t = C.listVoices().find((t) => t.name === e) ?? null;
|
|
86
90
|
t && (X(), C.speak([d(q)], {
|
|
87
91
|
voice: t,
|
|
@@ -92,21 +96,21 @@ var w = ({ children: h, visible: _ = !0, engine: C = n() }) => {
|
|
|
92
96
|
q,
|
|
93
97
|
X,
|
|
94
98
|
J
|
|
95
|
-
]),
|
|
96
|
-
|
|
99
|
+
]), xe = g((e) => M.get(e) ?? null, [M]), Se = g((e, t, n) => {
|
|
100
|
+
B();
|
|
97
101
|
let i = !1, a = () => {}, o = (r) => {
|
|
98
102
|
if (!i) {
|
|
99
|
-
if (i = !0,
|
|
100
|
-
|
|
103
|
+
if (i = !0, R.current = null, clearTimeout(s), a(), r.length === 0) {
|
|
104
|
+
j(!0);
|
|
101
105
|
return;
|
|
102
106
|
}
|
|
103
|
-
k(r),
|
|
107
|
+
k(r), z.current(e, t, r, n);
|
|
104
108
|
}
|
|
105
109
|
}, s = setTimeout(() => o(C.listVoices()), r);
|
|
106
|
-
a = C.subscribeVoices(() => o(C.listVoices())),
|
|
107
|
-
i || (i = !0, clearTimeout(s), a(),
|
|
110
|
+
a = C.subscribeVoices(() => o(C.listVoices())), R.current = () => {
|
|
111
|
+
i || (i = !0, clearTimeout(s), a(), R.current = null);
|
|
108
112
|
};
|
|
109
|
-
}, [
|
|
113
|
+
}, [B, C]), Z = g((e, t, n, r) => {
|
|
110
114
|
let s = n;
|
|
111
115
|
if (s.length === 0) {
|
|
112
116
|
let e = C.listVoices();
|
|
@@ -115,38 +119,46 @@ var w = ({ children: h, visible: _ = !0, engine: C = n() }) => {
|
|
|
115
119
|
let l = J(r), u = o(c(!0, s, r, A));
|
|
116
120
|
if (u === "block") {
|
|
117
121
|
let t = w("speech.noVoiceForReply", "This reply is in {{language}}, and no {{language}} voice is installed on this device.", { language: i(l, T) });
|
|
118
|
-
|
|
122
|
+
N((n) => new Map(n).set(e, t));
|
|
119
123
|
return;
|
|
120
124
|
}
|
|
121
125
|
if (u === "wait-for-voices") {
|
|
122
|
-
|
|
126
|
+
Se(e, t, r);
|
|
123
127
|
return;
|
|
124
128
|
}
|
|
125
|
-
|
|
129
|
+
N((t) => {
|
|
126
130
|
if (!t.has(e)) return t;
|
|
127
131
|
let n = new Map(t);
|
|
128
132
|
return n.delete(e), n;
|
|
129
133
|
});
|
|
130
|
-
let d =
|
|
131
|
-
|
|
134
|
+
let d = P.current + 1;
|
|
135
|
+
P.current = d, D({
|
|
132
136
|
type: "start",
|
|
133
137
|
messageId: e,
|
|
134
138
|
requestId: d
|
|
135
139
|
});
|
|
136
140
|
let f = ee(t);
|
|
137
|
-
|
|
141
|
+
L({
|
|
138
142
|
requestId: d,
|
|
139
143
|
chunks: f,
|
|
140
144
|
index: -1
|
|
141
|
-
}),
|
|
142
|
-
|
|
145
|
+
}), F.current !== null && clearTimeout(F.current), F.current = setTimeout(() => {
|
|
146
|
+
L((e) => e?.requestId === d && e.index < 0 ? null : e);
|
|
147
|
+
}, fe), C.speak(f, {
|
|
148
|
+
voice: a(s, l, G[r]),
|
|
143
149
|
lang: l,
|
|
144
|
-
rate:
|
|
150
|
+
rate: ve(r)
|
|
145
151
|
}, {
|
|
146
|
-
onChunkStart: (e) =>
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
152
|
+
onChunkStart: (e) => {
|
|
153
|
+
P.current === d && F.current !== null && (clearTimeout(F.current), F.current = null), L((t) => t?.requestId === d ? {
|
|
154
|
+
...t,
|
|
155
|
+
index: e
|
|
156
|
+
} : P.current === d ? {
|
|
157
|
+
requestId: d,
|
|
158
|
+
chunks: f,
|
|
159
|
+
index: e
|
|
160
|
+
} : t);
|
|
161
|
+
},
|
|
150
162
|
onEnd: () => D({
|
|
151
163
|
type: "finished",
|
|
152
164
|
requestId: d
|
|
@@ -159,27 +171,27 @@ var w = ({ children: h, visible: _ = !0, engine: C = n() }) => {
|
|
|
159
171
|
}, [
|
|
160
172
|
C,
|
|
161
173
|
T,
|
|
162
|
-
|
|
163
|
-
|
|
174
|
+
G,
|
|
175
|
+
ve,
|
|
164
176
|
J,
|
|
165
177
|
w,
|
|
166
178
|
A,
|
|
167
|
-
|
|
179
|
+
Se
|
|
168
180
|
]);
|
|
169
181
|
v(() => {
|
|
170
|
-
|
|
182
|
+
z.current = Z;
|
|
171
183
|
}, [Z]);
|
|
172
184
|
let Q = g((e, t, n) => {
|
|
173
|
-
if (!
|
|
174
|
-
let r = ie(u(t, { labels: de }), n ?? q), i = u(t, { labels: re(r,
|
|
185
|
+
if (!W) return;
|
|
186
|
+
let r = ie(u(t, { labels: de }), n ?? q), i = u(t, { labels: re(r, ye) });
|
|
175
187
|
i && Z(e, i, O, r);
|
|
176
188
|
}, [
|
|
177
|
-
|
|
178
|
-
|
|
189
|
+
W,
|
|
190
|
+
ye,
|
|
179
191
|
q,
|
|
180
192
|
Z,
|
|
181
193
|
O
|
|
182
|
-
]),
|
|
194
|
+
]), Ce = g((e, t, n) => {
|
|
183
195
|
if (p(E, e)) {
|
|
184
196
|
X();
|
|
185
197
|
return;
|
|
@@ -193,35 +205,35 @@ var w = ({ children: h, visible: _ = !0, engine: C = n() }) => {
|
|
|
193
205
|
v(() => {
|
|
194
206
|
_ || X();
|
|
195
207
|
}, [_, X]), v(() => {
|
|
196
|
-
X(),
|
|
197
|
-
}, [
|
|
198
|
-
|
|
208
|
+
X(), N(/* @__PURE__ */ new Map());
|
|
209
|
+
}, [me, X]), v(() => {
|
|
210
|
+
N((e) => e.size === 0 ? e : /* @__PURE__ */ new Map()), X();
|
|
199
211
|
}, [q, X]), v(() => () => {
|
|
200
|
-
|
|
212
|
+
R.current?.(), R.current = null, C.cancel();
|
|
201
213
|
}, [C]), v(() => {
|
|
202
214
|
if (typeof window > "u") return;
|
|
203
215
|
let e = () => C.cancel();
|
|
204
216
|
return window.addEventListener("pagehide", e), () => window.removeEventListener("pagehide", e);
|
|
205
217
|
}, [C]), v(() => {
|
|
206
|
-
if (typeof document > "u" || !
|
|
218
|
+
if (typeof document > "u" || !W) return;
|
|
207
219
|
let e = () => {
|
|
208
220
|
if (document.visibilityState !== "visible") return;
|
|
209
221
|
let e = C.listVoices();
|
|
210
|
-
e.length > 0 &&
|
|
222
|
+
e.length > 0 && B(), k(e), j(!1), N((e) => e.size === 0 ? e : /* @__PURE__ */ new Map());
|
|
211
223
|
};
|
|
212
224
|
return document.addEventListener("visibilitychange", e), window.addEventListener("focus", e), () => {
|
|
213
225
|
document.removeEventListener("visibilitychange", e), window.removeEventListener("focus", e);
|
|
214
226
|
};
|
|
215
227
|
}, [
|
|
216
|
-
|
|
228
|
+
B,
|
|
217
229
|
C,
|
|
218
|
-
|
|
230
|
+
W
|
|
219
231
|
]);
|
|
220
|
-
let
|
|
232
|
+
let we = b(Q);
|
|
221
233
|
v(() => {
|
|
222
|
-
|
|
234
|
+
we.current = Q;
|
|
223
235
|
}, [Q]), v(() => {
|
|
224
|
-
if (!(!
|
|
236
|
+
if (!(!V && !U || !_ || !W)) return m.subscribe((e, n) => {
|
|
225
237
|
let r = e.activeConversationId;
|
|
226
238
|
if (!r || r !== n.activeConversationId) return;
|
|
227
239
|
let i = e.processingByConversationId[r], a = n.processingByConversationId[r];
|
|
@@ -229,65 +241,65 @@ var w = ({ children: h, visible: _ = !0, engine: C = n() }) => {
|
|
|
229
241
|
let o = i.messageId ?? a?.messageId ?? null;
|
|
230
242
|
if (!o) return;
|
|
231
243
|
let s = e.conversations.find((e) => e.id === r)?.messages.find((e) => e.id === o);
|
|
232
|
-
if (!s || s.role !== "assistant" || t(s) !==
|
|
244
|
+
if (!s || s.role !== "assistant" || t(s) !== U) return;
|
|
233
245
|
let { text: c } = ce(s.content);
|
|
234
|
-
c.trim() &&
|
|
246
|
+
c.trim() && we.current(o, c, s.metadata?.lang);
|
|
235
247
|
});
|
|
236
248
|
}, [
|
|
237
|
-
R,
|
|
238
|
-
B,
|
|
239
249
|
V,
|
|
250
|
+
U,
|
|
251
|
+
W,
|
|
240
252
|
_
|
|
241
253
|
]);
|
|
242
|
-
let
|
|
254
|
+
let Te = y(() => l(O, K.tag), [O, K]), $ = y(() => a(O, K.tag, G[q]), [
|
|
243
255
|
O,
|
|
244
256
|
K,
|
|
245
|
-
|
|
257
|
+
G,
|
|
246
258
|
q
|
|
247
|
-
]),
|
|
248
|
-
isSupported:
|
|
259
|
+
]), Ee = y(() => ({
|
|
260
|
+
isSupported: W,
|
|
249
261
|
availability: Y,
|
|
250
262
|
isBlocked: Y === "no-voices",
|
|
251
263
|
disabledReason: Y === "no-voices" ? w("speech.noVoicesOnDevice", "This device has no speech voices installed. Add one in your device speech or accessibility settings.") : null,
|
|
252
|
-
blockedFor:
|
|
253
|
-
voiceChoices:
|
|
254
|
-
spokenChunks:
|
|
255
|
-
chunks:
|
|
256
|
-
index:
|
|
264
|
+
blockedFor: xe,
|
|
265
|
+
voiceChoices: Te,
|
|
266
|
+
spokenChunks: I ? {
|
|
267
|
+
chunks: I.chunks,
|
|
268
|
+
index: I.index
|
|
257
269
|
} : null,
|
|
258
270
|
activeVoiceName: $?.name ?? null,
|
|
259
|
-
preferredVoiceName:
|
|
260
|
-
setVoice: (e) =>
|
|
271
|
+
preferredVoiceName: G[q] ?? null,
|
|
272
|
+
setVoice: (e) => _e(q, e),
|
|
261
273
|
speakingMessageId: E.status === "speaking" ? E.messageId : null,
|
|
262
274
|
isSpeaking: (e) => p(E, e),
|
|
263
|
-
toggle:
|
|
275
|
+
toggle: Ce,
|
|
264
276
|
stop: X,
|
|
265
|
-
autoSpeakEnabled:
|
|
266
|
-
setAutoSpeak:
|
|
267
|
-
sessionSpeaking:
|
|
268
|
-
setSessionSpeaking:
|
|
269
|
-
previewVoice:
|
|
277
|
+
autoSpeakEnabled: V,
|
|
278
|
+
setAutoSpeak: H,
|
|
279
|
+
sessionSpeaking: U,
|
|
280
|
+
setSessionSpeaking: pe,
|
|
281
|
+
previewVoice: be
|
|
270
282
|
}), [
|
|
271
|
-
|
|
283
|
+
W,
|
|
272
284
|
Y,
|
|
273
|
-
|
|
274
|
-
|
|
285
|
+
xe,
|
|
286
|
+
Te,
|
|
275
287
|
$,
|
|
276
|
-
W,
|
|
277
288
|
G,
|
|
289
|
+
_e,
|
|
278
290
|
q,
|
|
279
291
|
E,
|
|
280
|
-
|
|
292
|
+
Ce,
|
|
281
293
|
X,
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
294
|
+
V,
|
|
295
|
+
H,
|
|
296
|
+
U,
|
|
297
|
+
be,
|
|
286
298
|
w,
|
|
287
|
-
|
|
299
|
+
I
|
|
288
300
|
]);
|
|
289
301
|
return /* @__PURE__ */ ue(S.Provider, {
|
|
290
|
-
value:
|
|
302
|
+
value: Ee,
|
|
291
303
|
children: h
|
|
292
304
|
});
|
|
293
305
|
};
|
|
@@ -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,GAC1B,SAAS,GACT,eAAe,GACf,eAAe,GACf,oBAAoB,CAAC;AAMzB,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;;
|
|
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,GAC1B,SAAS,GACT,eAAe,GACf,eAAe,GACf,oBAAoB,CAAC;AAMzB,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;;IAqftE,qEAAqE;;IAErE;;;;;;;OAOG;;;;;IAEH,+DAA+D;;IAE/D;;;;;;;OAOG;;IAIH,0EAA0E;;IAE1E,6DAA6D;;IAE7D,sDAAsD;;;;;;EA4B3D"}
|
|
@@ -77,7 +77,9 @@ function x({ onSubmit: x, latestReply: S, language: C }) {
|
|
|
77
77
|
error: "no-speech-support"
|
|
78
78
|
}) : G.error === "network" ? F("network") : G.error === "unknown" && F("recognition-failed");
|
|
79
79
|
}, [G.error]), d(() => {
|
|
80
|
-
|
|
80
|
+
G.error !== null || !G.isListening || F((e) => e === "network" || e === "recognition-failed" ? null : e);
|
|
81
|
+
}, [G.error, G.isListening]), d(() => {
|
|
82
|
+
if (G.isListening && F((e) => e === "not-capturing" ? null : e), !i(T) || G.isListening) return;
|
|
81
83
|
let e = setTimeout(() => F("not-capturing"), v);
|
|
82
84
|
return () => clearTimeout(e);
|
|
83
85
|
}, [T, G.isListening]), d(() => {
|
|
@@ -54,6 +54,12 @@ interface Props {
|
|
|
54
54
|
} | null;
|
|
55
55
|
testId?: string;
|
|
56
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Marks the scroll box the caption lives in, so the sounding chunk can be kept
|
|
59
|
+
* in view WITHOUT `scrollIntoView`, which also scrolls every ancestor scroller
|
|
60
|
+
* — here that would drag the page behind a docked session.
|
|
61
|
+
*/
|
|
62
|
+
export declare const CAPTION_SCROLL_ATTR = "data-caption-scroll";
|
|
57
63
|
export declare const VoiceCaption: FC<Props>;
|
|
58
64
|
export {};
|
|
59
65
|
//# sourceMappingURL=VoiceCaption.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoiceCaption.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/voice/VoiceCaption.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"VoiceCaption.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/voice/VoiceCaption.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,mDAAmD;IACnD,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AAEzD,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,KAAK,CAqKlC,CAAC"}
|
|
@@ -1,25 +1,38 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEffect as e, useRef as t } from "react";
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
3
|
//#region src/shared/assistant/ui/voice/VoiceCaption.tsx
|
|
3
|
-
var
|
|
4
|
-
let
|
|
5
|
-
return
|
|
4
|
+
var r = "data-caption-scroll", i = ({ text: i, role: a, expanded: o, spokenChunks: s = null, testId: c }) => {
|
|
5
|
+
let l = t(null), u = a === "assistant", d = u && s && s.index >= 0 ? s : null, f = u && s !== null && s.index < 0;
|
|
6
|
+
return e(() => {
|
|
7
|
+
let e = l.current;
|
|
8
|
+
if (!e) return;
|
|
9
|
+
let t = e.closest(`[${r}]`);
|
|
10
|
+
if (!t) return;
|
|
11
|
+
let n = e.offsetTop - t.offsetTop, i = n + e.offsetHeight;
|
|
12
|
+
i > t.scrollTop + t.clientHeight ? t.scrollTop = i - t.clientHeight : n < t.scrollTop && (t.scrollTop = n);
|
|
13
|
+
}, [d?.index]), /* @__PURE__ */ n("div", {
|
|
6
14
|
className: "flex w-full justify-center",
|
|
7
|
-
children: /* @__PURE__ */
|
|
15
|
+
children: /* @__PURE__ */ n("p", {
|
|
8
16
|
className: [
|
|
9
17
|
"w-full whitespace-pre-wrap break-words text-left",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
18
|
+
o ? "max-w-[45rem]" : "max-w-md",
|
|
19
|
+
u ? "font-semibold text-text-primary" : "font-medium text-text-secondary",
|
|
20
|
+
u ? o ? "text-[clamp(1.625rem,2.5vw,2.25rem)] leading-[1.5]" : "text-[clamp(1.625rem,2vw,2rem)] leading-[1.5]" : o ? "text-[clamp(1.125rem,1.8vw,1.375rem)] leading-[1.5]" : "text-base leading-relaxed"
|
|
13
21
|
].join(" "),
|
|
14
22
|
role: "status",
|
|
15
23
|
"aria-live": "polite",
|
|
16
|
-
"data-testid":
|
|
17
|
-
children:
|
|
18
|
-
className:
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
"data-testid": c,
|
|
25
|
+
children: d ? d.chunks.slice(0, d.index + 1).map((e, t) => /* @__PURE__ */ n("span", {
|
|
26
|
+
className: [
|
|
27
|
+
"block",
|
|
28
|
+
t > 0 ? "mt-2" : "",
|
|
29
|
+
t === d.index ? "text-text-primary" : "text-text-muted transition-colors duration-300"
|
|
30
|
+
].join(" "),
|
|
31
|
+
ref: t === d.index ? l : void 0,
|
|
32
|
+
children: e
|
|
33
|
+
}, t)) : f ? null : i
|
|
21
34
|
})
|
|
22
35
|
});
|
|
23
36
|
};
|
|
24
37
|
//#endregion
|
|
25
|
-
export {
|
|
38
|
+
export { r as CAPTION_SCROLL_ATTR, i as VoiceCaption };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoiceMiniController.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/voice/VoiceMiniController.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"VoiceMiniController.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/voice/VoiceMiniController.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;;;;;;;;;;GAiBG;AAEH,UAAU,KAAK;IACb,KAAK,EAAE,eAAe,CAAC;IACvB,uEAAuE;IACvE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,OAAO,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,KAAK,CAgHzC,CAAC"}
|
|
@@ -1,54 +1,55 @@
|
|
|
1
1
|
import { showsAssistantCaption as e, waveformIsActive as t, waveformIsSettled as n } from "../../voice/voiceStageState.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { showPreviousChunk as r } from "../../voice/miniCaptionBudget.js";
|
|
3
|
+
import { VoiceWaveform as i } from "./VoiceWaveform.js";
|
|
4
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
4
5
|
//#region src/shared/assistant/ui/voice/VoiceMiniController.tsx
|
|
5
|
-
var
|
|
6
|
-
let
|
|
7
|
-
return /* @__PURE__ */
|
|
6
|
+
var c = ({ state: c, caption: l, spokenChunks: u = null, statusText: d, control: f, errorText: p = null }) => {
|
|
7
|
+
let m = e(c), h = m && u && u.index >= 0 ? u : null;
|
|
8
|
+
return /* @__PURE__ */ s("div", {
|
|
8
9
|
className: "flex min-h-0 w-full flex-1 items-center gap-3 px-4",
|
|
9
10
|
"data-testid": "assistant-voice-mini",
|
|
10
|
-
"data-state":
|
|
11
|
-
children: [/* @__PURE__ */
|
|
11
|
+
"data-state": c,
|
|
12
|
+
children: [/* @__PURE__ */ s("div", {
|
|
12
13
|
className: "flex min-w-0 flex-1 flex-col gap-1.5",
|
|
13
|
-
children: [/* @__PURE__ */
|
|
14
|
+
children: [/* @__PURE__ */ s("div", {
|
|
14
15
|
className: "flex items-center gap-2",
|
|
15
|
-
children: [/* @__PURE__ */
|
|
16
|
-
active: t(
|
|
17
|
-
settled: n(
|
|
18
|
-
tone:
|
|
19
|
-
}), /* @__PURE__ */
|
|
16
|
+
children: [/* @__PURE__ */ o(i, {
|
|
17
|
+
active: t(c),
|
|
18
|
+
settled: n(c),
|
|
19
|
+
tone: c === "speaking" ? "speaking" : "listening"
|
|
20
|
+
}), /* @__PURE__ */ o("p", {
|
|
20
21
|
className: "truncate text-xs text-text-muted",
|
|
21
22
|
"aria-live": "polite",
|
|
22
23
|
"data-testid": "assistant-voice-status",
|
|
23
|
-
children:
|
|
24
|
+
children: d
|
|
24
25
|
})]
|
|
25
|
-
}),
|
|
26
|
+
}), c === "mic-error" ? /* @__PURE__ */ o("p", {
|
|
26
27
|
className: "line-clamp-2 text-xs text-status-warning",
|
|
27
28
|
role: "alert",
|
|
28
29
|
"data-testid": "assistant-voice-mini-error",
|
|
29
|
-
children:
|
|
30
|
-
}) :
|
|
31
|
-
className: ["line-clamp-3 break-words text-left text-sm leading-snug",
|
|
30
|
+
children: p
|
|
31
|
+
}) : l ? /* @__PURE__ */ o("p", {
|
|
32
|
+
className: ["line-clamp-3 break-words text-left text-sm leading-snug", m ? "font-semibold text-text-primary" : "font-medium text-text-secondary"].join(" "),
|
|
32
33
|
role: "status",
|
|
33
34
|
"aria-live": "polite",
|
|
34
35
|
"data-testid": "assistant-voice-caption",
|
|
35
|
-
children:
|
|
36
|
+
children: h ? /* @__PURE__ */ s(a, { children: [r(h) ? /* @__PURE__ */ s("span", {
|
|
36
37
|
className: "text-text-muted transition-colors duration-300",
|
|
37
|
-
children: [
|
|
38
|
-
}) : null, /* @__PURE__ */
|
|
38
|
+
children: [h.chunks[h.index - 1], " "]
|
|
39
|
+
}) : null, /* @__PURE__ */ o("span", {
|
|
39
40
|
className: "text-text-primary",
|
|
40
41
|
"data-testid": "assistant-voice-caption-current",
|
|
41
|
-
children:
|
|
42
|
-
})] }) :
|
|
43
|
-
}) : /* @__PURE__ */
|
|
42
|
+
children: h.chunks[h.index]
|
|
43
|
+
})] }) : l
|
|
44
|
+
}) : /* @__PURE__ */ o("div", {
|
|
44
45
|
className: "h-9",
|
|
45
46
|
"aria-hidden": "true"
|
|
46
47
|
})]
|
|
47
|
-
}), /* @__PURE__ */
|
|
48
|
+
}), /* @__PURE__ */ o("div", {
|
|
48
49
|
className: "shrink-0",
|
|
49
|
-
children:
|
|
50
|
+
children: f
|
|
50
51
|
})]
|
|
51
52
|
});
|
|
52
53
|
};
|
|
53
54
|
//#endregion
|
|
54
|
-
export {
|
|
55
|
+
export { c as VoiceMiniController };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoiceStage.d.ts","sourceRoot":"","sources":["../../../../../src/shared/assistant/ui/voice/VoiceStage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;;;;;;;;;;GAiBG;AAEH,UAAU,KAAK;IACb,KAAK,EAAE,eAAe,CAAC;IACvB,mDAAmD;IACnD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC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AAC"}
|
|
@@ -39,6 +39,7 @@ var l = ({ state: l, userCaption: u, assistantCaption: d, expanded: f, statusTex
|
|
|
39
39
|
})
|
|
40
40
|
}), _ ? /* @__PURE__ */ s("div", {
|
|
41
41
|
className: f ? "mb-12 max-h-[46vh] w-full overflow-y-auto" : "mb-6 max-h-[38vh] w-full overflow-y-auto",
|
|
42
|
+
"data-caption-scroll": "",
|
|
42
43
|
children: /* @__PURE__ */ s(i, {
|
|
43
44
|
text: _,
|
|
44
45
|
role: e(l) ? "assistant" : "user",
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Does the docked strip have room for the previously-spoken chunk?
|
|
3
|
+
*
|
|
4
|
+
* ★★ Lives here, not in `VoiceMiniController`, so it can be tested by CALLING
|
|
5
|
+
* it. The mini caption's other invariants are pinned by reading the component's
|
|
6
|
+
* source as text, which is all that is available for JSX — but this is a pure
|
|
7
|
+
* decision about lengths, and a real test that feeds it real chunk sizes is
|
|
8
|
+
* worth more than a grep for its name.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Roughly how many characters survive the strip's three-line clamp.
|
|
12
|
+
*
|
|
13
|
+
* ★★ Derived, not guessed — and the first version of this got it wrong in a
|
|
14
|
+
* way worth recording. It estimated ~75 characters of capacity and then set
|
|
15
|
+
* the budget to 160, so an 80+80 pair passed: the previous chunk is rendered
|
|
16
|
+
* FIRST, so it consumed the whole clamp and hid the sentence being spoken.
|
|
17
|
+
* The number contradicted the reasoning printed directly above it, and it
|
|
18
|
+
* re-admitted the exact bug this module exists to prevent.
|
|
19
|
+
*
|
|
20
|
+
* The arithmetic, at the docked panel width both products ship (440px):
|
|
21
|
+
* 440 − px-3 (24) − px-4 (32) − gap-3 (12) − orb w-40 (160) ≈ 212px
|
|
22
|
+
* and on a 320px phone the same subtraction leaves ≈ 92px. At `text-sm`
|
|
23
|
+
* (14px, ~7px average advance) that is ~30 and ~13 characters a line, so the
|
|
24
|
+
* three-line clamp holds roughly 90 and 40 characters respectively.
|
|
25
|
+
*
|
|
26
|
+
* The budget is the NARROWEST of those, not an average — 70 was the second
|
|
27
|
+
* wrong answer here. A single constant cannot be right for both widths, and
|
|
28
|
+
* the promise being kept is "the sentence being spoken is never dropped". Only
|
|
29
|
+
* fitting the smallest layout keeps it everywhere; sizing for the docked
|
|
30
|
+
* desktop case means a 40+30 pair passes and then clips the current chunk on a
|
|
31
|
+
* phone, which is the whole defect again in a narrower window.
|
|
32
|
+
*
|
|
33
|
+
* Erring small costs a little unused room on wide panels. Erring large costs
|
|
34
|
+
* the feature on small ones. Those are not symmetric.
|
|
35
|
+
*
|
|
36
|
+
* The consequence is deliberate: with chunks running to `SPEECH_CHUNK_CHARS` =
|
|
37
|
+
* 180, context will often NOT be shown — the honest answer, because there is
|
|
38
|
+
* often no room. "When there is room" has to mean something for the promise to
|
|
39
|
+
* hold at all.
|
|
40
|
+
*/
|
|
41
|
+
export declare const MINI_CAPTION_BUDGET = 40;
|
|
42
|
+
export declare const showPreviousChunk: (synced: {
|
|
43
|
+
chunks: string[];
|
|
44
|
+
index: number;
|
|
45
|
+
}) => boolean;
|
|
46
|
+
//# sourceMappingURL=miniCaptionBudget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"miniCaptionBudget.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/voice/miniCaptionBudget.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAmDtC,eAAO,MAAM,iBAAiB,GAAI,QAAQ;IACxC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,KAAG,OAOH,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/shared/assistant/voice/miniCaptionBudget.ts
|
|
2
|
+
var e = 40, t = (e) => {
|
|
3
|
+
let t = 0;
|
|
4
|
+
for (let n of e) {
|
|
5
|
+
let e = n.codePointAt(0) ?? 0;
|
|
6
|
+
t += e > 591 && !(e >= 880 && e <= 1279) ? 1.5 : 1;
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
}, n = (e) => {
|
|
10
|
+
if (e.index <= 0) return !1;
|
|
11
|
+
let n = e.chunks[e.index] ?? "", r = e.chunks[e.index - 1] ?? "";
|
|
12
|
+
return t(n) + t(r) <= 40;
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { e as MINI_CAPTION_BUDGET, n as showPreviousChunk };
|
package/dist/shared-assistant.js
CHANGED
|
@@ -22,71 +22,72 @@ import { SPEECH_LANG as Qe, VOICE_LIST_TIMEOUT_MS as $e, isSpeechBlocked as et,
|
|
|
22
22
|
import { buildContinuedFromVoiceNote as ut, buildVoiceTranscriptMarkdown as dt, voiceTranscriptFilename as ft } from "./shared/assistant/voice/voiceTranscript.js";
|
|
23
23
|
import { DEFAULT_SPEAKABLE_LABELS as pt, MAX_SPEAKABLE_CHARS as mt, MAX_SPOKEN_TABLE_ROWS as ht, SPEECH_CHUNK_CHARS as gt, SPEECH_CHUNK_CJK_CHARS as _t, chunkForSpeech as vt, containsCjk as yt, speakableEmail as bt, splitTableRow as xt, toSpeakableText as St } from "./shared/assistant/voice/speakableText.js";
|
|
24
24
|
import { PREVIEW_LANGUAGES as Ct, voicePreviewText as wt } from "./shared/assistant/voice/voicePreview.js";
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
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
|
-
|
|
25
|
+
import { MINI_CAPTION_BUDGET as Tt, showPreviousChunk as Et } from "./shared/assistant/voice/miniCaptionBudget.js";
|
|
26
|
+
import { POLL_FAST_MS as Dt, POLL_FAST_UNTIL_MS as Ot, POLL_SLOW_MS as kt, POLL_STEADY_MS as At, POLL_STEADY_UNTIL_MS as jt, pollDelayMs as Mt } from "./shared/assistant/voice/assistantPollSchedule.js";
|
|
27
|
+
import { toCaptionText as Nt } from "./shared/assistant/voice/captionText.js";
|
|
28
|
+
import { ASSISTANT_LANGUAGES as Pt, DEFAULT_SPEECH_RATE as Ft, findAssistantLanguage as It, resolveAssistantLanguage as Lt } from "./shared/assistant/voice/languages.js";
|
|
29
|
+
import { replyFollowsInput as Rt, resolveLanguagePair as zt } from "./shared/assistant/voice/languagePair.js";
|
|
30
|
+
import { findPendingWrite as Bt, parseConfirmationRefusal as Vt } from "./shared/assistant/pendingWrite.js";
|
|
31
|
+
import { AssistantProductProvider as Ht, resolveModeConfig as Ut, useAssistantPageLabel as Wt, useAssistantProduct as Gt, useAssistantProductOrNull as Kt, useAssistantStorageFolders as qt } from "./shared/assistant/product.js";
|
|
32
|
+
import { AssistantI18nProvider as Jt, assistantTranslationKey as Yt, useAssistantI18nNamespace as Xt, useAssistantTr as Zt } from "./shared/assistant/i18n.js";
|
|
33
|
+
import { SPOKEN_LABEL_LANGUAGES as Qt, speechLabelsFor as $t } from "./shared/assistant/voice/speechLabels.js";
|
|
34
|
+
import { detectScriptLocale as en, resolveSpeechLocale as tn } from "./shared/assistant/voice/replyLanguage.js";
|
|
35
|
+
import { IDLE_PLAYBACK as nn, isSpeakingMessage as rn, requiresCancel as an, speechPlaybackReducer as on } from "./shared/assistant/voice/speechPlayback.js";
|
|
36
|
+
import { MAX_INLINE_IMAGE_BASE64_BYTES as sn, MAX_REQUEST_BODY_BYTES as cn } from "./shared/assistant/gatewayLimits.js";
|
|
37
|
+
import { BOILERPLATE_PAGE_SHARE as ln, MAX_BOILERPLATE_LINE_CHARS as un, MAX_EXTRACTED_CHARS as dn, MAX_PDF_PAGES_SCANNED as fn, MIN_PAGE_TEXT_CHARS as pn, MIN_TEXT_PAGE_SHARE as mn, columnLetterToIndex as hn, decodeXmlEntities as gn, docxXmlToText as _n, fitPdfPages as vn, formatPageRanges as yn, isMostlyImagePages as bn, joinSheets as xn, pageMarker as Sn, parseSharedStrings as Cn, parseWorkbookSheets as wn, pdfTextItemsToPage as Tn, sheetXmlToRows as En, summarisePageText as Dn, truncatePagesForInline as On } from "./shared/assistant/documentText.js";
|
|
38
|
+
import { ATTACHMENT_ACCEPT as kn, AttachmentRejectedError as An, INLINE_IMAGE_MAX_DIM as jn, INLINE_IMAGE_QUALITY as Mn, MAX_ATTACHMENTS as Nn, MAX_FILE_BYTES as Pn, MAX_INLINE_CHARS_PER_FILE as Fn, MAX_INLINE_CHARS_TOTAL as In, MAX_INLINE_IMAGE_BASE64_CHARS as Ln, MAX_INLINE_IMAGE_PARTS as Rn, MAX_INLINE_TURN_BODY_BYTES as zn, MAX_TURN_BODY_BYTES as Bn, PROMPT_ENVELOPE_RESERVE_BYTES as Vn, TURN_BODY_HEADROOM_BYTES as Hn, buildAttachmentPromptBlock as Un, buildPromptParts as Wn, buildPromptWithAttachments as Gn, classifyAttachment as Kn, countInlineImageCandidates as qn, countInlinedImageParts as Jn, detectDocumentFormat as Yn, estimateTurnBodyBytes as Xn, formatBytes as Zn, getAttachmentSendBlocker as Qn, getExtension as $n, getSendableAttachments as er, hasAttachmentWorkInFlight as tr, parseDataUrl as nr, toMessageAttachment as rr, truncateForInline as ir, validateFile as ar } from "./shared/assistant/attachments.js";
|
|
39
|
+
import { useAssistantStore as or } from "./shared/assistant/store.js";
|
|
40
|
+
import { isTurnInFlight as sr } from "./shared/assistant/turnState.js";
|
|
41
|
+
import { AssistantToolActivity as cr, parseToolActivity as lr } from "./shared/assistant/ui/AssistantToolActivity.js";
|
|
42
|
+
import { AssistantSpeechProvider as ur, useAssistantSpeech as dr } from "./shared/assistant/ui/AssistantSpeechProvider.js";
|
|
43
|
+
import { useVoiceSession as fr } from "./shared/assistant/ui/useVoiceSession.js";
|
|
44
|
+
import { copyToClipboard as pr } from "./shared/assistant/clipboard.js";
|
|
45
|
+
import { getActorId as mr, getOrganizationId as hr, getWorkspaceId as gr } from "./shared/assistant/context.js";
|
|
46
|
+
import { ATTACHMENT_SOURCES as _r, availableAttachmentSources as vr, deviceHasCamera as yr } from "./shared/assistant/attachmentSources.js";
|
|
47
|
+
import { SANDBOX_READY_TTL_MS as br, createReadinessTracker as xr, isRecentlyVerified as Sr } from "./shared/assistant/sandboxReadiness.js";
|
|
48
|
+
import { AssistantAutoSpeakToggle as Cr } from "./shared/assistant/ui/AssistantAutoSpeakToggle.js";
|
|
49
|
+
import { AssistantMarkdownImage as wr, imageHostLabel as Tr, isRemoteImageSrc as Er } from "./shared/assistant/ui/AssistantMarkdownImage.js";
|
|
50
|
+
import { AssistantMarkdownRenderer as Dr, assistantUrlTransform as Or } from "./shared/assistant/ui/AssistantMarkdownRenderer.js";
|
|
51
|
+
import { AssistantMessageAttachments as kr } from "./shared/assistant/ui/AssistantMessageAttachments.js";
|
|
52
|
+
import { AssistantPendingWriteCard as Ar } from "./shared/assistant/ui/AssistantPendingWriteCard.js";
|
|
53
|
+
import { AssistantLanguageMenu as jr } from "./shared/assistant/ui/AssistantLanguageMenu.js";
|
|
54
|
+
import { AssistantReplyLanguageSelector as Mr } from "./shared/assistant/ui/AssistantReplyLanguageSelector.js";
|
|
55
|
+
import { AssistantSpeakButton as Nr } from "./shared/assistant/ui/AssistantSpeakButton.js";
|
|
56
|
+
import { AssistantSpokenTurnsNotice as Pr } from "./shared/assistant/ui/AssistantSpokenTurnsNotice.js";
|
|
57
|
+
import { AssistantAttachmentButton as Fr } from "./shared/assistant/ui/composer/AssistantAttachmentButton.js";
|
|
58
|
+
import { AssistantAttachmentChips as Ir } from "./shared/assistant/ui/composer/AssistantAttachmentChips.js";
|
|
59
|
+
import { AssistantLanguageSelector as Lr, FOLLOW_APP_LOCALE as Rr } from "./shared/assistant/ui/composer/AssistantLanguageSelector.js";
|
|
60
|
+
import { ASSISTANT_MODE_META as zr, AssistantModeSelector as Br, nextModeIndex as Vr } from "./shared/assistant/ui/composer/AssistantModeSelector.js";
|
|
61
|
+
import { AssistantVoiceButton as Hr } from "./shared/assistant/ui/composer/AssistantVoiceButton.js";
|
|
62
|
+
import { AUTO_VOICE as Ur, AssistantVoiceSelector as Wr } from "./shared/assistant/ui/composer/AssistantVoiceSelector.js";
|
|
63
|
+
import { AssistantVoiceOrb as Gr } from "./shared/assistant/ui/voice/AssistantVoiceOrb.js";
|
|
64
|
+
import { AssistantVoiceSessionButton as Kr } from "./shared/assistant/ui/voice/AssistantVoiceSessionButton.js";
|
|
65
|
+
import { CAPTION_SCROLL_ATTR as qr, VoiceCaption as Jr } from "./shared/assistant/ui/voice/VoiceCaption.js";
|
|
66
|
+
import { VoiceConversationView as Yr } from "./shared/assistant/ui/voice/VoiceConversationView.js";
|
|
67
|
+
import { VoiceWaveform as Xr } from "./shared/assistant/ui/voice/VoiceWaveform.js";
|
|
68
|
+
import { VoiceMiniController as Zr } from "./shared/assistant/ui/voice/VoiceMiniController.js";
|
|
69
|
+
import { VoiceStage as Qr } from "./shared/assistant/ui/voice/VoiceStage.js";
|
|
70
|
+
import { VoiceTranscriptDrawer as $r } from "./shared/assistant/ui/voice/VoiceTranscriptDrawer.js";
|
|
71
|
+
import { downloadFile as ei, exportConversation as ti } from "./shared/assistant/exportConversation.js";
|
|
72
|
+
import { AssistantMoreMenu as ni } from "./shared/assistant/ui/AssistantMoreMenu.js";
|
|
73
|
+
import { AssistantHeader as ri } from "./shared/assistant/ui/AssistantHeader.js";
|
|
74
|
+
import { AssistantConversationList as ii } from "./shared/assistant/ui/AssistantConversationList.js";
|
|
75
|
+
import { AssistantEmptyState as ai } from "./shared/assistant/ui/AssistantEmptyState.js";
|
|
76
|
+
import { AssistantMessageItem as oi } from "./shared/assistant/ui/AssistantMessageItem.js";
|
|
77
|
+
import { AssistantMessageList as si } from "./shared/assistant/ui/AssistantMessageList.js";
|
|
78
|
+
import { AssistantVoiceSession as ci } from "./shared/assistant/ui/voice/AssistantVoiceSession.js";
|
|
79
|
+
import { useAssistantApiAccess as li } from "./shared/assistant/useAssistantApiAccess.js";
|
|
80
|
+
import { useConversationTurns as ui } from "./shared/assistant/useConversationTurns.js";
|
|
81
|
+
import { isMultimodalBodyRejection as di, isRecoverableAssistantError as fi } from "./shared/assistant/transportErrors.js";
|
|
82
|
+
import { aiCreditsUpdatedEventName as pi, dispatchAssistantQuotaExhausted as mi, notifyAiCreditsUpdated as hi } from "./shared/assistant/aiCredits.js";
|
|
83
|
+
import { useWorkspaceWriteAccess as gi } from "./shared/assistant/useWorkspaceWriteAccess.js";
|
|
84
|
+
import { extractDocumentText as _i } from "./shared/assistant/documentExtract.js";
|
|
85
|
+
import { useAssistantAttachments as vi } from "./shared/assistant/useAssistantAttachments.js";
|
|
86
|
+
import { AssistantComposer as yi } from "./shared/assistant/ui/composer/AssistantComposer.js";
|
|
87
|
+
import { isProdRuntime as bi } from "./shared/assistant/env.js";
|
|
88
|
+
import { useAssistantHeartbeat as xi } from "./shared/assistant/useAssistantHeartbeat.js";
|
|
89
|
+
import { useAssistantKeyboardShortcuts as Si } from "./shared/assistant/useAssistantKeyboardShortcuts.js";
|
|
90
|
+
import { AssistantApiCallsConsentDialog as Ci } from "./shared/assistant/ui/AssistantApiCallsConsentDialog.js";
|
|
91
|
+
import { AssistantChatArea as wi } from "./shared/assistant/ui/AssistantChatArea.js";
|
|
92
|
+
import { AIAssistantPanel as Ti } from "./shared/assistant/ui/AIAssistantPanel.js";
|
|
93
|
+
export { Ti as AIAssistantPanel, h as ASSISTANT_API_AUTH_STRATEGY, Pt as ASSISTANT_LANGUAGES, zr as ASSISTANT_MODE_META, kn as ATTACHMENT_ACCEPT, _r as ATTACHMENT_SOURCES, Ur as AUTO_VOICE, Ci as AssistantApiCallsConsentDialog, Fr as AssistantAttachmentButton, Ir as AssistantAttachmentChips, Cr as AssistantAutoSpeakToggle, wi as AssistantChatArea, yi as AssistantComposer, ii as AssistantConversationList, ai as AssistantEmptyState, ri as AssistantHeader, Jt as AssistantI18nProvider, jr as AssistantLanguageMenu, Lr as AssistantLanguageSelector, wr as AssistantMarkdownImage, Dr as AssistantMarkdownRenderer, kr as AssistantMessageAttachments, oi as AssistantMessageItem, si as AssistantMessageList, Br as AssistantModeSelector, ni as AssistantMoreMenu, Ar as AssistantPendingWriteCard, Ht as AssistantProductProvider, Mr as AssistantReplyLanguageSelector, G as AssistantRuntimeManager, Nr as AssistantSpeakButton, ur as AssistantSpeechProvider, Pr as AssistantSpokenTurnsNotice, cr as AssistantToolActivity, Hr as AssistantVoiceButton, Gr as AssistantVoiceOrb, Wr as AssistantVoiceSelector, ci as AssistantVoiceSession, Kr as AssistantVoiceSessionButton, An as AttachmentRejectedError, ln as BOILERPLATE_PAGE_SHARE, qr as CAPTION_SCROLL_ATTR, o as CHECK_AI_CREDITS, s as CREATE_SANDBOX, pt as DEFAULT_SPEAKABLE_LABELS, Ft as DEFAULT_SPEECH_RATE, Be as ENDPOINT_GRACE_MS, c as EXTEND_SANDBOX_TTL, Rr as FOLLOW_APP_LOCALE, l as GET_ACTIVE_SANDBOXES, u as GET_SANDBOX, ge as HOSTED_TTS_MAX_CHARS, fe as HOSTED_TTS_TIER, pe as HOSTED_VOICES, nn as IDLE_PLAYBACK, Ve as INITIAL_SESSION, jn as INLINE_IMAGE_MAX_DIM, Mn as INLINE_IMAGE_QUALITY, He as INTERRUPT_MAX_MS, Ue as INTERRUPT_MIN_MS, Nn as MAX_ATTACHMENTS, un as MAX_BOILERPLATE_LINE_CHARS, dn as MAX_EXTRACTED_CHARS, Pn as MAX_FILE_BYTES, Fn as MAX_INLINE_CHARS_PER_FILE, In as MAX_INLINE_CHARS_TOTAL, sn as MAX_INLINE_IMAGE_BASE64_BYTES, Ln as MAX_INLINE_IMAGE_BASE64_CHARS, Rn as MAX_INLINE_IMAGE_PARTS, zn as MAX_INLINE_TURN_BODY_BYTES, fn as MAX_PDF_PAGES_SCANNED, cn as MAX_REQUEST_BODY_BYTES, mt as MAX_SPEAKABLE_CHARS, ht as MAX_SPOKEN_TABLE_ROWS, Bn as MAX_TURN_BODY_BYTES, Tt as MINI_CAPTION_BUDGET, pn as MIN_PAGE_TEXT_CHARS, mn as MIN_TEXT_PAGE_SHARE, Dt as POLL_FAST_MS, Ot as POLL_FAST_UNTIL_MS, kt as POLL_SLOW_MS, At as POLL_STEADY_MS, jt as POLL_STEADY_UNTIL_MS, Ct as PREVIEW_LANGUAGES, Vn as PROMPT_ENVELOPE_RESERVE_BYTES, d as PROXY_SANDBOX_REQUEST, f as REPORT_AI_TOKEN_USAGE, br as SANDBOX_READY_TTL_MS, We as SILENCE_SUBMIT_MS, _e as SPEAKING_RATE_MAX, ve as SPEAKING_RATE_MAX_STREAMING, ye as SPEAKING_RATE_MAX_SYNC, be as SPEAKING_RATE_MIN, gt as SPEECH_CHUNK_CHARS, _t as SPEECH_CHUNK_CJK_CHARS, Qe as SPEECH_LANG, Qt as SPOKEN_LABEL_LANGUAGES, p as STOP_ASSISTANT_SANDBOX, Hn as TURN_BODY_HEADROOM_BYTES, $e as VOICE_LIST_TIMEOUT_MS, Jr as VoiceCaption, Yr as VoiceConversationView, Zr as VoiceMiniController, Qr as VoiceStage, $r as VoiceTranscriptDrawer, Xr as VoiceWaveform, m as WAIT_FOR_SANDBOX_RUNNING, pi as aiCreditsUpdatedEventName, Yt as assistantTranslationKey, Or as assistantUrlTransform, vr as availableAttachmentSources, xe as base64ToBytes, de as browserSpeechEngine, T as buildAssistantSandboxEnv, Un as buildAttachmentPromptBlock, ut as buildContinuedFromVoiceNote, K as buildProgress, Wn as buildPromptParts, E as buildPromptRequestBody, Gn as buildPromptWithAttachments, Se as buildRequest, i as buildSandboxContextInput, dt as buildVoiceTranscriptMarkdown, ie as chatTurns, D as checkAssistantAiCredits, vt as chunkForSpeech, Kn as classifyAttachment, Ce as classifyHttpFailure, t as classifyQuotaError, hn as columnLetterToIndex, ke as configureSpeechEngine, yt as containsCjk, pr as copyToClipboard, qn as countInlineImageCandidates, Jn as countInlinedImageParts, O as createAssistantSandbox, k as createAssistantSession, De as createHostedTtsEngine, xr as createReadinessTracker, Oe as createRoutingSpeechEngine, ne as createSandboxAssistantTransport, Ae as createSpeechEngines, we as decodeAudioResponse, gn as decodeXmlEntities, Yn as detectDocumentFormat, en as detectScriptLocale, yr as deviceHasCamera, mi as dispatchAssistantQuotaExhausted, _n as docxXmlToText, A as downloadAssistantArtifact, ei as downloadFile, Xn as estimateTurnBodyBytes, a as executeSandboxGraphQL, ti as exportConversation, j as extendAssistantSandboxTTL, _i as extractDocumentText, It as findAssistantLanguage, M as findExistingSandbox, Bt as findPendingWrite, vn as fitPdfPages, Zn as formatBytes, yn as formatPageRanges, mr as getActorId, N as getAssistantArtifacts, q as getAssistantMedia, P as getAssistantMessages, F as getAssistantSession, I as getAssistantStreamAccess, J as getAssistantText, Qn as getAttachmentSendBlocker, x as getCapability, $n as getExtension, g as getImageForMode, _ as getImageTagForMode, hr as getOrganizationId, Y as getRawMessageCreatedAt, v as getResourcesForMode, y as getSandboxImageRegistry, er as getSendableAttachments, je as getSpeechEngine, X as getToolProgress, gr as getWorkspaceId, ae as groupBySession, oe as groupConsecutiveBySession, tr as hasAttachmentWorkInFlight, me as hostedLocaleFor, he as hostedSupportsLanguage, Tr as imageHostLabel, Ge as isCapturing, Ke as isEcho, bn as isMostlyImagePages, di as isMultimodalBodyRejection, bi as isProdRuntime, n as isQuotaExhaustedError, Z as isReapedSandboxConnectionError, Sr as isRecentlyVerified, Q as isRecoverable, fi as isRecoverableAssistantError, Er as isRemoteImageSrc, rn as isSpeakingMessage, et as isSpeechBlocked, qe as isSubmittable, sr as isTurnInFlight, S as isUnknownFieldError, se as isVoiceTurn, xn as joinSheets, tt as languageDisplayName, $ as mapSessionToHistory, C as markSupported, w as markUnsupported, ee as mergeMessagesById, Pe as micIsInterrupt, L as modeRequiresConfirmWrites, Vr as nextModeIndex, nt as normalizeLangTag, hi as notifyAiCreditsUpdated, Je as orbMode, Sn as pageMarker, Vt as parseConfirmationRefusal, nr as parseDataUrl, Cn as parseSharedStrings, lr as parseToolActivity, wn as parseWorkbookSheets, Tn as pdfTextItemsToPage, Ye as planReplyConsumption, Mt as pollDelayMs, rt as primaryLanguageSubtag, r as quotaExhaustedEventName, Me as readSpeechEngineConfig, Rt as replyFollowsInput, R as reportAssistantAiTokenUsage, an as requiresCancel, Ne as resetSpeechEngine, Lt as resolveAssistantLanguage, zt as resolveLanguagePair, Ut as resolveModeConfig, b as resolveSandboxAssistantMode, tn as resolveSpeechLocale, te as sanitize, z as selectExistingAssistantSandbox, it as selectVoiceForLocale, B as sendAssistantPromptAsync, V as sendHeartbeat, En as sheetXmlToRows, Te as shouldDisableEngine, Et as showPreviousChunk, Fe as showsAssistantCaption, Ie as showsUserCaption, bt as speakableEmail, at as speechGate, $t as speechLabelsFor, ot as speechLangForLocale, on as speechPlaybackReducer, Ee as splitForVendor, xt as splitTableRow, Xe as spokenSoFar, H as stopReapedAssistantSandbox, Dn as summarisePageText, Nt as toCaptionText, rr as toMessageAttachment, St as toSpeakableText, ir as truncateForInline, On as truncatePagesForInline, li as useAssistantApiAccess, vi as useAssistantAttachments, xi as useAssistantHeartbeat, Xt as useAssistantI18nNamespace, Si as useAssistantKeyboardShortcuts, Wt as useAssistantPageLabel, Gt as useAssistantProduct, Kt as useAssistantProductOrNull, dr as useAssistantSpeech, qt as useAssistantStorageFolders, or as useAssistantStore, Zt as useAssistantTr, ui as useConversationTurns, re as useSandboxAssistantTransport, e as useVoiceInput, fr as useVoiceSession, gi as useWorkspaceWriteAccess, ar as validateFile, st as voiceAvailability, ce as voiceMarker, wt as voicePreviewText, ct as voiceQualityRank, le as voiceSessionIdOf, Ze as voiceSessionReducer, Le as voiceStageState, ft as voiceTranscriptFilename, ue as voiceTurnsOnly, lt as voicesForLocale, U as waitForAssistantServiceReady, W as waitForSandboxRunning, Re as waveformIsActive, ze as waveformIsSettled };
|