@burdenoff/fe-libs 2026.1113.10 → 2026.1113.11

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.
@@ -353,6 +353,7 @@ export * from './ui/useAssistantLauncherLift';
353
353
  export * from './ui/AssistantOverlay';
354
354
  export * from './ui/AssistantPageHost';
355
355
  export * from './ui/assistantPageSurface';
356
+ export * from './ui/assistantPageLayout';
356
357
  export * from './ui/assistantPanelLoader';
357
358
  export * from './ui/AssistantPanelPlaceholder';
358
359
  export * from './openui/generativeUi';
@@ -397,6 +398,7 @@ export * from './attachmentAccessCopy';
397
398
  export * from './ui/closeGuard';
398
399
  export * from './ui/compact/compactChrome';
399
400
  export * from './ui/compact/AssistantCompactHeader';
401
+ export * from './ui/compact/AssistantPageBar';
400
402
  export * from './ui/compact/AssistantConversationMenu';
401
403
  export * from './ui/compact/AssistantDiscardDraftDialog';
402
404
  export * from './ui/compact/AssistantMenuView';
@@ -29,309 +29,335 @@ import { AssistantConversationMenu as Pe } from "./compact/AssistantConversation
29
29
  import { AssistantDiscardDraftDialog as Fe } from "./compact/AssistantDiscardDraftDialog.js";
30
30
  import { AssistantMenuView as Ie } from "./compact/AssistantMenuView.js";
31
31
  import { AssistantWindowHeader as Le } from "./compact/AssistantWindowHeader.js";
32
- import { avatarViewSwitchIds as Re } from "./compact/AssistantViewSwitch.js";
33
- import { WINDOW_VOICE_IDLE as ze, useAssistantWindowView as Be } from "./compact/windowView.js";
34
- import { closeRequestAction as Ve, useCompactExpandOffered as He } from "./compact/compactChrome.js";
35
- import { useCallback as n, useEffect as r, useId as Ue, useLayoutEffect as We, useMemo as i, useRef as a, useState as o } from "react";
36
- import { Fragment as Ge, jsx as s, jsxs as c } from "react/jsx-runtime";
32
+ import { AssistantPageBar as Re } from "./compact/AssistantPageBar.js";
33
+ import { AssistantViewSwitch as ze, avatarViewSwitchIds as Be } from "./compact/AssistantViewSwitch.js";
34
+ import { AssistantPageLayoutContext as Ve } from "./assistantPageLayout.js";
35
+ import { WINDOW_VOICE_IDLE as He, useAssistantWindowView as Ue } from "./compact/windowView.js";
36
+ import { closeRequestAction as We, useCompactExpandOffered as Ge } from "./compact/compactChrome.js";
37
+ import { useCallback as n, useEffect as r, useId as Ke, useLayoutEffect as qe, useMemo as i, useRef as a, useState as o } from "react";
38
+ import { Fragment as Je, jsx as s, jsxs as Ye } from "react/jsx-runtime";
37
39
  // src/shared/assistant/ui/AIAssistantPanel.tsx
38
- var Ke = { backgroundColor: "var(--color-bg-elevated)" }, l = ({ onClose: l, visible: u, docked: qe, onToggleDock: Je, writeAccess: Ye, onNavigate: Xe, isShellLessTarget: Ze, connectSourceHref: Qe, onConnectSource: $e, preview: d, liveAvatar: f, presentation: p, onExpandedChange: m, surface: h, onOpenFull: g, avatarSettingsRequest: _, onMinimize: v, windowView: et, onWindowViewChange: tt, pageHosted: y = !1, serverHistory: nt = !1 }) => {
39
- let rt = ke(), it = pe(f);
40
- Ae(nt);
41
- let [at, b] = o(!1), x = Oe(d);
42
- at && !x && b(!1);
43
- let S = at && x, ot = Se();
44
- be(xe(d, ot));
45
- let C = a(null);
46
- je(C);
47
- let { conversations: st, activeConversationId: ct, conversationListOpen: w, setConversationListOpen: T, createConversation: E } = t(), D = p === "compact", O = D && h === "window", [lt, k] = o(!1), [ut, A] = o("root"), [dt, ft] = o(0), pt = a(0);
48
- lt && (!D || O || w || S) && k(!1);
49
- let j = D && lt, [mt, ht] = o(!1), M = He(D && !O && !y && m !== void 0), [N, gt] = o(!1), P = M && N;
40
+ var Xe = { backgroundColor: "var(--color-bg-elevated)" }, c = ({ onClose: c, visible: l, docked: Ze, onToggleDock: Qe, writeAccess: $e, onNavigate: et, isShellLessTarget: tt, connectSourceHref: nt, onConnectSource: rt, preview: u, liveAvatar: d, presentation: f, onExpandedChange: p, surface: m, onOpenFull: h, avatarSettingsRequest: g, onMinimize: _, windowView: it, onWindowViewChange: at, pageHosted: v = !1, serverHistory: ot = !1 }) => {
41
+ let st = ke(), ct = pe(d);
42
+ Ae(ot);
43
+ let [lt, y] = o(!1), b = Oe(u);
44
+ lt && !b && y(!1);
45
+ let x = lt && b, ut = Se();
46
+ be(xe(u, ut));
47
+ let S = a(null);
48
+ je(S);
49
+ let { conversations: dt, activeConversationId: ft, conversationListOpen: C, setConversationListOpen: w, createConversation: T } = t(), E = f === "compact", D = E && m === "window", O = E && v && !D, [pt, k] = o(!1), [mt, A] = o("root"), [ht, gt] = o(0), _t = a(0);
50
+ pt && (!E || D || C || x) && k(!1);
51
+ let j = E && pt, [vt, M] = o(!1), N = Ge(E && !D && !v && p !== void 0), [P, yt] = o(!1), F = N && P;
50
52
  r(() => {
51
- N && !M && (gt(!1), m?.(!1));
53
+ P && !N && (yt(!1), p?.(!1));
52
54
  }, [
55
+ P,
53
56
  N,
54
- M,
55
- m
57
+ p
56
58
  ]);
57
- let _t = () => {
58
- let e = !P;
59
- gt(e), m?.(e);
60
- }, vt = a(!1), yt = a(m);
59
+ let bt = () => {
60
+ let e = !F;
61
+ yt(e), p?.(e);
62
+ }, xt = a(!1), St = a(p);
61
63
  r(() => {
62
- vt.current = P, yt.current = m;
64
+ xt.current = F, St.current = p;
63
65
  }), r(() => () => {
64
- vt.current && yt.current?.(!1);
66
+ xt.current && St.current?.(!1);
65
67
  }, []);
66
- let F = w || S || j, I = f?.tab, L = me(I), [R, z] = o(!1), bt = Be({
67
- stored: et ?? null,
68
- onRemember: tt
68
+ let I = C || x || j, L = d?.tab, Ct = me(L), [R, z] = o(!1), wt = Ue({
69
+ stored: it ?? null,
70
+ onRemember: at
69
71
  });
70
- if (!D) R && (!I || u === !1) && z(!1);
72
+ if (!E) R && (!L || l === !1) && z(!1);
71
73
  else {
72
- let e = bt.view === "avatar" && I?.CompactView !== void 0 && u !== !1 && (L || R);
74
+ let e = wt.view === "avatar" && L?.CompactView !== void 0 && l !== !1 && (Ct || R);
73
75
  e !== R && z(e);
74
76
  }
75
- let xt = I !== void 0 && (L || R) && (!D || I.CompactView !== void 0), B = Ue(), St = Ue(), V = i(() => xt ? {
77
+ let Tt = L !== void 0 && (Ct || R) && (!E || L.CompactView !== void 0), B = Ke(), V = Ke(), H = i(() => Tt ? {
76
78
  chatTab: `${B}-chat-tab`,
77
79
  avatarTab: `${B}-avatar-tab`,
78
80
  chatPanel: `${B}-chat-panel`,
79
81
  avatarPanel: `${B}-avatar-panel`,
80
82
  leaveHint: `${B}-avatar-leave`
81
- } : null, [xt, B]), Ct = n(() => z(!1), []), H = a(null), U = bt.select, W = n((e) => {
82
- H.current = e, U(e);
83
- }, [U]), G = a(null), wt = n((e) => {
84
- G.current = e;
85
- }, []), K = L ? I?.SettingsView : void 0, Tt = n(() => {
86
- O ? g?.({ menu: "settings/avatar" }) : K && (T(!1), b(!1), A("avatar"), ft((e) => e + 1), k(!0));
83
+ } : null, [Tt, B]), Et = n(() => z(!1), []), U = a(null), W = wt.select, G = n((e) => {
84
+ U.current = e, W(e);
85
+ }, [W]), K = a(null), Dt = n((e) => {
86
+ K.current = e;
87
+ }, []), q = Ct ? L?.SettingsView : void 0, Ot = n(() => {
88
+ D ? h?.({ menu: "settings/avatar" }) : q && (w(!1), y(!1), A("avatar"), gt((e) => e + 1), k(!0));
87
89
  }, [
88
- O,
89
- g,
90
- K,
91
- T
92
- ]), [Et, Dt] = o(0), q = i(() => D ? {
93
- surface: O ? "window" : "panel",
90
+ D,
91
+ h,
92
+ q,
93
+ w
94
+ ]), [kt, At] = o(0), J = i(() => E ? {
95
+ surface: D ? "window" : "panel",
94
96
  view: R ? "avatar" : "chat",
95
- selectView: W,
96
- openSettings: Tt,
97
- focusRequest: Et
97
+ selectView: G,
98
+ openSettings: Ot,
99
+ focusRequest: kt
98
100
  } : void 0, [
101
+ E,
99
102
  D,
100
- O,
101
103
  R,
102
- W,
103
- Tt,
104
- Et
105
- ]), Ot = i(() => ({
104
+ G,
105
+ Ot,
106
+ kt
107
+ ]), jt = i(() => ({
106
108
  open: R,
107
- close: D ? () => W("chat") : Ct,
108
- ids: V,
109
- covered: F,
110
- setReplyEscape: wt,
111
- ...q ? { compact: q } : {}
109
+ close: E ? () => G("chat") : Et,
110
+ ids: H,
111
+ covered: I,
112
+ setReplyEscape: Dt,
113
+ ...J ? { compact: J } : {}
112
114
  }), [
113
115
  R,
114
- D,
115
- W,
116
- Ct,
117
- V,
118
- F,
119
- wt,
120
- q
121
- ]), kt = (e) => z(e === "avatar");
122
- We(() => {
123
- let e = H.current;
124
- if (e === null || (H.current = null, !V || e === "avatar" !== R)) return;
125
- let t = R ? Re(V).avatarTab : V.chatTab;
116
+ E,
117
+ G,
118
+ Et,
119
+ H,
120
+ I,
121
+ Dt,
122
+ J
123
+ ]), Mt = (e) => z(e === "avatar");
124
+ qe(() => {
125
+ let e = U.current;
126
+ if (e === null || (U.current = null, !H || e === "avatar" !== R)) return;
127
+ let t = R ? O ? H.avatarTab : Be(H).avatarTab : H.chatTab;
126
128
  document.getElementById(t)?.focus({ preventScroll: !0 });
127
129
  }), r(() => {
128
- D && _ && pt.current !== _ && (pt.current = _, K && !O && (T(!1), b(!1), A("avatar"), ft(_), k(!0)));
130
+ E && g && _t.current !== g && (_t.current = g, q && !D && (w(!1), y(!1), A("avatar"), gt(g), k(!0)));
129
131
  }, [
132
+ E,
133
+ g,
134
+ q,
130
135
  D,
131
- _,
132
- K,
133
- O,
134
- T
136
+ w
135
137
  ]);
136
- let At = Te({
137
- historyOpen: w,
138
- previewOpen: S,
138
+ let Nt = Te({
139
+ historyOpen: C,
140
+ previewOpen: x,
139
141
  avatarOpen: R
140
- }) ?? (j ? "menu" : null), J = (e) => {
142
+ }) ?? (j ? "menu" : null), Y = (e) => {
141
143
  let t = De({
142
- historyOpen: w,
143
- previewOpen: S
144
+ historyOpen: C,
145
+ previewOpen: x
144
146
  }, e);
145
- T(t.historyOpen), b(t.previewOpen);
146
- }, jt = i(() => ({ run: () => w ? { status: "already" } : (T(!0), b(!1), { status: "done" }) }), [w, T]);
147
- le("assistant.history", jt);
148
- let Mt = i(() => x ? {
147
+ w(t.historyOpen), y(t.previewOpen);
148
+ }, Pt = i(() => ({ run: () => C ? { status: "already" } : (w(!0), y(!1), { status: "done" }) }), [C, w]);
149
+ le("assistant.history", Pt);
150
+ let Ft = i(() => b ? {
149
151
  surface: "panel",
150
- run: () => S ? { status: "already" } : (T(!1), b(!0), { status: "done" }),
151
- close: () => S ? (b(!1), { status: "done" }) : { status: "already" }
152
+ run: () => x ? { status: "already" } : (w(!1), y(!0), { status: "done" }),
153
+ close: () => x ? (y(!1), { status: "done" }) : { status: "already" }
152
154
  } : null, [
155
+ b,
153
156
  x,
154
- S,
155
- T
157
+ w
156
158
  ]);
157
- le("assistant.preview", Mt);
158
- let Nt = st.find((e) => e.id === ct), Pt = Nt?.backendSessionId ?? null;
159
- te(Pt, Nt?.mode ?? null, u ?? !0), e(u ?? !0);
160
- let Ft = ne(u !== !1), Y = Me(), X = a(!1), It = n((e) => {
161
- X.current = e;
162
- }, []), Z = a(!1), [Lt, Rt] = o(!1), Q = n(() => Ve({
163
- compact: D,
164
- unsent: X.current,
165
- confirmed: Z.current
166
- }) !== "close" && (Rt(!0), !0), [D]);
159
+ le("assistant.preview", Ft);
160
+ let It = dt.find((e) => e.id === ft), Lt = It?.backendSessionId ?? null;
161
+ te(Lt, It?.mode ?? null, l ?? !0), e(l ?? !0);
162
+ let Rt = ne(l !== !1), X = Me(), Z = a(!1), zt = n((e) => {
163
+ Z.current = e;
164
+ }, []), Bt = a(!1), [Vt, Q] = o(!1), $ = n(() => We({
165
+ compact: E,
166
+ unsent: Z.current,
167
+ confirmed: Bt.current
168
+ }) !== "close" && (Q(!0), !0), [E]);
167
169
  r(() => {
168
- if (D && Y) return Y(Q);
170
+ if (E && X) return X($);
169
171
  }, [
170
- D,
171
- Y,
172
- Q
172
+ E,
173
+ X,
174
+ $
173
175
  ]);
174
- let zt = n(() => {
175
- y || (O && v ? v() : Q() || l());
176
+ let Ht = n(() => {
177
+ v || (D && _ ? _() : $() || c());
176
178
  }, [
177
- y,
178
- O,
179
179
  v,
180
- Q,
181
- l
182
- ]), Bt = () => {
183
- Z.current = !0, X.current = !1, Rt(!1);
180
+ D,
181
+ _,
182
+ $,
183
+ c
184
+ ]), Ut = () => {
185
+ Bt.current = !0, Z.current = !1, Q(!1);
184
186
  try {
185
- l();
187
+ c();
186
188
  } finally {
187
- Z.current = !1;
189
+ Bt.current = !1;
188
190
  }
189
- }, Vt = a(null), Ht = a(null), Ut = a(null), Wt = n(() => k(!1), []), [Gt, Kt] = o(0), qt = n(() => {
190
- E(), k(!1), T(!1), Kt((e) => e + 1);
191
- }, [E, T]), [$, Jt] = o(ze), Yt = n((e) => {
192
- Jt((t) => t.live === e.live ? t : e);
193
- }, []), Xt = he(I), Zt = n((e) => {
194
- g?.(), $.live || e?.review === !0 || (D && R ? Dt((e) => e + 1) : Kt((e) => e + 1));
191
+ }, Wt = a(null), Gt = a(null), Kt = a(null), qt = n(() => k(!1), []), [Jt, Yt] = o(0), Xt = n(() => {
192
+ T(), k(!1), w(!1), Yt((e) => e + 1);
193
+ }, [T, w]), [Zt, Qt] = o(He), $t = n((e) => {
194
+ Qt((t) => t.live === e.live ? t : e);
195
+ }, []), en = he(L), tn = n((e) => {
196
+ h?.(), Zt.live || e?.review === !0 || (E && R ? At((e) => e + 1) : Yt((e) => e + 1));
195
197
  }, [
196
- g,
197
- $.live,
198
- D,
198
+ h,
199
+ Zt.live,
200
+ E,
199
201
  R
200
- ]), Qt = n(() => {
201
- U("chat"), Kt((e) => e + 1);
202
- }, [U]), $t = n(() => {
203
- k(!1), ht(!0);
204
- }, []), en = a(!1);
202
+ ]), nn = n(() => {
203
+ W("chat"), Yt((e) => e + 1);
204
+ }, [W]), rn = n(() => {
205
+ k(!1), M(!0);
206
+ }, []), an = a(!1);
205
207
  return r(() => {
206
- if (en.current && !j) {
208
+ if (an.current && !j) {
207
209
  let e = document.activeElement;
208
- e && e !== document.body && e !== C.current || Ht.current?.focus({ preventScroll: !0 });
210
+ e && e !== document.body && e !== S.current || Gt.current?.focus({ preventScroll: !0 });
209
211
  }
210
- en.current = j;
212
+ an.current = j;
211
213
  }, [j]), r(() => {
212
- Gt > 0 && Vt.current?.focus({ preventScroll: !0 });
213
- }, [Gt]), ee({
214
- panelRef: C,
215
- inputRef: D ? Vt : void 0,
216
- onNewConversation: D ? qt : void 0,
217
- onOpenConversationMenu: D && !O ? $t : void 0,
214
+ Jt > 0 && Wt.current?.focus({ preventScroll: !0 });
215
+ }, [Jt]), ee({
216
+ panelRef: S,
217
+ inputRef: E ? Wt : void 0,
218
+ onNewConversation: E ? Xt : void 0,
219
+ onOpenConversationMenu: E && !D ? rn : void 0,
218
220
  onClose: () => {
219
221
  let e = Ee({
220
- historyOpen: w,
221
- previewOpen: S,
222
+ historyOpen: C,
223
+ previewOpen: x,
222
224
  avatarOpen: R,
223
- tabReplySpeaking: G.current !== null
225
+ tabReplySpeaking: K.current !== null
224
226
  });
225
- e === "overlay" ? (T(!1), b(!1)) : e === "tab-reply" ? G.current?.() : e === "tab" && D ? W("chat") : e === "tab" ? (z(!1), V && document.getElementById(V.chatTab)?.focus()) : j ? k(!1) : zt();
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()) : j ? k(!1) : Ht();
226
228
  }
227
229
  }), /* @__PURE__ */ s(ue, {
228
- visible: u ?? !0,
229
- engine: it,
230
+ visible: l ?? !0,
231
+ engine: ct,
230
232
  children: /* @__PURE__ */ s(de, {
231
- value: f,
233
+ value: d,
232
234
  children: /* @__PURE__ */ s(fe.Provider, {
233
- value: Ot,
235
+ value: jt,
234
236
  children: /* @__PURE__ */ s(ve, {
235
- value: d,
237
+ value: u,
236
238
  children: /* @__PURE__ */ s(ae, {
237
- navigate: Xe,
238
- isShellLessTarget: Ze,
239
+ navigate: et,
240
+ isShellLessTarget: tt,
239
241
  children: /* @__PURE__ */ s(_e, {
240
- value: Qe,
241
- onOpen: $e,
242
- children: /* @__PURE__ */ s(se, { children: /* @__PURE__ */ s(ce, { children: /* @__PURE__ */ c("div", {
243
- ref: C,
244
- className: "relative flex h-full w-full flex-col bg-bg-surface",
245
- style: O ? Ke : void 0,
246
- role: "complementary",
247
- "aria-label": O ? rt("window.title", "Quick assistant") : rt("panel.ariaLabel", "AI Assistant"),
248
- "data-testid": "ai-assistant-panel",
249
- [we]: "",
250
- ...At ? { [Ce]: At } : {},
251
- ...D ? {
252
- "data-presentation": "compact",
253
- ...h ? { "data-assistant-surface": h } : {},
254
- ...P ? { "data-assistant-expanded": "" } : {}
255
- } : {},
256
- ...y ? { "data-assistant-page-hosted": "" } : {},
257
- tabIndex: -1,
258
- children: [
259
- /* @__PURE__ */ c("div", {
260
- className: "contents",
261
- inert: F || void 0,
262
- children: [D ? /* @__PURE__ */ c(Ge, { children: [O ? /* @__PURE__ */ s(Le, {
263
- voiceLive: $.live,
264
- avatarOn: Xt,
265
- onOpenFull: Zt,
266
- onMinimize: () => v?.()
267
- }) : /* @__PURE__ */ s(Ne, {
268
- contextLabel: Ft,
269
- menuOpen: j,
270
- menuViewId: St,
271
- onOpenMenu: () => {
272
- A("root"), k(!0);
273
- },
274
- menuButtonRef: Ht,
275
- conversationMenu: /* @__PURE__ */ s(Pe, {
276
- open: mt,
277
- onOpenChange: ht,
278
- triggerRef: Ut
279
- }),
280
- expandOffered: M,
281
- expanded: P,
282
- onToggleExpanded: _t,
283
- onTogglePreview: () => J("preview"),
284
- previewOpen: S,
285
- onClose: y ? void 0 : zt
286
- }), /* @__PURE__ */ s(Fe, {
287
- open: Lt,
288
- onKeep: () => Rt(!1),
289
- onDiscard: Bt
290
- })] }) : /* @__PURE__ */ s(re, {
291
- contextLabel: Ft,
292
- onNewConversation: () => E(),
293
- onOpenHistory: () => J("history"),
294
- historyOpen: w,
295
- onTogglePreview: () => J("preview"),
296
- previewOpen: S,
297
- onClose: y ? void 0 : l,
298
- docked: qe,
299
- onToggleDock: y ? void 0 : Je
300
- }), V && !D ? /* @__PURE__ */ s(ge, {
301
- selected: R ? "avatar" : "chat",
302
- onSelect: kt,
303
- ids: V
304
- }) : null]
305
- }),
306
- w ? /* @__PURE__ */ s(oe, { presentation: p }) : j ? /* @__PURE__ */ s(Ie, {
307
- initialView: ut,
308
- id: St,
309
- onClose: Wt,
310
- onRequestClosePanel: y ? void 0 : zt,
311
- onNewConversation: qt,
312
- AvatarSettings: K,
313
- docked: qe,
314
- onToggleDock: y ? void 0 : Je
315
- }, dt) : null,
316
- S && /* @__PURE__ */ s(ye, { onClose: () => b(!1) }),
317
- /* @__PURE__ */ s("div", {
318
- className: "contents",
319
- inert: F || void 0,
320
- children: /* @__PURE__ */ s(ie, {
321
- visible: u ?? !0,
322
- writeAccess: Ye,
323
- presentation: p,
324
- inputRef: D ? Vt : void 0,
325
- onDraftDirtyChange: D ? It : void 0,
326
- ...O ? {
327
- surface: h,
328
- onWindowVoiceChange: Yt,
329
- onOpenFull: Zt,
330
- onContinuedInChat: Qt
331
- } : {}
242
+ value: nt,
243
+ onOpen: rt,
244
+ children: /* @__PURE__ */ s(se, { children: /* @__PURE__ */ s(ce, { children: /* @__PURE__ */ s(Ve.Provider, {
245
+ value: O,
246
+ children: /* @__PURE__ */ Ye("div", {
247
+ ref: S,
248
+ className: "relative flex h-full w-full flex-col bg-bg-surface",
249
+ style: D ? Xe : void 0,
250
+ role: "complementary",
251
+ "aria-label": D ? st("window.title", "Quick assistant") : st("panel.ariaLabel", "AI Assistant"),
252
+ "data-testid": "ai-assistant-panel",
253
+ [we]: "",
254
+ ...Nt ? { [Ce]: Nt } : {},
255
+ ...E ? {
256
+ "data-presentation": "compact",
257
+ ...m ? { "data-assistant-surface": m } : {},
258
+ ...F ? { "data-assistant-expanded": "" } : {}
259
+ } : {},
260
+ ...v ? { "data-assistant-page-hosted": "" } : {},
261
+ tabIndex: -1,
262
+ children: [
263
+ /* @__PURE__ */ Ye("div", {
264
+ className: "contents",
265
+ inert: I || void 0,
266
+ children: [E ? /* @__PURE__ */ Ye(Je, { children: [D ? /* @__PURE__ */ s(Le, {
267
+ voiceLive: Zt.live,
268
+ avatarOn: en,
269
+ onOpenFull: tn,
270
+ onMinimize: () => _?.()
271
+ }) : O ? /* @__PURE__ */ s(Re, {
272
+ menuOpen: j,
273
+ menuViewId: V,
274
+ onOpenMenu: () => {
275
+ A("root"), k(!0);
276
+ },
277
+ menuButtonRef: Gt,
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,
285
+ conversationMenu: /* @__PURE__ */ s(Pe, {
286
+ open: vt,
287
+ onOpenChange: M,
288
+ triggerRef: Kt
289
+ }),
290
+ onTogglePreview: () => Y("preview"),
291
+ previewOpen: x
292
+ }) : /* @__PURE__ */ s(Ne, {
293
+ contextLabel: Rt,
294
+ menuOpen: j,
295
+ menuViewId: V,
296
+ onOpenMenu: () => {
297
+ A("root"), k(!0);
298
+ },
299
+ menuButtonRef: Gt,
300
+ conversationMenu: /* @__PURE__ */ s(Pe, {
301
+ open: vt,
302
+ onOpenChange: M,
303
+ triggerRef: Kt
304
+ }),
305
+ expandOffered: N,
306
+ expanded: F,
307
+ onToggleExpanded: bt,
308
+ onTogglePreview: () => Y("preview"),
309
+ previewOpen: x,
310
+ onClose: v ? void 0 : Ht
311
+ }), /* @__PURE__ */ s(Fe, {
312
+ open: Vt,
313
+ onKeep: () => Q(!1),
314
+ onDiscard: Ut
315
+ })] }) : /* @__PURE__ */ s(re, {
316
+ contextLabel: Rt,
317
+ onNewConversation: () => T(),
318
+ onOpenHistory: () => Y("history"),
319
+ historyOpen: C,
320
+ onTogglePreview: () => Y("preview"),
321
+ previewOpen: x,
322
+ onClose: v ? void 0 : c,
323
+ docked: Ze,
324
+ onToggleDock: v ? void 0 : Qe
325
+ }), H && !E ? /* @__PURE__ */ s(ge, {
326
+ selected: R ? "avatar" : "chat",
327
+ onSelect: Mt,
328
+ ids: H
329
+ }) : null]
330
+ }),
331
+ C ? /* @__PURE__ */ s(oe, { presentation: f }) : j ? /* @__PURE__ */ s(Ie, {
332
+ initialView: mt,
333
+ id: V,
334
+ onClose: qt,
335
+ onRequestClosePanel: v ? void 0 : Ht,
336
+ onNewConversation: Xt,
337
+ AvatarSettings: q,
338
+ docked: Ze,
339
+ onToggleDock: v ? void 0 : Qe
340
+ }, ht) : null,
341
+ x && /* @__PURE__ */ s(ye, { onClose: () => y(!1) }),
342
+ /* @__PURE__ */ s("div", {
343
+ className: "contents",
344
+ inert: I || void 0,
345
+ children: /* @__PURE__ */ s(ie, {
346
+ visible: l ?? !0,
347
+ writeAccess: $e,
348
+ presentation: f,
349
+ inputRef: E ? Wt : void 0,
350
+ onDraftDirtyChange: E ? zt : void 0,
351
+ ...D ? {
352
+ surface: m,
353
+ onWindowVoiceChange: $t,
354
+ onOpenFull: tn,
355
+ onContinuedInChat: nn
356
+ } : {}
357
+ })
332
358
  })
333
- })
334
- ]
359
+ ]
360
+ })
335
361
  }) }) })
336
362
  })
337
363
  })
@@ -340,4 +366,4 @@ var Ke = { backgroundColor: "var(--color-bg-elevated)" }, l = ({ onClose: l, vis
340
366
  })
341
367
  });
342
368
  };
343
- export { l as AIAssistantPanel };
369
+ export { c as AIAssistantPanel };