@burdenoff/fe-libs 2026.927.1 → 2026.927.3
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/chrome/Footer.js +1 -1
- package/dist/shared/assistant/ui/AssistantConversationList.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantConversationList.js +244 -172
- package/dist/shared/config/productSlug.d.ts +6 -4
- package/dist/shared/config/productSlug.d.ts.map +1 -1
- package/dist/shared/config/productSlug.js +1 -1
- package/dist/shared/config/products.d.ts +2 -2
- package/dist/shared/config/products.js +1 -1
- package/package.json +1 -1
package/dist/chrome/Footer.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantConversationList.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantConversationList.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AssistantConversationList.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantConversationList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,EAAE,EAGR,MAAM,OAAO,CAAC;AAqKf;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,yBAAyB,EAAE,EAgkBvC,CAAC"}
|
|
@@ -9,264 +9,336 @@ import { selectAssistantHistoryList as s } from "../history/historyList.js";
|
|
|
9
9
|
import { useAssistantHistoryStatus as c } from "../history/historyStatus.js";
|
|
10
10
|
import { useAssistantHistoryStore as l } from "../history/historyStore.js";
|
|
11
11
|
import { assistantHistory as u } from "../history/historyEngine.js";
|
|
12
|
-
import { useEffect as d,
|
|
13
|
-
import { Check as
|
|
14
|
-
import { Fragment as
|
|
12
|
+
import { useEffect as d, useId as f, useLayoutEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
13
|
+
import { Check as ee, MessageSquare as te, PanelLeftClose as ne, Pencil as re, Plus as ie, Trash2 as _ } from "lucide-react";
|
|
14
|
+
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
15
15
|
//#region src/shared/assistant/ui/AssistantConversationList.tsx
|
|
16
|
-
var
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
var ae = (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" : ""}`, x = ({ active: e, title: t, onOpen: n, details: r, actions: i, openRef: a, testId: o }) => {
|
|
17
|
+
let s = f(), c = `${s}-title`, l = `${s}-details`;
|
|
18
|
+
return /* @__PURE__ */ b("div", {
|
|
19
|
+
className: ae(e),
|
|
20
|
+
"data-testid": o,
|
|
21
|
+
children: [/* @__PURE__ */ b("div", {
|
|
22
|
+
className: "flex items-center justify-between",
|
|
23
|
+
children: [/* @__PURE__ */ y("button", {
|
|
24
|
+
ref: a,
|
|
25
|
+
type: "button",
|
|
26
|
+
onClick: n,
|
|
27
|
+
"aria-current": e ? "true" : void 0,
|
|
28
|
+
"aria-describedby": l,
|
|
29
|
+
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)]",
|
|
30
|
+
"data-testid": "open-conversation",
|
|
31
|
+
children: /* @__PURE__ */ y("span", {
|
|
32
|
+
id: c,
|
|
33
|
+
className: "block text-xs font-medium text-text-primary truncate",
|
|
34
|
+
children: t
|
|
35
|
+
})
|
|
36
|
+
}), /* @__PURE__ */ y("div", {
|
|
37
|
+
className: "sr-only group-hover:not-sr-only group-focus-within:not-sr-only",
|
|
38
|
+
children: /* @__PURE__ */ y("div", {
|
|
39
|
+
className: "relative z-10 flex items-center gap-0.5 ml-1",
|
|
40
|
+
children: i.map((e) => /* @__PURE__ */ y("button", {
|
|
41
|
+
type: "button",
|
|
42
|
+
onClick: e.onActivate,
|
|
43
|
+
className: "p-0.5 hover:bg-bg-sunken rounded",
|
|
44
|
+
"aria-label": e.label,
|
|
45
|
+
"aria-describedby": c,
|
|
46
|
+
"data-testid": e.testId,
|
|
47
|
+
children: e.icon
|
|
48
|
+
}, e.label))
|
|
49
|
+
})
|
|
50
|
+
})]
|
|
51
|
+
}), /* @__PURE__ */ y("div", {
|
|
52
|
+
id: l,
|
|
53
|
+
children: r
|
|
54
|
+
})]
|
|
55
|
+
});
|
|
56
|
+
}, oe = (e, t) => {
|
|
57
|
+
let n = [];
|
|
58
|
+
for (let r = 1; r < e.length; r += 1) {
|
|
59
|
+
let i = e[t + r], a = t - r >= 0 ? e[t - r] : void 0;
|
|
60
|
+
i !== void 0 && n.push(i), a !== void 0 && n.push(a);
|
|
61
|
+
}
|
|
62
|
+
return n;
|
|
63
|
+
}, S = () => {
|
|
64
|
+
let f = t(), { modes: S } = e(), { conversations: C, activeConversationId: w, processingByConversationId: se, setActiveConversation: ce, setMode: le, createConversation: ue, deleteConversation: de, renameConversation: fe, setConversationListOpen: T } = r(), [E, D] = g(null), [O, k] = g(""), A = c((e) => e.product !== null), j = c((e) => e.scopeKey), M = c((e) => e.loadingIds), N = c((e) => e.olderHeaders), pe = c((e) => e.unsavedDelete !== void 0), P = l((e) => j === null ? void 0 : e.scopes[j]), F = l((e) => e.tombstones), I = m(() => A ? s({
|
|
65
|
+
conversations: C,
|
|
66
|
+
scopeKey: j,
|
|
67
|
+
headers: P?.headers ?? {},
|
|
68
|
+
olderHeaders: N && N.scopeKey === j ? N.headers : void 0,
|
|
69
|
+
tombstones: F,
|
|
70
|
+
loadingIds: M
|
|
24
71
|
}) : null, [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
]),
|
|
72
|
+
A,
|
|
73
|
+
C,
|
|
74
|
+
j,
|
|
75
|
+
P,
|
|
76
|
+
N,
|
|
77
|
+
F,
|
|
78
|
+
M
|
|
79
|
+
]), L = N && N.scopeKey === j ? N.hasMore : P?.hasOlderHeaders === !0, R = m(() => I ? [...I.workspace.map((e) => e.key), ...I.device.map((e) => e.id)] : C.map((e) => e.id), [I, C]);
|
|
33
80
|
d(() => {
|
|
34
|
-
|
|
35
|
-
}, [
|
|
36
|
-
let
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
if (
|
|
40
|
-
u.openConversation(e, { modes:
|
|
81
|
+
A && u.notePanelOpened();
|
|
82
|
+
}, [A]);
|
|
83
|
+
let z = () => {
|
|
84
|
+
ue(), T(!1);
|
|
85
|
+
}, B = (e) => {
|
|
86
|
+
if (A) {
|
|
87
|
+
u.openConversation(e, { modes: S }), T(!1);
|
|
41
88
|
return;
|
|
42
89
|
}
|
|
43
|
-
let t =
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
90
|
+
let t = C.find((t) => t.id === e);
|
|
91
|
+
ce(e), t && le(t.mode), T(!1);
|
|
92
|
+
}, V = h(/* @__PURE__ */ new Map()), H = (e) => (t) => {
|
|
93
|
+
t ? V.current.set(e, t) : V.current.delete(e);
|
|
94
|
+
}, U = h(null), W = h(null), G = h(null), K = h(null), me = (e, t) => {
|
|
95
|
+
D(e), k(t);
|
|
96
|
+
}, q = () => {
|
|
97
|
+
E && O.trim() && fe(E, O.trim()), E && (U.current = {
|
|
98
|
+
kind: "renamed",
|
|
99
|
+
key: E
|
|
100
|
+
}), D(null);
|
|
101
|
+
}, J = (e) => {
|
|
102
|
+
U.current = {
|
|
103
|
+
kind: "deleted",
|
|
104
|
+
key: e,
|
|
105
|
+
before: R
|
|
106
|
+
}, A ? u.deleteConversation(e) : de(e);
|
|
107
|
+
}, Y = f("history.untitled", "Untitled conversation"), X = (e, t) => {
|
|
108
|
+
let r = e.id === w, a = e.id === E, o = S.find((t) => t.id === e.mode), s = n(e.messages), c = s[s.length - 1], l = s.length === 0 && e.messages.length > 0, u = se[e.id], d = c ? i(c, u, f).text.slice(0, 60) : "";
|
|
109
|
+
return a ? /* @__PURE__ */ y("div", {
|
|
110
|
+
className: ae(r),
|
|
111
|
+
children: /* @__PURE__ */ b("div", {
|
|
62
112
|
className: "flex items-center gap-1",
|
|
63
|
-
children: [/* @__PURE__ */
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
113
|
+
children: [/* @__PURE__ */ y("input", {
|
|
114
|
+
ref: W,
|
|
115
|
+
"aria-label": f("conversations.renameLabel", "Conversation title"),
|
|
116
|
+
value: O,
|
|
117
|
+
onChange: (e) => k(e.target.value),
|
|
118
|
+
onKeyDown: (t) => {
|
|
119
|
+
t.key === "Enter" && (t.preventDefault(), q()), t.key === "Escape" && (t.preventDefault(), t.stopPropagation(), D(null), U.current = {
|
|
120
|
+
kind: "renamed",
|
|
121
|
+
key: e.id
|
|
122
|
+
});
|
|
69
123
|
},
|
|
70
|
-
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"
|
|
71
|
-
|
|
72
|
-
}), /* @__PURE__ */ x("button", {
|
|
124
|
+
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"
|
|
125
|
+
}), /* @__PURE__ */ y("button", {
|
|
73
126
|
type: "button",
|
|
74
|
-
onClick:
|
|
75
|
-
e.stopPropagation(), J();
|
|
76
|
-
},
|
|
127
|
+
onClick: q,
|
|
77
128
|
className: "p-1 hover:bg-bg-sunken rounded",
|
|
78
|
-
"aria-label":
|
|
79
|
-
children: /* @__PURE__ */
|
|
129
|
+
"aria-label": f("conversations.saveTitle", "Save title"),
|
|
130
|
+
children: /* @__PURE__ */ y(ee, { className: "size-3 text-status-success-text" })
|
|
80
131
|
})]
|
|
81
|
-
})
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
onClick: (t) => Y(t, e.id),
|
|
100
|
-
className: "p-0.5 hover:bg-bg-sunken rounded",
|
|
101
|
-
"aria-label": C("conversations.delete", "Delete conversation"),
|
|
102
|
-
"data-testid": "delete-conversation",
|
|
103
|
-
children: /* @__PURE__ */ x(y, { className: "size-3 text-status-error-text" })
|
|
104
|
-
})]
|
|
105
|
-
})]
|
|
106
|
-
}),
|
|
107
|
-
/* @__PURE__ */ S("div", {
|
|
132
|
+
})
|
|
133
|
+
}, e.id) : /* @__PURE__ */ y(x, {
|
|
134
|
+
active: r,
|
|
135
|
+
title: (t ? t.title : e.title) || Y,
|
|
136
|
+
onOpen: () => B(e.id),
|
|
137
|
+
openRef: H(e.id),
|
|
138
|
+
actions: [{
|
|
139
|
+
label: f("conversations.rename", "Rename conversation"),
|
|
140
|
+
icon: /* @__PURE__ */ y(re, { className: "size-3 text-text-muted" }),
|
|
141
|
+
onActivate: () => me(e.id, e.title)
|
|
142
|
+
}, {
|
|
143
|
+
label: f("conversations.delete", "Delete conversation"),
|
|
144
|
+
icon: /* @__PURE__ */ y(_, { className: "size-3 text-status-error-text" }),
|
|
145
|
+
onActivate: () => J(e.id),
|
|
146
|
+
testId: "delete-conversation"
|
|
147
|
+
}],
|
|
148
|
+
details: /* @__PURE__ */ b(v, { children: [
|
|
149
|
+
/* @__PURE__ */ b("div", {
|
|
108
150
|
className: "flex items-center gap-1.5 mt-0.5",
|
|
109
151
|
children: [
|
|
110
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ y("span", {
|
|
111
153
|
className: "text-[10px] text-text-muted px-1 py-0.5 bg-bg-sunken rounded",
|
|
112
154
|
children: o?.label ?? e.mode
|
|
113
155
|
}),
|
|
114
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ b("span", {
|
|
115
157
|
className: "text-[10px] text-text-muted",
|
|
116
158
|
children: [s.length, " msgs"]
|
|
117
159
|
}),
|
|
118
|
-
u && u.status !== "idle" && /* @__PURE__ */
|
|
160
|
+
u && u.status !== "idle" && /* @__PURE__ */ y("span", {
|
|
119
161
|
className: "text-[10px] text-action-primary-bg px-1 py-0.5 bg-bg-sunken rounded",
|
|
120
162
|
children: u.status
|
|
121
163
|
}),
|
|
122
164
|
t?.badges
|
|
123
165
|
]
|
|
124
166
|
}),
|
|
125
|
-
|
|
167
|
+
t?.note,
|
|
168
|
+
d && /* @__PURE__ */ y("p", {
|
|
126
169
|
className: "text-[10px] text-text-muted truncate mt-0.5",
|
|
127
170
|
children: d
|
|
128
171
|
}),
|
|
129
|
-
l && /* @__PURE__ */
|
|
172
|
+
l && /* @__PURE__ */ y("p", {
|
|
130
173
|
className: "text-[10px] text-text-muted truncate mt-0.5",
|
|
131
|
-
children:
|
|
174
|
+
children: f("conversationList.voiceOnly", "Spoken conversation")
|
|
132
175
|
})
|
|
133
176
|
] })
|
|
134
177
|
}, e.id);
|
|
135
|
-
}, Z = (e) => {
|
|
136
|
-
let t = "text-[10px] text-text-muted px-1 py-0.5 bg-bg-sunken rounded", n =
|
|
137
|
-
return /* @__PURE__ */
|
|
138
|
-
e.legacy ? /* @__PURE__ */
|
|
178
|
+
}, Z = (e) => e.blocked === "quota" ? f("history.notSavedQuota", "Not saved yet: this workspace has reached its conversation limit. It will be saved when there is room.") : e.blocked === "invalid" ? f("history.notSavedInvalid", "Part of this conversation couldn't be saved. It stays on this device.") : e.blocked === "scope" ? f("history.notSavedScope", "Some turns were sent from another workspace. They stay on this device.") : null, he = (e) => {
|
|
179
|
+
let t = "text-[10px] text-text-muted px-1 py-0.5 bg-bg-sunken rounded", n = Z(e);
|
|
180
|
+
return /* @__PURE__ */ b(v, { children: [
|
|
181
|
+
e.legacy ? /* @__PURE__ */ y("span", {
|
|
139
182
|
className: t,
|
|
140
183
|
"data-testid": "history-badge-read-only",
|
|
141
|
-
children:
|
|
184
|
+
children: f("history.badgeReadOnly", "Read-only")
|
|
142
185
|
}) : null,
|
|
143
|
-
n === null ? null : /* @__PURE__ */
|
|
186
|
+
n === null ? null : /* @__PURE__ */ y("span", {
|
|
144
187
|
className: t,
|
|
145
|
-
title: n,
|
|
146
188
|
"data-testid": "history-badge-not-saved",
|
|
147
|
-
children:
|
|
189
|
+
children: f("history.badgeNotSaved", "Not saved")
|
|
148
190
|
}),
|
|
149
|
-
e.loading ? /* @__PURE__ */
|
|
191
|
+
e.loading ? /* @__PURE__ */ y("span", {
|
|
150
192
|
className: t,
|
|
151
193
|
"data-testid": "history-badge-loading",
|
|
152
|
-
children:
|
|
194
|
+
children: f("history.badgeLoading", "Loading…")
|
|
153
195
|
}) : null
|
|
154
196
|
] });
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
className: "p-0.5 hover:bg-bg-sunken rounded",
|
|
175
|
-
"aria-label": C("conversations.delete", "Delete conversation"),
|
|
176
|
-
"data-testid": "delete-conversation",
|
|
177
|
-
children: /* @__PURE__ */ x(y, { className: "size-3 text-status-error-text" })
|
|
178
|
-
})
|
|
179
|
-
})]
|
|
180
|
-
}), /* @__PURE__ */ x("div", {
|
|
197
|
+
}, ge = (e) => {
|
|
198
|
+
let t = Z(e);
|
|
199
|
+
return t === null ? null : /* @__PURE__ */ y("p", {
|
|
200
|
+
className: "text-[10px] text-text-muted break-words mt-0.5",
|
|
201
|
+
"data-testid": "history-not-saved-reason",
|
|
202
|
+
children: t
|
|
203
|
+
});
|
|
204
|
+
}, _e = (e) => /* @__PURE__ */ y(x, {
|
|
205
|
+
active: e.key === w,
|
|
206
|
+
title: e.title || Y,
|
|
207
|
+
onOpen: () => B(e.key),
|
|
208
|
+
openRef: H(e.key),
|
|
209
|
+
actions: [{
|
|
210
|
+
label: f("conversations.delete", "Delete conversation"),
|
|
211
|
+
icon: /* @__PURE__ */ y(_, { className: "size-3 text-status-error-text" }),
|
|
212
|
+
onActivate: () => J(e.key),
|
|
213
|
+
testId: "delete-conversation"
|
|
214
|
+
}],
|
|
215
|
+
details: /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("div", {
|
|
181
216
|
className: "flex items-center gap-1.5 mt-0.5",
|
|
182
|
-
children:
|
|
183
|
-
})]
|
|
184
|
-
|
|
217
|
+
children: he(e)
|
|
218
|
+
}), ge(e)] }),
|
|
219
|
+
testId: "history-server-row"
|
|
220
|
+
}, e.key), Q = (e) => /* @__PURE__ */ y("h3", {
|
|
185
221
|
className: "px-3 pt-2 pb-1 text-[10px] font-semibold uppercase tracking-wide text-text-muted",
|
|
186
222
|
children: e
|
|
187
|
-
}),
|
|
188
|
-
return
|
|
189
|
-
|
|
223
|
+
}), ve = I ? I.workspace.length === 0 && I.device.length === 0 && !L : C.length === 0, $ = a("assistant-open-history");
|
|
224
|
+
return p(() => {
|
|
225
|
+
E !== null && W.current?.focus({ preventScroll: !0 });
|
|
226
|
+
}, [E]), p(() => {
|
|
227
|
+
let e = U.current;
|
|
228
|
+
if (!e || (e.kind === "deleted" ? R.includes(e.key) : e.kind === "renamed" ? E === e.key : L)) return;
|
|
229
|
+
U.current = null;
|
|
230
|
+
let t = document.activeElement;
|
|
231
|
+
if (t && t !== document.body) return;
|
|
232
|
+
let n;
|
|
233
|
+
if (e.kind === "renamed") n = [e.key];
|
|
234
|
+
else if (e.kind === "deleted") n = [...oe(e.before, e.before.indexOf(e.key)), ...R];
|
|
235
|
+
else {
|
|
236
|
+
let t = N && N.scopeKey === j ? N.headers : {}, r = new Set(e.before), i = I?.workspace ?? [];
|
|
237
|
+
n = [
|
|
238
|
+
...R.filter((e) => !r.has(e) && e in t),
|
|
239
|
+
i[i.length - 1]?.key,
|
|
240
|
+
...R
|
|
241
|
+
];
|
|
242
|
+
}
|
|
243
|
+
(n.map((e) => e === void 0 ? void 0 : e === E ? W.current ?? void 0 : V.current.get(e)).find((e) => e !== void 0) ?? G.current ?? K.current ?? $.current)?.focus({ preventScroll: !0 });
|
|
244
|
+
}, [
|
|
245
|
+
R,
|
|
246
|
+
E,
|
|
247
|
+
L,
|
|
248
|
+
N,
|
|
249
|
+
j,
|
|
250
|
+
I,
|
|
251
|
+
$
|
|
252
|
+
]), /* @__PURE__ */ b("div", {
|
|
253
|
+
ref: $,
|
|
190
254
|
tabIndex: -1,
|
|
191
255
|
role: "region",
|
|
192
|
-
"aria-label":
|
|
256
|
+
"aria-label": f("conversations.title", "History"),
|
|
193
257
|
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",
|
|
194
258
|
"data-testid": "conversation-list",
|
|
195
259
|
children: [
|
|
196
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ b("div", {
|
|
197
261
|
className: "flex items-center justify-between px-4 py-3 border-b border-border-default bg-bg-elevated",
|
|
198
|
-
children: [/* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ y("span", {
|
|
199
263
|
className: "text-[13px] font-semibold text-text-primary",
|
|
200
|
-
children:
|
|
201
|
-
}), /* @__PURE__ */
|
|
264
|
+
children: f("conversations.title", "History")
|
|
265
|
+
}), /* @__PURE__ */ b("div", {
|
|
202
266
|
className: "flex items-center gap-0.5",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
267
|
+
children: [/* @__PURE__ */ y("button", {
|
|
204
268
|
type: "button",
|
|
205
|
-
onClick:
|
|
269
|
+
onClick: z,
|
|
206
270
|
className: "p-1.5 rounded-lg text-text-secondary hover:bg-bg-sunken transition-colors",
|
|
207
|
-
"aria-label":
|
|
271
|
+
"aria-label": f("conversations.new", "New conversation"),
|
|
208
272
|
"data-testid": "new-conversation",
|
|
209
|
-
children: /* @__PURE__ */
|
|
210
|
-
}), /* @__PURE__ */
|
|
273
|
+
children: /* @__PURE__ */ y(ie, { className: "size-4" })
|
|
274
|
+
}), /* @__PURE__ */ b("button", {
|
|
211
275
|
type: "button",
|
|
212
|
-
onClick: () =>
|
|
276
|
+
onClick: () => T(!1),
|
|
213
277
|
className: "flex items-center gap-1 px-2 py-1.5 rounded-lg text-text-secondary hover:bg-bg-sunken transition-colors",
|
|
214
|
-
"aria-label":
|
|
278
|
+
"aria-label": f("conversations.collapse", "Collapse history"),
|
|
215
279
|
"data-testid": "collapse-conversation-list",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
280
|
+
children: [/* @__PURE__ */ y(ne, { className: "size-4" }), /* @__PURE__ */ y("span", {
|
|
217
281
|
className: "text-[11px] font-medium",
|
|
218
|
-
children:
|
|
282
|
+
children: f("conversations.collapseLabel", "Collapse")
|
|
219
283
|
})]
|
|
220
284
|
})]
|
|
221
285
|
})]
|
|
222
286
|
}),
|
|
223
|
-
|
|
224
|
-
/* @__PURE__ */
|
|
287
|
+
A && pe ? /* @__PURE__ */ y(o, {}) : null,
|
|
288
|
+
/* @__PURE__ */ y("div", {
|
|
225
289
|
className: "scrollbar-slim flex-1 overflow-y-auto",
|
|
226
|
-
children:
|
|
290
|
+
children: ve ? /* @__PURE__ */ b("div", {
|
|
227
291
|
className: "flex flex-col items-center justify-center h-full text-center px-4",
|
|
228
292
|
children: [
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ y(te, { className: "size-6 text-text-muted mb-2" }),
|
|
294
|
+
/* @__PURE__ */ y("p", {
|
|
231
295
|
className: "text-xs text-text-muted",
|
|
232
|
-
children:
|
|
296
|
+
children: f("conversations.empty", "No conversations yet")
|
|
233
297
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ y("button", {
|
|
299
|
+
ref: K,
|
|
235
300
|
type: "button",
|
|
236
|
-
onClick:
|
|
301
|
+
onClick: z,
|
|
237
302
|
className: "mt-2 text-xs text-action-primary-bg hover:underline",
|
|
238
|
-
children:
|
|
303
|
+
children: f("conversations.startNew", "Start a new conversation")
|
|
239
304
|
})
|
|
240
305
|
]
|
|
241
|
-
}) :
|
|
306
|
+
}) : I ? /* @__PURE__ */ b("div", {
|
|
242
307
|
className: "py-1",
|
|
243
|
-
children: [
|
|
308
|
+
children: [I.workspace.length > 0 || L ? /* @__PURE__ */ b("section", {
|
|
244
309
|
"data-testid": "history-group-workspace",
|
|
245
310
|
children: [
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
title: e.title ||
|
|
249
|
-
badges:
|
|
250
|
-
|
|
251
|
-
|
|
311
|
+
Q(f("history.groupWorkspace", "This workspace")),
|
|
312
|
+
I.workspace.map((e) => e.conversation ? X(e.conversation, {
|
|
313
|
+
title: e.title || Y,
|
|
314
|
+
badges: he(e),
|
|
315
|
+
note: ge(e)
|
|
316
|
+
}) : _e(e)),
|
|
317
|
+
L ? /* @__PURE__ */ y("button", {
|
|
318
|
+
ref: G,
|
|
252
319
|
type: "button",
|
|
253
|
-
onClick: () =>
|
|
320
|
+
onClick: () => {
|
|
321
|
+
U.current = {
|
|
322
|
+
kind: "older",
|
|
323
|
+
before: R
|
|
324
|
+
}, u.loadOlderHeaders();
|
|
325
|
+
},
|
|
254
326
|
className: "mx-3 my-1 text-xs text-action-primary-bg hover:underline",
|
|
255
327
|
"data-testid": "history-show-older",
|
|
256
|
-
children:
|
|
328
|
+
children: f("history.showOlder", "Show older conversations")
|
|
257
329
|
}) : null
|
|
258
330
|
]
|
|
259
|
-
}) : null,
|
|
331
|
+
}) : null, I.device.length > 0 ? /* @__PURE__ */ b("section", {
|
|
260
332
|
"data-testid": "history-group-device",
|
|
261
|
-
children: [
|
|
333
|
+
children: [Q(f("history.groupDevice", "On this device")), I.device.map((e) => X(e))]
|
|
262
334
|
}) : null]
|
|
263
|
-
}) : /* @__PURE__ */
|
|
335
|
+
}) : /* @__PURE__ */ y("div", {
|
|
264
336
|
className: "py-1",
|
|
265
|
-
children:
|
|
337
|
+
children: C.map((e) => X(e))
|
|
266
338
|
})
|
|
267
339
|
})
|
|
268
340
|
]
|
|
269
341
|
});
|
|
270
342
|
};
|
|
271
343
|
//#endregion
|
|
272
|
-
export {
|
|
344
|
+
export { S as AssistantConversationList };
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* - Readers accept both slugs: compare with {@link isSameProductSlug}, look up
|
|
6
6
|
* keyed maps with `map[slug] ?? map[legacyProductSlug(slug)]`.
|
|
7
|
-
* - Writers emit {@link emitProductSlug}, which follows {@link PRODUCT_SLUG_EMIT}
|
|
8
|
-
*
|
|
9
|
-
* one line plus a release.
|
|
7
|
+
* - Writers emit {@link emitProductSlug}, which follows {@link PRODUCT_SLUG_EMIT}
|
|
8
|
+
* (`"current"` since Stage 5a, so writers emit `botmanor`).
|
|
10
9
|
*
|
|
11
10
|
* Local mirror of `@burdenoff/website-sdk`'s `utils/product-slug.ts` (and the
|
|
12
11
|
* product-slug concern of `@burdenoff/be-sdk/product-alias`), so fe-libs does
|
|
@@ -21,7 +20,10 @@ export interface ProductSlugRename {
|
|
|
21
20
|
}
|
|
22
21
|
/** Every product slug rename in flight. */
|
|
23
22
|
export declare const PRODUCT_SLUG_RENAMES: readonly ProductSlugRename[];
|
|
24
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Which slug writers emit. Flipped to `'current'` at the rename's Stage 5a:
|
|
25
|
+
* the stored slugs are migrated to `botmanor`, and every reader accepts both.
|
|
26
|
+
*/
|
|
25
27
|
export declare const PRODUCT_SLUG_EMIT: Readonly<{
|
|
26
28
|
productSlug: 'legacy' | 'current';
|
|
27
29
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productSlug.d.ts","sourceRoot":"","sources":["../../../src/shared/config/productSlug.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"productSlug.d.ts","sourceRoot":"","sources":["../../../src/shared/config/productSlug.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,0EAA0E;AAC1E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,2CAA2C;AAC3C,eAAO,MAAM,oBAAoB,EAAE,SAAS,iBAAiB,EAE3D,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC;IAAE,WAAW,EAAE,QAAQ,GAAG,SAAS,CAAA;CAAE,CAE5E,CAAC;AAOH,iFAAiF;AACjF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,2FAA2F;AAC3F,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,mEAAmE;AACnE,wBAAgB,iBAAiB,CAC/B,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC5B,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC3B,OAAO,CAGT;AAED,+DAA+D;AAC/D,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIpD"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var e = Object.freeze([Object.freeze({
|
|
3
3
|
legacy: "botlit",
|
|
4
4
|
current: "botmanor"
|
|
5
|
-
})]), t = Object.freeze({ productSlug: "
|
|
5
|
+
})]), t = Object.freeze({ productSlug: "current" });
|
|
6
6
|
function n(t) {
|
|
7
7
|
let n = t.toLowerCase();
|
|
8
8
|
return e.find((e) => e.legacy === n || e.current === n);
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* @module @burdenoff/fe-libs/shared/config/products
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* BotManor's product id (slug)
|
|
8
|
-
*
|
|
7
|
+
* BotManor's product id (slug): `botmanor` since the rename's Stage 5a
|
|
8
|
+
* (`PRODUCT_SLUG_EMIT`). Lookups still accept the legacy `botlit`.
|
|
9
9
|
*/
|
|
10
10
|
export declare const BOTMANOR_PRODUCT_SLUG: string;
|
|
11
11
|
export interface ProductConfig {
|