@burdenoff/fe-libs 2026.1014.5 → 2026.1015.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/shared/assistant/avatar/avatarPreferences.d.ts +61 -14
- package/dist/shared/assistant/avatar/avatarPreferences.js +54 -21
- package/dist/shared/assistant/avatar/live/LiveAvatarTabView.d.ts +33 -0
- package/dist/shared/assistant/avatar/live/LiveAvatarTabView.js +278 -0
- package/dist/shared/assistant/avatar/live/avatarSessionClient.d.ts +5 -0
- package/dist/shared/assistant/avatar/live/avatarSessionClient.js +25 -6
- package/dist/shared/assistant/avatar/live/avatarVoice.d.ts +43 -0
- package/dist/shared/assistant/avatar/live/avatarVoice.js +45 -0
- package/dist/shared/assistant/avatar/live/createLiveAvatarSeam.d.ts +21 -1
- package/dist/shared/assistant/avatar/live/createLiveAvatarSeam.js +74 -24
- package/dist/shared/assistant/avatar/live/liveAvatarController.d.ts +47 -8
- package/dist/shared/assistant/avatar/live/liveAvatarController.js +244 -161
- package/dist/shared/assistant/avatar/live/liveAvatarStatus.d.ts +2 -2
- package/dist/shared/assistant/avatar/live/liveAvatarStatus.js +11 -4
- package/dist/shared/assistant/avatar/useAvatarCopy.d.ts +50 -21
- package/dist/shared/assistant/avatar/useAvatarCopy.js +93 -49
- package/dist/shared/assistant/i18nManifest.d.ts +23 -2
- package/dist/shared/assistant/i18nManifest.js +23 -2
- package/dist/shared/assistant/index.d.ts +6 -0
- package/dist/shared/assistant/speech/hostedVoiceCatalogue.d.ts +19 -0
- package/dist/shared/assistant/speech/hostedVoiceCatalogue.js +25 -18
- package/dist/shared/assistant/ui/AIAssistantPanel.js +134 -101
- package/dist/shared/assistant/ui/AssistantAvatarTabs.d.ts +10 -0
- package/dist/shared/assistant/ui/AssistantAvatarTabs.js +48 -0
- package/dist/shared/assistant/ui/AssistantChatArea.js +1261 -1202
- package/dist/shared/assistant/ui/assistantLiveAvatarSeam.d.ts +137 -5
- package/dist/shared/assistant/ui/assistantLiveAvatarSeam.js +114 -55
- package/dist/shared/assistant/ui/avatar/AssistantAvatarTab.d.ts +13 -0
- package/dist/shared/assistant/ui/avatar/AssistantAvatarTab.js +70 -0
- package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +18 -0
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +121 -102
- package/dist/shared/assistant/ui/panelOverlays.d.ts +24 -3
- package/dist/shared/assistant/ui/panelOverlays.js +11 -10
- package/dist/shared/assistant/ui/useVoiceSession.d.ts +20 -5
- package/dist/shared/assistant/ui/useVoiceSession.js +11 -4
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +8 -2
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +172 -160
- package/dist/shared/assistant/ui/voice/voiceStartGate.d.ts +57 -0
- package/dist/shared/assistant/ui/voice/voiceStartGate.js +9 -0
- package/dist/shared/assistant/voice/voiceReply.d.ts +23 -0
- package/dist/shared/assistant/voice/voiceReply.js +13 -0
- package/dist/shared/assistant/voice/voiceSession.d.ts +10 -0
- package/dist/shared/assistant/voice/voiceSession.js +7 -0
- package/dist/shared-assistant.js +260 -254
- package/package.json +1 -1
|
@@ -5,119 +5,152 @@ import { useAssistantTr as r } from "../i18n.js";
|
|
|
5
5
|
import { useAssistantStore as i } from "../store.js";
|
|
6
6
|
import { AssistantSpeechProvider as a } from "./AssistantSpeechProvider.js";
|
|
7
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, useLiveAvatarSpeechEngine as
|
|
9
|
-
import { AssistantPreviewProvider as
|
|
10
|
-
import { useAssistantPreviewBridge as
|
|
11
|
-
import { AssistantConnectSourceProvider as
|
|
12
|
-
import { hasAssistantPreviewSurface as
|
|
13
|
-
import { panelOwnedPreviewBridge as
|
|
14
|
-
import { AssistantPreviewOverlay as
|
|
15
|
-
import { AssistantHeader as
|
|
16
|
-
import { AssistantConversationList as
|
|
17
|
-
import { AssistantConversationDeleteDialogProvider as
|
|
18
|
-
import { AssistantControlConfirmProvider as
|
|
19
|
-
import { AssistantLeaveConfirmNavigateProvider as
|
|
20
|
-
import { useAssistantServerHistory as
|
|
21
|
-
import { useFilesServiceWarmup as
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
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";
|
|
27
28
|
//#region src/shared/assistant/ui/AIAssistantPanel.tsx
|
|
28
|
-
var
|
|
29
|
-
let
|
|
30
|
-
|
|
31
|
-
let [
|
|
32
|
-
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
let
|
|
36
|
-
e(
|
|
37
|
-
let { conversations:
|
|
38
|
-
|
|
39
|
-
|
|
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
|
|
51
|
+
}), [
|
|
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
|
|
40
60
|
}), Q = (e) => {
|
|
41
61
|
let t = u({
|
|
42
|
-
historyOpen:
|
|
43
|
-
previewOpen:
|
|
62
|
+
historyOpen: V,
|
|
63
|
+
previewOpen: z
|
|
44
64
|
}, e);
|
|
45
|
-
|
|
65
|
+
H(t.historyOpen), L(t.previewOpen);
|
|
46
66
|
};
|
|
47
|
-
t("assistant.history",
|
|
67
|
+
t("assistant.history", v(() => ({ run: () => V ? { status: "already" } : (H(!0), L(!1), { status: "done" }) }), [V, H])), t("assistant.preview", v(() => R ? {
|
|
48
68
|
surface: "panel",
|
|
49
|
-
run: () =>
|
|
50
|
-
close: () =>
|
|
69
|
+
run: () => z ? { status: "already" } : (H(!1), L(!0), { status: "done" }),
|
|
70
|
+
close: () => z ? (L(!1), { status: "done" }) : { status: "already" }
|
|
51
71
|
} : null, [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
72
|
+
R,
|
|
73
|
+
z,
|
|
74
|
+
H
|
|
55
75
|
]));
|
|
56
|
-
let $ =
|
|
57
|
-
|
|
58
|
-
let
|
|
59
|
-
return
|
|
60
|
-
panelRef:
|
|
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,
|
|
61
81
|
onClose: () => {
|
|
62
|
-
|
|
63
|
-
historyOpen:
|
|
64
|
-
previewOpen:
|
|
65
|
-
|
|
66
|
-
|
|
82
|
+
let e = l({
|
|
83
|
+
historyOpen: V,
|
|
84
|
+
previewOpen: z,
|
|
85
|
+
avatarOpen: G
|
|
86
|
+
});
|
|
87
|
+
if (e === "overlay") {
|
|
88
|
+
H(!1), L(!1);
|
|
67
89
|
return;
|
|
68
90
|
}
|
|
69
|
-
|
|
91
|
+
if (e === "tab") {
|
|
92
|
+
K(!1), Y && document.getElementById(Y.chatTab)?.focus();
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
C();
|
|
70
96
|
}
|
|
71
|
-
}), /* @__PURE__ */
|
|
72
|
-
visible:
|
|
73
|
-
engine:
|
|
74
|
-
children: /* @__PURE__ */
|
|
75
|
-
value:
|
|
76
|
-
children: /* @__PURE__ */
|
|
77
|
-
value:
|
|
78
|
-
children: /* @__PURE__ */
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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,
|
|
114
|
+
className: "relative flex h-full w-full flex-col bg-bg-surface",
|
|
115
|
+
role: "complementary",
|
|
116
|
+
"aria-label": F("panel.ariaLabel", "AI Assistant"),
|
|
117
|
+
"data-testid": "ai-assistant-panel",
|
|
118
|
+
[s]: "",
|
|
119
|
+
...Z ? { [o]: Z } : {},
|
|
120
|
+
tabIndex: -1,
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ S("div", {
|
|
123
|
+
className: "contents",
|
|
124
|
+
inert: U || void 0,
|
|
125
|
+
children: [/* @__PURE__ */ x(ue, {
|
|
126
|
+
contextLabel: we,
|
|
127
|
+
onNewConversation: () => be(),
|
|
128
|
+
onOpenHistory: () => Q("history"),
|
|
129
|
+
historyOpen: V,
|
|
130
|
+
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
|
|
139
|
+
}) : null]
|
|
140
|
+
}),
|
|
141
|
+
V && /* @__PURE__ */ x(de, {}),
|
|
142
|
+
z && /* @__PURE__ */ x(le, { onClose: () => L(!1) }),
|
|
143
|
+
/* @__PURE__ */ x("div", {
|
|
144
|
+
className: "contents",
|
|
145
|
+
inert: U || void 0,
|
|
146
|
+
children: /* @__PURE__ */ x(h, {
|
|
147
|
+
visible: w ?? !0,
|
|
148
|
+
writeAccess: D
|
|
149
|
+
})
|
|
117
150
|
})
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
})
|
|
151
|
+
]
|
|
152
|
+
}) }) })
|
|
153
|
+
})
|
|
121
154
|
})
|
|
122
155
|
})
|
|
123
156
|
})
|
|
@@ -125,4 +158,4 @@ var k = ({ onClose: k, visible: A, docked: j, onToggleDock: M, writeAccess: N, o
|
|
|
125
158
|
});
|
|
126
159
|
};
|
|
127
160
|
//#endregion
|
|
128
|
-
export {
|
|
161
|
+
export { C as AIAssistantPanel };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { LiveAvatarTabIds } from './assistantLiveAvatarSeam';
|
|
3
|
+
/** The two views of the panel when the live avatar offers its tab. */
|
|
4
|
+
export type AssistantPanelView = "chat" | "avatar";
|
|
5
|
+
export interface AssistantAvatarTabsProps {
|
|
6
|
+
readonly selected: AssistantPanelView;
|
|
7
|
+
readonly onSelect: (view: AssistantPanelView) => void;
|
|
8
|
+
readonly ids: LiveAvatarTabIds;
|
|
9
|
+
}
|
|
10
|
+
export declare const AssistantAvatarTabs: FC<AssistantAvatarTabsProps>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useAvatarCopy as e } from "../avatar/useAvatarCopy.js";
|
|
2
|
+
import { tabForArrowKey as t } from "../preview/entity/entityPreviewState.js";
|
|
3
|
+
import { useRef as n } from "react";
|
|
4
|
+
import { MessageSquare as r, Video as i } from "lucide-react";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
//#region src/shared/assistant/ui/AssistantAvatarTabs.tsx
|
|
7
|
+
var s = ["chat", "avatar"], c = ({ selected: c, onSelect: l, ids: u }) => {
|
|
8
|
+
let d = e(), f = n({}), p = (e, n) => {
|
|
9
|
+
let r = getComputedStyle(e.currentTarget).direction === "rtl", i = t(e.key, s, n, r), a = s.find((e) => e === i);
|
|
10
|
+
a !== void 0 && (e.preventDefault(), f.current[a]?.focus());
|
|
11
|
+
};
|
|
12
|
+
return /* @__PURE__ */ a("div", {
|
|
13
|
+
role: "tablist",
|
|
14
|
+
"aria-label": d.tabsLabel,
|
|
15
|
+
className: "flex shrink-0 border-b border-border-subtle",
|
|
16
|
+
"data-testid": "assistant-avatar-tabs",
|
|
17
|
+
children: s.map((e) => {
|
|
18
|
+
let t = e === c, n = e === "chat";
|
|
19
|
+
return /* @__PURE__ */ o("button", {
|
|
20
|
+
ref: (t) => {
|
|
21
|
+
f.current[e] = t;
|
|
22
|
+
},
|
|
23
|
+
type: "button",
|
|
24
|
+
role: "tab",
|
|
25
|
+
id: n ? u.chatTab : u.avatarTab,
|
|
26
|
+
"aria-selected": t,
|
|
27
|
+
"aria-controls": n ? u.chatPanel : u.avatarPanel,
|
|
28
|
+
"aria-describedby": n && c === "avatar" ? u.leaveHint : void 0,
|
|
29
|
+
tabIndex: t ? 0 : -1,
|
|
30
|
+
onClick: () => {
|
|
31
|
+
t || l(e);
|
|
32
|
+
},
|
|
33
|
+
onKeyDown: (t) => p(t, e),
|
|
34
|
+
className: `inline-flex min-h-11 min-w-0 flex-1 items-center justify-center gap-2 border-b-2 px-3 text-sm font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-border-strong ${t ? "border-action-primary-bg text-text-primary" : "border-transparent text-text-muted hover:text-text-primary"}`,
|
|
35
|
+
"data-testid": n ? "assistant-tab-chat" : "assistant-tab-avatar",
|
|
36
|
+
children: [a(n ? r : i, {
|
|
37
|
+
className: "size-4 shrink-0",
|
|
38
|
+
"aria-hidden": "true"
|
|
39
|
+
}), /* @__PURE__ */ a("span", {
|
|
40
|
+
className: "truncate",
|
|
41
|
+
children: n ? d.tabChat : d.tabAvatar
|
|
42
|
+
})]
|
|
43
|
+
}, e);
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
//#endregion
|
|
48
|
+
export { c as AssistantAvatarTabs };
|