@burdenoff/fe-libs 2026.1029.9 → 2026.1029.11
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/i18nManifest.d.ts +4 -0
- package/dist/shared/assistant/i18nManifest.js +4 -0
- package/dist/shared/assistant/index.d.ts +2 -0
- package/dist/shared/assistant/speech/speechFeed.d.ts +4 -3
- package/dist/shared/assistant/speech/speechFeed.js +3 -2
- package/dist/shared/assistant/ui/AIAssistantPanel.d.ts +18 -0
- package/dist/shared/assistant/ui/AIAssistantPanel.js +158 -141
- package/dist/shared/assistant/ui/AssistantChatArea.js +10 -10
- package/dist/shared/assistant/ui/AssistantOverlay.d.ts +77 -3
- package/dist/shared/assistant/ui/AssistantOverlay.js +314 -113
- package/dist/shared/assistant/ui/AssistantSpeechProvider.js +140 -137
- package/dist/shared/assistant/ui/assistantOverlayState.d.ts +210 -0
- package/dist/shared/assistant/ui/assistantOverlayState.js +99 -29
- package/dist/shared/assistant/ui/compact/AssistantWindowHeader.d.ts +19 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowHeader.js +54 -0
- package/dist/shared/assistant/ui/composer/AssistantAttachmentButton.d.ts +8 -0
- package/dist/shared/assistant/ui/composer/AssistantAttachmentButton.js +34 -34
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +2 -1
- package/dist/shared/assistant/ui/useAssistantVisualViewport.d.ts +3 -0
- package/dist/shared/assistant/ui/useAssistantVisualViewport.js +24 -0
- package/dist/shared/assistant/ui/useVoiceSession.js +13 -8
- package/dist/shared-assistant.js +158 -156
- package/package.json +1 -1
|
@@ -33,7 +33,7 @@ function Te({ onSubmit: Te, latestReply: f, language: p, graceMs: Ee, onSupersed
|
|
|
33
33
|
g.muted,
|
|
34
34
|
g.correctionTimingDecision
|
|
35
35
|
]);
|
|
36
|
-
let j = u(null),
|
|
36
|
+
let j = u(null), Fe = u(!1), [Ie, M] = d(null), N = u(null), [Le, P] = d(null), [F, I] = d(!1), [Re, L] = d(!1), [R, z] = d(!1), B = u(g);
|
|
37
37
|
B.current = g;
|
|
38
38
|
let V = u([]), H = u(null), U = u(!1), W = c(() => {
|
|
39
39
|
V.current = [], H.current = null, U.current = !1;
|
|
@@ -222,13 +222,18 @@ function Te({ onSubmit: Te, latestReply: f, language: p, graceMs: Ee, onSupersed
|
|
|
222
222
|
if (e.type !== "audio") return;
|
|
223
223
|
let t = B.current.phase;
|
|
224
224
|
if (t !== "thinking" && t !== "speaking") return;
|
|
225
|
+
if (e.state === "retrying") {
|
|
226
|
+
if (j.current !== e.messageId || N.current?.id !== e.messageId) return;
|
|
227
|
+
j.current = null, N.current = null, M(e.messageId), _({ type: "reply-audio-paused" });
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
225
230
|
if (e.state === "ended") {
|
|
226
231
|
if (j.current !== e.messageId || N.current?.id !== e.messageId) return;
|
|
227
232
|
let n = i.peek(e.messageId);
|
|
228
233
|
n?.channel === "voice" && n.voiceSessionId === $.current && (N.current = {
|
|
229
234
|
id: e.messageId,
|
|
230
235
|
text: n.text
|
|
231
|
-
}),
|
|
236
|
+
}), M(null);
|
|
232
237
|
let r = N.current;
|
|
233
238
|
t === "thinking" && queueMicrotask(() => {
|
|
234
239
|
N.current === r && B.current.phase === "thinking" && _({ type: "reply-audio-ended" });
|
|
@@ -237,7 +242,7 @@ function Te({ onSubmit: Te, latestReply: f, language: p, graceMs: Ee, onSupersed
|
|
|
237
242
|
}
|
|
238
243
|
if (o(e.messageId)) return;
|
|
239
244
|
let n = i.peek(e.messageId);
|
|
240
|
-
if (!(!n || n.channel !== "voice" || n.voiceSessionId !== $.current)) if (e.state === "queued")
|
|
245
|
+
if (!(!n || n.channel !== "voice" || n.voiceSessionId !== $.current)) if (e.state === "queued") M(e.messageId), j.current = e.messageId, N.current = {
|
|
241
246
|
id: e.messageId,
|
|
242
247
|
text: n.text
|
|
243
248
|
}, qe();
|
|
@@ -251,16 +256,16 @@ function Te({ onSubmit: Te, latestReply: f, language: p, graceMs: Ee, onSupersed
|
|
|
251
256
|
partial: !n.final
|
|
252
257
|
})) : e.state === "paused" && j.current === e.messageId && _({ type: "reply-audio-paused" });
|
|
253
258
|
}), [qe]), l(() => {
|
|
254
|
-
g.phase !== "thinking" && g.phase !== "speaking" &&
|
|
259
|
+
g.phase !== "thinking" && g.phase !== "speaking" && M(null);
|
|
255
260
|
}, [g.phase]), l(() => {
|
|
256
261
|
let e = x !== null;
|
|
257
|
-
|
|
262
|
+
Fe.current && !e && (H.current = null, (B.current.phase !== "speaking" || !G()) && _({ type: "speech-ended" })), Fe.current = e;
|
|
258
263
|
}, [x, G]), l(() => {
|
|
259
264
|
g.phase !== "listening" && P((e) => e === "nothing-heard" ? null : e);
|
|
260
265
|
}, [g.phase]), l(() => {
|
|
261
266
|
if (g.phase !== "speaking" || x !== null) return;
|
|
262
267
|
let e = setTimeout(() => {
|
|
263
|
-
|
|
268
|
+
Fe.current || (W(), _({ type: "speech-ended" }));
|
|
264
269
|
}, xe);
|
|
265
270
|
return () => clearTimeout(e);
|
|
266
271
|
}, [
|
|
@@ -287,13 +292,13 @@ function Te({ onSubmit: Te, latestReply: f, language: p, graceMs: Ee, onSupersed
|
|
|
287
292
|
W,
|
|
288
293
|
S
|
|
289
294
|
]), l(() => {
|
|
290
|
-
b(se(g)), fe(g) &&
|
|
295
|
+
b(se(g)), fe(g) && Ie === null && !Z.suppressWebSpeech ? X.isActive || X.start("auto") : X.isActive && X.stop();
|
|
291
296
|
}, [
|
|
292
297
|
g,
|
|
293
298
|
X,
|
|
294
299
|
b,
|
|
295
300
|
Z.suppressWebSpeech,
|
|
296
|
-
|
|
301
|
+
Ie
|
|
297
302
|
]), l(() => {
|
|
298
303
|
g.phase !== "speaking" || !U.current || (U.current = !1, G() || _({ type: "speech-ended" }));
|
|
299
304
|
}, [g.phase, G]), l(() => {
|