@burdenoff/fe-libs 2026.925.6 → 2026.925.8

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.
Files changed (52) hide show
  1. package/dist/chrome/Footer.d.ts +1 -1
  2. package/dist/chrome/Footer.js +2 -2
  3. package/dist/chrome/MobileTabBar.js +6 -6
  4. package/dist/chrome/ProductSideNav.js +9 -9
  5. package/dist/chrome/ProductSwitcher.d.ts +1 -1
  6. package/dist/chrome/sideNavigation/useSideNavigationState.js +3 -3
  7. package/dist/chrome.js +8 -8
  8. package/dist/shared/assistant/autoRouting.d.ts +3 -0
  9. package/dist/shared/assistant/autoRouting.d.ts.map +1 -1
  10. package/dist/shared/assistant/autoRouting.js +1 -1
  11. package/dist/shared/assistant/conversation.d.ts +20 -0
  12. package/dist/shared/assistant/conversation.d.ts.map +1 -1
  13. package/dist/shared/assistant/i18nManifest.d.ts +11 -0
  14. package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
  15. package/dist/shared/assistant/i18nManifest.js +11 -0
  16. package/dist/shared/assistant/index.d.ts +2 -0
  17. package/dist/shared/assistant/index.d.ts.map +1 -1
  18. package/dist/shared/assistant/localUiCommandCopy.d.ts +26 -0
  19. package/dist/shared/assistant/localUiCommandCopy.d.ts.map +1 -0
  20. package/dist/shared/assistant/localUiCommandCopy.js +37 -0
  21. package/dist/shared/assistant/localUiCommands.d.ts +124 -0
  22. package/dist/shared/assistant/localUiCommands.d.ts.map +1 -0
  23. package/dist/shared/assistant/localUiCommands.js +173 -0
  24. package/dist/shared/assistant/product.d.ts +13 -1
  25. package/dist/shared/assistant/product.d.ts.map +1 -1
  26. package/dist/shared/assistant/product.js +8 -6
  27. package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
  28. package/dist/shared/assistant/ui/AssistantChatArea.js +615 -524
  29. package/dist/shared/assistant/ui/AssistantMessageItem.d.ts +6 -0
  30. package/dist/shared/assistant/ui/AssistantMessageItem.d.ts.map +1 -1
  31. package/dist/shared/assistant/ui/AssistantMessageItem.js +3 -3
  32. package/dist/shared/assistant/ui/AssistantMessageList.d.ts.map +1 -1
  33. package/dist/shared/assistant/ui/AssistantMessageList.js +14 -7
  34. package/dist/shared/assistant/ui/AssistantSpeechProvider.d.ts +9 -0
  35. package/dist/shared/assistant/ui/AssistantSpeechProvider.d.ts.map +1 -1
  36. package/dist/shared/assistant/ui/AssistantSpeechProvider.js +243 -196
  37. package/dist/shared/assistant/ui/useVoiceSession.d.ts.map +1 -1
  38. package/dist/shared/assistant/ui/useVoiceSession.js +44 -43
  39. package/dist/shared/assistant/voice/captionText.d.ts.map +1 -1
  40. package/dist/shared/assistant/voice/captionText.js +1 -1
  41. package/dist/shared/assistant/voice/speakableText.d.ts.map +1 -1
  42. package/dist/shared/assistant/voice/speakableText.js +63 -62
  43. package/dist/shared/config/products.js +1 -1
  44. package/dist/shared/hooks/shell/index.d.ts +1 -1
  45. package/dist/shared/hooks/shell/index.d.ts.map +1 -1
  46. package/dist/shared/providers/shell/ThemeProvider.d.ts +6 -0
  47. package/dist/shared/providers/shell/ThemeProvider.d.ts.map +1 -1
  48. package/dist/shared/providers/shell/ThemeProvider.js +28 -25
  49. package/dist/shared/types/index.d.ts +1 -1
  50. package/dist/shared-assistant.js +16 -14
  51. package/dist/shared-hooks-shell.js +12 -12
  52. package/package.json +1 -1
@@ -9,16 +9,16 @@ import { findAssistantLanguage as m } from "../voice/languages.js";
9
9
  import { resolveLanguagePair as te } from "../voice/languagePair.js";
10
10
  import { speechLabelsFor as ne } from "../voice/speechLabels.js";
11
11
  import { resolveSpeechLocale as re } from "../voice/replyLanguage.js";
12
- import { IDLE_PLAYBACK as ie, isSpeakingMessage as h, publishedChunks as ae, speechPlaybackReducer as oe } from "../voice/speechPlayback.js";
13
- import { useAssistantStore as g } from "../store.js";
14
- import { isTurnInFlight as se } from "../turnState.js";
15
- import { parseToolActivity as ce } from "./AssistantToolActivity.js";
12
+ import { IDLE_PLAYBACK as ie, isSpeakingMessage as ae, publishedChunks as oe, speechPlaybackReducer as se } from "../voice/speechPlayback.js";
13
+ import { useAssistantStore as h } from "../store.js";
14
+ import { isTurnInFlight as ce } from "../turnState.js";
15
+ import { parseToolActivity as le } from "./AssistantToolActivity.js";
16
16
  import "../speech/index.js";
17
- import { markTurn as le } from "../turnTimeline.js";
18
- import { createContext as _, useCallback as v, useContext as y, useEffect as b, useMemo as x, useReducer as ue, useRef as S, useState as C, useSyncExternalStore as de } from "react";
19
- import { jsx as fe } from "react/jsx-runtime";
17
+ import { markTurn as ue } from "../turnTimeline.js";
18
+ import { createContext as de, useCallback as g, useContext as _, useEffect as v, useMemo as y, useReducer as fe, useRef as b, useState as x, useSyncExternalStore as pe } from "react";
19
+ import { jsx as me } from "react/jsx-runtime";
20
20
  //#region src/shared/assistant/ui/AssistantSpeechProvider.tsx
21
- var pe = {
21
+ var he = {
22
22
  codeBlock: "",
23
23
  image: "",
24
24
  link: "",
@@ -27,7 +27,7 @@ var pe = {
27
27
  emailAt: "at",
28
28
  emailDot: "dot",
29
29
  nestedItem: ""
30
- }, me = 4e3, w = _({
30
+ }, ge = 4e3, _e = de({
31
31
  isSupported: !1,
32
32
  availability: "unsupported",
33
33
  isBlocked: !0,
@@ -47,144 +47,145 @@ var pe = {
47
47
  sessionSpeaking: !1,
48
48
  setSessionSpeaking: () => {},
49
49
  setSessionMicOpen: () => {},
50
+ speakFinishedReply: () => {},
50
51
  previewVoice: () => {}
51
52
  });
52
- function he() {
53
- return y(w);
53
+ function ve() {
54
+ return _(_e);
54
55
  }
55
- var T = ({ children: _, visible: y = !0, engine: he }) => {
56
- let T = de(d, u, u), E = he ?? T, D = t(), { locale: O } = e(), [k, A] = ue(oe, ie), [j, M] = C(() => E.listVoices()), [N, ge] = C(!1), [_e, P] = C(() => /* @__PURE__ */ new Map()), F = S(0), I = S(null), L = S(null);
57
- b(() => () => {
58
- L.current !== null && clearTimeout(L.current);
56
+ var ye = ({ children: de, visible: _ = !0, engine: ve }) => {
57
+ let ye = pe(d, u, u), S = ve ?? ye, C = t(), { locale: w } = e(), [T, E] = fe(se, ie), [D, O] = x(() => S.listVoices()), [k, be] = x(!1), [xe, A] = x(() => /* @__PURE__ */ new Map()), j = b(0), M = b(null), N = b(null);
58
+ v(() => () => {
59
+ N.current !== null && clearTimeout(N.current);
59
60
  }, []);
60
- let [ve, R] = C(null), z = S(null), B = S(() => {}), V = v(() => {
61
- z.current?.(), z.current = null;
62
- }, []), H = g((e) => e.autoSpeakEnabled), ye = g((e) => e.setAutoSpeak), [U, be] = C(!1), xe = S(!1), Se = v((e) => {
63
- xe.current = e;
64
- }, []), Ce = g((e) => e.activeConversationId), W = x(() => E.isSupported(), [E]);
65
- b(() => {
66
- if (!W) return;
61
+ let [Se, P] = x(null), F = b(null), Ce = b(() => {}), I = g(() => {
62
+ F.current?.(), F.current = null;
63
+ }, []), L = h((e) => e.autoSpeakEnabled), we = h((e) => e.setAutoSpeak), [R, Te] = x(!1), Ee = b(!1), z = g((e) => {
64
+ Ee.current = e;
65
+ }, []), B = h((e) => e.activeConversationId), V = y(() => S.isSupported(), [S]);
66
+ v(() => {
67
+ if (!V) return;
67
68
  let e = () => {
68
- M(E.listVoices()), P((e) => e.size === 0 ? e : /* @__PURE__ */ new Map());
69
+ O(S.listVoices()), A((e) => e.size === 0 ? e : /* @__PURE__ */ new Map());
69
70
  };
70
- return e(), E.subscribeVoices(e);
71
- }, [E, W]);
72
- let we = g((e) => e.assistantLanguage), Te = g((e) => e.replyLanguage), G = g((e) => e.preferredVoices), Ee = g((e) => e.setPreferredVoice), K = x(() => te(we, Te, O).reply, [
73
- we,
74
- Te,
75
- O
76
- ]), q = K.code, J = v((e) => m(e)?.tag ?? s(e), []), De = v((e) => m(e)?.rate ?? .9, []), Y = x(() => c(W, j, K.tag, N), [
77
- W,
78
- j,
79
- K,
80
- N
81
- ]), X = x(() => ({
82
- codeBlock: D("speech.codeBlock", "Code block"),
83
- image: D("speech.image", "image"),
84
- link: D("speech.link", "link"),
85
- largeTable: D("speech.largeTable", "Table with {{rows}} rows and {{columns}} columns"),
86
- truncated: D("speech.truncated", "The rest of this message is not read aloud"),
87
- nestedItem: D("speech.nestedItem", "Sub-item {{ordinal}}"),
88
- emailAt: D("speech.emailAt", "at"),
89
- emailDot: D("speech.emailDot", "dot")
90
- }), [D]), Z = v(() => {
91
- V(), I.current = null, E.cancel(), A({ type: "stop" });
92
- }, [V, E]), Oe = v((e) => {
93
- let t = E.listVoices().find((t) => t.name === e) ?? null;
71
+ return e(), S.subscribeVoices(e);
72
+ }, [S, V]);
73
+ let De = h((e) => e.assistantLanguage), Oe = h((e) => e.replyLanguage), H = h((e) => e.preferredVoices), ke = h((e) => e.setPreferredVoice), U = y(() => te(De, Oe, w).reply, [
74
+ De,
75
+ Oe,
76
+ w
77
+ ]), W = U.code, G = g((e) => m(e)?.tag ?? s(e), []), Ae = g((e) => m(e)?.rate ?? .9, []), K = y(() => c(V, D, U.tag, k), [
78
+ V,
79
+ D,
80
+ U,
81
+ k
82
+ ]), je = y(() => ({
83
+ codeBlock: C("speech.codeBlock", "Code block"),
84
+ image: C("speech.image", "image"),
85
+ link: C("speech.link", "link"),
86
+ largeTable: C("speech.largeTable", "Table with {{rows}} rows and {{columns}} columns"),
87
+ truncated: C("speech.truncated", "The rest of this message is not read aloud"),
88
+ nestedItem: C("speech.nestedItem", "Sub-item {{ordinal}}"),
89
+ emailAt: C("speech.emailAt", "at"),
90
+ emailDot: C("speech.emailDot", "dot")
91
+ }), [C]), q = g(() => {
92
+ I(), M.current = null, S.cancel(), E({ type: "stop" });
93
+ }, [I, S]), Me = g((e) => {
94
+ let t = S.listVoices().find((t) => t.name === e) ?? null;
94
95
  if (t) {
95
- Z();
96
+ q();
96
97
  try {
97
- E.speak([p(q)], {
98
+ S.speak([p(W)], {
98
99
  voice: t,
99
- lang: J(q),
100
+ lang: G(W),
100
101
  fallback: !1
101
102
  });
102
103
  } catch {}
103
104
  }
104
105
  }, [
105
- E,
106
+ S,
107
+ W,
106
108
  q,
107
- Z,
108
- J
109
- ]), ke = v((e) => _e.get(e) ?? null, [_e]), Ae = v((e, t, n, i) => {
110
- V();
109
+ G
110
+ ]), Ne = g((e) => xe.get(e) ?? null, [xe]), Pe = g((e, t, n, i) => {
111
+ I();
111
112
  let a = !1, o = () => {}, s = (r) => {
112
113
  if (!a) {
113
- if (a = !0, z.current = null, clearTimeout(c), o(), r.length === 0) {
114
- ge(!0);
114
+ if (a = !0, F.current = null, clearTimeout(c), o(), r.length === 0) {
115
+ be(!0);
115
116
  return;
116
117
  }
117
- M(r), B.current(e, t, r, n, i);
118
+ O(r), Ce.current(e, t, r, n, i);
118
119
  }
119
- }, c = setTimeout(() => s(E.listVoices()), r);
120
- o = E.subscribeVoices(() => s(E.listVoices())), z.current = () => {
121
- a || (a = !0, clearTimeout(c), o(), z.current = null);
120
+ }, c = setTimeout(() => s(S.listVoices()), r);
121
+ o = S.subscribeVoices(() => s(S.listVoices())), F.current = () => {
122
+ a || (a = !0, clearTimeout(c), o(), F.current = null);
122
123
  };
123
- }, [V, E]), Q = v((e, t, n, r, s = !1) => {
124
+ }, [I, S]), J = g((e, t, n, r, s = !1) => {
124
125
  let l = n;
125
126
  if (l.length === 0) {
126
- let e = E.listVoices();
127
- e.length > 0 && (l = e, M(e));
127
+ let e = S.listVoices();
128
+ e.length > 0 && (l = e, O(e));
128
129
  }
129
- let u = J(r), d = o(c(!0, l, r, N));
130
+ let u = G(r), d = o(c(!0, l, r, k));
130
131
  if (d === "block") {
131
- let t = D("speech.noVoiceForReply", "This reply is in {{language}}, and no {{language}} voice is installed on this device.", { language: i(u, O) });
132
- P((n) => new Map(n).set(e, t));
132
+ let t = C("speech.noVoiceForReply", "This reply is in {{language}}, and no {{language}} voice is installed on this device.", { language: i(u, w) });
133
+ A((n) => new Map(n).set(e, t));
133
134
  return;
134
135
  }
135
136
  if (d === "wait-for-voices") {
136
- Ae(e, t, r, s);
137
+ Pe(e, t, r, s);
137
138
  return;
138
139
  }
139
- P((t) => {
140
+ A((t) => {
140
141
  if (!t.has(e)) return t;
141
142
  let n = new Map(t);
142
143
  return n.delete(e), n;
143
- }), V();
144
- let f = F.current + 1;
145
- F.current = f, A({
144
+ }), I();
145
+ let f = j.current + 1;
146
+ j.current = f, E({
146
147
  type: "start",
147
148
  messageId: e,
148
149
  requestId: f
149
- }), I.current = s ? f : null, s && le(e, "ttsStarted");
150
+ }), M.current = s ? f : null, s && ue(e, "ttsStarted");
150
151
  let p = ee(t);
151
- R({
152
+ P({
152
153
  requestId: f,
153
154
  chunks: p,
154
155
  index: -1
155
- }), L.current !== null && clearTimeout(L.current), L.current = setTimeout(() => {
156
- R((e) => e?.requestId === f && e.index < 0 ? null : e);
157
- }, me);
156
+ }), N.current !== null && clearTimeout(N.current), N.current = setTimeout(() => {
157
+ P((e) => e?.requestId === f && e.index < 0 ? null : e);
158
+ }, ge);
158
159
  let m = () => {
159
- F.current === f && L.current !== null && (clearTimeout(L.current), L.current = null), A({
160
+ j.current === f && N.current !== null && (clearTimeout(N.current), N.current = null), E({
160
161
  type: "failed",
161
162
  requestId: f
162
163
  });
163
164
  };
164
165
  try {
165
- E.speak(p, {
166
- voice: a(l, u, G[r]),
166
+ S.speak(p, {
167
+ voice: a(l, u, H[r]),
167
168
  lang: u,
168
- rate: De(r)
169
+ rate: Ae(r)
169
170
  }, {
170
171
  onStart: () => {
171
- F.current === f && I.current === f && le(e, "firstAudio");
172
+ j.current === f && M.current === f && ue(e, "firstAudio");
172
173
  },
173
174
  onChunkStart: (e) => {
174
- F.current === f && L.current !== null && (clearTimeout(L.current), L.current = null), R((t) => t?.requestId === f ? {
175
+ j.current === f && N.current !== null && (clearTimeout(N.current), N.current = null), P((t) => t?.requestId === f ? {
175
176
  ...t,
176
177
  index: e
177
- } : F.current === f ? {
178
+ } : j.current === f ? {
178
179
  requestId: f,
179
180
  chunks: p,
180
181
  index: e
181
182
  } : t);
182
183
  },
183
- onEnd: () => A({
184
+ onEnd: () => E({
184
185
  type: "finished",
185
186
  requestId: f
186
187
  }),
187
- onError: () => A({
188
+ onError: () => E({
188
189
  type: "failed",
189
190
  requestId: f
190
191
  })
@@ -193,141 +194,187 @@ var T = ({ children: _, visible: y = !0, engine: he }) => {
193
194
  m();
194
195
  }
195
196
  }, [
196
- V,
197
- E,
198
- O,
197
+ I,
198
+ S,
199
+ w,
200
+ H,
201
+ Ae,
199
202
  G,
200
- De,
201
- J,
202
- D,
203
- N,
204
- Ae
203
+ C,
204
+ k,
205
+ Pe
205
206
  ]);
206
- b(() => {
207
- B.current = Q;
208
- }, [Q]);
209
- let $ = v((e, t, n, r) => {
210
- if (!W) return;
211
- let i = re(f(t, { labels: pe }), n ?? q), a = f(t, { labels: ne(i, X) });
212
- a && Q(e, a, j, i, r?.auto === !0);
207
+ v(() => {
208
+ Ce.current = J;
209
+ }, [J]);
210
+ let Y = g((e, t, n, r) => {
211
+ if (!V) return;
212
+ let i = re(f(t, { labels: he }), n ?? W), a = f(t, { labels: ne(i, je) });
213
+ a && J(e, a, D, i, r?.auto === !0);
213
214
  }, [
215
+ V,
216
+ je,
214
217
  W,
215
- X,
216
- q,
217
- Q,
218
- j
219
- ]), je = v((e, t, n) => {
220
- if (h(k, e)) {
221
- Z();
218
+ J,
219
+ D
220
+ ]), X = g((e, t, n) => {
221
+ if (ae(T, e)) {
222
+ q();
222
223
  return;
223
224
  }
224
- $(e, t, n);
225
+ Y(e, t, n);
225
226
  }, [
226
- k,
227
- $,
228
- Z
227
+ T,
228
+ Y,
229
+ q
229
230
  ]);
230
- b(() => {
231
- y || Z();
232
- }, [y, Z]), b(() => {
233
- Z(), P(/* @__PURE__ */ new Map());
234
- }, [Ce, Z]), b(() => {
235
- P((e) => e.size === 0 ? e : /* @__PURE__ */ new Map()), Z();
236
- }, [q, Z]), b(() => () => {
237
- z.current?.(), z.current = null, E.cancel();
238
- }, [E]), b(() => {
231
+ v(() => {
232
+ _ || q();
233
+ }, [_, q]);
234
+ let Fe = b({
235
+ autoSpeakEnabled: L,
236
+ sessionSpeaking: R,
237
+ visible: _,
238
+ isSupported: V
239
+ });
240
+ v(() => {
241
+ Fe.current = {
242
+ autoSpeakEnabled: L,
243
+ sessionSpeaking: R,
244
+ visible: _,
245
+ isSupported: V
246
+ };
247
+ }, [
248
+ L,
249
+ R,
250
+ _,
251
+ V
252
+ ]);
253
+ let Ie = b(null), Z = b(null), Le = b(() => {});
254
+ v(() => {
255
+ q(), A(/* @__PURE__ */ new Map()), Ie.current = B;
256
+ let e = Z.current;
257
+ Z.current = null, e && e.conversationId === B && Le.current(e.conversationId, e.messageId);
258
+ }, [B, q]), v(() => {
259
+ A((e) => e.size === 0 ? e : /* @__PURE__ */ new Map()), q();
260
+ }, [W, q]), v(() => () => {
261
+ F.current?.(), F.current = null, S.cancel();
262
+ }, [S]), v(() => {
239
263
  if (typeof window > "u") return;
240
- let e = () => E.cancel();
264
+ let e = () => S.cancel();
241
265
  return window.addEventListener("pagehide", e), () => window.removeEventListener("pagehide", e);
242
- }, [E]), b(() => {
243
- if (typeof document > "u" || !W) return;
266
+ }, [S]), v(() => {
267
+ if (typeof document > "u" || !V) return;
244
268
  let e = () => {
245
269
  if (document.visibilityState !== "visible") return;
246
- let e = E.listVoices();
247
- e.length > 0 && V(), M(e), ge(!1), P((e) => e.size === 0 ? e : /* @__PURE__ */ new Map());
270
+ let e = S.listVoices();
271
+ e.length > 0 && I(), O(e), be(!1), A((e) => e.size === 0 ? e : /* @__PURE__ */ new Map());
248
272
  };
249
273
  return document.addEventListener("visibilitychange", e), window.addEventListener("focus", e), () => {
250
274
  document.removeEventListener("visibilitychange", e), window.removeEventListener("focus", e);
251
275
  };
252
276
  }, [
253
- V,
254
- E,
255
- W
277
+ I,
278
+ S,
279
+ V
256
280
  ]);
257
- let Me = S($);
258
- b(() => {
259
- Me.current = $;
260
- }, [$]), b(() => {
261
- if (!(!H && !U || !y || !W)) return g.subscribe((e, t) => {
262
- let r = e.activeConversationId;
263
- if (!r || r !== t.activeConversationId) return;
264
- let i = e.processingByConversationId[r], a = t.processingByConversationId[r];
265
- if (i?.status !== "complete" || !se(a?.status)) return;
266
- let o = i.messageId ?? a?.messageId ?? null;
267
- if (!o) return;
268
- let s = e.conversations.find((e) => e.id === r)?.messages.find((e) => e.id === o);
269
- if (!s || s.role !== "assistant" || n(s) !== U || xe.current) return;
270
- let { text: c } = ce(s.content);
271
- if (c.trim()) try {
272
- Me.current(o, c, s.metadata?.lang, { auto: !0 });
273
- } catch {}
281
+ let Re = b(Y);
282
+ v(() => {
283
+ Re.current = Y;
284
+ }, [Y]);
285
+ let Q = g((e, t) => {
286
+ if (n(e) !== t || Ee.current) return;
287
+ let { text: r } = le(e.content);
288
+ if (r.trim()) try {
289
+ Re.current(e.id, r, e.metadata?.lang, { auto: !0 });
290
+ } catch {}
291
+ }, []), $ = g((e, t) => {
292
+ if (e !== Ie.current) {
293
+ h.getState().activeConversationId === e && (Z.current = {
294
+ conversationId: e,
295
+ messageId: t
296
+ });
297
+ return;
298
+ }
299
+ let n = Fe.current;
300
+ if (!n.autoSpeakEnabled && !n.sessionSpeaking || !n.visible || !n.isSupported) return;
301
+ let r = h.getState();
302
+ if (r.activeConversationId !== e) return;
303
+ let i = r.conversations.find((t) => t.id === e)?.messages.find((e) => e.id === t);
304
+ !i || i.role !== "assistant" || Q(i, n.sessionSpeaking);
305
+ }, [Q]);
306
+ v(() => {
307
+ Le.current = $;
308
+ }, [$]), v(() => {
309
+ if (!(!L && !R || !_ || !V)) return h.subscribe((e, t) => {
310
+ let n = e.activeConversationId;
311
+ if (!n || n !== t.activeConversationId) return;
312
+ let r = e.processingByConversationId[n], i = t.processingByConversationId[n];
313
+ if (r?.status !== "complete" || !ce(i?.status)) return;
314
+ let a = r.messageId ?? i?.messageId ?? null;
315
+ if (!a) return;
316
+ let o = e.conversations.find((e) => e.id === n)?.messages.find((e) => e.id === a);
317
+ !o || o.role !== "assistant" || Q(o, R);
274
318
  });
275
319
  }, [
276
- H,
277
- U,
278
- W,
279
- y
320
+ L,
321
+ R,
322
+ V,
323
+ _,
324
+ Q
280
325
  ]);
281
- let Ne = x(() => l(j, K.tag), [j, K]), Pe = x(() => a(j, K.tag, G[q]), [
282
- j,
283
- K,
284
- G,
285
- q
286
- ]), Fe = x(() => ({
287
- isSupported: W,
288
- availability: Y,
289
- isBlocked: Y === "no-voices",
290
- disabledReason: Y === "no-voices" ? D("speech.noVoicesOnDevice", "This device has no speech voices installed. Add one in your device speech or accessibility settings.") : null,
291
- blockedFor: ke,
292
- voiceChoices: Ne,
293
- spokenChunks: ae(k, ve),
294
- activeVoiceName: Pe?.name ?? null,
295
- preferredVoiceName: G[q] ?? null,
296
- setVoice: (e) => Ee(q, e),
297
- speakingMessageId: k.status === "speaking" ? k.messageId : null,
298
- isSpeaking: (e) => h(k, e),
299
- toggle: je,
300
- stop: Z,
301
- autoSpeakEnabled: H,
302
- setAutoSpeak: ye,
303
- sessionSpeaking: U,
304
- setSessionSpeaking: be,
305
- setSessionMicOpen: Se,
306
- previewVoice: Oe
326
+ let ze = y(() => l(D, U.tag), [D, U]), Be = y(() => a(D, U.tag, H[W]), [
327
+ D,
328
+ U,
329
+ H,
330
+ W
331
+ ]), Ve = y(() => ({
332
+ isSupported: V,
333
+ availability: K,
334
+ isBlocked: K === "no-voices",
335
+ disabledReason: K === "no-voices" ? C("speech.noVoicesOnDevice", "This device has no speech voices installed. Add one in your device speech or accessibility settings.") : null,
336
+ blockedFor: Ne,
337
+ voiceChoices: ze,
338
+ spokenChunks: oe(T, Se),
339
+ activeVoiceName: Be?.name ?? null,
340
+ preferredVoiceName: H[W] ?? null,
341
+ setVoice: (e) => ke(W, e),
342
+ speakingMessageId: T.status === "speaking" ? T.messageId : null,
343
+ isSpeaking: (e) => ae(T, e),
344
+ toggle: X,
345
+ stop: q,
346
+ autoSpeakEnabled: L,
347
+ setAutoSpeak: we,
348
+ sessionSpeaking: R,
349
+ setSessionSpeaking: Te,
350
+ setSessionMicOpen: z,
351
+ speakFinishedReply: $,
352
+ previewVoice: Me
307
353
  }), [
308
- W,
309
- Y,
310
- ke,
354
+ V,
355
+ K,
311
356
  Ne,
312
- Pe,
313
- G,
314
- Ee,
315
- q,
316
- k,
317
- je,
318
- Z,
357
+ ze,
358
+ Be,
319
359
  H,
320
- ye,
321
- U,
322
- Se,
323
- Oe,
324
- D,
325
- ve
360
+ ke,
361
+ W,
362
+ T,
363
+ X,
364
+ q,
365
+ L,
366
+ we,
367
+ R,
368
+ z,
369
+ $,
370
+ Me,
371
+ C,
372
+ Se
326
373
  ]);
327
- return /* @__PURE__ */ fe(w.Provider, {
328
- value: Fe,
329
- children: _
374
+ return /* @__PURE__ */ me(_e.Provider, {
375
+ value: Ve,
376
+ children: de
330
377
  });
331
378
  };
332
379
  //#endregion
333
- export { T as AssistantSpeechProvider, he as useAssistantSpeech };
380
+ export { ye as AssistantSpeechProvider, ve as useAssistantSpeech };
@@ -1 +1 @@
1
- {"version":3,"file":"useVoiceSession.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/useVoiceSession.ts"],"names":[],"mappings":"AASA,OAAO,EAAe,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EAcL,KAAK,oBAAoB,EAE1B,MAAM,uBAAuB,CAAC;AAsC/B;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAC5B,SAAS,GAAG,eAAe,GAAG,eAAe,GAAG,oBAAoB,CAAC;AAMvE,UAAU,OAAO;IACf,+EAA+E;IAC/E;;;;;;;OAOG;IACH,QAAQ,EAAE,CACR,IAAI,EAAE,MAAM,EACZ,cAAc,EAAE,MAAM;IACtB;;;OAGG;IACH,MAAM,EAAE,eAAe,KACpB,IAAI,CAAC;IACV;;;;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;;IAqkBtE,qEAAqE;;IAErE;;;;;;;OAOG;;;;;IAEH,+DAA+D;;IAE/D;;;;;;;OAOG;;IAIH,0EAA0E;;IAE1E,6DAA6D;;IAE7D,sDAAsD;;;;;;EA4B3D"}
1
+ {"version":3,"file":"useVoiceSession.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/useVoiceSession.ts"],"names":[],"mappings":"AASA,OAAO,EAAe,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EAcL,KAAK,oBAAoB,EAE1B,MAAM,uBAAuB,CAAC;AAsC/B;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAC5B,SAAS,GAAG,eAAe,GAAG,eAAe,GAAG,oBAAoB,CAAC;AAMvE,UAAU,OAAO;IACf,+EAA+E;IAC/E;;;;;;;OAOG;IACH,QAAQ,EAAE,CACR,IAAI,EAAE,MAAM,EACZ,cAAc,EAAE,MAAM;IACtB;;;OAGG;IACH,MAAM,EAAE,eAAe,KACpB,IAAI,CAAC;IACV;;;;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;;IA0kBtE,qEAAqE;;IAErE;;;;;;;OAOG;;;;;IAEH,+DAA+D;;IAE/D;;;;;;;OAOG;;IAIH,0EAA0E;;IAE1E,6DAA6D;;IAE7D,sDAAsD;;;;;;EA4B3D"}