@burdenoff/fe-libs 2026.1117.2 → 2026.1117.4
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/history/historyControls.d.ts +5 -0
- package/dist/shared/assistant/history/historyControls.js +9 -5
- package/dist/shared/assistant/home/AssistantHomeActions.d.ts +37 -0
- package/dist/shared/assistant/home/AssistantHomeActions.js +68 -0
- package/dist/shared/assistant/home/AssistantHomeComposer.d.ts +36 -0
- package/dist/shared/assistant/home/AssistantHomeComposer.js +85 -0
- package/dist/shared/assistant/home/AssistantHomeHistory.d.ts +106 -0
- package/dist/shared/assistant/home/AssistantHomeHistory.js +499 -0
- package/dist/shared/assistant/home/AssistantHomePage.d.ts +67 -0
- package/dist/shared/assistant/home/AssistantHomePage.js +78 -0
- package/dist/shared/assistant/home/AssistantHomeStart.d.ts +171 -0
- package/dist/shared/assistant/home/AssistantHomeStart.js +224 -0
- package/dist/shared/assistant/home/assistantHomeChat.d.ts +47 -0
- package/dist/shared/assistant/home/assistantHomeChat.js +49 -0
- package/dist/shared/assistant/home/assistantHomeHistoryRows.d.ts +93 -0
- package/dist/shared/assistant/home/assistantHomeHistoryRows.js +113 -0
- package/dist/shared/assistant/home/assistantHomeRoutes.d.ts +49 -0
- package/dist/shared/assistant/home/assistantHomeRoutes.js +48 -0
- package/dist/shared/assistant/home/assistantHomeTopBar.d.ts +4 -0
- package/dist/shared/assistant/home/assistantHomeTopBar.js +10 -0
- package/dist/shared/assistant/home/useAssistantHomeHistoryRows.d.ts +46 -0
- package/dist/shared/assistant/home/useAssistantHomeHistoryRows.js +120 -0
- package/dist/shared/assistant/home.d.ts +19 -0
- package/dist/shared/assistant/home.js +11 -0
- package/dist/shared/assistant/i18nManifest.d.ts +21 -1
- package/dist/shared/assistant/i18nManifest.js +22 -2
- package/dist/shared/assistant/index.d.ts +18 -0
- package/dist/shared/assistant/ui/AIAssistantPanel.js +195 -194
- package/dist/shared/assistant/ui/AssistantChatArea.js +1339 -1332
- package/dist/shared/assistant/ui/AssistantConversationList.js +44 -48
- package/dist/shared/assistant/ui/compact/AssistantLanguagePill.d.ts +12 -0
- package/dist/shared/assistant/ui/compact/AssistantLanguagePill.js +13 -14
- package/dist/shared/assistant/ui/compact/AssistantWindowHeader.d.ts +8 -2
- package/dist/shared/assistant/ui/compact/AssistantWindowHeader.js +45 -39
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcome.d.ts +44 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcome.js +110 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeCard.d.ts +29 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeCard.js +84 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeHero.d.ts +15 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeHero.js +64 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeSuggestions.d.ts +12 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeSuggestions.js +31 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeTips.d.ts +9 -0
- package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeTips.js +37 -0
- package/dist/shared/assistant/ui/compact/windowTitle.d.ts +15 -0
- package/dist/shared/assistant/ui/compact/windowTitle.js +13 -0
- package/dist/shared/assistant/ui/compact/windowWelcome.d.ts +136 -0
- package/dist/shared/assistant/ui/compact/windowWelcome.js +119 -0
- package/dist/shared/assistant/ui/compact/windowWelcomeHooks.d.ts +49 -0
- package/dist/shared/assistant/ui/compact/windowWelcomeHooks.js +70 -0
- package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.d.ts +3 -1
- package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.js +27 -26
- package/dist/shared-assistant.js +230 -212
- package/package.json +2 -1
- package/src/shared/tokens/tokens.css +523 -0
|
@@ -5,26 +5,22 @@ import { useAssistantTr as r } from "../i18n.js";
|
|
|
5
5
|
import { chatTurns as i, voiceTurnsOnly as a } from "../voice/turnVisibility.js";
|
|
6
6
|
import { getAssistantDisplayContent as ee } from "../displayContent.js";
|
|
7
7
|
import { assistantHistory as o } from "../history/historyEngine.js";
|
|
8
|
-
import {
|
|
9
|
-
import { historyRowAcceptsControls as
|
|
10
|
-
import { selectHistorySearchList as
|
|
11
|
-
import { useAssistantHistorySearch as
|
|
8
|
+
import { ALL_HISTORY_LIST_FILTER as s, DEFAULT_HISTORY_LIST_FILTER as c, clampToCodePoints as l, codePointLength as te, historyFilterEmptyKind as u, historyFilterKey as d } from "../history/historyControls.js";
|
|
9
|
+
import { historyRowAcceptsControls as ne, selectAssistantHistoryList as re } from "../history/historyList.js";
|
|
10
|
+
import { selectHistorySearchList as ie } from "../history/historySearch.js";
|
|
11
|
+
import { useAssistantHistorySearch as ae } from "../history/useAssistantHistorySearch.js";
|
|
12
12
|
import { useAssistantHistoryStatus as f } from "../history/historyStatus.js";
|
|
13
|
-
import { useAssistantHistoryStore as
|
|
14
|
-
import { AssistantHistoryPinLimitBanner as
|
|
15
|
-
import { AssistantConversationFilters as
|
|
16
|
-
import { AssistantHistorySearchBox as
|
|
17
|
-
import { PAGE_VIEW_GUTTER as
|
|
18
|
-
import { useEffect as
|
|
19
|
-
import { Archive as
|
|
13
|
+
import { useAssistantHistoryStore as oe } from "../history/historyStore.js";
|
|
14
|
+
import { AssistantHistoryPinLimitBanner as se, AssistantHistoryUnsavedDeleteNotice as ce } from "./AssistantHistoryNotices.js";
|
|
15
|
+
import { AssistantConversationFilters as le } from "./AssistantConversationFilters.js";
|
|
16
|
+
import { AssistantHistorySearchBox as ue } from "./AssistantHistorySearchBox.js";
|
|
17
|
+
import { PAGE_VIEW_GUTTER as de, useAssistantPageLayout as fe } from "./assistantPageLayout.js";
|
|
18
|
+
import { useEffect as pe, useId as me, useLayoutEffect as he, useMemo as p, useRef as m, useState as h } from "react";
|
|
19
|
+
import { Archive as ge, ArchiveRestore as _e, ArrowLeft as ve, Check as ye, MessageSquare as be, PanelLeftClose as xe, Pencil as Se, Pin as Ce, PinOff as we, Plus as Te, Trash2 as Ee } from "lucide-react";
|
|
20
20
|
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
21
21
|
// src/shared/assistant/ui/AssistantConversationList.tsx
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
pinned: null,
|
|
25
|
-
archived: "INCLUDE"
|
|
26
|
-
}, De = (e) => `group relative px-3 py-2 cursor-pointer hover:bg-bg-elevated transition-colors ${e ? "bg-bg-elevated border-s-2 border-action-primary-bg" : ""}`, Oe = ({ active: e, title: t, onOpen: n, details: r, actions: i, openRef: a, actionRef: ee, testId: o }) => {
|
|
27
|
-
let s = pe(), c = `${s}-title`, l = `${s}-details`;
|
|
22
|
+
var De = (e) => `group relative px-3 py-2 cursor-pointer hover:bg-bg-elevated transition-colors ${e ? "bg-bg-elevated border-s-2 border-action-primary-bg" : ""}`, Oe = ({ active: e, title: t, onOpen: n, details: r, actions: i, openRef: a, actionRef: ee, testId: o }) => {
|
|
23
|
+
let s = me(), c = `${s}-title`, l = `${s}-details`;
|
|
28
24
|
return /* @__PURE__ */ v("div", {
|
|
29
25
|
className: De(e),
|
|
30
26
|
"data-testid": o,
|
|
@@ -72,9 +68,9 @@ var Ee = {
|
|
|
72
68
|
}
|
|
73
69
|
return n;
|
|
74
70
|
}, Ae = ({ presentation: Ae, onBack: je, onDone: y }) => {
|
|
75
|
-
let b = r(), Me =
|
|
71
|
+
let b = r(), Me = fe(), Ne = Ae === "compact", { modes: Pe } = n(), { conversations: x, activeConversationId: S, processingByConversationId: Fe, setActiveConversation: Ie, setMode: Le, createConversation: Re, deleteConversation: ze, renameConversation: Be, setConversationListOpen: C } = t(), [w, Ve] = h(null), [He, Ue] = h(""), [We, T] = h(!1), Ge = me(), E = f((e) => e.product !== null), D = f((e) => e.scopeKey), Ke = f((e) => e.loadingIds), O = f((e) => e.olderHeaders), qe = f((e) => e.unsavedDelete !== void 0), Je = f((e) => e.controlsAvailable), k = E && Je, Ye = f((e) => e.pinLimit), A = oe((e) => D === null ? void 0 : e.scopes[D]), Xe = oe((e) => e.tombstones), j = oe((e) => e.outbox), [M, Ze] = h(c), [Qe, $e] = h(!1), et = k ? M : s, tt = (e) => {
|
|
76
72
|
Ze(e), $e(!0);
|
|
77
|
-
}, [nt, rt] = h(""), it = f((e) => e.epoch), N =
|
|
73
|
+
}, [nt, rt] = h(""), it = f((e) => e.epoch), N = ae({
|
|
78
74
|
text: nt,
|
|
79
75
|
filter: M,
|
|
80
76
|
enabled: k,
|
|
@@ -98,18 +94,18 @@ var Ee = {
|
|
|
98
94
|
Xe,
|
|
99
95
|
Ke,
|
|
100
96
|
j
|
|
101
|
-
]), L = p(() => E ?
|
|
97
|
+
]), L = p(() => E ? re(I, et) : null, [
|
|
102
98
|
E,
|
|
103
99
|
I,
|
|
104
100
|
et
|
|
105
|
-
]), R = p(() => E && P ?
|
|
101
|
+
]), R = p(() => E && P ? ie(I, M, N.query, F.status === "results" ? F.hits : null) : null, [
|
|
106
102
|
E,
|
|
107
103
|
P,
|
|
108
104
|
I,
|
|
109
105
|
M,
|
|
110
106
|
N.query,
|
|
111
107
|
F
|
|
112
|
-
]), z = F.status === "results" && F.hasMore, B = F.status === "results" && F.loadingMore, at = k ? M : void 0, ot =
|
|
108
|
+
]), z = F.status === "results" && F.hasMore, B = F.status === "results" && F.loadingMore, at = k ? M : void 0, ot = d(at), V = O && O.scopeKey === D ? O : void 0, H = V ? V.filterKey !== ot || V.hasMore : A?.hasOlderHeaders === !0, U = p(() => R ? [
|
|
113
109
|
...R.server.map((e) => e.key),
|
|
114
110
|
...R.local.map((e) => e.key),
|
|
115
111
|
...R.device.map((e) => e.id)
|
|
@@ -118,7 +114,7 @@ var Ee = {
|
|
|
118
114
|
L,
|
|
119
115
|
x
|
|
120
116
|
]);
|
|
121
|
-
|
|
117
|
+
pe(() => {
|
|
122
118
|
E && o.notePanelOpened();
|
|
123
119
|
}, [E]);
|
|
124
120
|
let W = () => {
|
|
@@ -136,9 +132,9 @@ var Ee = {
|
|
|
136
132
|
let r = `${e}\u0000${t}`;
|
|
137
133
|
n ? K.current.set(r, n) : K.current.delete(r);
|
|
138
134
|
}, q = m(null), J = m(null), ut = m(null), dt = m(null), ft = m(null), pt = (e, t) => {
|
|
139
|
-
Ve(e), Ue(
|
|
135
|
+
Ve(e), Ue(l(t, 80)), T(!1);
|
|
140
136
|
}, mt = (e) => {
|
|
141
|
-
Ue(
|
|
137
|
+
Ue(l(e, 80)), T(te(e) > 80);
|
|
142
138
|
}, ht = () => {
|
|
143
139
|
w && He.trim() && Be(w, He), w && (q.current = {
|
|
144
140
|
kind: "renamed",
|
|
@@ -179,7 +175,7 @@ var Ee = {
|
|
|
179
175
|
onClick: ht,
|
|
180
176
|
className: "p-1 hover:bg-bg-sunken rounded",
|
|
181
177
|
"aria-label": b("conversations.saveTitle", "Save title"),
|
|
182
|
-
children: /* @__PURE__ */ _(
|
|
178
|
+
children: /* @__PURE__ */ _(ye, { className: "size-3 text-status-success-text" })
|
|
183
179
|
})]
|
|
184
180
|
}), /* @__PURE__ */ _("p", {
|
|
185
181
|
id: Ge,
|
|
@@ -188,42 +184,42 @@ var Ee = {
|
|
|
188
184
|
children: We ? b("conversations.titleLimit", "Titles are up to {{limit}} characters", { limit: 80 }) : ""
|
|
189
185
|
})]
|
|
190
186
|
}, e), St = (e) => {
|
|
191
|
-
let t = k &&
|
|
187
|
+
let t = k && ne(e, j, D), n = e.pinnedAt !== null, r = e.archivedAt !== null, i = [];
|
|
192
188
|
return t && !r && i.push({
|
|
193
189
|
id: "pin",
|
|
194
190
|
label: n ? b("conversations.unpin", "Unpin conversation") : b("conversations.pin", "Pin conversation"),
|
|
195
|
-
icon: _(n ?
|
|
191
|
+
icon: _(n ? we : Ce, { className: "size-3 text-text-muted" }),
|
|
196
192
|
onActivate: () => _t(e.key, "pin", { pinned: !n }),
|
|
197
193
|
testId: "pin-conversation"
|
|
198
194
|
}), (e.conversation || t) && i.push({
|
|
199
195
|
id: "rename",
|
|
200
196
|
label: b("conversations.rename", "Rename conversation"),
|
|
201
|
-
icon: /* @__PURE__ */ _(
|
|
197
|
+
icon: /* @__PURE__ */ _(Se, { className: "size-3 text-text-muted" }),
|
|
202
198
|
onActivate: () => pt(e.key, e.title),
|
|
203
199
|
testId: "rename-conversation"
|
|
204
200
|
}), t && i.push({
|
|
205
201
|
id: "archive",
|
|
206
202
|
label: r ? b("conversations.unarchive", "Unarchive conversation") : b("conversations.archive", "Archive conversation"),
|
|
207
|
-
icon: _(r ?
|
|
203
|
+
icon: _(r ? _e : ge, { className: "size-3 text-text-muted" }),
|
|
208
204
|
onActivate: () => _t(e.key, "archive", { archived: !r }),
|
|
209
205
|
testId: "archive-conversation"
|
|
210
206
|
}), i.push({
|
|
211
207
|
id: "delete",
|
|
212
208
|
label: b("conversations.delete", "Delete conversation"),
|
|
213
|
-
icon: /* @__PURE__ */ _(
|
|
209
|
+
icon: /* @__PURE__ */ _(Ee, { className: "size-3 text-status-error-text" }),
|
|
214
210
|
onActivate: () => gt(e.key),
|
|
215
211
|
testId: "delete-conversation"
|
|
216
212
|
}), i;
|
|
217
213
|
}, Ct = (e) => [{
|
|
218
214
|
id: "rename",
|
|
219
215
|
label: b("conversations.rename", "Rename conversation"),
|
|
220
|
-
icon: /* @__PURE__ */ _(
|
|
216
|
+
icon: /* @__PURE__ */ _(Se, { className: "size-3 text-text-muted" }),
|
|
221
217
|
onActivate: () => pt(e.id, e.title),
|
|
222
218
|
testId: "rename-conversation"
|
|
223
219
|
}, {
|
|
224
220
|
id: "delete",
|
|
225
221
|
label: b("conversations.delete", "Delete conversation"),
|
|
226
|
-
icon: /* @__PURE__ */ _(
|
|
222
|
+
icon: /* @__PURE__ */ _(Ee, { className: "size-3 text-status-error-text" }),
|
|
227
223
|
onActivate: () => gt(e.id),
|
|
228
224
|
testId: "delete-conversation"
|
|
229
225
|
}], X = (e, t) => {
|
|
@@ -285,7 +281,7 @@ var Ee = {
|
|
|
285
281
|
e.pinnedAt === null ? null : /* @__PURE__ */ v("span", {
|
|
286
282
|
className: `${Y} inline-flex items-center gap-0.5`,
|
|
287
283
|
"data-testid": "history-badge-pinned",
|
|
288
|
-
children: [/* @__PURE__ */ _(
|
|
284
|
+
children: [/* @__PURE__ */ _(Ce, {
|
|
289
285
|
className: "size-2.5",
|
|
290
286
|
"aria-hidden": "true"
|
|
291
287
|
}), b("conversationList.badgePinned", "Pinned")]
|
|
@@ -293,7 +289,7 @@ var Ee = {
|
|
|
293
289
|
e.archivedAt === null ? null : /* @__PURE__ */ v("span", {
|
|
294
290
|
className: `${Y} inline-flex items-center gap-0.5`,
|
|
295
291
|
"data-testid": "history-badge-archived",
|
|
296
|
-
children: [/* @__PURE__ */ _(
|
|
292
|
+
children: [/* @__PURE__ */ _(ge, {
|
|
297
293
|
className: "size-2.5",
|
|
298
294
|
"aria-hidden": "true"
|
|
299
295
|
}), b("conversationList.badgeArchived", "Archived")]
|
|
@@ -341,10 +337,10 @@ var Ee = {
|
|
|
341
337
|
}) : Dt(e), Z = (e) => /* @__PURE__ */ _("h3", {
|
|
342
338
|
className: "px-3 pt-2 pb-1 text-[10px] font-semibold uppercase tracking-wide text-text-muted",
|
|
343
339
|
children: e
|
|
344
|
-
}), Q = R ? R.server.length + R.local.length + R.device.length : L ? L.workspace.length + L.device.length : x.length, kt = R ? Q === 0 && F.status !== "searching" && !z : L ? Q === 0 && !H : x.length === 0, At = (e) => e === 0 ? b("conversationFilters.none", "No conversations match") : e === 1 ? b("conversationFilters.countOne", "1 conversation") : b("conversationFilters.count", "{{count}} conversations", { count: e }), jt = P ? N.tooShort ? b("historySearch.tooShort", "Type 2 or more characters to search this workspace") : F.status === "searching" ? b("historySearch.searching", "Searching…") : At(Q) : void 0, Mt = P ? F.status === "fallback" ? F.reason === "busy" ? b("historySearch.busy", "Search is busy right now. Showing matches on this device.") : b("historySearch.failed", "Couldn't search this workspace. Showing matches on this device.") : F.status === "results" && F.moreFailed ? b("historySearch.moreFailed", "Couldn't load more results. Try again.") : "" : "", $ = k && !P ?
|
|
345
|
-
return
|
|
340
|
+
}), Q = R ? R.server.length + R.local.length + R.device.length : L ? L.workspace.length + L.device.length : x.length, kt = R ? Q === 0 && F.status !== "searching" && !z : L ? Q === 0 && !H : x.length === 0, At = (e) => e === 0 ? b("conversationFilters.none", "No conversations match") : e === 1 ? b("conversationFilters.countOne", "1 conversation") : b("conversationFilters.count", "{{count}} conversations", { count: e }), jt = P ? N.tooShort ? b("historySearch.tooShort", "Type 2 or more characters to search this workspace") : F.status === "searching" ? b("historySearch.searching", "Searching…") : At(Q) : void 0, Mt = P ? F.status === "fallback" ? F.reason === "busy" ? b("historySearch.busy", "Search is busy right now. Showing matches on this device.") : b("historySearch.failed", "Couldn't search this workspace. Showing matches on this device.") : F.status === "results" && F.moreFailed ? b("historySearch.moreFailed", "Couldn't load more results. Try again.") : "" : "", $ = k && !P ? u(M) : null, Nt = P ? At(0) : $ === "archived" ? b("conversationList.emptyArchived", "No archived conversations") : $ === "pinned" ? b("conversationList.emptyPinned", "No pinned conversations") : $ === "voice" ? b("conversationList.emptyVoice", "No voice conversations") : $ === "chat" ? b("conversationList.emptyChat", "No chat conversations") : b("conversations.empty", "No conversations yet"), Pt = e("assistant-open-history");
|
|
341
|
+
return he(() => {
|
|
346
342
|
w !== null && J.current?.focus({ preventScroll: !0 });
|
|
347
|
-
}, [w]),
|
|
343
|
+
}, [w]), he(() => {
|
|
348
344
|
let e = q.current;
|
|
349
345
|
if (!e || (e.kind === "deleted" ? U.includes(e.key) : e.kind === "renamed" ? w === e.key : e.kind !== "control" && (e.kind === "more" ? B : H))) return;
|
|
350
346
|
q.current = null;
|
|
@@ -385,7 +381,7 @@ var Ee = {
|
|
|
385
381
|
tabIndex: -1,
|
|
386
382
|
role: "region",
|
|
387
383
|
"aria-label": b("conversations.title", "History"),
|
|
388
|
-
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${Me ? ` ${
|
|
384
|
+
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${Me ? ` ${de}` : ""}`,
|
|
389
385
|
"data-testid": "conversation-list",
|
|
390
386
|
children: [
|
|
391
387
|
Ne ? /* @__PURE__ */ v("div", {
|
|
@@ -397,7 +393,7 @@ var Ee = {
|
|
|
397
393
|
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)]",
|
|
398
394
|
"aria-label": b("menuView.back", "Back"),
|
|
399
395
|
"data-testid": "collapse-conversation-list",
|
|
400
|
-
children: /* @__PURE__ */ _(
|
|
396
|
+
children: /* @__PURE__ */ _(ve, {
|
|
401
397
|
className: "size-5",
|
|
402
398
|
"aria-hidden": "true"
|
|
403
399
|
})
|
|
@@ -412,7 +408,7 @@ var Ee = {
|
|
|
412
408
|
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)]",
|
|
413
409
|
"aria-label": b("conversations.new", "New conversation"),
|
|
414
410
|
"data-testid": "new-conversation",
|
|
415
|
-
children: /* @__PURE__ */ _(
|
|
411
|
+
children: /* @__PURE__ */ _(Te, {
|
|
416
412
|
className: "size-5",
|
|
417
413
|
"aria-hidden": "true"
|
|
418
414
|
})
|
|
@@ -431,31 +427,31 @@ var Ee = {
|
|
|
431
427
|
className: "p-1.5 rounded-lg text-text-secondary hover:bg-bg-sunken transition-colors",
|
|
432
428
|
"aria-label": b("conversations.new", "New conversation"),
|
|
433
429
|
"data-testid": "new-conversation",
|
|
434
|
-
children: /* @__PURE__ */ _(
|
|
430
|
+
children: /* @__PURE__ */ _(Te, { className: "size-4" })
|
|
435
431
|
}), /* @__PURE__ */ v("button", {
|
|
436
432
|
type: "button",
|
|
437
433
|
onClick: () => C(!1),
|
|
438
434
|
className: "flex items-center gap-1 px-2 py-1.5 rounded-lg text-text-secondary hover:bg-bg-sunken transition-colors",
|
|
439
435
|
"aria-label": b("conversations.collapse", "Collapse history"),
|
|
440
436
|
"data-testid": "collapse-conversation-list",
|
|
441
|
-
children: [/* @__PURE__ */ _(
|
|
437
|
+
children: [/* @__PURE__ */ _(xe, { className: "size-4" }), /* @__PURE__ */ _("span", {
|
|
442
438
|
className: "text-[11px] font-medium",
|
|
443
439
|
children: b("conversations.collapseLabel", "Collapse")
|
|
444
440
|
})]
|
|
445
441
|
})]
|
|
446
442
|
})]
|
|
447
443
|
}),
|
|
448
|
-
E && qe ? /* @__PURE__ */ _(
|
|
449
|
-
E && Ye ? /* @__PURE__ */ _(
|
|
444
|
+
E && qe ? /* @__PURE__ */ _(ce, {}) : null,
|
|
445
|
+
E && Ye ? /* @__PURE__ */ _(se, {
|
|
450
446
|
limit: Ye.limit,
|
|
451
447
|
onDismiss: () => f.getState().notePinLimit(void 0)
|
|
452
448
|
}) : null,
|
|
453
|
-
k ? /* @__PURE__ */ _(
|
|
449
|
+
k ? /* @__PURE__ */ _(le, {
|
|
454
450
|
filter: M,
|
|
455
451
|
onChange: tt,
|
|
456
452
|
count: Q,
|
|
457
453
|
announce: Qe,
|
|
458
|
-
search: /* @__PURE__ */ _(
|
|
454
|
+
search: /* @__PURE__ */ _(ue, {
|
|
459
455
|
value: nt,
|
|
460
456
|
onChange: rt,
|
|
461
457
|
onSubmit: N.flush,
|
|
@@ -469,7 +465,7 @@ var Ee = {
|
|
|
469
465
|
className: "flex flex-col items-center justify-center h-full text-center px-4",
|
|
470
466
|
"data-testid": "history-empty",
|
|
471
467
|
children: [
|
|
472
|
-
/* @__PURE__ */ _(
|
|
468
|
+
/* @__PURE__ */ _(be, { className: "size-6 text-text-muted mb-2" }),
|
|
473
469
|
/* @__PURE__ */ _("p", {
|
|
474
470
|
className: "text-xs text-text-muted",
|
|
475
471
|
children: Nt
|
|
@@ -25,5 +25,17 @@ export interface AssistantLanguagePillProps {
|
|
|
25
25
|
* ★ While voice is live the pill is `aria-disabled`, not `disabled`: it stays in
|
|
26
26
|
* the Tab order, so a keyboard or screen-reader user reaches it and hears why
|
|
27
27
|
* (`aria-describedby`), and it cannot open.
|
|
28
|
+
*
|
|
29
|
+
* ★ BOFF-15066: a ghost button that SHOWS the short code ("EN"), with the glyph
|
|
30
|
+
* and a chevron from 24rem up and the code alone below it (the viewport, for the
|
|
31
|
+
* header's reason). It no longer grows (`flex-1` squeezed the window's name), and
|
|
32
|
+
* its NAME is still the full language, with the code it shows (WCAG 2.5.3:
|
|
33
|
+
* "Language: தமிழ் (TA)" contains the visible "TA"). Its menu is anchored to the
|
|
34
|
+
* header strip's end, so it stays inside the panel now that the button sits near
|
|
35
|
+
* the end.
|
|
36
|
+
*
|
|
37
|
+
* ★ So its PARENT must be positioned (`relative`): the menu is `absolute` and
|
|
38
|
+
* takes the nearest positioned ancestor as its box. `AssistantWindowHeader`'s
|
|
39
|
+
* strip is; a new host without one would anchor the menu to a distant ancestor.
|
|
28
40
|
*/
|
|
29
41
|
export declare const AssistantLanguagePill: FC<AssistantLanguagePillProps>;
|
|
@@ -30,12 +30,12 @@ var g = ({ voiceLive: g }) => {
|
|
|
30
30
|
};
|
|
31
31
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
32
32
|
}, [S]);
|
|
33
|
-
let A = _("window.language", "Language"), j = _("window.languageLocked", "Change the language after you end voice"),
|
|
33
|
+
let A = _("window.language", "Language"), j = (x.input.code.split("-")[0] ?? x.input.code).toUpperCase(), M = `${A}: ${x.input.label} (${j})`, N = _("window.languageLocked", "Change the language after you end voice"), P = !i(b) && x.reply.code !== x.input.code ? x.reply.label : null, F = (e) => {
|
|
34
34
|
C(!1), e && T.current?.focus({ preventScroll: !0 });
|
|
35
35
|
};
|
|
36
36
|
return /* @__PURE__ */ h("div", {
|
|
37
37
|
ref: w,
|
|
38
|
-
className: "
|
|
38
|
+
className: "shrink-0",
|
|
39
39
|
"data-testid": "assistant-window-language-root",
|
|
40
40
|
children: [
|
|
41
41
|
/* @__PURE__ */ h("button", {
|
|
@@ -44,26 +44,25 @@ var g = ({ voiceLive: g }) => {
|
|
|
44
44
|
onClick: () => {
|
|
45
45
|
g || C((e) => !e);
|
|
46
46
|
},
|
|
47
|
-
className: `flex h-10
|
|
47
|
+
className: `flex h-10 shrink-0 items-center gap-1 rounded-button px-1.5 text-[13px] font-semibold tracking-[0.02em] transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] ${g ? "cursor-default text-text-muted" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"}`,
|
|
48
48
|
"aria-expanded": S,
|
|
49
49
|
"aria-controls": S ? E : void 0,
|
|
50
50
|
"aria-disabled": g ? "true" : void 0,
|
|
51
51
|
"aria-describedby": g ? D : void 0,
|
|
52
|
-
"aria-label":
|
|
53
|
-
title: g ?
|
|
52
|
+
"aria-label": M,
|
|
53
|
+
title: g ? N : M,
|
|
54
54
|
"data-testid": "assistant-window-language",
|
|
55
55
|
children: [
|
|
56
56
|
/* @__PURE__ */ m(p, {
|
|
57
|
-
className: "size-4 shrink-0",
|
|
57
|
+
className: "size-4 shrink-0 max-[23.99rem]:hidden",
|
|
58
58
|
"aria-hidden": "true"
|
|
59
59
|
}),
|
|
60
60
|
/* @__PURE__ */ m("span", {
|
|
61
|
-
className: "min-w-0 truncate",
|
|
62
61
|
"data-testid": "assistant-window-language-name",
|
|
63
|
-
children:
|
|
62
|
+
children: j
|
|
64
63
|
}),
|
|
65
64
|
/* @__PURE__ */ m(f, {
|
|
66
|
-
className: "size-
|
|
65
|
+
className: "size-3.5 shrink-0 max-[23.99rem]:hidden",
|
|
67
66
|
"aria-hidden": "true"
|
|
68
67
|
})
|
|
69
68
|
]
|
|
@@ -72,22 +71,22 @@ var g = ({ voiceLive: g }) => {
|
|
|
72
71
|
id: D,
|
|
73
72
|
className: "sr-only",
|
|
74
73
|
"data-testid": "assistant-window-language-reason",
|
|
75
|
-
children:
|
|
74
|
+
children: N
|
|
76
75
|
}) : null,
|
|
77
76
|
S ? /* @__PURE__ */ m(e, {
|
|
78
77
|
onDismiss: () => {
|
|
79
|
-
|
|
78
|
+
F(!0);
|
|
80
79
|
},
|
|
81
80
|
children: /* @__PURE__ */ h("div", {
|
|
82
81
|
id: E,
|
|
83
82
|
role: "group",
|
|
84
83
|
"aria-label": A,
|
|
85
|
-
className: "absolute
|
|
84
|
+
className: "absolute end-2 top-full z-30 mt-1 w-72 max-w-[calc(100%-1rem)] overflow-hidden rounded-card border border-border-default bg-bg-elevated py-1 shadow-[var(--shadow-overlay)]",
|
|
86
85
|
"data-testid": "assistant-window-language-menu",
|
|
87
|
-
children: [/* @__PURE__ */ m(o, { inputOnly: !0 }),
|
|
86
|
+
children: [/* @__PURE__ */ m(o, { inputOnly: !0 }), P === null ? null : /* @__PURE__ */ m("p", {
|
|
88
87
|
className: "px-3 py-2 text-xs text-text-muted",
|
|
89
88
|
"data-testid": "assistant-window-language-pinned",
|
|
90
|
-
children: _("window.languagePinned", "Replies in {{language}} — change in full assistant", { language:
|
|
89
|
+
children: _("window.languagePinned", "Replies in {{language}} — change in full assistant", { language: P })
|
|
91
90
|
})]
|
|
92
91
|
})
|
|
93
92
|
}) : null
|
|
@@ -10,9 +10,15 @@ export interface AssistantWindowHeaderProps {
|
|
|
10
10
|
onMinimize: () => void;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* The Quick assistant window's header strip (BOFF-10178 Slice 3, BOFF-10180 S6):
|
|
13
|
+
* The Quick assistant window's header strip (BOFF-10178 Slice 3, BOFF-10180 S6, BOFF-15066):
|
|
14
14
|
*
|
|
15
|
-
* `[✦]
|
|
15
|
+
* `[✦] FluidGrids Assistant ………… [文A EN ▾] [Open full assistant] [Minimize]`
|
|
16
|
+
*
|
|
17
|
+
* ★ BOFF-15066 (operator-approved "Side slide" design, 17 Nov): 52 px tall over a subtle rule, the duo brand tile, the
|
|
18
|
+
* product's own name in full, and the language as a ghost button with its short code. The name is fitted beside the
|
|
19
|
+
* language button and both controls (15 px, else 14, else 13 px; the tile 26 px below 24rem): measured in Chromium, all of
|
|
20
|
+
* "FluidGrids/HealthyBowl/VibeControls/BigConsole Assistant" fit whole at 320 and 360 px
|
|
21
|
+
* (`scripts/assistant-welcome-browser-run.mjs`); `truncate`, with the full name as the tooltip, is only the last resort.
|
|
16
22
|
*
|
|
17
23
|
* ★ No view toggle: Chat | Avatar is the pill above the composer (`AssistantViewSwitch`), in the window and the full panel alike, and
|
|
18
24
|
* Slice 5's Chat | Voice toggle is gone with the Voice view (voice starts from the composer's wave button, as in the full panel).
|
|
@@ -1,62 +1,68 @@
|
|
|
1
1
|
import { useAssistantTr as e } from "../../i18n.js";
|
|
2
2
|
import { AssistantLanguagePill as t } from "./AssistantLanguagePill.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { fitAssistantWindowTitle as n, useAssistantWindowTitle as r } from "./windowTitle.js";
|
|
4
|
+
import { useLayoutEffect as i, useRef as a } from "react";
|
|
5
|
+
import { Minus as o, PanelRight as s, Sparkles as c } from "lucide-react";
|
|
6
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
7
|
// src/shared/assistant/ui/compact/AssistantWindowHeader.tsx
|
|
6
|
-
var
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
var d = "flex size-10 shrink-0 items-center justify-center rounded-button transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", f = "text-text-secondary hover:bg-bg-sunken hover:text-text-primary", p = ({ voiceLive: p, avatarOn: m, onOpenFull: h, onMinimize: g }) => {
|
|
9
|
+
let _ = e(), v = r(), y = a(null);
|
|
10
|
+
i(() => {
|
|
11
|
+
let e = y.current;
|
|
12
|
+
if (!e) return;
|
|
13
|
+
let t = () => n(e);
|
|
14
|
+
if (t(), typeof ResizeObserver > "u" || !e.parentElement) return;
|
|
15
|
+
let r = new ResizeObserver(t);
|
|
16
|
+
return r.observe(e.parentElement), () => r.disconnect();
|
|
17
|
+
}, [v]);
|
|
18
|
+
let b = _("window.openFull", "Open full assistant"), x = m ? _("window.openFullAvatarStays", "Open full assistant (the avatar stays on)") : b, S = m && p ? _("window.minimizeEndsAvatarAndVoice", "Minimize (turns off the avatar and ends voice)") : m ? _("window.minimizeTurnsOffAvatar", "Minimize (turns off the avatar)") : p ? _("window.minimizeEndsVoice", "Minimize (ends voice)") : _("window.minimize", "Minimize");
|
|
19
|
+
return /* @__PURE__ */ u("div", {
|
|
20
|
+
className: "relative flex h-[3.25rem] shrink-0 items-center gap-0.5 border-b border-border-subtle py-1.5 pe-1.5 ps-2.5",
|
|
10
21
|
"data-testid": "assistant-window-header",
|
|
11
22
|
"data-presentation": "compact",
|
|
12
23
|
"data-surface": "window",
|
|
13
24
|
children: [
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
className: "flex min-w-0 flex-1 items-center gap-
|
|
16
|
-
children: [/* @__PURE__ */
|
|
17
|
-
className: "flex size-
|
|
25
|
+
/* @__PURE__ */ u("div", {
|
|
26
|
+
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
27
|
+
children: [/* @__PURE__ */ l("span", {
|
|
28
|
+
className: "boff-accent-tile boff-accent-tile--duo flex size-7 shrink-0 items-center justify-center rounded-lg max-[23.99rem]:size-[1.625rem]",
|
|
18
29
|
"aria-hidden": "true",
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"aria-hidden": "true",
|
|
28
|
-
className: "hidden max-[23.99rem]:inline",
|
|
29
|
-
"data-testid": "assistant-window-title-short",
|
|
30
|
-
children: p("window.titleShort", "Quick")
|
|
31
|
-
})]
|
|
30
|
+
"data-testid": "assistant-window-mark",
|
|
31
|
+
children: /* @__PURE__ */ l(c, { className: "boff-twinkle size-4" })
|
|
32
|
+
}), /* @__PURE__ */ l("h2", {
|
|
33
|
+
ref: y,
|
|
34
|
+
className: "m-0 min-w-0 truncate text-[15px] font-semibold leading-5 tracking-[-0.012em] text-text-primary data-[tight]:text-sm data-[tighter]:text-[13px]",
|
|
35
|
+
title: v,
|
|
36
|
+
"data-testid": "assistant-window-title",
|
|
37
|
+
children: v
|
|
32
38
|
})]
|
|
33
39
|
}),
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ l(t, { voiceLive: p }),
|
|
41
|
+
/* @__PURE__ */ l("button", {
|
|
36
42
|
type: "button",
|
|
37
|
-
onClick: () =>
|
|
38
|
-
className: `${
|
|
39
|
-
"aria-label":
|
|
40
|
-
title:
|
|
43
|
+
onClick: () => h(),
|
|
44
|
+
className: `${d} ${f}`,
|
|
45
|
+
"aria-label": x,
|
|
46
|
+
title: b,
|
|
41
47
|
"data-testid": "assistant-open-full",
|
|
42
|
-
children: /* @__PURE__ */
|
|
43
|
-
className: "size-
|
|
48
|
+
children: /* @__PURE__ */ l(s, {
|
|
49
|
+
className: "size-[1.125rem]",
|
|
44
50
|
"aria-hidden": "true"
|
|
45
51
|
})
|
|
46
52
|
}),
|
|
47
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ l("button", {
|
|
48
54
|
type: "button",
|
|
49
|
-
onClick:
|
|
50
|
-
className: `${
|
|
51
|
-
"aria-label":
|
|
52
|
-
title:
|
|
55
|
+
onClick: g,
|
|
56
|
+
className: `${d} ${f}`,
|
|
57
|
+
"aria-label": S,
|
|
58
|
+
title: S,
|
|
53
59
|
"data-testid": "assistant-minimize",
|
|
54
|
-
children: /* @__PURE__ */
|
|
55
|
-
className: "size-
|
|
60
|
+
children: /* @__PURE__ */ l(o, {
|
|
61
|
+
className: "size-[1.125rem]",
|
|
56
62
|
"aria-hidden": "true"
|
|
57
63
|
})
|
|
58
64
|
})
|
|
59
65
|
]
|
|
60
66
|
});
|
|
61
67
|
};
|
|
62
|
-
export {
|
|
68
|
+
export { p as AssistantWindowHeader };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { AssistantIntent } from '../../autoRouting';
|
|
3
|
+
import { AssistantMode } from '../../types';
|
|
4
|
+
export interface AssistantWindowWelcomeProps {
|
|
5
|
+
/** The active mode (Auto's conversations are in its read mode). */
|
|
6
|
+
mode: AssistantMode;
|
|
7
|
+
/** Auto is in effect for this conversation: the chat area's `autoActive && mode === AUTO_READ_MODE`. */
|
|
8
|
+
auto: boolean;
|
|
9
|
+
/** The composer offers the voice conversation here (the same test that gives it its wave button). */
|
|
10
|
+
voiceOffered: boolean;
|
|
11
|
+
/** The Chat | Avatar switch is offered in this panel. */
|
|
12
|
+
avatarOffered: boolean;
|
|
13
|
+
/** A chip was picked: its DISPLAYED words, and (Auto only) the list it came from. */
|
|
14
|
+
onSuggestionClick: (suggestion: string, intent?: AssistantIntent) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The compact assistant's welcome (BOFF-15066): the operator-approved "Side slide" (design2/final-a).
|
|
18
|
+
* A time-of-day greeting with the person's first name over a soft two-hue glow, a line saying what
|
|
19
|
+
* the assistant can do here, and up to three tall cards side by side (Ask, Make a change, Tips). One
|
|
20
|
+
* card is always open; tapping a closed strip slides it wide while the open one folds into a strip.
|
|
21
|
+
*
|
|
22
|
+
* ★ COMPACT ONLY, and never on a page: the chat area renders it where `AssistantEmptyState` was, for
|
|
23
|
+
* `compact && !pageLayout` (the Quick window and the full compact panel). Classic and the page keep the
|
|
24
|
+
* empty state, untouched.
|
|
25
|
+
*
|
|
26
|
+
* ★ SAME ROUTING AS BEFORE. A chip sends its DISPLAYED (translated) words, and in Auto the list it came
|
|
27
|
+
* from (`intent`), through the chat area's own `handleSuggestionClick`, exactly as the empty state's
|
|
28
|
+
* chips did; only where the chips are drawn changed (`welcomeCards`).
|
|
29
|
+
*
|
|
30
|
+
* ★ NOTHING THAT IS NOT THERE. A card with nothing in it is not drawn (one card is no accordion, just its
|
|
31
|
+
* list); the approval is said only for a mode that holds each change for it; each Tips line only where
|
|
32
|
+
* its feature is (`welcomeTips`); "Connect a source" keeps its place in the first content card, by the
|
|
33
|
+
* same availability predicate as the attach menu's.
|
|
34
|
+
*
|
|
35
|
+
* ★ APG ACCORDION, horizontal. Each header is a button with `aria-expanded` and `aria-controls` (the open
|
|
36
|
+
* one `aria-disabled`: one card is always open); each panel a region labelled by its header, `inert`
|
|
37
|
+
* while closed. Arrows, Home and End move between headers; Enter and Space open (the button's own).
|
|
38
|
+
*
|
|
39
|
+
* ★ MOTION from the tokens only (tokens.css `boff-welcome-*`): the slide is `flex-grow`, the open content
|
|
40
|
+
* is laid out at its final width so the slide reveals it and never reflows it, the icon tile glides and
|
|
41
|
+
* never fades, so no card is ever an empty block mid-slide. All of it is instant under reduced motion
|
|
42
|
+
* (`usePrefersReducedMotion`: the OS setting AND the app's own), via `data-still`.
|
|
43
|
+
*/
|
|
44
|
+
export declare const AssistantWindowWelcome: FC<AssistantWindowWelcomeProps>;
|