@burdenoff/fe-libs 2026.1029.10 → 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 (43) hide show
  1. package/dist/shared/assistant/i18nManifest.d.ts +22 -0
  2. package/dist/shared/assistant/i18nManifest.js +22 -0
  3. package/dist/shared/assistant/index.d.ts +6 -0
  4. package/dist/shared/assistant/ui/AIAssistantPanel.d.ts +26 -0
  5. package/dist/shared/assistant/ui/AIAssistantPanel.js +197 -160
  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 +91 -3
  11. package/dist/shared/assistant/ui/AssistantOverlay.js +347 -127
  12. package/dist/shared/assistant/ui/assistantOverlayState.d.ts +224 -0
  13. package/dist/shared/assistant/ui/assistantOverlayState.js +116 -29
  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 +36 -0
  23. package/dist/shared/assistant/ui/compact/AssistantWindowHeader.js +68 -0
  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/AssistantAttachmentButton.d.ts +8 -0
  27. package/dist/shared/assistant/ui/composer/AssistantAttachmentButton.js +34 -34
  28. package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +6 -0
  29. package/dist/shared/assistant/ui/composer/AssistantComposer.js +92 -90
  30. package/dist/shared/assistant/ui/composer/AssistantModeMenu.d.ts +6 -0
  31. package/dist/shared/assistant/ui/composer/AssistantModeMenu.js +83 -83
  32. package/dist/shared/assistant/ui/useAssistantVisualViewport.d.ts +3 -0
  33. package/dist/shared/assistant/ui/useAssistantVisualViewport.js +24 -0
  34. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +31 -0
  35. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +270 -166
  36. package/dist/shared/assistant/ui/voice/VoiceStage.d.ts +8 -0
  37. package/dist/shared/assistant/ui/voice/VoiceStage.js +10 -10
  38. package/dist/shared/assistant/voice/voiceStartedCue.d.ts +11 -0
  39. package/dist/shared/assistant/voice/voiceStartedCue.js +7 -0
  40. package/dist/shared-assistant.js +266 -260
  41. package/dist/ui/modal-shell.d.ts +6 -1
  42. package/dist/ui/modal-shell.js +7 -6
  43. package/package.json +1 -1
@@ -548,6 +548,7 @@ export declare const ASSISTANT_I18N_LITERAL_COPY: {
548
548
  readonly 'offer.notAvailable': "{{page}} isn't in your menu right now.";
549
549
  readonly 'offer.open': "Open {{page}}";
550
550
  readonly 'overlay.launcher': "AI Assistant";
551
+ readonly 'overlay.launcherQuick': "Open quick assistant";
551
552
  readonly 'overlay.launcherTitle': "AI Assistant ({{shortcut}})";
552
553
  readonly 'panel.ariaLabel': "AI Assistant";
553
554
  readonly 'pendingWrite.approve': "Approve this change";
@@ -659,8 +660,29 @@ export declare const ASSISTANT_I18N_LITERAL_COPY: {
659
660
  readonly 'voiceSession.transcriptTitle': "Voice transcript";
660
661
  readonly 'voiceSession.unmute': "Turn the microphone on";
661
662
  readonly 'waitingChange.review': "Review";
663
+ readonly 'waitingChange.reviewInFull': "Review in full assistant";
662
664
  readonly 'waitingChange.reviewLabel': "Review the change waiting for your approval";
663
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";
671
+ readonly 'window.minimize': "Minimize";
672
+ readonly 'window.minimizeEndsVoice': "Minimize (ends voice)";
673
+ readonly 'window.mute': "Mute";
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";
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.";
664
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.";
665
687
  readonly 'writeConsent.cancel': "Stay in {{mode}}";
666
688
  readonly 'writeConsent.confirm': "Enable {{mode}}";
@@ -441,6 +441,7 @@ var g = {
441
441
  "offer.notAvailable": "{{page}} isn't in your menu right now.",
442
442
  "offer.open": "Open {{page}}",
443
443
  "overlay.launcher": "AI Assistant",
444
+ "overlay.launcherQuick": "Open quick assistant",
444
445
  "overlay.launcherTitle": "AI Assistant ({{shortcut}})",
445
446
  "panel.ariaLabel": "AI Assistant",
446
447
  "pendingWrite.approve": "Approve this change",
@@ -552,8 +553,29 @@ var g = {
552
553
  "voiceSession.transcriptTitle": "Voice transcript",
553
554
  "voiceSession.unmute": "Turn the microphone on",
554
555
  "waitingChange.review": "Review",
556
+ "waitingChange.reviewInFull": "Review in full assistant",
555
557
  "waitingChange.reviewLabel": "Review the change waiting for your approval",
556
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",
564
+ "window.minimize": "Minimize",
565
+ "window.minimizeEndsVoice": "Minimize (ends voice)",
566
+ "window.mute": "Mute",
567
+ "window.openFull": "Open full assistant",
568
+ "window.showTranscript": "Show transcript",
569
+ "window.startVoice": "Start voice",
570
+ "window.stopSpeaking": "Stop speaking",
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.",
557
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.",
558
580
  "writeConsent.cancel": "Stay in {{mode}}",
559
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';
@@ -380,4 +381,9 @@ export * from './ui/compact/AssistantDiscardDraftDialog';
380
381
  export * from './ui/compact/AssistantMenuView';
381
382
  export * from './ui/compact/AssistantVoiceLanguageSettings';
382
383
  export * from './ui/compact/AssistantWaitingChangeRow';
384
+ export * from './ui/compact/AssistantWindowHeader';
385
+ export * from './ui/compact/AssistantLanguagePill';
386
+ export * from './ui/compact/AssistantVoiceReady';
387
+ export * from './ui/compact/windowView';
388
+ export * from './ui/useAssistantVisualViewport';
383
389
  export * from './ui/compact/waitingChange';
@@ -5,6 +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, AssistantWindowView } from './assistantOverlayState';
8
9
  export type AIAssistantPanelProps = PanelProps & {
9
10
  /** When provided, renders a dock/float toggle in the header. */
10
11
  docked?: boolean;
@@ -124,6 +125,31 @@ export type AIAssistantPanelProps = PanelProps & {
124
125
  * without a host that honours it the control would do nothing.
125
126
  */
126
127
  onExpandedChange?: (expanded: boolean) => void;
128
+ /**
129
+ * BOFF-10178 (compact only): which surface the overlay is showing this ONE
130
+ * panel in. `window` is the Quick assistant: a slim header (Open full
131
+ * assistant, Minimize) in place of the full header, no ☰ view, no Expand, no
132
+ * Avatar tab. `panel` or absent is the full assistant. The chat area and the
133
+ * composer are the same instance either way, so a draft, its attachments and
134
+ * a turn in flight survive the switch.
135
+ */
136
+ surface?: AssistantSurface;
137
+ /** Compact window: switch to the full assistant. Same instance, nothing re-sent. */
138
+ onOpenFull?: () => void;
139
+ /**
140
+ * Compact window: hide the window and keep it mounted (the overlay then passes
141
+ * `visible={false}`). The window has no Close (CW-M), so this is also what
142
+ * Escape does there: it never asks to discard a draft the hidden window keeps.
143
+ */
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;
127
153
  };
128
154
  /**
129
155
  * The panel.
@@ -29,239 +29,276 @@ import { AssistantCompactHeader as Pe } from "./compact/AssistantCompactHeader.j
29
29
  import { AssistantConversationMenu as Fe } from "./compact/AssistantConversationMenu.js";
30
30
  import { AssistantDiscardDraftDialog as Ie } from "./compact/AssistantDiscardDraftDialog.js";
31
31
  import { AssistantMenuView as Le } from "./compact/AssistantMenuView.js";
32
- import { useCallback as n, useEffect as r, useId as Re, useMemo as i, useRef as a, useState as o } from "react";
33
- import { Fragment as ze, jsx as s, jsxs as c } from "react/jsx-runtime";
32
+ import { AssistantWindowHeader as Re } from "./compact/AssistantWindowHeader.js";
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";
34
36
  //#region src/shared/assistant/ui/AIAssistantPanel.tsx
35
- var l = ({ onClose: l, visible: u, docked: d, onToggleDock: f, writeAccess: Be, onNavigate: Ve, isShellLessTarget: He, connectSourceHref: Ue, onConnectSource: We, preview: p, liveAvatar: m, presentation: h, onExpandedChange: g, serverHistory: Ge = !1 }) => {
36
- let Ke = te(), qe = de(m);
37
- Te(Ge);
38
- let [_, v] = o(!1), y = ge(p);
39
- _ && !y && v(!1);
40
- let b = _ && y;
41
- me(_e(p, ve()));
42
- let x = a(null);
43
- e(x);
44
- let { conversations: Je, activeConversationId: Ye, conversationListOpen: S, setConversationListOpen: C, createConversation: w } = ne(), T = h === "compact", [E, D] = o(!1), O = a(!1);
45
- E && (!T || S || b) && D(!1);
46
- let k = T && E, [Xe, A] = o(!1), j = je(T && g !== void 0), [M, N] = o(!1), P = j && M;
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;
47
49
  r(() => {
48
- M && !j && (N(!1), g?.(!1));
50
+ M && !j && (st(!1), h?.(!1));
49
51
  }, [
50
52
  M,
51
53
  j,
52
- g
54
+ h
53
55
  ]);
54
- let Ze = () => {
55
- let e = !P;
56
- N(e), g?.(e);
57
- }, F = a(!1), I = a(g);
56
+ let ct = () => {
57
+ let e = !N;
58
+ st(e), h?.(e);
59
+ }, lt = a(!1), ut = a(h);
58
60
  r(() => {
59
- F.current = P, I.current = g;
61
+ lt.current = N, ut.current = h;
60
62
  }), r(() => () => {
61
- F.current && I.current?.(!1);
63
+ lt.current && ut.current?.(!1);
62
64
  }, []);
63
- let L = S || b || k, R = m?.tab, Qe = fe(R), [z, B] = o(!1);
64
- z && (!R || u === !1) && B(!1);
65
- let V = R !== void 0 && (Qe || z), H = Re(), $e = Re(), U = i(() => V ? {
66
- chatTab: `${H}-chat-tab`,
67
- avatarTab: `${H}-avatar-tab`,
68
- chatPanel: `${H}-chat-panel`,
69
- avatarPanel: `${H}-avatar-panel`,
70
- leaveHint: `${H}-avatar-leave`
71
- } : null, [V, H]), et = n(() => B(!1), []), W = a(null), tt = n((e) => {
72
- W.current = e;
73
- }, []), nt = i(() => ({
74
- open: z,
75
- close: et,
76
- ids: U,
77
- covered: L,
78
- setReplyEscape: tt
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
79
81
  }), [
80
- z,
81
- et,
82
- U,
83
- L,
84
- tt
85
- ]), rt = (e) => B(e === "avatar"), it = () => {
86
- D(!1), rt("avatar"), O.current = !0;
87
- }, at = oe({
88
- historyOpen: S,
89
- previewOpen: b,
90
- avatarOpen: z
91
- }) ?? (k ? "menu" : null), G = (e) => {
82
+ I,
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) => {
92
94
  let t = ce({
93
- historyOpen: S,
94
- previewOpen: b
95
+ historyOpen: C,
96
+ previewOpen: x
95
97
  }, e);
96
- C(t.historyOpen), v(t.previewOpen);
98
+ w(t.historyOpen), y(t.previewOpen);
97
99
  };
98
- t("assistant.history", i(() => ({ run: () => S ? { status: "already" } : (C(!0), v(!1), { status: "done" }) }), [S, C])), t("assistant.preview", i(() => y ? {
100
+ t("assistant.history", i(() => ({ run: () => C ? { status: "already" } : (w(!0), y(!1), { status: "done" }) }), [C, w])), t("assistant.preview", i(() => b ? {
99
101
  surface: "panel",
100
- run: () => b ? { status: "already" } : (C(!1), v(!0), { status: "done" }),
101
- close: () => b ? (v(!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" }
102
104
  } : null, [
103
- y,
104
105
  b,
105
- C
106
+ x,
107
+ w
106
108
  ]));
107
- let ot = Je.find((e) => e.id === Ye);
108
- Oe(ot?.backendSessionId ?? null, ot?.mode ?? null, u ?? !0), Ee(u ?? !0);
109
- let st = ee(u !== !1), K = Ne(), q = a(!1), ct = n((e) => {
110
- q.current = e;
111
- }, []), J = a(!1), [lt, Y] = o(!1), X = n(() => Ae({
112
- compact: T,
113
- unsent: q.current,
114
- confirmed: J.current
115
- }) === "close" ? !1 : (Y(!0), !0), [T]);
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]);
116
118
  r(() => {
117
- if (!(!T || !K)) return K(X);
119
+ if (!(!E || !U)) return U(q);
118
120
  }, [
119
- T,
120
- K,
121
- X
121
+ E,
122
+ U,
123
+ q
122
124
  ]);
123
- let Z = n(() => {
124
- X() || l();
125
- }, [X, l]), ut = () => {
126
- J.current = !0, q.current = !1, Y(!1);
125
+ let J = n(() => {
126
+ if (D && _) {
127
+ _();
128
+ return;
129
+ }
130
+ q() || l();
131
+ }, [
132
+ D,
133
+ _,
134
+ q,
135
+ l
136
+ ]), Ct = () => {
137
+ G.current = !0, W.current = !1, K(!1);
127
138
  try {
128
139
  l();
129
140
  } finally {
130
- J.current = !1;
141
+ G.current = !1;
131
142
  }
132
- }, Q = a(null), dt = a(null), ft = a(null), pt = n(() => D(!1), []), [mt, ht] = o(0), gt = n(() => {
133
- w(), D(!1), C(!1), ht((e) => e + 1);
134
- }, [w, C]), _t = n(() => {
135
- D(!1), A(!0);
136
- }, []), $ = 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);
137
158
  return r(() => {
138
- if ($.current && !k) {
159
+ if (Ft.current && !A) {
139
160
  let e = document.activeElement;
140
- (!e || e === document.body || e === x.current) && dt.current?.focus({ preventScroll: !0 });
161
+ (!e || e === document.body || e === S.current) && wt.current?.focus({ preventScroll: !0 });
141
162
  }
142
- $.current = k;
143
- }, [k]), r(() => {
144
- mt > 0 && Q.current?.focus({ preventScroll: !0 });
145
- }, [mt]), r(() => {
146
- !O.current || !z || !U || (O.current = !1, document.getElementById(U.avatarTab)?.focus({ preventScroll: !0 }));
147
- }, [z, U]), ke({
148
- panelRef: x,
149
- inputRef: T ? Q : void 0,
150
- onNewConversation: T ? gt : void 0,
151
- onOpenConversationMenu: T ? _t : 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,
152
173
  onClose: () => {
153
174
  let e = se({
154
- historyOpen: S,
155
- previewOpen: b,
156
- avatarOpen: z,
157
- tabReplySpeaking: W.current !== null
175
+ historyOpen: C,
176
+ previewOpen: x,
177
+ avatarOpen: I,
178
+ tabReplySpeaking: V.current !== null
158
179
  });
159
180
  if (e === "overlay") {
160
- C(!1), v(!1);
181
+ w(!1), y(!1);
161
182
  return;
162
183
  }
163
184
  if (e === "tab-reply") {
164
- W.current?.();
185
+ V.current?.();
165
186
  return;
166
187
  }
167
188
  if (e === "tab") {
168
- B(!1), U && document.getElementById(U.chatTab)?.focus();
189
+ L(!1), B && document.getElementById(B.chatTab)?.focus();
169
190
  return;
170
191
  }
171
- if (k) {
172
- D(!1);
192
+ if (A) {
193
+ O(!1);
173
194
  return;
174
195
  }
175
- Z();
196
+ J();
176
197
  }
177
198
  }), /* @__PURE__ */ s(re, {
178
199
  visible: u ?? !0,
179
- engine: qe,
200
+ engine: et,
180
201
  children: /* @__PURE__ */ s(le, {
181
- value: m,
202
+ value: p,
182
203
  children: /* @__PURE__ */ s(ue.Provider, {
183
- value: nt,
204
+ value: ht,
184
205
  children: /* @__PURE__ */ s(pe, {
185
- value: p,
206
+ value: f,
186
207
  children: /* @__PURE__ */ s(we, {
187
- navigate: Ve,
188
- isShellLessTarget: He,
208
+ navigate: Ke,
209
+ isShellLessTarget: qe,
189
210
  children: /* @__PURE__ */ s(he, {
190
- value: Ue,
191
- onOpen: We,
211
+ value: Je,
212
+ onOpen: Ye,
192
213
  children: /* @__PURE__ */ s(Se, { children: /* @__PURE__ */ s(Ce, { children: /* @__PURE__ */ c("div", {
193
- ref: x,
214
+ ref: S,
194
215
  className: "relative flex h-full w-full flex-col bg-bg-surface",
216
+ style: D ? Ue : void 0,
195
217
  role: "complementary",
196
- "aria-label": Ke("panel.ariaLabel", "AI Assistant"),
218
+ "aria-label": D ? v("window.title", "Quick assistant") : v("panel.ariaLabel", "AI Assistant"),
197
219
  "data-testid": "ai-assistant-panel",
198
220
  [ae]: "",
199
- ...at ? { [ie]: at } : {},
200
- ...T ? {
221
+ ...vt ? { [ie]: vt } : {},
222
+ ...E ? {
201
223
  "data-presentation": "compact",
202
- ...P ? { "data-assistant-expanded": "" } : {}
224
+ ...g ? { "data-assistant-surface": g } : {},
225
+ ...N ? { "data-assistant-expanded": "" } : {}
203
226
  } : {},
204
227
  tabIndex: -1,
205
228
  children: [
206
229
  /* @__PURE__ */ c("div", {
207
230
  className: "contents",
208
- inert: L || void 0,
209
- children: [T ? /* @__PURE__ */ c(ze, { children: [/* @__PURE__ */ s(Pe, {
210
- contextLabel: st,
211
- menuOpen: k,
212
- menuViewId: $e,
213
- onOpenMenu: () => D(!0),
214
- menuButtonRef: dt,
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: () => _?.()
238
+ }) : /* @__PURE__ */ s(Pe, {
239
+ contextLabel: bt,
240
+ menuOpen: A,
241
+ menuViewId: ft,
242
+ onOpenMenu: () => O(!0),
243
+ menuButtonRef: wt,
215
244
  conversationMenu: /* @__PURE__ */ s(Fe, {
216
- open: Xe,
217
- onOpenChange: A,
218
- triggerRef: ft
245
+ open: at,
246
+ onOpenChange: ot,
247
+ triggerRef: Tt
219
248
  }),
220
249
  expandOffered: j,
221
- expanded: P,
222
- onToggleExpanded: Ze,
223
- onTogglePreview: () => G("preview"),
224
- previewOpen: b,
225
- onClose: Z
250
+ expanded: N,
251
+ onToggleExpanded: ct,
252
+ onTogglePreview: () => H("preview"),
253
+ previewOpen: x,
254
+ onClose: J
226
255
  }), /* @__PURE__ */ s(Ie, {
227
- open: lt,
228
- onKeep: () => Y(!1),
229
- onDiscard: ut
256
+ open: St,
257
+ onKeep: () => K(!1),
258
+ onDiscard: Ct
230
259
  })] }) : /* @__PURE__ */ s(be, {
231
- contextLabel: st,
232
- onNewConversation: () => w(),
233
- onOpenHistory: () => G("history"),
234
- historyOpen: S,
235
- onTogglePreview: () => G("preview"),
236
- previewOpen: b,
260
+ contextLabel: bt,
261
+ onNewConversation: () => T(),
262
+ onOpenHistory: () => H("history"),
263
+ historyOpen: C,
264
+ onTogglePreview: () => H("preview"),
265
+ previewOpen: x,
237
266
  onClose: l,
238
- docked: d,
239
- onToggleDock: f
240
- }), U ? /* @__PURE__ */ s(De, {
241
- selected: z ? "avatar" : "chat",
242
- onSelect: rt,
243
- ids: U
267
+ docked: We,
268
+ onToggleDock: d
269
+ }), B && !D ? /* @__PURE__ */ s(De, {
270
+ selected: I ? "avatar" : "chat",
271
+ onSelect: gt,
272
+ ids: B
244
273
  }) : null]
245
274
  }),
246
- S ? /* @__PURE__ */ s(xe, { presentation: h }) : k ? /* @__PURE__ */ s(Le, {
247
- id: $e,
248
- onClose: pt,
249
- onRequestClosePanel: Z,
250
- onNewConversation: gt,
251
- onOpenAvatar: V ? it : void 0,
252
- docked: d,
253
- 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
254
283
  }) : null,
255
- b && /* @__PURE__ */ s(ye, { onClose: () => v(!1) }),
284
+ x && /* @__PURE__ */ s(ye, { onClose: () => y(!1) }),
256
285
  /* @__PURE__ */ s("div", {
257
286
  className: "contents",
258
- inert: L || void 0,
287
+ inert: P || void 0,
259
288
  children: /* @__PURE__ */ s(Me, {
260
289
  visible: u ?? !0,
261
- writeAccess: Be,
262
- presentation: h,
263
- inputRef: T ? Q : void 0,
264
- onDraftDirtyChange: T ? ct : 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
+ } : {}
265
302
  })
266
303
  })
267
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>;