@burdenoff/fe-libs 2026.1114.3 → 2026.1114.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/ui/AIAssistantPanel.js +149 -156
- package/dist/shared/assistant/ui/AssistantChatArea.js +0 -1
- package/dist/shared/assistant/ui/assistantPageLayout.d.ts +1 -1
- package/dist/shared/assistant/ui/avatar/AssistantCompactAvatar.d.ts +0 -6
- package/dist/shared/assistant/ui/avatar/AssistantCompactAvatar.js +71 -77
- package/dist/shared/assistant/ui/compact/AssistantPageBar.d.ts +0 -2
- package/dist/shared/assistant/ui/compact/AssistantPageBar.js +9 -10
- package/dist/shared/assistant/ui/compact/AssistantViewSwitch.d.ts +0 -5
- package/dist/shared/assistant/ui/compact/AssistantViewSwitch.js +11 -11
- package/package.json +1 -1
|
@@ -30,104 +30,104 @@ import { AssistantDiscardDraftDialog as Fe } from "./compact/AssistantDiscardDra
|
|
|
30
30
|
import { AssistantMenuView as Ie } from "./compact/AssistantMenuView.js";
|
|
31
31
|
import { AssistantWindowHeader as Le } from "./compact/AssistantWindowHeader.js";
|
|
32
32
|
import { AssistantPageBar as Re } from "./compact/AssistantPageBar.js";
|
|
33
|
-
import {
|
|
34
|
-
import { AssistantPageLayoutContext as
|
|
35
|
-
import { WINDOW_VOICE_IDLE as
|
|
36
|
-
import { closeRequestAction as
|
|
37
|
-
import { useCallback as n, useEffect as r, useId as
|
|
38
|
-
import { Fragment as
|
|
33
|
+
import { avatarViewSwitchIds as ze } from "./compact/AssistantViewSwitch.js";
|
|
34
|
+
import { AssistantPageLayoutContext as Be } from "./assistantPageLayout.js";
|
|
35
|
+
import { WINDOW_VOICE_IDLE as Ve, useAssistantWindowView as He } from "./compact/windowView.js";
|
|
36
|
+
import { closeRequestAction as Ue, useCompactExpandOffered as We } from "./compact/compactChrome.js";
|
|
37
|
+
import { useCallback as n, useEffect as r, useId as Ge, useLayoutEffect as Ke, useMemo as i, useRef as a, useState as o } from "react";
|
|
38
|
+
import { Fragment as qe, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
39
39
|
// src/shared/assistant/ui/AIAssistantPanel.tsx
|
|
40
|
-
var
|
|
41
|
-
let
|
|
42
|
-
Ae(
|
|
43
|
-
let [
|
|
44
|
-
|
|
45
|
-
let x =
|
|
46
|
-
be(xe(
|
|
40
|
+
var Je = { backgroundColor: "var(--color-bg-elevated)" }, l = ({ onClose: l, visible: u, docked: Ye, onToggleDock: Xe, writeAccess: Ze, onNavigate: Qe, isShellLessTarget: $e, connectSourceHref: et, onConnectSource: tt, preview: nt, liveAvatar: d, presentation: f, onExpandedChange: p, surface: m, onOpenFull: h, avatarSettingsRequest: g, onMinimize: _, windowView: rt, onWindowViewChange: it, pageHosted: v = !1, serverHistory: at = !1 }) => {
|
|
41
|
+
let ot = ke(), st = pe(d);
|
|
42
|
+
Ae(at);
|
|
43
|
+
let [ct, y] = o(!1), b = Oe(nt);
|
|
44
|
+
ct && !b && y(!1);
|
|
45
|
+
let x = ct && b, lt = Se();
|
|
46
|
+
be(xe(nt, lt));
|
|
47
47
|
let S = a(null);
|
|
48
48
|
je(S);
|
|
49
|
-
let { conversations:
|
|
50
|
-
pt && (!E || D || C || x) &&
|
|
51
|
-
let
|
|
49
|
+
let { conversations: ut, activeConversationId: dt, conversationListOpen: C, setConversationListOpen: w, createConversation: T } = t(), E = f === "compact", D = E && m === "window", ft = E && v && !D, [pt, O] = o(!1), [mt, k] = o("root"), [ht, gt] = o(0), _t = a(0);
|
|
50
|
+
pt && (!E || D || C || x) && O(!1);
|
|
51
|
+
let A = E && pt, [vt, j] = o(!1), M = We(E && !D && !v && p !== void 0), [N, yt] = o(!1), P = M && N;
|
|
52
52
|
r(() => {
|
|
53
|
-
|
|
53
|
+
N && !M && (yt(!1), p?.(!1));
|
|
54
54
|
}, [
|
|
55
|
-
P,
|
|
56
55
|
N,
|
|
56
|
+
M,
|
|
57
57
|
p
|
|
58
58
|
]);
|
|
59
59
|
let bt = () => {
|
|
60
|
-
let e = !
|
|
60
|
+
let e = !P;
|
|
61
61
|
yt(e), p?.(e);
|
|
62
62
|
}, xt = a(!1), St = a(p);
|
|
63
63
|
r(() => {
|
|
64
|
-
xt.current =
|
|
64
|
+
xt.current = P, St.current = p;
|
|
65
65
|
}), r(() => () => {
|
|
66
66
|
xt.current && St.current?.(!1);
|
|
67
67
|
}, []);
|
|
68
|
-
let
|
|
69
|
-
stored:
|
|
70
|
-
onRemember:
|
|
68
|
+
let F = C || x || A, I = d?.tab, L = me(I), [R, z] = o(!1), Ct = He({
|
|
69
|
+
stored: rt ?? null,
|
|
70
|
+
onRemember: it
|
|
71
71
|
});
|
|
72
|
-
if (!E) R && (!
|
|
72
|
+
if (!E) R && (!I || u === !1) && z(!1);
|
|
73
73
|
else {
|
|
74
|
-
let e =
|
|
74
|
+
let e = !ft && Ct.view === "avatar" && I?.CompactView !== void 0 && u !== !1 && (L || R);
|
|
75
75
|
e !== R && z(e);
|
|
76
76
|
}
|
|
77
|
-
let
|
|
77
|
+
let wt = I !== void 0 && (L || R) && (!E || I.CompactView !== void 0), B = Ge(), V = Ge(), H = i(() => wt ? {
|
|
78
78
|
chatTab: `${B}-chat-tab`,
|
|
79
79
|
avatarTab: `${B}-avatar-tab`,
|
|
80
80
|
chatPanel: `${B}-chat-panel`,
|
|
81
81
|
avatarPanel: `${B}-avatar-panel`,
|
|
82
82
|
leaveHint: `${B}-avatar-leave`
|
|
83
|
-
} : null, [
|
|
83
|
+
} : null, [wt, B]), Tt = n(() => z(!1), []), U = a(null), W = Ct.select, G = n((e) => {
|
|
84
84
|
U.current = e, W(e);
|
|
85
|
-
}, [W]), K = a(null),
|
|
85
|
+
}, [W]), K = a(null), Et = n((e) => {
|
|
86
86
|
K.current = e;
|
|
87
|
-
}, []), q =
|
|
88
|
-
D ? h?.({ menu: "settings/avatar" }) : q && (w(!1), y(!1),
|
|
87
|
+
}, []), q = L ? I?.SettingsView : void 0, Dt = n(() => {
|
|
88
|
+
D ? h?.({ menu: "settings/avatar" }) : q && (w(!1), y(!1), k("avatar"), gt((e) => e + 1), O(!0));
|
|
89
89
|
}, [
|
|
90
90
|
D,
|
|
91
91
|
h,
|
|
92
92
|
q,
|
|
93
93
|
w
|
|
94
|
-
]), [
|
|
94
|
+
]), [Ot, kt] = o(0), J = i(() => E ? {
|
|
95
95
|
surface: D ? "window" : "panel",
|
|
96
96
|
view: R ? "avatar" : "chat",
|
|
97
97
|
selectView: G,
|
|
98
|
-
openSettings:
|
|
99
|
-
focusRequest:
|
|
98
|
+
openSettings: Dt,
|
|
99
|
+
focusRequest: Ot
|
|
100
100
|
} : void 0, [
|
|
101
101
|
E,
|
|
102
102
|
D,
|
|
103
103
|
R,
|
|
104
104
|
G,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
]),
|
|
105
|
+
Dt,
|
|
106
|
+
Ot
|
|
107
|
+
]), At = i(() => ({
|
|
108
108
|
open: R,
|
|
109
|
-
close: E ? () => G("chat") :
|
|
109
|
+
close: E ? () => G("chat") : Tt,
|
|
110
110
|
ids: H,
|
|
111
|
-
covered:
|
|
112
|
-
setReplyEscape:
|
|
111
|
+
covered: F,
|
|
112
|
+
setReplyEscape: Et,
|
|
113
113
|
...J ? { compact: J } : {}
|
|
114
114
|
}), [
|
|
115
115
|
R,
|
|
116
116
|
E,
|
|
117
117
|
G,
|
|
118
|
-
|
|
118
|
+
Tt,
|
|
119
119
|
H,
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
F,
|
|
121
|
+
Et,
|
|
122
122
|
J
|
|
123
|
-
]),
|
|
124
|
-
|
|
123
|
+
]), jt = (e) => z(e === "avatar");
|
|
124
|
+
Ke(() => {
|
|
125
125
|
let e = U.current;
|
|
126
126
|
if (e === null || (U.current = null, !H || e === "avatar" !== R)) return;
|
|
127
|
-
let t = R ?
|
|
127
|
+
let t = R ? ze(H).avatarTab : H.chatTab;
|
|
128
128
|
document.getElementById(t)?.focus({ preventScroll: !0 });
|
|
129
129
|
}), r(() => {
|
|
130
|
-
E && g && _t.current !== g && (_t.current = g, q && !D && (w(!1), y(!1),
|
|
130
|
+
E && g && _t.current !== g && (_t.current = g, q && !D && (w(!1), y(!1), k("avatar"), gt(g), O(!0)));
|
|
131
131
|
}, [
|
|
132
132
|
E,
|
|
133
133
|
g,
|
|
@@ -135,19 +135,19 @@ var Xe = { backgroundColor: "var(--color-bg-elevated)" }, c = ({ onClose: c, vis
|
|
|
135
135
|
D,
|
|
136
136
|
w
|
|
137
137
|
]);
|
|
138
|
-
let
|
|
138
|
+
let Mt = Te({
|
|
139
139
|
historyOpen: C,
|
|
140
140
|
previewOpen: x,
|
|
141
141
|
avatarOpen: R
|
|
142
|
-
}) ?? (
|
|
142
|
+
}) ?? (A ? "menu" : null), Y = (e) => {
|
|
143
143
|
let t = De({
|
|
144
144
|
historyOpen: C,
|
|
145
145
|
previewOpen: x
|
|
146
146
|
}, e);
|
|
147
147
|
w(t.historyOpen), y(t.previewOpen);
|
|
148
|
-
},
|
|
149
|
-
le("assistant.history",
|
|
150
|
-
let
|
|
148
|
+
}, Nt = i(() => ({ run: () => C ? { status: "already" } : (w(!0), y(!1), { status: "done" }) }), [C, w]);
|
|
149
|
+
le("assistant.history", Nt);
|
|
150
|
+
let Pt = i(() => b ? {
|
|
151
151
|
surface: "panel",
|
|
152
152
|
run: () => x ? { status: "already" } : (w(!1), y(!0), { status: "done" }),
|
|
153
153
|
close: () => x ? (y(!1), { status: "done" }) : { status: "already" }
|
|
@@ -156,67 +156,67 @@ var Xe = { backgroundColor: "var(--color-bg-elevated)" }, c = ({ onClose: c, vis
|
|
|
156
156
|
x,
|
|
157
157
|
w
|
|
158
158
|
]);
|
|
159
|
-
le("assistant.preview",
|
|
160
|
-
let
|
|
161
|
-
te(
|
|
162
|
-
let
|
|
159
|
+
le("assistant.preview", Pt);
|
|
160
|
+
let Ft = ut.find((e) => e.id === dt), It = Ft?.backendSessionId ?? null;
|
|
161
|
+
te(It, Ft?.mode ?? null, u ?? !0), e(u ?? !0);
|
|
162
|
+
let Lt = ne(u !== !1), X = Me(), Z = a(!1), Rt = n((e) => {
|
|
163
163
|
Z.current = e;
|
|
164
|
-
}, []),
|
|
164
|
+
}, []), zt = a(!1), [Bt, Vt] = o(!1), Q = n(() => Ue({
|
|
165
165
|
compact: E,
|
|
166
166
|
unsent: Z.current,
|
|
167
|
-
confirmed:
|
|
168
|
-
}) !== "close" && (
|
|
167
|
+
confirmed: zt.current
|
|
168
|
+
}) !== "close" && (Vt(!0), !0), [E]);
|
|
169
169
|
r(() => {
|
|
170
|
-
if (E && X) return X(
|
|
170
|
+
if (E && X) return X(Q);
|
|
171
171
|
}, [
|
|
172
172
|
E,
|
|
173
173
|
X,
|
|
174
|
-
|
|
174
|
+
Q
|
|
175
175
|
]);
|
|
176
|
-
let
|
|
177
|
-
v || (D && _ ? _() :
|
|
176
|
+
let $ = n(() => {
|
|
177
|
+
v || (D && _ ? _() : Q() || l());
|
|
178
178
|
}, [
|
|
179
179
|
v,
|
|
180
180
|
D,
|
|
181
181
|
_,
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
]),
|
|
185
|
-
|
|
182
|
+
Q,
|
|
183
|
+
l
|
|
184
|
+
]), Ht = () => {
|
|
185
|
+
zt.current = !0, Z.current = !1, Vt(!1);
|
|
186
186
|
try {
|
|
187
|
-
|
|
187
|
+
l();
|
|
188
188
|
} finally {
|
|
189
|
-
|
|
189
|
+
zt.current = !1;
|
|
190
190
|
}
|
|
191
|
-
},
|
|
192
|
-
T(),
|
|
193
|
-
}, [T, w]), [
|
|
194
|
-
|
|
195
|
-
}, []),
|
|
196
|
-
h?.(),
|
|
191
|
+
}, Ut = a(null), Wt = a(null), Gt = a(null), Kt = n(() => O(!1), []), [qt, Jt] = o(0), Yt = n(() => {
|
|
192
|
+
T(), O(!1), w(!1), Jt((e) => e + 1);
|
|
193
|
+
}, [T, w]), [Xt, Zt] = o(Ve), Qt = n((e) => {
|
|
194
|
+
Zt((t) => t.live === e.live ? t : e);
|
|
195
|
+
}, []), $t = he(I), en = n((e) => {
|
|
196
|
+
h?.(), Xt.live || e?.review === !0 || (E && R ? kt((e) => e + 1) : Jt((e) => e + 1));
|
|
197
197
|
}, [
|
|
198
198
|
h,
|
|
199
|
-
|
|
199
|
+
Xt.live,
|
|
200
200
|
E,
|
|
201
201
|
R
|
|
202
|
-
]),
|
|
203
|
-
W("chat"),
|
|
204
|
-
}, [W]),
|
|
205
|
-
|
|
206
|
-
}, []),
|
|
202
|
+
]), tn = n(() => {
|
|
203
|
+
W("chat"), Jt((e) => e + 1);
|
|
204
|
+
}, [W]), nn = n(() => {
|
|
205
|
+
O(!1), j(!0);
|
|
206
|
+
}, []), rn = a(!1);
|
|
207
207
|
return r(() => {
|
|
208
|
-
if (
|
|
208
|
+
if (rn.current && !A) {
|
|
209
209
|
let e = document.activeElement;
|
|
210
|
-
e && e !== document.body && e !== S.current ||
|
|
210
|
+
e && e !== document.body && e !== S.current || Wt.current?.focus({ preventScroll: !0 });
|
|
211
211
|
}
|
|
212
|
-
|
|
213
|
-
}, [
|
|
214
|
-
|
|
215
|
-
}, [
|
|
212
|
+
rn.current = A;
|
|
213
|
+
}, [A]), r(() => {
|
|
214
|
+
qt > 0 && Ut.current?.focus({ preventScroll: !0 });
|
|
215
|
+
}, [qt]), ee({
|
|
216
216
|
panelRef: S,
|
|
217
|
-
inputRef: E ?
|
|
218
|
-
onNewConversation: E ?
|
|
219
|
-
onOpenConversationMenu: E && !D ?
|
|
217
|
+
inputRef: E ? Ut : void 0,
|
|
218
|
+
onNewConversation: E ? Yt : void 0,
|
|
219
|
+
onOpenConversationMenu: E && !D ? nn : void 0,
|
|
220
220
|
onClose: () => {
|
|
221
221
|
let e = Ee({
|
|
222
222
|
historyOpen: C,
|
|
@@ -224,135 +224,128 @@ var Xe = { backgroundColor: "var(--color-bg-elevated)" }, c = ({ onClose: c, vis
|
|
|
224
224
|
avatarOpen: R,
|
|
225
225
|
tabReplySpeaking: K.current !== null
|
|
226
226
|
});
|
|
227
|
-
e === "overlay" ? (w(!1), y(!1)) : e === "tab-reply" ? K.current?.() : e === "tab" && E ? G("chat") : e === "tab" ? (z(!1), H && document.getElementById(H.chatTab)?.focus()) :
|
|
227
|
+
e === "overlay" ? (w(!1), y(!1)) : e === "tab-reply" ? K.current?.() : e === "tab" && E ? G("chat") : e === "tab" ? (z(!1), H && document.getElementById(H.chatTab)?.focus()) : A ? O(!1) : $();
|
|
228
228
|
}
|
|
229
229
|
}), /* @__PURE__ */ s(ue, {
|
|
230
|
-
visible:
|
|
231
|
-
engine:
|
|
230
|
+
visible: u ?? !0,
|
|
231
|
+
engine: st,
|
|
232
232
|
children: /* @__PURE__ */ s(de, {
|
|
233
233
|
value: d,
|
|
234
234
|
children: /* @__PURE__ */ s(fe.Provider, {
|
|
235
|
-
value:
|
|
235
|
+
value: At,
|
|
236
236
|
children: /* @__PURE__ */ s(ve, {
|
|
237
|
-
value:
|
|
237
|
+
value: nt,
|
|
238
238
|
children: /* @__PURE__ */ s(ae, {
|
|
239
|
-
navigate:
|
|
240
|
-
isShellLessTarget:
|
|
239
|
+
navigate: Qe,
|
|
240
|
+
isShellLessTarget: $e,
|
|
241
241
|
children: /* @__PURE__ */ s(_e, {
|
|
242
|
-
value:
|
|
243
|
-
onOpen:
|
|
244
|
-
children: /* @__PURE__ */ s(se, { children: /* @__PURE__ */ s(ce, { children: /* @__PURE__ */ s(
|
|
245
|
-
value:
|
|
246
|
-
children: /* @__PURE__ */
|
|
242
|
+
value: et,
|
|
243
|
+
onOpen: tt,
|
|
244
|
+
children: /* @__PURE__ */ s(se, { children: /* @__PURE__ */ s(ce, { children: /* @__PURE__ */ s(Be.Provider, {
|
|
245
|
+
value: ft,
|
|
246
|
+
children: /* @__PURE__ */ c("div", {
|
|
247
247
|
ref: S,
|
|
248
248
|
className: "relative flex h-full w-full flex-col bg-bg-surface",
|
|
249
|
-
style: D ?
|
|
249
|
+
style: D ? Je : void 0,
|
|
250
250
|
role: "complementary",
|
|
251
|
-
"aria-label": D ?
|
|
251
|
+
"aria-label": D ? ot("window.title", "Quick assistant") : ot("panel.ariaLabel", "AI Assistant"),
|
|
252
252
|
"data-testid": "ai-assistant-panel",
|
|
253
253
|
[we]: "",
|
|
254
|
-
...
|
|
254
|
+
...Mt ? { [Ce]: Mt } : {},
|
|
255
255
|
...E ? {
|
|
256
256
|
"data-presentation": "compact",
|
|
257
257
|
...m ? { "data-assistant-surface": m } : {},
|
|
258
|
-
...
|
|
258
|
+
...P ? { "data-assistant-expanded": "" } : {}
|
|
259
259
|
} : {},
|
|
260
260
|
...v ? { "data-assistant-page-hosted": "" } : {},
|
|
261
261
|
tabIndex: -1,
|
|
262
262
|
children: [
|
|
263
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ c("div", {
|
|
264
264
|
className: "contents",
|
|
265
|
-
inert:
|
|
266
|
-
children: [E ? /* @__PURE__ */
|
|
267
|
-
voiceLive:
|
|
268
|
-
avatarOn:
|
|
269
|
-
onOpenFull:
|
|
265
|
+
inert: F || void 0,
|
|
266
|
+
children: [E ? /* @__PURE__ */ c(qe, { children: [D ? /* @__PURE__ */ s(Le, {
|
|
267
|
+
voiceLive: Xt.live,
|
|
268
|
+
avatarOn: $t,
|
|
269
|
+
onOpenFull: en,
|
|
270
270
|
onMinimize: () => _?.()
|
|
271
|
-
}) :
|
|
272
|
-
menuOpen:
|
|
271
|
+
}) : ft ? /* @__PURE__ */ s(Re, {
|
|
272
|
+
menuOpen: A,
|
|
273
273
|
menuViewId: V,
|
|
274
274
|
onOpenMenu: () => {
|
|
275
|
-
|
|
275
|
+
k("root"), O(!0);
|
|
276
276
|
},
|
|
277
|
-
menuButtonRef:
|
|
278
|
-
viewSwitch: H ? /* @__PURE__ */ s(ze, {
|
|
279
|
-
selected: R ? "avatar" : "chat",
|
|
280
|
-
onSelect: G,
|
|
281
|
-
ids: H,
|
|
282
|
-
instance: "chat",
|
|
283
|
-
placement: "bar"
|
|
284
|
-
}) : void 0,
|
|
277
|
+
menuButtonRef: Wt,
|
|
285
278
|
conversationMenu: /* @__PURE__ */ s(Pe, {
|
|
286
279
|
open: vt,
|
|
287
|
-
onOpenChange:
|
|
288
|
-
triggerRef:
|
|
280
|
+
onOpenChange: j,
|
|
281
|
+
triggerRef: Gt
|
|
289
282
|
}),
|
|
290
283
|
onTogglePreview: () => Y("preview"),
|
|
291
284
|
previewOpen: x
|
|
292
285
|
}) : /* @__PURE__ */ s(Ne, {
|
|
293
|
-
contextLabel:
|
|
294
|
-
menuOpen:
|
|
286
|
+
contextLabel: Lt,
|
|
287
|
+
menuOpen: A,
|
|
295
288
|
menuViewId: V,
|
|
296
289
|
onOpenMenu: () => {
|
|
297
|
-
|
|
290
|
+
k("root"), O(!0);
|
|
298
291
|
},
|
|
299
|
-
menuButtonRef:
|
|
292
|
+
menuButtonRef: Wt,
|
|
300
293
|
conversationMenu: /* @__PURE__ */ s(Pe, {
|
|
301
294
|
open: vt,
|
|
302
|
-
onOpenChange:
|
|
303
|
-
triggerRef:
|
|
295
|
+
onOpenChange: j,
|
|
296
|
+
triggerRef: Gt
|
|
304
297
|
}),
|
|
305
|
-
expandOffered:
|
|
306
|
-
expanded:
|
|
298
|
+
expandOffered: M,
|
|
299
|
+
expanded: P,
|
|
307
300
|
onToggleExpanded: bt,
|
|
308
301
|
onTogglePreview: () => Y("preview"),
|
|
309
302
|
previewOpen: x,
|
|
310
|
-
onClose: v ? void 0 :
|
|
303
|
+
onClose: v ? void 0 : $
|
|
311
304
|
}), /* @__PURE__ */ s(Fe, {
|
|
312
|
-
open:
|
|
313
|
-
onKeep: () =>
|
|
314
|
-
onDiscard:
|
|
305
|
+
open: Bt,
|
|
306
|
+
onKeep: () => Vt(!1),
|
|
307
|
+
onDiscard: Ht
|
|
315
308
|
})] }) : /* @__PURE__ */ s(re, {
|
|
316
|
-
contextLabel:
|
|
309
|
+
contextLabel: Lt,
|
|
317
310
|
onNewConversation: () => T(),
|
|
318
311
|
onOpenHistory: () => Y("history"),
|
|
319
312
|
historyOpen: C,
|
|
320
313
|
onTogglePreview: () => Y("preview"),
|
|
321
314
|
previewOpen: x,
|
|
322
|
-
onClose: v ? void 0 :
|
|
323
|
-
docked:
|
|
324
|
-
onToggleDock: v ? void 0 :
|
|
315
|
+
onClose: v ? void 0 : l,
|
|
316
|
+
docked: Ye,
|
|
317
|
+
onToggleDock: v ? void 0 : Xe
|
|
325
318
|
}), H && !E ? /* @__PURE__ */ s(ge, {
|
|
326
319
|
selected: R ? "avatar" : "chat",
|
|
327
|
-
onSelect:
|
|
320
|
+
onSelect: jt,
|
|
328
321
|
ids: H
|
|
329
322
|
}) : null]
|
|
330
323
|
}),
|
|
331
|
-
C ? /* @__PURE__ */ s(oe, { presentation: f }) :
|
|
324
|
+
C ? /* @__PURE__ */ s(oe, { presentation: f }) : A ? /* @__PURE__ */ s(Ie, {
|
|
332
325
|
initialView: mt,
|
|
333
326
|
id: V,
|
|
334
|
-
onClose:
|
|
335
|
-
onRequestClosePanel: v ? void 0 :
|
|
336
|
-
onNewConversation:
|
|
327
|
+
onClose: Kt,
|
|
328
|
+
onRequestClosePanel: v ? void 0 : $,
|
|
329
|
+
onNewConversation: Yt,
|
|
337
330
|
AvatarSettings: q,
|
|
338
|
-
docked:
|
|
339
|
-
onToggleDock: v ? void 0 :
|
|
331
|
+
docked: Ye,
|
|
332
|
+
onToggleDock: v ? void 0 : Xe
|
|
340
333
|
}, ht) : null,
|
|
341
334
|
x && /* @__PURE__ */ s(ye, { onClose: () => y(!1) }),
|
|
342
335
|
/* @__PURE__ */ s("div", {
|
|
343
336
|
className: "contents",
|
|
344
|
-
inert:
|
|
337
|
+
inert: F || void 0,
|
|
345
338
|
children: /* @__PURE__ */ s(ie, {
|
|
346
|
-
visible:
|
|
347
|
-
writeAccess:
|
|
339
|
+
visible: u ?? !0,
|
|
340
|
+
writeAccess: Ze,
|
|
348
341
|
presentation: f,
|
|
349
|
-
inputRef: E ?
|
|
350
|
-
onDraftDirtyChange: E ?
|
|
342
|
+
inputRef: E ? Ut : void 0,
|
|
343
|
+
onDraftDirtyChange: E ? Rt : void 0,
|
|
351
344
|
...D ? {
|
|
352
345
|
surface: m,
|
|
353
|
-
onWindowVoiceChange:
|
|
354
|
-
onOpenFull:
|
|
355
|
-
onContinuedInChat:
|
|
346
|
+
onWindowVoiceChange: Qt,
|
|
347
|
+
onOpenFull: en,
|
|
348
|
+
onContinuedInChat: tn
|
|
356
349
|
} : {}
|
|
357
350
|
})
|
|
358
351
|
})
|
|
@@ -366,4 +359,4 @@ var Xe = { backgroundColor: "var(--color-bg-elevated)" }, c = ({ onClose: c, vis
|
|
|
366
359
|
})
|
|
367
360
|
});
|
|
368
361
|
};
|
|
369
|
-
export {
|
|
362
|
+
export { l as AIAssistantPanel };
|
|
@@ -2874,7 +2874,6 @@ var da = () => () => {}, fa = () => "off", pa = ({ visible: pa = !0, writeAccess
|
|
|
2874
2874
|
toggle: $.toggleMute
|
|
2875
2875
|
} } : {},
|
|
2876
2876
|
...au ? { ask: du } : {},
|
|
2877
|
-
switchInBar: Ca,
|
|
2878
2877
|
footer: /* @__PURE__ */ M(Me, {})
|
|
2879
2878
|
}) : /* @__PURE__ */ M(Fe, {
|
|
2880
2879
|
tab: $o,
|
|
@@ -9,5 +9,5 @@ export declare const PAGE_COLUMN = "mx-auto w-full max-w-[48rem]";
|
|
|
9
9
|
* message box's own 0.75rem sides, so the messages line up with the box.
|
|
10
10
|
*/
|
|
11
11
|
export declare const PAGE_SCROLL_GUTTER = "px-[max(0.75rem,calc((100%_-_46.5rem)/2))]";
|
|
12
|
-
/** The same, for a full-surface view (☰, history
|
|
12
|
+
/** The same, for a full-surface view (☰, history): its content in the column. */
|
|
13
13
|
export declare const PAGE_VIEW_GUTTER = "px-[max(0rem,calc((100%_-_48rem)/2))]";
|
|
@@ -17,11 +17,5 @@ export interface AssistantCompactAvatarProps {
|
|
|
17
17
|
readonly ask?: AvatarTabAsk;
|
|
18
18
|
/** The one-line footer (the standing disclaimer), the chat area's own. */
|
|
19
19
|
readonly footer: ReactNode;
|
|
20
|
-
/**
|
|
21
|
-
* BOFF-13461: laid out as a page, where the Chat | Avatar switch is the page bar's (one instance, outside this view). This view then
|
|
22
|
-
* shows no switch of its own (its row stays, empty, for the voice strip's clearance), focus that has nowhere else to go goes to the
|
|
23
|
-
* bar's Avatar segment, and its content sits in the page's column.
|
|
24
|
-
*/
|
|
25
|
-
readonly switchInBar?: boolean;
|
|
26
20
|
}
|
|
27
21
|
export declare const AssistantCompactAvatar: FC<AssistantCompactAvatarProps>;
|
|
@@ -7,120 +7,114 @@ import { clearReplyRequests as a } from "../../speech/replySpeechRequests.js";
|
|
|
7
7
|
import { AvatarCompactAskBox as o } from "./AvatarCompactAskBox.js";
|
|
8
8
|
import { AvatarTabLastExchange as s } from "./AvatarTabLastExchange.js";
|
|
9
9
|
import { useAvatarTabExchange as c } from "./avatarTabExchange.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
10
|
+
import { useEffect as l, useLayoutEffect as u, useRef as d, useState as f } from "react";
|
|
11
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
13
12
|
// src/shared/assistant/ui/avatar/AssistantCompactAvatar.tsx
|
|
14
|
-
var
|
|
15
|
-
function
|
|
13
|
+
var h = /* @__PURE__ */ new WeakMap();
|
|
14
|
+
function g() {
|
|
16
15
|
if (typeof document > "u") return !1;
|
|
17
16
|
let e = document.activeElement;
|
|
18
17
|
return e === null || e === document.body || !e.isConnected || e.hasAttribute("data-assistant-panel");
|
|
19
18
|
}
|
|
20
|
-
var
|
|
19
|
+
var _ = ({ state: e, restored: t }) => {
|
|
21
20
|
let n = i(), r = e === "thinking" ? n.askThinking : e === "not-spoken" ? n.askNotSpoken : e === "cut" ? n.askCut : e === "not-heard" ? n.askNotHeard : e === "failed" ? t ? n.askFailed : n.askFailedInChat : "";
|
|
22
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ p("p", {
|
|
23
22
|
className: "sr-only",
|
|
24
23
|
"aria-live": "polite",
|
|
25
24
|
"aria-atomic": "true",
|
|
26
25
|
"data-testid": "assistant-avatar-tab-ask-live",
|
|
27
26
|
children: r
|
|
28
27
|
});
|
|
29
|
-
},
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
(
|
|
28
|
+
}, v = ({ tab: i, CompactView: v, ids: y, compact: b, shown: x, voice: S, mute: C, ask: w, footer: T }) => {
|
|
29
|
+
let E = d(null), D = d(null), O = e(), k = b.surface === "window", A = n(y);
|
|
30
|
+
u(() => (h.set(i, (h.get(i) ?? 0) + 1), i.setOpen(!0, { compact: !0 }), () => {
|
|
31
|
+
h.set(i, (h.get(i) ?? 1) - 1), queueMicrotask(() => {
|
|
32
|
+
(h.get(i) ?? 0) > 0 || (i.setOpen(!1), a());
|
|
34
33
|
});
|
|
35
34
|
}), [i]);
|
|
36
|
-
let
|
|
35
|
+
let j = d(null), M = b.focusRequest ?? 0, N = d(M);
|
|
36
|
+
l(() => {
|
|
37
|
+
N.current !== M && (N.current = M, (E.current ?? j.current ?? document.getElementById(A.avatarTab))?.focus({ preventScroll: !0 }));
|
|
38
|
+
}, [M, A.avatarTab]);
|
|
39
|
+
let P = d(S.live);
|
|
40
|
+
l(() => {
|
|
41
|
+
let e = P.current;
|
|
42
|
+
P.current = S.live, e && !S.live && g() && (D.current ?? E.current)?.focus();
|
|
43
|
+
}, [S.live]);
|
|
44
|
+
let F = c(w?.last ?? null, w?.navigatingReplyId ?? null), I = S.live ? void 0 : w, [L, R] = f(null), z = F?.state === "failed" ? F.exchange.replyId : null, B = F?.question ?? "", V = w?.draft;
|
|
37
45
|
u(() => {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
b.avatarTab,
|
|
43
|
-
D
|
|
44
|
-
]);
|
|
45
|
-
let I = f(C.live);
|
|
46
|
-
u(() => {
|
|
47
|
-
let e = I.current;
|
|
48
|
-
I.current = C.live, e && !C.live && _() && (k.current ?? O.current)?.focus();
|
|
49
|
-
}, [C.live]);
|
|
50
|
-
let L = c(T?.last ?? null, T?.navigatingReplyId ?? null), R = C.live ? void 0 : T, [z, B] = p(null), V = L?.state === "failed" ? L.exchange.replyId : null, H = L?.question ?? "", U = T?.draft;
|
|
51
|
-
d(() => {
|
|
52
|
-
if (V === null || U === void 0 || z?.replyId === V) return;
|
|
53
|
-
let e = U.get().trim() === "";
|
|
54
|
-
e && U.set(H), B({
|
|
55
|
-
replyId: V,
|
|
46
|
+
if (z === null || V === void 0 || L?.replyId === z) return;
|
|
47
|
+
let e = V.get().trim() === "";
|
|
48
|
+
e && V.set(B), R({
|
|
49
|
+
replyId: z,
|
|
56
50
|
restored: e
|
|
57
51
|
});
|
|
58
52
|
}, [
|
|
53
|
+
z,
|
|
54
|
+
B,
|
|
59
55
|
V,
|
|
60
|
-
|
|
61
|
-
U,
|
|
62
|
-
z
|
|
56
|
+
L
|
|
63
57
|
]);
|
|
64
|
-
let
|
|
65
|
-
...
|
|
66
|
-
...
|
|
67
|
-
open:
|
|
68
|
-
toggle: () =>
|
|
58
|
+
let H = L === null || L.replyId !== z || L.restored, [U, W] = f(null), G = U ?? !k, K = {
|
|
59
|
+
...C ? { mute: C } : {},
|
|
60
|
+
...I ? { transcript: {
|
|
61
|
+
open: G,
|
|
62
|
+
toggle: () => W(!G)
|
|
69
63
|
} } : {}
|
|
70
64
|
};
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
-
className: `absolute inset-0 z-[5] flex flex-col ${
|
|
65
|
+
return /* @__PURE__ */ m("div", {
|
|
66
|
+
className: `absolute inset-0 z-[5] flex flex-col ${k ? "bg-bg-elevated" : "bg-bg-surface"}`,
|
|
73
67
|
"data-testid": "assistant-avatar-tab",
|
|
74
68
|
"data-presentation": "compact",
|
|
75
|
-
"data-surface":
|
|
69
|
+
"data-surface": b.surface,
|
|
76
70
|
children: [
|
|
77
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ m("div", {
|
|
78
72
|
role: "tabpanel",
|
|
79
|
-
id:
|
|
80
|
-
"aria-labelledby":
|
|
73
|
+
id: y.avatarPanel,
|
|
74
|
+
"aria-labelledby": A.avatarTab,
|
|
81
75
|
className: "flex min-h-0 flex-1 flex-col",
|
|
82
76
|
"data-testid": "assistant-avatar-tab-column",
|
|
83
|
-
children: [/* @__PURE__ */
|
|
84
|
-
shown:
|
|
85
|
-
voice:
|
|
86
|
-
leaveHintId:
|
|
87
|
-
surface:
|
|
88
|
-
onOpenSettings:
|
|
89
|
-
navigate:
|
|
90
|
-
controls:
|
|
91
|
-
switchRef:
|
|
92
|
-
}),
|
|
77
|
+
children: [/* @__PURE__ */ p(v, {
|
|
78
|
+
shown: x,
|
|
79
|
+
voice: S,
|
|
80
|
+
leaveHintId: y.leaveHint,
|
|
81
|
+
surface: b.surface,
|
|
82
|
+
onOpenSettings: b.openSettings,
|
|
83
|
+
navigate: O,
|
|
84
|
+
controls: K,
|
|
85
|
+
switchRef: j
|
|
86
|
+
}), I && G ? /* @__PURE__ */ p("div", {
|
|
93
87
|
className: "max-h-[40%] shrink-0 overflow-y-auto px-4 pb-1",
|
|
94
|
-
children: /* @__PURE__ */
|
|
95
|
-
view:
|
|
88
|
+
children: /* @__PURE__ */ p(s, {
|
|
89
|
+
view: F,
|
|
96
90
|
invite: !1,
|
|
97
|
-
restored:
|
|
98
|
-
focusAfterStop:
|
|
99
|
-
},
|
|
91
|
+
restored: H,
|
|
92
|
+
focusAfterStop: E
|
|
93
|
+
}, F?.exchange.replyId ?? "none")
|
|
100
94
|
}) : null]
|
|
101
95
|
}),
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
voiceLive:
|
|
104
|
-
children:
|
|
105
|
-
selected:
|
|
106
|
-
onSelect:
|
|
107
|
-
ids:
|
|
96
|
+
/* @__PURE__ */ p(r, {
|
|
97
|
+
voiceLive: S.live,
|
|
98
|
+
children: /* @__PURE__ */ p(t, {
|
|
99
|
+
selected: b.view,
|
|
100
|
+
onSelect: b.selectView,
|
|
101
|
+
ids: y,
|
|
108
102
|
instance: "avatar"
|
|
109
103
|
})
|
|
110
104
|
}),
|
|
111
|
-
|
|
112
|
-
ask:
|
|
113
|
-
inputRef:
|
|
114
|
-
voice:
|
|
115
|
-
waveRef:
|
|
116
|
-
windowSurface:
|
|
105
|
+
I ? /* @__PURE__ */ p(o, {
|
|
106
|
+
ask: I,
|
|
107
|
+
inputRef: E,
|
|
108
|
+
voice: S,
|
|
109
|
+
waveRef: D,
|
|
110
|
+
windowSurface: k
|
|
117
111
|
}) : null,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
state:
|
|
121
|
-
restored:
|
|
112
|
+
T,
|
|
113
|
+
w ? /* @__PURE__ */ p(_, {
|
|
114
|
+
state: F?.state ?? null,
|
|
115
|
+
restored: H
|
|
122
116
|
}) : null
|
|
123
117
|
]
|
|
124
118
|
});
|
|
125
119
|
};
|
|
126
|
-
export {
|
|
120
|
+
export { v as AssistantCompactAvatar };
|
|
@@ -4,8 +4,6 @@ export interface AssistantPageBarProps {
|
|
|
4
4
|
menuViewId?: string;
|
|
5
5
|
onOpenMenu: () => void;
|
|
6
6
|
menuButtonRef?: Ref<HTMLButtonElement>;
|
|
7
|
-
/** The Chat | Avatar switch, or nothing where the avatar is not offered. */
|
|
8
|
-
viewSwitch?: ReactNode;
|
|
9
7
|
conversationMenu: ReactNode;
|
|
10
8
|
onTogglePreview?: () => void;
|
|
11
9
|
previewOpen?: boolean;
|
|
@@ -4,8 +4,8 @@ import { hasAssistantPreviewSurface as n } from "../../preview/types.js";
|
|
|
4
4
|
import { Eye as r, Menu as i } from "lucide-react";
|
|
5
5
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
6
|
// src/shared/assistant/ui/compact/AssistantPageBar.tsx
|
|
7
|
-
var s = "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)]", c = "text-text-secondary hover:bg-bg-sunken hover:text-text-primary", l = "bg-action-primary-bg/15 text-action-primary-bg", u = ({ menuOpen: u, menuViewId: d, onOpenMenu: f, menuButtonRef: p,
|
|
8
|
-
let
|
|
7
|
+
var s = "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)]", c = "text-text-secondary hover:bg-bg-sunken hover:text-text-primary", l = "bg-action-primary-bg/15 text-action-primary-bg", u = ({ menuOpen: u, menuViewId: d, onOpenMenu: f, menuButtonRef: p, conversationMenu: m, onTogglePreview: h, previewOpen: g }) => {
|
|
8
|
+
let _ = e(), v = t();
|
|
9
9
|
return /* @__PURE__ */ o("div", {
|
|
10
10
|
className: "flex min-h-14 shrink-0 items-center gap-1 px-2 py-2 sm:px-3",
|
|
11
11
|
"data-testid": "assistant-page-bar",
|
|
@@ -16,7 +16,7 @@ var s = "flex size-10 shrink-0 items-center justify-center rounded-button transi
|
|
|
16
16
|
type: "button",
|
|
17
17
|
onClick: f,
|
|
18
18
|
className: `${s} ${c}`,
|
|
19
|
-
"aria-label":
|
|
19
|
+
"aria-label": _("header.menu", "Assistant menu"),
|
|
20
20
|
"aria-expanded": u,
|
|
21
21
|
"aria-controls": u ? d : void 0,
|
|
22
22
|
"data-testid": "assistant-menu",
|
|
@@ -25,21 +25,20 @@ var s = "flex size-10 shrink-0 items-center justify-center rounded-button transi
|
|
|
25
25
|
"aria-hidden": "true"
|
|
26
26
|
})
|
|
27
27
|
}),
|
|
28
|
-
m ?? null,
|
|
29
28
|
/* @__PURE__ */ a("span", { className: "flex-1" }),
|
|
30
|
-
n(
|
|
29
|
+
n(v) && h ? /* @__PURE__ */ a("button", {
|
|
31
30
|
type: "button",
|
|
32
|
-
onClick:
|
|
33
|
-
className: `${s} ${
|
|
34
|
-
"aria-label":
|
|
35
|
-
"aria-pressed": !!
|
|
31
|
+
onClick: h,
|
|
32
|
+
className: `${s} ${g ? l : c}`,
|
|
33
|
+
"aria-label": v.label ?? _("header.preview", "Preview"),
|
|
34
|
+
"aria-pressed": !!g,
|
|
36
35
|
"data-testid": "assistant-toggle-preview",
|
|
37
36
|
children: /* @__PURE__ */ a(r, {
|
|
38
37
|
className: "size-5",
|
|
39
38
|
"aria-hidden": "true"
|
|
40
39
|
})
|
|
41
40
|
}) : null,
|
|
42
|
-
|
|
41
|
+
m
|
|
43
42
|
]
|
|
44
43
|
});
|
|
45
44
|
};
|
|
@@ -14,10 +14,5 @@ export interface AssistantViewSwitchProps {
|
|
|
14
14
|
readonly ids: LiveAvatarTabIds;
|
|
15
15
|
/** Where this instance sits: the composer (`chat`), or inside the Avatar view (`avatar`, ids with a suffix). */
|
|
16
16
|
readonly instance: 'chat' | 'avatar';
|
|
17
|
-
/**
|
|
18
|
-
* BOFF-13461: `bar` is the page's bar (`AssistantPageBar`), where it is the one instance (`chat` ids) and needs no row of its own.
|
|
19
|
-
* Absent or `row`: the centred row above the composer, as before.
|
|
20
|
-
*/
|
|
21
|
-
readonly placement?: 'row' | 'bar';
|
|
22
17
|
}
|
|
23
18
|
export declare const AssistantViewSwitch: FC<AssistantViewSwitchProps>;
|
|
@@ -11,17 +11,17 @@ function s(e) {
|
|
|
11
11
|
avatarTab: `${e.avatarTab}${o}`
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
var c = ["chat", "avatar"], l = "inline-flex h-11 min-w-24 items-center justify-center rounded-full px-5 text-base font-semibold transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] sm:h-10 sm:min-w-[5.75rem] sm:text-[15px]", u = ({ selected: o, onSelect: u, ids: d, instance: f
|
|
15
|
-
let
|
|
14
|
+
var c = ["chat", "avatar"], l = "inline-flex h-11 min-w-24 items-center justify-center rounded-full px-5 text-base font-semibold transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] sm:h-10 sm:min-w-[5.75rem] sm:text-[15px]", u = ({ selected: o, onSelect: u, ids: d, instance: f }) => {
|
|
15
|
+
let p = e(), m = n(r()), h = i({}), g = f === "avatar" ? s(d) : d, _ = o === "avatar" && m, v = (e, n) => {
|
|
16
16
|
let r = getComputedStyle(e.currentTarget).direction === "rtl", i = t(e.key, c, n, r), a = c.find((e) => e === i);
|
|
17
|
-
a !== void 0 && (e.preventDefault(),
|
|
17
|
+
a !== void 0 && (e.preventDefault(), h.current[a]?.focus());
|
|
18
18
|
};
|
|
19
19
|
return /* @__PURE__ */ a("div", {
|
|
20
|
-
className:
|
|
20
|
+
className: "flex shrink-0 justify-center px-3 pb-2.5 pt-1",
|
|
21
21
|
"data-testid": `assistant-view-switch-row-${f}`,
|
|
22
22
|
children: /* @__PURE__ */ a("div", {
|
|
23
23
|
role: "tablist",
|
|
24
|
-
"aria-label":
|
|
24
|
+
"aria-label": p.tabsLabel,
|
|
25
25
|
className: "inline-flex gap-0.5 rounded-full border border-action-primary-bg/45 bg-[var(--color-accent-soft)] p-1",
|
|
26
26
|
"data-testid": "assistant-view-switch",
|
|
27
27
|
"data-instance": f,
|
|
@@ -29,23 +29,23 @@ var c = ["chat", "avatar"], l = "inline-flex h-11 min-w-24 items-center justify-
|
|
|
29
29
|
let t = e === o, n = e === "chat";
|
|
30
30
|
return /* @__PURE__ */ a("button", {
|
|
31
31
|
ref: (t) => {
|
|
32
|
-
|
|
32
|
+
h.current[e] = t;
|
|
33
33
|
},
|
|
34
34
|
type: "button",
|
|
35
35
|
role: "tab",
|
|
36
|
-
id: n ?
|
|
36
|
+
id: n ? g.chatTab : g.avatarTab,
|
|
37
37
|
"aria-selected": t,
|
|
38
38
|
"aria-controls": n ? d.chatPanel : d.avatarPanel,
|
|
39
|
-
"aria-describedby": n &&
|
|
40
|
-
title: n &&
|
|
39
|
+
"aria-describedby": n && _ ? d.leaveHint : void 0,
|
|
40
|
+
title: n && _ ? p.tabLeaveHint : void 0,
|
|
41
41
|
tabIndex: t ? 0 : -1,
|
|
42
42
|
onClick: () => {
|
|
43
43
|
t || u(e);
|
|
44
44
|
},
|
|
45
|
-
onKeyDown: (t) =>
|
|
45
|
+
onKeyDown: (t) => v(t, e),
|
|
46
46
|
className: `${l} ${t ? "bg-bg-sunken text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
|
|
47
47
|
"data-testid": n ? "assistant-view-chat" : "assistant-view-avatar",
|
|
48
|
-
children: n ?
|
|
48
|
+
children: n ? p.tabChat : p.tabAvatar
|
|
49
49
|
}, e);
|
|
50
50
|
})
|
|
51
51
|
})
|