@burdenoff/fe-libs 2026.1116.7 → 2026.1117.1
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/contextSwitcher/OrganizationList.js +1 -1
- package/dist/chrome/contextSwitcher/ProjectList.js +2 -2
- package/dist/chrome/contextSwitcher/WorkspaceList.js +1 -1
- package/dist/shared/assistant/i18nManifest.d.ts +4 -0
- package/dist/shared/assistant/i18nManifest.js +4 -0
- package/dist/shared/assistant/ui/AIAssistantPanel.js +115 -112
- package/dist/shared/assistant/ui/AssistantDeleteConversationDialog.d.ts +12 -0
- package/dist/shared/assistant/ui/AssistantDeleteConversationDialog.js +34 -34
- package/dist/shared/assistant/ui/compact/AssistantConversationMenu.d.ts +3 -0
- package/dist/shared/assistant/ui/compact/AssistantConversationMenu.js +104 -87
- package/dist/shared/assistant/ui/compact/AssistantPageBar.d.ts +15 -0
- package/dist/shared/assistant/ui/compact/AssistantPageBar.js +7 -7
- package/dist/shared/assistant/ui/conversationDeleteDialog.d.ts +6 -0
- package/dist/shared/assistant/ui/conversationDeleteDialog.js +26 -25
- package/dist/shared/pages/LegalPage.js +1 -1
- package/dist/shared/providers/shell/ThemeProvider.js +2 -2
- package/dist/shared-assistant.js +22 -22
- package/dist/ui/guidance.js +3 -3
- package/dist/ui/icon-tile.js +1 -1
- package/package.json +5 -1
- package/src/shared/styles/depth-theme.css +23 -0
- package/src/shared/tokens/depth.css +143 -19
|
@@ -9,61 +9,62 @@ import { useAssistantTr as m } from "../../i18n.js";
|
|
|
9
9
|
import { useAssistantStore as h } from "../../store.js";
|
|
10
10
|
import { voiceTurnsOnly as g } from "../../voice/turnVisibility.js";
|
|
11
11
|
import { AssistantRenameConversationDialog as _ } from "../AssistantRenameConversationDialog.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
12
|
+
import { useAssistantPageLayout as v } from "../assistantPageLayout.js";
|
|
13
|
+
import { assistantHistoryIsOn as y } from "../conversationDelete.js";
|
|
14
|
+
import { useConversationDeleteDialog as b } from "../conversationDeleteDialog.js";
|
|
15
|
+
import { ASSISTANT_PAGE_BAR_ICON_BUTTON as x } from "./AssistantPageBar.js";
|
|
16
|
+
import { useCallback as S, useRef as C, useState as w, useSyncExternalStore as T } from "react";
|
|
17
|
+
import { FileJson as E, FileText as D, Mic as O, MoreHorizontal as k, Pencil as A, Pin as j, PinOff as M, Trash2 as N } from "lucide-react";
|
|
18
|
+
import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
18
19
|
// src/shared/assistant/ui/compact/AssistantConversationMenu.tsx
|
|
19
|
-
var
|
|
20
|
+
var L = "min-h-11 gap-2.5 px-3", R = {
|
|
20
21
|
icon: {
|
|
21
22
|
button: "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)]",
|
|
22
23
|
icon: "size-5"
|
|
23
24
|
},
|
|
24
25
|
bar: {
|
|
25
|
-
button:
|
|
26
|
+
button: x,
|
|
26
27
|
icon: "size-4"
|
|
27
28
|
}
|
|
28
29
|
};
|
|
29
|
-
function
|
|
30
|
-
let { tr: t, pin: i, onRename: a, onTogglePin: o } = e, s = i?.pinned ?
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
className:
|
|
30
|
+
function z(e) {
|
|
31
|
+
let { tr: t, pin: i, onRename: a, onTogglePin: o } = e, s = i?.pinned ? M : j;
|
|
32
|
+
return /* @__PURE__ */ I(P, { children: [
|
|
33
|
+
/* @__PURE__ */ I(n, {
|
|
34
|
+
className: L,
|
|
34
35
|
onSelect: a,
|
|
35
36
|
"data-testid": "assistant-more-rename",
|
|
36
|
-
children: [/* @__PURE__ */
|
|
37
|
+
children: [/* @__PURE__ */ F(A, {
|
|
37
38
|
className: "size-4 shrink-0 text-text-secondary",
|
|
38
39
|
"aria-hidden": "true"
|
|
39
40
|
}), t("conversationMenu.rename", "Rename")]
|
|
40
41
|
}),
|
|
41
|
-
i ? /* @__PURE__ */
|
|
42
|
-
className:
|
|
42
|
+
i ? /* @__PURE__ */ I(n, {
|
|
43
|
+
className: L,
|
|
43
44
|
onSelect: o,
|
|
44
45
|
"data-testid": "assistant-more-pin",
|
|
45
46
|
"data-pinned": i.pinned ? "true" : "false",
|
|
46
|
-
children: [/* @__PURE__ */
|
|
47
|
+
children: [/* @__PURE__ */ F(s, {
|
|
47
48
|
className: "size-4 shrink-0 text-text-secondary",
|
|
48
49
|
"aria-hidden": "true"
|
|
49
50
|
}), i.pinned ? t("conversationMenu.unpin", "Unpin") : t("conversationMenu.pin", "Pin")]
|
|
50
51
|
}) : null,
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ F(r, {})
|
|
52
53
|
] });
|
|
53
54
|
}
|
|
54
|
-
function
|
|
55
|
-
let { managed: t, activeConversationId: n, conversations: r, onOpenChange: i, onDeleteConfirmed: o } = e, s =
|
|
55
|
+
function B(e) {
|
|
56
|
+
let { managed: t, activeConversationId: n, conversations: r, onOpenChange: i, onDeleteConfirmed: o } = e, s = b(), c = t && s !== null && l({
|
|
56
57
|
spoken: !1,
|
|
57
58
|
bound: null,
|
|
58
59
|
activeConversationId: n,
|
|
59
60
|
conversations: r,
|
|
60
|
-
historyOn:
|
|
61
|
-
}) !== null, [u, d] =
|
|
61
|
+
historyOn: y()
|
|
62
|
+
}) !== null, [u, d] = w(null), f = h((e) => u === null || e.conversations.some((e) => e.id === u.conversationId)), p = C(null), m = S((e, t) => {
|
|
62
63
|
p.current = {
|
|
63
64
|
kind: e,
|
|
64
65
|
conversationId: t
|
|
65
66
|
};
|
|
66
|
-
}, []), g =
|
|
67
|
+
}, []), g = S((e) => {
|
|
67
68
|
let t = h.getState(), n = t.conversations.find((t) => t.id === e.conversationId);
|
|
68
69
|
if (!n) return;
|
|
69
70
|
if (e.kind === "rename") {
|
|
@@ -80,24 +81,24 @@ function z(e) {
|
|
|
80
81
|
bound: null,
|
|
81
82
|
activeConversationId: n.id,
|
|
82
83
|
conversations: t.conversations,
|
|
83
|
-
historyOn:
|
|
84
|
+
historyOn: y()
|
|
84
85
|
});
|
|
85
86
|
r && s?.request(r, { onConfirmed: o });
|
|
86
|
-
}, [s, o]),
|
|
87
|
+
}, [s, o]), v = S((e) => {
|
|
87
88
|
let t = p.current;
|
|
88
89
|
p.current = null, t ? g(t) : a(document) || e.preventDefault();
|
|
89
|
-
}, [g]),
|
|
90
|
+
}, [g]), x = S((e) => {
|
|
90
91
|
e && (p.current = null), i(e);
|
|
91
|
-
}, [i]), T =
|
|
92
|
+
}, [i]), T = S(() => d((e) => e && {
|
|
92
93
|
...e,
|
|
93
94
|
open: !1
|
|
94
95
|
}), []);
|
|
95
96
|
return {
|
|
96
97
|
choose: m,
|
|
97
98
|
deleteOffered: c,
|
|
98
|
-
onCloseAutoFocus:
|
|
99
|
-
onOpenChange:
|
|
100
|
-
dialogs: u ? /* @__PURE__ */
|
|
99
|
+
onCloseAutoFocus: v,
|
|
100
|
+
onOpenChange: x,
|
|
101
|
+
dialogs: u ? /* @__PURE__ */ F(_, {
|
|
101
102
|
open: u.open && f,
|
|
102
103
|
title: u.title,
|
|
103
104
|
onSave: (e) => {
|
|
@@ -107,102 +108,118 @@ function z(e) {
|
|
|
107
108
|
}, u.opening) : null
|
|
108
109
|
};
|
|
109
110
|
}
|
|
110
|
-
var
|
|
111
|
-
let
|
|
112
|
-
managed:
|
|
113
|
-
activeConversationId:
|
|
114
|
-
conversations:
|
|
111
|
+
var V = ({ open: a, onOpenChange: l, triggerRef: _, manage: y = !1, onDeleteConfirmed: b, triggerLook: x = "icon" }) => {
|
|
112
|
+
let S = m(), { conversations: C, activeConversationId: w, processingByConversationId: A } = h(), j = C.find((e) => e.id === w), M = !!(j && j.messages.length > 0), V = T(c, () => s("assistant.transcript"), () => !1), H = !!(j && g(j.messages).length > 0), U = V && H, W = v(), G = (y || W) && j !== void 0 && !H, K = y && j !== void 0, q = p(K ? j : void 0), J = B({
|
|
113
|
+
managed: K,
|
|
114
|
+
activeConversationId: w,
|
|
115
|
+
conversations: C,
|
|
115
116
|
onOpenChange: l,
|
|
116
|
-
onDeleteConfirmed:
|
|
117
|
-
}),
|
|
118
|
-
if (!
|
|
119
|
-
let { content: t, filename: n, mimeType: r } = d(
|
|
120
|
-
processing:
|
|
121
|
-
tr:
|
|
117
|
+
onDeleteConfirmed: b
|
|
118
|
+
}), Y = R[x], X = (e) => {
|
|
119
|
+
if (!j) return;
|
|
120
|
+
let { content: t, filename: n, mimeType: r } = d(j, e, {
|
|
121
|
+
processing: A[j.id],
|
|
122
|
+
tr: S
|
|
122
123
|
});
|
|
123
124
|
u(t, n, r);
|
|
124
|
-
},
|
|
125
|
+
}, ee = () => {
|
|
125
126
|
o("assistant.transcript")?.run();
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
},
|
|
127
|
+
}, Z = (e) => {
|
|
128
|
+
j && J.choose(e, j.id);
|
|
129
|
+
}, te = () => {
|
|
130
|
+
j && q && f.updateConversation(j.id, { pinned: !q.pinned });
|
|
131
|
+
}, Q = S("header.conversationOptions", "Conversation options"), $ = /* @__PURE__ */ I(e, {
|
|
131
132
|
open: a,
|
|
132
|
-
onOpenChange:
|
|
133
|
+
onOpenChange: J.onOpenChange,
|
|
133
134
|
modal: !1,
|
|
134
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ F(i, {
|
|
135
136
|
asChild: !0,
|
|
136
|
-
children: /* @__PURE__ */
|
|
137
|
+
children: /* @__PURE__ */ F("button", {
|
|
137
138
|
ref: _,
|
|
138
139
|
type: "button",
|
|
139
|
-
"aria-label":
|
|
140
|
-
title:
|
|
141
|
-
className:
|
|
140
|
+
"aria-label": Q,
|
|
141
|
+
title: Q,
|
|
142
|
+
className: Y.button,
|
|
142
143
|
"data-testid": "assistant-more",
|
|
143
|
-
children: /* @__PURE__ */
|
|
144
|
-
className:
|
|
144
|
+
children: /* @__PURE__ */ F(k, {
|
|
145
|
+
className: Y.icon,
|
|
145
146
|
"aria-hidden": "true"
|
|
146
147
|
})
|
|
147
148
|
})
|
|
148
|
-
}), /* @__PURE__ */
|
|
149
|
+
}), /* @__PURE__ */ I(t, {
|
|
149
150
|
align: "end",
|
|
150
151
|
sideOffset: 4,
|
|
151
152
|
collisionPadding: 8,
|
|
152
|
-
onCloseAutoFocus:
|
|
153
|
+
onCloseAutoFocus: J.onCloseAutoFocus,
|
|
153
154
|
className: "min-w-56 max-w-[calc(100vw-2rem)] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto",
|
|
154
155
|
"data-testid": "assistant-more-menu",
|
|
155
156
|
children: [
|
|
156
|
-
|
|
157
|
-
tr:
|
|
158
|
-
pin:
|
|
159
|
-
onRename: () =>
|
|
160
|
-
onTogglePin:
|
|
157
|
+
K ? z({
|
|
158
|
+
tr: S,
|
|
159
|
+
pin: q,
|
|
160
|
+
onRename: () => Z("rename"),
|
|
161
|
+
onTogglePin: te
|
|
161
162
|
}) : null,
|
|
162
|
-
|
|
163
|
-
className:
|
|
164
|
-
onSelect: () =>
|
|
163
|
+
M ? /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ I(n, {
|
|
164
|
+
className: L,
|
|
165
|
+
onSelect: () => X("markdown"),
|
|
165
166
|
"data-testid": "export-markdown",
|
|
166
|
-
children: [/* @__PURE__ */
|
|
167
|
+
children: [/* @__PURE__ */ F(D, {
|
|
167
168
|
className: "size-4 shrink-0 text-text-secondary",
|
|
168
169
|
"aria-hidden": "true"
|
|
169
|
-
}),
|
|
170
|
-
}), /* @__PURE__ */
|
|
171
|
-
className:
|
|
172
|
-
onSelect: () =>
|
|
170
|
+
}), S("export.markdown", "Export as Markdown")]
|
|
171
|
+
}), /* @__PURE__ */ I(n, {
|
|
172
|
+
className: L,
|
|
173
|
+
onSelect: () => X("json"),
|
|
173
174
|
"data-testid": "export-json",
|
|
174
|
-
children: [/* @__PURE__ */
|
|
175
|
+
children: [/* @__PURE__ */ F(E, {
|
|
175
176
|
className: "size-4 shrink-0 text-text-secondary",
|
|
176
177
|
"aria-hidden": "true"
|
|
177
|
-
}),
|
|
178
|
+
}), S("export.json", "Export as JSON")]
|
|
178
179
|
})] }) : null,
|
|
179
|
-
|
|
180
|
-
className:
|
|
181
|
-
onSelect:
|
|
180
|
+
U ? /* @__PURE__ */ I(n, {
|
|
181
|
+
className: L,
|
|
182
|
+
onSelect: ee,
|
|
182
183
|
"data-testid": "assistant-more-voice-transcript",
|
|
183
|
-
children: [/* @__PURE__ */
|
|
184
|
+
children: [/* @__PURE__ */ F(O, {
|
|
184
185
|
className: "size-4 shrink-0 text-text-secondary",
|
|
185
186
|
"aria-hidden": "true"
|
|
186
|
-
}),
|
|
187
|
+
}), S("conversationMenu.voiceTranscript", "Voice transcript")]
|
|
188
|
+
}) : null,
|
|
189
|
+
G ? /* @__PURE__ */ I(n, {
|
|
190
|
+
disabled: !0,
|
|
191
|
+
className: `${L} text-text-secondary`,
|
|
192
|
+
"data-testid": "assistant-more-voice-transcript-pending",
|
|
193
|
+
children: [
|
|
194
|
+
/* @__PURE__ */ F(O, {
|
|
195
|
+
className: "size-4 shrink-0",
|
|
196
|
+
"aria-hidden": "true"
|
|
197
|
+
}),
|
|
198
|
+
S("conversationMenu.voiceTranscript", "Voice transcript"),
|
|
199
|
+
/* @__PURE__ */ F("span", {
|
|
200
|
+
className: "text-xs text-text-muted",
|
|
201
|
+
children: S("conversationMenu.voiceTranscriptPending", "(after you talk in this chat)")
|
|
202
|
+
})
|
|
203
|
+
]
|
|
187
204
|
}) : null,
|
|
188
|
-
!
|
|
205
|
+
!M && !U ? /* @__PURE__ */ F(n, {
|
|
189
206
|
disabled: !0,
|
|
190
|
-
className: `${
|
|
207
|
+
className: `${L} text-text-secondary`,
|
|
191
208
|
"data-testid": "assistant-more-empty",
|
|
192
|
-
children:
|
|
209
|
+
children: S("conversationMenu.empty", "Nothing to export yet")
|
|
193
210
|
}) : null,
|
|
194
|
-
|
|
195
|
-
className: `${
|
|
196
|
-
onSelect: () =>
|
|
211
|
+
J.deleteOffered ? /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(r, {}), /* @__PURE__ */ I(n, {
|
|
212
|
+
className: `${L} text-status-error-text focus:text-status-error-text`,
|
|
213
|
+
onSelect: () => Z("delete"),
|
|
197
214
|
"data-testid": "assistant-more-delete",
|
|
198
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ F(N, {
|
|
199
216
|
className: "size-4 shrink-0",
|
|
200
217
|
"aria-hidden": "true"
|
|
201
|
-
}),
|
|
218
|
+
}), S("conversationMenu.delete", "Delete chat")]
|
|
202
219
|
})] }) : null
|
|
203
220
|
]
|
|
204
221
|
})]
|
|
205
222
|
});
|
|
206
|
-
return
|
|
223
|
+
return y ? /* @__PURE__ */ I(P, { children: [$, J.dialogs] }) : $;
|
|
207
224
|
};
|
|
208
|
-
export {
|
|
225
|
+
export { V as AssistantConversationMenu };
|
|
@@ -23,4 +23,19 @@ export declare const ASSISTANT_PAGE_BAR_BUTTON = "inline-flex shrink-0 items-cen
|
|
|
23
23
|
* touch target; from `sm`, 32 px, the height of the page's `size="sm"` buttons beside it.
|
|
24
24
|
*/
|
|
25
25
|
export declare const ASSISTANT_PAGE_BAR_ICON_BUTTON = "inline-flex shrink-0 items-center justify-center rounded-button border border-border-default bg-bg-surface text-text-primary transition-colors hover:border-border-strong hover:bg-action-secondary-bg data-[state=open]:bg-bg-sunken aria-pressed:bg-action-primary-bg/15 aria-pressed:text-action-primary-bg focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] size-10 sm:size-8";
|
|
26
|
+
/**
|
|
27
|
+
* BOFF-15057: a labelled control in that group (the page's History and New chat) that is icon-only
|
|
28
|
+
* below `sm`, so a phone's bar keeps ONE row: its icon in the 40 px square of
|
|
29
|
+
* `ASSISTANT_PAGE_BAR_ICON_BUTTON`, its words from `sm` at the `size="sm"` height. Give its words
|
|
30
|
+
* `ASSISTANT_PAGE_BAR_LABEL`. With fe-libs `Button size="sm"`, `size-10` takes the place of its
|
|
31
|
+
* `h-8` below `sm` (tailwind-merge), and it is as before from `sm`. On a 320 px phone the row then
|
|
32
|
+
* holds four 40 px controls (History, New chat, the preview toggle, ⋯) with 132 px to spare.
|
|
33
|
+
*/
|
|
34
|
+
export declare const ASSISTANT_PAGE_BAR_LABELLED_BUTTON = "inline-flex shrink-0 items-center justify-center rounded-button border border-border-default bg-bg-surface text-text-primary transition-colors hover:border-border-strong hover:bg-action-secondary-bg data-[state=open]:bg-bg-sunken aria-pressed:bg-action-primary-bg/15 aria-pressed:text-action-primary-bg focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] size-10 gap-1.5 sm:h-8 sm:w-auto sm:px-3";
|
|
35
|
+
/**
|
|
36
|
+
* BOFF-15057: the words of an `ASSISTANT_PAGE_BAR_LABELLED_BUTTON`: visually hidden below `sm`,
|
|
37
|
+
* still its accessible name there (never `hidden`, which would leave the button unnamed), shown
|
|
38
|
+
* from `sm`.
|
|
39
|
+
*/
|
|
40
|
+
export declare const ASSISTANT_PAGE_BAR_LABEL = "sr-only sm:not-sr-only";
|
|
26
41
|
export declare const AssistantPageBar: FC<AssistantPageBarProps>;
|
|
@@ -5,20 +5,20 @@ import { AssistantPageBarActionsSlot as r, useAssistantPageBarActionsOffered as
|
|
|
5
5
|
import { Eye as a } from "lucide-react";
|
|
6
6
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
7
|
// src/shared/assistant/ui/compact/AssistantPageBar.tsx
|
|
8
|
-
var c = "min-h-12 shrink-0 items-center justify-end gap-1 px-2 py-1 sm:px-3", l = "inline-flex shrink-0 items-center justify-center rounded-button border border-border-default bg-bg-surface text-text-primary transition-colors hover:border-border-strong hover:bg-action-secondary-bg data-[state=open]:bg-bg-sunken aria-pressed:bg-action-primary-bg/15 aria-pressed:text-action-primary-bg focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", u = `${l} size-10 sm:size-8`, 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)]",
|
|
8
|
+
var c = "min-h-12 shrink-0 items-center justify-end gap-1 px-2 py-1 sm:px-3", l = "inline-flex shrink-0 items-center justify-center rounded-button border border-border-default bg-bg-surface text-text-primary transition-colors hover:border-border-strong hover:bg-action-secondary-bg data-[state=open]:bg-bg-sunken aria-pressed:bg-action-primary-bg/15 aria-pressed:text-action-primary-bg focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", u = `${l} size-10 sm:size-8`, d = `${l} size-10 gap-1.5 sm:h-8 sm:w-auto sm:px-3`, f = "sr-only sm:not-sr-only", p = "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)]", m = "text-text-secondary hover:bg-bg-sunken hover:text-text-primary", h = "bg-action-primary-bg/15 text-action-primary-bg", g = "flex min-w-0 flex-wrap items-center justify-end gap-1", _ = ({ conversationMenu: l, onTogglePreview: d, previewOpen: f }) => {
|
|
9
9
|
let _ = e(), v = t(), y = i();
|
|
10
10
|
return /* @__PURE__ */ s("div", {
|
|
11
11
|
className: `flex ${c}`,
|
|
12
12
|
"data-testid": "assistant-page-bar",
|
|
13
13
|
"data-presentation": "page",
|
|
14
14
|
children: [
|
|
15
|
-
y ? /* @__PURE__ */ o(r, { className:
|
|
16
|
-
n(v) &&
|
|
15
|
+
y ? /* @__PURE__ */ o(r, { className: g }) : null,
|
|
16
|
+
n(v) && d ? /* @__PURE__ */ o("button", {
|
|
17
17
|
type: "button",
|
|
18
|
-
onClick:
|
|
19
|
-
className: y ? u : `${
|
|
18
|
+
onClick: d,
|
|
19
|
+
className: y ? u : `${p} ${f ? h : m}`,
|
|
20
20
|
"aria-label": v.label ?? _("header.preview", "Preview"),
|
|
21
|
-
"aria-pressed": !!
|
|
21
|
+
"aria-pressed": !!f,
|
|
22
22
|
"data-testid": "assistant-toggle-preview",
|
|
23
23
|
children: /* @__PURE__ */ o(a, {
|
|
24
24
|
className: y ? "size-4" : "size-5",
|
|
@@ -29,4 +29,4 @@ var c = "min-h-12 shrink-0 items-center justify-end gap-1 px-2 py-1 sm:px-3", l
|
|
|
29
29
|
]
|
|
30
30
|
});
|
|
31
31
|
};
|
|
32
|
-
export { l as ASSISTANT_PAGE_BAR_BUTTON, u as ASSISTANT_PAGE_BAR_ICON_BUTTON, c as ASSISTANT_PAGE_BAR_ROW,
|
|
32
|
+
export { l as ASSISTANT_PAGE_BAR_BUTTON, u as ASSISTANT_PAGE_BAR_ICON_BUTTON, f as ASSISTANT_PAGE_BAR_LABEL, d as ASSISTANT_PAGE_BAR_LABELLED_BUTTON, c as ASSISTANT_PAGE_BAR_ROW, _ as AssistantPageBar };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
import { ConversationDeleteTarget } from '../conversationDeleteCommand';
|
|
3
|
+
import { AssistantDeleteConversationWording } from './AssistantDeleteConversationDialog';
|
|
3
4
|
/** What a caller of the Delete confirmation may add (BOFF-15028). */
|
|
4
5
|
export interface ConversationDeleteRequestOptions {
|
|
5
6
|
/**
|
|
@@ -35,7 +36,12 @@ export declare function useConversationDeleteDialog(): ConversationDeleteDialogC
|
|
|
35
36
|
* ★ A target that goes while it is open — deleted on another device, in
|
|
36
37
|
* another tab, or here by the list — closes it: there is nothing left to
|
|
37
38
|
* confirm, and a confirm must never delete whatever took its place.
|
|
39
|
+
*
|
|
40
|
+
* ★ BOFF-15057: `wording` is the confirmation's words for every opening, whoever asks (⋯ or the
|
|
41
|
+
* typed command), so one panel never asks the same thing in two ways. The panel passes `chat`
|
|
42
|
+
* while the hosting page lets ⋯ manage the chat; absent, the words of before.
|
|
38
43
|
*/
|
|
39
44
|
export declare const AssistantConversationDeleteDialogProvider: FC<{
|
|
40
45
|
children: ReactNode;
|
|
46
|
+
wording?: AssistantDeleteConversationWording;
|
|
41
47
|
}>;
|
|
@@ -9,46 +9,47 @@ var f = i(null);
|
|
|
9
9
|
function p() {
|
|
10
10
|
return o(f);
|
|
11
11
|
}
|
|
12
|
-
var m = ({ children: i }) => {
|
|
13
|
-
let
|
|
12
|
+
var m = ({ children: i, wording: o }) => {
|
|
13
|
+
let p = e(), [m, h] = l({
|
|
14
14
|
target: null,
|
|
15
15
|
open: !1,
|
|
16
16
|
opening: 0
|
|
17
|
-
}),
|
|
18
|
-
|
|
17
|
+
}), g = a((e, t) => {
|
|
18
|
+
h((n) => ({
|
|
19
19
|
target: e,
|
|
20
20
|
open: !0,
|
|
21
21
|
opening: n.opening + 1,
|
|
22
22
|
...t?.onConfirmed ? { onConfirmed: t.onConfirmed } : {}
|
|
23
23
|
}));
|
|
24
|
-
}, []),
|
|
25
|
-
|
|
24
|
+
}, []), _ = a(() => {
|
|
25
|
+
h((e) => e.open ? {
|
|
26
26
|
...e,
|
|
27
27
|
open: !1
|
|
28
28
|
} : e);
|
|
29
|
-
}, []),
|
|
29
|
+
}, []), v = m.open ? m.target?.conversationId : void 0, y = t((e) => v === void 0 || e.conversations.some((e) => e.id === v));
|
|
30
30
|
s(() => {
|
|
31
|
-
|
|
32
|
-
}, [
|
|
33
|
-
let
|
|
34
|
-
let { target: e, open: n, onConfirmed: i } =
|
|
31
|
+
y || _();
|
|
32
|
+
}, [y, _]);
|
|
33
|
+
let b = a(() => {
|
|
34
|
+
let { target: e, open: n, onConfirmed: i } = m;
|
|
35
35
|
if (!n || !e) return;
|
|
36
36
|
let a = t.getState().conversations.some((t) => t.id === e.conversationId);
|
|
37
|
-
|
|
38
|
-
}, [
|
|
39
|
-
request:
|
|
40
|
-
asking:
|
|
41
|
-
}), [
|
|
37
|
+
_(), a && (i?.(), r(e.conversationId));
|
|
38
|
+
}, [m, _]), x = m.open && y, S = c(() => ({
|
|
39
|
+
request: g,
|
|
40
|
+
asking: x
|
|
41
|
+
}), [g, x]);
|
|
42
42
|
return /* @__PURE__ */ d(f.Provider, {
|
|
43
|
-
value:
|
|
44
|
-
children: [i,
|
|
45
|
-
open:
|
|
46
|
-
title:
|
|
47
|
-
synced:
|
|
48
|
-
tr:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
value: S,
|
|
44
|
+
children: [i, m.target ? /* @__PURE__ */ u(n, {
|
|
45
|
+
open: x,
|
|
46
|
+
title: m.target.title,
|
|
47
|
+
synced: m.target.synced,
|
|
48
|
+
tr: p,
|
|
49
|
+
...o ? { wording: o } : {},
|
|
50
|
+
onConfirm: b,
|
|
51
|
+
onDismiss: _
|
|
52
|
+
}, m.opening) : null]
|
|
52
53
|
});
|
|
53
54
|
};
|
|
54
55
|
export { m as AssistantConversationDeleteDialogProvider, p as useConversationDeleteDialog };
|
|
@@ -133,7 +133,7 @@ function h({ productId: f, slugMap: h = m, homeRoute: g = "/", homeLabel: _ = "B
|
|
|
133
133
|
})]
|
|
134
134
|
}),
|
|
135
135
|
/* @__PURE__ */ c("article", {
|
|
136
|
-
className: "\n prose prose-sm md:prose-base\n max-w-none\n text-text-primary\n [&_h1]:text-2xl [&_h1]:font-bold [&_h1]:text-text-primary [&_h1]:mt-8 [&_h1]:mb-4\n [&_h2]:text-xl [&_h2]:font-semibold [&_h2]:text-text-primary [&_h2]:mt-6 [&_h2]:mb-3\n [&_h3]:text-lg [&_h3]:font-semibold [&_h3]:text-text-primary [&_h3]:mt-5 [&_h3]:mb-2\n [&_h4]:text-base [&_h4]:font-medium [&_h4]:text-text-primary [&_h4]:mt-4 [&_h4]:mb-2\n [&_p]:text-text-secondary [&_p]:leading-relaxed [&_p]:mb-4\n [&_a]:text-
|
|
136
|
+
className: "\n prose prose-sm md:prose-base\n max-w-none\n text-text-primary\n [&_h1]:text-2xl [&_h1]:font-bold [&_h1]:text-text-primary [&_h1]:mt-8 [&_h1]:mb-4\n [&_h2]:text-xl [&_h2]:font-semibold [&_h2]:text-text-primary [&_h2]:mt-6 [&_h2]:mb-3\n [&_h3]:text-lg [&_h3]:font-semibold [&_h3]:text-text-primary [&_h3]:mt-5 [&_h3]:mb-2\n [&_h4]:text-base [&_h4]:font-medium [&_h4]:text-text-primary [&_h4]:mt-4 [&_h4]:mb-2\n [&_p]:text-text-secondary [&_p]:leading-relaxed [&_p]:mb-4\n [&_a]:text-action-primary-bg [&_a]:underline [&_a]:hover:opacity-80\n [&_ul]:list-disc [&_ul]:ps-6 [&_ul]:mb-4 [&_ul]:text-text-secondary\n [&_ol]:list-decimal [&_ol]:ps-6 [&_ol]:mb-4 [&_ol]:text-text-secondary\n [&_li]:mb-1 [&_li]:leading-relaxed\n [&_strong]:text-text-primary [&_strong]:font-semibold\n [&_em]:italic\n [&_blockquote]:border-s-4 [&_blockquote]:border-[var(--color-border-emphasis)]\n [&_blockquote]:ps-4 [&_blockquote]:py-2 [&_blockquote]:my-4\n [&_blockquote]:bg-[var(--color-bg-subtle)] [&_blockquote]:rounded-e-lg\n [&_blockquote_p]:text-text-secondary\n [&_code]:bg-[var(--color-bg-subtle)] [&_code]:px-1.5 [&_code]:py-0.5\n [&_code]:rounded [&_code]:text-sm [&_code]:font-mono\n [&_pre]:bg-[var(--color-bg-subtle)] [&_pre]:p-4 [&_pre]:rounded-lg\n [&_pre]:overflow-x-auto [&_pre]:mb-4\n [&_pre_code]:bg-transparent [&_pre_code]:p-0\n [&_hr]:border-default [&_hr]:my-8\n [&_table]:w-full [&_table]:border-collapse [&_table]:mb-4\n [&_th]:border [&_th]:border-default [&_th]:px-4 [&_th]:py-2\n [&_th]:bg-[var(--color-bg-subtle)] [&_th]:text-start [&_th]:font-medium\n [&_td]:border [&_td]:border-default [&_td]:px-4 [&_td]:py-2\n ",
|
|
137
137
|
children: /* @__PURE__ */ c(t, { children: b.content })
|
|
138
138
|
}),
|
|
139
139
|
/* @__PURE__ */ c("div", {
|
|
@@ -83,8 +83,8 @@ function g({ children: n, defaultMode: r = "system", defaultBrand: l = "default"
|
|
|
83
83
|
let n = document.documentElement;
|
|
84
84
|
if (n.setAttribute("data-theme", P), n.setAttribute("data-brand", t(x)), n.setAttribute("data-density", L), n.setAttribute("data-typography", R), n.setAttribute("data-glass", z), n.toggleAttribute("data-reduce-motion", B), I === "dark" ? n.classList.add("dark") : n.classList.remove("dark"), N) {
|
|
85
85
|
let e = N.accent;
|
|
86
|
-
n.style.setProperty("--color-action-primary-bg", e), n.style.setProperty("--color-action-primary-bgHover", `color-mix(in oklab, ${e} 84%, black)`), n.style.setProperty("--color-action-primary-bgActive", `color-mix(in oklab, ${e} 70%, black)`), n.style.setProperty("--color-action-primary-text", p(e) ? "#0a0a0a" : "#ffffff");
|
|
87
|
-
} else n.style.removeProperty("--color-action-primary-bg"), n.style.removeProperty("--color-action-primary-bgHover"), n.style.removeProperty("--color-action-primary-bgActive"), n.style.removeProperty("--color-action-primary-text");
|
|
86
|
+
n.setAttribute("data-accent", "custom"), p(e) ? n.setAttribute("data-accent-label", "dark") : n.removeAttribute("data-accent-label"), n.style.setProperty("--color-action-primary-bg", e), n.style.setProperty("--color-action-primary-bgHover", `color-mix(in oklab, ${e} 84%, black)`), n.style.setProperty("--color-action-primary-bgActive", `color-mix(in oklab, ${e} 70%, black)`), n.style.setProperty("--color-action-primary-text", p(e) ? "#0a0a0a" : "#ffffff");
|
|
87
|
+
} else n.removeAttribute("data-accent"), n.removeAttribute("data-accent-label"), n.style.removeProperty("--color-action-primary-bg"), n.style.removeProperty("--color-action-primary-bgHover"), n.style.removeProperty("--color-action-primary-bgActive"), n.style.removeProperty("--color-action-primary-text");
|
|
88
88
|
let r = () => {
|
|
89
89
|
let t = getComputedStyle(n).getPropertyValue("--color-bg-canvas").trim();
|
|
90
90
|
e({
|