@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.
@@ -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), M = u(!1), [Fe, Ie] = d(null), N = u(null), [Le, P] = d(null), [F, I] = d(!1), [Re, L] = d(!1), [R, z] = d(!1), B = u(g);
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
- }), Ie(null);
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") Ie(e.messageId), j.current = e.messageId, N.current = {
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" && Ie(null);
259
+ g.phase !== "thinking" && g.phase !== "speaking" && M(null);
255
260
  }, [g.phase]), l(() => {
256
261
  let e = x !== null;
257
- M.current && !e && (H.current = null, (B.current.phase !== "speaking" || !G()) && _({ type: "speech-ended" })), M.current = e;
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
- M.current || (W(), _({ type: "speech-ended" }));
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) && Fe === null && !Z.suppressWebSpeech ? X.isActive || X.start("auto") : X.isActive && X.stop();
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
- Fe
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(() => {