@burdenoff/fe-libs 2026.1114.12 → 2026.1114.14
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/conversation.d.ts +16 -0
- package/dist/shared/assistant/i18nManifest.d.ts +32 -0
- package/dist/shared/assistant/i18nManifest.js +32 -0
- package/dist/shared/assistant/index.d.ts +10 -0
- package/dist/shared/assistant/store.d.ts +7 -0
- package/dist/shared/assistant/store.js +3 -0
- package/dist/shared/assistant/ui/AssistantChatArea.js +1275 -1181
- package/dist/shared/assistant/ui/AssistantMessageList.d.ts +14 -0
- package/dist/shared/assistant/ui/AssistantMessageList.js +55 -52
- package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +6 -0
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +400 -311
- package/dist/shared/assistant/ui/composer/AssistantDictation.d.ts +42 -0
- package/dist/shared/assistant/ui/composer/AssistantDictation.js +127 -0
- package/dist/shared/assistant/ui/composer/AssistantMicMenu.d.ts +23 -0
- package/dist/shared/assistant/ui/composer/AssistantMicMenu.js +176 -0
- package/dist/shared/assistant/ui/composer/microphones.d.ts +13 -0
- package/dist/shared/assistant/ui/composer/microphones.js +15 -0
- package/dist/shared/assistant/ui/composer/useCompactDictation.d.ts +70 -0
- package/dist/shared/assistant/ui/composer/useCompactDictation.js +136 -0
- package/dist/shared/assistant/ui/useVoiceSession.js +166 -164
- package/dist/shared/assistant/ui/voice/AssistantPageVoiceBar.d.ts +67 -0
- package/dist/shared/assistant/ui/voice/AssistantPageVoiceBar.js +290 -0
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +11 -1
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +288 -244
- package/dist/shared/assistant/ui/voice/AssistantVoiceSessionButton.d.ts +5 -0
- package/dist/shared/assistant/ui/voice/AssistantVoiceSessionButton.js +6 -6
- package/dist/shared/assistant/ui/voice/LiveWaveform.d.ts +32 -0
- package/dist/shared/assistant/ui/voice/LiveWaveform.js +52 -0
- package/dist/shared/assistant/ui/voice/VoiceTurnMarks.d.ts +15 -0
- package/dist/shared/assistant/ui/voice/VoiceTurnMarks.js +43 -0
- package/dist/shared/assistant/ui/voice/formatClock.d.ts +2 -0
- package/dist/shared/assistant/ui/voice/formatClock.js +3 -0
- package/dist/shared/assistant/ui/voice/useLiveLevel.d.ts +23 -0
- package/dist/shared/assistant/ui/voice/useLiveLevel.js +56 -0
- package/dist/shared/assistant/voice/liveLevel.d.ts +85 -0
- package/dist/shared/assistant/voice/liveLevel.js +78 -0
- package/dist/shared/assistant/voice/useVoiceInput.d.ts +27 -1
- package/dist/shared/assistant/voice/useVoiceInput.js +141 -71
- package/dist/shared-assistant.js +393 -383
- package/package.json +1 -1
|
@@ -61,6 +61,20 @@ interface Props {
|
|
|
61
61
|
onStopTurn?: () => void;
|
|
62
62
|
/** The platform shell label for the Stop control (`assistantChrome.stopTurn`). */
|
|
63
63
|
stopTurnLabel?: string;
|
|
64
|
+
/**
|
|
65
|
+
* ★ BOFF-13461 (page): what a message shows, and what is drawn under it. The
|
|
66
|
+
* page's voice chat uses it for the reply being spoken (its text in step with
|
|
67
|
+
* the audio), a reply cut off (the words that were spoken), the "Spoken" tags
|
|
68
|
+
* and "Voice chat ended". Absent, every message is drawn as it is.
|
|
69
|
+
*/
|
|
70
|
+
decorate?: (message: Message, index: number, list: readonly Message[]) => MessageDecoration | undefined;
|
|
71
|
+
}
|
|
72
|
+
/** See `decorate`. */
|
|
73
|
+
export interface MessageDecoration {
|
|
74
|
+
/** Shown in place of the message's text. */
|
|
75
|
+
content?: string;
|
|
76
|
+
/** Drawn under the message. */
|
|
77
|
+
below?: ReactNode;
|
|
64
78
|
}
|
|
65
79
|
/** At most one auto-scroll per this long while a reply is streaming in live. */
|
|
66
80
|
export declare const LIVE_SCROLL_GAP_MS = 250;
|
|
@@ -5,69 +5,72 @@ import { useLiveOverlay as r } from "../liveOverlay.js";
|
|
|
5
5
|
import { approvalFollowUpReplyIds as i, approvedPendingWriteIds as a, goAheadSentReplyIds as o } from "../liveTurns.js";
|
|
6
6
|
import { scrollToEndWithin as s } from "./scrollWithin.js";
|
|
7
7
|
import { PAGE_SCROLL_GUTTER as c, useAssistantPageLayout as l } from "./assistantPageLayout.js";
|
|
8
|
-
import {
|
|
9
|
-
import { jsx as
|
|
8
|
+
import { Fragment as u, useEffect as d, useRef as f } from "react";
|
|
9
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
10
10
|
// src/shared/assistant/ui/AssistantMessageList.tsx
|
|
11
|
-
var
|
|
12
|
-
let
|
|
13
|
-
for (let e =
|
|
11
|
+
var h = 250, g = ({ onApprovePendingWrite: h, approvingWriteRef: g = null, approvableMessageId: _ = null, retryableMessageId: v = null, messages: y, processing: b, streamingMessageId: x, failedMessageId: S, onRetry: C, renderWriteProposals: w, hidesLegacyWriteCard: T, renderUiOffers: E, onStopTurn: D, stopTurnLabel: O, decorate: k }) => {
|
|
12
|
+
let A = n(), j = l(), M = (() => {
|
|
13
|
+
for (let e = y.length - 1; e >= 0; --e) if (y[e].role === "assistant") return y[e].id;
|
|
14
14
|
return null;
|
|
15
|
-
})(),
|
|
16
|
-
|
|
17
|
-
let e =
|
|
15
|
+
})(), N = a(y), P = o(y), F = i(y), I = f(null);
|
|
16
|
+
d(() => {
|
|
17
|
+
let e = I.current;
|
|
18
18
|
if (e && e.scrollHeight - e.scrollTop - e.clientHeight < 100) {
|
|
19
19
|
let n = t();
|
|
20
20
|
s(e, { behavior: n ? "auto" : "smooth" });
|
|
21
21
|
}
|
|
22
|
-
}, [
|
|
23
|
-
let
|
|
24
|
-
return
|
|
25
|
-
if (
|
|
22
|
+
}, [y, x]);
|
|
23
|
+
let L = r((e) => e.byMessageId), R = x === null ? null : L[x]?.content ?? null, z = k ? y.map((e, t) => k(e, t, y)) : null, B = z?.[z.length - 1]?.content ?? null, V = f(0), H = f(null), U = R ?? B;
|
|
24
|
+
return d(() => {
|
|
25
|
+
if (U === null) return;
|
|
26
26
|
let e = () => {
|
|
27
|
-
|
|
28
|
-
let e =
|
|
27
|
+
H.current = null, V.current = Date.now();
|
|
28
|
+
let e = I.current;
|
|
29
29
|
e && e.scrollHeight - e.scrollTop - e.clientHeight < 100 && s(e, { behavior: "auto" });
|
|
30
|
-
}, t =
|
|
31
|
-
t <= 0 ? e() :
|
|
32
|
-
}, [
|
|
33
|
-
|
|
34
|
-
}, []),
|
|
35
|
-
|
|
36
|
-
}, []), /* @__PURE__ */
|
|
37
|
-
ref:
|
|
38
|
-
className:
|
|
30
|
+
}, t = V.current + 250 - Date.now();
|
|
31
|
+
t <= 0 ? e() : H.current === null && (H.current = setTimeout(e, t));
|
|
32
|
+
}, [U]), d(() => () => {
|
|
33
|
+
H.current !== null && clearTimeout(H.current);
|
|
34
|
+
}, []), d(() => {
|
|
35
|
+
I.current && s(I.current, { behavior: "instant" });
|
|
36
|
+
}, []), /* @__PURE__ */ m("div", {
|
|
37
|
+
ref: I,
|
|
38
|
+
className: j ? `scrollbar-slim flex-1 space-y-4 overflow-y-auto py-3 ${c}` : "scrollbar-slim flex-1 space-y-4 overflow-y-auto p-3",
|
|
39
39
|
role: "log",
|
|
40
40
|
"aria-live": "polite",
|
|
41
41
|
"aria-relevant": "additions",
|
|
42
|
-
"aria-busy":
|
|
43
|
-
"aria-label":
|
|
44
|
-
children: [
|
|
45
|
-
let
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
42
|
+
"aria-busy": x !== null,
|
|
43
|
+
"aria-label": A("messageList.ariaLabel", "Conversation messages"),
|
|
44
|
+
children: [y.map((t, n) => {
|
|
45
|
+
let r = z?.[n], i = r?.content === void 0 ? t : {
|
|
46
|
+
...t,
|
|
47
|
+
content: r.content
|
|
48
|
+
}, a = r?.content === void 0 ? R : null, o = N.has(i.id), s = !o && (i.id === _ || i.id === x);
|
|
49
|
+
return /* @__PURE__ */ m(u, { children: [/* @__PURE__ */ p(e, {
|
|
50
|
+
onApprovePendingWrite: s ? h : void 0,
|
|
51
|
+
approvingWriteRef: g,
|
|
52
|
+
pendingWriteApproved: o,
|
|
53
|
+
pendingWriteGoAheadSent: P.has(i.id),
|
|
54
|
+
pendingWriteExpired: !o && !s,
|
|
55
|
+
message: i.id === x && a !== null ? {
|
|
56
|
+
...i,
|
|
57
|
+
content: a
|
|
58
|
+
} : i,
|
|
59
|
+
processing: b,
|
|
60
|
+
isStreaming: i.id === x,
|
|
61
|
+
isFailed: i.id === S,
|
|
62
|
+
isLastAssistant: i.id === v,
|
|
63
|
+
isNewestAssistant: i.id === M,
|
|
64
|
+
onRetry: F.has(i.id) ? void 0 : C,
|
|
65
|
+
legacyWriteCardHidden: T?.(i) ?? !1,
|
|
66
|
+
writeProposals: w?.(i),
|
|
67
|
+
uiOffers: E?.(i),
|
|
68
|
+
...i.id === x && D !== void 0 ? {
|
|
69
|
+
onStopTurn: D,
|
|
70
|
+
stopTurnLabel: O
|
|
68
71
|
} : {}
|
|
69
|
-
},
|
|
70
|
-
}), /* @__PURE__ */
|
|
72
|
+
}), r?.below] }, i.id);
|
|
73
|
+
}), /* @__PURE__ */ p("div", {})]
|
|
71
74
|
});
|
|
72
75
|
};
|
|
73
|
-
export {
|
|
76
|
+
export { g as AssistantMessageList, h as LIVE_SCROLL_GAP_MS };
|
|
@@ -129,6 +129,12 @@ interface Props {
|
|
|
129
129
|
modeReadOnly?: boolean;
|
|
130
130
|
/** Compact only: the shared voice session owns the microphone and its controls. */
|
|
131
131
|
voiceSessionActive?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* ★ BOFF-13461 (compact, on a page): hidden, and kept mounted. The page's live
|
|
134
|
+
* voice conversation draws its bar in the box's place, and the draft is here
|
|
135
|
+
* again when it ends.
|
|
136
|
+
*/
|
|
137
|
+
concealed?: boolean;
|
|
132
138
|
}
|
|
133
139
|
/** A local draft snapshot; no files are uploaded by observing it. */
|
|
134
140
|
export interface AssistantComposerDraft {
|