@burdenoff/fe-libs 2026.1002.2 → 2026.1003.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.
- package/dist/shared/assistant/ui/AssistantAvatar.d.ts +0 -21
- package/dist/shared/assistant/ui/AssistantAvatar.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantAvatar.js +13 -7
- package/dist/shared/assistant/ui/AssistantMessageItem.d.ts +8 -0
- package/dist/shared/assistant/ui/AssistantMessageItem.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantMessageItem.js +60 -58
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +117 -117
- package/dist/shared/assistant/ui/composer/AssistantVoiceButton.d.ts +8 -0
- package/dist/shared/assistant/ui/composer/AssistantVoiceButton.d.ts.map +1 -1
- package/dist/shared/assistant/ui/composer/AssistantVoiceButton.js +21 -16
- package/dist/shared/assistant/ui/useVoiceSession.d.ts +1 -4
- package/dist/shared/assistant/ui/useVoiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/ui/useVoiceSession.js +117 -114
- package/dist/shared/assistant/ui/voice/AssistantVoiceOrb.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/AssistantVoiceOrb.js +16 -15
- package/dist/shared/assistant/ui/voice/VoiceCaption.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/VoiceCaption.js +1 -1
- package/dist/shared/assistant/ui/voice/VoiceMiniController.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/VoiceMiniController.js +35 -30
- package/dist/shared/assistant/ui/voice/VoiceStage.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/VoiceStage.js +38 -37
- package/dist/shared/assistant/ui/voice/VoiceWaveform.d.ts +6 -0
- package/dist/shared/assistant/ui/voice/VoiceWaveform.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/VoiceWaveform.js +40 -36
- package/dist/shared/assistant/voice/speechPlayback.d.ts +37 -19
- package/dist/shared/assistant/voice/speechPlayback.d.ts.map +1 -1
- package/dist/shared/assistant/voice/speechPlayback.js +11 -1
- package/dist/shared-assistant.js +124 -124
- package/package.json +1 -1
|
@@ -1,25 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* The assistant's brand mark beside each of its messages.
|
|
4
|
-
*
|
|
5
|
-
* ★★ `active` must be the turn's IN-FLIGHT flag — `isStreaming`, which
|
|
6
|
-
* `AssistantChatArea` derives through `isTurnInFlight`. That flag is already
|
|
7
|
-
* true on the first frame of `provisioning`, so the cold-start wait animates
|
|
8
|
-
* too, and it goes false on complete, on error, on interrupt (the processing
|
|
9
|
-
* entry is deleted) and while an approval is pending (the turn settles to
|
|
10
|
-
* `complete` first). Keying off "has text" would miss the whole wait before the
|
|
11
|
-
* first token; keying off the message id latches forever — the bug recorded
|
|
12
|
-
* beside `activeStreamingMessageId`.
|
|
13
|
-
*
|
|
14
|
-
* ★ Every settled message draws this same avatar, so the motion MUST be gated on
|
|
15
|
-
* `active` or the entire transcript breathes.
|
|
16
|
-
*
|
|
17
|
-
* ★ Motion is `motion-safe:` only. An OS reduced-motion preference reaches this
|
|
18
|
-
* through that media query; the product's own preference through
|
|
19
|
-
* `:root[data-reduce-motion]` in tokens.css. Both paths stop it. It is purely
|
|
20
|
-
* decorative — the transcript's `aria-busy` already conveys the state — so it is
|
|
21
|
-
* hidden from assistive technology.
|
|
22
|
-
*/
|
|
23
2
|
export declare const AssistantAvatar: FC<{
|
|
24
3
|
active?: boolean;
|
|
25
4
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantAvatar.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AssistantAvatar.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAqDhC,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAalD,CAAC"}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { usePrefersReducedMotion as e } from "./usePrefersReducedMotion.js";
|
|
2
|
+
import { Sparkles as t } from "lucide-react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
4
|
//#region src/shared/assistant/ui/AssistantAvatar.tsx
|
|
4
|
-
var
|
|
5
|
+
var r = "mt-0.5 flex size-6 flex-shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-action-primary-bg/25 to-action-primary-bg/5 text-action-primary-bg", i = () => /* @__PURE__ */ n("div", {
|
|
5
6
|
"aria-hidden": "true",
|
|
6
7
|
"data-testid": "assistant-avatar",
|
|
7
|
-
"data-active":
|
|
8
|
-
className:
|
|
9
|
-
children: /* @__PURE__ */ t
|
|
8
|
+
"data-active": "true",
|
|
9
|
+
className: r + (e() ? "" : " motion-safe:animate-pulse"),
|
|
10
|
+
children: /* @__PURE__ */ n(t, { className: "size-3.5" })
|
|
11
|
+
}), a = ({ active: e = !1 }) => e ? /* @__PURE__ */ n(i, {}) : /* @__PURE__ */ n("div", {
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
"data-testid": "assistant-avatar",
|
|
14
|
+
className: r,
|
|
15
|
+
children: /* @__PURE__ */ n(t, { className: "size-3.5" })
|
|
10
16
|
});
|
|
11
17
|
//#endregion
|
|
12
|
-
export {
|
|
18
|
+
export { a as AssistantAvatar };
|
|
@@ -61,6 +61,14 @@ interface Props {
|
|
|
61
61
|
/** ★ BOFF-7803 5a (FE7): this reply's write-proposal cards, if any. */
|
|
62
62
|
writeProposals?: ReactNode;
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Purely decorative "still typing" caret: hidden from assistive tech (the list's
|
|
66
|
+
* aria-busy already conveys the state) and still under EITHER reduced-motion
|
|
67
|
+
* signal (BOFF-8566). `motion-safe:` sees only the device media query, so the
|
|
68
|
+
* app's own Reduce motion setting never stopped the pulse; the hook reads both.
|
|
69
|
+
* Rendered only while a turn streams, so only that one row subscribes.
|
|
70
|
+
*/
|
|
71
|
+
export declare const StreamingCaret: FC;
|
|
64
72
|
export declare const AssistantMessageItem: FC<Props>;
|
|
65
73
|
export {};
|
|
66
74
|
//# sourceMappingURL=AssistantMessageItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantMessageItem.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantMessageItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AssistantMessageItem.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantMessageItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAyBnE,OAAO,KAAK,EACV,+BAA+B,EAG/B,OAAO,EACR,MAAM,iBAAiB,CAAC;AAIzB,UAAU,KAAK;IACb,mEAAmE;IACnE,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,6EAA6E;IAC7E,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;OAGG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,+BAA+B,GAAG,IAAI,CAAC;IACpD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,uEAAuE;IACvE,cAAc,CAAC,EAAE,SAAS,CAAC;CAC5B;AAyCD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,EAY5B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,KAAK,CAyV1C,CAAC"}
|
|
@@ -7,39 +7,44 @@ import { AssistantMarkdownRenderer as i } from "./AssistantMarkdownRenderer.js";
|
|
|
7
7
|
import { downloadAssistantArtifact as a } from "../api.js";
|
|
8
8
|
import { getAssistantDisplayContent as o } from "../displayContent.js";
|
|
9
9
|
import { AssistantToolActivity as s, parseToolActivity as ee } from "./AssistantToolActivity.js";
|
|
10
|
-
import {
|
|
10
|
+
import { usePrefersReducedMotion as c } from "./usePrefersReducedMotion.js";
|
|
11
|
+
import { AssistantAvatar as te } from "./AssistantAvatar.js";
|
|
11
12
|
import { useAssistantSpeech as l } from "./AssistantSpeechProvider.js";
|
|
12
13
|
import { AssistantMessageAttachments as u } from "./AssistantMessageAttachments.js";
|
|
13
14
|
import { AssistantPendingWriteCard as d } from "./AssistantPendingWriteCard.js";
|
|
14
|
-
import { AssistantSpeakButton as
|
|
15
|
-
import { SaveToFilesButton as
|
|
15
|
+
import { AssistantSpeakButton as f } from "./AssistantSpeakButton.js";
|
|
16
|
+
import { SaveToFilesButton as p } from "../../../storage/SaveToFilesButton.js";
|
|
16
17
|
import "../../../storage/index.js";
|
|
17
|
-
import { AssistantTurnActivity as
|
|
18
|
-
import { useMemo as
|
|
19
|
-
import { Check as
|
|
20
|
-
import { Fragment as
|
|
18
|
+
import { AssistantTurnActivity as m } from "./AssistantTurnActivity.js";
|
|
19
|
+
import { useMemo as h, useState as g } from "react";
|
|
20
|
+
import { Check as ne, Copy as _, RotateCcw as v } from "lucide-react";
|
|
21
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
21
22
|
//#region src/shared/assistant/ui/AssistantMessageItem.tsx
|
|
22
|
-
function
|
|
23
|
+
function S(e) {
|
|
23
24
|
return e.role === "assistant" ? e.metadata : void 0;
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function C(e) {
|
|
26
27
|
return e?.artifacts ?? [];
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
+
function w(e) {
|
|
29
30
|
return window.atob(e);
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
-
let r =
|
|
32
|
+
function T(e, t, n) {
|
|
33
|
+
let r = w(e), i = new Uint8Array(r.length);
|
|
33
34
|
for (let e = 0; e < r.length; e += 1) i[e] = r.charCodeAt(e);
|
|
34
35
|
let a = new Blob([i], { type: n }), o = URL.createObjectURL(a), s = document.createElement("a");
|
|
35
36
|
s.href = o, s.download = t, document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(o);
|
|
36
37
|
}
|
|
37
|
-
var
|
|
38
|
-
|
|
38
|
+
var E = () => /* @__PURE__ */ b("span", {
|
|
39
|
+
"aria-hidden": "true",
|
|
40
|
+
"data-testid": "assistant-streaming-caret",
|
|
41
|
+
className: "ml-0.5 inline-block h-4 w-1.5 rounded-sm bg-text-secondary align-middle" + (c() ? "" : " motion-safe:animate-pulse")
|
|
42
|
+
}), D = ({ onApprovePendingWrite: c, approvingWriteRef: w = null, pendingWriteExpired: D = !1, pendingWriteApproved: re = !1, pendingWriteGoAheadSent: ie = !1, message: O, processing: k, isStreaming: A, isFailed: j, isLastAssistant: M, isNewestAssistant: N, onRetry: P, legacyWriteCardHidden: F = !1, writeProposals: I }) => {
|
|
43
|
+
let L = n(), R = t(), { getAccessToken: z, getWorkspaceToken: B } = e(), V = l(), [H, U] = g(null), [W, G] = g(!1), K = O.role === "user", q = h(() => S(O), [O]), J = h(() => C(q), [q]), Y = k === void 0 ? A ? {
|
|
39
44
|
status: "streaming",
|
|
40
45
|
messageId: O.id,
|
|
41
46
|
updatedAt: O.timestamp
|
|
42
|
-
} : null : k, X = o(O, Y, L), { steps: Z, text: Q } =
|
|
47
|
+
} : null : k, X = o(O, Y, L), { steps: Z, text: Q } = h(() => K ? {
|
|
43
48
|
steps: [],
|
|
44
49
|
text: O.content
|
|
45
50
|
} : X.kind === "output" ? ee(X.text) : {
|
|
@@ -50,11 +55,11 @@ var w = ({ onApprovePendingWrite: S, approvingWriteRef: w = null, pendingWriteEx
|
|
|
50
55
|
O.content,
|
|
51
56
|
X.kind,
|
|
52
57
|
X.text
|
|
53
|
-
]),
|
|
58
|
+
]), ae = () => {
|
|
54
59
|
r(Q).then((e) => {
|
|
55
60
|
e && (G(!0), setTimeout(() => G(!1), 2e3));
|
|
56
61
|
});
|
|
57
|
-
},
|
|
62
|
+
}, oe = async (e) => {
|
|
58
63
|
if (!q?.sandboxId || !q.sessionId) return;
|
|
59
64
|
let t = new URLSearchParams(window.location.search).get("workspace") ?? "";
|
|
60
65
|
if (t) {
|
|
@@ -64,7 +69,7 @@ var w = ({ onApprovePendingWrite: S, approvingWriteRef: w = null, pendingWriteEx
|
|
|
64
69
|
accessToken: z(),
|
|
65
70
|
workspaceToken: B()
|
|
66
71
|
});
|
|
67
|
-
|
|
72
|
+
T(n.contentBase64, n.filename, n.mimeType);
|
|
68
73
|
} finally {
|
|
69
74
|
U(null);
|
|
70
75
|
}
|
|
@@ -73,31 +78,31 @@ var w = ({ onApprovePendingWrite: S, approvingWriteRef: w = null, pendingWriteEx
|
|
|
73
78
|
hour: "2-digit",
|
|
74
79
|
minute: "2-digit"
|
|
75
80
|
});
|
|
76
|
-
if (O.role === "system") return /* @__PURE__ */
|
|
81
|
+
if (O.role === "system") return /* @__PURE__ */ b("div", {
|
|
77
82
|
className: "flex justify-center px-2 py-1",
|
|
78
83
|
"data-testid": "assistant-message-system",
|
|
79
|
-
children: /* @__PURE__ */
|
|
84
|
+
children: /* @__PURE__ */ b("p", {
|
|
80
85
|
className: "max-w-[90%] whitespace-pre-wrap break-words rounded-lg border border-border-subtle bg-bg-sunken/60 px-3 py-2 text-center text-xs leading-relaxed text-text-muted",
|
|
81
86
|
children: O.content
|
|
82
87
|
})
|
|
83
88
|
});
|
|
84
89
|
if (K) {
|
|
85
90
|
let e = O.metadata?.attachments ?? [];
|
|
86
|
-
return /* @__PURE__ */
|
|
91
|
+
return /* @__PURE__ */ b("div", {
|
|
87
92
|
className: "flex justify-end",
|
|
88
93
|
"data-testid": "assistant-message-user",
|
|
89
|
-
children: /* @__PURE__ */
|
|
94
|
+
children: /* @__PURE__ */ x("div", {
|
|
90
95
|
className: "max-w-[85%]",
|
|
91
96
|
children: [
|
|
92
|
-
O.content && /* @__PURE__ */
|
|
97
|
+
O.content && /* @__PURE__ */ b("div", {
|
|
93
98
|
className: "rounded-2xl rounded-br-md bg-action-primary-bg/12 px-3.5 py-2.5 text-[15px] leading-relaxed text-text-primary",
|
|
94
|
-
children: /* @__PURE__ */
|
|
99
|
+
children: /* @__PURE__ */ b("p", {
|
|
95
100
|
className: "whitespace-pre-wrap",
|
|
96
101
|
children: O.content
|
|
97
102
|
})
|
|
98
103
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ b(u, { attachments: e }),
|
|
105
|
+
/* @__PURE__ */ b("div", {
|
|
101
106
|
className: "mt-1 pr-1 text-right text-[10px] text-text-muted",
|
|
102
107
|
children: $
|
|
103
108
|
})
|
|
@@ -105,47 +110,44 @@ var w = ({ onApprovePendingWrite: S, approvingWriteRef: w = null, pendingWriteEx
|
|
|
105
110
|
})
|
|
106
111
|
});
|
|
107
112
|
}
|
|
108
|
-
return /* @__PURE__ */
|
|
113
|
+
return /* @__PURE__ */ x("div", {
|
|
109
114
|
className: "flex gap-2.5",
|
|
110
115
|
"data-testid": "assistant-message-assistant",
|
|
111
|
-
children: [/* @__PURE__ */
|
|
116
|
+
children: [/* @__PURE__ */ b(te, { active: A }), /* @__PURE__ */ x("div", {
|
|
112
117
|
className: "min-w-0 flex-1",
|
|
113
118
|
children: [
|
|
114
|
-
Z.length > 0 && /* @__PURE__ */
|
|
115
|
-
q?.pendingWrite && !F ? /* @__PURE__ */
|
|
119
|
+
Z.length > 0 && /* @__PURE__ */ b(s, { steps: Z }),
|
|
120
|
+
q?.pendingWrite && !F ? /* @__PURE__ */ b(d, {
|
|
116
121
|
pendingWrite: q.pendingWrite,
|
|
117
|
-
onApprove:
|
|
122
|
+
onApprove: c,
|
|
118
123
|
approving: w !== null && w === q.pendingWrite.reference,
|
|
119
|
-
expired:
|
|
120
|
-
approved:
|
|
121
|
-
goAheadSent:
|
|
124
|
+
expired: D,
|
|
125
|
+
approved: re,
|
|
126
|
+
goAheadSent: ie,
|
|
122
127
|
awaitingTurn: !!A
|
|
123
128
|
}) : null,
|
|
124
129
|
I,
|
|
125
|
-
Q && /* @__PURE__ */
|
|
130
|
+
Q && /* @__PURE__ */ b("div", {
|
|
126
131
|
className: "text-[15px] leading-relaxed text-text-primary",
|
|
127
|
-
children: /* @__PURE__ */
|
|
132
|
+
children: /* @__PURE__ */ b(i, { content: Q })
|
|
128
133
|
}),
|
|
129
|
-
X.kind === "working" && /* @__PURE__ */
|
|
130
|
-
X.kind === "stopped" && /* @__PURE__ */
|
|
134
|
+
X.kind === "working" && /* @__PURE__ */ b(m, { processing: Y }),
|
|
135
|
+
X.kind === "stopped" && /* @__PURE__ */ b("p", {
|
|
131
136
|
className: "text-[15px] leading-relaxed text-text-secondary",
|
|
132
137
|
"data-testid": "assistant-turn-stopped",
|
|
133
138
|
children: X.text
|
|
134
139
|
}),
|
|
135
|
-
A && /* @__PURE__ */
|
|
136
|
-
|
|
137
|
-
className: "ml-0.5 inline-block h-4 w-1.5 rounded-sm bg-text-secondary align-middle motion-safe:animate-pulse"
|
|
138
|
-
}),
|
|
139
|
-
J.length > 0 && q?.sandboxId && q.sessionId && /* @__PURE__ */ b("div", {
|
|
140
|
+
A && /* @__PURE__ */ b(E, {}),
|
|
141
|
+
J.length > 0 && q?.sandboxId && q.sessionId && /* @__PURE__ */ x("div", {
|
|
140
142
|
className: "mt-3 space-y-2 border-t border-border-subtle pt-2",
|
|
141
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ b("p", {
|
|
142
144
|
className: "text-[10px] font-medium uppercase tracking-wide text-text-muted",
|
|
143
145
|
children: L("message.downloads", "Downloads")
|
|
144
|
-
}), /* @__PURE__ */
|
|
146
|
+
}), /* @__PURE__ */ b("div", {
|
|
145
147
|
className: "flex flex-wrap gap-2",
|
|
146
148
|
children: J.map((e) => {
|
|
147
149
|
let t = `${e.name}${e.type === "directory" ? ".tar.gz" : ""}`;
|
|
148
|
-
return /* @__PURE__ */
|
|
150
|
+
return /* @__PURE__ */ b(p, {
|
|
149
151
|
label: t,
|
|
150
152
|
disabled: H === e.path,
|
|
151
153
|
testId: `assistant-artifact-${e.name}`,
|
|
@@ -157,50 +159,50 @@ var w = ({ onApprovePendingWrite: S, approvingWriteRef: w = null, pendingWriteEx
|
|
|
157
159
|
filename: t
|
|
158
160
|
},
|
|
159
161
|
defaultFolderPath: R.artifacts,
|
|
160
|
-
onDownload: () =>
|
|
162
|
+
onDownload: () => oe(e)
|
|
161
163
|
}, e.path);
|
|
162
164
|
})
|
|
163
165
|
})]
|
|
164
166
|
}),
|
|
165
|
-
!A && (Q || j || M) && /* @__PURE__ */
|
|
167
|
+
!A && (Q || j || M) && /* @__PURE__ */ x("div", {
|
|
166
168
|
className: "mt-1.5 flex items-center gap-1",
|
|
167
169
|
children: [
|
|
168
|
-
Q && /* @__PURE__ */
|
|
170
|
+
Q && /* @__PURE__ */ b("button", {
|
|
169
171
|
type: "button",
|
|
170
|
-
onClick:
|
|
172
|
+
onClick: ae,
|
|
171
173
|
className: "flex items-center gap-1 rounded-md px-1.5 py-1 text-[11px] text-text-muted transition-colors hover:bg-bg-elevated hover:text-text-secondary",
|
|
172
174
|
"aria-label": L("message.copy", "Copy message"),
|
|
173
175
|
"data-testid": "assistant-message-copy",
|
|
174
|
-
children: W ? /* @__PURE__ */
|
|
176
|
+
children: W ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(ne, { className: "size-3 text-status-success-text" }), /* @__PURE__ */ b("span", { children: L("message.copied", "Copied") })] }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(_, { className: "size-3" }), /* @__PURE__ */ b("span", { children: L("message.copyShort", "Copy") })] })
|
|
175
177
|
}),
|
|
176
178
|
Q && V.isSupported && (() => {
|
|
177
179
|
let e = V.blockedFor(O.id) ?? V.disabledReason, t = !!e && !!N, n = t ? `speak-reason-${O.id}` : void 0;
|
|
178
|
-
return /* @__PURE__ */
|
|
180
|
+
return /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(f, {
|
|
179
181
|
isSpeaking: V.isSpeaking(O.id),
|
|
180
182
|
disabled: e !== null,
|
|
181
183
|
disabledReason: e,
|
|
182
184
|
describedById: n,
|
|
183
185
|
onClick: () => V.toggle(O.id, Q, q?.lang)
|
|
184
|
-
}), t && /* @__PURE__ */
|
|
186
|
+
}), t && /* @__PURE__ */ b("span", {
|
|
185
187
|
id: n,
|
|
186
188
|
className: "text-[11px] text-text-muted",
|
|
187
189
|
"data-testid": "assistant-speak-reason",
|
|
188
190
|
children: e
|
|
189
191
|
})] });
|
|
190
192
|
})(),
|
|
191
|
-
(j || M) && P && !O.metadata?.localAction && /* @__PURE__ */
|
|
193
|
+
(j || M) && P && !O.metadata?.localAction && /* @__PURE__ */ x("button", {
|
|
192
194
|
type: "button",
|
|
193
195
|
onClick: P,
|
|
194
196
|
className: `flex items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-colors hover:bg-bg-elevated ${j ? "text-status-error-text" : "text-text-muted hover:text-text-secondary"}`,
|
|
195
197
|
"aria-label": L("message.retry", "Retry"),
|
|
196
198
|
"data-testid": "assistant-message-retry",
|
|
197
|
-
children: [/* @__PURE__ */
|
|
199
|
+
children: [/* @__PURE__ */ b(v, { className: "size-3" }), /* @__PURE__ */ b("span", { children: L("message.retry", "Retry") })]
|
|
198
200
|
})
|
|
199
201
|
]
|
|
200
202
|
}),
|
|
201
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ x("div", {
|
|
202
204
|
className: "mt-1 text-[10px] text-text-muted",
|
|
203
|
-
children: [$, O.tokens && /* @__PURE__ */
|
|
205
|
+
children: [$, O.tokens && /* @__PURE__ */ x("span", {
|
|
204
206
|
className: "ml-2",
|
|
205
207
|
children: [O.tokens.input + O.tokens.output, " tokens"]
|
|
206
208
|
})]
|
|
@@ -210,4 +212,4 @@ var w = ({ onApprovePendingWrite: S, approvingWriteRef: w = null, pendingWriteEx
|
|
|
210
212
|
});
|
|
211
213
|
};
|
|
212
214
|
//#endregion
|
|
213
|
-
export {
|
|
215
|
+
export { D as AssistantMessageItem, E as StreamingCaret };
|