@burdenoff/fe-libs 2026.1029.11 → 2026.1030.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.
Files changed (39) hide show
  1. package/dist/shared/assistant/i18nManifest.d.ts +18 -0
  2. package/dist/shared/assistant/i18nManifest.js +18 -0
  3. package/dist/shared/assistant/index.d.ts +4 -0
  4. package/dist/shared/assistant/ui/AIAssistantPanel.d.ts +9 -1
  5. package/dist/shared/assistant/ui/AIAssistantPanel.js +194 -174
  6. package/dist/shared/assistant/ui/AssistantChatArea.d.ts +33 -0
  7. package/dist/shared/assistant/ui/AssistantChatArea.js +1463 -1397
  8. package/dist/shared/assistant/ui/AssistantLanguageMenu.d.ts +9 -1
  9. package/dist/shared/assistant/ui/AssistantLanguageMenu.js +22 -22
  10. package/dist/shared/assistant/ui/AssistantOverlay.d.ts +16 -2
  11. package/dist/shared/assistant/ui/AssistantOverlay.js +219 -200
  12. package/dist/shared/assistant/ui/assistantOverlayState.d.ts +16 -2
  13. package/dist/shared/assistant/ui/assistantOverlayState.js +57 -40
  14. package/dist/shared/assistant/ui/compact/AssistantConversationMenu.js +53 -52
  15. package/dist/shared/assistant/ui/compact/AssistantDiscardDraftDialog.js +3 -4
  16. package/dist/shared/assistant/ui/compact/AssistantLanguagePill.d.ts +29 -0
  17. package/dist/shared/assistant/ui/compact/AssistantLanguagePill.js +98 -0
  18. package/dist/shared/assistant/ui/compact/AssistantVoiceReady.d.ts +31 -0
  19. package/dist/shared/assistant/ui/compact/AssistantVoiceReady.js +41 -0
  20. package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.d.ts +6 -0
  21. package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.js +5 -5
  22. package/dist/shared/assistant/ui/compact/AssistantWindowHeader.d.ts +22 -5
  23. package/dist/shared/assistant/ui/compact/AssistantWindowHeader.js +45 -31
  24. package/dist/shared/assistant/ui/compact/windowView.d.ts +50 -0
  25. package/dist/shared/assistant/ui/compact/windowView.js +31 -0
  26. package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +6 -0
  27. package/dist/shared/assistant/ui/composer/AssistantComposer.js +90 -89
  28. package/dist/shared/assistant/ui/composer/AssistantModeMenu.d.ts +6 -0
  29. package/dist/shared/assistant/ui/composer/AssistantModeMenu.js +83 -83
  30. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +31 -0
  31. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +270 -166
  32. package/dist/shared/assistant/ui/voice/VoiceStage.d.ts +8 -0
  33. package/dist/shared/assistant/ui/voice/VoiceStage.js +10 -10
  34. package/dist/shared/assistant/voice/voiceStartedCue.d.ts +11 -0
  35. package/dist/shared/assistant/voice/voiceStartedCue.js +7 -0
  36. package/dist/shared-assistant.js +266 -262
  37. package/dist/ui/modal-shell.d.ts +6 -1
  38. package/dist/ui/modal-shell.js +7 -6
  39. package/package.json +1 -1
@@ -660,11 +660,29 @@ export declare const ASSISTANT_I18N_LITERAL_COPY: {
660
660
  readonly 'voiceSession.transcriptTitle': "Voice transcript";
661
661
  readonly 'voiceSession.unmute': "Turn the microphone on";
662
662
  readonly 'waitingChange.review': "Review";
663
+ readonly 'waitingChange.reviewInFull': "Review in full assistant";
663
664
  readonly 'waitingChange.reviewLabel': "Review the change waiting for your approval";
664
665
  readonly 'waitingChange.status': "{{count}} change(s) waiting for your approval";
666
+ readonly 'window.endVoice': "End voice";
667
+ readonly 'window.hideTranscript': "Hide transcript";
668
+ readonly 'window.language': "Language";
669
+ readonly 'window.languageLocked': "Change the language after you end voice";
670
+ readonly 'window.languagePinned': "Replies in {{language}} — change in full assistant";
665
671
  readonly 'window.minimize': "Minimize";
672
+ readonly 'window.minimizeEndsVoice': "Minimize (ends voice)";
673
+ readonly 'window.mute': "Mute";
666
674
  readonly 'window.openFull': "Open full assistant";
675
+ readonly 'window.showTranscript': "Show transcript";
676
+ readonly 'window.startVoice': "Start voice";
677
+ readonly 'window.stopSpeaking': "Stop speaking";
667
678
  readonly 'window.title': "Quick assistant";
679
+ readonly 'window.unmute': "Unmute";
680
+ readonly 'window.view': "View";
681
+ readonly 'window.viewChat': "Chat";
682
+ readonly 'window.viewVoice': "Voice";
683
+ readonly 'window.voiceReadyStatus': "The microphone starts only when you press Start voice.";
684
+ readonly 'window.voiceReadyTitle': "Talk to the assistant";
685
+ readonly 'window.voiceStartedCue': "Started a voice conversation. Your chat is in History.";
668
686
  readonly 'writeConsent.body': "In {{mode}} mode the assistant can read AND change your data — creating records, logging activity, updating details, and more, on your behalf.";
669
687
  readonly 'writeConsent.cancel': "Stay in {{mode}}";
670
688
  readonly 'writeConsent.confirm': "Enable {{mode}}";
@@ -553,11 +553,29 @@ var g = {
553
553
  "voiceSession.transcriptTitle": "Voice transcript",
554
554
  "voiceSession.unmute": "Turn the microphone on",
555
555
  "waitingChange.review": "Review",
556
+ "waitingChange.reviewInFull": "Review in full assistant",
556
557
  "waitingChange.reviewLabel": "Review the change waiting for your approval",
557
558
  "waitingChange.status": "{{count}} change(s) waiting for your approval",
559
+ "window.endVoice": "End voice",
560
+ "window.hideTranscript": "Hide transcript",
561
+ "window.language": "Language",
562
+ "window.languageLocked": "Change the language after you end voice",
563
+ "window.languagePinned": "Replies in {{language}} — change in full assistant",
558
564
  "window.minimize": "Minimize",
565
+ "window.minimizeEndsVoice": "Minimize (ends voice)",
566
+ "window.mute": "Mute",
559
567
  "window.openFull": "Open full assistant",
568
+ "window.showTranscript": "Show transcript",
569
+ "window.startVoice": "Start voice",
570
+ "window.stopSpeaking": "Stop speaking",
560
571
  "window.title": "Quick assistant",
572
+ "window.unmute": "Unmute",
573
+ "window.view": "View",
574
+ "window.viewChat": "Chat",
575
+ "window.viewVoice": "Voice",
576
+ "window.voiceReadyStatus": "The microphone starts only when you press Start voice.",
577
+ "window.voiceReadyTitle": "Talk to the assistant",
578
+ "window.voiceStartedCue": "Started a voice conversation. Your chat is in History.",
561
579
  "writeConsent.body": "In {{mode}} mode the assistant can read AND change your data — creating records, logging activity, updating details, and more, on your behalf.",
562
580
  "writeConsent.cancel": "Stay in {{mode}}",
563
581
  "writeConsent.confirm": "Enable {{mode}}",
@@ -84,6 +84,7 @@ export * from './voice/captionText';
84
84
  export * from './voice/languagePair';
85
85
  export * from './voice/languages';
86
86
  export * from './voice/voiceReopen';
87
+ export * from './voice/voiceStartedCue';
87
88
  export * from './pendingWrite';
88
89
  export * from './liveTurns';
89
90
  export * from './images';
@@ -381,5 +382,8 @@ export * from './ui/compact/AssistantMenuView';
381
382
  export * from './ui/compact/AssistantVoiceLanguageSettings';
382
383
  export * from './ui/compact/AssistantWaitingChangeRow';
383
384
  export * from './ui/compact/AssistantWindowHeader';
385
+ export * from './ui/compact/AssistantLanguagePill';
386
+ export * from './ui/compact/AssistantVoiceReady';
387
+ export * from './ui/compact/windowView';
384
388
  export * from './ui/useAssistantVisualViewport';
385
389
  export * from './ui/compact/waitingChange';
@@ -5,7 +5,7 @@ import { AssistantNavigate } from './AssistantMarkdownRenderer';
5
5
  import { AssistantLiveAvatarSeam } from './assistantLiveAvatarSeam';
6
6
  import { AssistantPreviewController } from '../preview/types';
7
7
  import { AssistantPresentation } from './composer/AssistantComposer';
8
- import { AssistantSurface } from './assistantOverlayState';
8
+ import { AssistantSurface, AssistantWindowView } from './assistantOverlayState';
9
9
  export type AIAssistantPanelProps = PanelProps & {
10
10
  /** When provided, renders a dock/float toggle in the header. */
11
11
  docked?: boolean;
@@ -142,6 +142,14 @@ export type AIAssistantPanelProps = PanelProps & {
142
142
  * Escape does there: it never asks to discard a draft the hidden window keeps.
143
143
  */
144
144
  onMinimize?: () => void;
145
+ /**
146
+ * BOFF-10180 (compact window only): the window's LAST USED view (CW-V), or
147
+ * null when none was ever chosen. The first time the window opens on Voice
148
+ * where voice is available here, else on Chat.
149
+ */
150
+ windowView?: AssistantWindowView | null;
151
+ /** Compact window: the person chose Chat or Voice, so the host remembers it. */
152
+ onWindowViewChange?: (view: AssistantWindowView) => void;
145
153
  };
146
154
  /**
147
155
  * The panel.
@@ -30,255 +30,275 @@ import { AssistantConversationMenu as Fe } from "./compact/AssistantConversation
30
30
  import { AssistantDiscardDraftDialog as Ie } from "./compact/AssistantDiscardDraftDialog.js";
31
31
  import { AssistantMenuView as Le } from "./compact/AssistantMenuView.js";
32
32
  import { AssistantWindowHeader as Re } from "./compact/AssistantWindowHeader.js";
33
- import { useCallback as n, useEffect as r, useId as ze, useMemo as i, useRef as a, useState as o } from "react";
34
- import { Fragment as Be, jsx as s, jsxs as c } from "react/jsx-runtime";
33
+ import { WINDOW_VOICE_IDLE as ze, useAssistantWindowView as Be } from "./compact/windowView.js";
34
+ import { useCallback as n, useEffect as r, useId as Ve, useMemo as i, useRef as a, useState as o } from "react";
35
+ import { Fragment as He, jsx as s, jsxs as c } from "react/jsx-runtime";
35
36
  //#region src/shared/assistant/ui/AIAssistantPanel.tsx
36
- var Ve = { backgroundColor: "var(--color-bg-elevated)" }, l = ({ onClose: l, visible: u, docked: d, onToggleDock: f, writeAccess: He, onNavigate: Ue, isShellLessTarget: We, connectSourceHref: Ge, onConnectSource: Ke, preview: p, liveAvatar: m, presentation: h, onExpandedChange: g, surface: _, onOpenFull: v, onMinimize: y, serverHistory: qe = !1 }) => {
37
- let b = te(), Je = de(m);
38
- Te(qe);
39
- let [Ye, x] = o(!1), S = ge(p);
40
- Ye && !S && x(!1);
41
- let C = Ye && S;
42
- me(_e(p, ve()));
43
- let w = a(null);
44
- e(w);
45
- let { conversations: Xe, activeConversationId: Ze, conversationListOpen: T, setConversationListOpen: E, createConversation: D } = ne(), O = h === "compact", k = O && _ === "window", [Qe, A] = o(!1), j = a(!1);
46
- Qe && (!O || k || T || C) && A(!1);
47
- let M = O && Qe, [$e, et] = o(!1), N = je(O && !k && g !== void 0), [P, tt] = o(!1), F = N && P;
37
+ var Ue = { backgroundColor: "var(--color-bg-elevated)" }, l = ({ onClose: l, visible: u, docked: We, onToggleDock: d, writeAccess: Ge, onNavigate: Ke, isShellLessTarget: qe, connectSourceHref: Je, onConnectSource: Ye, preview: f, liveAvatar: p, presentation: m, onExpandedChange: h, surface: g, onOpenFull: Xe, onMinimize: _, windowView: Ze, onWindowViewChange: Qe, serverHistory: $e = !1 }) => {
38
+ let v = te(), et = de(p);
39
+ Te($e);
40
+ let [tt, y] = o(!1), b = ge(f);
41
+ tt && !b && y(!1);
42
+ let x = tt && b;
43
+ me(_e(f, ve()));
44
+ let S = a(null);
45
+ e(S);
46
+ let { conversations: nt, activeConversationId: rt, conversationListOpen: C, setConversationListOpen: w, createConversation: T } = ne(), E = m === "compact", D = E && g === "window", [it, O] = o(!1), k = a(!1);
47
+ it && (!E || D || C || x) && O(!1);
48
+ let A = E && it, [at, ot] = o(!1), j = je(E && !D && h !== void 0), [M, st] = o(!1), N = j && M;
48
49
  r(() => {
49
- P && !N && (tt(!1), g?.(!1));
50
+ M && !j && (st(!1), h?.(!1));
50
51
  }, [
51
- P,
52
- N,
53
- g
52
+ M,
53
+ j,
54
+ h
54
55
  ]);
55
- let nt = () => {
56
- let e = !F;
57
- tt(e), g?.(e);
58
- }, rt = a(!1), it = a(g);
56
+ let ct = () => {
57
+ let e = !N;
58
+ st(e), h?.(e);
59
+ }, lt = a(!1), ut = a(h);
59
60
  r(() => {
60
- rt.current = F, it.current = g;
61
+ lt.current = N, ut.current = h;
61
62
  }), r(() => () => {
62
- rt.current && it.current?.(!1);
63
+ lt.current && ut.current?.(!1);
63
64
  }, []);
64
- let I = T || C || M, L = m?.tab, at = fe(L), [R, z] = o(!1);
65
- R && (!L || u === !1 || k) && z(!1);
66
- let B = L !== void 0 && (at || R), V = ze(), ot = ze(), H = i(() => B ? {
67
- chatTab: `${V}-chat-tab`,
68
- avatarTab: `${V}-avatar-tab`,
69
- chatPanel: `${V}-chat-panel`,
70
- avatarPanel: `${V}-avatar-panel`,
71
- leaveHint: `${V}-avatar-leave`
72
- } : null, [B, V]), st = n(() => z(!1), []), U = a(null), ct = n((e) => {
73
- U.current = e;
74
- }, []), lt = i(() => ({
75
- open: R,
76
- close: st,
77
- ids: H,
78
- covered: I,
79
- setReplyEscape: ct
65
+ let P = C || x || A, F = p?.tab, dt = fe(F), [I, L] = o(!1);
66
+ I && (!F || u === !1 || D) && L(!1);
67
+ let R = F !== void 0 && (dt || I), z = Ve(), ft = Ve(), B = i(() => R ? {
68
+ chatTab: `${z}-chat-tab`,
69
+ avatarTab: `${z}-avatar-tab`,
70
+ chatPanel: `${z}-chat-panel`,
71
+ avatarPanel: `${z}-avatar-panel`,
72
+ leaveHint: `${z}-avatar-leave`
73
+ } : null, [R, z]), pt = n(() => L(!1), []), V = a(null), mt = n((e) => {
74
+ V.current = e;
75
+ }, []), ht = i(() => ({
76
+ open: I,
77
+ close: pt,
78
+ ids: B,
79
+ covered: P,
80
+ setReplyEscape: mt
80
81
  }), [
81
- R,
82
- st,
83
- H,
84
82
  I,
85
- ct
86
- ]), ut = (e) => z(e === "avatar"), dt = () => {
87
- A(!1), ut("avatar"), j.current = !0;
88
- }, ft = oe({
89
- historyOpen: T,
90
- previewOpen: C,
91
- avatarOpen: R
92
- }) ?? (M ? "menu" : null), W = (e) => {
83
+ pt,
84
+ B,
85
+ P,
86
+ mt
87
+ ]), gt = (e) => L(e === "avatar"), _t = () => {
88
+ O(!1), gt("avatar"), k.current = !0;
89
+ }, vt = oe({
90
+ historyOpen: C,
91
+ previewOpen: x,
92
+ avatarOpen: I
93
+ }) ?? (A ? "menu" : null), H = (e) => {
93
94
  let t = ce({
94
- historyOpen: T,
95
- previewOpen: C
95
+ historyOpen: C,
96
+ previewOpen: x
96
97
  }, e);
97
- E(t.historyOpen), x(t.previewOpen);
98
+ w(t.historyOpen), y(t.previewOpen);
98
99
  };
99
- t("assistant.history", i(() => ({ run: () => T ? { status: "already" } : (E(!0), x(!1), { status: "done" }) }), [T, E])), t("assistant.preview", i(() => S ? {
100
+ t("assistant.history", i(() => ({ run: () => C ? { status: "already" } : (w(!0), y(!1), { status: "done" }) }), [C, w])), t("assistant.preview", i(() => b ? {
100
101
  surface: "panel",
101
- run: () => C ? { status: "already" } : (E(!1), x(!0), { status: "done" }),
102
- close: () => C ? (x(!1), { status: "done" }) : { status: "already" }
102
+ run: () => x ? { status: "already" } : (w(!1), y(!0), { status: "done" }),
103
+ close: () => x ? (y(!1), { status: "done" }) : { status: "already" }
103
104
  } : null, [
104
- S,
105
- C,
106
- E
105
+ b,
106
+ x,
107
+ w
107
108
  ]));
108
- let G = Xe.find((e) => e.id === Ze);
109
- Oe(G?.backendSessionId ?? null, G?.mode ?? null, u ?? !0), Ee(u ?? !0);
110
- let pt = ee(u !== !1), K = Ne(), q = a(!1), mt = n((e) => {
111
- q.current = e;
112
- }, []), J = a(!1), [ht, Y] = o(!1), X = n(() => Ae({
113
- compact: O,
114
- unsent: q.current,
115
- confirmed: J.current
116
- }) === "close" ? !1 : (Y(!0), !0), [O]);
109
+ let yt = nt.find((e) => e.id === rt);
110
+ Oe(yt?.backendSessionId ?? null, yt?.mode ?? null, u ?? !0), Ee(u ?? !0);
111
+ let bt = ee(u !== !1), U = Ne(), W = a(!1), xt = n((e) => {
112
+ W.current = e;
113
+ }, []), G = a(!1), [St, K] = o(!1), q = n(() => Ae({
114
+ compact: E,
115
+ unsent: W.current,
116
+ confirmed: G.current
117
+ }) === "close" ? !1 : (K(!0), !0), [E]);
117
118
  r(() => {
118
- if (!(!O || !K)) return K(X);
119
+ if (!(!E || !U)) return U(q);
119
120
  }, [
120
- O,
121
- K,
122
- X
121
+ E,
122
+ U,
123
+ q
123
124
  ]);
124
- let Z = n(() => {
125
- if (k && y) {
126
- y();
125
+ let J = n(() => {
126
+ if (D && _) {
127
+ _();
127
128
  return;
128
129
  }
129
- X() || l();
130
+ q() || l();
130
131
  }, [
131
- k,
132
- y,
133
- X,
132
+ D,
133
+ _,
134
+ q,
134
135
  l
135
- ]), gt = () => {
136
- J.current = !0, q.current = !1, Y(!1);
136
+ ]), Ct = () => {
137
+ G.current = !0, W.current = !1, K(!1);
137
138
  try {
138
139
  l();
139
140
  } finally {
140
- J.current = !1;
141
+ G.current = !1;
141
142
  }
142
- }, Q = a(null), _t = a(null), vt = a(null), yt = n(() => A(!1), []), [bt, xt] = o(0), St = n(() => {
143
- D(), A(!1), E(!1), xt((e) => e + 1);
144
- }, [D, E]), Ct = n(() => {
145
- v?.(), xt((e) => e + 1);
146
- }, [v]), wt = n(() => {
147
- A(!1), et(!0);
148
- }, []), $ = a(!1);
143
+ }, Y = a(null), wt = a(null), Tt = a(null), Et = n(() => O(!1), []), [Dt, X] = o(0), Ot = n(() => {
144
+ T(), O(!1), w(!1), X((e) => e + 1);
145
+ }, [T, w]), [Z, kt] = o(ze), At = n((e) => {
146
+ kt((t) => t.available === e.available && t.live === e.live ? t : e);
147
+ }, []), Q = Be({
148
+ stored: Ze ?? null,
149
+ onRemember: Qe,
150
+ voice: Z
151
+ }), jt = n((e) => {
152
+ Xe?.(), !Z.live && e?.review !== !0 && X((e) => e + 1);
153
+ }, [Xe, Z.live]), $ = Q.remember, Mt = n(() => $("chat"), [$]), Nt = n(() => {
154
+ $("chat"), X((e) => e + 1);
155
+ }, [$]), Pt = n(() => {
156
+ O(!1), ot(!0);
157
+ }, []), Ft = a(!1);
149
158
  return r(() => {
150
- if ($.current && !M) {
159
+ if (Ft.current && !A) {
151
160
  let e = document.activeElement;
152
- (!e || e === document.body || e === w.current) && _t.current?.focus({ preventScroll: !0 });
161
+ (!e || e === document.body || e === S.current) && wt.current?.focus({ preventScroll: !0 });
153
162
  }
154
- $.current = M;
155
- }, [M]), r(() => {
156
- bt > 0 && Q.current?.focus({ preventScroll: !0 });
157
- }, [bt]), r(() => {
158
- !j.current || !R || !H || (j.current = !1, document.getElementById(H.avatarTab)?.focus({ preventScroll: !0 }));
159
- }, [R, H]), ke({
160
- panelRef: w,
161
- inputRef: O ? Q : void 0,
162
- onNewConversation: O ? St : void 0,
163
- onOpenConversationMenu: O && !k ? wt : void 0,
163
+ Ft.current = A;
164
+ }, [A]), r(() => {
165
+ Dt > 0 && Y.current?.focus({ preventScroll: !0 });
166
+ }, [Dt]), r(() => {
167
+ !k.current || !I || !B || (k.current = !1, document.getElementById(B.avatarTab)?.focus({ preventScroll: !0 }));
168
+ }, [I, B]), ke({
169
+ panelRef: S,
170
+ inputRef: E ? Y : void 0,
171
+ onNewConversation: E ? Ot : void 0,
172
+ onOpenConversationMenu: E && !D ? Pt : void 0,
164
173
  onClose: () => {
165
174
  let e = se({
166
- historyOpen: T,
167
- previewOpen: C,
168
- avatarOpen: R,
169
- tabReplySpeaking: U.current !== null
175
+ historyOpen: C,
176
+ previewOpen: x,
177
+ avatarOpen: I,
178
+ tabReplySpeaking: V.current !== null
170
179
  });
171
180
  if (e === "overlay") {
172
- E(!1), x(!1);
181
+ w(!1), y(!1);
173
182
  return;
174
183
  }
175
184
  if (e === "tab-reply") {
176
- U.current?.();
185
+ V.current?.();
177
186
  return;
178
187
  }
179
188
  if (e === "tab") {
180
- z(!1), H && document.getElementById(H.chatTab)?.focus();
189
+ L(!1), B && document.getElementById(B.chatTab)?.focus();
181
190
  return;
182
191
  }
183
- if (M) {
184
- A(!1);
192
+ if (A) {
193
+ O(!1);
185
194
  return;
186
195
  }
187
- Z();
196
+ J();
188
197
  }
189
198
  }), /* @__PURE__ */ s(re, {
190
199
  visible: u ?? !0,
191
- engine: Je,
200
+ engine: et,
192
201
  children: /* @__PURE__ */ s(le, {
193
- value: m,
202
+ value: p,
194
203
  children: /* @__PURE__ */ s(ue.Provider, {
195
- value: lt,
204
+ value: ht,
196
205
  children: /* @__PURE__ */ s(pe, {
197
- value: p,
206
+ value: f,
198
207
  children: /* @__PURE__ */ s(we, {
199
- navigate: Ue,
200
- isShellLessTarget: We,
208
+ navigate: Ke,
209
+ isShellLessTarget: qe,
201
210
  children: /* @__PURE__ */ s(he, {
202
- value: Ge,
203
- onOpen: Ke,
211
+ value: Je,
212
+ onOpen: Ye,
204
213
  children: /* @__PURE__ */ s(Se, { children: /* @__PURE__ */ s(Ce, { children: /* @__PURE__ */ c("div", {
205
- ref: w,
214
+ ref: S,
206
215
  className: "relative flex h-full w-full flex-col bg-bg-surface",
207
- style: k ? Ve : void 0,
216
+ style: D ? Ue : void 0,
208
217
  role: "complementary",
209
- "aria-label": k ? b("window.title", "Quick assistant") : b("panel.ariaLabel", "AI Assistant"),
218
+ "aria-label": D ? v("window.title", "Quick assistant") : v("panel.ariaLabel", "AI Assistant"),
210
219
  "data-testid": "ai-assistant-panel",
211
220
  [ae]: "",
212
- ...ft ? { [ie]: ft } : {},
213
- ...O ? {
221
+ ...vt ? { [ie]: vt } : {},
222
+ ...E ? {
214
223
  "data-presentation": "compact",
215
- ..._ ? { "data-assistant-surface": _ } : {},
216
- ...F ? { "data-assistant-expanded": "" } : {}
224
+ ...g ? { "data-assistant-surface": g } : {},
225
+ ...N ? { "data-assistant-expanded": "" } : {}
217
226
  } : {},
218
227
  tabIndex: -1,
219
228
  children: [
220
229
  /* @__PURE__ */ c("div", {
221
230
  className: "contents",
222
- inert: I || void 0,
223
- children: [O ? /* @__PURE__ */ c(Be, { children: [k ? /* @__PURE__ */ s(Re, {
224
- onOpenFull: Ct,
225
- onMinimize: () => y?.()
231
+ inert: P || void 0,
232
+ children: [E ? /* @__PURE__ */ c(He, { children: [D ? /* @__PURE__ */ s(Re, {
233
+ view: Q.view,
234
+ onSelectView: Q.select,
235
+ voiceLive: Z.live,
236
+ onOpenFull: jt,
237
+ onMinimize: () => _?.()
226
238
  }) : /* @__PURE__ */ s(Pe, {
227
- contextLabel: pt,
228
- menuOpen: M,
229
- menuViewId: ot,
230
- onOpenMenu: () => A(!0),
231
- menuButtonRef: _t,
239
+ contextLabel: bt,
240
+ menuOpen: A,
241
+ menuViewId: ft,
242
+ onOpenMenu: () => O(!0),
243
+ menuButtonRef: wt,
232
244
  conversationMenu: /* @__PURE__ */ s(Fe, {
233
- open: $e,
234
- onOpenChange: et,
235
- triggerRef: vt
245
+ open: at,
246
+ onOpenChange: ot,
247
+ triggerRef: Tt
236
248
  }),
237
- expandOffered: N,
238
- expanded: F,
239
- onToggleExpanded: nt,
240
- onTogglePreview: () => W("preview"),
241
- previewOpen: C,
242
- onClose: Z
249
+ expandOffered: j,
250
+ expanded: N,
251
+ onToggleExpanded: ct,
252
+ onTogglePreview: () => H("preview"),
253
+ previewOpen: x,
254
+ onClose: J
243
255
  }), /* @__PURE__ */ s(Ie, {
244
- open: ht,
245
- onKeep: () => Y(!1),
246
- onDiscard: gt
256
+ open: St,
257
+ onKeep: () => K(!1),
258
+ onDiscard: Ct
247
259
  })] }) : /* @__PURE__ */ s(be, {
248
- contextLabel: pt,
249
- onNewConversation: () => D(),
250
- onOpenHistory: () => W("history"),
251
- historyOpen: T,
252
- onTogglePreview: () => W("preview"),
253
- previewOpen: C,
260
+ contextLabel: bt,
261
+ onNewConversation: () => T(),
262
+ onOpenHistory: () => H("history"),
263
+ historyOpen: C,
264
+ onTogglePreview: () => H("preview"),
265
+ previewOpen: x,
254
266
  onClose: l,
255
- docked: d,
256
- onToggleDock: f
257
- }), H && !k ? /* @__PURE__ */ s(De, {
258
- selected: R ? "avatar" : "chat",
259
- onSelect: ut,
260
- ids: H
267
+ docked: We,
268
+ onToggleDock: d
269
+ }), B && !D ? /* @__PURE__ */ s(De, {
270
+ selected: I ? "avatar" : "chat",
271
+ onSelect: gt,
272
+ ids: B
261
273
  }) : null]
262
274
  }),
263
- T ? /* @__PURE__ */ s(xe, { presentation: h }) : M ? /* @__PURE__ */ s(Le, {
264
- id: ot,
265
- onClose: yt,
266
- onRequestClosePanel: Z,
267
- onNewConversation: St,
268
- onOpenAvatar: B ? dt : void 0,
269
- docked: d,
270
- onToggleDock: f
275
+ C ? /* @__PURE__ */ s(xe, { presentation: m }) : A ? /* @__PURE__ */ s(Le, {
276
+ id: ft,
277
+ onClose: Et,
278
+ onRequestClosePanel: J,
279
+ onNewConversation: Ot,
280
+ onOpenAvatar: R ? _t : void 0,
281
+ docked: We,
282
+ onToggleDock: d
271
283
  }) : null,
272
- C && /* @__PURE__ */ s(ye, { onClose: () => x(!1) }),
284
+ x && /* @__PURE__ */ s(ye, { onClose: () => y(!1) }),
273
285
  /* @__PURE__ */ s("div", {
274
286
  className: "contents",
275
- inert: I || void 0,
287
+ inert: P || void 0,
276
288
  children: /* @__PURE__ */ s(Me, {
277
289
  visible: u ?? !0,
278
- writeAccess: He,
279
- presentation: h,
280
- inputRef: O ? Q : void 0,
281
- onDraftDirtyChange: O ? mt : void 0
290
+ writeAccess: Ge,
291
+ presentation: m,
292
+ inputRef: E ? Y : void 0,
293
+ onDraftDirtyChange: E ? xt : void 0,
294
+ ...D ? {
295
+ surface: g,
296
+ windowView: Q.view,
297
+ onWindowVoiceChange: At,
298
+ onOpenFull: jt,
299
+ onContinuedInChat: Nt,
300
+ onShowChat: Mt
301
+ } : {}
282
302
  })
283
303
  })
284
304
  ]
@@ -1,5 +1,7 @@
1
1
  import { FC, Ref } from 'react';
2
2
  import { AssistantPresentation } from './composer/AssistantComposer';
3
+ import { WindowVoiceState } from './compact/windowView';
4
+ import { AssistantSurface, AssistantWindowView } from './assistantOverlayState';
3
5
  import { WorkspaceWriteAccess } from '../useWorkspaceWriteAccess';
4
6
  /**
5
7
  * `visible` is false when the host HIDES the panel without unmounting it, which
@@ -40,5 +42,36 @@ export interface AssistantChatAreaProps {
40
42
  * lifting it. Absent: nothing is reported.
41
43
  */
42
44
  onDraftDirtyChange?: (dirty: boolean) => void;
45
+ /**
46
+ * BOFF-10180 (compact only): which surface the overlay shows the panel in. With
47
+ * `window`, this chat area is the Quick assistant window's: its view follows
48
+ * `windowView`, voice is reported through `onWindowVoiceChange`, and the waiting
49
+ * change's button opens the full assistant. Absent, in the full panel and in
50
+ * classic, nothing below is reached.
51
+ */
52
+ surface?: AssistantSurface;
53
+ /** Window only: Chat (the conversation and its composer) or Voice (the stage). */
54
+ windowView?: AssistantWindowView;
55
+ /**
56
+ * Window only: told whether voice can start here and whether a session is live.
57
+ * The header's toggle, the language pill and Minimize's "(ends voice)" read it.
58
+ */
59
+ onWindowVoiceChange?: (state: WindowVoiceState) => void;
60
+ /**
61
+ * Window only: "Review in full assistant" — the same instance, shown as the full panel.
62
+ * `review: true` says the person is going to a waiting change, so the panel leaves the
63
+ * message box alone and this chat area focuses the card.
64
+ */
65
+ onOpenFull?: (options?: {
66
+ review?: boolean;
67
+ }) => void;
68
+ /** Window only: told when Continue in chat has written its note and ended voice. */
69
+ onContinuedInChat?: () => void;
70
+ /**
71
+ * Window only: a turn started while the Voice view hides the thread (a typed message
72
+ * sent from the box under the stage), so the window must show Chat: its reply is in
73
+ * the thread.
74
+ */
75
+ onShowChat?: () => void;
43
76
  }
44
77
  export declare const AssistantChatArea: FC<AssistantChatAreaProps>;