@burdenoff/fe-libs 2026.1029.7 → 2026.1029.9

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 (40) hide show
  1. package/dist/shared/assistant/appControls/grammar.js +21 -21
  2. package/dist/shared/assistant/appControls/registry.js +1 -1
  3. package/dist/shared/assistant/commandCompletions.js +87 -86
  4. package/dist/shared/assistant/i18nManifest.d.ts +27 -0
  5. package/dist/shared/assistant/i18nManifest.js +27 -0
  6. package/dist/shared/assistant/index.d.ts +9 -0
  7. package/dist/shared/assistant/localUiCommands.js +106 -112
  8. package/dist/shared/assistant/localeCommands/languageNames.js +13 -13
  9. package/dist/shared/assistant/ui/AIAssistantPanel.d.ts +11 -0
  10. package/dist/shared/assistant/ui/AIAssistantPanel.js +233 -127
  11. package/dist/shared/assistant/ui/AssistantChatArea.d.ts +13 -1
  12. package/dist/shared/assistant/ui/AssistantChatArea.js +1632 -1605
  13. package/dist/shared/assistant/ui/AssistantConversationList.d.ts +17 -1
  14. package/dist/shared/assistant/ui/AssistantConversationList.js +304 -274
  15. package/dist/shared/assistant/ui/AssistantOverlay.d.ts +11 -0
  16. package/dist/shared/assistant/ui/AssistantOverlay.js +106 -90
  17. package/dist/shared/assistant/ui/closeGuard.d.ts +21 -0
  18. package/dist/shared/assistant/ui/closeGuard.js +8 -0
  19. package/dist/shared/assistant/ui/compact/AssistantCompactHeader.d.ts +38 -0
  20. package/dist/shared/assistant/ui/compact/AssistantCompactHeader.js +89 -0
  21. package/dist/shared/assistant/ui/compact/AssistantConversationMenu.d.ts +29 -0
  22. package/dist/shared/assistant/ui/compact/AssistantConversationMenu.js +87 -0
  23. package/dist/shared/assistant/ui/compact/AssistantDiscardDraftDialog.d.ts +19 -0
  24. package/dist/shared/assistant/ui/compact/AssistantDiscardDraftDialog.js +38 -0
  25. package/dist/shared/assistant/ui/compact/AssistantMenuView.d.ts +42 -0
  26. package/dist/shared/assistant/ui/compact/AssistantMenuView.js +285 -0
  27. package/dist/shared/assistant/ui/compact/AssistantVoiceLanguageSettings.d.ts +24 -0
  28. package/dist/shared/assistant/ui/compact/AssistantVoiceLanguageSettings.js +68 -0
  29. package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.d.ts +21 -0
  30. package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.js +34 -0
  31. package/dist/shared/assistant/ui/compact/compactChrome.d.ts +75 -0
  32. package/dist/shared/assistant/ui/compact/compactChrome.js +39 -0
  33. package/dist/shared/assistant/ui/compact/waitingChange.d.ts +49 -0
  34. package/dist/shared/assistant/ui/compact/waitingChange.js +12 -0
  35. package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +19 -18
  36. package/dist/shared/assistant/ui/composer/AssistantComposer.js +261 -224
  37. package/dist/shared/assistant/useAssistantKeyboardShortcuts.d.ts +16 -2
  38. package/dist/shared/assistant/useAssistantKeyboardShortcuts.js +28 -16
  39. package/dist/shared-assistant.js +51 -42
  40. package/package.json +1 -1
@@ -2,517 +2,547 @@ import { useAssistantProduct as e } from "../product.js";
2
2
  import { useAssistantTr as t } from "../i18n.js";
3
3
  import { DEFAULT_HISTORY_LIST_FILTER as n, clampToCodePoints as r, codePointLength as i, historyFilterEmptyKind as a, historyFilterKey as o } from "../history/historyControls.js";
4
4
  import { useAssistantStore as s } from "../store.js";
5
- import { chatTurns as c, voiceTurnsOnly as l } from "../voice/turnVisibility.js";
6
- import { getAssistantDisplayContent as u } from "../displayContent.js";
7
- import { useOverlayFocus as ee } from "./useOverlayFocus.js";
8
- import { AssistantHistoryPinLimitBanner as d, AssistantHistoryUnsavedDeleteNotice as f } from "./AssistantHistoryNotices.js";
9
- import { historyRowAcceptsControls as te, selectAssistantHistoryList as ne } from "../history/historyList.js";
10
- import { useAssistantHistoryStatus as p } from "../history/historyStatus.js";
11
- import { useAssistantHistoryStore as m } from "../history/historyStore.js";
12
- import { assistantHistory as h } from "../history/historyEngine.js";
13
- import { selectHistorySearchList as re } from "../history/historySearch.js";
14
- import { useAssistantHistorySearch as ie } from "../history/useAssistantHistorySearch.js";
15
- import { AssistantConversationFilters as ae } from "./AssistantConversationFilters.js";
16
- import { AssistantHistorySearchBox as oe } from "./AssistantHistorySearchBox.js";
17
- import { useEffect as se, useId as ce, useLayoutEffect as le, useMemo as g, useRef as _, useState as v } from "react";
18
- import { Archive as ue, ArchiveRestore as de, Check as fe, MessageSquare as pe, PanelLeftClose as me, Pencil as he, Pin as ge, PinOff as _e, Plus as ve, Trash2 as ye } from "lucide-react";
19
- import { Fragment as be, jsx as y, jsxs as b } from "react/jsx-runtime";
5
+ import { chatTurns as c, voiceTurnsOnly as ee } from "../voice/turnVisibility.js";
6
+ import { getAssistantDisplayContent as l } from "../displayContent.js";
7
+ import { useOverlayFocus as te } from "./useOverlayFocus.js";
8
+ import { AssistantHistoryPinLimitBanner as u, AssistantHistoryUnsavedDeleteNotice as d } from "./AssistantHistoryNotices.js";
9
+ import { historyRowAcceptsControls as ne, selectAssistantHistoryList as re } from "../history/historyList.js";
10
+ import { useAssistantHistoryStatus as f } from "../history/historyStatus.js";
11
+ import { useAssistantHistoryStore as p } from "../history/historyStore.js";
12
+ import { assistantHistory as m } from "../history/historyEngine.js";
13
+ import { selectHistorySearchList as ie } from "../history/historySearch.js";
14
+ import { useAssistantHistorySearch as ae } from "../history/useAssistantHistorySearch.js";
15
+ import { AssistantConversationFilters as oe } from "./AssistantConversationFilters.js";
16
+ import { AssistantHistorySearchBox as se } from "./AssistantHistorySearchBox.js";
17
+ import { useEffect as ce, useId as le, useLayoutEffect as ue, useMemo as h, useRef as g, useState as _ } from "react";
18
+ import { Archive as de, ArchiveRestore as fe, ArrowLeft as pe, Check as me, MessageSquare as he, PanelLeftClose as ge, Pencil as _e, Pin as ve, PinOff as ye, Plus as be, Trash2 as xe } from "lucide-react";
19
+ import { Fragment as Se, jsx as v, jsxs as y } from "react/jsx-runtime";
20
20
  //#region src/shared/assistant/ui/AssistantConversationList.tsx
21
- var xe = {
21
+ var Ce = {
22
22
  channel: "ANY",
23
23
  pinned: null,
24
24
  archived: "INCLUDE"
25
- }, Se = (e) => `group relative px-3 py-2 cursor-pointer hover:bg-bg-elevated transition-colors ${e ? "bg-bg-elevated border-l-2 border-action-primary-bg" : ""}`, Ce = ({ active: e, title: t, onOpen: n, details: r, actions: i, openRef: a, actionRef: o, testId: s }) => {
26
- let c = ce(), l = `${c}-title`, u = `${c}-details`;
27
- return /* @__PURE__ */ b("div", {
28
- className: Se(e),
25
+ }, we = (e) => `group relative px-3 py-2 cursor-pointer hover:bg-bg-elevated transition-colors ${e ? "bg-bg-elevated border-l-2 border-action-primary-bg" : ""}`, Te = ({ active: e, title: t, onOpen: n, details: r, actions: i, openRef: a, actionRef: o, testId: s }) => {
26
+ let c = le(), ee = `${c}-title`, l = `${c}-details`;
27
+ return /* @__PURE__ */ y("div", {
28
+ className: we(e),
29
29
  "data-testid": s,
30
- children: [/* @__PURE__ */ b("div", {
30
+ children: [/* @__PURE__ */ y("div", {
31
31
  className: "flex items-center justify-between",
32
- children: [/* @__PURE__ */ y("button", {
32
+ children: [/* @__PURE__ */ v("button", {
33
33
  ref: a,
34
34
  type: "button",
35
35
  onClick: n,
36
36
  "aria-current": e ? "true" : void 0,
37
- "aria-describedby": u,
37
+ "aria-describedby": l,
38
38
  className: "flex-1 min-w-0 text-left cursor-pointer focus:outline-none after:absolute after:inset-0 focus-visible:after:outline-2 focus-visible:after:outline-solid focus-visible:after:-outline-offset-2 focus-visible:after:outline-[var(--color-focus-ring)]",
39
39
  "data-testid": "open-conversation",
40
- children: /* @__PURE__ */ y("span", {
41
- id: l,
40
+ children: /* @__PURE__ */ v("span", {
41
+ id: ee,
42
42
  className: "block text-xs font-medium text-text-primary truncate",
43
43
  children: t
44
44
  })
45
- }), /* @__PURE__ */ y("div", {
45
+ }), /* @__PURE__ */ v("div", {
46
46
  className: "sr-only group-hover:not-sr-only group-focus-within:not-sr-only [@media(pointer:coarse)]:not-sr-only",
47
- children: /* @__PURE__ */ y("div", {
47
+ children: /* @__PURE__ */ v("div", {
48
48
  className: "relative z-10 flex items-center gap-0.5 ml-1",
49
- children: i.map((e) => /* @__PURE__ */ y("button", {
49
+ children: i.map((e) => /* @__PURE__ */ v("button", {
50
50
  ref: o(e.id),
51
51
  type: "button",
52
52
  onClick: e.onActivate,
53
53
  className: "p-0.5 [@media(pointer:coarse)]:p-1.5 hover:bg-bg-sunken rounded",
54
54
  "aria-label": e.label,
55
- "aria-describedby": l,
55
+ "aria-describedby": ee,
56
56
  "data-testid": e.testId,
57
57
  children: e.icon
58
58
  }, e.id))
59
59
  })
60
60
  })]
61
- }), /* @__PURE__ */ y("div", {
62
- id: u,
61
+ }), /* @__PURE__ */ v("div", {
62
+ id: l,
63
63
  children: r
64
64
  })]
65
65
  });
66
- }, we = (e, t) => {
66
+ }, Ee = (e, t) => {
67
67
  let n = [];
68
68
  for (let r = 1; r < e.length; r += 1) {
69
69
  let i = e[t + r], a = t - r >= 0 ? e[t - r] : void 0;
70
70
  i !== void 0 && n.push(i), a !== void 0 && n.push(a);
71
71
  }
72
72
  return n;
73
- }, x = () => {
74
- let x = t(), { modes: Te } = e(), { conversations: S, activeConversationId: C, processingByConversationId: Ee, setActiveConversation: De, setMode: Oe, createConversation: ke, deleteConversation: Ae, renameConversation: je, setConversationListOpen: w } = s(), [T, E] = v(null), [D, Me] = v(""), [Ne, O] = v(!1), Pe = ce(), k = p((e) => e.product !== null), A = p((e) => e.scopeKey), Fe = p((e) => e.loadingIds), j = p((e) => e.olderHeaders), Ie = p((e) => e.unsavedDelete !== void 0), Le = p((e) => e.controlsAvailable), M = k && Le, Re = p((e) => e.pinLimit), N = m((e) => A === null ? void 0 : e.scopes[A]), ze = m((e) => e.tombstones), P = m((e) => e.outbox), [F, Be] = v(n), [Ve, He] = v(!1), Ue = M ? F : xe, We = (e) => {
75
- Be(e), He(!0);
76
- }, [Ge, Ke] = v(""), I = ie({
77
- text: Ge,
78
- filter: F,
79
- enabled: M,
80
- scopeKey: A,
81
- epoch: p((e) => e.epoch)
82
- }), L = M && I.query !== "", R = I.server;
83
- L && !Ve && He(!0);
84
- let z = g(() => ({
73
+ }, De = ({ presentation: De, onBack: Oe, onDone: b }) => {
74
+ let x = t(), ke = De === "compact", { modes: Ae } = e(), { conversations: S, activeConversationId: je, processingByConversationId: Me, setActiveConversation: Ne, setMode: Pe, createConversation: Fe, deleteConversation: Ie, renameConversation: Le, setConversationListOpen: C } = s(), [w, Re] = _(null), [ze, Be] = _(""), [Ve, T] = _(!1), He = le(), E = f((e) => e.product !== null), D = f((e) => e.scopeKey), Ue = f((e) => e.loadingIds), O = f((e) => e.olderHeaders), We = f((e) => e.unsavedDelete !== void 0), Ge = f((e) => e.controlsAvailable), k = E && Ge, Ke = f((e) => e.pinLimit), A = p((e) => D === null ? void 0 : e.scopes[D]), qe = p((e) => e.tombstones), Je = p((e) => e.outbox), [j, Ye] = _(n), [Xe, Ze] = _(!1), Qe = k ? j : Ce, $e = (e) => {
75
+ Ye(e), Ze(!0);
76
+ }, [et, tt] = _(""), M = ae({
77
+ text: et,
78
+ filter: j,
79
+ enabled: k,
80
+ scopeKey: D,
81
+ epoch: f((e) => e.epoch)
82
+ }), N = k && M.query !== "", P = M.server;
83
+ N && !Xe && Ze(!0);
84
+ let F = h(() => ({
85
85
  conversations: S,
86
- scopeKey: A,
87
- headers: N?.headers ?? {},
88
- olderHeaders: j && j.scopeKey === A ? j.headers : void 0,
89
- tombstones: ze,
90
- loadingIds: Fe,
91
- outbox: P
86
+ scopeKey: D,
87
+ headers: A?.headers ?? {},
88
+ olderHeaders: O && O.scopeKey === D ? O.headers : void 0,
89
+ tombstones: qe,
90
+ loadingIds: Ue,
91
+ outbox: Je
92
92
  }), [
93
93
  S,
94
+ D,
94
95
  A,
96
+ O,
97
+ qe,
98
+ Ue,
99
+ Je
100
+ ]), I = h(() => E ? re(F, Qe) : null, [
101
+ E,
102
+ F,
103
+ Qe
104
+ ]), L = h(() => E && N ? ie(F, j, M.query, P.status === "results" ? P.hits : null) : null, [
105
+ E,
95
106
  N,
107
+ F,
96
108
  j,
97
- ze,
98
- Fe,
109
+ M.query,
99
110
  P
100
- ]), B = g(() => k ? ne(z, Ue) : null, [
101
- k,
102
- z,
103
- Ue
104
- ]), V = g(() => k && L ? re(z, F, I.query, R.status === "results" ? R.hits : null) : null, [
105
- k,
111
+ ]), R = P.status === "results" && P.hasMore, z = P.status === "results" && P.loadingMore, nt = k ? j : void 0, rt = o(nt), B = O && O.scopeKey === D ? O : void 0, V = B ? B.filterKey === rt ? B.hasMore : !0 : A?.hasOlderHeaders === !0, H = h(() => L ? [
112
+ ...L.server.map((e) => e.key),
113
+ ...L.local.map((e) => e.key),
114
+ ...L.device.map((e) => e.id)
115
+ ] : I ? [...I.workspace.map((e) => e.key), ...I.device.map((e) => e.id)] : S.map((e) => e.id), [
106
116
  L,
107
- z,
108
- F,
109
- I.query,
110
- R
111
- ]), H = R.status === "results" && R.hasMore, U = R.status === "results" && R.loadingMore, qe = M ? F : void 0, Je = o(qe), W = j && j.scopeKey === A ? j : void 0, G = W ? W.filterKey === Je ? W.hasMore : !0 : N?.hasOlderHeaders === !0, K = g(() => V ? [
112
- ...V.server.map((e) => e.key),
113
- ...V.local.map((e) => e.key),
114
- ...V.device.map((e) => e.id)
115
- ] : B ? [...B.workspace.map((e) => e.key), ...B.device.map((e) => e.id)] : S.map((e) => e.id), [
116
- V,
117
- B,
117
+ I,
118
118
  S
119
119
  ]);
120
- se(() => {
121
- k && h.notePanelOpened();
122
- }, [k]);
123
- let Ye = () => {
124
- ke(), w(!1);
125
- }, Xe = (e) => {
126
- if (k) {
127
- h.openConversation(e, { modes: Te }), w(!1);
120
+ ce(() => {
121
+ E && m.notePanelOpened();
122
+ }, [E]);
123
+ let U = () => {
124
+ Fe(), C(!1), b?.();
125
+ }, it = (e) => {
126
+ if (E) {
127
+ m.openConversation(e, { modes: Ae }), C(!1), b?.();
128
128
  return;
129
129
  }
130
130
  let t = S.find((t) => t.id === e);
131
- De(e), t && Oe(t.mode), w(!1);
132
- }, Ze = _(/* @__PURE__ */ new Map()), Qe = (e) => (t) => {
133
- t ? Ze.current.set(e, t) : Ze.current.delete(e);
134
- }, $e = _(/* @__PURE__ */ new Map()), et = (e) => (t) => (n) => {
131
+ Ne(e), t && Pe(t.mode), C(!1), b?.();
132
+ }, W = g(/* @__PURE__ */ new Map()), at = (e) => (t) => {
133
+ t ? W.current.set(e, t) : W.current.delete(e);
134
+ }, G = g(/* @__PURE__ */ new Map()), ot = (e) => (t) => (n) => {
135
135
  let r = `${e}\u0000${t}`;
136
- n ? $e.current.set(r, n) : $e.current.delete(r);
137
- }, q = _(null), tt = _(null), nt = _(null), rt = _(null), it = _(null), at = (e, t) => {
138
- E(e), Me(r(t, 80)), O(!1);
139
- }, ot = (e) => {
140
- Me(r(e, 80)), O(i(e) > 80);
141
- }, st = () => {
142
- T && D.trim() && je(T, D), T && (q.current = {
136
+ n ? G.current.set(r, n) : G.current.delete(r);
137
+ }, K = g(null), q = g(null), st = g(null), ct = g(null), lt = g(null), ut = (e, t) => {
138
+ Re(e), Be(r(t, 80)), T(!1);
139
+ }, dt = (e) => {
140
+ Be(r(e, 80)), T(i(e) > 80);
141
+ }, ft = () => {
142
+ w && ze.trim() && Le(w, ze), w && (K.current = {
143
143
  kind: "renamed",
144
- key: T
145
- }), E(null), O(!1);
146
- }, ct = (e) => {
147
- q.current = {
144
+ key: w
145
+ }), Re(null), T(!1);
146
+ }, pt = (e) => {
147
+ K.current = {
148
148
  kind: "deleted",
149
149
  key: e,
150
- before: K
151
- }, k ? h.deleteConversation(e) : Ae(e);
152
- }, lt = (e, t, n) => {
153
- q.current = {
150
+ before: H
151
+ }, E ? m.deleteConversation(e) : Ie(e);
152
+ }, mt = (e, t, n) => {
153
+ K.current = {
154
154
  kind: "control",
155
155
  key: e,
156
156
  control: t,
157
- before: K
158
- }, h.updateConversation(e, n) || (q.current = null);
159
- }, ut = x("history.untitled", "Untitled conversation"), J = "text-[10px] text-text-muted px-1 py-0.5 bg-bg-sunken rounded", dt = (e) => e === 1 ? x("conversationList.messageCountOne", "1 message") : x("conversationList.messageCount", "{{count}} messages", { count: e }), ft = (e) => e === 1 ? x("conversationList.spokenCountOne", "1 spoken") : x("conversationList.spokenCount", "{{count}} spoken", { count: e }), pt = (e, t) => /* @__PURE__ */ b("div", {
160
- className: Se(t),
161
- children: [/* @__PURE__ */ b("div", {
157
+ before: H
158
+ }, m.updateConversation(e, n) || (K.current = null);
159
+ }, J = x("history.untitled", "Untitled conversation"), Y = "text-[10px] text-text-muted px-1 py-0.5 bg-bg-sunken rounded", ht = (e) => e === 1 ? x("conversationList.messageCountOne", "1 message") : x("conversationList.messageCount", "{{count}} messages", { count: e }), gt = (e) => e === 1 ? x("conversationList.spokenCountOne", "1 spoken") : x("conversationList.spokenCount", "{{count}} spoken", { count: e }), _t = (e, t) => /* @__PURE__ */ y("div", {
160
+ className: we(t),
161
+ children: [/* @__PURE__ */ y("div", {
162
162
  className: "flex items-center gap-1",
163
- children: [/* @__PURE__ */ y("input", {
164
- ref: tt,
163
+ children: [/* @__PURE__ */ v("input", {
164
+ ref: q,
165
165
  "aria-label": x("conversations.renameLabel", "Conversation title"),
166
- "aria-describedby": Ne ? Pe : void 0,
167
- value: D,
168
- onChange: (e) => ot(e.target.value),
166
+ "aria-describedby": Ve ? He : void 0,
167
+ value: ze,
168
+ onChange: (e) => dt(e.target.value),
169
169
  onKeyDown: (t) => {
170
- t.key === "Enter" && (t.preventDefault(), st()), t.key === "Escape" && (t.preventDefault(), t.stopPropagation(), E(null), O(!1), q.current = {
170
+ t.key === "Enter" && (t.preventDefault(), ft()), t.key === "Escape" && (t.preventDefault(), t.stopPropagation(), Re(null), T(!1), K.current = {
171
171
  kind: "renamed",
172
172
  key: e
173
173
  });
174
174
  },
175
175
  className: "flex-1 text-xs bg-bg-sunken border border-border-default rounded px-2 py-1 text-text-primary focus:outline-none focus:border-action-primary-bg"
176
- }), /* @__PURE__ */ y("button", {
176
+ }), /* @__PURE__ */ v("button", {
177
177
  type: "button",
178
- onClick: st,
178
+ onClick: ft,
179
179
  className: "p-1 hover:bg-bg-sunken rounded",
180
180
  "aria-label": x("conversations.saveTitle", "Save title"),
181
- children: /* @__PURE__ */ y(fe, { className: "size-3 text-status-success-text" })
181
+ children: /* @__PURE__ */ v(me, { className: "size-3 text-status-success-text" })
182
182
  })]
183
- }), /* @__PURE__ */ y("p", {
184
- id: Pe,
183
+ }), /* @__PURE__ */ v("p", {
184
+ id: He,
185
185
  role: "status",
186
186
  className: "text-[10px] text-text-muted",
187
- children: Ne ? x("conversations.titleLimit", "Titles are up to {{limit}} characters", { limit: 80 }) : ""
187
+ children: Ve ? x("conversations.titleLimit", "Titles are up to {{limit}} characters", { limit: 80 }) : ""
188
188
  })]
189
- }, e), mt = (e) => {
190
- let t = M && te(e, P, A), n = e.pinnedAt !== null, r = e.archivedAt !== null, i = [];
189
+ }, e), vt = (e) => {
190
+ let t = k && ne(e, Je, D), n = e.pinnedAt !== null, r = e.archivedAt !== null, i = [];
191
191
  return t && !r && i.push({
192
192
  id: "pin",
193
193
  label: n ? x("conversations.unpin", "Unpin conversation") : x("conversations.pin", "Pin conversation"),
194
- icon: y(n ? _e : ge, { className: "size-3 text-text-muted" }),
195
- onActivate: () => lt(e.key, "pin", { pinned: !n }),
194
+ icon: v(n ? ye : ve, { className: "size-3 text-text-muted" }),
195
+ onActivate: () => mt(e.key, "pin", { pinned: !n }),
196
196
  testId: "pin-conversation"
197
197
  }), (e.conversation || t) && i.push({
198
198
  id: "rename",
199
199
  label: x("conversations.rename", "Rename conversation"),
200
- icon: /* @__PURE__ */ y(he, { className: "size-3 text-text-muted" }),
201
- onActivate: () => at(e.key, e.title),
200
+ icon: /* @__PURE__ */ v(_e, { className: "size-3 text-text-muted" }),
201
+ onActivate: () => ut(e.key, e.title),
202
202
  testId: "rename-conversation"
203
203
  }), t && i.push({
204
204
  id: "archive",
205
205
  label: r ? x("conversations.unarchive", "Unarchive conversation") : x("conversations.archive", "Archive conversation"),
206
- icon: y(r ? de : ue, { className: "size-3 text-text-muted" }),
207
- onActivate: () => lt(e.key, "archive", { archived: !r }),
206
+ icon: v(r ? fe : de, { className: "size-3 text-text-muted" }),
207
+ onActivate: () => mt(e.key, "archive", { archived: !r }),
208
208
  testId: "archive-conversation"
209
209
  }), i.push({
210
210
  id: "delete",
211
211
  label: x("conversations.delete", "Delete conversation"),
212
- icon: /* @__PURE__ */ y(ye, { className: "size-3 text-status-error-text" }),
213
- onActivate: () => ct(e.key),
212
+ icon: /* @__PURE__ */ v(xe, { className: "size-3 text-status-error-text" }),
213
+ onActivate: () => pt(e.key),
214
214
  testId: "delete-conversation"
215
215
  }), i;
216
- }, ht = (e) => [{
216
+ }, yt = (e) => [{
217
217
  id: "rename",
218
218
  label: x("conversations.rename", "Rename conversation"),
219
- icon: /* @__PURE__ */ y(he, { className: "size-3 text-text-muted" }),
220
- onActivate: () => at(e.id, e.title),
219
+ icon: /* @__PURE__ */ v(_e, { className: "size-3 text-text-muted" }),
220
+ onActivate: () => ut(e.id, e.title),
221
221
  testId: "rename-conversation"
222
222
  }, {
223
223
  id: "delete",
224
224
  label: x("conversations.delete", "Delete conversation"),
225
- icon: /* @__PURE__ */ y(ye, { className: "size-3 text-status-error-text" }),
226
- onActivate: () => ct(e.id),
225
+ icon: /* @__PURE__ */ v(xe, { className: "size-3 text-status-error-text" }),
226
+ onActivate: () => pt(e.id),
227
227
  testId: "delete-conversation"
228
- }], Y = (e, t) => {
229
- let n = e.id === C, r = e.id === T, i = Te.find((t) => t.id === e.mode), a = c(e.messages), o = l(e.messages), s = a[a.length - 1], ee = a.length === 0 && e.messages.length > 0, d = Ee[e.id], f = s ? u(s, d, x).text.slice(0, 60) : "";
230
- return r ? pt(e.id, n) : /* @__PURE__ */ y(Ce, {
228
+ }], X = (e, t) => {
229
+ let n = e.id === je, r = e.id === w, i = Ae.find((t) => t.id === e.mode), a = c(e.messages), o = ee(e.messages), s = a[a.length - 1], te = a.length === 0 && e.messages.length > 0, u = Me[e.id], d = s ? l(s, u, x).text.slice(0, 60) : "";
230
+ return r ? _t(e.id, n) : /* @__PURE__ */ v(Te, {
231
231
  active: n,
232
- title: (t ? t.title : e.title) || ut,
233
- onOpen: () => Xe(e.id),
234
- openRef: Qe(e.id),
235
- actionRef: et(e.id),
236
- actions: t ? t.actions : ht(e),
237
- details: /* @__PURE__ */ b(be, { children: [
238
- /* @__PURE__ */ b("div", {
232
+ title: (t ? t.title : e.title) || J,
233
+ onOpen: () => it(e.id),
234
+ openRef: at(e.id),
235
+ actionRef: ot(e.id),
236
+ actions: t ? t.actions : yt(e),
237
+ details: /* @__PURE__ */ y(Se, { children: [
238
+ /* @__PURE__ */ y("div", {
239
239
  className: "flex flex-wrap items-center gap-1.5 mt-0.5",
240
240
  children: [
241
- /* @__PURE__ */ y("span", {
242
- className: J,
241
+ /* @__PURE__ */ v("span", {
242
+ className: Y,
243
243
  children: i?.label ?? e.mode
244
244
  }),
245
- /* @__PURE__ */ y("span", {
245
+ /* @__PURE__ */ v("span", {
246
246
  className: "text-[10px] text-text-muted",
247
- children: dt(a.length)
247
+ children: ht(a.length)
248
248
  }),
249
- o.length > 0 ? /* @__PURE__ */ y("span", {
249
+ o.length > 0 ? /* @__PURE__ */ v("span", {
250
250
  className: "text-[10px] text-text-muted",
251
251
  "data-testid": "history-spoken-count",
252
- children: ft(o.length)
252
+ children: gt(o.length)
253
253
  }) : null,
254
- d && d.status !== "idle" && /* @__PURE__ */ y("span", {
254
+ u && u.status !== "idle" && /* @__PURE__ */ v("span", {
255
255
  className: "text-[10px] text-action-primary-bg px-1 py-0.5 bg-bg-sunken rounded",
256
- children: d.status
256
+ children: u.status
257
257
  }),
258
258
  t?.badges
259
259
  ]
260
260
  }),
261
261
  t?.note,
262
- f && /* @__PURE__ */ y("p", {
262
+ d && /* @__PURE__ */ v("p", {
263
263
  className: "text-[10px] text-text-muted truncate mt-0.5",
264
- children: f
264
+ children: d
265
265
  }),
266
- ee && /* @__PURE__ */ y("p", {
266
+ te && /* @__PURE__ */ v("p", {
267
267
  className: "text-[10px] text-text-muted truncate mt-0.5",
268
268
  children: x("conversationList.voiceOnly", "Spoken conversation")
269
269
  })
270
270
  ] })
271
271
  }, e.id);
272
- }, gt = (e) => e.blocked === "quota" ? x("history.notSavedQuota", "Not saved yet: this workspace has reached its conversation limit. It will be saved when there is room.") : e.blocked === "invalid" ? x("history.notSavedInvalid", "Part of this conversation couldn't be saved. It stays on this device.") : e.blocked === "scope" ? x("history.notSavedScope", "Some turns were sent from another workspace. They stay on this device.") : null, _t = (e) => {
273
- let t = gt(e);
274
- return /* @__PURE__ */ b(be, { children: [
275
- e.channel === "VOICE" ? /* @__PURE__ */ y("span", {
276
- className: J,
272
+ }, bt = (e) => e.blocked === "quota" ? x("history.notSavedQuota", "Not saved yet: this workspace has reached its conversation limit. It will be saved when there is room.") : e.blocked === "invalid" ? x("history.notSavedInvalid", "Part of this conversation couldn't be saved. It stays on this device.") : e.blocked === "scope" ? x("history.notSavedScope", "Some turns were sent from another workspace. They stay on this device.") : null, xt = (e) => {
273
+ let t = bt(e);
274
+ return /* @__PURE__ */ y(Se, { children: [
275
+ e.channel === "VOICE" ? /* @__PURE__ */ v("span", {
276
+ className: Y,
277
277
  "data-testid": "history-badge-voice",
278
278
  children: x("conversationList.badgeVoice", "Voice")
279
- }) : e.channel === "MIXED" ? /* @__PURE__ */ y("span", {
280
- className: J,
279
+ }) : e.channel === "MIXED" ? /* @__PURE__ */ v("span", {
280
+ className: Y,
281
281
  "data-testid": "history-badge-mixed",
282
282
  children: x("conversationList.badgeMixed", "Chat + voice")
283
283
  }) : null,
284
- e.pinnedAt === null ? null : /* @__PURE__ */ b("span", {
285
- className: `${J} inline-flex items-center gap-0.5`,
284
+ e.pinnedAt === null ? null : /* @__PURE__ */ y("span", {
285
+ className: `${Y} inline-flex items-center gap-0.5`,
286
286
  "data-testid": "history-badge-pinned",
287
- children: [/* @__PURE__ */ y(ge, {
287
+ children: [/* @__PURE__ */ v(ve, {
288
288
  className: "size-2.5",
289
289
  "aria-hidden": "true"
290
290
  }), x("conversationList.badgePinned", "Pinned")]
291
291
  }),
292
- e.archivedAt === null ? null : /* @__PURE__ */ b("span", {
293
- className: `${J} inline-flex items-center gap-0.5`,
292
+ e.archivedAt === null ? null : /* @__PURE__ */ y("span", {
293
+ className: `${Y} inline-flex items-center gap-0.5`,
294
294
  "data-testid": "history-badge-archived",
295
- children: [/* @__PURE__ */ y(ue, {
295
+ children: [/* @__PURE__ */ v(de, {
296
296
  className: "size-2.5",
297
297
  "aria-hidden": "true"
298
298
  }), x("conversationList.badgeArchived", "Archived")]
299
299
  }),
300
- e.legacy ? /* @__PURE__ */ y("span", {
301
- className: J,
300
+ e.legacy ? /* @__PURE__ */ v("span", {
301
+ className: Y,
302
302
  "data-testid": "history-badge-read-only",
303
303
  children: x("history.badgeReadOnly", "Read-only")
304
304
  }) : null,
305
- t === null ? null : /* @__PURE__ */ y("span", {
306
- className: J,
305
+ t === null ? null : /* @__PURE__ */ v("span", {
306
+ className: Y,
307
307
  "data-testid": "history-badge-not-saved",
308
308
  children: x("history.badgeNotSaved", "Not saved")
309
309
  }),
310
- e.loading ? /* @__PURE__ */ y("span", {
311
- className: J,
310
+ e.loading ? /* @__PURE__ */ v("span", {
311
+ className: Y,
312
312
  "data-testid": "history-badge-loading",
313
313
  children: x("history.badgeLoading", "Loading…")
314
314
  }) : null
315
315
  ] });
316
- }, vt = (e) => {
317
- let t = gt(e);
318
- return t === null ? null : /* @__PURE__ */ y("p", {
316
+ }, St = (e) => {
317
+ let t = bt(e);
318
+ return t === null ? null : /* @__PURE__ */ v("p", {
319
319
  className: "text-[10px] text-text-muted break-words mt-0.5",
320
320
  "data-testid": "history-not-saved-reason",
321
321
  children: t
322
322
  });
323
- }, yt = (e) => e.key === T ? pt(e.key, e.key === C) : /* @__PURE__ */ y(Ce, {
324
- active: e.key === C,
325
- title: e.title || ut,
326
- onOpen: () => Xe(e.key),
327
- openRef: Qe(e.key),
328
- actionRef: et(e.key),
329
- actions: mt(e),
330
- details: /* @__PURE__ */ b(be, { children: [/* @__PURE__ */ y("div", {
323
+ }, Ct = (e) => e.key === w ? _t(e.key, e.key === je) : /* @__PURE__ */ v(Te, {
324
+ active: e.key === je,
325
+ title: e.title || J,
326
+ onOpen: () => it(e.key),
327
+ openRef: at(e.key),
328
+ actionRef: ot(e.key),
329
+ actions: vt(e),
330
+ details: /* @__PURE__ */ y(Se, { children: [/* @__PURE__ */ v("div", {
331
331
  className: "flex flex-wrap items-center gap-1.5 mt-0.5",
332
- children: _t(e)
333
- }), vt(e)] }),
332
+ children: xt(e)
333
+ }), St(e)] }),
334
334
  testId: "history-server-row"
335
- }, e.key), bt = (e) => e.conversation ? Y(e.conversation, {
336
- title: e.title || ut,
337
- badges: _t(e),
338
- note: vt(e),
339
- actions: mt(e)
340
- }) : yt(e), X = (e) => /* @__PURE__ */ y("h3", {
335
+ }, e.key), wt = (e) => e.conversation ? X(e.conversation, {
336
+ title: e.title || J,
337
+ badges: xt(e),
338
+ note: St(e),
339
+ actions: vt(e)
340
+ }) : Ct(e), Z = (e) => /* @__PURE__ */ v("h3", {
341
341
  className: "px-3 pt-2 pb-1 text-[10px] font-semibold uppercase tracking-wide text-text-muted",
342
342
  children: e
343
- }), Z = V ? V.server.length + V.local.length + V.device.length : B ? B.workspace.length + B.device.length : S.length, xt = V ? Z === 0 && R.status !== "searching" && !H : B ? Z === 0 && !G : S.length === 0, St = (e) => e === 0 ? x("conversationFilters.none", "No conversations match") : e === 1 ? x("conversationFilters.countOne", "1 conversation") : x("conversationFilters.count", "{{count}} conversations", { count: e }), Ct = L ? I.tooShort ? x("historySearch.tooShort", "Type 2 or more characters to search this workspace") : R.status === "searching" ? x("historySearch.searching", "Searching…") : St(Z) : void 0, wt = L ? R.status === "fallback" ? R.reason === "busy" ? x("historySearch.busy", "Search is busy right now. Showing matches on this device.") : x("historySearch.failed", "Couldn't search this workspace. Showing matches on this device.") : R.status === "results" && R.moreFailed ? x("historySearch.moreFailed", "Couldn't load more results. Try again.") : "" : "", Q = M && !L ? a(F) : null, Tt = L ? St(0) : Q === "archived" ? x("conversationList.emptyArchived", "No archived conversations") : Q === "pinned" ? x("conversationList.emptyPinned", "No pinned conversations") : Q === "voice" ? x("conversationList.emptyVoice", "No voice conversations") : Q === "chat" ? x("conversationList.emptyChat", "No chat conversations") : x("conversations.empty", "No conversations yet"), $ = ee("assistant-open-history");
344
- return le(() => {
345
- T !== null && tt.current?.focus({ preventScroll: !0 });
346
- }, [T]), le(() => {
347
- let e = q.current;
348
- if (!e || (e.kind === "deleted" ? K.includes(e.key) : e.kind === "renamed" ? T === e.key : e.kind !== "control" && (e.kind === "more" ? U : G))) return;
349
- q.current = null;
343
+ }), Q = L ? L.server.length + L.local.length + L.device.length : I ? I.workspace.length + I.device.length : S.length, Tt = L ? Q === 0 && P.status !== "searching" && !R : I ? Q === 0 && !V : S.length === 0, Et = (e) => e === 0 ? x("conversationFilters.none", "No conversations match") : e === 1 ? x("conversationFilters.countOne", "1 conversation") : x("conversationFilters.count", "{{count}} conversations", { count: e }), Dt = N ? M.tooShort ? x("historySearch.tooShort", "Type 2 or more characters to search this workspace") : P.status === "searching" ? x("historySearch.searching", "Searching…") : Et(Q) : void 0, Ot = N ? P.status === "fallback" ? P.reason === "busy" ? x("historySearch.busy", "Search is busy right now. Showing matches on this device.") : x("historySearch.failed", "Couldn't search this workspace. Showing matches on this device.") : P.status === "results" && P.moreFailed ? x("historySearch.moreFailed", "Couldn't load more results. Try again.") : "" : "", $ = k && !N ? a(j) : null, kt = N ? Et(0) : $ === "archived" ? x("conversationList.emptyArchived", "No archived conversations") : $ === "pinned" ? x("conversationList.emptyPinned", "No pinned conversations") : $ === "voice" ? x("conversationList.emptyVoice", "No voice conversations") : $ === "chat" ? x("conversationList.emptyChat", "No chat conversations") : x("conversations.empty", "No conversations yet"), At = te("assistant-open-history");
344
+ return ue(() => {
345
+ w !== null && q.current?.focus({ preventScroll: !0 });
346
+ }, [w]), ue(() => {
347
+ let e = K.current;
348
+ if (!e || (e.kind === "deleted" ? H.includes(e.key) : e.kind === "renamed" ? w === e.key : e.kind !== "control" && (e.kind === "more" ? z : V))) return;
349
+ K.current = null;
350
350
  let t = document.activeElement;
351
351
  if (t && t !== document.body) return;
352
- let n, r = e.kind === "control" && K.includes(e.key) ? $e.current.get(`${e.key}\u0000${e.control}`) : void 0;
352
+ let n, r = e.kind === "control" && H.includes(e.key) ? G.current.get(`${e.key}\u0000${e.control}`) : void 0;
353
353
  if (e.kind === "renamed") n = [e.key];
354
- else if (e.kind === "control") n = K.includes(e.key) ? [e.key] : [...we(e.before, e.before.indexOf(e.key)), ...K];
355
- else if (e.kind === "deleted") n = [...we(e.before, e.before.indexOf(e.key)), ...K];
354
+ else if (e.kind === "control") n = H.includes(e.key) ? [e.key] : [...Ee(e.before, e.before.indexOf(e.key)), ...H];
355
+ else if (e.kind === "deleted") n = [...Ee(e.before, e.before.indexOf(e.key)), ...H];
356
356
  else if (e.kind === "more") {
357
- let t = new Set(e.before), r = V?.server ?? [];
357
+ let t = new Set(e.before), r = L?.server ?? [];
358
358
  n = [
359
- ...K.filter((e) => !t.has(e)),
359
+ ...H.filter((e) => !t.has(e)),
360
360
  r[r.length - 1]?.key,
361
- ...K
361
+ ...H
362
362
  ];
363
363
  } else {
364
- let t = j && j.scopeKey === A ? j.headers : {}, r = new Set(e.before), i = B?.workspace ?? [];
364
+ let t = O && O.scopeKey === D ? O.headers : {}, r = new Set(e.before), i = I?.workspace ?? [];
365
365
  n = [
366
- ...K.filter((e) => !r.has(e) && e in t),
366
+ ...H.filter((e) => !r.has(e) && e in t),
367
367
  i[i.length - 1]?.key,
368
- ...K
368
+ ...H
369
369
  ];
370
370
  }
371
- (r ?? n.map((e) => e === void 0 ? void 0 : e === T ? tt.current ?? void 0 : Ze.current.get(e)).find((e) => e !== void 0) ?? nt.current ?? rt.current ?? it.current ?? $.current)?.focus({ preventScroll: !0 });
371
+ (r ?? n.map((e) => e === void 0 ? void 0 : e === w ? q.current ?? void 0 : W.current.get(e)).find((e) => e !== void 0) ?? st.current ?? ct.current ?? lt.current ?? At.current)?.focus({ preventScroll: !0 });
372
372
  }, [
373
- K,
374
- T,
375
- G,
376
- j,
377
- A,
378
- B,
379
- $,
380
- U,
381
- V
382
- ]), /* @__PURE__ */ b("div", {
383
- ref: $,
373
+ H,
374
+ w,
375
+ V,
376
+ O,
377
+ D,
378
+ I,
379
+ At,
380
+ z,
381
+ L
382
+ ]), /* @__PURE__ */ y("div", {
383
+ ref: At,
384
384
  tabIndex: -1,
385
385
  role: "region",
386
386
  "aria-label": x("conversations.title", "History"),
387
387
  className: "absolute inset-0 z-10 flex flex-col bg-bg-surface outline-none animate-in slide-in-from-left-2 fade-in duration-200",
388
388
  "data-testid": "conversation-list",
389
389
  children: [
390
- /* @__PURE__ */ b("div", {
390
+ ke ? /* @__PURE__ */ y("div", {
391
+ className: "flex items-center gap-1 border-b border-border-default bg-bg-elevated px-2 py-2",
392
+ children: [
393
+ /* @__PURE__ */ v("button", {
394
+ type: "button",
395
+ onClick: () => Oe ? Oe() : C(!1),
396
+ className: "flex size-10 shrink-0 items-center justify-center rounded-button text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
397
+ "aria-label": x("menuView.back", "Back"),
398
+ "data-testid": "collapse-conversation-list",
399
+ children: /* @__PURE__ */ v(pe, {
400
+ className: "size-5",
401
+ "aria-hidden": "true"
402
+ })
403
+ }),
404
+ /* @__PURE__ */ v("h2", {
405
+ className: "min-w-0 flex-1 truncate text-base font-semibold text-text-primary",
406
+ children: x("conversations.title", "History")
407
+ }),
408
+ /* @__PURE__ */ v("button", {
409
+ type: "button",
410
+ onClick: U,
411
+ className: "flex size-10 shrink-0 items-center justify-center rounded-button text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
412
+ "aria-label": x("conversations.new", "New conversation"),
413
+ "data-testid": "new-conversation",
414
+ children: /* @__PURE__ */ v(be, {
415
+ className: "size-5",
416
+ "aria-hidden": "true"
417
+ })
418
+ })
419
+ ]
420
+ }) : /* @__PURE__ */ y("div", {
391
421
  className: "flex items-center justify-between px-4 py-3 border-b border-border-default bg-bg-elevated",
392
- children: [/* @__PURE__ */ y("span", {
422
+ children: [/* @__PURE__ */ v("span", {
393
423
  className: "text-[13px] font-semibold text-text-primary",
394
424
  children: x("conversations.title", "History")
395
- }), /* @__PURE__ */ b("div", {
425
+ }), /* @__PURE__ */ y("div", {
396
426
  className: "flex items-center gap-0.5",
397
- children: [/* @__PURE__ */ y("button", {
427
+ children: [/* @__PURE__ */ v("button", {
398
428
  type: "button",
399
- onClick: Ye,
429
+ onClick: U,
400
430
  className: "p-1.5 rounded-lg text-text-secondary hover:bg-bg-sunken transition-colors",
401
431
  "aria-label": x("conversations.new", "New conversation"),
402
432
  "data-testid": "new-conversation",
403
- children: /* @__PURE__ */ y(ve, { className: "size-4" })
404
- }), /* @__PURE__ */ b("button", {
433
+ children: /* @__PURE__ */ v(be, { className: "size-4" })
434
+ }), /* @__PURE__ */ y("button", {
405
435
  type: "button",
406
- onClick: () => w(!1),
436
+ onClick: () => C(!1),
407
437
  className: "flex items-center gap-1 px-2 py-1.5 rounded-lg text-text-secondary hover:bg-bg-sunken transition-colors",
408
438
  "aria-label": x("conversations.collapse", "Collapse history"),
409
439
  "data-testid": "collapse-conversation-list",
410
- children: [/* @__PURE__ */ y(me, { className: "size-4" }), /* @__PURE__ */ y("span", {
440
+ children: [/* @__PURE__ */ v(ge, { className: "size-4" }), /* @__PURE__ */ v("span", {
411
441
  className: "text-[11px] font-medium",
412
442
  children: x("conversations.collapseLabel", "Collapse")
413
443
  })]
414
444
  })]
415
445
  })]
416
446
  }),
417
- k && Ie ? /* @__PURE__ */ y(f, {}) : null,
418
- k && Re ? /* @__PURE__ */ y(d, {
419
- limit: Re.limit,
420
- onDismiss: () => p.getState().notePinLimit(void 0)
447
+ E && We ? /* @__PURE__ */ v(d, {}) : null,
448
+ E && Ke ? /* @__PURE__ */ v(u, {
449
+ limit: Ke.limit,
450
+ onDismiss: () => f.getState().notePinLimit(void 0)
421
451
  }) : null,
422
- M ? /* @__PURE__ */ y(ae, {
423
- filter: F,
424
- onChange: We,
425
- count: Z,
426
- announce: Ve,
427
- search: /* @__PURE__ */ y(oe, {
428
- value: Ge,
429
- onChange: Ke,
430
- onSubmit: I.flush,
431
- notice: wt
452
+ k ? /* @__PURE__ */ v(oe, {
453
+ filter: j,
454
+ onChange: $e,
455
+ count: Q,
456
+ announce: Xe,
457
+ search: /* @__PURE__ */ v(se, {
458
+ value: et,
459
+ onChange: tt,
460
+ onSubmit: M.flush,
461
+ notice: Ot
432
462
  }),
433
- statusText: Ct
463
+ statusText: Dt
434
464
  }) : null,
435
- /* @__PURE__ */ y("div", {
465
+ /* @__PURE__ */ v("div", {
436
466
  className: "scrollbar-slim flex-1 overflow-y-auto",
437
- children: xt ? /* @__PURE__ */ b("div", {
467
+ children: Tt ? /* @__PURE__ */ y("div", {
438
468
  className: "flex flex-col items-center justify-center h-full text-center px-4",
439
469
  "data-testid": "history-empty",
440
470
  children: [
441
- /* @__PURE__ */ y(pe, { className: "size-6 text-text-muted mb-2" }),
442
- /* @__PURE__ */ y("p", {
471
+ /* @__PURE__ */ v(he, { className: "size-6 text-text-muted mb-2" }),
472
+ /* @__PURE__ */ v("p", {
443
473
  className: "text-xs text-text-muted",
444
- children: Tt
474
+ children: kt
445
475
  }),
446
- Q === null && !L ? /* @__PURE__ */ y("button", {
447
- ref: it,
476
+ $ === null && !N ? /* @__PURE__ */ v("button", {
477
+ ref: lt,
448
478
  type: "button",
449
- onClick: Ye,
479
+ onClick: U,
450
480
  className: "mt-2 text-xs text-action-primary-bg hover:underline",
451
481
  children: x("conversations.startNew", "Start a new conversation")
452
482
  }) : null
453
483
  ]
454
- }) : V ? /* @__PURE__ */ b("div", {
484
+ }) : L ? /* @__PURE__ */ y("div", {
455
485
  className: "py-1",
456
486
  "data-testid": "history-search-results",
457
- children: [V.server.length > 0 || H ? /* @__PURE__ */ b("section", {
487
+ children: [L.server.length > 0 || R ? /* @__PURE__ */ y("section", {
458
488
  "data-testid": "history-search-group-workspace",
459
489
  children: [
460
- X(x("history.groupWorkspace", "This workspace")),
461
- V.server.map(bt),
462
- H ? /* @__PURE__ */ y("button", {
463
- ref: rt,
490
+ Z(x("history.groupWorkspace", "This workspace")),
491
+ L.server.map(wt),
492
+ R ? /* @__PURE__ */ v("button", {
493
+ ref: ct,
464
494
  type: "button",
465
495
  onClick: () => {
466
- U || (q.current = {
496
+ z || (K.current = {
467
497
  kind: "more",
468
- before: K
469
- }), I.loadMore();
498
+ before: H
499
+ }), M.loadMore();
470
500
  },
471
501
  className: "mx-3 my-1 text-xs text-action-primary-bg hover:underline",
472
502
  "data-testid": "history-search-show-more",
473
503
  children: x("historySearch.showMore", "Show more results")
474
504
  }) : null
475
505
  ]
476
- }) : null, V.local.length > 0 || V.device.length > 0 ? /* @__PURE__ */ b("section", {
506
+ }) : null, L.local.length > 0 || L.device.length > 0 ? /* @__PURE__ */ y("section", {
477
507
  "data-testid": "history-search-group-device",
478
508
  children: [
479
- X(x("history.groupDevice", "On this device")),
480
- V.local.map(bt),
481
- V.device.map((e) => Y(e))
509
+ Z(x("history.groupDevice", "On this device")),
510
+ L.local.map(wt),
511
+ L.device.map((e) => X(e))
482
512
  ]
483
513
  }) : null]
484
- }) : B ? /* @__PURE__ */ b("div", {
514
+ }) : I ? /* @__PURE__ */ y("div", {
485
515
  className: "py-1",
486
- children: [B.workspace.length > 0 || G ? /* @__PURE__ */ b("section", {
516
+ children: [I.workspace.length > 0 || V ? /* @__PURE__ */ y("section", {
487
517
  "data-testid": "history-group-workspace",
488
518
  children: [
489
- X(x("history.groupWorkspace", "This workspace")),
490
- B.workspace.map(bt),
491
- G ? /* @__PURE__ */ y("button", {
492
- ref: nt,
519
+ Z(x("history.groupWorkspace", "This workspace")),
520
+ I.workspace.map(wt),
521
+ V ? /* @__PURE__ */ v("button", {
522
+ ref: st,
493
523
  type: "button",
494
524
  onClick: () => {
495
- q.current = {
525
+ K.current = {
496
526
  kind: "older",
497
- before: K
498
- }, h.loadOlderHeaders(qe);
527
+ before: H
528
+ }, m.loadOlderHeaders(nt);
499
529
  },
500
530
  className: "mx-3 my-1 text-xs text-action-primary-bg hover:underline",
501
531
  "data-testid": "history-show-older",
502
532
  children: x("history.showOlder", "Show older conversations")
503
533
  }) : null
504
534
  ]
505
- }) : null, B.device.length > 0 ? /* @__PURE__ */ b("section", {
535
+ }) : null, I.device.length > 0 ? /* @__PURE__ */ y("section", {
506
536
  "data-testid": "history-group-device",
507
- children: [X(x("history.groupDevice", "On this device")), B.device.map((e) => Y(e))]
537
+ children: [Z(x("history.groupDevice", "On this device")), I.device.map((e) => X(e))]
508
538
  }) : null]
509
- }) : /* @__PURE__ */ y("div", {
539
+ }) : /* @__PURE__ */ v("div", {
510
540
  className: "py-1",
511
- children: S.map((e) => Y(e))
541
+ children: S.map((e) => X(e))
512
542
  })
513
543
  })
514
544
  ]
515
545
  });
516
546
  };
517
547
  //#endregion
518
- export { x as AssistantConversationList };
548
+ export { De as AssistantConversationList };