@burdenoff/fe-libs 2026.1018.1 → 2026.1019.2

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 (65) hide show
  1. package/dist/chrome/AccountSwitcher.js +90 -89
  2. package/dist/chrome/Breadcrumbs.js +1 -1
  3. package/dist/chrome/CommandPalette.js +91 -90
  4. package/dist/chrome/Footer.js +31 -8
  5. package/dist/chrome/GlobalSearch.js +78 -77
  6. package/dist/chrome/HeaderBar.js +1 -1
  7. package/dist/chrome/HeaderThemeSwitcher.js +48 -47
  8. package/dist/chrome/LanguagePickerSheet.js +23 -22
  9. package/dist/chrome/NavCustomizeDialog.d.ts +0 -14
  10. package/dist/chrome/NavCustomizeDialog.js +114 -122
  11. package/dist/chrome/PanelTabs.js +45 -41
  12. package/dist/chrome/PersonaSurfaceControls.d.ts +0 -17
  13. package/dist/chrome/PersonaSurfaceControls.js +115 -118
  14. package/dist/chrome/PluginSettingsPage.js +29 -28
  15. package/dist/chrome/PluginWidgetGrid.js +19 -18
  16. package/dist/chrome/ProductPickerSheet.js +44 -47
  17. package/dist/chrome/ProductSwitcher.js +2 -6
  18. package/dist/chrome/ProfileSwitcher.js +6 -10
  19. package/dist/chrome/ShortcutHelpDialog.js +60 -65
  20. package/dist/chrome/SideNavigation.js +2 -2
  21. package/dist/chrome/Sidebar.js +44 -43
  22. package/dist/chrome/ThemePreferences.js +289 -267
  23. package/dist/chrome/contextSwitcher/EmptyState.js +31 -27
  24. package/dist/chrome/contextSwitcher/OrganizationList.js +40 -30
  25. package/dist/chrome/contextSwitcher/ProjectList.js +48 -44
  26. package/dist/chrome/contextSwitcher/SearchInput.js +44 -40
  27. package/dist/chrome/contextSwitcher/TriggerButton.js +2 -2
  28. package/dist/chrome/contextSwitcher/WorkspaceList.js +36 -32
  29. package/dist/chrome/globalSearch/AdvancedFiltersPanel.js +128 -126
  30. package/dist/chrome/globalSearch/ResultsList.js +25 -27
  31. package/dist/chrome/globalSearch/SearchInput.js +16 -14
  32. package/dist/chrome/notificationCenter/NotificationCardItem.js +58 -47
  33. package/dist/chrome/notificationCenter/NotificationFilters.js +76 -62
  34. package/dist/chrome/notificationCenter/NotificationFooter.js +21 -21
  35. package/dist/chrome/notificationCenter/NotificationHeader.js +67 -63
  36. package/dist/chrome/notificationCenter/NotificationList.js +75 -71
  37. package/dist/chrome/notificationCenter/NotificationPanel.js +37 -33
  38. package/dist/chrome/notificationCenter/PushOptInToggle.js +33 -32
  39. package/dist/chrome/notificationCenter/constants.d.ts +6 -1
  40. package/dist/chrome/notificationCenter/constants.js +12 -11
  41. package/dist/chrome/useThemeOptionLabels.d.ts +33 -0
  42. package/dist/chrome/useThemeOptionLabels.js +39 -0
  43. package/dist/shared/assistant/conversation.d.ts +8 -0
  44. package/dist/shared/assistant/history/historyMapping.js +1 -1
  45. package/dist/shared/assistant/ui/AssistantMarkdownRenderer.d.ts +6 -6
  46. package/dist/shared/assistant/ui/AssistantMarkdownRenderer.js +86 -85
  47. package/dist/shared/assistant/ui/AssistantMessageItem.js +101 -96
  48. package/dist/shared/assistant/ui/AssistantWriteProposalCard.d.ts +2 -0
  49. package/dist/shared/assistant/ui/AssistantWriteProposalCard.js +93 -89
  50. package/dist/shared/assistant/ui/WorkflowAssistantPanel.js +152 -140
  51. package/dist/shared/assistant/ui/useWriteProposals.js +122 -85
  52. package/dist/shared/assistant/writeProposalDiscovery.d.ts +3 -1
  53. package/dist/shared/assistant/writeProposalDiscovery.js +2 -2
  54. package/dist/shared/events/sinks/RybbitSink.js +2 -2
  55. package/dist/shared/providers/shell/interpolateShellLabel.d.ts +3 -0
  56. package/dist/shared/providers/shell/interpolateShellLabel.js +11 -0
  57. package/dist/shared/providers/shell/useAssistantShellLabels.d.ts +45 -0
  58. package/dist/shared/providers/shell/useAssistantShellLabels.js +54 -0
  59. package/dist/shared/tours/TourPlayer.js +33 -32
  60. package/dist/shared/tours/TourTooltip.js +108 -109
  61. package/dist/shared/tours/tourTrigger/MobileTourSheet.js +98 -85
  62. package/dist/shared/tours/tourTrigger/TourListItemDesktop.js +20 -18
  63. package/dist/shared/tours/tourTrigger/TourListItemMobile.js +23 -25
  64. package/dist/shared-assistant.js +188 -188
  65. package/package.json +2 -2
@@ -1,20 +1,34 @@
1
1
  import { useVoiceInput as e } from "../voice/useVoiceInput.js";
2
- import { getSpeechEngine as t, subscribeSpeechEngine as n } from "../speech/createSpeechEngine.js";
3
- import { chunkForSpeech as r, toSpeakableText as i } from "../voice/speakableText.js";
4
- import { AssistantWorkflowClient as a, isWorkflowAssistantAdmissionRefusal as o } from "../workflowApi.js";
5
- import { useCallback as s, useEffect as c, useRef as l, useState as u, useSyncExternalStore as ee } from "react";
6
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
2
+ import { useWorkflowAssistantLabels as t } from "../../providers/shell/useAssistantShellLabels.js";
3
+ import { getSpeechEngine as n, subscribeSpeechEngine as r } from "../speech/createSpeechEngine.js";
4
+ import { chunkForSpeech as i, toSpeakableText as a } from "../voice/speakableText.js";
5
+ import { AssistantWorkflowClient as o, isWorkflowAssistantAdmissionRefusal as ee } from "../workflowApi.js";
6
+ import { useCallback as te, useEffect as s, useRef as c, useState as l, useSyncExternalStore as ne } from "react";
7
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
7
8
  //#region src/shared/assistant/ui/WorkflowAssistantPanel.tsx
8
- function p(e) {
9
+ function f(e) {
9
10
  let t = e.target.kind === "botmanor" ? e.target.agentId : e.target.courseId;
10
- return /* @__PURE__ */ d(m, { ...e }, `${e.context.workspaceId}:${e.ownerId}:${e.target.kind}:${t}`);
11
+ return /* @__PURE__ */ u(p, { ...e }, `${e.context.workspaceId}:${e.ownerId}:${e.target.kind}:${t}`);
11
12
  }
12
- function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", description: _, client: te, voiceLanguage: ne }) {
13
- let v = l(te ?? new a()), y = l(crypto.randomUUID()), re = l({
14
- target: p,
15
- context: m,
16
- ownerId: h
17
- }), b = l(null), [x, S] = u(!0), [C, w] = u(!1), T = l(null), E = l(!1), D = l(!1), [O, k] = u(!1), [A, j] = u([]), [M, N] = u(""), [ie, P] = u(null), [F, I] = u(!1), [L, R] = u(null), [z, B] = u(!1), [V, H] = u(null), [U, W] = u(null), G = s((e) => {
13
+ function p({ target: f, context: p, ownerId: m, title: re, description: h, client: ie, voiceLanguage: ae }) {
14
+ let g = t(), _ = re ?? g.title, oe = {
15
+ savedPending: g.savedPending,
16
+ conversationUnavailable: g.conversationUnavailable,
17
+ historyUnavailable: g.historyUnavailable,
18
+ olderUnavailable: g.olderUnavailable,
19
+ audioUnavailable: g.audioUnavailable,
20
+ unknownTurn: g.unknownTurn,
21
+ cancelledTurn: g.cancelledTurn,
22
+ failedTurn: g.failedTurn,
23
+ answerPending: g.answerPending,
24
+ admissionRefused: g.admissionRefused,
25
+ interrupted: g.interrupted,
26
+ cancelUnconfirmed: g.cancelUnconfirmed
27
+ }, v = c(ie ?? new o()), y = c(crypto.randomUUID()), se = c({
28
+ target: f,
29
+ context: p,
30
+ ownerId: m
31
+ }), b = c(null), [x, S] = l(!0), [C, w] = l(!1), T = c(null), E = c(!1), D = c(!1), [O, k] = l(!1), [A, j] = l([]), [M, N] = l(""), [ce, P] = l(null), [F, I] = l(!1), [L, R] = l(null), [z, B] = l(!1), [V, H] = l(null), [U, W] = l(null), G = te((e) => {
18
32
  if (P(null), I(!!e?.turns.length), !e) {
19
33
  y.current = crypto.randomUUID(), j([]), H(null);
20
34
  return;
@@ -31,8 +45,8 @@ function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", descr
31
45
  e.pending && t.push({
32
46
  input: e.pending,
33
47
  receipt: null
34
- }), j(t), H(e.pending), e.pending && W("A saved turn is pending. Recover it to check the answer.");
35
- }, []), K = s(async (e, t, n = null) => {
48
+ }), j(t), H(e.pending), e.pending && W("savedPending");
49
+ }, []), K = te(async (e, t, n = null) => {
36
50
  let r = new AbortController();
37
51
  b.current?.abort(), b.current = r, S(!0), w(!1), W(null);
38
52
  try {
@@ -43,13 +57,13 @@ function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", descr
43
57
  if (n !== null && i === null) throw Error("Conversation unavailable");
44
58
  r.signal.aborted || G(i);
45
59
  } catch {
46
- r.signal.aborted || (w(!0), W("Your conversation is unavailable. Reload it before sending another question."));
60
+ r.signal.aborted || (w(!0), W("conversationUnavailable"));
47
61
  } finally {
48
62
  b.current === r && !r.signal.aborted && S(!1);
49
63
  }
50
64
  }, [G]);
51
- c(() => {
52
- let e = re.current;
65
+ s(() => {
66
+ let e = se.current;
53
67
  return e.context.workspaceId && e.ownerId ? K(e.target, e.context) : S(!1), () => b.current?.abort();
54
68
  }, [K]);
55
69
  let q = async (e = null) => {
@@ -57,8 +71,8 @@ function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", descr
57
71
  let t = new AbortController();
58
72
  b.current?.abort(), b.current = t, S(!0);
59
73
  try {
60
- let n = await v.current.conversations(p, {
61
- ...m,
74
+ let n = await v.current.conversations(f, {
75
+ ...p,
62
76
  signal: t.signal
63
77
  }, e);
64
78
  t.signal.aborted || R((t) => ({
@@ -66,21 +80,21 @@ function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", descr
66
80
  nextCursor: n.nextCursor
67
81
  }));
68
82
  } catch {
69
- t.signal.aborted || W("Conversation history is unavailable. Try loading it again.");
83
+ t.signal.aborted || W("historyUnavailable");
70
84
  } finally {
71
85
  !t.signal.aborted && b.current === t && S(!1);
72
86
  }
73
- }, ae = async () => {
87
+ }, le = async () => {
74
88
  if (E.current || D.current || x || V || $.isActive || !F || A.length >= 200) return;
75
89
  let e = new AbortController();
76
90
  b.current?.abort(), b.current = e;
77
91
  let t = y.current;
78
92
  S(!0);
79
93
  try {
80
- let n = await v.current.messages(p, {
81
- ...m,
94
+ let n = await v.current.messages(f, {
95
+ ...p,
82
96
  signal: e.signal
83
- }, t, ie);
97
+ }, t, ce);
84
98
  !e.signal.aborted && t === y.current && (j((e) => [...n.turns.filter((t) => !e.some((e) => e.input.clientTurnId === t.receipt.clientTurnId)).map((e) => ({
85
99
  input: {
86
100
  clientTurnId: e.receipt.clientTurnId,
@@ -90,21 +104,21 @@ function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", descr
90
104
  receipt: e.receipt
91
105
  })), ...e]), P(n.nextCursor), I(n.nextCursor !== null));
92
106
  } catch {
93
- e.signal.aborted || W("Older messages are unavailable. Try loading them again.");
107
+ e.signal.aborted || W("olderUnavailable");
94
108
  } finally {
95
109
  !e.signal.aborted && b.current === e && S(!1);
96
110
  }
97
- }, J = l(null), Y = ee(n, t, t), X = l(!1), Z = l(0), [oe, Q] = u(!1), $ = e({
98
- language: ne,
111
+ }, J = c(null), Y = ne(r, n, n), X = c(!1), Z = c(0), [ue, Q] = l(!1), $ = e({
112
+ language: ae,
99
113
  onFinalize: (e) => N((t) => `${t}${t.trim() ? " " : ""}${e}`.slice(0, 8192))
100
114
  });
101
- c(() => () => {
115
+ s(() => () => {
102
116
  X.current && (Z.current += 1, X.current = !1, Y.cancel());
103
117
  }, [Y]);
104
- let se = (e) => {
118
+ let de = (e) => {
105
119
  if ($.isActive) return;
106
120
  let t = ++Z.current;
107
- X.current = !0, Q(!0), Y.speak(r(i(e)), {
121
+ X.current = !0, Q(!0), Y.speak(i(a(e)), {
108
122
  voice: null,
109
123
  lang: $.language
110
124
  }, {
@@ -112,46 +126,46 @@ function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", descr
112
126
  t === Z.current && (X.current = !1, Q(!1));
113
127
  },
114
128
  onError: (e) => {
115
- t === Z.current && (X.current = !1, Q(!1), e !== "cancelled" && W("Audio playback is unavailable. You can read the answer above."));
129
+ t === Z.current && (X.current = !1, Q(!1), e !== "cancelled" && W("audioUnavailable"));
116
130
  }
117
131
  });
118
- }, ce = () => {
132
+ }, fe = () => {
119
133
  X.current && Y.cancel(), $.toggle();
120
134
  };
121
- c(() => () => T.current?.abort(), []), c(() => {
135
+ s(() => () => T.current?.abort(), []), s(() => {
122
136
  J.current?.scrollTo({
123
137
  top: J.current.scrollHeight,
124
138
  behavior: "smooth"
125
139
  });
126
140
  }, [A, z]);
127
- let le = (e, t) => {
141
+ let pe = (e, t) => {
128
142
  j((n) => n.map((n) => n.input.clientTurnId === e.clientTurnId ? {
129
143
  ...n,
130
144
  receipt: t
131
145
  } : n));
132
- }, ue = async (e, t = !1) => {
133
- if (E.current || D.current || !m.workspaceId || !h) return;
146
+ }, me = async (e, t = !1) => {
147
+ if (E.current || D.current || !p.workspaceId || !m) return;
134
148
  E.current = !0, B(!0), W(null), H(e);
135
149
  let n = new AbortController();
136
150
  T.current = n;
137
151
  let r = {
138
- ...m,
152
+ ...p,
139
153
  signal: n.signal
140
154
  }, i = !0;
141
155
  try {
142
- let a = t ? await v.current.read(p, e.clientTurnId, r) : null;
143
- (!a || a.status === "READY") && await v.current.start(p, e, r), i = !1;
144
- let o = await v.current.wait(p, e.clientTurnId, r, { onProgress: (t) => {
145
- n.signal.aborted || le(e, t);
156
+ let a = t ? await v.current.read(f, e.clientTurnId, r) : null;
157
+ (!a || a.status === "READY") && await v.current.start(f, e, r), i = !1;
158
+ let o = await v.current.wait(f, e.clientTurnId, r, { onProgress: (t) => {
159
+ n.signal.aborted || pe(e, t);
146
160
  } });
147
161
  if (n.signal.aborted) return;
148
- o.kind === "completed" ? H(null) : o.kind === "terminal" ? (H(null), W(o.receipt.status === "UNKNOWN" ? "This turn could not be confirmed. It will not be generated again automatically." : o.receipt.status === "CANCELLED" ? "This turn was cancelled." : "The assistant could not complete this turn.")) : W("Your answer is still pending. Recover this turn to check it again.");
162
+ o.kind === "completed" ? H(null) : o.kind === "terminal" ? (H(null), W(o.receipt.status === "UNKNOWN" ? "unknownTurn" : o.receipt.status === "CANCELLED" ? "cancelledTurn" : "failedTurn")) : W("answerPending");
149
163
  } catch (e) {
150
- n.signal.aborted || (i && o(e) ? (H(null), W("The assistant could not accept this question. Check your access, available quota or assistant configuration.")) : W("The connection was interrupted. Recover this turn using the same request."));
164
+ n.signal.aborted || (i && ee(e) ? (H(null), W("admissionRefused")) : W("interrupted"));
151
165
  } finally {
152
166
  T.current === n && (T.current = null, E.current = !1, B(!1));
153
167
  }
154
- }, de = () => {
168
+ }, he = () => {
155
169
  if (x || C || !M.trim() || E.current || D.current || $.isActive || V || M.length > 8192) return;
156
170
  X.current && Y.cancel();
157
171
  let e = {
@@ -162,13 +176,13 @@ function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", descr
162
176
  j((t) => [...t, {
163
177
  input: e,
164
178
  receipt: null
165
- }]), N(""), ue(e);
166
- }, fe = async () => {
179
+ }]), N(""), me(e);
180
+ }, ge = async () => {
167
181
  let e = V;
168
182
  if (!(!e || D.current)) {
169
183
  D.current = !0, k(!0), T.current?.abort();
170
184
  try {
171
- await v.current.cancel(e.clientTurnId, m) ? (j((t) => t.map((t) => t.input.clientTurnId === e.clientTurnId && t.receipt ? {
185
+ await v.current.cancel(e.clientTurnId, p) ? (j((t) => t.map((t) => t.input.clientTurnId === e.clientTurnId && t.receipt ? {
172
186
  ...t,
173
187
  receipt: {
174
188
  ...t.receipt,
@@ -176,243 +190,241 @@ function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", descr
176
190
  partialMessage: null,
177
191
  result: null
178
192
  }
179
- } : t)), H(null), W("This turn was cancelled.")) : W("Cancellation could not be confirmed. Recover the saved turn to check its result.");
193
+ } : t)), H(null), W("cancelledTurn")) : W("cancelUnconfirmed");
180
194
  } catch {
181
- W("Cancellation could not be confirmed. Recover the saved turn to check its result.");
195
+ W("cancelUnconfirmed");
182
196
  } finally {
183
197
  D.current = !1, k(!1);
184
198
  }
185
199
  }
186
200
  };
187
- return /* @__PURE__ */ f("section", {
188
- "aria-label": g,
201
+ return /* @__PURE__ */ d("section", {
202
+ "aria-label": _,
189
203
  className: "flex flex-col overflow-hidden rounded-xl border border-border-seam bg-bg-surface",
190
204
  children: [
191
- /* @__PURE__ */ f("header", {
205
+ /* @__PURE__ */ d("header", {
192
206
  className: "border-b border-border-seam px-4 py-3",
193
207
  children: [
194
- /* @__PURE__ */ d("h2", {
208
+ /* @__PURE__ */ u("h2", {
195
209
  className: "text-sm font-semibold text-text-primary",
196
- children: g
210
+ children: _
197
211
  }),
198
- _ && /* @__PURE__ */ d("p", {
212
+ h && /* @__PURE__ */ u("p", {
199
213
  className: "text-xs text-text-secondary",
200
- children: _
214
+ children: h
201
215
  }),
202
- /* @__PURE__ */ f("div", {
216
+ /* @__PURE__ */ d("div", {
203
217
  className: "mt-2 flex flex-wrap gap-2",
204
- children: [/* @__PURE__ */ d("button", {
218
+ children: [/* @__PURE__ */ u("button", {
205
219
  type: "button",
206
- disabled: x || z || O || !!V || $.isActive || !m.workspaceId || !h,
220
+ disabled: x || z || O || !!V || $.isActive || !p.workspaceId || !m,
207
221
  onClick: () => {
208
222
  b.current?.abort(), X.current && Y.cancel(), G(null), N(""), W(null), w(!1), R(null);
209
223
  },
210
224
  className: "rounded-lg border border-border-seam px-2 py-1 text-xs",
211
- children: "New chat"
212
- }), /* @__PURE__ */ d("button", {
225
+ children: g.newChat
226
+ }), /* @__PURE__ */ u("button", {
213
227
  type: "button",
214
- disabled: x || z || O || !!V || $.isActive || !m.workspaceId || !h,
228
+ disabled: x || z || O || !!V || $.isActive || !p.workspaceId || !m,
215
229
  onClick: () => void q(),
216
230
  className: "rounded-lg border border-border-seam px-2 py-1 text-xs",
217
- children: "Saved conversations"
231
+ children: g.savedConversations
218
232
  })]
219
233
  }),
220
- L && /* @__PURE__ */ f("nav", {
221
- "aria-label": "Saved assistant conversations",
234
+ L && /* @__PURE__ */ d("nav", {
235
+ "aria-label": g.savedAssistantConversations,
222
236
  className: "mt-2 max-h-40 overflow-auto",
223
237
  children: [
224
- /* @__PURE__ */ d("ul", { children: L.nodes.map((e) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ d("button", {
238
+ /* @__PURE__ */ u("ul", { children: L.nodes.map((e) => /* @__PURE__ */ u("li", { children: /* @__PURE__ */ u("button", {
225
239
  type: "button",
226
240
  disabled: x || z || O || !!V || $.isActive,
227
241
  "aria-current": e.clientConversationId === y.current ? "true" : void 0,
228
242
  onClick: () => {
229
- X.current && Y.cancel(), N(""), K(p, m, e.clientConversationId);
243
+ X.current && Y.cancel(), N(""), K(f, p, e.clientConversationId);
230
244
  },
231
245
  className: "rounded-lg px-2 py-1 text-xs",
232
246
  children: new Date(e.createdAt).toLocaleString()
233
247
  }) }, e.clientConversationId)) }),
234
- L.nodes.length === 0 && /* @__PURE__ */ d("p", {
248
+ L.nodes.length === 0 && /* @__PURE__ */ u("p", {
235
249
  className: "text-xs",
236
- children: "No saved conversations."
250
+ children: g.noSavedConversations
237
251
  }),
238
- L.nextCursor && /* @__PURE__ */ d("button", {
252
+ L.nextCursor && /* @__PURE__ */ u("button", {
239
253
  type: "button",
240
254
  disabled: x || z || O || !!V || $.isActive,
241
255
  onClick: () => void q(L.nextCursor),
242
256
  className: "rounded-lg border border-border-seam px-2 py-1 text-xs",
243
- children: "Load older conversations"
257
+ children: g.loadOlderConversations
244
258
  })
245
259
  ]
246
260
  })
247
261
  ]
248
262
  }),
249
- /* @__PURE__ */ f("div", {
263
+ /* @__PURE__ */ d("div", {
250
264
  ref: J,
251
265
  role: "log",
252
- "aria-label": "Assistant conversation",
266
+ "aria-label": g.assistantConversation,
253
267
  "aria-live": "polite",
254
268
  className: "max-h-96 min-h-40 overflow-y-auto p-4",
255
269
  children: [
256
- x && /* @__PURE__ */ d("p", {
270
+ x && /* @__PURE__ */ u("p", {
257
271
  role: "status",
258
272
  className: "text-sm text-text-secondary",
259
- children: "Loading your conversation…"
273
+ children: g.loadingYourConversation
260
274
  }),
261
- !x && A.length === 0 && /* @__PURE__ */ d("p", {
275
+ !x && A.length === 0 && /* @__PURE__ */ u("p", {
262
276
  className: "text-sm text-text-secondary",
263
- children: "Ask a question about the available content."
277
+ children: g.emptyHint
264
278
  }),
265
- F && A.length < 200 && /* @__PURE__ */ d("button", {
279
+ F && A.length < 200 && /* @__PURE__ */ u("button", {
266
280
  type: "button",
267
- onClick: () => void ae(),
281
+ onClick: () => void le(),
268
282
  disabled: x || z || O || !!V || $.isActive,
269
283
  className: "mb-4 text-sm underline",
270
- children: "Load older messages"
284
+ children: g.loadOlderMessages
271
285
  }),
272
- /* @__PURE__ */ d("ol", {
286
+ /* @__PURE__ */ u("ol", {
273
287
  className: "space-y-4",
274
- children: A.map((e) => /* @__PURE__ */ f("li", { children: [
275
- /* @__PURE__ */ d("p", {
288
+ children: A.map((e) => /* @__PURE__ */ d("li", { children: [
289
+ /* @__PURE__ */ u("p", {
276
290
  className: "text-xs font-semibold text-text-primary",
277
- children: "You"
291
+ children: g.you
278
292
  }),
279
- /* @__PURE__ */ d("p", {
293
+ /* @__PURE__ */ u("p", {
280
294
  className: "whitespace-pre-wrap break-words text-sm text-text-secondary",
281
295
  children: e.input.message
282
296
  }),
283
- e.receipt?.status === "RUNNING" && e.receipt.partialMessage && /* @__PURE__ */ f("div", {
297
+ e.receipt?.status === "RUNNING" && e.receipt.partialMessage && /* @__PURE__ */ d("div", {
284
298
  className: "mt-3",
285
- children: [/* @__PURE__ */ d("p", {
299
+ children: [/* @__PURE__ */ u("p", {
286
300
  className: "text-xs text-text-secondary",
287
- children: "Generating answer…"
288
- }), /* @__PURE__ */ d("p", {
301
+ children: g.generatingAnswer
302
+ }), /* @__PURE__ */ u("p", {
289
303
  className: "whitespace-pre-wrap break-words text-sm text-text-secondary",
290
304
  children: e.receipt.partialMessage
291
305
  })]
292
306
  }),
293
- e.receipt?.status === "COMPLETED" && e.receipt.result && /* @__PURE__ */ f("div", {
307
+ e.receipt?.status === "COMPLETED" && e.receipt.result && /* @__PURE__ */ d("div", {
294
308
  className: "mt-3",
295
309
  children: [
296
- /* @__PURE__ */ d("p", {
310
+ /* @__PURE__ */ u("p", {
297
311
  className: "text-xs font-semibold text-text-primary",
298
- children: g
312
+ children: _
299
313
  }),
300
- /* @__PURE__ */ d("p", {
314
+ /* @__PURE__ */ u("p", {
301
315
  className: "whitespace-pre-wrap break-words text-sm text-text-secondary",
302
316
  children: e.receipt.result.message
303
317
  }),
304
- Y.isSupported() && /* @__PURE__ */ d("button", {
318
+ Y.isSupported() && /* @__PURE__ */ u("button", {
305
319
  type: "button",
306
320
  onClick: () => {
307
321
  let t = e.receipt?.result;
308
- t && se(t.message);
322
+ t && de(t.message);
309
323
  },
310
324
  disabled: $.isActive,
311
325
  className: "mt-2 rounded-lg border border-border-seam px-2 py-1 text-xs",
312
- children: "Read answer aloud"
326
+ children: g.readAnswerAloud
313
327
  }),
314
- e.receipt.result.sources.length > 0 && /* @__PURE__ */ d("ul", {
315
- "aria-label": "Answer sources",
328
+ e.receipt.result.sources.length > 0 && /* @__PURE__ */ u("ul", {
329
+ "aria-label": g.answerSources,
316
330
  className: "mt-2 space-y-1 text-xs text-text-secondary",
317
- children: e.receipt.result.sources.map((e) => /* @__PURE__ */ f("li", {
331
+ children: e.receipt.result.sources.map((e) => /* @__PURE__ */ u("li", {
318
332
  title: e.documentId,
319
- children: [
320
- "[",
321
- e.reference,
322
- "] Source ",
323
- e.documentId
324
- ]
333
+ children: g.sourceReference({
334
+ reference: e.reference,
335
+ documentId: e.documentId
336
+ })
325
337
  }, `${e.reference}:${e.chunkId}`))
326
338
  })
327
339
  ]
328
340
  })
329
341
  ] }, e.input.clientTurnId))
330
342
  }),
331
- z && /* @__PURE__ */ d("p", {
343
+ z && /* @__PURE__ */ u("p", {
332
344
  role: "status",
333
345
  className: "mt-3 text-sm text-text-secondary",
334
- children: "Preparing your answer…"
346
+ children: g.preparingYourAnswer
335
347
  })
336
348
  ]
337
349
  }),
338
- /* @__PURE__ */ f("div", {
350
+ /* @__PURE__ */ d("div", {
339
351
  className: "border-t border-border-seam p-3",
340
352
  children: [
341
- $.interim && /* @__PURE__ */ d("p", {
353
+ $.interim && /* @__PURE__ */ u("p", {
342
354
  role: "status",
343
355
  className: "mb-2 text-sm text-text-secondary",
344
356
  children: $.interim
345
357
  }),
346
- $.error && /* @__PURE__ */ d("p", {
358
+ $.error && /* @__PURE__ */ u("p", {
347
359
  role: "status",
348
360
  className: "mb-2 text-sm text-text-secondary",
349
- children: "Dictation is unavailable. You can type your question."
361
+ children: g.dictationUnavailable
350
362
  }),
351
- U && /* @__PURE__ */ d("p", {
363
+ U && /* @__PURE__ */ u("p", {
352
364
  role: "status",
353
365
  className: "mb-2 text-sm text-text-secondary",
354
- children: U
366
+ children: oe[U]
355
367
  }),
356
- /* @__PURE__ */ d("label", {
368
+ /* @__PURE__ */ u("label", {
357
369
  className: "sr-only",
358
370
  htmlFor: `assistant-question-${y.current}`,
359
- children: "Question"
371
+ children: g.question
360
372
  }),
361
- /* @__PURE__ */ d("textarea", {
373
+ /* @__PURE__ */ u("textarea", {
362
374
  id: `assistant-question-${y.current}`,
363
375
  value: M,
364
376
  onChange: (e) => N(e.target.value),
365
377
  onKeyDown: (e) => {
366
- e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing && (e.preventDefault(), de());
378
+ e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing && (e.preventDefault(), he());
367
379
  },
368
380
  maxLength: 8192,
369
381
  rows: 2,
370
- placeholder: "Ask a question…",
371
- disabled: x || C || z || O || !!V || !m.workspaceId || !h,
382
+ placeholder: g.askAQuestion,
383
+ disabled: x || C || z || O || !!V || !p.workspaceId || !m,
372
384
  className: "w-full rounded-lg border border-border-seam bg-bg-sunken p-2 text-sm text-text-primary"
373
385
  }),
374
- /* @__PURE__ */ f("div", {
386
+ /* @__PURE__ */ d("div", {
375
387
  className: "mt-2 flex flex-wrap justify-end gap-2",
376
388
  children: [
377
- $.isSupported && /* @__PURE__ */ d("button", {
389
+ $.isSupported && /* @__PURE__ */ u("button", {
378
390
  type: "button",
379
- onClick: ce,
391
+ onClick: fe,
380
392
  disabled: x || C || z || O || !!V,
381
393
  "aria-pressed": $.isActive,
382
394
  className: "rounded-lg border border-border-seam px-3 py-2 text-sm",
383
- children: $.isActive ? "Stop dictation" : "Dictate question"
395
+ children: $.isActive ? g.stopDictation : g.dictateQuestion
384
396
  }),
385
- oe && /* @__PURE__ */ d("button", {
397
+ ue && /* @__PURE__ */ u("button", {
386
398
  type: "button",
387
399
  onClick: () => Y.cancel(),
388
400
  className: "rounded-lg border border-border-seam px-3 py-2 text-sm",
389
- children: "Stop audio"
401
+ children: g.stopAudio
390
402
  }),
391
- C && !x && /* @__PURE__ */ d("button", {
403
+ C && !x && /* @__PURE__ */ u("button", {
392
404
  type: "button",
393
- onClick: () => void K(p, m),
405
+ onClick: () => void K(f, p),
394
406
  className: "rounded-lg border border-border-seam px-3 py-2 text-sm",
395
- children: "Reload conversation"
407
+ children: g.reloadConversation
396
408
  }),
397
- V && !z && !O && /* @__PURE__ */ d("button", {
409
+ V && !z && !O && /* @__PURE__ */ u("button", {
398
410
  type: "button",
399
- onClick: () => void ue(V, !0),
411
+ onClick: () => void me(V, !0),
400
412
  className: "rounded-lg border border-border-seam px-3 py-2 text-sm",
401
- children: "Recover turn"
413
+ children: g.recoverTurn
402
414
  }),
403
- V && /* @__PURE__ */ d("button", {
415
+ V && /* @__PURE__ */ u("button", {
404
416
  type: "button",
405
- onClick: () => void fe(),
417
+ onClick: () => void ge(),
406
418
  disabled: O,
407
419
  className: "rounded-lg border border-border-seam px-3 py-2 text-sm",
408
- children: "Cancel turn"
420
+ children: g.cancelTurn
409
421
  }),
410
- /* @__PURE__ */ d("button", {
422
+ /* @__PURE__ */ u("button", {
411
423
  type: "button",
412
- onClick: de,
413
- disabled: !M.trim() || $.isActive || O || x || C || z || !!V || !m.workspaceId || !h,
424
+ onClick: he,
425
+ disabled: !M.trim() || $.isActive || O || x || C || z || !!V || !p.workspaceId || !m,
414
426
  className: "rounded-lg bg-[var(--color-accent-soft)] px-3 py-2 text-sm disabled:opacity-50",
415
- children: "Ask"
427
+ children: g.ask
416
428
  })
417
429
  ]
418
430
  })
@@ -422,4 +434,4 @@ function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", descr
422
434
  });
423
435
  }
424
436
  //#endregion
425
- export { p as WorkflowAssistantPanel };
437
+ export { f as WorkflowAssistantPanel };