@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.
- package/dist/shared/assistant/appControls/grammar.js +21 -21
- package/dist/shared/assistant/appControls/registry.js +1 -1
- package/dist/shared/assistant/commandCompletions.js +87 -86
- package/dist/shared/assistant/i18nManifest.d.ts +27 -0
- package/dist/shared/assistant/i18nManifest.js +27 -0
- package/dist/shared/assistant/index.d.ts +9 -0
- package/dist/shared/assistant/localUiCommands.js +106 -112
- package/dist/shared/assistant/localeCommands/languageNames.js +13 -13
- package/dist/shared/assistant/ui/AIAssistantPanel.d.ts +11 -0
- package/dist/shared/assistant/ui/AIAssistantPanel.js +233 -127
- package/dist/shared/assistant/ui/AssistantChatArea.d.ts +13 -1
- package/dist/shared/assistant/ui/AssistantChatArea.js +1632 -1605
- package/dist/shared/assistant/ui/AssistantConversationList.d.ts +17 -1
- package/dist/shared/assistant/ui/AssistantConversationList.js +304 -274
- package/dist/shared/assistant/ui/AssistantOverlay.d.ts +11 -0
- package/dist/shared/assistant/ui/AssistantOverlay.js +106 -90
- package/dist/shared/assistant/ui/closeGuard.d.ts +21 -0
- package/dist/shared/assistant/ui/closeGuard.js +8 -0
- package/dist/shared/assistant/ui/compact/AssistantCompactHeader.d.ts +38 -0
- package/dist/shared/assistant/ui/compact/AssistantCompactHeader.js +89 -0
- package/dist/shared/assistant/ui/compact/AssistantConversationMenu.d.ts +29 -0
- package/dist/shared/assistant/ui/compact/AssistantConversationMenu.js +87 -0
- package/dist/shared/assistant/ui/compact/AssistantDiscardDraftDialog.d.ts +19 -0
- package/dist/shared/assistant/ui/compact/AssistantDiscardDraftDialog.js +38 -0
- package/dist/shared/assistant/ui/compact/AssistantMenuView.d.ts +42 -0
- package/dist/shared/assistant/ui/compact/AssistantMenuView.js +285 -0
- package/dist/shared/assistant/ui/compact/AssistantVoiceLanguageSettings.d.ts +24 -0
- package/dist/shared/assistant/ui/compact/AssistantVoiceLanguageSettings.js +68 -0
- package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.d.ts +21 -0
- package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.js +34 -0
- package/dist/shared/assistant/ui/compact/compactChrome.d.ts +75 -0
- package/dist/shared/assistant/ui/compact/compactChrome.js +39 -0
- package/dist/shared/assistant/ui/compact/waitingChange.d.ts +49 -0
- package/dist/shared/assistant/ui/compact/waitingChange.js +12 -0
- package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +19 -18
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +261 -224
- package/dist/shared/assistant/useAssistantKeyboardShortcuts.d.ts +16 -2
- package/dist/shared/assistant/useAssistantKeyboardShortcuts.js +28 -16
- package/dist/shared-assistant.js +51 -42
- 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
|
|
6
|
-
import { getAssistantDisplayContent as
|
|
7
|
-
import { useOverlayFocus as
|
|
8
|
-
import { AssistantHistoryPinLimitBanner as
|
|
9
|
-
import { historyRowAcceptsControls as
|
|
10
|
-
import { useAssistantHistoryStatus as
|
|
11
|
-
import { useAssistantHistoryStore as
|
|
12
|
-
import { assistantHistory as
|
|
13
|
-
import { selectHistorySearchList as
|
|
14
|
-
import { useAssistantHistorySearch as
|
|
15
|
-
import { AssistantConversationFilters as
|
|
16
|
-
import { AssistantHistorySearchBox as
|
|
17
|
-
import { useEffect as
|
|
18
|
-
import { Archive as
|
|
19
|
-
import { Fragment as
|
|
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
|
|
21
|
+
var Ce = {
|
|
22
22
|
channel: "ANY",
|
|
23
23
|
pinned: null,
|
|
24
24
|
archived: "INCLUDE"
|
|
25
|
-
},
|
|
26
|
-
let c =
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
className:
|
|
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__ */
|
|
30
|
+
children: [/* @__PURE__ */ y("div", {
|
|
31
31
|
className: "flex items-center justify-between",
|
|
32
|
-
children: [/* @__PURE__ */
|
|
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":
|
|
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__ */
|
|
41
|
-
id:
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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":
|
|
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__ */
|
|
62
|
-
id:
|
|
61
|
+
}), /* @__PURE__ */ v("div", {
|
|
62
|
+
id: l,
|
|
63
63
|
children: r
|
|
64
64
|
})]
|
|
65
65
|
});
|
|
66
|
-
},
|
|
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
|
-
},
|
|
74
|
-
let x = t(), { modes:
|
|
75
|
-
|
|
76
|
-
}, [
|
|
77
|
-
text:
|
|
78
|
-
filter:
|
|
79
|
-
enabled:
|
|
80
|
-
scopeKey:
|
|
81
|
-
epoch:
|
|
82
|
-
}),
|
|
83
|
-
|
|
84
|
-
let
|
|
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:
|
|
87
|
-
headers:
|
|
88
|
-
olderHeaders:
|
|
89
|
-
tombstones:
|
|
90
|
-
loadingIds:
|
|
91
|
-
outbox:
|
|
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
|
-
|
|
98
|
-
Fe,
|
|
109
|
+
M.query,
|
|
99
110
|
P
|
|
100
|
-
]),
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
]
|
|
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
|
-
|
|
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
|
-
|
|
121
|
-
|
|
122
|
-
}, [
|
|
123
|
-
let
|
|
124
|
-
|
|
125
|
-
},
|
|
126
|
-
if (
|
|
127
|
-
|
|
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
|
-
|
|
132
|
-
},
|
|
133
|
-
t ?
|
|
134
|
-
},
|
|
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 ?
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
},
|
|
142
|
-
|
|
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:
|
|
145
|
-
}),
|
|
146
|
-
},
|
|
147
|
-
|
|
144
|
+
key: w
|
|
145
|
+
}), Re(null), T(!1);
|
|
146
|
+
}, pt = (e) => {
|
|
147
|
+
K.current = {
|
|
148
148
|
kind: "deleted",
|
|
149
149
|
key: e,
|
|
150
|
-
before:
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
|
|
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:
|
|
158
|
-
},
|
|
159
|
-
},
|
|
160
|
-
className:
|
|
161
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
164
|
-
ref:
|
|
163
|
+
children: [/* @__PURE__ */ v("input", {
|
|
164
|
+
ref: q,
|
|
165
165
|
"aria-label": x("conversations.renameLabel", "Conversation title"),
|
|
166
|
-
"aria-describedby":
|
|
167
|
-
value:
|
|
168
|
-
onChange: (e) =>
|
|
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(),
|
|
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__ */
|
|
176
|
+
}), /* @__PURE__ */ v("button", {
|
|
177
177
|
type: "button",
|
|
178
|
-
onClick:
|
|
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__ */
|
|
181
|
+
children: /* @__PURE__ */ v(me, { className: "size-3 text-status-success-text" })
|
|
182
182
|
})]
|
|
183
|
-
}), /* @__PURE__ */
|
|
184
|
-
id:
|
|
183
|
+
}), /* @__PURE__ */ v("p", {
|
|
184
|
+
id: He,
|
|
185
185
|
role: "status",
|
|
186
186
|
className: "text-[10px] text-text-muted",
|
|
187
|
-
children:
|
|
187
|
+
children: Ve ? x("conversations.titleLimit", "Titles are up to {{limit}} characters", { limit: 80 }) : ""
|
|
188
188
|
})]
|
|
189
|
-
}, e),
|
|
190
|
-
let t =
|
|
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:
|
|
195
|
-
onActivate: () =>
|
|
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__ */
|
|
201
|
-
onActivate: () =>
|
|
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:
|
|
207
|
-
onActivate: () =>
|
|
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__ */
|
|
213
|
-
onActivate: () =>
|
|
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
|
-
},
|
|
216
|
+
}, yt = (e) => [{
|
|
217
217
|
id: "rename",
|
|
218
218
|
label: x("conversations.rename", "Rename conversation"),
|
|
219
|
-
icon: /* @__PURE__ */
|
|
220
|
-
onActivate: () =>
|
|
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__ */
|
|
226
|
-
onActivate: () =>
|
|
225
|
+
icon: /* @__PURE__ */ v(xe, { className: "size-3 text-status-error-text" }),
|
|
226
|
+
onActivate: () => pt(e.id),
|
|
227
227
|
testId: "delete-conversation"
|
|
228
|
-
}],
|
|
229
|
-
let n = e.id ===
|
|
230
|
-
return r ?
|
|
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) ||
|
|
233
|
-
onOpen: () =>
|
|
234
|
-
openRef:
|
|
235
|
-
actionRef:
|
|
236
|
-
actions: t ? t.actions :
|
|
237
|
-
details: /* @__PURE__ */
|
|
238
|
-
/* @__PURE__ */
|
|
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__ */
|
|
242
|
-
className:
|
|
241
|
+
/* @__PURE__ */ v("span", {
|
|
242
|
+
className: Y,
|
|
243
243
|
children: i?.label ?? e.mode
|
|
244
244
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ v("span", {
|
|
246
246
|
className: "text-[10px] text-text-muted",
|
|
247
|
-
children:
|
|
247
|
+
children: ht(a.length)
|
|
248
248
|
}),
|
|
249
|
-
o.length > 0 ? /* @__PURE__ */
|
|
249
|
+
o.length > 0 ? /* @__PURE__ */ v("span", {
|
|
250
250
|
className: "text-[10px] text-text-muted",
|
|
251
251
|
"data-testid": "history-spoken-count",
|
|
252
|
-
children:
|
|
252
|
+
children: gt(o.length)
|
|
253
253
|
}) : null,
|
|
254
|
-
|
|
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:
|
|
256
|
+
children: u.status
|
|
257
257
|
}),
|
|
258
258
|
t?.badges
|
|
259
259
|
]
|
|
260
260
|
}),
|
|
261
261
|
t?.note,
|
|
262
|
-
|
|
262
|
+
d && /* @__PURE__ */ v("p", {
|
|
263
263
|
className: "text-[10px] text-text-muted truncate mt-0.5",
|
|
264
|
-
children:
|
|
264
|
+
children: d
|
|
265
265
|
}),
|
|
266
|
-
|
|
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
|
-
},
|
|
273
|
-
let t =
|
|
274
|
-
return /* @__PURE__ */
|
|
275
|
-
e.channel === "VOICE" ? /* @__PURE__ */
|
|
276
|
-
className:
|
|
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__ */
|
|
280
|
-
className:
|
|
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__ */
|
|
285
|
-
className: `${
|
|
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__ */
|
|
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__ */
|
|
293
|
-
className: `${
|
|
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__ */
|
|
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__ */
|
|
301
|
-
className:
|
|
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__ */
|
|
306
|
-
className:
|
|
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__ */
|
|
311
|
-
className:
|
|
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
|
-
},
|
|
317
|
-
let t =
|
|
318
|
-
return t === null ? null : /* @__PURE__ */
|
|
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
|
-
},
|
|
324
|
-
active: e.key ===
|
|
325
|
-
title: e.title ||
|
|
326
|
-
onOpen: () =>
|
|
327
|
-
openRef:
|
|
328
|
-
actionRef:
|
|
329
|
-
actions:
|
|
330
|
-
details: /* @__PURE__ */
|
|
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:
|
|
333
|
-
}),
|
|
332
|
+
children: xt(e)
|
|
333
|
+
}), St(e)] }),
|
|
334
334
|
testId: "history-server-row"
|
|
335
|
-
}, e.key),
|
|
336
|
-
title: e.title ||
|
|
337
|
-
badges:
|
|
338
|
-
note:
|
|
339
|
-
actions:
|
|
340
|
-
}) :
|
|
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
|
-
}),
|
|
344
|
-
return
|
|
345
|
-
|
|
346
|
-
}, [
|
|
347
|
-
let e =
|
|
348
|
-
if (!e || (e.kind === "deleted" ?
|
|
349
|
-
|
|
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" &&
|
|
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 =
|
|
355
|
-
else if (e.kind === "deleted") n = [...
|
|
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 =
|
|
357
|
+
let t = new Set(e.before), r = L?.server ?? [];
|
|
358
358
|
n = [
|
|
359
|
-
...
|
|
359
|
+
...H.filter((e) => !t.has(e)),
|
|
360
360
|
r[r.length - 1]?.key,
|
|
361
|
-
...
|
|
361
|
+
...H
|
|
362
362
|
];
|
|
363
363
|
} else {
|
|
364
|
-
let t =
|
|
364
|
+
let t = O && O.scopeKey === D ? O.headers : {}, r = new Set(e.before), i = I?.workspace ?? [];
|
|
365
365
|
n = [
|
|
366
|
-
...
|
|
366
|
+
...H.filter((e) => !r.has(e) && e in t),
|
|
367
367
|
i[i.length - 1]?.key,
|
|
368
|
-
...
|
|
368
|
+
...H
|
|
369
369
|
];
|
|
370
370
|
}
|
|
371
|
-
(r ?? n.map((e) => e === void 0 ? void 0 : e ===
|
|
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
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
]), /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
422
|
+
children: [/* @__PURE__ */ v("span", {
|
|
393
423
|
className: "text-[13px] font-semibold text-text-primary",
|
|
394
424
|
children: x("conversations.title", "History")
|
|
395
|
-
}), /* @__PURE__ */
|
|
425
|
+
}), /* @__PURE__ */ y("div", {
|
|
396
426
|
className: "flex items-center gap-0.5",
|
|
397
|
-
children: [/* @__PURE__ */
|
|
427
|
+
children: [/* @__PURE__ */ v("button", {
|
|
398
428
|
type: "button",
|
|
399
|
-
onClick:
|
|
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__ */
|
|
404
|
-
}), /* @__PURE__ */
|
|
433
|
+
children: /* @__PURE__ */ v(be, { className: "size-4" })
|
|
434
|
+
}), /* @__PURE__ */ y("button", {
|
|
405
435
|
type: "button",
|
|
406
|
-
onClick: () =>
|
|
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__ */
|
|
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
|
-
|
|
418
|
-
|
|
419
|
-
limit:
|
|
420
|
-
onDismiss: () =>
|
|
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
|
-
|
|
423
|
-
filter:
|
|
424
|
-
onChange:
|
|
425
|
-
count:
|
|
426
|
-
announce:
|
|
427
|
-
search: /* @__PURE__ */
|
|
428
|
-
value:
|
|
429
|
-
onChange:
|
|
430
|
-
onSubmit:
|
|
431
|
-
notice:
|
|
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:
|
|
463
|
+
statusText: Dt
|
|
434
464
|
}) : null,
|
|
435
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ v("div", {
|
|
436
466
|
className: "scrollbar-slim flex-1 overflow-y-auto",
|
|
437
|
-
children:
|
|
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__ */
|
|
442
|
-
/* @__PURE__ */
|
|
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:
|
|
474
|
+
children: kt
|
|
445
475
|
}),
|
|
446
|
-
|
|
447
|
-
ref:
|
|
476
|
+
$ === null && !N ? /* @__PURE__ */ v("button", {
|
|
477
|
+
ref: lt,
|
|
448
478
|
type: "button",
|
|
449
|
-
onClick:
|
|
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
|
-
}) :
|
|
484
|
+
}) : L ? /* @__PURE__ */ y("div", {
|
|
455
485
|
className: "py-1",
|
|
456
486
|
"data-testid": "history-search-results",
|
|
457
|
-
children: [
|
|
487
|
+
children: [L.server.length > 0 || R ? /* @__PURE__ */ y("section", {
|
|
458
488
|
"data-testid": "history-search-group-workspace",
|
|
459
489
|
children: [
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
ref:
|
|
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
|
-
|
|
496
|
+
z || (K.current = {
|
|
467
497
|
kind: "more",
|
|
468
|
-
before:
|
|
469
|
-
}),
|
|
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,
|
|
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
|
-
|
|
480
|
-
|
|
481
|
-
|
|
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
|
-
}) :
|
|
514
|
+
}) : I ? /* @__PURE__ */ y("div", {
|
|
485
515
|
className: "py-1",
|
|
486
|
-
children: [
|
|
516
|
+
children: [I.workspace.length > 0 || V ? /* @__PURE__ */ y("section", {
|
|
487
517
|
"data-testid": "history-group-workspace",
|
|
488
518
|
children: [
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
ref:
|
|
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
|
-
|
|
525
|
+
K.current = {
|
|
496
526
|
kind: "older",
|
|
497
|
-
before:
|
|
498
|
-
},
|
|
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,
|
|
535
|
+
}) : null, I.device.length > 0 ? /* @__PURE__ */ y("section", {
|
|
506
536
|
"data-testid": "history-group-device",
|
|
507
|
-
children: [
|
|
537
|
+
children: [Z(x("history.groupDevice", "On this device")), I.device.map((e) => X(e))]
|
|
508
538
|
}) : null]
|
|
509
|
-
}) : /* @__PURE__ */
|
|
539
|
+
}) : /* @__PURE__ */ v("div", {
|
|
510
540
|
className: "py-1",
|
|
511
|
-
children: S.map((e) =>
|
|
541
|
+
children: S.map((e) => X(e))
|
|
512
542
|
})
|
|
513
543
|
})
|
|
514
544
|
]
|
|
515
545
|
});
|
|
516
546
|
};
|
|
517
547
|
//#endregion
|
|
518
|
-
export {
|
|
548
|
+
export { De as AssistantConversationList };
|