@burdenoff/fe-libs 2026.1002.1 → 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.
Files changed (75) hide show
  1. package/dist/shared/assistant/gatewayClient.d.ts +6 -0
  2. package/dist/shared/assistant/gatewayClient.d.ts.map +1 -1
  3. package/dist/shared/assistant/gatewayClient.js +1 -0
  4. package/dist/shared/assistant/history/historyApi.d.ts +12 -0
  5. package/dist/shared/assistant/history/historyApi.d.ts.map +1 -1
  6. package/dist/shared/assistant/history/historyApi.js +62 -46
  7. package/dist/shared/assistant/history/historyControls.d.ts +7 -0
  8. package/dist/shared/assistant/history/historyControls.d.ts.map +1 -1
  9. package/dist/shared/assistant/history/historyControls.js +19 -16
  10. package/dist/shared/assistant/history/historyEngine.d.ts +17 -1
  11. package/dist/shared/assistant/history/historyEngine.d.ts.map +1 -1
  12. package/dist/shared/assistant/history/historyEngine.js +507 -467
  13. package/dist/shared/assistant/history/historyList.d.ts +15 -0
  14. package/dist/shared/assistant/history/historyList.d.ts.map +1 -1
  15. package/dist/shared/assistant/history/historyList.js +37 -38
  16. package/dist/shared/assistant/history/historyOperations.d.ts +35 -3
  17. package/dist/shared/assistant/history/historyOperations.d.ts.map +1 -1
  18. package/dist/shared/assistant/history/historyOperations.js +64 -27
  19. package/dist/shared/assistant/history/historySearch.d.ts +110 -0
  20. package/dist/shared/assistant/history/historySearch.d.ts.map +1 -0
  21. package/dist/shared/assistant/history/historySearch.js +226 -0
  22. package/dist/shared/assistant/history/historySearchQuery.d.ts +50 -0
  23. package/dist/shared/assistant/history/historySearchQuery.d.ts.map +1 -0
  24. package/dist/shared/assistant/history/historySearchQuery.js +23 -0
  25. package/dist/shared/assistant/history/historyTransportErrors.d.ts +17 -0
  26. package/dist/shared/assistant/history/historyTransportErrors.d.ts.map +1 -1
  27. package/dist/shared/assistant/history/historyTransportErrors.js +9 -1
  28. package/dist/shared/assistant/history/historyTypes.d.ts +32 -0
  29. package/dist/shared/assistant/history/historyTypes.d.ts.map +1 -1
  30. package/dist/shared/assistant/history/useAssistantHistorySearch.d.ts +32 -0
  31. package/dist/shared/assistant/history/useAssistantHistorySearch.d.ts.map +1 -0
  32. package/dist/shared/assistant/history/useAssistantHistorySearch.js +34 -0
  33. package/dist/shared/assistant/i18nManifest.d.ts +8 -0
  34. package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
  35. package/dist/shared/assistant/i18nManifest.js +8 -0
  36. package/dist/shared/assistant/index.d.ts +4 -0
  37. package/dist/shared/assistant/index.d.ts.map +1 -1
  38. package/dist/shared/assistant/ui/AssistantAvatar.d.ts +0 -21
  39. package/dist/shared/assistant/ui/AssistantAvatar.d.ts.map +1 -1
  40. package/dist/shared/assistant/ui/AssistantAvatar.js +13 -7
  41. package/dist/shared/assistant/ui/AssistantConversationFilters.d.ts +5 -1
  42. package/dist/shared/assistant/ui/AssistantConversationFilters.d.ts.map +1 -1
  43. package/dist/shared/assistant/ui/AssistantConversationFilters.js +81 -74
  44. package/dist/shared/assistant/ui/AssistantConversationList.d.ts +9 -0
  45. package/dist/shared/assistant/ui/AssistantConversationList.d.ts.map +1 -1
  46. package/dist/shared/assistant/ui/AssistantConversationList.js +316 -242
  47. package/dist/shared/assistant/ui/AssistantHistorySearchBox.d.ts +12 -0
  48. package/dist/shared/assistant/ui/AssistantHistorySearchBox.d.ts.map +1 -0
  49. package/dist/shared/assistant/ui/AssistantHistorySearchBox.js +74 -0
  50. package/dist/shared/assistant/ui/AssistantMessageItem.d.ts +8 -0
  51. package/dist/shared/assistant/ui/AssistantMessageItem.d.ts.map +1 -1
  52. package/dist/shared/assistant/ui/AssistantMessageItem.js +60 -58
  53. package/dist/shared/assistant/ui/composer/AssistantComposer.js +117 -117
  54. package/dist/shared/assistant/ui/composer/AssistantVoiceButton.d.ts +8 -0
  55. package/dist/shared/assistant/ui/composer/AssistantVoiceButton.d.ts.map +1 -1
  56. package/dist/shared/assistant/ui/composer/AssistantVoiceButton.js +21 -16
  57. package/dist/shared/assistant/ui/useVoiceSession.d.ts +1 -4
  58. package/dist/shared/assistant/ui/useVoiceSession.d.ts.map +1 -1
  59. package/dist/shared/assistant/ui/useVoiceSession.js +117 -114
  60. package/dist/shared/assistant/ui/voice/AssistantVoiceOrb.d.ts.map +1 -1
  61. package/dist/shared/assistant/ui/voice/AssistantVoiceOrb.js +16 -15
  62. package/dist/shared/assistant/ui/voice/VoiceCaption.d.ts.map +1 -1
  63. package/dist/shared/assistant/ui/voice/VoiceCaption.js +1 -1
  64. package/dist/shared/assistant/ui/voice/VoiceMiniController.d.ts.map +1 -1
  65. package/dist/shared/assistant/ui/voice/VoiceMiniController.js +35 -30
  66. package/dist/shared/assistant/ui/voice/VoiceStage.d.ts.map +1 -1
  67. package/dist/shared/assistant/ui/voice/VoiceStage.js +38 -37
  68. package/dist/shared/assistant/ui/voice/VoiceWaveform.d.ts +6 -0
  69. package/dist/shared/assistant/ui/voice/VoiceWaveform.d.ts.map +1 -1
  70. package/dist/shared/assistant/ui/voice/VoiceWaveform.js +40 -36
  71. package/dist/shared/assistant/voice/speechPlayback.d.ts +37 -19
  72. package/dist/shared/assistant/voice/speechPlayback.d.ts.map +1 -1
  73. package/dist/shared/assistant/voice/speechPlayback.js +11 -1
  74. package/dist/shared-assistant.js +175 -171
  75. package/package.json +1 -1
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ export interface AssistantHistorySearchBoxProps {
3
+ /** What the box holds — the list's own state, and nowhere else. */
4
+ value: string;
5
+ onChange: (next: string) => void;
6
+ /** Enter: search what the box holds now, without waiting for typing to pause. */
7
+ onSubmit: () => void;
8
+ /** Why the server's matches are missing or incomplete; "" when nothing is wrong. */
9
+ notice: string;
10
+ }
11
+ export declare const AssistantHistorySearchBox: FC<AssistantHistorySearchBoxProps>;
12
+ //# sourceMappingURL=AssistantHistorySearchBox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssistantHistorySearchBox.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantHistorySearchBox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AA2C/C,MAAM,WAAW,8BAA8B;IAC7C,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,iFAAiF;IACjF,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,oFAAoF;IACpF,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CA+ExE,CAAC"}
@@ -0,0 +1,74 @@
1
+ import { useAssistantTr as e } from "../i18n.js";
2
+ import { clampHistorySearchText as t } from "../history/historySearchQuery.js";
3
+ import { useId as n, useRef as r } from "react";
4
+ import { Search as i, X as a } from "lucide-react";
5
+ import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
6
+ //#region src/shared/assistant/ui/AssistantHistorySearchBox.tsx
7
+ var l = "focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-1 focus-visible:outline-[var(--color-focus-ring)]", u = ({ value: u, onChange: d, onSubmit: f, notice: p }) => {
8
+ let m = e(), h = `${n()}-search-label`, g = r(null), _ = m("historySearch.label", "Search conversations");
9
+ return /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ c("div", {
10
+ role: "search",
11
+ "aria-labelledby": h,
12
+ className: "relative",
13
+ "data-testid": "history-search",
14
+ children: [/* @__PURE__ */ c("label", {
15
+ className: "block",
16
+ children: [
17
+ /* @__PURE__ */ s("span", {
18
+ id: h,
19
+ className: "sr-only",
20
+ children: _
21
+ }),
22
+ /* @__PURE__ */ s(i, {
23
+ className: "pointer-events-none absolute left-2 top-1/2 size-3 -translate-y-1/2 text-text-muted",
24
+ "aria-hidden": "true"
25
+ }),
26
+ /* @__PURE__ */ s("input", {
27
+ ref: g,
28
+ role: "searchbox",
29
+ inputMode: "search",
30
+ enterKeyHint: "search",
31
+ autoComplete: "off",
32
+ spellCheck: !1,
33
+ value: u,
34
+ placeholder: _,
35
+ onChange: (e) => d(t(e.target.value)),
36
+ onKeyDown: (e) => {
37
+ if (!e.nativeEvent.isComposing) {
38
+ if (e.key === "Enter") {
39
+ e.preventDefault(), f();
40
+ return;
41
+ }
42
+ e.key !== "Escape" || u.length === 0 || (e.preventDefault(), e.stopPropagation(), d(""));
43
+ }
44
+ },
45
+ className: `block min-h-7 w-full rounded-md border border-border-default bg-bg-sunken py-1 pl-7 pr-8 text-xs text-text-primary placeholder:text-text-muted focus:border-action-primary-bg ${l}`,
46
+ "data-testid": "history-search-input"
47
+ })
48
+ ]
49
+ }), u.length > 0 ? /* @__PURE__ */ s("button", {
50
+ type: "button",
51
+ onClick: () => {
52
+ g.current?.focus({ preventScroll: !0 }), d("");
53
+ },
54
+ "aria-label": m("historySearch.clear", "Clear search"),
55
+ className: `absolute right-0.5 top-1/2 inline-flex size-6 -translate-y-1/2 items-center justify-center rounded text-text-muted hover:bg-bg-elevated hover:text-text-primary ${l}`,
56
+ "data-testid": "history-search-clear",
57
+ children: /* @__PURE__ */ s(a, {
58
+ className: "size-3",
59
+ "aria-hidden": "true"
60
+ })
61
+ }) : null]
62
+ }), /* @__PURE__ */ s("p", {
63
+ role: "status",
64
+ "aria-live": "polite",
65
+ className: "break-words text-[10px] leading-4 text-text-secondary",
66
+ "data-testid": "history-search-notice",
67
+ children: p ? /* @__PURE__ */ s("span", {
68
+ className: "block pt-1",
69
+ children: p
70
+ }) : null
71
+ })] });
72
+ };
73
+ //#endregion
74
+ export { u as AssistantHistorySearchBox };
@@ -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;AAwBnE,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,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,KAAK,CA+V1C,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 { AssistantAvatar as c } from "./AssistantAvatar.js";
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 te } from "./AssistantSpeakButton.js";
15
- import { SaveToFilesButton as ne } from "../../../storage/SaveToFilesButton.js";
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 f } from "./AssistantTurnActivity.js";
18
- import { useMemo as p, useState as m } from "react";
19
- import { Check as h, Copy as g, RotateCcw as _ } from "lucide-react";
20
- import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
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 x(e) {
23
+ function S(e) {
23
24
  return e.role === "assistant" ? e.metadata : void 0;
24
25
  }
25
- function re(e) {
26
+ function C(e) {
26
27
  return e?.artifacts ?? [];
27
28
  }
28
- function S(e) {
29
+ function w(e) {
29
30
  return window.atob(e);
30
31
  }
31
- function C(e, t, n) {
32
- let r = S(e), i = new Uint8Array(r.length);
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 w = ({ onApprovePendingWrite: S, approvingWriteRef: w = null, pendingWriteExpired: T = !1, pendingWriteApproved: E = !1, pendingWriteGoAheadSent: D = !1, message: O, processing: k, isStreaming: A, isFailed: j, isLastAssistant: M, isNewestAssistant: N, onRetry: P, legacyWriteCardHidden: F = !1, writeProposals: I }) => {
38
- let L = n(), R = t(), { getAccessToken: z, getWorkspaceToken: B } = e(), V = l(), [H, U] = m(null), [W, G] = m(!1), K = O.role === "user", q = p(() => x(O), [O]), J = p(() => re(q), [q]), Y = k === void 0 ? A ? {
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 } = p(() => K ? {
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
- ]), ie = () => {
58
+ ]), ae = () => {
54
59
  r(Q).then((e) => {
55
60
  e && (G(!0), setTimeout(() => G(!1), 2e3));
56
61
  });
57
- }, ae = async (e) => {
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
- C(n.contentBase64, n.filename, n.mimeType);
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__ */ y("div", {
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__ */ y("p", {
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__ */ y("div", {
91
+ return /* @__PURE__ */ b("div", {
87
92
  className: "flex justify-end",
88
93
  "data-testid": "assistant-message-user",
89
- children: /* @__PURE__ */ b("div", {
94
+ children: /* @__PURE__ */ x("div", {
90
95
  className: "max-w-[85%]",
91
96
  children: [
92
- O.content && /* @__PURE__ */ y("div", {
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__ */ y("p", {
99
+ children: /* @__PURE__ */ b("p", {
95
100
  className: "whitespace-pre-wrap",
96
101
  children: O.content
97
102
  })
98
103
  }),
99
- /* @__PURE__ */ y(u, { attachments: e }),
100
- /* @__PURE__ */ y("div", {
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__ */ b("div", {
113
+ return /* @__PURE__ */ x("div", {
109
114
  className: "flex gap-2.5",
110
115
  "data-testid": "assistant-message-assistant",
111
- children: [/* @__PURE__ */ y(c, { active: A }), /* @__PURE__ */ b("div", {
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__ */ y(s, { steps: Z }),
115
- q?.pendingWrite && !F ? /* @__PURE__ */ y(d, {
119
+ Z.length > 0 && /* @__PURE__ */ b(s, { steps: Z }),
120
+ q?.pendingWrite && !F ? /* @__PURE__ */ b(d, {
116
121
  pendingWrite: q.pendingWrite,
117
- onApprove: S,
122
+ onApprove: c,
118
123
  approving: w !== null && w === q.pendingWrite.reference,
119
- expired: T,
120
- approved: E,
121
- goAheadSent: D,
124
+ expired: D,
125
+ approved: re,
126
+ goAheadSent: ie,
122
127
  awaitingTurn: !!A
123
128
  }) : null,
124
129
  I,
125
- Q && /* @__PURE__ */ y("div", {
130
+ Q && /* @__PURE__ */ b("div", {
126
131
  className: "text-[15px] leading-relaxed text-text-primary",
127
- children: /* @__PURE__ */ y(i, { content: Q })
132
+ children: /* @__PURE__ */ b(i, { content: Q })
128
133
  }),
129
- X.kind === "working" && /* @__PURE__ */ y(f, { processing: Y }),
130
- X.kind === "stopped" && /* @__PURE__ */ y("p", {
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__ */ y("span", {
136
- "aria-hidden": "true",
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__ */ y("p", {
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__ */ y("div", {
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__ */ y(ne, {
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: () => ae(e)
162
+ onDownload: () => oe(e)
161
163
  }, e.path);
162
164
  })
163
165
  })]
164
166
  }),
165
- !A && (Q || j || M) && /* @__PURE__ */ b("div", {
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__ */ y("button", {
170
+ Q && /* @__PURE__ */ b("button", {
169
171
  type: "button",
170
- onClick: ie,
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__ */ b(v, { children: [/* @__PURE__ */ y(h, { className: "size-3 text-status-success-text" }), /* @__PURE__ */ y("span", { children: L("message.copied", "Copied") })] }) : /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(g, { className: "size-3" }), /* @__PURE__ */ y("span", { children: L("message.copyShort", "Copy") })] })
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__ */ b(v, { children: [/* @__PURE__ */ y(te, {
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__ */ y("span", {
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__ */ b("button", {
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__ */ y(_, { className: "size-3" }), /* @__PURE__ */ y("span", { children: L("message.retry", "Retry") })]
199
+ children: [/* @__PURE__ */ b(v, { className: "size-3" }), /* @__PURE__ */ b("span", { children: L("message.retry", "Retry") })]
198
200
  })
199
201
  ]
200
202
  }),
201
- /* @__PURE__ */ b("div", {
203
+ /* @__PURE__ */ x("div", {
202
204
  className: "mt-1 text-[10px] text-text-muted",
203
- children: [$, O.tokens && /* @__PURE__ */ b("span", {
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 { w as AssistantMessageItem };
215
+ export { D as AssistantMessageItem, E as StreamingCaret };