@burdenoff/fe-libs 2026.1016.2 → 2026.1016.3

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 (41) hide show
  1. package/dist/shared/assistant/avatar/live/AvatarFace.d.ts +13 -0
  2. package/dist/shared/assistant/avatar/live/AvatarFace.js +46 -0
  3. package/dist/shared/assistant/avatar/live/LiveAvatarTabView.d.ts +2 -0
  4. package/dist/shared/assistant/avatar/live/LiveAvatarTabView.js +172 -145
  5. package/dist/shared/assistant/avatar/live/avatarFaces.d.ts +31 -0
  6. package/dist/shared/assistant/avatar/live/avatarFaces.js +33 -0
  7. package/dist/shared/assistant/avatar/live/createLiveAvatarSeam.d.ts +12 -0
  8. package/dist/shared/assistant/avatar/live/createLiveAvatarSeam.js +142 -75
  9. package/dist/shared/assistant/avatar/live/liveAvatarController.d.ts +5 -0
  10. package/dist/shared/assistant/avatar/live/liveAvatarController.js +3 -1
  11. package/dist/shared/assistant/avatar/live/liveAvatarStatus.d.ts +14 -0
  12. package/dist/shared/assistant/avatar/live/liveAvatarStatus.js +11 -2
  13. package/dist/shared/assistant/avatar/useAvatarCopy.d.ts +42 -0
  14. package/dist/shared/assistant/avatar/useAvatarCopy.js +113 -75
  15. package/dist/shared/assistant/i18nManifest.d.ts +28 -0
  16. package/dist/shared/assistant/i18nManifest.js +28 -0
  17. package/dist/shared/assistant/index.d.ts +8 -0
  18. package/dist/shared/assistant/speech/replySpeechRequests.d.ts +84 -0
  19. package/dist/shared/assistant/speech/replySpeechRequests.js +70 -0
  20. package/dist/shared/assistant/speech/routingSpeechEngine.js +2 -1
  21. package/dist/shared/assistant/speech/types.d.ts +28 -1
  22. package/dist/shared/assistant/ui/AIAssistantPanel.js +128 -119
  23. package/dist/shared/assistant/ui/AssistantChatArea.js +1572 -1430
  24. package/dist/shared/assistant/ui/AssistantSpeechProvider.js +235 -191
  25. package/dist/shared/assistant/ui/assistantLiveAvatarSeam.d.ts +40 -0
  26. package/dist/shared/assistant/ui/avatar/AssistantAvatarTab.d.ts +6 -0
  27. package/dist/shared/assistant/ui/avatar/AssistantAvatarTab.js +99 -52
  28. package/dist/shared/assistant/ui/avatar/AvatarTabAskBox.d.ts +8 -0
  29. package/dist/shared/assistant/ui/avatar/AvatarTabAskBox.js +87 -0
  30. package/dist/shared/assistant/ui/avatar/AvatarTabLastExchange.d.ts +13 -0
  31. package/dist/shared/assistant/ui/avatar/AvatarTabLastExchange.js +97 -0
  32. package/dist/shared/assistant/ui/avatar/avatarAskGate.d.ts +104 -0
  33. package/dist/shared/assistant/ui/avatar/avatarAskGate.js +39 -0
  34. package/dist/shared/assistant/ui/avatar/avatarTabDraft.d.ts +17 -0
  35. package/dist/shared/assistant/ui/avatar/avatarTabDraft.js +22 -0
  36. package/dist/shared/assistant/ui/avatar/avatarTabExchange.d.ts +47 -0
  37. package/dist/shared/assistant/ui/avatar/avatarTabExchange.js +50 -0
  38. package/dist/shared/assistant/ui/panelOverlays.d.ts +8 -1
  39. package/dist/shared/assistant/ui/panelOverlays.js +1 -1
  40. package/dist/shared-assistant.js +260 -252
  41. package/package.json +1 -1
@@ -1,151 +1,160 @@
1
1
  import { useReturnFocus as e } from "../../hooks/useReturnFocus.js";
2
2
  import { useAssistantControl as t } from "../appControls/useAssistantControl.js";
3
- import { useAssistantPageLabel as n } from "../product.js";
4
- import { useAssistantTr as r } from "../i18n.js";
5
- import { useAssistantStore as i } from "../store.js";
6
- import { AssistantSpeechProvider as a } from "./AssistantSpeechProvider.js";
7
- import { ASSISTANT_OVERLAY_ATTR as o, ASSISTANT_PANEL_ATTR as s, activePanelOverlay as c, escapeDismisses as l, nextPanelOverlays as u } from "./panelOverlays.js";
8
- import { LiveAvatarSeamProvider as d, LiveAvatarTabContext as ee, useLiveAvatarSpeechEngine as te, useLiveAvatarTabOffered as ne } from "./assistantLiveAvatarSeam.js";
9
- import { AssistantPreviewProvider as re } from "../preview/context.js";
10
- import { useAssistantPreviewBridge as ie } from "../preview/useAssistantPreviewBridge.js";
11
- import { AssistantConnectSourceProvider as ae } from "./composer/connectSource.js";
12
- import { hasAssistantPreviewSurface as oe } from "../preview/types.js";
13
- import { panelOwnedPreviewBridge as se, useHostedAssistantPreviewBridge as ce } from "../preview/bridgeHostContext.js";
14
- import { AssistantPreviewOverlay as le } from "../preview/AssistantPreviewOverlay.js";
15
- import { AssistantHeader as ue } from "./AssistantHeader.js";
16
- import { AssistantConversationList as de } from "./AssistantConversationList.js";
17
- import { AssistantConversationDeleteDialogProvider as fe } from "./conversationDeleteDialog.js";
18
- import { AssistantControlConfirmProvider as pe } from "./controlConfirmDialog.js";
19
- import { AssistantLeaveConfirmNavigateProvider as me } from "./leaveConfirm.js";
20
- import { useAssistantServerHistory as he } from "../history/useAssistantServerHistory.js";
21
- import { useFilesServiceWarmup as ge } from "../../../storage/warmFilesService.js";
22
- import { AssistantAvatarTabs as f } from "./AssistantAvatarTabs.js";
23
- import { useAssistantHeartbeat as p } from "../useAssistantHeartbeat.js";
24
- import { useAssistantKeyboardShortcuts as m } from "../useAssistantKeyboardShortcuts.js";
25
- import { AssistantChatArea as h } from "./AssistantChatArea.js";
26
- import { useCallback as g, useId as _, useMemo as v, useRef as y, useState as b } from "react";
27
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
3
+ import { useAssistantPageLabel as ee } from "../product.js";
4
+ import { useAssistantTr as n } from "../i18n.js";
5
+ import { useAssistantStore as r } from "../store.js";
6
+ import { AssistantSpeechProvider as i } from "./AssistantSpeechProvider.js";
7
+ import { ASSISTANT_OVERLAY_ATTR as a, ASSISTANT_PANEL_ATTR as o, activePanelOverlay as s, escapeDismisses as c, nextPanelOverlays as l } from "./panelOverlays.js";
8
+ import { LiveAvatarSeamProvider as u, LiveAvatarTabContext as d, useLiveAvatarSpeechEngine as f, useLiveAvatarTabOffered as te } from "./assistantLiveAvatarSeam.js";
9
+ import { AssistantPreviewProvider as ne } from "../preview/context.js";
10
+ import { useAssistantPreviewBridge as re } from "../preview/useAssistantPreviewBridge.js";
11
+ import { AssistantConnectSourceProvider as ie } from "./composer/connectSource.js";
12
+ import { hasAssistantPreviewSurface as ae } from "../preview/types.js";
13
+ import { panelOwnedPreviewBridge as oe, useHostedAssistantPreviewBridge as se } from "../preview/bridgeHostContext.js";
14
+ import { AssistantPreviewOverlay as ce } from "../preview/AssistantPreviewOverlay.js";
15
+ import { AssistantHeader as le } from "./AssistantHeader.js";
16
+ import { AssistantConversationList as ue } from "./AssistantConversationList.js";
17
+ import { AssistantConversationDeleteDialogProvider as de } from "./conversationDeleteDialog.js";
18
+ import { AssistantControlConfirmProvider as fe } from "./controlConfirmDialog.js";
19
+ import { AssistantLeaveConfirmNavigateProvider as pe } from "./leaveConfirm.js";
20
+ import { useAssistantServerHistory as me } from "../history/useAssistantServerHistory.js";
21
+ import { useFilesServiceWarmup as he } from "../../../storage/warmFilesService.js";
22
+ import { AssistantAvatarTabs as ge } from "./AssistantAvatarTabs.js";
23
+ import { useAssistantHeartbeat as _e } from "../useAssistantHeartbeat.js";
24
+ import { useAssistantKeyboardShortcuts as ve } from "../useAssistantKeyboardShortcuts.js";
25
+ import { AssistantChatArea as ye } from "./AssistantChatArea.js";
26
+ import { useCallback as p, useId as m, useMemo as h, useRef as g, useState as _ } from "react";
27
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
28
28
  //#region src/shared/assistant/ui/AIAssistantPanel.tsx
29
- var C = ({ onClose: C, visible: w, docked: T, onToggleDock: E, writeAccess: D, onNavigate: O, isShellLessTarget: k, connectSourceHref: A, onConnectSource: j, preview: M, liveAvatar: N, serverHistory: P = !1 }) => {
30
- let F = r(), _e = te(N);
31
- he(P);
32
- let [I, L] = b(!1), R = oe(M);
33
- I && !R && L(!1);
34
- let z = I && R;
35
- ie(se(M, ce()));
36
- let B = y(null);
37
- e(B);
38
- let { conversations: ve, activeConversationId: ye, conversationListOpen: V, setConversationListOpen: H, createConversation: be } = i(), U = V || z, W = N?.tab, xe = ne(W), [G, K] = b(!1);
39
- G && (!W || w === !1) && K(!1);
40
- let q = W !== void 0 && (xe || G), J = _(), Y = v(() => q ? {
41
- chatTab: `${J}-chat-tab`,
42
- avatarTab: `${J}-avatar-tab`,
43
- chatPanel: `${J}-chat-panel`,
44
- avatarPanel: `${J}-avatar-panel`,
45
- leaveHint: `${J}-avatar-leave`
46
- } : null, [q, J]), X = g(() => K(!1), []), Se = v(() => ({
47
- open: G,
48
- close: X,
49
- ids: Y,
50
- covered: U
29
+ var b = ({ onClose: b, visible: x, docked: S, onToggleDock: C, writeAccess: w, onNavigate: T, isShellLessTarget: E, connectSourceHref: D, onConnectSource: O, preview: k, liveAvatar: A, serverHistory: j = !1 }) => {
30
+ let M = n(), N = f(A);
31
+ me(j);
32
+ let [P, F] = _(!1), I = ae(k);
33
+ P && !I && F(!1);
34
+ let L = P && I;
35
+ re(oe(k, se()));
36
+ let R = g(null);
37
+ e(R);
38
+ let { conversations: be, activeConversationId: xe, conversationListOpen: z, setConversationListOpen: B, createConversation: Se } = r(), V = z || L, H = A?.tab, Ce = te(H), [U, W] = _(!1);
39
+ U && (!H || x === !1) && W(!1);
40
+ let G = H !== void 0 && (Ce || U), K = m(), q = h(() => G ? {
41
+ chatTab: `${K}-chat-tab`,
42
+ avatarTab: `${K}-avatar-tab`,
43
+ chatPanel: `${K}-chat-panel`,
44
+ avatarPanel: `${K}-avatar-panel`,
45
+ leaveHint: `${K}-avatar-leave`
46
+ } : null, [G, K]), J = p(() => W(!1), []), Y = g(null), X = p((e) => {
47
+ Y.current = e;
48
+ }, []), we = h(() => ({
49
+ open: U,
50
+ close: J,
51
+ ids: q,
52
+ covered: V,
53
+ setReplyEscape: X
51
54
  }), [
52
- G,
53
- X,
54
- Y,
55
- U
56
- ]), Ce = (e) => K(e === "avatar"), Z = c({
57
- historyOpen: V,
58
- previewOpen: z,
59
- avatarOpen: G
55
+ U,
56
+ J,
57
+ q,
58
+ V,
59
+ X
60
+ ]), Te = (e) => W(e === "avatar"), Z = s({
61
+ historyOpen: z,
62
+ previewOpen: L,
63
+ avatarOpen: U
60
64
  }), Q = (e) => {
61
- let t = u({
62
- historyOpen: V,
63
- previewOpen: z
65
+ let t = l({
66
+ historyOpen: z,
67
+ previewOpen: L
64
68
  }, e);
65
- H(t.historyOpen), L(t.previewOpen);
69
+ B(t.historyOpen), F(t.previewOpen);
66
70
  };
67
- t("assistant.history", v(() => ({ run: () => V ? { status: "already" } : (H(!0), L(!1), { status: "done" }) }), [V, H])), t("assistant.preview", v(() => R ? {
71
+ t("assistant.history", h(() => ({ run: () => z ? { status: "already" } : (B(!0), F(!1), { status: "done" }) }), [z, B])), t("assistant.preview", h(() => I ? {
68
72
  surface: "panel",
69
- run: () => z ? { status: "already" } : (H(!1), L(!0), { status: "done" }),
70
- close: () => z ? (L(!1), { status: "done" }) : { status: "already" }
73
+ run: () => L ? { status: "already" } : (B(!1), F(!0), { status: "done" }),
74
+ close: () => L ? (F(!1), { status: "done" }) : { status: "already" }
71
75
  } : null, [
72
- R,
73
- z,
74
- H
76
+ I,
77
+ L,
78
+ B
75
79
  ]));
76
- let $ = ve.find((e) => e.id === ye);
77
- p($?.backendSessionId ?? null, $?.mode ?? null, w ?? !0), ge(w ?? !0);
78
- let we = n(w !== !1);
79
- return m({
80
- panelRef: B,
80
+ let $ = be.find((e) => e.id === xe);
81
+ _e($?.backendSessionId ?? null, $?.mode ?? null, x ?? !0), he(x ?? !0);
82
+ let Ee = ee(x !== !1);
83
+ return ve({
84
+ panelRef: R,
81
85
  onClose: () => {
82
- let e = l({
83
- historyOpen: V,
84
- previewOpen: z,
85
- avatarOpen: G
86
+ let e = c({
87
+ historyOpen: z,
88
+ previewOpen: L,
89
+ avatarOpen: U,
90
+ tabReplySpeaking: Y.current !== null
86
91
  });
87
92
  if (e === "overlay") {
88
- H(!1), L(!1);
93
+ B(!1), F(!1);
94
+ return;
95
+ }
96
+ if (e === "tab-reply") {
97
+ Y.current?.();
89
98
  return;
90
99
  }
91
100
  if (e === "tab") {
92
- K(!1), Y && document.getElementById(Y.chatTab)?.focus();
101
+ W(!1), q && document.getElementById(q.chatTab)?.focus();
93
102
  return;
94
103
  }
95
- C();
104
+ b();
96
105
  }
97
- }), /* @__PURE__ */ x(a, {
98
- visible: w ?? !0,
99
- engine: _e,
100
- children: /* @__PURE__ */ x(d, {
101
- value: N,
102
- children: /* @__PURE__ */ x(ee.Provider, {
103
- value: Se,
104
- children: /* @__PURE__ */ x(re, {
105
- value: M,
106
- children: /* @__PURE__ */ x(me, {
107
- navigate: O,
108
- isShellLessTarget: k,
109
- children: /* @__PURE__ */ x(ae, {
110
- value: A,
111
- onOpen: j,
112
- children: /* @__PURE__ */ x(fe, { children: /* @__PURE__ */ x(pe, { children: /* @__PURE__ */ S("div", {
113
- ref: B,
106
+ }), /* @__PURE__ */ v(i, {
107
+ visible: x ?? !0,
108
+ engine: N,
109
+ children: /* @__PURE__ */ v(u, {
110
+ value: A,
111
+ children: /* @__PURE__ */ v(d.Provider, {
112
+ value: we,
113
+ children: /* @__PURE__ */ v(ne, {
114
+ value: k,
115
+ children: /* @__PURE__ */ v(pe, {
116
+ navigate: T,
117
+ isShellLessTarget: E,
118
+ children: /* @__PURE__ */ v(ie, {
119
+ value: D,
120
+ onOpen: O,
121
+ children: /* @__PURE__ */ v(de, { children: /* @__PURE__ */ v(fe, { children: /* @__PURE__ */ y("div", {
122
+ ref: R,
114
123
  className: "relative flex h-full w-full flex-col bg-bg-surface",
115
124
  role: "complementary",
116
- "aria-label": F("panel.ariaLabel", "AI Assistant"),
125
+ "aria-label": M("panel.ariaLabel", "AI Assistant"),
117
126
  "data-testid": "ai-assistant-panel",
118
- [s]: "",
119
- ...Z ? { [o]: Z } : {},
127
+ [o]: "",
128
+ ...Z ? { [a]: Z } : {},
120
129
  tabIndex: -1,
121
130
  children: [
122
- /* @__PURE__ */ S("div", {
131
+ /* @__PURE__ */ y("div", {
123
132
  className: "contents",
124
- inert: U || void 0,
125
- children: [/* @__PURE__ */ x(ue, {
126
- contextLabel: we,
127
- onNewConversation: () => be(),
133
+ inert: V || void 0,
134
+ children: [/* @__PURE__ */ v(le, {
135
+ contextLabel: Ee,
136
+ onNewConversation: () => Se(),
128
137
  onOpenHistory: () => Q("history"),
129
- historyOpen: V,
138
+ historyOpen: z,
130
139
  onTogglePreview: () => Q("preview"),
131
- previewOpen: z,
132
- onClose: C,
133
- docked: T,
134
- onToggleDock: E
135
- }), Y ? /* @__PURE__ */ x(f, {
136
- selected: G ? "avatar" : "chat",
137
- onSelect: Ce,
138
- ids: Y
140
+ previewOpen: L,
141
+ onClose: b,
142
+ docked: S,
143
+ onToggleDock: C
144
+ }), q ? /* @__PURE__ */ v(ge, {
145
+ selected: U ? "avatar" : "chat",
146
+ onSelect: Te,
147
+ ids: q
139
148
  }) : null]
140
149
  }),
141
- V && /* @__PURE__ */ x(de, {}),
142
- z && /* @__PURE__ */ x(le, { onClose: () => L(!1) }),
143
- /* @__PURE__ */ x("div", {
150
+ z && /* @__PURE__ */ v(ue, {}),
151
+ L && /* @__PURE__ */ v(ce, { onClose: () => F(!1) }),
152
+ /* @__PURE__ */ v("div", {
144
153
  className: "contents",
145
- inert: U || void 0,
146
- children: /* @__PURE__ */ x(h, {
147
- visible: w ?? !0,
148
- writeAccess: D
154
+ inert: V || void 0,
155
+ children: /* @__PURE__ */ v(ye, {
156
+ visible: x ?? !0,
157
+ writeAccess: w
149
158
  })
150
159
  })
151
160
  ]
@@ -158,4 +167,4 @@ var C = ({ onClose: C, visible: w, docked: T, onToggleDock: E, writeAccess: D, o
158
167
  });
159
168
  };
160
169
  //#endregion
161
- export { C as AIAssistantPanel };
170
+ export { b as AIAssistantPanel };