@hachej/boring-agent 0.1.101 → 0.1.103

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 (35) hide show
  1. package/dist/{DebugDrawer-2TO5SE2D.js → DebugDrawer-JNA43SVR.js} +2 -1
  2. package/dist/chunk-2BGLZZ7T.js +10 -0
  3. package/dist/{chunk-46HJK2ES.js → chunk-4XOW57KJ.js} +3 -8
  4. package/dist/{chunk-XTMY3PWI.js → chunk-6WKQ4FC4.js} +69 -11
  5. package/dist/{chunk-XCZBICZS.js → chunk-7QM22DU7.js} +1 -1
  6. package/dist/{chunk-3OEDBRKY.js → chunk-JNEKOVMJ.js} +1 -1
  7. package/dist/{chunk-VXF5DWS6.js → chunk-K25PK5EC.js} +1 -0
  8. package/dist/chunk-N6THTH7P.js +110 -0
  9. package/dist/{chunk-T37OVD6L.js → chunk-TW7G33QH.js} +1 -1
  10. package/dist/core/index.d.ts +5 -5
  11. package/dist/core/index.js +1 -1
  12. package/dist/{createHarness-7C2A5UVH.js → createHarness-4Q6DQBRT.js} +2 -2
  13. package/dist/{errors-Ci0dzmcP.d.ts → errors-szpcDUFQ.d.ts} +2 -2
  14. package/dist/{file-search-DmoDnMan.d.ts → file-search-BXdSm-Yq.d.ts} +5 -5
  15. package/dist/front/artifacts.d.ts +34 -0
  16. package/dist/front/artifacts.js +21 -0
  17. package/dist/front/index.d.ts +5 -14
  18. package/dist/front/index.js +595 -635
  19. package/dist/{harness-s-kEgJkK.d.ts → harness-erpL2SER.d.ts} +2 -2
  20. package/dist/{lease-D5-CBoPs.d.ts → lease-K-EZhdL-.d.ts} +3 -3
  21. package/dist/{middleware-Cq_cYHjJ.d.ts → middleware-CaAEXpi5.d.ts} +11 -2
  22. package/dist/{piChatEvent-Bzof4IEy.d.ts → piChatEvent-g1nIBh44.d.ts} +14 -14
  23. package/dist/{piChatSessionService-BU4L5hxM.d.ts → piChatSessionService-DugeRHzb.d.ts} +1 -1
  24. package/dist/{sandbox-KQiEdz4W.d.ts → sandbox-BMhut3kh.d.ts} +6 -1
  25. package/dist/server/agent-host/testing/gatewayConformance.d.ts +6 -6
  26. package/dist/server/agent-host/testing/gatewayConformance.js +3 -3
  27. package/dist/server/index.d.ts +19 -16
  28. package/dist/server/index.js +7 -5
  29. package/dist/server/worker/index.d.ts +3 -2
  30. package/dist/server/worker/index.js +25 -6
  31. package/dist/shared/index.d.ts +29 -29
  32. package/dist/shared/index.js +3 -3
  33. package/dist/{types-OwI_m-2p.d.ts → types-BnjMLAd5.d.ts} +13 -5
  34. package/docs/ERROR_CODES.md +1 -0
  35. package/package.json +16 -12
@@ -1,11 +1,23 @@
1
+ import {
2
+ Artifact,
3
+ ArtifactAction,
4
+ ArtifactActions,
5
+ ArtifactDescription,
6
+ ArtifactHeader,
7
+ ArtifactOpenProvider,
8
+ ArtifactTitle,
9
+ useOpenArtifact
10
+ } from "../chunk-N6THTH7P.js";
1
11
  import {
2
12
  DebugDrawer,
3
13
  agentResourceUrl,
4
- cn,
5
14
  copyTextToClipboard,
6
15
  createRequestId,
7
16
  withStorageScope
8
- } from "../chunk-46HJK2ES.js";
17
+ } from "../chunk-4XOW57KJ.js";
18
+ import {
19
+ cn
20
+ } from "../chunk-2BGLZZ7T.js";
9
21
  import {
10
22
  AGENT_GATEWAY_ERROR_CODES,
11
23
  CommandReceiptSchema,
@@ -19,11 +31,11 @@ import {
19
31
  WORKSPACE_COMMAND_NOTIFY_EVENT,
20
32
  extractToolUiMetadata,
21
33
  sanitizeToolUiMetadata
22
- } from "../chunk-XCZBICZS.js";
34
+ } from "../chunk-7QM22DU7.js";
23
35
  import "../chunk-YGRQ4Q5P.js";
24
36
  import {
25
37
  ErrorCode
26
- } from "../chunk-VXF5DWS6.js";
38
+ } from "../chunk-K25PK5EC.js";
27
39
 
28
40
  // src/front/upload/uploadFile.ts
29
41
  function readAsDataUrl(file) {
@@ -75,18 +87,6 @@ function rawWorkspaceFileUrl(path, opts) {
75
87
  // src/front/chat/PiChatPanel.tsx
76
88
  import { lazy, Suspense, useCallback as useCallback18, useEffect as useEffect21, useMemo as useMemo16, useRef as useRef18, useState as useState20 } from "react";
77
89
 
78
- // src/front/ArtifactOpenContext.tsx
79
- import { createContext, useContext } from "react";
80
- import { jsx } from "react/jsx-runtime";
81
- var ArtifactOpenContext = createContext(null);
82
- function ArtifactOpenProvider({ onOpenArtifact, children }) {
83
- const inheritedOpenArtifact = useContext(ArtifactOpenContext);
84
- return /* @__PURE__ */ jsx(ArtifactOpenContext.Provider, { value: onOpenArtifact ?? inheritedOpenArtifact, children });
85
- }
86
- function useOpenArtifact() {
87
- return useContext(ArtifactOpenContext);
88
- }
89
-
90
90
  // src/front/chatPanelSettings.ts
91
91
  var DEFAULT_THINKING = "medium";
92
92
  var THINKING_LEVELS = ["off", "low", "medium", "high"];
@@ -118,7 +118,7 @@ function encodeModelKey(sel) {
118
118
  // src/front/ChatEmptyState.tsx
119
119
  import { ArrowUpRight, BookOpen, Code2, FileSearch, Wand2 } from "lucide-react";
120
120
  import { Button } from "@hachej/boring-ui-kit";
121
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
121
+ import { jsx, jsxs } from "react/jsx-runtime";
122
122
  var defaultChatSuggestions = [
123
123
  {
124
124
  label: "Summarize the README",
@@ -147,7 +147,7 @@ var defaultChatSuggestions = [
147
147
  ];
148
148
  function ChatSuggestionGrid({ suggestions, onSelect, className }) {
149
149
  if (suggestions.length === 0) return null;
150
- return /* @__PURE__ */ jsx2(
150
+ return /* @__PURE__ */ jsx(
151
151
  "div",
152
152
  {
153
153
  "data-boring-agent-part": "suggestion-grid",
@@ -176,7 +176,7 @@ function ChatSuggestionGrid({ suggestions, onSelect, className }) {
176
176
  },
177
177
  className: "group h-auto justify-start gap-3 rounded-none bg-background px-4 py-3.5 text-left hover:bg-[color:var(--chat-empty-card-hover)] focus-visible:bg-[color:var(--chat-empty-card-hover)]",
178
178
  children: [
179
- Icon && /* @__PURE__ */ jsx2(
179
+ Icon && /* @__PURE__ */ jsx(
180
180
  Icon,
181
181
  {
182
182
  className: "mt-0.5 h-4 w-4 shrink-0 text-muted-foreground transition-colors group-hover:text-[color:var(--chat-empty-accent)]",
@@ -184,10 +184,10 @@ function ChatSuggestionGrid({ suggestions, onSelect, className }) {
184
184
  }
185
185
  ),
186
186
  /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
187
- /* @__PURE__ */ jsx2("span", { className: "text-[13px] font-medium text-foreground", children: suggestion.label }),
188
- suggestion.hint && /* @__PURE__ */ jsx2("span", { className: "text-[12px] text-muted-foreground", children: suggestion.hint })
187
+ /* @__PURE__ */ jsx("span", { className: "text-[13px] font-medium text-foreground", children: suggestion.label }),
188
+ suggestion.hint && /* @__PURE__ */ jsx("span", { className: "text-[12px] text-muted-foreground", children: suggestion.hint })
189
189
  ] }),
190
- /* @__PURE__ */ jsx2(
190
+ /* @__PURE__ */ jsx(
191
191
  ArrowUpRight,
192
192
  {
193
193
  className: cn(
@@ -235,15 +235,15 @@ function ChatEmptyState({
235
235
  ),
236
236
  children: [
237
237
  !hero && eyebrow && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-[10.5px] font-medium uppercase tracking-[0.16em] text-[color:var(--chat-empty-eyebrow-color)]", children: [
238
- /* @__PURE__ */ jsx2("span", { className: "inline-block h-px w-4 bg-[color:var(--chat-empty-accent)]", "aria-hidden": "true" }),
238
+ /* @__PURE__ */ jsx("span", { className: "inline-block h-px w-4 bg-[color:var(--chat-empty-accent)]", "aria-hidden": "true" }),
239
239
  eyebrow
240
240
  ] }),
241
- title && /* @__PURE__ */ jsx2("h3", { className: cn(
241
+ title && /* @__PURE__ */ jsx("h3", { className: cn(
242
242
  "text-[24px] font-medium leading-[1.05] tracking-[-0.02em] text-[color:var(--chat-empty-title-color)] @[480px]:text-[34px]",
243
243
  hero ? "m-0" : "mt-3"
244
244
  ), children: title }),
245
- !hero && description && /* @__PURE__ */ jsx2("p", { className: "mt-3 hidden max-w-[440px] text-[14px] leading-relaxed text-[color:var(--chat-empty-description-color)] @[420px]:block", children: description }),
246
- /* @__PURE__ */ jsx2(ChatSuggestionGrid, { suggestions, onSelect, className: hero ? "mt-4" : "mt-8" }),
245
+ !hero && description && /* @__PURE__ */ jsx("p", { className: "mt-3 hidden max-w-[440px] text-[14px] leading-relaxed text-[color:var(--chat-empty-description-color)] @[420px]:block", children: description }),
246
+ /* @__PURE__ */ jsx(ChatSuggestionGrid, { suggestions, onSelect, className: hero ? "mt-4" : "mt-8" }),
247
247
  footer
248
248
  ]
249
249
  }
@@ -345,7 +345,7 @@ var builtinCommands = [
345
345
  import { useState } from "react";
346
346
  import { createPatch } from "diff";
347
347
  import { Button as Button2 } from "@hachej/boring-ui-kit";
348
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
348
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
349
349
  var COLLAPSE_THRESHOLD = 30;
350
350
  function parsePatch(patch) {
351
351
  const lines = patch.split("\n");
@@ -370,7 +370,7 @@ var prefixMap = { "+": "+", "-": "-", " ": " " };
370
370
  function DiffView({ oldString, newString, path, replaceAll, actions }) {
371
371
  const [expanded, setExpanded] = useState(false);
372
372
  if (oldString === newString) {
373
- return /* @__PURE__ */ jsx3("div", { "data-testid": "diff-no-change", className: "py-2 italic opacity-60", children: "No changes" });
373
+ return /* @__PURE__ */ jsx2("div", { "data-testid": "diff-no-change", className: "py-2 italic opacity-60", children: "No changes" });
374
374
  }
375
375
  const patch = createPatch(path, oldString, newString, "", "", { context: 3 });
376
376
  const lines = parsePatch(patch);
@@ -382,10 +382,10 @@ function DiffView({ oldString, newString, path, replaceAll, actions }) {
382
382
  path,
383
383
  replaceAll ? " (replace all)" : ""
384
384
  ] }),
385
- actions ? /* @__PURE__ */ jsx3("span", { className: "flex shrink-0 items-center gap-0.5", children: actions }) : null
385
+ actions ? /* @__PURE__ */ jsx2("span", { className: "flex shrink-0 items-center gap-0.5", children: actions }) : null
386
386
  ] }),
387
- /* @__PURE__ */ jsx3("pre", { className: "m-0 overflow-auto py-2 font-[family-name:var(--boring-agent-font-mono,monospace)] text-[0.8125rem] leading-relaxed", children: visible.map((line, i) => /* @__PURE__ */ jsxs2("div", { className: cn("px-3", lineClass[line.type]), children: [
388
- /* @__PURE__ */ jsx3("span", { className: "inline-block w-[1.5ch] select-none opacity-50", children: prefixMap[line.type] }),
387
+ /* @__PURE__ */ jsx2("pre", { className: "m-0 overflow-auto py-2 font-[family-name:var(--boring-agent-font-mono,monospace)] text-[0.8125rem] leading-relaxed", children: visible.map((line, i) => /* @__PURE__ */ jsxs2("div", { className: cn("px-3", lineClass[line.type]), children: [
388
+ /* @__PURE__ */ jsx2("span", { className: "inline-block w-[1.5ch] select-none opacity-50", children: prefixMap[line.type] }),
389
389
  line.text
390
390
  ] }, i)) }),
391
391
  collapsed && /* @__PURE__ */ jsxs2(Button2, { type: "button", variant: "ghost", size: "sm", onClick: () => setExpanded(true), className: "w-full rounded-none text-xs opacity-60", children: [
@@ -399,7 +399,7 @@ function DiffView({ oldString, newString, path, replaceAll, actions }) {
399
399
  // src/front/barePrimitives/Tool.tsx
400
400
  import { useEffect, useRef, useState as useState2 } from "react";
401
401
  import { Button as Button3 } from "@hachej/boring-ui-kit";
402
- import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
402
+ import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
403
403
  function stateLabel(state) {
404
404
  switch (state) {
405
405
  case "input-streaming":
@@ -420,7 +420,7 @@ function stateLabel(state) {
420
420
  }
421
421
  }
422
422
  function ToolValue({ value }) {
423
- return /* @__PURE__ */ jsx4("pre", { className: "m-0 whitespace-pre-wrap text-[0.8125rem]", children: typeof value === "string" ? value : JSON.stringify(value, null, 2) });
423
+ return /* @__PURE__ */ jsx3("pre", { className: "m-0 whitespace-pre-wrap text-[0.8125rem]", children: typeof value === "string" ? value : JSON.stringify(value, null, 2) });
424
424
  }
425
425
  function Tool({
426
426
  toolName,
@@ -468,17 +468,17 @@ function Tool({
468
468
  className: "h-auto w-full justify-start gap-2 rounded-none bg-[var(--boring-agent-tool-header-bg,#f9fafb)] px-3 py-2 text-left font-[family-name:var(--boring-agent-font-mono,monospace)] text-[0.8125rem]",
469
469
  "aria-expanded": expanded,
470
470
  children: [
471
- /* @__PURE__ */ jsx4("span", { className: cn("transition-transform duration-150", expanded && "rotate-90"), children: "\u25B6" }),
472
- /* @__PURE__ */ jsx4("span", { className: "font-medium", children: toolName }),
473
- /* @__PURE__ */ jsx4("span", { className: "ml-auto text-xs opacity-60", children: isRunning && elapsedSec >= 1 ? `Running\u2026 (${elapsedSec}s)` : stateLabel(state) }),
474
- !isComplete && /* @__PURE__ */ jsx4("span", { className: "size-2 rounded-full bg-[var(--boring-agent-tool-running,#3b82f6)]", "aria-label": "running" })
471
+ /* @__PURE__ */ jsx3("span", { className: cn("transition-transform duration-150", expanded && "rotate-90"), children: "\u25B6" }),
472
+ /* @__PURE__ */ jsx3("span", { className: "font-medium", children: toolName }),
473
+ /* @__PURE__ */ jsx3("span", { className: "ml-auto text-xs opacity-60", children: isRunning && elapsedSec >= 1 ? `Running\u2026 (${elapsedSec}s)` : stateLabel(state) }),
474
+ !isComplete && /* @__PURE__ */ jsx3("span", { className: "size-2 rounded-full bg-[var(--boring-agent-tool-running,#3b82f6)]", "aria-label": "running" })
475
475
  ]
476
476
  }
477
477
  ),
478
- expanded && /* @__PURE__ */ jsx4("div", { className: "border-t border-[var(--boring-agent-tool-border,#e5e7eb)] px-3 py-2", children: children ?? /* @__PURE__ */ jsxs3(Fragment, { children: [
479
- input !== void 0 && /* @__PURE__ */ jsx4("div", { "data-testid": "tool-input", children: renderInput ? renderInput(input) : /* @__PURE__ */ jsx4(ToolValue, { value: input }) }),
480
- output !== void 0 && /* @__PURE__ */ jsx4("div", { "data-testid": "tool-output", className: "mt-2", children: renderOutput ? renderOutput(output) : /* @__PURE__ */ jsx4(ToolValue, { value: output }) }),
481
- errorText && /* @__PURE__ */ jsx4("div", { "data-testid": "tool-error", className: "mt-2 text-[var(--boring-agent-tool-error,#ef4444)]", children: errorText })
478
+ expanded && /* @__PURE__ */ jsx3("div", { className: "border-t border-[var(--boring-agent-tool-border,#e5e7eb)] px-3 py-2", children: children ?? /* @__PURE__ */ jsxs3(Fragment, { children: [
479
+ input !== void 0 && /* @__PURE__ */ jsx3("div", { "data-testid": "tool-input", children: renderInput ? renderInput(input) : /* @__PURE__ */ jsx3(ToolValue, { value: input }) }),
480
+ output !== void 0 && /* @__PURE__ */ jsx3("div", { "data-testid": "tool-output", className: "mt-2", children: renderOutput ? renderOutput(output) : /* @__PURE__ */ jsx3(ToolValue, { value: output }) }),
481
+ errorText && /* @__PURE__ */ jsx3("div", { "data-testid": "tool-error", className: "mt-2 text-[var(--boring-agent-tool-error,#ef4444)]", children: errorText })
482
482
  ] }) })
483
483
  ]
484
484
  }
@@ -486,7 +486,7 @@ function Tool({
486
486
  }
487
487
 
488
488
  // src/front/barePrimitives/Terminal.tsx
489
- import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
489
+ import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
490
490
  function Terminal({
491
491
  children,
492
492
  stdout,
@@ -503,10 +503,10 @@ function Terminal({
503
503
  className
504
504
  ),
505
505
  children: [
506
- title && /* @__PURE__ */ jsx5("div", { className: "border-b border-[var(--boring-agent-terminal-border,#404040)] bg-[var(--boring-agent-terminal-header-bg,#2d2d2d)] px-3 py-1.5 text-xs opacity-80", children: title }),
507
- /* @__PURE__ */ jsx5("div", { className: "p-3", children: children ?? /* @__PURE__ */ jsxs4(Fragment2, { children: [
508
- stdout && /* @__PURE__ */ jsx5("pre", { "data-stream": "stdout", className: "m-0 whitespace-pre-wrap", children: stdout }),
509
- stderr && /* @__PURE__ */ jsx5(
506
+ title && /* @__PURE__ */ jsx4("div", { className: "border-b border-[var(--boring-agent-terminal-border,#404040)] bg-[var(--boring-agent-terminal-header-bg,#2d2d2d)] px-3 py-1.5 text-xs opacity-80", children: title }),
507
+ /* @__PURE__ */ jsx4("div", { className: "p-3", children: children ?? /* @__PURE__ */ jsxs4(Fragment2, { children: [
508
+ stdout && /* @__PURE__ */ jsx4("pre", { "data-stream": "stdout", className: "m-0 whitespace-pre-wrap", children: stdout }),
509
+ stderr && /* @__PURE__ */ jsx4(
510
510
  "pre",
511
511
  {
512
512
  "data-stream": "stderr",
@@ -540,7 +540,7 @@ function Terminal({
540
540
  // src/front/barePrimitives/CodeBlock.tsx
541
541
  import { useCallback, useState as useState3 } from "react";
542
542
  import { Button as Button4 } from "@hachej/boring-ui-kit";
543
- import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
543
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
544
544
  function CodeBlock({
545
545
  code: code3,
546
546
  language,
@@ -568,14 +568,14 @@ function CodeBlock({
568
568
  ),
569
569
  children: [
570
570
  (filename || language) && /* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-between border-b border-[var(--boring-agent-code-border,#404040)] bg-[var(--boring-agent-code-header-bg,#2d2d2d)] px-3 py-1.5 text-xs", children: [
571
- /* @__PURE__ */ jsx6("span", { className: "opacity-70", children: filename ?? language }),
572
- copyable && /* @__PURE__ */ jsx6(Button4, { type: "button", variant: "ghost", size: "xs", onClick: handleCopy, "aria-label": "Copy code", className: "h-6 px-1.5 text-xs text-inherit opacity-60", children: copied ? "Copied" : "Copy" })
571
+ /* @__PURE__ */ jsx5("span", { className: "opacity-70", children: filename ?? language }),
572
+ copyable && /* @__PURE__ */ jsx5(Button4, { type: "button", variant: "ghost", size: "xs", onClick: handleCopy, "aria-label": "Copy code", className: "h-6 px-1.5 text-xs text-inherit opacity-60", children: copied ? "Copied" : "Copy" })
573
573
  ] }),
574
- /* @__PURE__ */ jsx6("pre", { className: "m-0 overflow-auto p-3", children: /* @__PURE__ */ jsx6("code", { "data-language": language, children: showLineNumbers ? lines.map((line, i) => /* @__PURE__ */ jsxs5("span", { className: "block", children: [
575
- /* @__PURE__ */ jsx6("span", { className: "mr-4 inline-block select-none text-right opacity-40", style: { width: lineNumberWidth }, children: i + 1 }),
574
+ /* @__PURE__ */ jsx5("pre", { className: "m-0 overflow-auto p-3", children: /* @__PURE__ */ jsx5("code", { "data-language": language, children: showLineNumbers ? lines.map((line, i) => /* @__PURE__ */ jsxs5("span", { className: "block", children: [
575
+ /* @__PURE__ */ jsx5("span", { className: "mr-4 inline-block select-none text-right opacity-40", style: { width: lineNumberWidth }, children: i + 1 }),
576
576
  line
577
577
  ] }, i)) : code3 }) }),
578
- copyable && !filename && !language && /* @__PURE__ */ jsx6(
578
+ copyable && !filename && !language && /* @__PURE__ */ jsx5(
579
579
  Button4,
580
580
  {
581
581
  type: "button",
@@ -593,7 +593,7 @@ function CodeBlock({
593
593
  }
594
594
 
595
595
  // src/front/bareToolRenderers/renderers.tsx
596
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
596
+ import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
597
597
  var FALLBACK_RENDERER_KEY = "__fallback";
598
598
  function asRecord(v) {
599
599
  return typeof v === "object" && v !== null ? v : {};
@@ -703,14 +703,14 @@ function renderBash(part) {
703
703
  const stdout = typeof output.stdout === "string" ? output.stdout : output.content ? JSON.stringify(output.content) : void 0;
704
704
  const stderr = typeof output.stderr === "string" ? output.stderr : void 0;
705
705
  const exitCode = typeof output.exitCode === "number" ? output.exitCode : void 0;
706
- return /* @__PURE__ */ jsx7(Tool, { toolName: "bash", toolCallId: part.toolCallId, state: part.state, errorText: part.errorText, defaultExpanded: true, children: /* @__PURE__ */ jsx7(Terminal, { title: `$ ${command}`, stdout, stderr, exitCode: exitCode ?? null }) });
706
+ return /* @__PURE__ */ jsx6(Tool, { toolName: "bash", toolCallId: part.toolCallId, state: part.state, errorText: part.errorText, defaultExpanded: true, children: /* @__PURE__ */ jsx6(Terminal, { title: `$ ${command}`, stdout, stderr, exitCode: exitCode ?? null }) });
707
707
  }
708
708
  function renderRead(part) {
709
709
  const input = asRecord(part.input);
710
710
  const output = asRecord(part.output);
711
711
  const path = String(input.path ?? "");
712
712
  const content = typeof output.text === "string" ? output.text : Array.isArray(output.content) ? output.content.map((c) => c.text ?? "").join("") : typeof output.content === "string" ? output.content : void 0;
713
- return /* @__PURE__ */ jsx7(Tool, { toolName: "read", toolCallId: part.toolCallId, state: part.state, errorText: part.errorText, children: content != null ? /* @__PURE__ */ jsx7(CodeBlock, { code: content, language: langFromPath(path), filename: path }) : /* @__PURE__ */ jsxs6("span", { style: { opacity: 0.6 }, children: [
713
+ return /* @__PURE__ */ jsx6(Tool, { toolName: "read", toolCallId: part.toolCallId, state: part.state, errorText: part.errorText, children: content != null ? /* @__PURE__ */ jsx6(CodeBlock, { code: content, language: langFromPath(path), filename: path }) : /* @__PURE__ */ jsxs6("span", { style: { opacity: 0.6 }, children: [
714
714
  "Reading ",
715
715
  path,
716
716
  "\u2026"
@@ -720,11 +720,11 @@ function renderWrite(part) {
720
720
  const input = asRecord(part.input);
721
721
  const path = String(input.path ?? "");
722
722
  const content = typeof input.content === "string" ? input.content : "";
723
- return /* @__PURE__ */ jsx7(Tool, { toolName: "write", toolCallId: part.toolCallId, state: part.state, errorText: part.errorText, defaultExpanded: true, children: /* @__PURE__ */ jsxs6("span", { style: { fontFamily: "var(--boring-agent-font-mono, monospace)", fontSize: "0.8125rem" }, children: [
723
+ return /* @__PURE__ */ jsx6(Tool, { toolName: "write", toolCallId: part.toolCallId, state: part.state, errorText: part.errorText, defaultExpanded: true, children: /* @__PURE__ */ jsxs6("span", { style: { fontFamily: "var(--boring-agent-font-mono, monospace)", fontSize: "0.8125rem" }, children: [
724
724
  "Wrote ",
725
725
  content.length,
726
726
  " bytes to ",
727
- /* @__PURE__ */ jsx7("strong", { children: path })
727
+ /* @__PURE__ */ jsx6("strong", { children: path })
728
728
  ] }) });
729
729
  }
730
730
  function renderEdit(part) {
@@ -733,7 +733,7 @@ function renderEdit(part) {
733
733
  const oldString = typeof input.oldString === "string" ? input.oldString : "";
734
734
  const newString = typeof input.newString === "string" ? input.newString : "";
735
735
  const replaceAll = Boolean(input.replaceAll);
736
- return /* @__PURE__ */ jsx7(Tool, { toolName: "edit", toolCallId: part.toolCallId, state: part.state, errorText: part.errorText, defaultExpanded: true, children: /* @__PURE__ */ jsx7(DiffView, { oldString, newString, path, replaceAll }) });
736
+ return /* @__PURE__ */ jsx6(Tool, { toolName: "edit", toolCallId: part.toolCallId, state: part.state, errorText: part.errorText, defaultExpanded: true, children: /* @__PURE__ */ jsx6(DiffView, { oldString, newString, path, replaceAll }) });
737
737
  }
738
738
  function renderSearchLike(toolName, part) {
739
739
  const input = asRecord(part.input);
@@ -742,17 +742,17 @@ function renderSearchLike(toolName, part) {
742
742
  const path = typeof input.path === "string" ? input.path : "";
743
743
  const pattern = typeof input.pattern === "string" ? input.pattern : "";
744
744
  const title = [toolName, pattern || path].filter(Boolean).join(" ");
745
- return /* @__PURE__ */ jsx7(Tool, { toolName, toolCallId: part.toolCallId, state: part.state, errorText: part.errorText, children: content ? /* @__PURE__ */ jsx7(CodeBlock, { code: content, language: "text", filename: title }) : /* @__PURE__ */ jsx7("span", { style: { opacity: 0.6 }, children: toolName === "ls" ? `Listing ${path || "."}...` : `Searching ${pattern || path || "."}...` }) });
745
+ return /* @__PURE__ */ jsx6(Tool, { toolName, toolCallId: part.toolCallId, state: part.state, errorText: part.errorText, children: content ? /* @__PURE__ */ jsx6(CodeBlock, { code: content, language: "text", filename: title }) : /* @__PURE__ */ jsx6("span", { style: { opacity: 0.6 }, children: toolName === "ls" ? `Listing ${path || "."}...` : `Searching ${pattern || path || "."}...` }) });
746
746
  }
747
747
  function renderGetUiState(part) {
748
- return /* @__PURE__ */ jsx7(
748
+ return /* @__PURE__ */ jsx6(
749
749
  Tool,
750
750
  {
751
751
  toolName: "get_ui_state",
752
752
  toolCallId: part.toolCallId,
753
753
  state: part.state,
754
754
  errorText: part.errorText,
755
- renderOutput: (output) => /* @__PURE__ */ jsx7("pre", { style: { margin: 0, whiteSpace: "pre-wrap", fontSize: "0.8125rem", fontFamily: "var(--boring-agent-font-mono, monospace)" }, children: typeof output === "string" ? output : JSON.stringify(output, null, 2) }),
755
+ renderOutput: (output) => /* @__PURE__ */ jsx6("pre", { style: { margin: 0, whiteSpace: "pre-wrap", fontSize: "0.8125rem", fontFamily: "var(--boring-agent-font-mono, monospace)" }, children: typeof output === "string" ? output : JSON.stringify(output, null, 2) }),
756
756
  input: part.input,
757
757
  output: part.output
758
758
  }
@@ -764,7 +764,7 @@ function renderExecUi(part) {
764
764
  const params = input.params;
765
765
  const paramsText = params !== void 0 && params !== null ? typeof params === "string" ? params : JSON.stringify(params) : "";
766
766
  const summary = kind ? `${kind}${paramsText ? `(${paramsText})` : ""}` : "(empty)";
767
- return /* @__PURE__ */ jsx7(
767
+ return /* @__PURE__ */ jsx6(
768
768
  Tool,
769
769
  {
770
770
  toolName: "exec_ui",
@@ -787,7 +787,7 @@ function renderExecUi(part) {
787
787
  ]
788
788
  }
789
789
  ),
790
- part.errorText && /* @__PURE__ */ jsx7(
790
+ part.errorText && /* @__PURE__ */ jsx6(
791
791
  "span",
792
792
  {
793
793
  "data-testid": "tool-error",
@@ -809,7 +809,7 @@ function fallbackToolName(part) {
809
809
  return part.toolName;
810
810
  }
811
811
  function renderFallback(part) {
812
- const renderJson = (value) => /* @__PURE__ */ jsx7(
812
+ const renderJson = (value) => /* @__PURE__ */ jsx6(
813
813
  "pre",
814
814
  {
815
815
  style: {
@@ -821,7 +821,7 @@ function renderFallback(part) {
821
821
  children: typeof value === "string" ? value : JSON.stringify(value, null, 2)
822
822
  }
823
823
  );
824
- return /* @__PURE__ */ jsx7(
824
+ return /* @__PURE__ */ jsx6(
825
825
  Tool,
826
826
  {
827
827
  toolName: fallbackToolName(part),
@@ -912,17 +912,17 @@ import {
912
912
  } from "@hachej/boring-ui-kit";
913
913
  import { CheckIcon, CopyIcon } from "lucide-react";
914
914
  import {
915
- createContext as createContext2,
915
+ createContext,
916
916
  memo,
917
917
  useCallback as useCallback2,
918
- useContext as useContext2,
918
+ useContext,
919
919
  useEffect as useEffect2,
920
920
  useMemo,
921
921
  useRef as useRef2,
922
922
  useState as useState4
923
923
  } from "react";
924
924
  import { createHighlighter } from "shiki";
925
- import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
925
+ import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
926
926
  var isItalic = (fontStyle) => fontStyle && fontStyle & 1;
927
927
  var isBold = (fontStyle) => fontStyle && fontStyle & 2;
928
928
  var isUnderline = (fontStyle) => (
@@ -936,7 +936,7 @@ var addKeysToTokens = (lines) => lines.map((line, lineIdx) => ({
936
936
  token
937
937
  }))
938
938
  }));
939
- var TokenSpan = ({ token }) => /* @__PURE__ */ jsx8(
939
+ var TokenSpan = ({ token }) => /* @__PURE__ */ jsx7(
940
940
  "span",
941
941
  {
942
942
  className: "dark:!text-[var(--shiki-dark)]",
@@ -966,8 +966,8 @@ var LINE_NUMBER_CLASSES = cn(
966
966
  var LineSpan = ({
967
967
  keyedLine,
968
968
  showLineNumbers
969
- }) => /* @__PURE__ */ jsx8("span", { className: showLineNumbers ? LINE_NUMBER_CLASSES : "block", children: keyedLine.tokens.length === 0 ? "\n" : keyedLine.tokens.map(({ token, key }) => /* @__PURE__ */ jsx8(TokenSpan, { token }, key)) });
970
- var CodeBlockContext = createContext2({
969
+ }) => /* @__PURE__ */ jsx7("span", { className: showLineNumbers ? LINE_NUMBER_CLASSES : "block", children: keyedLine.tokens.length === 0 ? "\n" : keyedLine.tokens.map(({ token, key }) => /* @__PURE__ */ jsx7(TokenSpan, { token }, key)) });
970
+ var CodeBlockContext = createContext({
971
971
  code: ""
972
972
  });
973
973
  var highlighterCache = /* @__PURE__ */ new Map();
@@ -1059,7 +1059,7 @@ var CodeBlockBody = memo(
1059
1059
  () => addKeysToTokens(tokenized.tokens),
1060
1060
  [tokenized.tokens]
1061
1061
  );
1062
- return /* @__PURE__ */ jsx8(
1062
+ return /* @__PURE__ */ jsx7(
1063
1063
  "pre",
1064
1064
  {
1065
1065
  className: cn(
@@ -1067,14 +1067,14 @@ var CodeBlockBody = memo(
1067
1067
  className
1068
1068
  ),
1069
1069
  style: preStyle,
1070
- children: /* @__PURE__ */ jsx8(
1070
+ children: /* @__PURE__ */ jsx7(
1071
1071
  "code",
1072
1072
  {
1073
1073
  className: cn(
1074
1074
  "font-mono text-sm",
1075
1075
  showLineNumbers && "[counter-increment:line_0] [counter-reset:line]"
1076
1076
  ),
1077
- children: keyedLines.map((keyedLine) => /* @__PURE__ */ jsx8(
1077
+ children: keyedLines.map((keyedLine) => /* @__PURE__ */ jsx7(
1078
1078
  LineSpan,
1079
1079
  {
1080
1080
  keyedLine,
@@ -1095,7 +1095,7 @@ var CodeBlockContainer = ({
1095
1095
  language,
1096
1096
  style,
1097
1097
  ...props
1098
- }) => /* @__PURE__ */ jsx8(
1098
+ }) => /* @__PURE__ */ jsx7(
1099
1099
  "div",
1100
1100
  {
1101
1101
  className: cn(
@@ -1115,7 +1115,7 @@ var CodeBlockHeader = ({
1115
1115
  children,
1116
1116
  className,
1117
1117
  ...props
1118
- }) => /* @__PURE__ */ jsx8(
1118
+ }) => /* @__PURE__ */ jsx7(
1119
1119
  "div",
1120
1120
  {
1121
1121
  className: cn(
@@ -1130,12 +1130,12 @@ var CodeBlockTitle = ({
1130
1130
  children,
1131
1131
  className,
1132
1132
  ...props
1133
- }) => /* @__PURE__ */ jsx8("div", { className: cn("flex items-center gap-2", className), ...props, children });
1133
+ }) => /* @__PURE__ */ jsx7("div", { className: cn("flex items-center gap-2", className), ...props, children });
1134
1134
  var CodeBlockFilename = ({
1135
1135
  children,
1136
1136
  className,
1137
1137
  ...props
1138
- }) => /* @__PURE__ */ jsx8(
1138
+ }) => /* @__PURE__ */ jsx7(
1139
1139
  "span",
1140
1140
  {
1141
1141
  className: cn(
@@ -1175,7 +1175,7 @@ var CodeBlockContent = ({
1175
1175
  };
1176
1176
  }, [code3, language]);
1177
1177
  const tokenized = asyncTokens ?? syncTokens;
1178
- return /* @__PURE__ */ jsx8("div", { className: "relative overflow-auto", children: /* @__PURE__ */ jsx8(CodeBlockBody, { showLineNumbers, tokenized }) });
1178
+ return /* @__PURE__ */ jsx7("div", { className: "relative overflow-auto", children: /* @__PURE__ */ jsx7(CodeBlockBody, { showLineNumbers, tokenized }) });
1179
1179
  };
1180
1180
  var CodeBlock2 = ({
1181
1181
  code: code3,
@@ -1186,9 +1186,9 @@ var CodeBlock2 = ({
1186
1186
  ...props
1187
1187
  }) => {
1188
1188
  const contextValue = useMemo(() => ({ code: code3 }), [code3]);
1189
- return /* @__PURE__ */ jsx8(CodeBlockContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs7(CodeBlockContainer, { className, language, ...props, children: [
1189
+ return /* @__PURE__ */ jsx7(CodeBlockContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs7(CodeBlockContainer, { className, language, ...props, children: [
1190
1190
  children,
1191
- /* @__PURE__ */ jsx8(
1191
+ /* @__PURE__ */ jsx7(
1192
1192
  CodeBlockContent,
1193
1193
  {
1194
1194
  code: code3,
@@ -1208,7 +1208,7 @@ var CodeBlockCopyButton = ({
1208
1208
  }) => {
1209
1209
  const [isCopied, setIsCopied] = useState4(false);
1210
1210
  const timeoutRef = useRef2(0);
1211
- const { code: code3 } = useContext2(CodeBlockContext);
1211
+ const { code: code3 } = useContext(CodeBlockContext);
1212
1212
  const copyToClipboard = useCallback2(async () => {
1213
1213
  if (typeof window === "undefined") {
1214
1214
  onError?.(new Error("Clipboard API not available"));
@@ -1236,7 +1236,7 @@ var CodeBlockCopyButton = ({
1236
1236
  []
1237
1237
  );
1238
1238
  const Icon = isCopied ? CheckIcon : CopyIcon;
1239
- return /* @__PURE__ */ jsx8(
1239
+ return /* @__PURE__ */ jsx7(
1240
1240
  Button5,
1241
1241
  {
1242
1242
  className: cn("shrink-0", className),
@@ -1244,14 +1244,14 @@ var CodeBlockCopyButton = ({
1244
1244
  size: "icon",
1245
1245
  variant: "ghost",
1246
1246
  ...props,
1247
- children: children ?? /* @__PURE__ */ jsx8(Icon, { size: 14 })
1247
+ children: children ?? /* @__PURE__ */ jsx7(Icon, { size: 14 })
1248
1248
  }
1249
1249
  );
1250
1250
  };
1251
1251
 
1252
1252
  // src/front/primitives/tool.tsx
1253
- import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1254
- var Tool2 = ({ className, ...props }) => /* @__PURE__ */ jsx9(
1253
+ import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
1254
+ var Tool2 = ({ className, ...props }) => /* @__PURE__ */ jsx8(
1255
1255
  Collapsible,
1256
1256
  {
1257
1257
  "data-boring-agent-part": "tool-card",
@@ -1279,14 +1279,14 @@ var statusLabels = {
1279
1279
  aborted: "Aborted"
1280
1280
  };
1281
1281
  var statusIcons = {
1282
- "approval-requested": /* @__PURE__ */ jsx9(ClockIcon, { className: "size-4 text-accent" }),
1283
- "approval-responded": /* @__PURE__ */ jsx9(CheckCircleIcon, { className: "size-4 text-accent" }),
1284
- "input-available": /* @__PURE__ */ jsx9(ClockIcon, { className: "size-4 animate-pulse text-muted-foreground" }),
1285
- "input-streaming": /* @__PURE__ */ jsx9(CircleIcon, { className: "size-4 text-muted-foreground" }),
1286
- "output-available": /* @__PURE__ */ jsx9(CheckCircleIcon, { className: "size-4 text-accent" }),
1287
- "output-denied": /* @__PURE__ */ jsx9(XCircleIcon, { className: "size-4 text-destructive" }),
1288
- "output-error": /* @__PURE__ */ jsx9(XCircleIcon, { className: "size-4 text-destructive" }),
1289
- aborted: /* @__PURE__ */ jsx9(XCircleIcon, { className: "size-4 text-muted-foreground" })
1282
+ "approval-requested": /* @__PURE__ */ jsx8(ClockIcon, { className: "size-4 text-accent" }),
1283
+ "approval-responded": /* @__PURE__ */ jsx8(CheckCircleIcon, { className: "size-4 text-accent" }),
1284
+ "input-available": /* @__PURE__ */ jsx8(ClockIcon, { className: "size-4 animate-pulse text-muted-foreground" }),
1285
+ "input-streaming": /* @__PURE__ */ jsx8(CircleIcon, { className: "size-4 text-muted-foreground" }),
1286
+ "output-available": /* @__PURE__ */ jsx8(CheckCircleIcon, { className: "size-4 text-accent" }),
1287
+ "output-denied": /* @__PURE__ */ jsx8(XCircleIcon, { className: "size-4 text-destructive" }),
1288
+ "output-error": /* @__PURE__ */ jsx8(XCircleIcon, { className: "size-4 text-destructive" }),
1289
+ aborted: /* @__PURE__ */ jsx8(XCircleIcon, { className: "size-4 text-muted-foreground" })
1290
1290
  };
1291
1291
  var getStatusBadge = (status, label = statusLabels[status]) => /* @__PURE__ */ jsxs8(Badge, { className: "shrink-0 gap-1.5 rounded-full text-xs", variant: "secondary", children: [
1292
1292
  statusIcons[status],
@@ -1314,11 +1314,11 @@ var ToolHeader = ({
1314
1314
  ...props,
1315
1315
  children: [
1316
1316
  /* @__PURE__ */ jsxs8("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
1317
- icon ?? /* @__PURE__ */ jsx9(WrenchIcon, { className: "size-4 shrink-0 text-muted-foreground" }),
1318
- /* @__PURE__ */ jsx9("span", { "data-boring-agent-part": "tool-title", className: "min-w-0 flex-1 truncate text-sm font-medium", children: title ?? derivedName }),
1317
+ icon ?? /* @__PURE__ */ jsx8(WrenchIcon, { className: "size-4 shrink-0 text-muted-foreground" }),
1318
+ /* @__PURE__ */ jsx8("span", { "data-boring-agent-part": "tool-title", className: "min-w-0 flex-1 truncate text-sm font-medium", children: title ?? derivedName }),
1319
1319
  getStatusBadge(state, statusLabel)
1320
1320
  ] }),
1321
- /* @__PURE__ */ jsx9(
1321
+ /* @__PURE__ */ jsx8(
1322
1322
  ChevronDownIcon,
1323
1323
  {
1324
1324
  "data-boring-agent-part": "tool-chevron",
@@ -1329,7 +1329,7 @@ var ToolHeader = ({
1329
1329
  }
1330
1330
  );
1331
1331
  };
1332
- var ToolContent = ({ className, ...props }) => /* @__PURE__ */ jsx9(
1332
+ var ToolContent = ({ className, ...props }) => /* @__PURE__ */ jsx8(
1333
1333
  CollapsibleContent,
1334
1334
  {
1335
1335
  className: cn(
@@ -1340,8 +1340,8 @@ var ToolContent = ({ className, ...props }) => /* @__PURE__ */ jsx9(
1340
1340
  }
1341
1341
  );
1342
1342
  var ToolInput = ({ className, input, ...props }) => /* @__PURE__ */ jsxs8("div", { className: cn("space-y-2 overflow-hidden", className), ...props, children: [
1343
- /* @__PURE__ */ jsx9("h4", { className: "font-medium text-muted-foreground text-xs uppercase tracking-wide", children: "Parameters" }),
1344
- /* @__PURE__ */ jsx9("div", { className: "rounded-md bg-muted/50", children: /* @__PURE__ */ jsx9(CodeBlock2, { code: JSON.stringify(input, null, 2), language: "json" }) })
1343
+ /* @__PURE__ */ jsx8("h4", { className: "font-medium text-muted-foreground text-xs uppercase tracking-wide", children: "Parameters" }),
1344
+ /* @__PURE__ */ jsx8("div", { className: "rounded-md bg-muted/50", children: /* @__PURE__ */ jsx8(CodeBlock2, { code: JSON.stringify(input, null, 2), language: "json" }) })
1345
1345
  ] });
1346
1346
  var ToolOutput = ({
1347
1347
  className,
@@ -1355,15 +1355,15 @@ var ToolOutput = ({
1355
1355
  let Output = null;
1356
1356
  if (!errorText) {
1357
1357
  if (typeof output === "object" && !isValidElement(output)) {
1358
- Output = /* @__PURE__ */ jsx9(CodeBlock2, { code: JSON.stringify(output, null, 2), language: "json" });
1358
+ Output = /* @__PURE__ */ jsx8(CodeBlock2, { code: JSON.stringify(output, null, 2), language: "json" });
1359
1359
  } else if (typeof output === "string") {
1360
- Output = /* @__PURE__ */ jsx9(CodeBlock2, { code: output, language: "text" });
1360
+ Output = /* @__PURE__ */ jsx8(CodeBlock2, { code: output, language: "text" });
1361
1361
  } else if (output) {
1362
- Output = /* @__PURE__ */ jsx9("div", { children: output });
1362
+ Output = /* @__PURE__ */ jsx8("div", { children: output });
1363
1363
  }
1364
1364
  }
1365
1365
  return /* @__PURE__ */ jsxs8("div", { "data-boring-agent-part": "tool-result", className: cn("space-y-2", className), ...props, children: [
1366
- /* @__PURE__ */ jsx9("h4", { className: "font-medium text-muted-foreground text-xs uppercase tracking-wide", children: errorText ? "Error" : "Result" }),
1366
+ /* @__PURE__ */ jsx8("h4", { className: "font-medium text-muted-foreground text-xs uppercase tracking-wide", children: errorText ? "Error" : "Result" }),
1367
1367
  /* @__PURE__ */ jsxs8(
1368
1368
  "div",
1369
1369
  {
@@ -1372,7 +1372,7 @@ var ToolOutput = ({
1372
1372
  errorText ? "overflow-hidden border border-destructive/20 bg-destructive/10 text-destructive" : "overflow-x-auto bg-muted/30 text-foreground"
1373
1373
  ),
1374
1374
  children: [
1375
- errorText ? /* @__PURE__ */ jsx9("pre", { className: "m-0 overflow-x-auto whitespace-pre-wrap break-words p-3 font-mono text-[12px] leading-5 [overflow-wrap:anywhere]", children: errorText }) : null,
1375
+ errorText ? /* @__PURE__ */ jsx8("pre", { className: "m-0 overflow-x-auto whitespace-pre-wrap break-words p-3 font-mono text-[12px] leading-5 [overflow-wrap:anywhere]", children: errorText }) : null,
1376
1376
  Output
1377
1377
  ]
1378
1378
  }
@@ -1384,52 +1384,6 @@ var ToolOutput = ({
1384
1384
  import { CollapsibleTrigger as CollapsibleTrigger2 } from "@hachej/boring-ui-kit";
1385
1385
  import { ChevronDownIcon as ChevronDownIcon2, CopyIcon as CopyIcon2, DownloadIcon, ExternalLinkIcon, FileDiffIcon, FilePlus2Icon, FileTextIcon, SearchIcon, SquareTerminalIcon, ZapIcon } from "lucide-react";
1386
1386
 
1387
- // src/front/primitives/artifact.tsx
1388
- import { Button as Button6 } from "@hachej/boring-ui-kit";
1389
- import {
1390
- Tooltip,
1391
- TooltipContent,
1392
- TooltipProvider,
1393
- TooltipTrigger
1394
- } from "@hachej/boring-ui-kit";
1395
- import { XIcon } from "lucide-react";
1396
- import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
1397
- var ArtifactAction = ({
1398
- tooltip,
1399
- label,
1400
- icon: Icon,
1401
- children,
1402
- className,
1403
- size = "sm",
1404
- variant = "ghost",
1405
- ...props
1406
- }) => {
1407
- const button = /* @__PURE__ */ jsxs9(
1408
- Button6,
1409
- {
1410
- className: cn(
1411
- "size-8 p-0 text-muted-foreground hover:text-foreground",
1412
- className
1413
- ),
1414
- size,
1415
- type: "button",
1416
- variant,
1417
- ...props,
1418
- children: [
1419
- Icon ? /* @__PURE__ */ jsx10(Icon, { className: "size-4" }) : children,
1420
- /* @__PURE__ */ jsx10("span", { className: "sr-only", children: label || tooltip })
1421
- ]
1422
- }
1423
- );
1424
- if (tooltip) {
1425
- return /* @__PURE__ */ jsx10(TooltipProvider, { children: /* @__PURE__ */ jsxs9(Tooltip, { children: [
1426
- /* @__PURE__ */ jsx10(TooltipTrigger, { asChild: true, children: button }),
1427
- /* @__PURE__ */ jsx10(TooltipContent, { children: /* @__PURE__ */ jsx10("p", { children: tooltip }) })
1428
- ] }) });
1429
- }
1430
- return button;
1431
- };
1432
-
1433
1387
  // src/front/runtimeReadinessStatus.ts
1434
1388
  var COPY = {
1435
1389
  "runtime-dependencies": "Runtime dependencies are still installing.",
@@ -1494,7 +1448,7 @@ function getWorkspaceNotReadyStatus(output) {
1494
1448
  }
1495
1449
 
1496
1450
  // src/front/toolRenderers.tsx
1497
- import { Fragment as Fragment3, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
1451
+ import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
1498
1452
  function asRecord2(value) {
1499
1453
  return typeof value === "object" && value !== null ? value : {};
1500
1454
  }
@@ -1518,7 +1472,7 @@ function toHeaderProps(part) {
1518
1472
  function PathLabel({ path, filesystem }) {
1519
1473
  const onOpen = useOpenArtifact();
1520
1474
  if (!onOpen) {
1521
- return /* @__PURE__ */ jsx11("span", { className: "font-mono text-[12.5px] text-foreground/85", children: path });
1475
+ return /* @__PURE__ */ jsx9("span", { className: "font-mono text-[12.5px] text-foreground/85", children: path });
1522
1476
  }
1523
1477
  const open = (e) => {
1524
1478
  e.preventDefault();
@@ -1529,7 +1483,7 @@ function PathLabel({ path, filesystem }) {
1529
1483
  const handleKeyDown = (e) => {
1530
1484
  if (e.key === "Enter" || e.key === " ") open(e);
1531
1485
  };
1532
- return /* @__PURE__ */ jsxs10(
1486
+ return /* @__PURE__ */ jsxs9(
1533
1487
  "span",
1534
1488
  {
1535
1489
  role: "button",
@@ -1545,8 +1499,8 @@ function PathLabel({ path, filesystem }) {
1545
1499
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[color:var(--accent)]/40"
1546
1500
  ),
1547
1501
  children: [
1548
- /* @__PURE__ */ jsx11("span", { className: "truncate", children: path }),
1549
- /* @__PURE__ */ jsx11(
1502
+ /* @__PURE__ */ jsx9("span", { className: "truncate", children: path }),
1503
+ /* @__PURE__ */ jsx9(
1550
1504
  ExternalLinkIcon,
1551
1505
  {
1552
1506
  className: "h-3 w-3 shrink-0 opacity-0 transition-opacity group-hover/path:opacity-100",
@@ -1561,9 +1515,9 @@ function PathLabel({ path, filesystem }) {
1561
1515
  function renderWorkspaceNotReady(part) {
1562
1516
  const status = getWorkspaceNotReadyStatus(part.output);
1563
1517
  if (!status) return null;
1564
- return /* @__PURE__ */ jsxs10(Tool2, { children: [
1565
- /* @__PURE__ */ jsx11(ToolHeader, { title: `${part.toolName} \xB7 ${status.message}`, ...toHeaderProps(part) }),
1566
- /* @__PURE__ */ jsx11(ToolContent, { children: /* @__PURE__ */ jsxs10("div", { className: "rounded-md border border-border/60 bg-muted/30 px-3 py-2 text-sm text-muted-foreground", children: [
1518
+ return /* @__PURE__ */ jsxs9(Tool2, { children: [
1519
+ /* @__PURE__ */ jsx9(ToolHeader, { title: `${part.toolName} \xB7 ${status.message}`, ...toHeaderProps(part) }),
1520
+ /* @__PURE__ */ jsx9(ToolContent, { children: /* @__PURE__ */ jsxs9("div", { className: "rounded-md border border-border/60 bg-muted/30 px-3 py-2 text-sm text-muted-foreground", children: [
1567
1521
  status.message,
1568
1522
  " Try again in a moment."
1569
1523
  ] }) })
@@ -1573,9 +1527,9 @@ function renderRuntimeNotReady(part) {
1573
1527
  const status = getRuntimeReadinessStatus(part.output);
1574
1528
  if (!status) return null;
1575
1529
  const suffix = status.code === ErrorCode.enum.RUNTIME_PROVISIONING_FAILED ? "Retry or reload the workspace." : "This is retryable; try again shortly.";
1576
- return /* @__PURE__ */ jsxs10(Tool2, { children: [
1577
- /* @__PURE__ */ jsx11(ToolHeader, { title: `${part.toolName} \xB7 ${status.message} ${suffix}`, ...toHeaderProps(part) }),
1578
- /* @__PURE__ */ jsx11(ToolContent, { children: /* @__PURE__ */ jsxs10("div", { className: "rounded-md border border-border/60 bg-muted/30 px-3 py-2 text-sm text-muted-foreground", children: [
1530
+ return /* @__PURE__ */ jsxs9(Tool2, { children: [
1531
+ /* @__PURE__ */ jsx9(ToolHeader, { title: `${part.toolName} \xB7 ${status.message} ${suffix}`, ...toHeaderProps(part) }),
1532
+ /* @__PURE__ */ jsx9(ToolContent, { children: /* @__PURE__ */ jsxs9("div", { className: "rounded-md border border-border/60 bg-muted/30 px-3 py-2 text-sm text-muted-foreground", children: [
1579
1533
  status.message,
1580
1534
  " ",
1581
1535
  suffix
@@ -1586,10 +1540,10 @@ function renderReadinessBlock(part) {
1586
1540
  return renderWorkspaceNotReady(part) ?? renderRuntimeNotReady(part);
1587
1541
  }
1588
1542
  function pathTitle(prefix, path, filesystem) {
1589
- return /* @__PURE__ */ jsxs10("span", { className: "flex min-w-0 items-center gap-1.5", children: [
1590
- /* @__PURE__ */ jsx11("span", { className: "text-muted-foreground", children: prefix }),
1591
- /* @__PURE__ */ jsx11("span", { className: "text-muted-foreground/40", "aria-hidden": "true", children: "\xB7" }),
1592
- /* @__PURE__ */ jsx11(PathLabel, { path, filesystem })
1543
+ return /* @__PURE__ */ jsxs9("span", { className: "flex min-w-0 items-center gap-1.5", children: [
1544
+ /* @__PURE__ */ jsx9("span", { className: "text-muted-foreground", children: prefix }),
1545
+ /* @__PURE__ */ jsx9("span", { className: "text-muted-foreground/40", "aria-hidden": "true", children: "\xB7" }),
1546
+ /* @__PURE__ */ jsx9(PathLabel, { path, filesystem })
1593
1547
  ] });
1594
1548
  }
1595
1549
  function renderBash2(part) {
@@ -1604,21 +1558,21 @@ function renderBash2(part) {
1604
1558
  const exitCode = typeof output.exitCode === "number" ? output.exitCode : null;
1605
1559
  const title = description || (command.length > 64 ? command.slice(0, 64) + "\u2026" : command) || "bash";
1606
1560
  const errorText = part.errorText || (stderr && (exitCode ?? 0) !== 0 ? stderr : void 0);
1607
- return /* @__PURE__ */ jsxs10(Tool2, { children: [
1608
- /* @__PURE__ */ jsx11(ToolHeader, { icon: /* @__PURE__ */ jsx11(SquareTerminalIcon, { className: "size-4 text-muted-foreground" }), title: `bash \xB7 ${title}`, ...toHeaderProps(part) }),
1609
- /* @__PURE__ */ jsxs10(ToolContent, { children: [
1610
- command && /* @__PURE__ */ jsxs10("section", { className: "space-y-2", children: [
1611
- /* @__PURE__ */ jsx11("h4", { className: "font-medium text-muted-foreground text-xs uppercase tracking-wide", children: "Command" }),
1612
- /* @__PURE__ */ jsx11(CodeBlock2, { code: command, language: "bash" })
1561
+ return /* @__PURE__ */ jsxs9(Tool2, { children: [
1562
+ /* @__PURE__ */ jsx9(ToolHeader, { icon: /* @__PURE__ */ jsx9(SquareTerminalIcon, { className: "size-4 text-muted-foreground" }), title: `bash \xB7 ${title}`, ...toHeaderProps(part) }),
1563
+ /* @__PURE__ */ jsxs9(ToolContent, { children: [
1564
+ command && /* @__PURE__ */ jsxs9("section", { className: "space-y-2", children: [
1565
+ /* @__PURE__ */ jsx9("h4", { className: "font-medium text-muted-foreground text-xs uppercase tracking-wide", children: "Command" }),
1566
+ /* @__PURE__ */ jsx9(CodeBlock2, { code: command, language: "bash" })
1613
1567
  ] }),
1614
- /* @__PURE__ */ jsx11(
1568
+ /* @__PURE__ */ jsx9(
1615
1569
  ToolOutput,
1616
1570
  {
1617
1571
  output: stdout && !errorText ? stdout : void 0,
1618
1572
  errorText
1619
1573
  }
1620
1574
  ),
1621
- exitCode !== null && exitCode !== 0 && !errorText && /* @__PURE__ */ jsxs10("div", { className: "text-xs text-destructive", children: [
1575
+ exitCode !== null && exitCode !== 0 && !errorText && /* @__PURE__ */ jsxs9("div", { className: "text-xs text-destructive", children: [
1622
1576
  "exit ",
1623
1577
  exitCode
1624
1578
  ] })
@@ -1634,13 +1588,13 @@ function renderRead2(part) {
1634
1588
  const filesystem = typeof input.filesystem === "string" ? input.filesystem : void 0;
1635
1589
  const content = extractTextContent(output);
1636
1590
  const lang = langFromPath(path);
1637
- return /* @__PURE__ */ jsxs10(Tool2, { children: [
1638
- /* @__PURE__ */ jsx11(ToolHeader, { icon: /* @__PURE__ */ jsx11(FileTextIcon, { className: "size-4 text-muted-foreground" }), title: pathTitle("read", path, filesystem), ...toHeaderProps(part) }),
1639
- /* @__PURE__ */ jsxs10(ToolContent, { children: [
1640
- /* @__PURE__ */ jsx11(ToolInput, { input }),
1641
- content && /* @__PURE__ */ jsxs10("section", { className: "space-y-2", children: [
1642
- /* @__PURE__ */ jsx11("h4", { className: "font-medium text-muted-foreground text-xs uppercase tracking-wide", children: "Content" }),
1643
- /* @__PURE__ */ jsx11(CodeBlock2, { code: content, language: lang ?? "text" })
1591
+ return /* @__PURE__ */ jsxs9(Tool2, { children: [
1592
+ /* @__PURE__ */ jsx9(ToolHeader, { icon: /* @__PURE__ */ jsx9(FileTextIcon, { className: "size-4 text-muted-foreground" }), title: pathTitle("read", path, filesystem), ...toHeaderProps(part) }),
1593
+ /* @__PURE__ */ jsxs9(ToolContent, { children: [
1594
+ /* @__PURE__ */ jsx9(ToolInput, { input }),
1595
+ content && /* @__PURE__ */ jsxs9("section", { className: "space-y-2", children: [
1596
+ /* @__PURE__ */ jsx9("h4", { className: "font-medium text-muted-foreground text-xs uppercase tracking-wide", children: "Content" }),
1597
+ /* @__PURE__ */ jsx9(CodeBlock2, { code: content, language: lang ?? "text" })
1644
1598
  ] })
1645
1599
  ] })
1646
1600
  ] });
@@ -1652,20 +1606,20 @@ function renderWrite2(part) {
1652
1606
  const path = typeof input.path === "string" ? input.path : "";
1653
1607
  const filesystem = typeof input.filesystem === "string" ? input.filesystem : void 0;
1654
1608
  const content = typeof input.content === "string" ? input.content : "";
1655
- return /* @__PURE__ */ jsxs10(Tool2, { defaultOpen: part.state === "output-available", children: [
1656
- /* @__PURE__ */ jsx11(ToolHeader, { className: "p-2", icon: /* @__PURE__ */ jsx11(FilePlus2Icon, { className: "size-4 shrink-0 text-muted-foreground" }), title: pathTitle("write", path, filesystem), ...toHeaderProps(part) }),
1657
- /* @__PURE__ */ jsxs10(ToolContent, { className: "p-1.5", children: [
1658
- /* @__PURE__ */ jsx11("div", { className: "max-h-80 overflow-auto overscroll-contain rounded-sm", children: content ? /* @__PURE__ */ jsx11(
1609
+ return /* @__PURE__ */ jsxs9(Tool2, { defaultOpen: part.state === "output-available", children: [
1610
+ /* @__PURE__ */ jsx9(ToolHeader, { className: "p-2", icon: /* @__PURE__ */ jsx9(FilePlus2Icon, { className: "size-4 shrink-0 text-muted-foreground" }), title: pathTitle("write", path, filesystem), ...toHeaderProps(part) }),
1611
+ /* @__PURE__ */ jsxs9(ToolContent, { className: "p-1.5", children: [
1612
+ /* @__PURE__ */ jsx9("div", { className: "max-h-80 overflow-auto overscroll-contain rounded-sm", children: content ? /* @__PURE__ */ jsx9(
1659
1613
  DiffView,
1660
1614
  {
1661
1615
  oldString: "",
1662
1616
  newString: content,
1663
1617
  path,
1664
- actions: /* @__PURE__ */ jsxs10(Fragment3, { children: [
1665
- /* @__PURE__ */ jsx11(ArtifactAction, { className: "size-6", icon: CopyIcon2, tooltip: "Copy contents", label: "Copy", onClick: () => {
1618
+ actions: /* @__PURE__ */ jsxs9(Fragment3, { children: [
1619
+ /* @__PURE__ */ jsx9(ArtifactAction, { className: "size-6", icon: CopyIcon2, tooltip: "Copy contents", label: "Copy", onClick: () => {
1666
1620
  void copyTextToClipboard(content);
1667
1621
  } }),
1668
- /* @__PURE__ */ jsx11(
1622
+ /* @__PURE__ */ jsx9(
1669
1623
  ArtifactAction,
1670
1624
  {
1671
1625
  className: "size-6",
@@ -1687,8 +1641,8 @@ function renderWrite2(part) {
1687
1641
  )
1688
1642
  ] })
1689
1643
  }
1690
- ) : /* @__PURE__ */ jsx11("p", { className: "px-2 py-1 text-[12px] text-muted-foreground", children: "No file content was included with this tool call." }) }),
1691
- part.errorText || part.state === "output-error" || part.state === "output-denied" ? /* @__PURE__ */ jsx11(ToolOutput, { output: part.output, errorText: part.errorText }) : null
1644
+ ) : /* @__PURE__ */ jsx9("p", { className: "px-2 py-1 text-[12px] text-muted-foreground", children: "No file content was included with this tool call." }) }),
1645
+ part.errorText || part.state === "output-error" || part.state === "output-denied" ? /* @__PURE__ */ jsx9(ToolOutput, { output: part.output, errorText: part.errorText }) : null
1692
1646
  ] })
1693
1647
  ] });
1694
1648
  }
@@ -1707,17 +1661,17 @@ function renderEdit2(part) {
1707
1661
  const legacyOldText = typeof input.oldString === "string" ? input.oldString : typeof input.oldText === "string" ? input.oldText : "";
1708
1662
  const legacyNewText = typeof input.newString === "string" ? input.newString : typeof input.newText === "string" ? input.newText : "";
1709
1663
  const visibleEdits = edits.length > 0 ? edits : legacyOldText || legacyNewText ? [{ oldText: legacyOldText, newText: legacyNewText }] : [];
1710
- return /* @__PURE__ */ jsxs10(Tool2, { defaultOpen: part.state === "output-available", children: [
1711
- /* @__PURE__ */ jsx11(ToolHeader, { className: "p-2", icon: /* @__PURE__ */ jsx11(FileDiffIcon, { className: "size-4 shrink-0 text-muted-foreground" }), title: pathTitle("edit", path, filesystem), ...toHeaderProps(part) }),
1712
- /* @__PURE__ */ jsxs10(ToolContent, { className: "space-y-2 p-2", children: [
1713
- /* @__PURE__ */ jsx11("div", { className: "max-h-80 space-y-2 overflow-auto overscroll-contain rounded-sm", children: visibleEdits.length > 0 ? visibleEdits.map((edit, index) => /* @__PURE__ */ jsxs10("div", { children: [
1714
- visibleEdits.length > 1 ? /* @__PURE__ */ jsxs10("div", { className: "mb-1 px-1 text-[11px] text-muted-foreground", children: [
1664
+ return /* @__PURE__ */ jsxs9(Tool2, { defaultOpen: part.state === "output-available", children: [
1665
+ /* @__PURE__ */ jsx9(ToolHeader, { className: "p-2", icon: /* @__PURE__ */ jsx9(FileDiffIcon, { className: "size-4 shrink-0 text-muted-foreground" }), title: pathTitle("edit", path, filesystem), ...toHeaderProps(part) }),
1666
+ /* @__PURE__ */ jsxs9(ToolContent, { className: "space-y-2 p-2", children: [
1667
+ /* @__PURE__ */ jsx9("div", { className: "max-h-80 space-y-2 overflow-auto overscroll-contain rounded-sm", children: visibleEdits.length > 0 ? visibleEdits.map((edit, index) => /* @__PURE__ */ jsxs9("div", { children: [
1668
+ visibleEdits.length > 1 ? /* @__PURE__ */ jsxs9("div", { className: "mb-1 px-1 text-[11px] text-muted-foreground", children: [
1715
1669
  "Change ",
1716
1670
  index + 1
1717
1671
  ] }) : null,
1718
- /* @__PURE__ */ jsx11(DiffView, { oldString: edit.oldText, newString: edit.newText, path })
1719
- ] }, `${index}:${edit.oldText.length}:${edit.newText.length}`)) : /* @__PURE__ */ jsx11("p", { className: "px-2 py-1 text-[12px] text-muted-foreground", children: "Diff details were not included with this tool call." }) }),
1720
- part.errorText || part.state === "output-error" || part.state === "output-denied" ? /* @__PURE__ */ jsx11(ToolOutput, { output: part.output, errorText: part.errorText }) : null
1672
+ /* @__PURE__ */ jsx9(DiffView, { oldString: edit.oldText, newString: edit.newText, path })
1673
+ ] }, `${index}:${edit.oldText.length}:${edit.newText.length}`)) : /* @__PURE__ */ jsx9("p", { className: "px-2 py-1 text-[12px] text-muted-foreground", children: "Diff details were not included with this tool call." }) }),
1674
+ part.errorText || part.state === "output-error" || part.state === "output-denied" ? /* @__PURE__ */ jsx9(ToolOutput, { output: part.output, errorText: part.errorText }) : null
1721
1675
  ] })
1722
1676
  ] });
1723
1677
  }
@@ -1730,18 +1684,18 @@ function renderSearchLike2(toolName, part) {
1730
1684
  const path = typeof input.path === "string" ? input.path : "";
1731
1685
  const glob = typeof input.glob === "string" ? input.glob : "";
1732
1686
  const summary = [pattern, path, glob].filter(Boolean).join(" \xB7 ");
1733
- return /* @__PURE__ */ jsxs10(Tool2, { children: [
1734
- /* @__PURE__ */ jsx11(
1687
+ return /* @__PURE__ */ jsxs9(Tool2, { children: [
1688
+ /* @__PURE__ */ jsx9(
1735
1689
  ToolHeader,
1736
1690
  {
1737
- icon: /* @__PURE__ */ jsx11(SearchLikeIcon, { className: "size-4 text-muted-foreground" }),
1691
+ icon: /* @__PURE__ */ jsx9(SearchLikeIcon, { className: "size-4 text-muted-foreground" }),
1738
1692
  title: summary ? `${toolName} \xB7 ${summary}` : toolName,
1739
1693
  ...toHeaderProps(part)
1740
1694
  }
1741
1695
  ),
1742
- /* @__PURE__ */ jsxs10(ToolContent, { children: [
1743
- /* @__PURE__ */ jsx11(ToolInput, { input }),
1744
- /* @__PURE__ */ jsx11(ToolOutput, { output: part.output, errorText: part.errorText })
1696
+ /* @__PURE__ */ jsxs9(ToolContent, { children: [
1697
+ /* @__PURE__ */ jsx9(ToolInput, { input }),
1698
+ /* @__PURE__ */ jsx9(ToolOutput, { output: part.output, errorText: part.errorText })
1745
1699
  ] })
1746
1700
  ] });
1747
1701
  }
@@ -1766,8 +1720,8 @@ function renderExecUi2(part) {
1766
1720
  const kind = typeof input.kind === "string" ? input.kind : "(empty)";
1767
1721
  const tokens = extractParamTokens(input.params);
1768
1722
  const headerProps = toHeaderProps(part);
1769
- return /* @__PURE__ */ jsxs10(Tool2, { children: [
1770
- /* @__PURE__ */ jsxs10(
1723
+ return /* @__PURE__ */ jsxs9(Tool2, { children: [
1724
+ /* @__PURE__ */ jsxs9(
1771
1725
  CollapsibleTrigger2,
1772
1726
  {
1773
1727
  className: cn(
@@ -1775,17 +1729,17 @@ function renderExecUi2(part) {
1775
1729
  "hover:bg-muted/40 transition-colors"
1776
1730
  ),
1777
1731
  children: [
1778
- /* @__PURE__ */ jsx11(
1732
+ /* @__PURE__ */ jsx9(
1779
1733
  ZapIcon,
1780
1734
  {
1781
1735
  className: "size-3.5 shrink-0 text-muted-foreground/70",
1782
1736
  "aria-hidden": "true"
1783
1737
  }
1784
1738
  ),
1785
- /* @__PURE__ */ jsx11("span", { className: "font-medium text-sm", children: kind }),
1786
- tokens.length > 0 && /* @__PURE__ */ jsxs10("div", { className: "flex min-w-0 items-center gap-1.5 overflow-hidden", children: [
1787
- /* @__PURE__ */ jsx11("span", { className: "text-muted-foreground/40", "aria-hidden": "true", children: "\xB7" }),
1788
- tokens.map((tok, i) => /* @__PURE__ */ jsx11(
1739
+ /* @__PURE__ */ jsx9("span", { className: "font-medium text-sm", children: kind }),
1740
+ tokens.length > 0 && /* @__PURE__ */ jsxs9("div", { className: "flex min-w-0 items-center gap-1.5 overflow-hidden", children: [
1741
+ /* @__PURE__ */ jsx9("span", { className: "text-muted-foreground/40", "aria-hidden": "true", children: "\xB7" }),
1742
+ tokens.map((tok, i) => /* @__PURE__ */ jsx9(
1789
1743
  "span",
1790
1744
  {
1791
1745
  className: cn(
@@ -1798,9 +1752,9 @@ function renderExecUi2(part) {
1798
1752
  i
1799
1753
  ))
1800
1754
  ] }),
1801
- /* @__PURE__ */ jsxs10("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
1755
+ /* @__PURE__ */ jsxs9("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
1802
1756
  getStatusBadge(headerProps.state),
1803
- /* @__PURE__ */ jsx11(
1757
+ /* @__PURE__ */ jsx9(
1804
1758
  ChevronDownIcon2,
1805
1759
  {
1806
1760
  className: "size-4 text-muted-foreground/60 transition-transform group-data-[state=open]/exec-ui:rotate-180",
@@ -1811,9 +1765,9 @@ function renderExecUi2(part) {
1811
1765
  ]
1812
1766
  }
1813
1767
  ),
1814
- /* @__PURE__ */ jsxs10(ToolContent, { children: [
1815
- part.input !== void 0 && part.input !== null && /* @__PURE__ */ jsx11(ToolInput, { input: part.input }),
1816
- /* @__PURE__ */ jsx11(ToolOutput, { output: part.output, errorText: part.errorText })
1768
+ /* @__PURE__ */ jsxs9(ToolContent, { children: [
1769
+ part.input !== void 0 && part.input !== null && /* @__PURE__ */ jsx9(ToolInput, { input: part.input }),
1770
+ /* @__PURE__ */ jsx9(ToolOutput, { output: part.output, errorText: part.errorText })
1817
1771
  ] })
1818
1772
  ] });
1819
1773
  }
@@ -1825,11 +1779,11 @@ function fallbackTitle(part) {
1825
1779
  function renderFallback2(part) {
1826
1780
  const readiness = renderReadinessBlock(part);
1827
1781
  if (readiness) return readiness;
1828
- return /* @__PURE__ */ jsxs10(Tool2, { children: [
1829
- /* @__PURE__ */ jsx11(ToolHeader, { title: fallbackTitle(part), ...toHeaderProps(part) }),
1830
- /* @__PURE__ */ jsxs10(ToolContent, { children: [
1831
- part.input !== void 0 && part.input !== null && /* @__PURE__ */ jsx11(ToolInput, { input: part.input }),
1832
- /* @__PURE__ */ jsx11(ToolOutput, { output: part.output, errorText: part.errorText })
1782
+ return /* @__PURE__ */ jsxs9(Tool2, { children: [
1783
+ /* @__PURE__ */ jsx9(ToolHeader, { title: fallbackTitle(part), ...toHeaderProps(part) }),
1784
+ /* @__PURE__ */ jsxs9(ToolContent, { children: [
1785
+ part.input !== void 0 && part.input !== null && /* @__PURE__ */ jsx9(ToolInput, { input: part.input }),
1786
+ /* @__PURE__ */ jsx9(ToolOutput, { output: part.output, errorText: part.errorText })
1833
1787
  ] })
1834
1788
  ] });
1835
1789
  }
@@ -1993,7 +1947,7 @@ function usePickerKeyboard({
1993
1947
  }
1994
1948
 
1995
1949
  // src/front/primitives/mention-picker.tsx
1996
- import { Fragment as Fragment4, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
1950
+ import { Fragment as Fragment4, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
1997
1951
  var mentionSearchGlob = toFileSearchGlob;
1998
1952
  function highlight(text, query) {
1999
1953
  if (!query) return null;
@@ -2040,10 +1994,10 @@ function MentionPicker({
2040
1994
  }, [results, onSelect]);
2041
1995
  usePickerKeyboard({ count: results.length, activeIdx, setActiveIdx, listRef, onSelect: handleSelect, onDismiss });
2042
1996
  if (results.length === 0) return null;
2043
- return /* @__PURE__ */ jsx12("div", { className: "mb-1 w-full overflow-hidden rounded-lg border border-border/60 bg-popover shadow-lg", children: /* @__PURE__ */ jsx12("ul", { ref: listRef, className: "max-h-48 overflow-y-auto py-1", role: "listbox", "aria-label": "File suggestions", children: results.map((path, i) => {
1997
+ return /* @__PURE__ */ jsx10("div", { className: "mb-1 w-full overflow-hidden rounded-lg border border-border/60 bg-popover shadow-lg", children: /* @__PURE__ */ jsx10("ul", { ref: listRef, className: "max-h-48 overflow-y-auto py-1", role: "listbox", "aria-label": "File suggestions", children: results.map((path, i) => {
2044
1998
  const name = path.split("/").pop() ?? path;
2045
1999
  const hl = highlight(name, mention.query);
2046
- return /* @__PURE__ */ jsxs11(
2000
+ return /* @__PURE__ */ jsxs10(
2047
2001
  "li",
2048
2002
  {
2049
2003
  role: "option",
@@ -2058,12 +2012,12 @@ function MentionPicker({
2058
2012
  onSelect(path);
2059
2013
  },
2060
2014
  children: [
2061
- /* @__PURE__ */ jsx12("span", { className: "font-medium", children: hl ? /* @__PURE__ */ jsxs11(Fragment4, { children: [
2015
+ /* @__PURE__ */ jsx10("span", { className: "font-medium", children: hl ? /* @__PURE__ */ jsxs10(Fragment4, { children: [
2062
2016
  hl.before,
2063
- /* @__PURE__ */ jsx12("mark", { className: "bg-transparent text-[color:var(--accent)]", children: hl.match }),
2017
+ /* @__PURE__ */ jsx10("mark", { className: "bg-transparent text-[color:var(--accent)]", children: hl.match }),
2064
2018
  hl.after
2065
2019
  ] }) : name }),
2066
- /* @__PURE__ */ jsx12("span", { className: "truncate text-[11px] opacity-50", children: path })
2020
+ /* @__PURE__ */ jsx10("span", { className: "truncate text-[11px] opacity-50", children: path })
2067
2021
  ]
2068
2022
  },
2069
2023
  path
@@ -2880,22 +2834,22 @@ function composerNoticeForRuntimeDependencies(status) {
2880
2834
  }
2881
2835
 
2882
2836
  // src/front/chat/composerContributions.tsx
2883
- import { createContext as createContext3, useContext as useContext3, useMemo as useMemo3 } from "react";
2884
- import { jsx as jsx13 } from "react/jsx-runtime";
2885
- var ComposerContributionContext = createContext3([]);
2837
+ import { createContext as createContext2, useContext as useContext2, useMemo as useMemo3 } from "react";
2838
+ import { jsx as jsx11 } from "react/jsx-runtime";
2839
+ var ComposerContributionContext = createContext2([]);
2886
2840
  function ComposerContributionProvider({
2887
2841
  contribution,
2888
2842
  children
2889
2843
  }) {
2890
- const parent = useContext3(ComposerContributionContext);
2844
+ const parent = useContext2(ComposerContributionContext);
2891
2845
  const contributions = useMemo3(
2892
2846
  () => [contribution, ...parent.filter((entry) => entry.id !== contribution.id)],
2893
2847
  [contribution, parent]
2894
2848
  );
2895
- return /* @__PURE__ */ jsx13(ComposerContributionContext.Provider, { value: contributions, children });
2849
+ return /* @__PURE__ */ jsx11(ComposerContributionContext.Provider, { value: contributions, children });
2896
2850
  }
2897
2851
  function useComposerContributions() {
2898
- return useContext3(ComposerContributionContext);
2852
+ return useContext2(ComposerContributionContext);
2899
2853
  }
2900
2854
 
2901
2855
  // src/front/chat/pi/piChatMessageMetadata.ts
@@ -5845,7 +5799,7 @@ function clearRetryTimer(ref) {
5845
5799
  import { useMemo as useMemo5 } from "react";
5846
5800
  import { ChevronLeftIcon, PlusIcon, Trash2Icon } from "lucide-react";
5847
5801
  import { IconButton } from "@hachej/boring-ui-kit";
5848
- import { Fragment as Fragment5, jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
5802
+ import { Fragment as Fragment5, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
5849
5803
  var DAY_MS = 24 * 60 * 60 * 1e3;
5850
5804
  function SessionList({
5851
5805
  sessions,
@@ -5861,7 +5815,7 @@ function SessionList({
5861
5815
  className
5862
5816
  }) {
5863
5817
  const groups = useMemo5(() => groupSessions(sessions), [sessions]);
5864
- return /* @__PURE__ */ jsxs12(
5818
+ return /* @__PURE__ */ jsxs11(
5865
5819
  "div",
5866
5820
  {
5867
5821
  "data-boring-agent-part": "session-list",
@@ -5870,27 +5824,27 @@ function SessionList({
5870
5824
  "aria-label": "Session history",
5871
5825
  "aria-busy": loading ? "true" : void 0,
5872
5826
  children: [
5873
- /* @__PURE__ */ jsxs12("div", { className: "flex h-11 items-center justify-between border-b border-border/60 px-3.5", children: [
5874
- /* @__PURE__ */ jsx14("span", { className: "text-[12px] font-medium tracking-tight text-foreground/70", children: "Sessions" }),
5875
- /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-0.5", children: [
5876
- onCreate ? /* @__PURE__ */ jsx14(IconButton, { type: "button", variant: "ghost", size: "icon-xs", onClick: onCreate, "aria-label": "New session", title: "New chat", children: /* @__PURE__ */ jsx14(PlusIcon, { className: "h-3.5 w-3.5", strokeWidth: 1.75 }) }) : null,
5877
- onClose ? /* @__PURE__ */ jsx14(IconButton, { type: "button", variant: "ghost", size: "icon-xs", onClick: onClose, "aria-label": "Close sessions", title: "Close sessions", children: /* @__PURE__ */ jsx14(ChevronLeftIcon, { className: "h-4 w-4", strokeWidth: 1.75 }) }) : null
5827
+ /* @__PURE__ */ jsxs11("div", { className: "flex h-11 items-center justify-between border-b border-border/60 px-3.5", children: [
5828
+ /* @__PURE__ */ jsx12("span", { className: "text-[12px] font-medium tracking-tight text-foreground/70", children: "Sessions" }),
5829
+ /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-0.5", children: [
5830
+ onCreate ? /* @__PURE__ */ jsx12(IconButton, { type: "button", variant: "ghost", size: "icon-xs", onClick: onCreate, "aria-label": "New session", title: "New chat", children: /* @__PURE__ */ jsx12(PlusIcon, { className: "h-3.5 w-3.5", strokeWidth: 1.75 }) }) : null,
5831
+ onClose ? /* @__PURE__ */ jsx12(IconButton, { type: "button", variant: "ghost", size: "icon-xs", onClick: onClose, "aria-label": "Close sessions", title: "Close sessions", children: /* @__PURE__ */ jsx12(ChevronLeftIcon, { className: "h-4 w-4", strokeWidth: 1.75 }) }) : null
5878
5832
  ] })
5879
5833
  ] }),
5880
- /* @__PURE__ */ jsxs12("div", { className: "flex-1 overflow-y-auto py-2.5", children: [
5881
- sessions.length === 0 ? /* @__PURE__ */ jsxs12("div", { "data-boring-agent-part": "session-list-empty", className: "px-3 py-8 text-center text-[13px] text-muted-foreground", children: [
5834
+ /* @__PURE__ */ jsxs11("div", { className: "flex-1 overflow-y-auto py-2.5", children: [
5835
+ sessions.length === 0 ? /* @__PURE__ */ jsxs11("div", { "data-boring-agent-part": "session-list-empty", className: "px-3 py-8 text-center text-[13px] text-muted-foreground", children: [
5882
5836
  loading ? "Loading sessions\u2026" : "No sessions yet.",
5883
- !loading ? /* @__PURE__ */ jsxs12(Fragment5, { children: [
5884
- /* @__PURE__ */ jsx14("br", {}),
5837
+ !loading ? /* @__PURE__ */ jsxs11(Fragment5, { children: [
5838
+ /* @__PURE__ */ jsx12("br", {}),
5885
5839
  "Start a new chat to begin."
5886
5840
  ] }) : null
5887
5841
  ] }) : null,
5888
- groups.map((group, index) => /* @__PURE__ */ jsxs12("section", { className: cn(index > 0 && "mt-4"), children: [
5889
- /* @__PURE__ */ jsxs12("div", { className: "flex items-baseline justify-between gap-2 px-3.5 pb-2 pt-2 text-[11px] font-medium tracking-tight text-muted-foreground/75", children: [
5890
- /* @__PURE__ */ jsx14("span", { children: group.label }),
5891
- /* @__PURE__ */ jsx14("span", { "aria-hidden": "true", className: "text-[10.5px] tabular-nums text-muted-foreground/40", children: group.items.length })
5842
+ groups.map((group, index) => /* @__PURE__ */ jsxs11("section", { className: cn(index > 0 && "mt-4"), children: [
5843
+ /* @__PURE__ */ jsxs11("div", { className: "flex items-baseline justify-between gap-2 px-3.5 pb-2 pt-2 text-[11px] font-medium tracking-tight text-muted-foreground/75", children: [
5844
+ /* @__PURE__ */ jsx12("span", { children: group.label }),
5845
+ /* @__PURE__ */ jsx12("span", { "aria-hidden": "true", className: "text-[10.5px] tabular-nums text-muted-foreground/40", children: group.items.length })
5892
5846
  ] }),
5893
- /* @__PURE__ */ jsx14("ul", { role: "list", className: "flex flex-col", children: group.items.map((session) => /* @__PURE__ */ jsx14(
5847
+ /* @__PURE__ */ jsx12("ul", { role: "list", className: "flex flex-col", children: group.items.map((session) => /* @__PURE__ */ jsx12(
5894
5848
  SessionRow,
5895
5849
  {
5896
5850
  session,
@@ -5901,7 +5855,7 @@ function SessionList({
5901
5855
  session.id
5902
5856
  )) })
5903
5857
  ] }, group.key)),
5904
- hasMore && onLoadMore ? /* @__PURE__ */ jsx14("div", { className: "px-3 py-3", children: /* @__PURE__ */ jsx14(
5858
+ hasMore && onLoadMore ? /* @__PURE__ */ jsx12("div", { className: "px-3 py-3", children: /* @__PURE__ */ jsx12(
5905
5859
  "button",
5906
5860
  {
5907
5861
  type: "button",
@@ -5919,7 +5873,7 @@ function SessionList({
5919
5873
  var SessionBrowser = SessionList;
5920
5874
  function SessionRow({ session, active, onSwitch, onDelete }) {
5921
5875
  const time = relativeTime(session.updatedAt);
5922
- return /* @__PURE__ */ jsxs12(
5876
+ return /* @__PURE__ */ jsxs11(
5923
5877
  "li",
5924
5878
  {
5925
5879
  role: "listitem",
@@ -5932,11 +5886,11 @@ function SessionRow({ session, active, onSwitch, onDelete }) {
5932
5886
  ),
5933
5887
  onClick: () => onSwitch?.(session.id),
5934
5888
  children: [
5935
- /* @__PURE__ */ jsxs12("span", { className: "min-w-0 flex-1 truncate leading-5", title: session.title, children: [
5936
- /* @__PURE__ */ jsx14("span", { className: cn(active ? "font-medium text-foreground" : "text-foreground/90"), children: session.title || "Untitled" }),
5937
- time ? /* @__PURE__ */ jsx14("span", { className: cn("ml-1.5 tabular-nums text-[11px]", active ? "text-[color:var(--accent)]" : "text-muted-foreground/60"), children: time }) : null
5889
+ /* @__PURE__ */ jsxs11("span", { className: "min-w-0 flex-1 truncate leading-5", title: session.title, children: [
5890
+ /* @__PURE__ */ jsx12("span", { className: cn(active ? "font-medium text-foreground" : "text-foreground/90"), children: session.title || "Untitled" }),
5891
+ time ? /* @__PURE__ */ jsx12("span", { className: cn("ml-1.5 tabular-nums text-[11px]", active ? "text-[color:var(--accent)]" : "text-muted-foreground/60"), children: time }) : null
5938
5892
  ] }),
5939
- onDelete ? /* @__PURE__ */ jsx14(
5893
+ onDelete ? /* @__PURE__ */ jsx12(
5940
5894
  IconButton,
5941
5895
  {
5942
5896
  type: "button",
@@ -5948,7 +5902,7 @@ function SessionRow({ session, active, onSwitch, onDelete }) {
5948
5902
  onDelete(session.id);
5949
5903
  },
5950
5904
  "aria-label": `Delete ${session.title || "session"}`,
5951
- children: /* @__PURE__ */ jsx14(Trash2Icon, { className: "h-3 w-3" })
5905
+ children: /* @__PURE__ */ jsx12(Trash2Icon, { className: "h-3 w-3" })
5952
5906
  }
5953
5907
  ) : null
5954
5908
  ]
@@ -6199,11 +6153,11 @@ import { useCallback as useCallback14, useEffect as useEffect14, useLayoutEffect
6199
6153
  import { useStickToBottomContext as useStickToBottomContext2 } from "use-stick-to-bottom";
6200
6154
 
6201
6155
  // src/front/primitives/conversation.tsx
6202
- import { Button as Button7 } from "@hachej/boring-ui-kit";
6156
+ import { Button as Button6 } from "@hachej/boring-ui-kit";
6203
6157
  import { ArrowDownIcon, DownloadIcon as DownloadIcon2 } from "lucide-react";
6204
6158
  import { useCallback as useCallback8, useEffect as useEffect9 } from "react";
6205
6159
  import { StickToBottom, useStickToBottomContext } from "use-stick-to-bottom";
6206
- import { Fragment as Fragment6, jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
6160
+ import { Fragment as Fragment6, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
6207
6161
  var ConversationScrollController = ({
6208
6162
  onScrollToBottomReady
6209
6163
  }) => {
@@ -6220,7 +6174,7 @@ var Conversation = ({
6220
6174
  children,
6221
6175
  onScrollToBottomReady,
6222
6176
  ...props
6223
- }) => /* @__PURE__ */ jsxs13(
6177
+ }) => /* @__PURE__ */ jsxs12(
6224
6178
  StickToBottom,
6225
6179
  {
6226
6180
  className: cn("relative flex-1 overflow-y-hidden", className),
@@ -6229,7 +6183,7 @@ var Conversation = ({
6229
6183
  role: "log",
6230
6184
  ...props,
6231
6185
  children: [
6232
- /* @__PURE__ */ jsx15(ConversationScrollController, { onScrollToBottomReady }),
6186
+ /* @__PURE__ */ jsx13(ConversationScrollController, { onScrollToBottomReady }),
6233
6187
  children
6234
6188
  ]
6235
6189
  }
@@ -6237,7 +6191,7 @@ var Conversation = ({
6237
6191
  var ConversationContent = ({
6238
6192
  className,
6239
6193
  ...props
6240
- }) => /* @__PURE__ */ jsx15(
6194
+ }) => /* @__PURE__ */ jsx13(
6241
6195
  StickToBottom.Content,
6242
6196
  {
6243
6197
  className: cn("flex flex-col gap-8 p-4", className),
@@ -6252,8 +6206,8 @@ var ConversationScrollButton = ({
6252
6206
  const handleScrollToBottom = useCallback8(() => {
6253
6207
  scrollToBottom();
6254
6208
  }, [scrollToBottom]);
6255
- return !isAtBottom && /* @__PURE__ */ jsx15(
6256
- Button7,
6209
+ return !isAtBottom && /* @__PURE__ */ jsx13(
6210
+ Button6,
6257
6211
  {
6258
6212
  className: cn(
6259
6213
  "boring-agent-scroll-latest absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full dark:bg-background dark:hover:bg-muted",
@@ -6265,13 +6219,13 @@ var ConversationScrollButton = ({
6265
6219
  variant: "outline",
6266
6220
  "aria-label": "Scroll to latest message",
6267
6221
  ...props,
6268
- children: /* @__PURE__ */ jsx15(ArrowDownIcon, { className: "size-4" })
6222
+ children: /* @__PURE__ */ jsx13(ArrowDownIcon, { className: "size-4" })
6269
6223
  }
6270
6224
  );
6271
6225
  };
6272
6226
 
6273
6227
  // src/front/chat/components/ChatNotices.tsx
6274
- import { AlertCircleIcon, ExternalLinkIcon as ExternalLinkIcon2, ListRestartIcon, Loader2, XIcon as XIcon3 } from "lucide-react";
6228
+ import { AlertCircleIcon, ExternalLinkIcon as ExternalLinkIcon2, ListRestartIcon, Loader2, XIcon as XIcon2 } from "lucide-react";
6275
6229
  import { IconButton as IconButton2 } from "@hachej/boring-ui-kit";
6276
6230
 
6277
6231
  // src/front/chat/components/noticeStyles.ts
@@ -6299,8 +6253,8 @@ function noticeTextClass(className) {
6299
6253
 
6300
6254
  // src/front/chat/components/RuntimeNotices.tsx
6301
6255
  import { memo as memo2 } from "react";
6302
- import { AlertTriangleIcon, InfoIcon, Loader2Icon, PlugZapIcon, RefreshCwIcon, XIcon as XIcon2 } from "lucide-react";
6303
- import { Button as Button8 } from "@hachej/boring-ui-kit";
6256
+ import { AlertTriangleIcon, InfoIcon, Loader2Icon, PlugZapIcon, RefreshCwIcon, XIcon } from "lucide-react";
6257
+ import { Button as Button7 } from "@hachej/boring-ui-kit";
6304
6258
 
6305
6259
  // src/front/chat/components/terminalChatErrors.ts
6306
6260
  var TERMINAL_CHAT_ERROR_IDS = /* @__PURE__ */ new Set(["chat-error", "session-navigation-error"]);
@@ -6320,16 +6274,16 @@ function filterCompetingNoiseNotices(notices, historyEmpty) {
6320
6274
  }
6321
6275
 
6322
6276
  // src/front/chat/components/RuntimeNotices.tsx
6323
- import { Fragment as Fragment7, jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
6277
+ import { Fragment as Fragment7, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
6324
6278
  var RuntimeNotices = memo2(({ notices, onDismiss, onAction, renderAction, historyEmpty, className, ...props }) => {
6325
6279
  if (notices.length === 0) return null;
6326
- return /* @__PURE__ */ jsx16(
6280
+ return /* @__PURE__ */ jsx14(
6327
6281
  "div",
6328
6282
  {
6329
6283
  "data-boring-agent-part": "runtime-notices",
6330
6284
  className: cn("flex flex-col gap-2 px-4 py-2", className),
6331
6285
  ...props,
6332
- children: notices.map((notice) => /* @__PURE__ */ jsx16(
6286
+ children: notices.map((notice) => /* @__PURE__ */ jsx14(
6333
6287
  RuntimeNoticeRow,
6334
6288
  {
6335
6289
  notice,
@@ -6350,9 +6304,9 @@ function RuntimeNoticeRow({ notice, onDismiss, onAction, renderAction, historyEm
6350
6304
  const actionLabel = notice.actionLabel ?? defaultActionLabel(kind);
6351
6305
  const hostAction = renderAction?.(notice);
6352
6306
  const isTerminalError = isTerminalChatErrorNotice(notice.id, historyEmpty);
6353
- const explicitAction = actionLabel && onAction ? /* @__PURE__ */ jsx16(Button8, { type: "button", variant: "ghost", size: "sm", onClick: () => onAction(notice.id), children: actionLabel }) : null;
6354
- const primaryAction = hostAction ?? explicitAction ?? (isTerminalError ? /* @__PURE__ */ jsx16(Button8, { type: "button", variant: "outline", size: "sm", className: "shrink-0", onClick: () => window.location.reload(), children: "Reload workspace" }) : null);
6355
- return /* @__PURE__ */ jsxs14(
6307
+ const explicitAction = actionLabel && onAction ? /* @__PURE__ */ jsx14(Button7, { type: "button", variant: "ghost", size: "sm", onClick: () => onAction(notice.id), children: actionLabel }) : null;
6308
+ const primaryAction = hostAction ?? explicitAction ?? (isTerminalError ? /* @__PURE__ */ jsx14(Button7, { type: "button", variant: "outline", size: "sm", className: "shrink-0", onClick: () => window.location.reload(), children: "Reload workspace" }) : null);
6309
+ return /* @__PURE__ */ jsxs13(
6356
6310
  "div",
6357
6311
  {
6358
6312
  role: notice.level === "error" ? "alert" : "status",
@@ -6366,18 +6320,18 @@ function RuntimeNoticeRow({ notice, onDismiss, onAction, renderAction, historyEm
6366
6320
  "flex items-start gap-2.5 motion-reduce:transition-none"
6367
6321
  ),
6368
6322
  children: [
6369
- /* @__PURE__ */ jsx16(Icon, { className: cn(noticeIconClass(notice.level), kind === "retry" && "animate-spin motion-reduce:animate-none"), "aria-hidden": "true" }),
6370
- /* @__PURE__ */ jsx16("div", { className: "min-w-0 flex-1", children: isTerminalError ? /* @__PURE__ */ jsxs14(Fragment7, { children: [
6371
- /* @__PURE__ */ jsx16("p", { className: "text-sm font-semibold text-foreground", children: "Chat history unavailable" }),
6372
- /* @__PURE__ */ jsx16("p", { className: noticeTextClass("mt-0.5"), children: "The saved conversation could not be loaded. Reload the workspace to try again." }),
6373
- /* @__PURE__ */ jsxs14("details", { className: "mt-2 text-xs text-muted-foreground", children: [
6374
- /* @__PURE__ */ jsx16("summary", { className: "cursor-pointer select-none", children: "Error details" }),
6375
- /* @__PURE__ */ jsx16("p", { className: "mt-1 break-words", children: notice.text })
6323
+ /* @__PURE__ */ jsx14(Icon, { className: cn(noticeIconClass(notice.level), kind === "retry" && "animate-spin motion-reduce:animate-none"), "aria-hidden": "true" }),
6324
+ /* @__PURE__ */ jsx14("div", { className: "min-w-0 flex-1", children: isTerminalError ? /* @__PURE__ */ jsxs13(Fragment7, { children: [
6325
+ /* @__PURE__ */ jsx14("p", { className: "text-sm font-semibold text-foreground", children: "Chat history unavailable" }),
6326
+ /* @__PURE__ */ jsx14("p", { className: noticeTextClass("mt-0.5"), children: "The saved conversation could not be loaded. Reload the workspace to try again." }),
6327
+ /* @__PURE__ */ jsxs13("details", { className: "mt-2 text-xs text-muted-foreground", children: [
6328
+ /* @__PURE__ */ jsx14("summary", { className: "cursor-pointer select-none", children: "Error details" }),
6329
+ /* @__PURE__ */ jsx14("p", { className: "mt-1 break-words", children: notice.text })
6376
6330
  ] })
6377
- ] }) : /* @__PURE__ */ jsx16("p", { className: noticeTextClass(), children: notice.text }) }),
6331
+ ] }) : /* @__PURE__ */ jsx14("p", { className: noticeTextClass(), children: notice.text }) }),
6378
6332
  primaryAction,
6379
- notice.dismissible && onDismiss ? /* @__PURE__ */ jsx16(
6380
- Button8,
6333
+ notice.dismissible && onDismiss ? /* @__PURE__ */ jsx14(
6334
+ Button7,
6381
6335
  {
6382
6336
  type: "button",
6383
6337
  variant: "ghost",
@@ -6385,7 +6339,7 @@ function RuntimeNoticeRow({ notice, onDismiss, onAction, renderAction, historyEm
6385
6339
  "aria-label": "Dismiss notice",
6386
6340
  onClick: () => onDismiss(notice.id),
6387
6341
  className: "-mr-1 -mt-1 shrink-0 text-muted-foreground/70 hover:bg-muted hover:text-foreground",
6388
- children: /* @__PURE__ */ jsx16(XIcon2, { className: "size-3" })
6342
+ children: /* @__PURE__ */ jsx14(XIcon, { className: "size-3" })
6389
6343
  }
6390
6344
  ) : null
6391
6345
  ]
@@ -6414,7 +6368,7 @@ function defaultActionLabel(kind) {
6414
6368
  }
6415
6369
 
6416
6370
  // src/front/chat/components/ChatNotices.tsx
6417
- import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
6371
+ import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
6418
6372
  function RuntimeNoticeMessages({
6419
6373
  notices,
6420
6374
  onDismiss,
@@ -6425,7 +6379,7 @@ function RuntimeNoticeMessages({
6425
6379
  (notice) => notice.level === "error" || notice.level === "warning" || notice.id === "connection-reconnecting" || notice.id === "auto-retry" || notice.id === "large-state-warning" || notice.id.startsWith("command:") || notice.id.startsWith("composer-warning:")
6426
6380
  );
6427
6381
  if (visible.length === 0) return null;
6428
- return /* @__PURE__ */ jsx17(
6382
+ return /* @__PURE__ */ jsx15(
6429
6383
  RuntimeNotices,
6430
6384
  {
6431
6385
  notices: visible,
@@ -6438,42 +6392,42 @@ function RuntimeNoticeMessages({
6438
6392
  }
6439
6393
  function ComposerRuntimeNotice({ notice }) {
6440
6394
  const level = notice.code === ErrorCode.enum.AGENT_RUNTIME_NOT_READY ? "info" : "error";
6441
- return /* @__PURE__ */ jsx17(
6395
+ return /* @__PURE__ */ jsx15(
6442
6396
  "div",
6443
6397
  {
6444
6398
  "data-testid": "chat-composer-runtime-notice",
6445
6399
  role: "status",
6446
6400
  "aria-live": "polite",
6447
6401
  className: noticeSurfaceClass(level, "mx-auto mb-2 w-full max-w-3xl text-xs"),
6448
- children: /* @__PURE__ */ jsxs15("div", { className: "flex items-start gap-2", children: [
6449
- notice.code === ErrorCode.enum.AGENT_RUNTIME_NOT_READY ? /* @__PURE__ */ jsx17(Loader2, { "aria-hidden": "true", className: "mt-0.5 size-3.5 shrink-0 animate-spin text-muted-foreground" }) : /* @__PURE__ */ jsx17(AlertCircleIcon, { "aria-hidden": "true", className: "mt-0.5 size-3.5 shrink-0 text-destructive" }),
6450
- /* @__PURE__ */ jsxs15("div", { className: "min-w-0", children: [
6451
- /* @__PURE__ */ jsx17("div", { className: "font-medium", children: notice.title }),
6452
- notice.detail ? /* @__PURE__ */ jsx17(NoticeText, { className: "mt-0.5 text-muted-foreground", children: notice.detail }) : null
6402
+ children: /* @__PURE__ */ jsxs14("div", { className: "flex items-start gap-2", children: [
6403
+ notice.code === ErrorCode.enum.AGENT_RUNTIME_NOT_READY ? /* @__PURE__ */ jsx15(Loader2, { "aria-hidden": "true", className: "mt-0.5 size-3.5 shrink-0 animate-spin text-muted-foreground" }) : /* @__PURE__ */ jsx15(AlertCircleIcon, { "aria-hidden": "true", className: "mt-0.5 size-3.5 shrink-0 text-destructive" }),
6404
+ /* @__PURE__ */ jsxs14("div", { className: "min-w-0", children: [
6405
+ /* @__PURE__ */ jsx15("div", { className: "font-medium", children: notice.title }),
6406
+ notice.detail ? /* @__PURE__ */ jsx15(NoticeText, { className: "mt-0.5 text-muted-foreground", children: notice.detail }) : null
6453
6407
  ] })
6454
6408
  ] })
6455
6409
  }
6456
6410
  );
6457
6411
  }
6458
6412
  function NoticeText({ className, children }) {
6459
- return /* @__PURE__ */ jsx17("div", { className: noticeTextClass(className), children });
6413
+ return /* @__PURE__ */ jsx15("div", { className: noticeTextClass(className), children });
6460
6414
  }
6461
6415
  function ComposerBlockerNotice({
6462
6416
  blocker,
6463
6417
  label,
6464
6418
  onAction
6465
6419
  }) {
6466
- return /* @__PURE__ */ jsxs15(
6420
+ return /* @__PURE__ */ jsxs14(
6467
6421
  "div",
6468
6422
  {
6469
6423
  role: "status",
6470
6424
  "aria-live": "polite",
6471
6425
  className: noticeSurfaceClass("info", "relative z-20 mx-auto mb-2 w-full max-w-3xl text-xs"),
6472
6426
  children: [
6473
- /* @__PURE__ */ jsx17("span", { children: label }),
6427
+ /* @__PURE__ */ jsx15("span", { children: label }),
6474
6428
  blocker?.actions?.map((action) => {
6475
6429
  const icon = composerBlockerActionIcon(action.id);
6476
- return icon ? /* @__PURE__ */ jsx17(
6430
+ return icon ? /* @__PURE__ */ jsx15(
6477
6431
  IconButton2,
6478
6432
  {
6479
6433
  type: "button",
@@ -6486,7 +6440,7 @@ function ComposerBlockerNotice({
6486
6440
  children: icon
6487
6441
  },
6488
6442
  action.id
6489
- ) : /* @__PURE__ */ jsx17(
6443
+ ) : /* @__PURE__ */ jsx15(
6490
6444
  "button",
6491
6445
  {
6492
6446
  type: "button",
@@ -6502,12 +6456,12 @@ function ComposerBlockerNotice({
6502
6456
  );
6503
6457
  }
6504
6458
  function composerBlockerActionIcon(actionId) {
6505
- if (actionId === "open") return /* @__PURE__ */ jsx17(ExternalLinkIcon2, { className: "size-3.5", "aria-hidden": "true" });
6506
- if (actionId === "cancel") return /* @__PURE__ */ jsx17(XIcon3, { className: "size-3.5", "aria-hidden": "true" });
6459
+ if (actionId === "open") return /* @__PURE__ */ jsx15(ExternalLinkIcon2, { className: "size-3.5", "aria-hidden": "true" });
6460
+ if (actionId === "cancel") return /* @__PURE__ */ jsx15(XIcon2, { className: "size-3.5", "aria-hidden": "true" });
6507
6461
  return null;
6508
6462
  }
6509
6463
  function QueuedComposerNotice({ followUps, onEdit }) {
6510
- return /* @__PURE__ */ jsxs15(
6464
+ return /* @__PURE__ */ jsxs14(
6511
6465
  "div",
6512
6466
  {
6513
6467
  "data-boring-agent-part": "composer-queue-preview",
@@ -6516,15 +6470,15 @@ function QueuedComposerNotice({ followUps, onEdit }) {
6516
6470
  "border border-dashed border-[color:var(--border)] bg-[color:oklch(from_var(--muted)_l_c_h/0.45)] px-3 py-2 text-xs text-[color:var(--foreground)]"
6517
6471
  ),
6518
6472
  children: [
6519
- /* @__PURE__ */ jsxs15("div", { className: "min-w-0 text-[color:var(--muted-foreground)]", children: [
6520
- /* @__PURE__ */ jsxs15("div", { className: "font-medium text-[color:var(--foreground)]", children: [
6473
+ /* @__PURE__ */ jsxs14("div", { className: "min-w-0 text-[color:var(--muted-foreground)]", children: [
6474
+ /* @__PURE__ */ jsxs14("div", { className: "font-medium text-[color:var(--foreground)]", children: [
6521
6475
  followUps.length,
6522
6476
  " queued follow-up",
6523
6477
  followUps.length === 1 ? "" : "s"
6524
6478
  ] }),
6525
- /* @__PURE__ */ jsx17("div", { className: "truncate text-[color:var(--muted-foreground)]", "data-boring-agent-part": "composer-queue-preview-text", children: followUps.map((followUp) => followUp.displayText).join(" - ") })
6479
+ /* @__PURE__ */ jsx15("div", { className: "truncate text-[color:var(--muted-foreground)]", "data-boring-agent-part": "composer-queue-preview-text", children: followUps.map((followUp) => followUp.displayText).join(" - ") })
6526
6480
  ] }),
6527
- /* @__PURE__ */ jsx17(
6481
+ /* @__PURE__ */ jsx15(
6528
6482
  IconButton2,
6529
6483
  {
6530
6484
  type: "button",
@@ -6534,7 +6488,7 @@ function QueuedComposerNotice({ followUps, onEdit }) {
6534
6488
  className: "shrink-0 text-[color:var(--muted-foreground)] hover:bg-[color:var(--muted)] hover:text-[color:var(--foreground)]",
6535
6489
  "aria-label": "Edit queued follow-ups",
6536
6490
  title: "Edit queued follow-ups",
6537
- children: /* @__PURE__ */ jsx17(ListRestartIcon, { className: "size-3.5", "aria-hidden": "true" })
6491
+ children: /* @__PURE__ */ jsx15(ListRestartIcon, { className: "size-3.5", "aria-hidden": "true" })
6538
6492
  }
6539
6493
  )
6540
6494
  ]
@@ -6545,10 +6499,10 @@ function QueuedComposerNotice({ followUps, onEdit }) {
6545
6499
  // src/front/chat/components/PiTimelineMessage.tsx
6546
6500
  import { useCallback as useCallback13, useEffect as useEffect13, useMemo as useMemo12, useRef as useRef10, useState as useState14 } from "react";
6547
6501
  import { CheckIcon as CheckIcon2, CopyIcon as CopyIcon3 } from "lucide-react";
6548
- import { Button as Button11 } from "@hachej/boring-ui-kit";
6502
+ import { Button as Button10 } from "@hachej/boring-ui-kit";
6549
6503
 
6550
6504
  // src/front/primitives/attachments.tsx
6551
- import { Button as Button9, HoverCard, HoverCardContent, HoverCardTrigger } from "@hachej/boring-ui-kit";
6505
+ import { Button as Button8, HoverCard, HoverCardContent, HoverCardTrigger } from "@hachej/boring-ui-kit";
6552
6506
  import {
6553
6507
  FileTextIcon as FileTextIcon2,
6554
6508
  GlobeIcon,
@@ -6556,10 +6510,10 @@ import {
6556
6510
  Music2Icon,
6557
6511
  PaperclipIcon,
6558
6512
  VideoIcon,
6559
- XIcon as XIcon4
6513
+ XIcon as XIcon3
6560
6514
  } from "lucide-react";
6561
- import { createContext as createContext4, useCallback as useCallback9, useContext as useContext4, useMemo as useMemo6 } from "react";
6562
- import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
6515
+ import { createContext as createContext3, useCallback as useCallback9, useContext as useContext3, useMemo as useMemo6 } from "react";
6516
+ import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
6563
6517
  var mediaCategoryIcons = {
6564
6518
  audio: Music2Icon,
6565
6519
  document: FileTextIcon2,
@@ -6594,7 +6548,7 @@ var getAttachmentLabel = (data) => {
6594
6548
  const category = getMediaCategory(data);
6595
6549
  return data.filename || (category === "image" ? "Image" : "Attachment");
6596
6550
  };
6597
- var renderAttachmentImage = (url, filename, isGrid) => isGrid ? /* @__PURE__ */ jsx18(
6551
+ var renderAttachmentImage = (url, filename, isGrid) => isGrid ? /* @__PURE__ */ jsx16(
6598
6552
  "img",
6599
6553
  {
6600
6554
  alt: filename || "Image",
@@ -6603,7 +6557,7 @@ var renderAttachmentImage = (url, filename, isGrid) => isGrid ? /* @__PURE__ */
6603
6557
  src: url,
6604
6558
  width: 96
6605
6559
  }
6606
- ) : /* @__PURE__ */ jsx18(
6560
+ ) : /* @__PURE__ */ jsx16(
6607
6561
  "img",
6608
6562
  {
6609
6563
  alt: filename || "Image",
@@ -6613,11 +6567,11 @@ var renderAttachmentImage = (url, filename, isGrid) => isGrid ? /* @__PURE__ */
6613
6567
  width: 20
6614
6568
  }
6615
6569
  );
6616
- var AttachmentsContext = createContext4(null);
6617
- var AttachmentContext = createContext4(null);
6618
- var useAttachmentsContext = () => useContext4(AttachmentsContext) ?? { variant: "grid" };
6570
+ var AttachmentsContext = createContext3(null);
6571
+ var AttachmentContext = createContext3(null);
6572
+ var useAttachmentsContext = () => useContext3(AttachmentsContext) ?? { variant: "grid" };
6619
6573
  var useAttachmentContext = () => {
6620
- const ctx = useContext4(AttachmentContext);
6574
+ const ctx = useContext3(AttachmentContext);
6621
6575
  if (!ctx) {
6622
6576
  throw new Error("Attachment components must be used within <Attachment>");
6623
6577
  }
@@ -6630,7 +6584,7 @@ var Attachments = ({
6630
6584
  ...props
6631
6585
  }) => {
6632
6586
  const contextValue = useMemo6(() => ({ variant }), [variant]);
6633
- return /* @__PURE__ */ jsx18(AttachmentsContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx18(
6587
+ return /* @__PURE__ */ jsx16(AttachmentsContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx16(
6634
6588
  "div",
6635
6589
  {
6636
6590
  className: cn(
@@ -6657,7 +6611,7 @@ var Attachment = ({
6657
6611
  () => ({ data, mediaCategory, onRemove, variant }),
6658
6612
  [data, mediaCategory, onRemove, variant]
6659
6613
  );
6660
- return /* @__PURE__ */ jsx18(AttachmentContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx18(
6614
+ return /* @__PURE__ */ jsx16(AttachmentContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx16(
6661
6615
  "div",
6662
6616
  {
6663
6617
  className: cn(
@@ -6687,18 +6641,18 @@ var AttachmentPreview = ({
6687
6641
  }) => {
6688
6642
  const { data, mediaCategory, variant } = useAttachmentContext();
6689
6643
  const iconSize = variant === "inline" ? "size-3" : "size-4";
6690
- const renderIcon = (Icon) => /* @__PURE__ */ jsx18(Icon, { className: cn(iconSize, "text-muted-foreground") });
6644
+ const renderIcon = (Icon) => /* @__PURE__ */ jsx16(Icon, { className: cn(iconSize, "text-muted-foreground") });
6691
6645
  const renderContent = () => {
6692
6646
  if (mediaCategory === "image" && data.type === "file" && data.url) {
6693
6647
  return renderAttachmentImage(data.url, data.filename, variant === "grid");
6694
6648
  }
6695
6649
  if (mediaCategory === "video" && data.type === "file" && data.url) {
6696
- return /* @__PURE__ */ jsx18("video", { className: "size-full object-cover", muted: true, src: data.url });
6650
+ return /* @__PURE__ */ jsx16("video", { className: "size-full object-cover", muted: true, src: data.url });
6697
6651
  }
6698
6652
  const Icon = mediaCategoryIcons[mediaCategory];
6699
6653
  return fallbackIcon ?? renderIcon(Icon);
6700
6654
  };
6701
- return /* @__PURE__ */ jsx18(
6655
+ return /* @__PURE__ */ jsx16(
6702
6656
  "div",
6703
6657
  {
6704
6658
  className: cn(
@@ -6723,9 +6677,9 @@ var AttachmentInfo = ({
6723
6677
  if (variant === "grid") {
6724
6678
  return null;
6725
6679
  }
6726
- return /* @__PURE__ */ jsxs16("div", { className: cn("min-w-0 flex-1", className), ...props, children: [
6727
- /* @__PURE__ */ jsx18("span", { className: "block truncate", children: label }),
6728
- showMediaType && data.mediaType && /* @__PURE__ */ jsx18("span", { className: "block truncate text-muted-foreground text-xs", children: data.mediaType })
6680
+ return /* @__PURE__ */ jsxs15("div", { className: cn("min-w-0 flex-1", className), ...props, children: [
6681
+ /* @__PURE__ */ jsx16("span", { className: "block truncate", children: label }),
6682
+ showMediaType && data.mediaType && /* @__PURE__ */ jsx16("span", { className: "block truncate text-muted-foreground text-xs", children: data.mediaType })
6729
6683
  ] });
6730
6684
  };
6731
6685
  var AttachmentRemove = ({
@@ -6745,8 +6699,8 @@ var AttachmentRemove = ({
6745
6699
  if (!onRemove) {
6746
6700
  return null;
6747
6701
  }
6748
- return /* @__PURE__ */ jsxs16(
6749
- Button9,
6702
+ return /* @__PURE__ */ jsxs15(
6703
+ Button8,
6750
6704
  {
6751
6705
  "aria-label": label,
6752
6706
  className: cn(
@@ -6770,20 +6724,20 @@ var AttachmentRemove = ({
6770
6724
  variant: "ghost",
6771
6725
  ...props,
6772
6726
  children: [
6773
- children ?? /* @__PURE__ */ jsx18(XIcon4, {}),
6774
- /* @__PURE__ */ jsx18("span", { className: "sr-only", children: label })
6727
+ children ?? /* @__PURE__ */ jsx16(XIcon3, {}),
6728
+ /* @__PURE__ */ jsx16("span", { className: "sr-only", children: label })
6775
6729
  ]
6776
6730
  }
6777
6731
  );
6778
6732
  };
6779
6733
 
6780
6734
  // src/front/primitives/message.tsx
6781
- import { Button as Button10, ButtonGroup, ButtonGroupText } from "@hachej/boring-ui-kit";
6735
+ import { Button as Button9, ButtonGroup, ButtonGroupText } from "@hachej/boring-ui-kit";
6782
6736
  import {
6783
- Tooltip as Tooltip2,
6784
- TooltipContent as TooltipContent2,
6785
- TooltipProvider as TooltipProvider2,
6786
- TooltipTrigger as TooltipTrigger2
6737
+ Tooltip,
6738
+ TooltipContent,
6739
+ TooltipProvider,
6740
+ TooltipTrigger
6787
6741
  } from "@hachej/boring-ui-kit";
6788
6742
 
6789
6743
  // src/front/primitives/markdownStyles.ts
@@ -6796,17 +6750,17 @@ import { math } from "@streamdown/math";
6796
6750
  import { mermaid } from "@streamdown/mermaid";
6797
6751
  import { ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon } from "lucide-react";
6798
6752
  import {
6799
- createContext as createContext5,
6753
+ createContext as createContext4,
6800
6754
  memo as memo3,
6801
6755
  useCallback as useCallback10,
6802
- useContext as useContext5,
6756
+ useContext as useContext4,
6803
6757
  useEffect as useEffect10,
6804
6758
  useMemo as useMemo7,
6805
6759
  useState as useState11
6806
6760
  } from "react";
6807
6761
  import { Streamdown } from "streamdown";
6808
- import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
6809
- var Message = ({ className, from, ...props }) => /* @__PURE__ */ jsx19(
6762
+ import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
6763
+ var Message = ({ className, from, ...props }) => /* @__PURE__ */ jsx17(
6810
6764
  "div",
6811
6765
  {
6812
6766
  "data-boring-agent-message-role": from,
@@ -6822,7 +6776,7 @@ var MessageContent = ({
6822
6776
  children,
6823
6777
  className,
6824
6778
  ...props
6825
- }) => /* @__PURE__ */ jsx19(
6779
+ }) => /* @__PURE__ */ jsx17(
6826
6780
  "div",
6827
6781
  {
6828
6782
  className: cn(
@@ -6839,7 +6793,7 @@ var MessageActions = ({
6839
6793
  className,
6840
6794
  children,
6841
6795
  ...props
6842
- }) => /* @__PURE__ */ jsx19("div", { className: cn("flex items-center gap-1", className), ...props, children });
6796
+ }) => /* @__PURE__ */ jsx17("div", { className: cn("flex items-center gap-1", className), ...props, children });
6843
6797
  var MessageAction = ({
6844
6798
  tooltip,
6845
6799
  children,
@@ -6848,19 +6802,19 @@ var MessageAction = ({
6848
6802
  size = "icon-sm",
6849
6803
  ...props
6850
6804
  }) => {
6851
- const button = /* @__PURE__ */ jsxs17(Button10, { size, type: "button", variant, ...props, children: [
6805
+ const button = /* @__PURE__ */ jsxs16(Button9, { size, type: "button", variant, ...props, children: [
6852
6806
  children,
6853
- /* @__PURE__ */ jsx19("span", { className: "sr-only", children: label || tooltip })
6807
+ /* @__PURE__ */ jsx17("span", { className: "sr-only", children: label || tooltip })
6854
6808
  ] });
6855
6809
  if (tooltip) {
6856
- return /* @__PURE__ */ jsx19(TooltipProvider2, { children: /* @__PURE__ */ jsxs17(Tooltip2, { children: [
6857
- /* @__PURE__ */ jsx19(TooltipTrigger2, { asChild: true, children: button }),
6858
- /* @__PURE__ */ jsx19(TooltipContent2, { children: /* @__PURE__ */ jsx19("p", { children: tooltip }) })
6810
+ return /* @__PURE__ */ jsx17(TooltipProvider, { children: /* @__PURE__ */ jsxs16(Tooltip, { children: [
6811
+ /* @__PURE__ */ jsx17(TooltipTrigger, { asChild: true, children: button }),
6812
+ /* @__PURE__ */ jsx17(TooltipContent, { children: /* @__PURE__ */ jsx17("p", { children: tooltip }) })
6859
6813
  ] }) });
6860
6814
  }
6861
6815
  return button;
6862
6816
  };
6863
- var MessageBranchContext = createContext5(
6817
+ var MessageBranchContext = createContext4(
6864
6818
  null
6865
6819
  );
6866
6820
  var streamdownPlugins = { cjk, code, math, mermaid };
@@ -6896,9 +6850,9 @@ function extractCodeBlockText(children) {
6896
6850
  var MarkdownPre = ({ children, filename }) => {
6897
6851
  const code3 = extractCodeBlockText(children).replace(/\n$/, "");
6898
6852
  const language = extractCodeBlockLanguage(children);
6899
- return /* @__PURE__ */ jsx19(CodeBlock2, { code: code3, language: language ?? "text", className: "my-3", children: /* @__PURE__ */ jsxs17(CodeBlockHeader, { children: [
6900
- /* @__PURE__ */ jsx19(CodeBlockTitle, { children: /* @__PURE__ */ jsx19(CodeBlockFilename, { children: filename ?? language ?? "text" }) }),
6901
- /* @__PURE__ */ jsx19(CodeBlockCopyButton, {})
6853
+ return /* @__PURE__ */ jsx17(CodeBlock2, { code: code3, language: language ?? "text", className: "my-3", children: /* @__PURE__ */ jsxs16(CodeBlockHeader, { children: [
6854
+ /* @__PURE__ */ jsx17(CodeBlockTitle, { children: /* @__PURE__ */ jsx17(CodeBlockFilename, { children: filename ?? language ?? "text" }) }),
6855
+ /* @__PURE__ */ jsx17(CodeBlockCopyButton, {})
6902
6856
  ] }) });
6903
6857
  };
6904
6858
  var MarkdownCode = ({
@@ -6908,9 +6862,9 @@ var MarkdownCode = ({
6908
6862
  ...props
6909
6863
  }) => {
6910
6864
  if (inline === false) {
6911
- return /* @__PURE__ */ jsx19("code", { className, ...props, children });
6865
+ return /* @__PURE__ */ jsx17("code", { className, ...props, children });
6912
6866
  }
6913
- return /* @__PURE__ */ jsx19(
6867
+ return /* @__PURE__ */ jsx17(
6914
6868
  "code",
6915
6869
  {
6916
6870
  className: cn(
@@ -6927,7 +6881,7 @@ var markdownComponents = {
6927
6881
  code: MarkdownCode
6928
6882
  };
6929
6883
  var MessageResponse = memo3(
6930
- ({ className, shikiTheme, components, codeFilename, ...props }) => /* @__PURE__ */ jsx19(
6884
+ ({ className, shikiTheme, components, codeFilename, ...props }) => /* @__PURE__ */ jsx17(
6931
6885
  Streamdown,
6932
6886
  {
6933
6887
  className: cn(
@@ -6939,7 +6893,7 @@ var MessageResponse = memo3(
6939
6893
  components: {
6940
6894
  ...markdownComponents,
6941
6895
  ...components ?? {},
6942
- ...codeFilename ? { pre: (props2) => /* @__PURE__ */ jsx19(MarkdownPre, { ...props2, filename: codeFilename }) } : {}
6896
+ ...codeFilename ? { pre: (props2) => /* @__PURE__ */ jsx17(MarkdownPre, { ...props2, filename: codeFilename }) } : {}
6943
6897
  },
6944
6898
  ...props
6945
6899
  }
@@ -6961,10 +6915,10 @@ import { math as math2 } from "@streamdown/math";
6961
6915
  import { mermaid as mermaid2 } from "@streamdown/mermaid";
6962
6916
  import { BrainIcon, ChevronDownIcon as ChevronDownIcon3 } from "lucide-react";
6963
6917
  import {
6964
- createContext as createContext6,
6918
+ createContext as createContext5,
6965
6919
  memo as memo5,
6966
6920
  useCallback as useCallback11,
6967
- useContext as useContext6,
6921
+ useContext as useContext5,
6968
6922
  useEffect as useEffect11,
6969
6923
  useMemo as useMemo9,
6970
6924
  useRef as useRef9,
@@ -6975,7 +6929,7 @@ import { Streamdown as Streamdown2 } from "streamdown";
6975
6929
  // src/front/primitives/shimmer.tsx
6976
6930
  import { motion } from "motion/react";
6977
6931
  import { memo as memo4, useMemo as useMemo8 } from "react";
6978
- import { jsx as jsx20 } from "react/jsx-runtime";
6932
+ import { jsx as jsx18 } from "react/jsx-runtime";
6979
6933
  var motionComponentCache = /* @__PURE__ */ new Map();
6980
6934
  var getMotionComponent = (element) => {
6981
6935
  let component = motionComponentCache.get(element);
@@ -6999,7 +6953,7 @@ var ShimmerComponent = ({
6999
6953
  () => (children?.length ?? 0) * spread,
7000
6954
  [children, spread]
7001
6955
  );
7002
- return /* @__PURE__ */ jsx20(
6956
+ return /* @__PURE__ */ jsx18(
7003
6957
  MotionComponent,
7004
6958
  {
7005
6959
  animate: { backgroundPosition: "0% center" },
@@ -7025,10 +6979,10 @@ var ShimmerComponent = ({
7025
6979
  var Shimmer = memo4(ShimmerComponent);
7026
6980
 
7027
6981
  // src/front/primitives/reasoning.tsx
7028
- import { Fragment as Fragment8, jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
7029
- var ReasoningContext = createContext6(null);
6982
+ import { Fragment as Fragment8, jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
6983
+ var ReasoningContext = createContext5(null);
7030
6984
  var useReasoning = () => {
7031
- const context = useContext6(ReasoningContext);
6985
+ const context = useContext5(ReasoningContext);
7032
6986
  if (!context) {
7033
6987
  throw new Error("Reasoning components must be used within Reasoning");
7034
6988
  }
@@ -7097,7 +7051,7 @@ var Reasoning = memo5(
7097
7051
  () => ({ duration, isOpen, isStreaming, setIsOpen }),
7098
7052
  [duration, isOpen, isStreaming, setIsOpen]
7099
7053
  );
7100
- return /* @__PURE__ */ jsx21(ReasoningContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx21(
7054
+ return /* @__PURE__ */ jsx19(ReasoningContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx19(
7101
7055
  Collapsible2,
7102
7056
  {
7103
7057
  className: cn("not-prose mb-2", className),
@@ -7111,12 +7065,12 @@ var Reasoning = memo5(
7111
7065
  );
7112
7066
  var defaultGetThinkingMessage = (isStreaming, duration) => {
7113
7067
  if (isStreaming || duration === 0) {
7114
- return /* @__PURE__ */ jsx21(Shimmer, { duration: 1, children: "thinking" });
7068
+ return /* @__PURE__ */ jsx19(Shimmer, { duration: 1, children: "thinking" });
7115
7069
  }
7116
7070
  if (duration === void 0) {
7117
- return /* @__PURE__ */ jsx21("span", { children: "thoughts" });
7071
+ return /* @__PURE__ */ jsx19("span", { children: "thoughts" });
7118
7072
  }
7119
- return /* @__PURE__ */ jsxs18("span", { children: [
7073
+ return /* @__PURE__ */ jsxs17("span", { children: [
7120
7074
  "thoughts \xB7 ",
7121
7075
  duration,
7122
7076
  "s"
@@ -7130,7 +7084,7 @@ var ReasoningTrigger = memo5(
7130
7084
  ...props
7131
7085
  }) => {
7132
7086
  const { isStreaming, isOpen, duration } = useReasoning();
7133
- return /* @__PURE__ */ jsx21(
7087
+ return /* @__PURE__ */ jsx19(
7134
7088
  CollapsibleTrigger3,
7135
7089
  {
7136
7090
  className: cn(
@@ -7138,10 +7092,10 @@ var ReasoningTrigger = memo5(
7138
7092
  className
7139
7093
  ),
7140
7094
  ...props,
7141
- children: children ?? /* @__PURE__ */ jsxs18(Fragment8, { children: [
7142
- /* @__PURE__ */ jsx21(BrainIcon, { className: "size-3" }),
7095
+ children: children ?? /* @__PURE__ */ jsxs17(Fragment8, { children: [
7096
+ /* @__PURE__ */ jsx19(BrainIcon, { className: "size-3" }),
7143
7097
  getThinkingMessage(isStreaming, duration),
7144
- /* @__PURE__ */ jsx21(
7098
+ /* @__PURE__ */ jsx19(
7145
7099
  ChevronDownIcon3,
7146
7100
  {
7147
7101
  className: cn(
@@ -7157,7 +7111,7 @@ var ReasoningTrigger = memo5(
7157
7111
  );
7158
7112
  var streamdownPlugins2 = { cjk: cjk2, code: code2, math: math2, mermaid: mermaid2 };
7159
7113
  var ReasoningContent = memo5(
7160
- ({ className, children, ...props }) => /* @__PURE__ */ jsx21(
7114
+ ({ className, children, ...props }) => /* @__PURE__ */ jsx19(
7161
7115
  CollapsibleContent2,
7162
7116
  {
7163
7117
  className: cn(
@@ -7166,7 +7120,7 @@ var ReasoningContent = memo5(
7166
7120
  className
7167
7121
  ),
7168
7122
  ...props,
7169
- children: /* @__PURE__ */ jsx21(Streamdown2, { plugins: streamdownPlugins2, children })
7123
+ children: /* @__PURE__ */ jsx19(Streamdown2, { plugins: streamdownPlugins2, children })
7170
7124
  }
7171
7125
  )
7172
7126
  );
@@ -7215,7 +7169,7 @@ var TOOL_GROUP_VISUAL_PRESENTATION = {
7215
7169
  };
7216
7170
 
7217
7171
  // src/front/primitives/tool-call-group.tsx
7218
- import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
7172
+ import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
7219
7173
  function isInputRunningState(state) {
7220
7174
  return state === "input-streaming" || state === "input-available";
7221
7175
  }
@@ -7304,7 +7258,7 @@ var ToolCallGroup = memo6(({ tools, mergedToolRenderers }) => {
7304
7258
  const { renderer } = resolveToolRendererForPart(part, mergedToolRenderers);
7305
7259
  return renderer.presentation === "inline" ? [key] : [];
7306
7260
  }));
7307
- return /* @__PURE__ */ jsxs19(
7261
+ return /* @__PURE__ */ jsxs18(
7308
7262
  Collapsible3,
7309
7263
  {
7310
7264
  open: isOpen,
@@ -7315,9 +7269,9 @@ var ToolCallGroup = memo6(({ tools, mergedToolRenderers }) => {
7315
7269
  toolParts.map(({ part, key }) => {
7316
7270
  if (!inlineToolKeys.has(key)) return null;
7317
7271
  const { renderer, part: resolvedPart, resolution } = resolveToolRendererForPart(part, mergedToolRenderers);
7318
- return /* @__PURE__ */ jsx22("div", { "data-boring-agent-part": "inline-tool-renderer", "data-tool-call-id": resolvedPart.toolCallId, "data-tool-renderer-key": resolution.key, children: renderer(resolvedPart) }, key);
7272
+ return /* @__PURE__ */ jsx20("div", { "data-boring-agent-part": "inline-tool-renderer", "data-tool-call-id": resolvedPart.toolCallId, "data-tool-renderer-key": resolution.key, children: renderer(resolvedPart) }, key);
7319
7273
  }),
7320
- /* @__PURE__ */ jsxs19(
7274
+ /* @__PURE__ */ jsxs18(
7321
7275
  CollapsibleTrigger4,
7322
7276
  {
7323
7277
  "aria-label": `Tool calls: ${title}`,
@@ -7329,7 +7283,7 @@ var ToolCallGroup = memo6(({ tools, mergedToolRenderers }) => {
7329
7283
  TOOL_GROUP_VISUAL_PRESENTATION[visualState].triggerClassName
7330
7284
  ),
7331
7285
  children: [
7332
- /* @__PURE__ */ jsx22("span", { className: "flex size-4 shrink-0 items-center justify-center", "aria-hidden": "true", children: /* @__PURE__ */ jsx22(
7286
+ /* @__PURE__ */ jsx20("span", { className: "flex size-4 shrink-0 items-center justify-center", "aria-hidden": "true", children: /* @__PURE__ */ jsx20(
7333
7287
  "span",
7334
7288
  {
7335
7289
  "data-boring-agent-part": "tool-group-state-dot",
@@ -7339,10 +7293,10 @@ var ToolCallGroup = memo6(({ tools, mergedToolRenderers }) => {
7339
7293
  )
7340
7294
  }
7341
7295
  ) }),
7342
- /* @__PURE__ */ jsx22("span", { "data-boring-agent-part": "tool-group-title", children: workspaceNotReady ? workspaceNotReady.message : title }),
7343
- elapsedLabel ? /* @__PURE__ */ jsx22("span", { className: "ml-1 shrink-0 tabular-nums text-[12px] text-muted-foreground/70", children: elapsedLabel }) : null,
7344
- /* @__PURE__ */ jsx22("span", { className: "ml-1 shrink-0 tabular-nums text-[12px] text-muted-foreground/70", children: toolParts.length }),
7345
- /* @__PURE__ */ jsx22(
7296
+ /* @__PURE__ */ jsx20("span", { "data-boring-agent-part": "tool-group-title", children: workspaceNotReady ? workspaceNotReady.message : title }),
7297
+ elapsedLabel ? /* @__PURE__ */ jsx20("span", { className: "ml-1 shrink-0 tabular-nums text-[12px] text-muted-foreground/70", children: elapsedLabel }) : null,
7298
+ /* @__PURE__ */ jsx20("span", { className: "ml-1 shrink-0 tabular-nums text-[12px] text-muted-foreground/70", children: toolParts.length }),
7299
+ /* @__PURE__ */ jsx20(
7346
7300
  ChevronDownIcon4,
7347
7301
  {
7348
7302
  className: cn(
@@ -7354,19 +7308,19 @@ var ToolCallGroup = memo6(({ tools, mergedToolRenderers }) => {
7354
7308
  ]
7355
7309
  }
7356
7310
  ),
7357
- /* @__PURE__ */ jsx22(CollapsibleContent3, { className: "overflow-hidden data-[state=closed]:animate-[boring-collapse-close_200ms_ease] data-[state=open]:animate-[boring-collapse-open_200ms_ease]", children: /* @__PURE__ */ jsxs19(
7311
+ /* @__PURE__ */ jsx20(CollapsibleContent3, { className: "overflow-hidden data-[state=closed]:animate-[boring-collapse-close_200ms_ease] data-[state=open]:animate-[boring-collapse-open_200ms_ease]", children: /* @__PURE__ */ jsxs18(
7358
7312
  "div",
7359
7313
  {
7360
7314
  "data-boring-agent-part": "tool-group-details",
7361
7315
  className: "relative mt-1.5 w-full max-w-2xl pl-[18px]",
7362
7316
  children: [
7363
- /* @__PURE__ */ jsx22("div", { className: "absolute left-[5px] top-0 bottom-2 w-px bg-border/35" }),
7364
- /* @__PURE__ */ jsx22("div", { className: "flex min-w-0 flex-col gap-1.5 [&_[data-boring-agent-part=tool-card]]:!my-0", children: toolParts.map(({ part, key }) => {
7317
+ /* @__PURE__ */ jsx20("div", { className: "absolute left-[5px] top-0 bottom-2 w-px bg-border/35" }),
7318
+ /* @__PURE__ */ jsx20("div", { className: "flex min-w-0 flex-col gap-1.5 [&_[data-boring-agent-part=tool-card]]:!my-0", children: toolParts.map(({ part, key }) => {
7365
7319
  const { renderer, part: resolvedPart, resolution } = resolveToolRendererForPart(
7366
7320
  part,
7367
7321
  inlineToolKeys.has(key) ? {} : mergedToolRenderers
7368
7322
  );
7369
- return /* @__PURE__ */ jsx22(
7323
+ return /* @__PURE__ */ jsx20(
7370
7324
  "div",
7371
7325
  {
7372
7326
  className: "min-w-0",
@@ -7388,22 +7342,22 @@ var ToolCallGroup = memo6(({ tools, mergedToolRenderers }) => {
7388
7342
  ToolCallGroup.displayName = "ToolCallGroup";
7389
7343
 
7390
7344
  // src/front/chat/messageContributions.tsx
7391
- import { createContext as createContext7, createElement, useContext as useContext7, useMemo as useMemo11 } from "react";
7392
- import { jsx as jsx23 } from "react/jsx-runtime";
7393
- var ChatMessageContributionContext = createContext7([]);
7345
+ import { createContext as createContext6, createElement, useContext as useContext6, useMemo as useMemo11 } from "react";
7346
+ import { jsx as jsx21 } from "react/jsx-runtime";
7347
+ var ChatMessageContributionContext = createContext6([]);
7394
7348
  function ChatMessageContributionProvider({
7395
7349
  contribution,
7396
7350
  children
7397
7351
  }) {
7398
- const parent = useContext7(ChatMessageContributionContext);
7352
+ const parent = useContext6(ChatMessageContributionContext);
7399
7353
  const contributions = useMemo11(
7400
7354
  () => [contribution, ...parent.filter((entry) => entry.id !== contribution.id)],
7401
7355
  [contribution, parent]
7402
7356
  );
7403
- return /* @__PURE__ */ jsx23(ChatMessageContributionContext.Provider, { value: contributions, children });
7357
+ return /* @__PURE__ */ jsx21(ChatMessageContributionContext.Provider, { value: contributions, children });
7404
7358
  }
7405
7359
  function useCustomChatMessage(message) {
7406
- const contributions = useContext7(ChatMessageContributionContext);
7360
+ const contributions = useContext6(ChatMessageContributionContext);
7407
7361
  const contribution = contributions.find((entry) => entry.matches(message));
7408
7362
  return contribution ? createElement(contribution.Component, { message }) : void 0;
7409
7363
  }
@@ -7417,7 +7371,7 @@ function ChatMessageContributionBoundary({
7417
7371
 
7418
7372
  // src/front/chat/components/MessageMentions.tsx
7419
7373
  import { Children, cloneElement, isValidElement as isValidElement2 } from "react";
7420
- import { Fragment as Fragment9, jsx as jsx24 } from "react/jsx-runtime";
7374
+ import { Fragment as Fragment9, jsx as jsx22 } from "react/jsx-runtime";
7421
7375
  var TERMINAL_BOUNDARY = String.raw`(?=$|\s|[.,;!?)}\]"'”’]+(?=$|\s))`;
7422
7376
  var PREFIX_BOUNDARY = String.raw`(^|[\s(\[{"'“‘])`;
7423
7377
  function escapeRegExp2(value) {
@@ -7526,7 +7480,7 @@ function MessageMentions({
7526
7480
  }).map((segment, segmentIndex) => {
7527
7481
  if (!segment.mention) return segment.text;
7528
7482
  const actionLabel = mentionActionLabel(segment.mention);
7529
- return /* @__PURE__ */ jsx24(
7483
+ return /* @__PURE__ */ jsx22(
7530
7484
  "button",
7531
7485
  {
7532
7486
  type: "button",
@@ -7552,7 +7506,7 @@ function MessageMentions({
7552
7506
  return cloneElement(
7553
7507
  element,
7554
7508
  void 0,
7555
- /* @__PURE__ */ jsx24(
7509
+ /* @__PURE__ */ jsx22(
7556
7510
  MessageMentions,
7557
7511
  {
7558
7512
  catalog,
@@ -7570,19 +7524,19 @@ function MessageMentions({
7570
7524
  return nodes.map(decorate);
7571
7525
  }
7572
7526
  function createMessageMentionMarkdownComponents(catalog, onActivate) {
7573
- const decorate = (children) => /* @__PURE__ */ jsx24(MessageMentions, { catalog, onActivate, children });
7527
+ const decorate = (children) => /* @__PURE__ */ jsx22(MessageMentions, { catalog, onActivate, children });
7574
7528
  const paragraph = ({ node: _node, children, ...props }) => {
7575
7529
  const content = Children.toArray(children).filter((child) => child !== null && child !== "");
7576
7530
  if (content.length === 1 && isValidElement2(content[0])) {
7577
7531
  const child = content[0];
7578
- if (child.props.node?.tagName === "img") return /* @__PURE__ */ jsx24(Fragment9, { children });
7579
- if (child.props.node?.tagName === "code" && "data-block" in child.props) return /* @__PURE__ */ jsx24(Fragment9, { children });
7532
+ if (child.props.node?.tagName === "img") return /* @__PURE__ */ jsx22(Fragment9, { children });
7533
+ if (child.props.node?.tagName === "code" && "data-block" in child.props) return /* @__PURE__ */ jsx22(Fragment9, { children });
7580
7534
  }
7581
- return /* @__PURE__ */ jsx24("p", { ...props, children: decorate(children) });
7535
+ return /* @__PURE__ */ jsx22("p", { ...props, children: decorate(children) });
7582
7536
  };
7583
- const tableHeader = ({ node: _node, children, className, ...props }) => /* @__PURE__ */ jsx24("th", { ...props, "data-streamdown": "table-header-cell", className: cn("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm", className), children: decorate(children) });
7584
- const tableCell = ({ node: _node, children, className, ...props }) => /* @__PURE__ */ jsx24("td", { ...props, "data-streamdown": "table-cell", className: cn("px-4 py-2 text-sm", className), children: decorate(children) });
7585
- const listItem = ({ node: _node, children, className, ...props }) => /* @__PURE__ */ jsx24("li", { ...props, "data-streamdown": "list-item", className: cn("py-1 [&>p]:inline", className), children: decorate(children) });
7537
+ const tableHeader = ({ node: _node, children, className, ...props }) => /* @__PURE__ */ jsx22("th", { ...props, "data-streamdown": "table-header-cell", className: cn("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm", className), children: decorate(children) });
7538
+ const tableCell = ({ node: _node, children, className, ...props }) => /* @__PURE__ */ jsx22("td", { ...props, "data-streamdown": "table-cell", className: cn("px-4 py-2 text-sm", className), children: decorate(children) });
7539
+ const listItem = ({ node: _node, children, className, ...props }) => /* @__PURE__ */ jsx22("li", { ...props, "data-streamdown": "list-item", className: cn("py-1 [&>p]:inline", className), children: decorate(children) });
7586
7540
  const headingClasses = {
7587
7541
  h1: "text-3xl",
7588
7542
  h2: "text-2xl",
@@ -7591,8 +7545,8 @@ function createMessageMentionMarkdownComponents(catalog, onActivate) {
7591
7545
  h5: "text-base",
7592
7546
  h6: "text-sm"
7593
7547
  };
7594
- const heading = (Tag) => ({ node: _node, children, className, ...props }) => /* @__PURE__ */ jsx24(Tag, { ...props, "data-streamdown": `heading-${Tag.slice(1)}`, className: cn("mt-6 mb-2 font-semibold", headingClasses[Tag], className), children: decorate(children) });
7595
- const inlineCode = ({ node: _node, children, className, ...props }) => /* @__PURE__ */ jsx24(
7548
+ const heading = (Tag) => ({ node: _node, children, className, ...props }) => /* @__PURE__ */ jsx22(Tag, { ...props, "data-streamdown": `heading-${Tag.slice(1)}`, className: cn("mt-6 mb-2 font-semibold", headingClasses[Tag], className), children: decorate(children) });
7549
+ const inlineCode = ({ node: _node, children, className, ...props }) => /* @__PURE__ */ jsx22(
7596
7550
  "code",
7597
7551
  {
7598
7552
  ...props,
@@ -7616,7 +7570,7 @@ function createMessageMentionMarkdownComponents(catalog, onActivate) {
7616
7570
  }
7617
7571
 
7618
7572
  // src/front/chat/components/PiTimelineMessage.tsx
7619
- import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
7573
+ import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
7620
7574
  var EMPTY_MENTION_CATALOG = { commands: [], skills: [], files: false };
7621
7575
  var COLLAPSIBLE_TOOL_NAMES = /* @__PURE__ */ new Set([
7622
7576
  "read",
@@ -7632,7 +7586,7 @@ function isCollapsibleTool(part) {
7632
7586
  return part.type === "tool-call" && COLLAPSIBLE_TOOL_NAMES.has(part.toolName);
7633
7587
  }
7634
7588
  function PiTimelineMessage(props) {
7635
- return /* @__PURE__ */ jsx25(ChatMessageContributionBoundary, { message: props.message, children: /* @__PURE__ */ jsx25(DefaultPiTimelineMessage, { ...props }) });
7589
+ return /* @__PURE__ */ jsx23(ChatMessageContributionBoundary, { message: props.message, children: /* @__PURE__ */ jsx23(DefaultPiTimelineMessage, { ...props }) });
7636
7590
  }
7637
7591
  function DefaultPiTimelineMessage({ message, isLast, isStreaming, showThoughts, toolRenderers, mentionCatalog = EMPTY_MENTION_CATALOG, onMentionActivate }) {
7638
7592
  const role = message.role;
@@ -7669,7 +7623,7 @@ function DefaultPiTimelineMessage({ message, isLast, isStreaming, showThoughts,
7669
7623
  [activateCurrentMention, effectiveMentionCatalog, mentionSignature, mentionsEnabled]
7670
7624
  );
7671
7625
  const shouldReserveStreamingActions = messageIsStreaming;
7672
- return /* @__PURE__ */ jsxs20(
7626
+ return /* @__PURE__ */ jsxs19(
7673
7627
  Message,
7674
7628
  {
7675
7629
  from: role,
@@ -7678,8 +7632,8 @@ function DefaultPiTimelineMessage({ message, isLast, isStreaming, showThoughts,
7678
7632
  "data-boring-agent-message-role": role,
7679
7633
  "data-boring-agent-message-status": message.status,
7680
7634
  children: [
7681
- /* @__PURE__ */ jsxs20(MessageContent, { children: [
7682
- fileParts.length > 0 ? /* @__PURE__ */ jsx25(
7635
+ /* @__PURE__ */ jsxs19(MessageContent, { children: [
7636
+ fileParts.length > 0 ? /* @__PURE__ */ jsx23(
7683
7637
  Attachments,
7684
7638
  {
7685
7639
  variant: role === "user" ? "inline" : "list",
@@ -7704,7 +7658,7 @@ function DefaultPiTimelineMessage({ message, isLast, isStreaming, showThoughts,
7704
7658
  event.preventDefault();
7705
7659
  openAttachment();
7706
7660
  };
7707
- return /* @__PURE__ */ jsxs20(
7661
+ return /* @__PURE__ */ jsxs19(
7708
7662
  Attachment,
7709
7663
  {
7710
7664
  data: toAttachmentData(file, `file-${message.id}-${index}`),
@@ -7718,8 +7672,8 @@ function DefaultPiTimelineMessage({ message, isLast, isStreaming, showThoughts,
7718
7672
  onKeyDown: openAttachmentFromKeyboard
7719
7673
  } : void 0,
7720
7674
  children: [
7721
- /* @__PURE__ */ jsx25(AttachmentPreview, { className: role === "user" ? "!size-5 shrink-0 rounded-[var(--radius-sm)]" : "size-10 shrink-0 rounded-[var(--radius-md)]" }),
7722
- /* @__PURE__ */ jsx25(AttachmentInfo, { className: role === "user" ? "min-w-0 max-w-[220px] flex-1 text-[12px]" : "min-w-0 flex-1" })
7675
+ /* @__PURE__ */ jsx23(AttachmentPreview, { className: role === "user" ? "!size-5 shrink-0 rounded-[var(--radius-sm)]" : "size-10 shrink-0 rounded-[var(--radius-md)]" }),
7676
+ /* @__PURE__ */ jsx23(AttachmentInfo, { className: role === "user" ? "min-w-0 max-w-[220px] flex-1 text-[12px]" : "min-w-0 flex-1" })
7723
7677
  ]
7724
7678
  },
7725
7679
  `file-${message.id}-${index}`
@@ -7729,7 +7683,7 @@ function DefaultPiTimelineMessage({ message, isLast, isStreaming, showThoughts,
7729
7683
  ) : null,
7730
7684
  finalParts.map((item, index) => {
7731
7685
  if (item.kind === "reasoning") {
7732
- return /* @__PURE__ */ jsx25(
7686
+ return /* @__PURE__ */ jsx23(
7733
7687
  TimelineReasoningPart,
7734
7688
  {
7735
7689
  item,
@@ -7739,15 +7693,15 @@ function DefaultPiTimelineMessage({ message, isLast, isStreaming, showThoughts,
7739
7693
  );
7740
7694
  }
7741
7695
  if (item.kind === "tool-group") {
7742
- return /* @__PURE__ */ jsx25("div", { "data-boring-agent-part": "message-tools", children: /* @__PURE__ */ jsx25(ToolCallGroup, { tools: item.tools, mergedToolRenderers: toolRenderers }) }, item.key);
7696
+ return /* @__PURE__ */ jsx23("div", { "data-boring-agent-part": "message-tools", children: /* @__PURE__ */ jsx23(ToolCallGroup, { tools: item.tools, mergedToolRenderers: toolRenderers }) }, item.key);
7743
7697
  }
7744
7698
  if (item.kind === "tool-plain") {
7745
- return /* @__PURE__ */ jsx25("div", { "data-boring-agent-part": "message-tools", children: /* @__PURE__ */ jsx25(PlainToolCard, { part: item.part, renderers: toolRenderers }) }, item.key);
7699
+ return /* @__PURE__ */ jsx23("div", { "data-boring-agent-part": "message-tools", children: /* @__PURE__ */ jsx23(PlainToolCard, { part: item.part, renderers: toolRenderers }) }, item.key);
7746
7700
  }
7747
7701
  if (item.part.type === "text") {
7748
7702
  const text = textForMessageDisplay(item.part.text, role);
7749
7703
  if (!text) return null;
7750
- return /* @__PURE__ */ jsx25("div", { "data-boring-agent-part": "message-text", children: /* @__PURE__ */ jsx25(
7704
+ return /* @__PURE__ */ jsx23("div", { "data-boring-agent-part": "message-text", children: /* @__PURE__ */ jsx23(
7751
7705
  MessageResponse,
7752
7706
  {
7753
7707
  components: mentionMarkdownComponents,
@@ -7759,12 +7713,12 @@ function DefaultPiTimelineMessage({ message, isLast, isStreaming, showThoughts,
7759
7713
  ) }, item.key);
7760
7714
  }
7761
7715
  if (item.part.type === "notice") {
7762
- return /* @__PURE__ */ jsx25(NoticeBubble, { level: item.part.level, text: item.part.text }, item.key);
7716
+ return /* @__PURE__ */ jsx23(NoticeBubble, { level: item.part.level, text: item.part.text }, item.key);
7763
7717
  }
7764
7718
  return null;
7765
7719
  })
7766
7720
  ] }),
7767
- isAssistant && (textParts.length > 0 || shouldReserveStreamingActions) ? /* @__PURE__ */ jsx25(
7721
+ isAssistant && (textParts.length > 0 || shouldReserveStreamingActions) ? /* @__PURE__ */ jsx23(
7768
7722
  MessageActionsBar,
7769
7723
  {
7770
7724
  text: textParts.map((part) => part.text).join("\n\n"),
@@ -7789,7 +7743,7 @@ function TimelineReasoningPart({ item, showThoughts }) {
7789
7743
  event.preventDefault();
7790
7744
  setManualOpen((open) => !(open ?? showThoughts));
7791
7745
  }, [showThoughts]);
7792
- return /* @__PURE__ */ jsxs20(
7746
+ return /* @__PURE__ */ jsxs19(
7793
7747
  Reasoning,
7794
7748
  {
7795
7749
  "data-boring-agent-part": "message-reasoning",
@@ -7799,15 +7753,15 @@ function TimelineReasoningPart({ item, showThoughts }) {
7799
7753
  onOpenChange: handleOpenChange,
7800
7754
  autoClose: false,
7801
7755
  children: [
7802
- /* @__PURE__ */ jsx25(
7756
+ /* @__PURE__ */ jsx23(
7803
7757
  ReasoningTrigger,
7804
7758
  {
7805
7759
  className: "mb-1 w-fit rounded-[var(--radius-sm)] px-0 py-0 !text-xs !font-normal !text-muted-foreground/75 hover:bg-transparent hover:!text-muted-foreground/75 [&_svg]:!text-muted-foreground/75",
7806
- getThinkingMessage: () => /* @__PURE__ */ jsx25("span", { children: "Reasoning" }),
7760
+ getThinkingMessage: () => /* @__PURE__ */ jsx23("span", { children: "Reasoning" }),
7807
7761
  onClick: toggleManualOpen
7808
7762
  }
7809
7763
  ),
7810
- /* @__PURE__ */ jsx25(ReasoningContent, { children: item.text })
7764
+ /* @__PURE__ */ jsx23(ReasoningContent, { children: item.text })
7811
7765
  ]
7812
7766
  }
7813
7767
  );
@@ -7816,7 +7770,7 @@ function PlainToolCard({ part, renderers }) {
7816
7770
  const toolPart = toToolPart(part);
7817
7771
  if (!toolPart) return null;
7818
7772
  const { renderer, part: resolved, resolution } = resolveToolRendererForPart(toolPart, renderers);
7819
- return /* @__PURE__ */ jsx25(
7773
+ return /* @__PURE__ */ jsx23(
7820
7774
  "div",
7821
7775
  {
7822
7776
  "data-tool-call-id": resolved.toolCallId,
@@ -7874,13 +7828,13 @@ function codeFilenameForPart(parts, index) {
7874
7828
  return typeof path === "string" && path.trim() ? path : void 0;
7875
7829
  }
7876
7830
  function NoticeBubble({ level, text }) {
7877
- return /* @__PURE__ */ jsx25(
7831
+ return /* @__PURE__ */ jsx23(
7878
7832
  "div",
7879
7833
  {
7880
7834
  "data-boring-agent-part": "message-notice",
7881
7835
  "data-notice-level": level,
7882
7836
  className: noticeSurfaceClass(level, "text-xs"),
7883
- children: /* @__PURE__ */ jsx25("div", { className: noticeTextClass(), children: text })
7837
+ children: /* @__PURE__ */ jsx23("div", { className: noticeTextClass(), children: text })
7884
7838
  }
7885
7839
  );
7886
7840
  }
@@ -7959,7 +7913,7 @@ function MessageActionsBar({
7959
7913
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--accent)]/40"
7960
7914
  );
7961
7915
  const hiddenActionProps = visible ? {} : { tabIndex: -1 };
7962
- return /* @__PURE__ */ jsx25(
7916
+ return /* @__PURE__ */ jsx23(
7963
7917
  "div",
7964
7918
  {
7965
7919
  "aria-hidden": !visible,
@@ -7967,8 +7921,8 @@ function MessageActionsBar({
7967
7921
  "flex min-h-8 items-center gap-1 -mt-1 text-xs text-muted-foreground transition-opacity duration-200",
7968
7922
  visible ? "opacity-100" : "pointer-events-none opacity-0"
7969
7923
  ),
7970
- children: /* @__PURE__ */ jsx25(
7971
- Button11,
7924
+ children: /* @__PURE__ */ jsx23(
7925
+ Button10,
7972
7926
  {
7973
7927
  type: "button",
7974
7928
  variant: "ghost",
@@ -7978,7 +7932,7 @@ function MessageActionsBar({
7978
7932
  "aria-label": copied ? "Copied" : "Copy message",
7979
7933
  title: copied ? "Copied" : "Copy",
7980
7934
  ...hiddenActionProps,
7981
- children: copied ? /* @__PURE__ */ jsx25(CheckIcon2, { className: "h-3.5 w-3.5 text-[color:var(--accent)]" }) : /* @__PURE__ */ jsx25(CopyIcon3, { className: "h-3.5 w-3.5" })
7935
+ children: copied ? /* @__PURE__ */ jsx23(CheckIcon2, { className: "h-3.5 w-3.5 text-[color:var(--accent)]" }) : /* @__PURE__ */ jsx23(CopyIcon3, { className: "h-3.5 w-3.5" })
7982
7936
  }
7983
7937
  )
7984
7938
  }
@@ -7999,7 +7953,7 @@ function partKey(messageId, part, index) {
7999
7953
  }
8000
7954
 
8001
7955
  // src/front/chat/components/PiConversationSurface.tsx
8002
- import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
7956
+ import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
8003
7957
  var TRANSCRIPT_WINDOW = 60;
8004
7958
  var TRANSCRIPT_WINDOW_STEP = 40;
8005
7959
  var LOAD_OLDER_THRESHOLD_PX = 320;
@@ -8037,7 +7991,7 @@ function PiConversationSurface({
8037
7991
  const loadOlder = useCallback14(() => {
8038
7992
  setVisibleCount((count) => count + TRANSCRIPT_WINDOW_STEP);
8039
7993
  }, []);
8040
- return /* @__PURE__ */ jsxs21(
7994
+ return /* @__PURE__ */ jsxs20(
8041
7995
  Conversation,
8042
7996
  {
8043
7997
  className: emptyHero ? cn("flex-none", runtimeNotices.length > 0 ? "max-h-[45vh]" : "max-h-[20vh]") : "flex-1",
@@ -8045,13 +7999,13 @@ function PiConversationSurface({
8045
7999
  "aria-live": "polite",
8046
8000
  onScrollToBottomReady,
8047
8001
  children: [
8048
- /* @__PURE__ */ jsxs21(ConversationContent, { className: cn(
8002
+ /* @__PURE__ */ jsxs20(ConversationContent, { className: cn(
8049
8003
  "mx-auto flex w-full flex-col gap-6",
8050
8004
  chrome ? "max-w-3xl px-6 py-8" : "max-w-[680px] px-4 py-4",
8051
8005
  emptyHero && "py-4 text-center"
8052
8006
  ), children: [
8053
- messages.length === 0 && emptyStateHydrating && !terminalError ? /* @__PURE__ */ jsx26(ConversationHistoryLoadingState, {}) : null,
8054
- messages.length === 0 && !emptyStateHydrating && !terminalError ? /* @__PURE__ */ jsx26(
8007
+ messages.length === 0 && emptyStateHydrating && !terminalError ? /* @__PURE__ */ jsx24(ConversationHistoryLoadingState, {}) : null,
8008
+ messages.length === 0 && !emptyStateHydrating && !terminalError ? /* @__PURE__ */ jsx24(
8055
8009
  ChatEmptyState,
8056
8010
  {
8057
8011
  eyebrow: emptyState?.eyebrow,
@@ -8069,8 +8023,8 @@ function PiConversationSurface({
8069
8023
  }
8070
8024
  }
8071
8025
  ) : null,
8072
- hasOlder ? /* @__PURE__ */ jsx26(TranscriptHistoryLoader, { olderCount, onLoadOlder: loadOlder }) : null,
8073
- visibleItems.map(({ message, key }, index) => /* @__PURE__ */ jsx26(
8026
+ hasOlder ? /* @__PURE__ */ jsx24(TranscriptHistoryLoader, { olderCount, onLoadOlder: loadOlder }) : null,
8027
+ visibleItems.map(({ message, key }, index) => /* @__PURE__ */ jsx24(
8074
8028
  PiTimelineMessage,
8075
8029
  {
8076
8030
  message,
@@ -8083,16 +8037,16 @@ function PiConversationSurface({
8083
8037
  },
8084
8038
  key
8085
8039
  )),
8086
- /* @__PURE__ */ jsx26(RuntimeNoticeMessages, { notices: runtimeNotices, onDismiss: onDismissNotice, renderAction: renderNoticeAction, historyEmpty })
8040
+ /* @__PURE__ */ jsx24(RuntimeNoticeMessages, { notices: runtimeNotices, onDismiss: onDismissNotice, renderAction: renderNoticeAction, historyEmpty })
8087
8041
  ] }),
8088
- /* @__PURE__ */ jsx26(ConversationScrollButton, {})
8042
+ /* @__PURE__ */ jsx24(ConversationScrollButton, {})
8089
8043
  ]
8090
8044
  }
8091
8045
  );
8092
8046
  }
8093
8047
  function ConversationHistoryLoadingState() {
8094
8048
  const skeletonClassName = "motion-reduce:animate-none";
8095
- return /* @__PURE__ */ jsxs21(
8049
+ return /* @__PURE__ */ jsxs20(
8096
8050
  "div",
8097
8051
  {
8098
8052
  role: "status",
@@ -8101,21 +8055,21 @@ function ConversationHistoryLoadingState() {
8101
8055
  "data-boring-agent-part": "chat-history-loading",
8102
8056
  className: "flex flex-col gap-7 py-4",
8103
8057
  children: [
8104
- /* @__PURE__ */ jsxs21("div", { "aria-hidden": "true", className: "flex items-start gap-3", children: [
8105
- /* @__PURE__ */ jsx26(Skeleton, { className: cn("mt-0.5 size-7 shrink-0 rounded-lg", skeletonClassName) }),
8106
- /* @__PURE__ */ jsxs21("div", { className: "flex min-w-0 flex-1 flex-col gap-2.5", children: [
8107
- /* @__PURE__ */ jsx26(Skeleton, { className: cn("h-3 w-24 rounded-sm", skeletonClassName) }),
8108
- /* @__PURE__ */ jsx26(Skeleton, { className: cn("h-3 w-full rounded-sm", skeletonClassName) }),
8109
- /* @__PURE__ */ jsx26(Skeleton, { className: cn("h-3 w-4/5 rounded-sm", skeletonClassName) })
8058
+ /* @__PURE__ */ jsxs20("div", { "aria-hidden": "true", className: "flex items-start gap-3", children: [
8059
+ /* @__PURE__ */ jsx24(Skeleton, { className: cn("mt-0.5 size-7 shrink-0 rounded-lg", skeletonClassName) }),
8060
+ /* @__PURE__ */ jsxs20("div", { className: "flex min-w-0 flex-1 flex-col gap-2.5", children: [
8061
+ /* @__PURE__ */ jsx24(Skeleton, { className: cn("h-3 w-24 rounded-sm", skeletonClassName) }),
8062
+ /* @__PURE__ */ jsx24(Skeleton, { className: cn("h-3 w-full rounded-sm", skeletonClassName) }),
8063
+ /* @__PURE__ */ jsx24(Skeleton, { className: cn("h-3 w-4/5 rounded-sm", skeletonClassName) })
8110
8064
  ] })
8111
8065
  ] }),
8112
- /* @__PURE__ */ jsx26("div", { "aria-hidden": "true", className: "flex justify-end", children: /* @__PURE__ */ jsx26(Skeleton, { className: cn("h-11 w-[min(72%,30rem)] rounded-xl", skeletonClassName) }) }),
8113
- /* @__PURE__ */ jsxs21("div", { "aria-hidden": "true", className: "flex items-start gap-3", children: [
8114
- /* @__PURE__ */ jsx26(Skeleton, { className: cn("mt-0.5 size-7 shrink-0 rounded-lg", skeletonClassName) }),
8115
- /* @__PURE__ */ jsxs21("div", { className: "flex min-w-0 flex-1 flex-col gap-3", children: [
8116
- /* @__PURE__ */ jsx26(Skeleton, { className: cn("h-3 w-20 rounded-sm", skeletonClassName) }),
8117
- /* @__PURE__ */ jsx26(Skeleton, { className: cn("h-20 w-full rounded-lg", skeletonClassName) }),
8118
- /* @__PURE__ */ jsx26(Skeleton, { className: cn("h-3 w-3/5 rounded-sm", skeletonClassName) })
8066
+ /* @__PURE__ */ jsx24("div", { "aria-hidden": "true", className: "flex justify-end", children: /* @__PURE__ */ jsx24(Skeleton, { className: cn("h-11 w-[min(72%,30rem)] rounded-xl", skeletonClassName) }) }),
8067
+ /* @__PURE__ */ jsxs20("div", { "aria-hidden": "true", className: "flex items-start gap-3", children: [
8068
+ /* @__PURE__ */ jsx24(Skeleton, { className: cn("mt-0.5 size-7 shrink-0 rounded-lg", skeletonClassName) }),
8069
+ /* @__PURE__ */ jsxs20("div", { className: "flex min-w-0 flex-1 flex-col gap-3", children: [
8070
+ /* @__PURE__ */ jsx24(Skeleton, { className: cn("h-3 w-20 rounded-sm", skeletonClassName) }),
8071
+ /* @__PURE__ */ jsx24(Skeleton, { className: cn("h-20 w-full rounded-lg", skeletonClassName) }),
8072
+ /* @__PURE__ */ jsx24(Skeleton, { className: cn("h-3 w-3/5 rounded-sm", skeletonClassName) })
8119
8073
  ] })
8120
8074
  ] })
8121
8075
  ]
@@ -8149,7 +8103,7 @@ function TranscriptHistoryLoader({ olderCount, onLoadOlder }) {
8149
8103
  }
8150
8104
  if (el.scrollTop > LOAD_OLDER_THRESHOLD_PX) armed.current = true;
8151
8105
  });
8152
- return /* @__PURE__ */ jsx26("div", { className: "flex justify-center", "data-boring-agent-part": "transcript-load-older", children: /* @__PURE__ */ jsxs21(
8106
+ return /* @__PURE__ */ jsx24("div", { className: "flex justify-center", "data-boring-agent-part": "transcript-load-older", children: /* @__PURE__ */ jsxs20(
8153
8107
  "button",
8154
8108
  {
8155
8109
  type: "button",
@@ -8193,7 +8147,7 @@ import { motion as motion2, useReducedMotion } from "motion/react";
8193
8147
  import { useEffect as useEffect15, useRef as useRef12 } from "react";
8194
8148
 
8195
8149
  // src/front/composer/ComposerStatusBanner.tsx
8196
- import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
8150
+ import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
8197
8151
  function ComposerStatusBanner({
8198
8152
  tone,
8199
8153
  dataAttribute,
@@ -8210,7 +8164,7 @@ function ComposerStatusBanner({
8210
8164
  }) {
8211
8165
  const toneAttr = { [dataAttribute]: tone };
8212
8166
  if (tone === "running") {
8213
- return /* @__PURE__ */ jsxs22(
8167
+ return /* @__PURE__ */ jsxs21(
8214
8168
  "div",
8215
8169
  {
8216
8170
  ...toneAttr,
@@ -8222,14 +8176,14 @@ function ComposerStatusBanner({
8222
8176
  maxWidthClassName
8223
8177
  ),
8224
8178
  children: [
8225
- /* @__PURE__ */ jsx27("span", { className: "inline-block h-2 w-2 animate-pulse rounded-full bg-accent", "aria-hidden": "true" }),
8226
- /* @__PURE__ */ jsx27("span", { children: runningContent })
8179
+ /* @__PURE__ */ jsx25("span", { className: "inline-block h-2 w-2 animate-pulse rounded-full bg-accent", "aria-hidden": "true" }),
8180
+ /* @__PURE__ */ jsx25("span", { children: runningContent })
8227
8181
  ]
8228
8182
  }
8229
8183
  );
8230
8184
  }
8231
8185
  if (tone === "success") {
8232
- return /* @__PURE__ */ jsxs22(
8186
+ return /* @__PURE__ */ jsxs21(
8233
8187
  "div",
8234
8188
  {
8235
8189
  ...toneAttr,
@@ -8241,13 +8195,13 @@ function ComposerStatusBanner({
8241
8195
  maxWidthClassName
8242
8196
  ),
8243
8197
  children: [
8244
- /* @__PURE__ */ jsxs22("div", { className: "flex items-start gap-2", children: [
8245
- /* @__PURE__ */ jsx27("span", { className: "mt-0.5 text-[oklch(0.45_0.13_148)]", "aria-hidden": "true", children: "\u2713" }),
8246
- /* @__PURE__ */ jsxs22("span", { className: "min-w-0 flex-1", children: [
8247
- /* @__PURE__ */ jsx27("span", { className: "block font-medium leading-5", children: title }),
8248
- detail ? /* @__PURE__ */ jsx27("span", { className: "block leading-4 text-muted-foreground", children: detail }) : null
8198
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-start gap-2", children: [
8199
+ /* @__PURE__ */ jsx25("span", { className: "mt-0.5 text-[oklch(0.45_0.13_148)]", "aria-hidden": "true", children: "\u2713" }),
8200
+ /* @__PURE__ */ jsxs21("span", { className: "min-w-0 flex-1", children: [
8201
+ /* @__PURE__ */ jsx25("span", { className: "block font-medium leading-5", children: title }),
8202
+ detail ? /* @__PURE__ */ jsx25("span", { className: "block leading-4 text-muted-foreground", children: detail }) : null
8249
8203
  ] }),
8250
- onDismiss ? /* @__PURE__ */ jsx27(
8204
+ onDismiss ? /* @__PURE__ */ jsx25(
8251
8205
  "button",
8252
8206
  {
8253
8207
  type: "button",
@@ -8263,7 +8217,7 @@ function ComposerStatusBanner({
8263
8217
  }
8264
8218
  );
8265
8219
  }
8266
- return /* @__PURE__ */ jsxs22(
8220
+ return /* @__PURE__ */ jsxs21(
8267
8221
  "div",
8268
8222
  {
8269
8223
  ...toneAttr,
@@ -8275,10 +8229,10 @@ function ComposerStatusBanner({
8275
8229
  maxWidthClassName
8276
8230
  ),
8277
8231
  children: [
8278
- /* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-2", children: [
8279
- /* @__PURE__ */ jsx27("span", { className: "text-destructive", "aria-hidden": "true", children: "\u26A0" }),
8280
- /* @__PURE__ */ jsx27("span", { className: "flex-1 font-medium", children: title }),
8281
- onRetry ? /* @__PURE__ */ jsx27(
8232
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2", children: [
8233
+ /* @__PURE__ */ jsx25("span", { className: "text-destructive", "aria-hidden": "true", children: "\u26A0" }),
8234
+ /* @__PURE__ */ jsx25("span", { className: "flex-1 font-medium", children: title }),
8235
+ onRetry ? /* @__PURE__ */ jsx25(
8282
8236
  "button",
8283
8237
  {
8284
8238
  type: "button",
@@ -8287,7 +8241,7 @@ function ComposerStatusBanner({
8287
8241
  children: retryLabel
8288
8242
  }
8289
8243
  ) : null,
8290
- onDismiss ? /* @__PURE__ */ jsx27(
8244
+ onDismiss ? /* @__PURE__ */ jsx25(
8291
8245
  "button",
8292
8246
  {
8293
8247
  type: "button",
@@ -8298,14 +8252,14 @@ function ComposerStatusBanner({
8298
8252
  }
8299
8253
  ) : null
8300
8254
  ] }),
8301
- message ? /* @__PURE__ */ jsx27("pre", { className: "mt-2 whitespace-pre-wrap break-words text-[11px] text-destructive/90", children: message }) : null
8255
+ message ? /* @__PURE__ */ jsx25("pre", { className: "mt-2 whitespace-pre-wrap break-words text-[11px] text-destructive/90", children: message }) : null
8302
8256
  ]
8303
8257
  }
8304
8258
  );
8305
8259
  }
8306
8260
 
8307
8261
  // src/front/composer/PluginUpdateStatus.tsx
8308
- import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
8262
+ import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
8309
8263
  function PluginUpdateStatus({
8310
8264
  state,
8311
8265
  onDismiss,
@@ -8327,7 +8281,7 @@ function PluginUpdateStatus({
8327
8281
  }, [state?.kind, successDismissKey, successAutoDismissMs]);
8328
8282
  if (!state) return null;
8329
8283
  if (state.kind === "running") {
8330
- return /* @__PURE__ */ jsx28(
8284
+ return /* @__PURE__ */ jsx26(
8331
8285
  ComposerStatusBanner,
8332
8286
  {
8333
8287
  tone: "running",
@@ -8344,7 +8298,7 @@ function PluginUpdateStatus({
8344
8298
  const hasWarningsOrDiagnostics = warnings.length > 0 || diagnostics.length > 0;
8345
8299
  const title = state.reloaded ? hasWarningsOrDiagnostics ? "Reload finished with warnings" : "Reload complete" : "Reload queued";
8346
8300
  const detail = state.reloaded ? hasWarningsOrDiagnostics ? "Some extension changes need attention." : frontEvents.length > 0 ? `${frontEvents.length} extension module${frontEvents.length === 1 ? "" : "s"} refreshed. Changes are live.` : "Changes are live." : void 0;
8347
- return /* @__PURE__ */ jsxs23(
8301
+ return /* @__PURE__ */ jsxs22(
8348
8302
  ComposerStatusBanner,
8349
8303
  {
8350
8304
  tone: "success",
@@ -8355,7 +8309,7 @@ function PluginUpdateStatus({
8355
8309
  onDismiss,
8356
8310
  dismissAriaLabel: "Dismiss plugin update status",
8357
8311
  children: [
8358
- diagnostics.length > 0 ? /* @__PURE__ */ jsxs23(
8312
+ diagnostics.length > 0 ? /* @__PURE__ */ jsxs22(
8359
8313
  "div",
8360
8314
  {
8361
8315
  "data-boring-plugin-update-diagnostics": "",
@@ -8364,24 +8318,24 @@ function PluginUpdateStatus({
8364
8318
  "px-2 py-1.5 text-[11px] text-foreground"
8365
8319
  ),
8366
8320
  children: [
8367
- /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-1.5 font-medium text-[oklch(0.48_0.15_60)]", children: [
8368
- /* @__PURE__ */ jsx28("span", { "aria-hidden": "true", children: "\u26A0" }),
8369
- /* @__PURE__ */ jsxs23("span", { children: [
8321
+ /* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-1.5 font-medium text-[oklch(0.48_0.15_60)]", children: [
8322
+ /* @__PURE__ */ jsx26("span", { "aria-hidden": "true", children: "\u26A0" }),
8323
+ /* @__PURE__ */ jsxs22("span", { children: [
8370
8324
  "Reload diagnostics for ",
8371
8325
  diagnostics.length,
8372
8326
  " extension",
8373
8327
  diagnostics.length === 1 ? "" : "s"
8374
8328
  ] })
8375
8329
  ] }),
8376
- /* @__PURE__ */ jsx28("ul", { className: "mt-1 ml-4 list-disc text-foreground/85", children: diagnostics.map((diagnostic, index) => /* @__PURE__ */ jsxs23("li", { children: [
8377
- /* @__PURE__ */ jsx28("code", { className: "font-mono text-[10.5px]", children: diagnostic.pluginId ?? diagnostic.source ?? "plugin" }),
8330
+ /* @__PURE__ */ jsx26("ul", { className: "mt-1 ml-4 list-disc text-foreground/85", children: diagnostics.map((diagnostic, index) => /* @__PURE__ */ jsxs22("li", { children: [
8331
+ /* @__PURE__ */ jsx26("code", { className: "font-mono text-[10.5px]", children: diagnostic.pluginId ?? diagnostic.source ?? "plugin" }),
8378
8332
  " \u2014 ",
8379
8333
  diagnostic.message ?? "reload diagnostic"
8380
8334
  ] }, `${diagnostic.pluginId ?? diagnostic.source ?? "plugin"}-${index}`)) })
8381
8335
  ]
8382
8336
  }
8383
8337
  ) : null,
8384
- warnings.length > 0 ? /* @__PURE__ */ jsxs23(
8338
+ warnings.length > 0 ? /* @__PURE__ */ jsxs22(
8385
8339
  "div",
8386
8340
  {
8387
8341
  "data-boring-plugin-update-restart-warning": "",
@@ -8390,21 +8344,21 @@ function PluginUpdateStatus({
8390
8344
  "px-2 py-1.5 text-[11px] text-foreground"
8391
8345
  ),
8392
8346
  children: [
8393
- /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-1.5 font-medium text-[oklch(0.48_0.15_60)]", children: [
8394
- /* @__PURE__ */ jsx28("span", { "aria-hidden": "true", children: "\u26A0" }),
8395
- /* @__PURE__ */ jsxs23("span", { children: [
8347
+ /* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-1.5 font-medium text-[oklch(0.48_0.15_60)]", children: [
8348
+ /* @__PURE__ */ jsx26("span", { "aria-hidden": "true", children: "\u26A0" }),
8349
+ /* @__PURE__ */ jsxs22("span", { children: [
8396
8350
  "Restart needed for ",
8397
8351
  warnings.length,
8398
8352
  " extension",
8399
8353
  warnings.length === 1 ? "" : "s"
8400
8354
  ] })
8401
8355
  ] }),
8402
- /* @__PURE__ */ jsx28("ul", { className: "mt-1 ml-4 list-disc text-foreground/85", children: warnings.map((w) => /* @__PURE__ */ jsxs23("li", { children: [
8403
- /* @__PURE__ */ jsx28("code", { className: "font-mono text-[10.5px]", children: w.id }),
8356
+ /* @__PURE__ */ jsx26("ul", { className: "mt-1 ml-4 list-disc text-foreground/85", children: warnings.map((w) => /* @__PURE__ */ jsxs22("li", { children: [
8357
+ /* @__PURE__ */ jsx26("code", { className: "font-mono text-[10.5px]", children: w.id }),
8404
8358
  " \u2014 ",
8405
8359
  w.surfaces.join(" + ")
8406
8360
  ] }, w.id)) }),
8407
- /* @__PURE__ */ jsx28("p", { className: "mt-1 text-foreground/70", children: "The interface reloaded successfully, but routes and tools were wired at boot. Restart the workspace process to pick up the new code." })
8361
+ /* @__PURE__ */ jsx26("p", { className: "mt-1 text-foreground/70", children: "The interface reloaded successfully, but routes and tools were wired at boot. Restart the workspace process to pick up the new code." })
8408
8362
  ]
8409
8363
  }
8410
8364
  ) : null
@@ -8412,7 +8366,7 @@ function PluginUpdateStatus({
8412
8366
  }
8413
8367
  );
8414
8368
  }
8415
- return /* @__PURE__ */ jsx28(
8369
+ return /* @__PURE__ */ jsx26(
8416
8370
  ComposerStatusBanner,
8417
8371
  {
8418
8372
  tone: "error",
@@ -8430,7 +8384,7 @@ function PluginUpdateStatus({
8430
8384
 
8431
8385
  // src/front/composer/CommandRunStatus.tsx
8432
8386
  import { useEffect as useEffect16, useRef as useRef13 } from "react";
8433
- import { Fragment as Fragment10, jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
8387
+ import { Fragment as Fragment10, jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
8434
8388
  function CommandRunStatus({
8435
8389
  state,
8436
8390
  onDismiss,
@@ -8449,15 +8403,15 @@ function CommandRunStatus({
8449
8403
  }, [state?.kind, successKey, successAutoDismissMs]);
8450
8404
  if (!state) return null;
8451
8405
  if (state.kind === "running") {
8452
- return /* @__PURE__ */ jsx29(
8406
+ return /* @__PURE__ */ jsx27(
8453
8407
  ComposerStatusBanner,
8454
8408
  {
8455
8409
  tone: "running",
8456
8410
  dataAttribute: "data-boring-command-run",
8457
8411
  maxWidthClassName,
8458
- runningContent: state.command ? /* @__PURE__ */ jsxs24(Fragment10, { children: [
8412
+ runningContent: state.command ? /* @__PURE__ */ jsxs23(Fragment10, { children: [
8459
8413
  " Running ",
8460
- /* @__PURE__ */ jsxs24("code", { className: "font-mono", children: [
8414
+ /* @__PURE__ */ jsxs23("code", { className: "font-mono", children: [
8461
8415
  "/",
8462
8416
  state.command
8463
8417
  ] }),
@@ -8467,15 +8421,15 @@ function CommandRunStatus({
8467
8421
  );
8468
8422
  }
8469
8423
  if (state.kind === "success") {
8470
- return /* @__PURE__ */ jsx29(
8424
+ return /* @__PURE__ */ jsx27(
8471
8425
  ComposerStatusBanner,
8472
8426
  {
8473
8427
  tone: "success",
8474
8428
  dataAttribute: "data-boring-command-run",
8475
8429
  maxWidthClassName,
8476
- title: state.command ? /* @__PURE__ */ jsxs24(Fragment10, { children: [
8430
+ title: state.command ? /* @__PURE__ */ jsxs23(Fragment10, { children: [
8477
8431
  " Ran ",
8478
- /* @__PURE__ */ jsxs24("code", { className: "font-mono", children: [
8432
+ /* @__PURE__ */ jsxs23("code", { className: "font-mono", children: [
8479
8433
  "/",
8480
8434
  state.command
8481
8435
  ] }),
@@ -8487,15 +8441,15 @@ function CommandRunStatus({
8487
8441
  }
8488
8442
  );
8489
8443
  }
8490
- return /* @__PURE__ */ jsx29(
8444
+ return /* @__PURE__ */ jsx27(
8491
8445
  ComposerStatusBanner,
8492
8446
  {
8493
8447
  tone: "error",
8494
8448
  dataAttribute: "data-boring-command-run",
8495
8449
  maxWidthClassName,
8496
- title: state.command ? /* @__PURE__ */ jsxs24(Fragment10, { children: [
8450
+ title: state.command ? /* @__PURE__ */ jsxs23(Fragment10, { children: [
8497
8451
  " ",
8498
- /* @__PURE__ */ jsxs24("code", { className: "font-mono", children: [
8452
+ /* @__PURE__ */ jsxs23("code", { className: "font-mono", children: [
8499
8453
  "/",
8500
8454
  state.command
8501
8455
  ] }),
@@ -8543,7 +8497,7 @@ function displayProviderLabel(provider) {
8543
8497
  }
8544
8498
 
8545
8499
  // src/front/chatPanelComposerControls.tsx
8546
- import { Fragment as Fragment11, jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
8500
+ import { Fragment as Fragment11, jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
8547
8501
  var composerActionClass = cn(
8548
8502
  "inline-flex h-8 items-center justify-center gap-1.5 rounded-[var(--radius-md)] border-0 bg-transparent",
8549
8503
  "text-muted-foreground shadow-none transition-colors motion-reduce:transition-none",
@@ -8611,7 +8565,7 @@ function useDismissOnOutsidePointer(ref, onClose) {
8611
8565
  }
8612
8566
  function ThinkingLevelGlyph({ level }) {
8613
8567
  const lit = level === "off" ? 0 : level === "low" ? 1 : level === "medium" ? 2 : 3;
8614
- return /* @__PURE__ */ jsx30(
8568
+ return /* @__PURE__ */ jsx28(
8615
8569
  "svg",
8616
8570
  {
8617
8571
  "aria-hidden": "true",
@@ -8620,7 +8574,7 @@ function ThinkingLevelGlyph({ level }) {
8620
8574
  viewBox: "0 0 14 14",
8621
8575
  fill: "none",
8622
8576
  className: "shrink-0",
8623
- children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx30(
8577
+ children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx28(
8624
8578
  "rect",
8625
8579
  {
8626
8580
  x: 2 + i * 4,
@@ -8667,7 +8621,7 @@ var ModelSelectTrigger = forwardRef(function ModelSelectTrigger2({
8667
8621
  }, ref) {
8668
8622
  const triggerLabel = modelTriggerLabel(value, options, emptyLabel);
8669
8623
  const triggerDisplay = value ? `${triggerLabel} (${displayProviderLabel(value.provider)})` : triggerLabel;
8670
- return /* @__PURE__ */ jsx30(
8624
+ return /* @__PURE__ */ jsx28(
8671
8625
  "button",
8672
8626
  {
8673
8627
  ref,
@@ -8685,16 +8639,16 @@ var ModelSelectTrigger = forwardRef(function ModelSelectTrigger2({
8685
8639
  className
8686
8640
  ),
8687
8641
  ...props,
8688
- children: trigger === "slash" ? /* @__PURE__ */ jsxs25(Fragment11, { children: [
8689
- /* @__PURE__ */ jsx30("span", { className: "text-muted-foreground", children: "Model \xB7 " }),
8690
- /* @__PURE__ */ jsx30("span", { className: "min-w-0 truncate text-foreground", children: triggerLabel }),
8691
- value ? /* @__PURE__ */ jsxs25("span", { className: "shrink-0 text-muted-foreground", children: [
8642
+ children: trigger === "slash" ? /* @__PURE__ */ jsxs24(Fragment11, { children: [
8643
+ /* @__PURE__ */ jsx28("span", { className: "text-muted-foreground", children: "Model \xB7 " }),
8644
+ /* @__PURE__ */ jsx28("span", { className: "min-w-0 truncate text-foreground", children: triggerLabel }),
8645
+ value ? /* @__PURE__ */ jsxs24("span", { className: "shrink-0 text-muted-foreground", children: [
8692
8646
  " \xB7 ",
8693
8647
  displayProviderLabel(value.provider)
8694
8648
  ] }) : null
8695
- ] }) : /* @__PURE__ */ jsxs25(Fragment11, { children: [
8696
- /* @__PURE__ */ jsx30("span", { className: "min-w-0 truncate", children: triggerDisplay }),
8697
- /* @__PURE__ */ jsx30(ChevronDownIcon5, { className: "h-3 w-3 shrink-0 text-muted-foreground/50", "aria-hidden": "true" })
8649
+ ] }) : /* @__PURE__ */ jsxs24(Fragment11, { children: [
8650
+ /* @__PURE__ */ jsx28("span", { className: "min-w-0 truncate", children: triggerDisplay }),
8651
+ /* @__PURE__ */ jsx28(ChevronDownIcon5, { className: "h-3 w-3 shrink-0 text-muted-foreground/50", "aria-hidden": "true" })
8698
8652
  ] })
8699
8653
  }
8700
8654
  );
@@ -8751,8 +8705,8 @@ function ModelPickerMenu({
8751
8705
  }, [activeIndex, disabled, keyboardOptions, onChange, onClose]);
8752
8706
  const optionIndexOffset = hideDefaultOption ? 0 : 1;
8753
8707
  const optionIndexes = new Map(groupedOptions.map((option, index) => [encodeModelKey(option), index + optionIndexOffset]));
8754
- return /* @__PURE__ */ jsx30("div", { ref: menuRef, "data-boring-agent": "", "data-boring-agent-part": "model-picker-menu", className: cn(composerPickerMenuClass, className), children: /* @__PURE__ */ jsxs25(Command, { className: "bg-transparent text-[color:var(--popover-foreground)]", children: [
8755
- menuOptions.length > 8 && /* @__PURE__ */ jsx30("div", { className: "border-b border-border/60 px-2", children: /* @__PURE__ */ jsx30(
8708
+ return /* @__PURE__ */ jsx28("div", { ref: menuRef, "data-boring-agent": "", "data-boring-agent-part": "model-picker-menu", className: cn(composerPickerMenuClass, className), children: /* @__PURE__ */ jsxs24(Command, { className: "bg-transparent text-[color:var(--popover-foreground)]", children: [
8709
+ menuOptions.length > 8 && /* @__PURE__ */ jsx28("div", { className: "border-b border-border/60 px-2", children: /* @__PURE__ */ jsx28(
8756
8710
  CommandInput,
8757
8711
  {
8758
8712
  placeholder: "Search models\u2026",
@@ -8760,9 +8714,9 @@ function ModelPickerMenu({
8760
8714
  className: "h-8 w-full border-0 bg-transparent text-sm outline-none focus:ring-0"
8761
8715
  }
8762
8716
  ) }),
8763
- /* @__PURE__ */ jsxs25(CommandList, { className: "max-h-[300px] p-0.5", children: [
8764
- /* @__PURE__ */ jsx30(CommandEmpty, { className: "py-4 text-center text-sm text-muted-foreground", children: "No models found" }),
8765
- !hideDefaultOption ? /* @__PURE__ */ jsx30(CommandGroup, { children: /* @__PURE__ */ jsxs25(
8717
+ /* @__PURE__ */ jsxs24(CommandList, { className: "max-h-[300px] p-0.5", children: [
8718
+ /* @__PURE__ */ jsx28(CommandEmpty, { className: "py-4 text-center text-sm text-muted-foreground", children: "No models found" }),
8719
+ !hideDefaultOption ? /* @__PURE__ */ jsx28(CommandGroup, { children: /* @__PURE__ */ jsxs24(
8766
8720
  CommandItem,
8767
8721
  {
8768
8722
  value: "Default model automatic auto",
@@ -8773,7 +8727,7 @@ function ModelPickerMenu({
8773
8727
  },
8774
8728
  className: selectorItemClass(!value || activeIndex === 0),
8775
8729
  children: [
8776
- /* @__PURE__ */ jsx30(
8730
+ /* @__PURE__ */ jsx28(
8777
8731
  CheckIcon3,
8778
8732
  {
8779
8733
  className: cn(
@@ -8782,12 +8736,12 @@ function ModelPickerMenu({
8782
8736
  )
8783
8737
  }
8784
8738
  ),
8785
- /* @__PURE__ */ jsx30("span", { className: "truncate", children: "Default model" }),
8786
- /* @__PURE__ */ jsx30("span", { className: "ml-auto shrink-0 text-xs text-muted-foreground", children: "Auto" })
8739
+ /* @__PURE__ */ jsx28("span", { className: "truncate", children: "Default model" }),
8740
+ /* @__PURE__ */ jsx28("span", { className: "ml-auto shrink-0 text-xs text-muted-foreground", children: "Auto" })
8787
8741
  ]
8788
8742
  }
8789
8743
  ) }) : null,
8790
- [...groups.entries()].map(([provider, list]) => /* @__PURE__ */ jsx30(
8744
+ [...groups.entries()].map(([provider, list]) => /* @__PURE__ */ jsx28(
8791
8745
  CommandGroup,
8792
8746
  {
8793
8747
  heading: displayProviderLabel(provider),
@@ -8796,7 +8750,7 @@ function ModelPickerMenu({
8796
8750
  const key = encodeModelKey(m);
8797
8751
  const label = m.label || displayModelLabel(m.id);
8798
8752
  const itemIndex = optionIndexes.get(key) ?? 0;
8799
- return /* @__PURE__ */ jsxs25(
8753
+ return /* @__PURE__ */ jsxs24(
8800
8754
  CommandItem,
8801
8755
  {
8802
8756
  value: `${label} ${m.id} ${displayProviderLabel(m.provider)}`,
@@ -8807,7 +8761,7 @@ function ModelPickerMenu({
8807
8761
  },
8808
8762
  className: cn(selectorItemClass(key === currentKey || activeIndex === itemIndex)),
8809
8763
  children: [
8810
- /* @__PURE__ */ jsx30(
8764
+ /* @__PURE__ */ jsx28(
8811
8765
  CheckIcon3,
8812
8766
  {
8813
8767
  className: cn(
@@ -8816,8 +8770,8 @@ function ModelPickerMenu({
8816
8770
  )
8817
8771
  }
8818
8772
  ),
8819
- /* @__PURE__ */ jsx30("span", { className: "min-w-0 flex-1 truncate whitespace-nowrap", children: label }),
8820
- /* @__PURE__ */ jsx30("span", { className: "ml-auto max-w-[45%] shrink-0 truncate whitespace-nowrap text-right text-xs text-muted-foreground", children: m.id })
8773
+ /* @__PURE__ */ jsx28("span", { className: "min-w-0 flex-1 truncate whitespace-nowrap", children: label }),
8774
+ /* @__PURE__ */ jsx28("span", { className: "ml-auto max-w-[45%] shrink-0 truncate whitespace-nowrap text-right text-xs text-muted-foreground", children: m.id })
8821
8775
  ]
8822
8776
  },
8823
8777
  key
@@ -8855,8 +8809,8 @@ function ModelSelect({
8855
8809
  if (previousOpenSignalRef.current !== openSignal) setOpen(true);
8856
8810
  previousOpenSignalRef.current = openSignal;
8857
8811
  }, [disabled, openSignal]);
8858
- return /* @__PURE__ */ jsxs25(Popover, { open, onOpenChange: disabled ? void 0 : setOpen, children: [
8859
- /* @__PURE__ */ jsx30(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx30(
8812
+ return /* @__PURE__ */ jsxs24(Popover, { open, onOpenChange: disabled ? void 0 : setOpen, children: [
8813
+ /* @__PURE__ */ jsx28(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx28(
8860
8814
  ModelSelectTrigger,
8861
8815
  {
8862
8816
  value,
@@ -8870,7 +8824,7 @@ function ModelSelect({
8870
8824
  "aria-describedby": ariaDescribedBy
8871
8825
  }
8872
8826
  ) }),
8873
- /* @__PURE__ */ jsx30(
8827
+ /* @__PURE__ */ jsx28(
8874
8828
  PopoverContent,
8875
8829
  {
8876
8830
  align: trigger === "slash" ? "center" : "start",
@@ -8879,7 +8833,7 @@ function ModelSelect({
8879
8833
  collisionPadding: 12,
8880
8834
  "data-boring-agent": "",
8881
8835
  className: cn("w-[min(92vw,340px)]", selectorContentClass),
8882
- children: /* @__PURE__ */ jsx30(
8836
+ children: /* @__PURE__ */ jsx28(
8883
8837
  ModelPickerMenu,
8884
8838
  {
8885
8839
  value,
@@ -8916,8 +8870,8 @@ function ThinkingSelect({
8916
8870
  if (previousOpenSignalRef.current !== openSignal) setOpen(true);
8917
8871
  previousOpenSignalRef.current = openSignal;
8918
8872
  }, [disabled, openSignal]);
8919
- return /* @__PURE__ */ jsxs25(Popover, { open, onOpenChange: disabled ? void 0 : setOpen, children: [
8920
- /* @__PURE__ */ jsx30(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx30(
8873
+ return /* @__PURE__ */ jsxs24(Popover, { open, onOpenChange: disabled ? void 0 : setOpen, children: [
8874
+ /* @__PURE__ */ jsx28(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx28(
8921
8875
  ThinkingSelectTrigger,
8922
8876
  {
8923
8877
  value,
@@ -8927,7 +8881,7 @@ function ThinkingSelect({
8927
8881
  className
8928
8882
  }
8929
8883
  ) }),
8930
- /* @__PURE__ */ jsx30(
8884
+ /* @__PURE__ */ jsx28(
8931
8885
  PopoverContent,
8932
8886
  {
8933
8887
  align: trigger === "slash" ? "center" : "end",
@@ -8936,7 +8890,7 @@ function ThinkingSelect({
8936
8890
  collisionPadding: 12,
8937
8891
  "data-boring-agent": "",
8938
8892
  className: cn("w-[min(92vw,240px)]", selectorContentClass),
8939
- children: /* @__PURE__ */ jsx30(
8893
+ children: /* @__PURE__ */ jsx28(
8940
8894
  ThinkingPickerMenu,
8941
8895
  {
8942
8896
  value,
@@ -8959,7 +8913,7 @@ var ThinkingSelectTrigger = forwardRef(function ThinkingSelectTrigger2({
8959
8913
  className,
8960
8914
  ...props
8961
8915
  }, ref) {
8962
- return /* @__PURE__ */ jsxs25(
8916
+ return /* @__PURE__ */ jsxs24(
8963
8917
  "button",
8964
8918
  {
8965
8919
  ref,
@@ -8980,13 +8934,13 @@ var ThinkingSelectTrigger = forwardRef(function ThinkingSelectTrigger2({
8980
8934
  onClick,
8981
8935
  ...props,
8982
8936
  children: [
8983
- trigger === "button" ? /* @__PURE__ */ jsx30(ThinkingLevelGlyph, { level: value }) : null,
8984
- trigger === "slash" ? /* @__PURE__ */ jsxs25(Fragment11, { children: [
8985
- /* @__PURE__ */ jsx30("span", { className: "text-muted-foreground", children: "Thinking \xB7 " }),
8986
- /* @__PURE__ */ jsx30("span", { className: "text-foreground", children: THINKING_LEVEL_STATUS_LABELS[value] })
8987
- ] }) : /* @__PURE__ */ jsxs25(Fragment11, { children: [
8988
- /* @__PURE__ */ jsx30("span", { children: THINKING_LEVEL_LABELS[value] }),
8989
- /* @__PURE__ */ jsx30(ChevronDownIcon5, { className: "h-3 w-3 shrink-0 text-muted-foreground/50", "aria-hidden": "true" })
8937
+ trigger === "button" ? /* @__PURE__ */ jsx28(ThinkingLevelGlyph, { level: value }) : null,
8938
+ trigger === "slash" ? /* @__PURE__ */ jsxs24(Fragment11, { children: [
8939
+ /* @__PURE__ */ jsx28("span", { className: "text-muted-foreground", children: "Thinking \xB7 " }),
8940
+ /* @__PURE__ */ jsx28("span", { className: "text-foreground", children: THINKING_LEVEL_STATUS_LABELS[value] })
8941
+ ] }) : /* @__PURE__ */ jsxs24(Fragment11, { children: [
8942
+ /* @__PURE__ */ jsx28("span", { children: THINKING_LEVEL_LABELS[value] }),
8943
+ /* @__PURE__ */ jsx28(ChevronDownIcon5, { className: "h-3 w-3 shrink-0 text-muted-foreground/50", "aria-hidden": "true" })
8990
8944
  ] })
8991
8945
  ]
8992
8946
  }
@@ -9035,7 +8989,7 @@ function ThinkingPickerMenu({
9035
8989
  window.addEventListener("keydown", handler, { capture: true });
9036
8990
  return () => window.removeEventListener("keydown", handler, { capture: true });
9037
8991
  }, [activeIndex, disabled, onChange, onClose]);
9038
- return /* @__PURE__ */ jsx30("div", { ref: menuRef, "data-boring-agent": "", "data-boring-agent-part": "thinking-picker-menu", className: cn(composerPickerMenuClass, className), children: /* @__PURE__ */ jsx30(Command, { className: "bg-transparent text-[color:var(--popover-foreground)]", children: /* @__PURE__ */ jsx30(CommandList, { className: "max-h-[300px] p-0.5", children: THINKING_LEVELS.map((level, index) => /* @__PURE__ */ jsxs25(
8992
+ return /* @__PURE__ */ jsx28("div", { ref: menuRef, "data-boring-agent": "", "data-boring-agent-part": "thinking-picker-menu", className: cn(composerPickerMenuClass, className), children: /* @__PURE__ */ jsx28(Command, { className: "bg-transparent text-[color:var(--popover-foreground)]", children: /* @__PURE__ */ jsx28(CommandList, { className: "max-h-[300px] p-0.5", children: THINKING_LEVELS.map((level, index) => /* @__PURE__ */ jsxs24(
9039
8993
  CommandItem,
9040
8994
  {
9041
8995
  value: `Thinking ${THINKING_LEVEL_LABELS[level]} ${THINKING_LEVEL_DETAILS[level]}`,
@@ -9046,7 +9000,7 @@ function ThinkingPickerMenu({
9046
9000
  },
9047
9001
  className: selectorItemClass(level === value || index === activeIndex),
9048
9002
  children: [
9049
- /* @__PURE__ */ jsx30(
9003
+ /* @__PURE__ */ jsx28(
9050
9004
  CheckIcon3,
9051
9005
  {
9052
9006
  className: cn(
@@ -9055,9 +9009,9 @@ function ThinkingPickerMenu({
9055
9009
  )
9056
9010
  }
9057
9011
  ),
9058
- /* @__PURE__ */ jsx30(ThinkingLevelGlyph, { level }),
9059
- /* @__PURE__ */ jsx30("span", { className: "font-medium", children: THINKING_LEVEL_LABELS[level] }),
9060
- /* @__PURE__ */ jsx30("span", { className: "ml-auto text-xs text-muted-foreground", children: THINKING_LEVEL_DETAILS[level] })
9012
+ /* @__PURE__ */ jsx28(ThinkingLevelGlyph, { level }),
9013
+ /* @__PURE__ */ jsx28("span", { className: "font-medium", children: THINKING_LEVEL_LABELS[level] }),
9014
+ /* @__PURE__ */ jsx28("span", { className: "ml-auto text-xs text-muted-foreground", children: THINKING_LEVEL_DETAILS[level] })
9061
9015
  ]
9062
9016
  },
9063
9017
  level
@@ -9095,25 +9049,25 @@ import {
9095
9049
  Monitor,
9096
9050
  PlusIcon as PlusIcon2,
9097
9051
  SquareIcon,
9098
- XIcon as XIcon5
9052
+ XIcon as XIcon4
9099
9053
  } from "lucide-react";
9100
9054
  import { nanoid } from "nanoid";
9101
9055
  import { useCallback as useCallback15, useEffect as useEffect18, useMemo as useMemo13, useRef as useRef15, useState as useState17 } from "react";
9102
9056
 
9103
9057
  // src/front/primitives/prompt-input-context.ts
9104
- import { createContext as createContext8, useContext as useContext8 } from "react";
9105
- var PromptInputController = createContext8(
9058
+ import { createContext as createContext7, useContext as useContext7 } from "react";
9059
+ var PromptInputController = createContext7(
9106
9060
  null
9107
9061
  );
9108
- var ProviderAttachmentsContext = createContext8(
9062
+ var ProviderAttachmentsContext = createContext7(
9109
9063
  null
9110
9064
  );
9111
- var useOptionalPromptInputController = () => useContext8(PromptInputController);
9112
- var useOptionalProviderAttachments = () => useContext8(ProviderAttachmentsContext);
9113
- var LocalAttachmentsContext = createContext8(null);
9065
+ var useOptionalPromptInputController = () => useContext7(PromptInputController);
9066
+ var useOptionalProviderAttachments = () => useContext7(ProviderAttachmentsContext);
9067
+ var LocalAttachmentsContext = createContext7(null);
9114
9068
  var usePromptInputAttachments = () => {
9115
9069
  const provider = useOptionalProviderAttachments();
9116
- const local = useContext8(LocalAttachmentsContext);
9070
+ const local = useContext7(LocalAttachmentsContext);
9117
9071
  const context = local ?? provider;
9118
9072
  if (!context) {
9119
9073
  throw new Error(
@@ -9122,23 +9076,23 @@ var usePromptInputAttachments = () => {
9122
9076
  }
9123
9077
  return context;
9124
9078
  };
9125
- var LocalReferencedSourcesContext = createContext8(null);
9079
+ var LocalReferencedSourcesContext = createContext7(null);
9126
9080
 
9127
9081
  // src/front/primitives/prompt-input-wrappers.tsx
9128
9082
  import {
9129
9083
  InputGroupAddon,
9130
9084
  InputGroupButton,
9131
- Tooltip as Tooltip3,
9132
- TooltipContent as TooltipContent3,
9133
- TooltipTrigger as TooltipTrigger3
9085
+ Tooltip as Tooltip2,
9086
+ TooltipContent as TooltipContent2,
9087
+ TooltipTrigger as TooltipTrigger2
9134
9088
  } from "@hachej/boring-ui-kit";
9135
9089
  import { Children as Children2 } from "react";
9136
- import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
9090
+ import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
9137
9091
  var PromptInputFooter = ({
9138
9092
  align = "block-end",
9139
9093
  className,
9140
9094
  ...props
9141
- }) => /* @__PURE__ */ jsx31(
9095
+ }) => /* @__PURE__ */ jsx29(
9142
9096
  InputGroupAddon,
9143
9097
  {
9144
9098
  align,
@@ -9148,7 +9102,7 @@ var PromptInputFooter = ({
9148
9102
  );
9149
9103
 
9150
9104
  // src/front/primitives/prompt-input.tsx
9151
- import { Fragment as Fragment12, jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
9105
+ import { Fragment as Fragment12, jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
9152
9106
  var PromptInput = ({
9153
9107
  className,
9154
9108
  accept,
@@ -9491,8 +9445,8 @@ var PromptInput = ({
9491
9445
  },
9492
9446
  [usingProvider, controller, files, onSubmit, clear]
9493
9447
  );
9494
- const inner = /* @__PURE__ */ jsxs27(Fragment12, { children: [
9495
- /* @__PURE__ */ jsx32(
9448
+ const inner = /* @__PURE__ */ jsxs26(Fragment12, { children: [
9449
+ /* @__PURE__ */ jsx30(
9496
9450
  Input,
9497
9451
  {
9498
9452
  accept,
@@ -9505,7 +9459,7 @@ var PromptInput = ({
9505
9459
  type: "file"
9506
9460
  }
9507
9461
  ),
9508
- /* @__PURE__ */ jsx32(
9462
+ /* @__PURE__ */ jsx30(
9509
9463
  "form",
9510
9464
  {
9511
9465
  "data-boring-agent-part": "composer",
@@ -9513,12 +9467,12 @@ var PromptInput = ({
9513
9467
  onSubmit: handleSubmit,
9514
9468
  ref: formRef,
9515
9469
  ...props,
9516
- children: /* @__PURE__ */ jsx32(InputGroup, { className: "overflow-hidden", children })
9470
+ children: /* @__PURE__ */ jsx30(InputGroup, { className: "overflow-hidden", children })
9517
9471
  }
9518
9472
  )
9519
9473
  ] });
9520
- const withReferencedSources = /* @__PURE__ */ jsx32(LocalReferencedSourcesContext.Provider, { value: refsCtx, children: inner });
9521
- return /* @__PURE__ */ jsx32(LocalAttachmentsContext.Provider, { value: attachmentsCtx, children: withReferencedSources });
9474
+ const withReferencedSources = /* @__PURE__ */ jsx30(LocalReferencedSourcesContext.Provider, { value: refsCtx, children: inner });
9475
+ return /* @__PURE__ */ jsx30(LocalAttachmentsContext.Provider, { value: attachmentsCtx, children: withReferencedSources });
9522
9476
  };
9523
9477
  var PromptInputTextarea = ({
9524
9478
  onChange,
@@ -9596,7 +9550,7 @@ var PromptInputTextarea = ({
9596
9550
  } : {
9597
9551
  onChange
9598
9552
  };
9599
- return /* @__PURE__ */ jsx32(
9553
+ return /* @__PURE__ */ jsx30(
9600
9554
  InputGroupTextarea,
9601
9555
  {
9602
9556
  "data-boring-agent-part": "composer-input",
@@ -9623,13 +9577,13 @@ var PromptInputSubmit = ({
9623
9577
  ...props
9624
9578
  }) => {
9625
9579
  const isGenerating = status === "submitted" || status === "streaming";
9626
- let Icon = /* @__PURE__ */ jsx32(CornerDownLeftIcon, { className: "size-4" });
9580
+ let Icon = /* @__PURE__ */ jsx30(CornerDownLeftIcon, { className: "size-4" });
9627
9581
  if (status === "submitted") {
9628
- Icon = /* @__PURE__ */ jsx32(Spinner, {});
9582
+ Icon = /* @__PURE__ */ jsx30(Spinner, {});
9629
9583
  } else if (status === "streaming") {
9630
- Icon = /* @__PURE__ */ jsx32(SquareIcon, { className: "size-4" });
9584
+ Icon = /* @__PURE__ */ jsx30(SquareIcon, { className: "size-4" });
9631
9585
  } else if (status === "error") {
9632
- Icon = /* @__PURE__ */ jsx32(XIcon5, { className: "size-4" });
9586
+ Icon = /* @__PURE__ */ jsx30(XIcon4, { className: "size-4" });
9633
9587
  }
9634
9588
  const handleClick = useCallback15(
9635
9589
  (e) => {
@@ -9642,7 +9596,7 @@ var PromptInputSubmit = ({
9642
9596
  },
9643
9597
  [isGenerating, onStop, onClick]
9644
9598
  );
9645
- return /* @__PURE__ */ jsx32(
9599
+ return /* @__PURE__ */ jsx30(
9646
9600
  InputGroupButton2,
9647
9601
  {
9648
9602
  "aria-label": isGenerating ? "Stop" : "Submit",
@@ -9660,7 +9614,7 @@ var PromptInputSubmit = ({
9660
9614
 
9661
9615
  // src/front/primitives/slash-command-picker.tsx
9662
9616
  import { useEffect as useEffect19, useMemo as useMemo14, useRef as useRef16, useState as useState18 } from "react";
9663
- import { Fragment as Fragment13, jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
9617
+ import { Fragment as Fragment13, jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
9664
9618
  var ALL_PLUGINS = "__all__";
9665
9619
  function commandGroup(cmd) {
9666
9620
  if (cmd.source === "skill") return "skills";
@@ -9711,8 +9665,8 @@ function SlashCommandPicker({ query, commands, onSelect, onDismiss }) {
9711
9665
  },
9712
9666
  onDismiss
9713
9667
  });
9714
- return /* @__PURE__ */ jsxs28("div", { ref: containerRef, className: "mb-1 w-full overflow-hidden rounded-lg border border-border/60 bg-popover shadow-lg", children: [
9715
- /* @__PURE__ */ jsx33(
9668
+ return /* @__PURE__ */ jsxs27("div", { ref: containerRef, className: "mb-1 w-full overflow-hidden rounded-lg border border-border/60 bg-popover shadow-lg", children: [
9669
+ /* @__PURE__ */ jsx31(
9716
9670
  "input",
9717
9671
  {
9718
9672
  ref: inputRef,
@@ -9727,9 +9681,9 @@ function SlashCommandPicker({ query, commands, onSelect, onDismiss }) {
9727
9681
  autoComplete: "off"
9728
9682
  }
9729
9683
  ),
9730
- /* @__PURE__ */ jsx33("div", { className: "flex flex-wrap gap-1 border-b border-border/50 px-2 py-1.5", role: "tablist", "aria-label": "Filter by plugin", children: [ALL_PLUGINS, ...groups].map((g) => {
9684
+ /* @__PURE__ */ jsx31("div", { className: "flex flex-wrap gap-1 border-b border-border/50 px-2 py-1.5", role: "tablist", "aria-label": "Filter by plugin", children: [ALL_PLUGINS, ...groups].map((g) => {
9731
9685
  const selected = plugin === g;
9732
- return /* @__PURE__ */ jsx33(
9686
+ return /* @__PURE__ */ jsx31(
9733
9687
  "button",
9734
9688
  {
9735
9689
  type: "button",
@@ -9749,7 +9703,7 @@ function SlashCommandPicker({ query, commands, onSelect, onDismiss }) {
9749
9703
  g
9750
9704
  );
9751
9705
  }) }),
9752
- filtered.length === 0 ? /* @__PURE__ */ jsx33("div", { className: "px-3 py-2 text-[11px] text-muted-foreground", children: "No matching commands." }) : /* @__PURE__ */ jsx33("ul", { ref: listRef, className: "max-h-80 overflow-y-auto py-1", role: "listbox", "aria-label": "Commands", children: filtered.map((cmd, i) => /* @__PURE__ */ jsxs28(
9706
+ filtered.length === 0 ? /* @__PURE__ */ jsx31("div", { className: "px-3 py-2 text-[11px] text-muted-foreground", children: "No matching commands." }) : /* @__PURE__ */ jsx31("ul", { ref: listRef, className: "max-h-80 overflow-y-auto py-1", role: "listbox", "aria-label": "Commands", children: filtered.map((cmd, i) => /* @__PURE__ */ jsxs27(
9753
9707
  "li",
9754
9708
  {
9755
9709
  role: "option",
@@ -9767,20 +9721,20 @@ function SlashCommandPicker({ query, commands, onSelect, onDismiss }) {
9767
9721
  onSelect(cmd.name);
9768
9722
  },
9769
9723
  children: [
9770
- /* @__PURE__ */ jsxs28("span", { className: "flex items-center gap-1.5", children: [
9771
- /* @__PURE__ */ jsxs28("span", { className: "font-medium text-foreground/80", children: [
9724
+ /* @__PURE__ */ jsxs27("span", { className: "flex items-center gap-1.5", children: [
9725
+ /* @__PURE__ */ jsxs27("span", { className: "font-medium text-foreground/80", children: [
9772
9726
  "/",
9773
9727
  cmd.name
9774
9728
  ] }),
9775
- cmd.source === "skill" ? /* @__PURE__ */ jsxs28(Fragment13, { children: [
9776
- /* @__PURE__ */ jsx33("span", { className: "rounded-sm bg-accent/15 px-1 py-px text-[9px] font-medium uppercase tracking-wide text-accent-foreground", children: "skill" }),
9777
- cmd.sourcePlugin ? /* @__PURE__ */ jsx33("span", { className: "rounded-sm bg-muted px-1 py-px text-[9px] font-medium text-muted-foreground", children: cmd.sourcePlugin }) : null
9729
+ cmd.source === "skill" ? /* @__PURE__ */ jsxs27(Fragment13, { children: [
9730
+ /* @__PURE__ */ jsx31("span", { className: "rounded-sm bg-accent/15 px-1 py-px text-[9px] font-medium uppercase tracking-wide text-accent-foreground", children: "skill" }),
9731
+ cmd.sourcePlugin ? /* @__PURE__ */ jsx31("span", { className: "rounded-sm bg-muted px-1 py-px text-[9px] font-medium text-muted-foreground", children: cmd.sourcePlugin }) : null
9778
9732
  ] }) : cmd.sourcePlugin ? (
9779
9733
  // Originating plugin/package for non-skill commands.
9780
- /* @__PURE__ */ jsx33("span", { className: "rounded-sm bg-muted px-1 py-px text-[9px] font-medium text-muted-foreground", children: cmd.sourcePlugin })
9734
+ /* @__PURE__ */ jsx31("span", { className: "rounded-sm bg-muted px-1 py-px text-[9px] font-medium text-muted-foreground", children: cmd.sourcePlugin })
9781
9735
  ) : null
9782
9736
  ] }),
9783
- /* @__PURE__ */ jsx33("span", { className: "truncate text-[11px] opacity-50", children: cmd.description })
9737
+ /* @__PURE__ */ jsx31("span", { className: "truncate text-[11px] opacity-50", children: cmd.description })
9784
9738
  ]
9785
9739
  },
9786
9740
  cmd.name
@@ -9791,10 +9745,10 @@ function SlashCommandPicker({ query, commands, onSelect, onDismiss }) {
9791
9745
  // src/front/chat/components/ComposerAttachments.tsx
9792
9746
  import { AlertCircleIcon as AlertCircleIcon2, Loader2 as Loader22, PaperclipIcon as PaperclipIcon2 } from "lucide-react";
9793
9747
  import { IconButton as IconButton3 } from "@hachej/boring-ui-kit";
9794
- import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
9748
+ import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
9795
9749
  function AttachmentButton({ disabled, className }) {
9796
9750
  const attachments = usePromptInputAttachments();
9797
- return /* @__PURE__ */ jsx34(
9751
+ return /* @__PURE__ */ jsx32(
9798
9752
  IconButton3,
9799
9753
  {
9800
9754
  type: "button",
@@ -9807,21 +9761,21 @@ function AttachmentButton({ disabled, className }) {
9807
9761
  className: cn(composerActionClass, "composer-attachment-button !h-10 !w-10", className),
9808
9762
  "aria-label": "Attach files",
9809
9763
  title: disabled ? "Attachments are available when the composer is ready." : "Attach files",
9810
- children: /* @__PURE__ */ jsx34(PaperclipIcon2, { className: "h-4 w-4", strokeWidth: 1.75 })
9764
+ children: /* @__PURE__ */ jsx32(PaperclipIcon2, { className: "h-4 w-4", strokeWidth: 1.75 })
9811
9765
  }
9812
9766
  );
9813
9767
  }
9814
9768
  function AttachmentsList() {
9815
9769
  const attachments = usePromptInputAttachments();
9816
9770
  if (attachments.files.length === 0) return null;
9817
- return /* @__PURE__ */ jsx34(
9771
+ return /* @__PURE__ */ jsx32(
9818
9772
  Attachments,
9819
9773
  {
9820
9774
  "data-boring-agent-part": "composer-attachment-row",
9821
9775
  "data-align": "block-start",
9822
9776
  variant: "inline",
9823
9777
  className: "w-full flex-wrap items-center justify-start gap-2 px-5 pb-0 pt-3",
9824
- children: attachments.files.map((file) => /* @__PURE__ */ jsxs29(
9778
+ children: attachments.files.map((file) => /* @__PURE__ */ jsxs28(
9825
9779
  Attachment,
9826
9780
  {
9827
9781
  data: file,
@@ -9832,13 +9786,13 @@ function AttachmentsList() {
9832
9786
  file.status === "error" && "!border-destructive/50 !bg-destructive/10"
9833
9787
  ),
9834
9788
  children: [
9835
- /* @__PURE__ */ jsxs29("div", { className: "relative shrink-0", children: [
9836
- /* @__PURE__ */ jsx34(AttachmentPreview, { className: "!size-7 overflow-hidden !rounded-full bg-background/60" }),
9837
- file.status === "uploading" ? /* @__PURE__ */ jsx34("div", { className: "absolute inset-0 flex items-center justify-center rounded-full bg-background/70", children: /* @__PURE__ */ jsx34(Loader22, { className: "size-3.5 animate-spin text-muted-foreground" }) }) : null,
9838
- file.status === "error" ? /* @__PURE__ */ jsx34("div", { className: "absolute inset-0 flex items-center justify-center rounded-full bg-destructive/20", children: /* @__PURE__ */ jsx34(AlertCircleIcon2, { className: "size-3.5 text-destructive" }) }) : null
9789
+ /* @__PURE__ */ jsxs28("div", { className: "relative shrink-0", children: [
9790
+ /* @__PURE__ */ jsx32(AttachmentPreview, { className: "!size-7 overflow-hidden !rounded-full bg-background/60" }),
9791
+ file.status === "uploading" ? /* @__PURE__ */ jsx32("div", { className: "absolute inset-0 flex items-center justify-center rounded-full bg-background/70", children: /* @__PURE__ */ jsx32(Loader22, { className: "size-3.5 animate-spin text-muted-foreground" }) }) : null,
9792
+ file.status === "error" ? /* @__PURE__ */ jsx32("div", { className: "absolute inset-0 flex items-center justify-center rounded-full bg-destructive/20", children: /* @__PURE__ */ jsx32(AlertCircleIcon2, { className: "size-3.5 text-destructive" }) }) : null
9839
9793
  ] }),
9840
- /* @__PURE__ */ jsx34(AttachmentInfo, { className: "min-w-0 !max-w-[180px] truncate text-[13px] font-medium" }),
9841
- /* @__PURE__ */ jsx34(AttachmentRemove, { className: "composer-attachment-remove !size-5 !rounded-full !opacity-100 text-muted-foreground/80 hover:text-foreground" })
9794
+ /* @__PURE__ */ jsx32(AttachmentInfo, { className: "min-w-0 !max-w-[180px] truncate text-[13px] font-medium" }),
9795
+ /* @__PURE__ */ jsx32(AttachmentRemove, { className: "composer-attachment-remove !size-5 !rounded-full !opacity-100 text-muted-foreground/80 hover:text-foreground" })
9842
9796
  ]
9843
9797
  },
9844
9798
  file.id
@@ -9848,7 +9802,7 @@ function AttachmentsList() {
9848
9802
  }
9849
9803
 
9850
9804
  // src/front/chat/components/PiChatComposerSurface.tsx
9851
- import { jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
9805
+ import { jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
9852
9806
  var MAX_PROMPT_ATTACHMENTS = 2;
9853
9807
  var MAX_PROMPT_ATTACHMENT_BYTES = 10 * 1024 * 1024;
9854
9808
  var COMPOSER_INPUT_GROUP_MIN_HEIGHT = 56;
@@ -9963,11 +9917,11 @@ function PiChatComposerSurface({
9963
9917
  useLayoutEffect3(() => {
9964
9918
  resizeTextarea(textareaRef.current);
9965
9919
  }, [draft, resizeTextarea, textareaRef]);
9966
- return /* @__PURE__ */ jsxs30("div", { className: cn(
9920
+ return /* @__PURE__ */ jsxs29("div", { className: cn(
9967
9921
  "relative z-20",
9968
9922
  chrome ? "pb-[calc(1rem+env(safe-area-inset-bottom))] pl-[calc(1rem+env(safe-area-inset-left))] pr-[calc(1rem+env(safe-area-inset-right))] pt-2 sm:pb-[calc(1.25rem+env(safe-area-inset-bottom))] sm:pl-[calc(1.5rem+env(safe-area-inset-left))] sm:pr-[calc(1.5rem+env(safe-area-inset-right))]" : "pb-[calc(0.5rem+env(safe-area-inset-bottom))] pl-[calc(0.75rem+env(safe-area-inset-left))] pr-[calc(0.75rem+env(safe-area-inset-right))] pt-1"
9969
9923
  ), children: [
9970
- /* @__PURE__ */ jsx35(
9924
+ /* @__PURE__ */ jsx33(
9971
9925
  "div",
9972
9926
  {
9973
9927
  "data-boring-agent-part": "chat-working-slot",
@@ -9977,7 +9931,7 @@ function PiChatComposerSurface({
9977
9931
  isStreaming ? "mb-2 max-h-8 opacity-100" : "mb-0 max-h-0 opacity-0"
9978
9932
  ),
9979
9933
  "aria-hidden": !isStreaming,
9980
- children: /* @__PURE__ */ jsxs30(
9934
+ children: /* @__PURE__ */ jsxs29(
9981
9935
  "div",
9982
9936
  {
9983
9937
  "data-testid": isStreaming ? "chat-working" : void 0,
@@ -9985,7 +9939,7 @@ function PiChatComposerSurface({
9985
9939
  "aria-live": isStreaming ? "polite" : void 0,
9986
9940
  className: "inline-flex items-center gap-2 rounded-full border border-border/50 bg-background/85 px-2.5 py-1 text-[12px] text-foreground shadow-sm backdrop-blur",
9987
9941
  children: [
9988
- /* @__PURE__ */ jsx35(
9942
+ /* @__PURE__ */ jsx33(
9989
9943
  motion2.span,
9990
9944
  {
9991
9945
  "aria-hidden": "true",
@@ -9994,14 +9948,14 @@ function PiChatComposerSurface({
9994
9948
  transition: prefersReducedMotion ? { duration: 0 } : { duration: 1.2, repeat: Infinity, ease: "easeInOut" }
9995
9949
  }
9996
9950
  ),
9997
- /* @__PURE__ */ jsx35("span", { children: "Working\u2026" })
9951
+ /* @__PURE__ */ jsx33("span", { children: "Working\u2026" })
9998
9952
  ]
9999
9953
  }
10000
9954
  )
10001
9955
  }
10002
9956
  ),
10003
- composerStatusNotice ? /* @__PURE__ */ jsx35(ComposerRuntimeNotice, { notice: composerStatusNotice }) : null,
10004
- composerBlocked && !workspaceWarmupBlocked ? /* @__PURE__ */ jsx35(
9957
+ composerStatusNotice ? /* @__PURE__ */ jsx33(ComposerRuntimeNotice, { notice: composerStatusNotice }) : null,
9958
+ composerBlocked && !workspaceWarmupBlocked ? /* @__PURE__ */ jsx33(
10005
9959
  ComposerBlockerNotice,
10006
9960
  {
10007
9961
  blocker: primaryComposerBlocker,
@@ -10009,8 +9963,8 @@ function PiChatComposerSurface({
10009
9963
  onAction: onComposerBlockerAction
10010
9964
  }
10011
9965
  ) : null,
10012
- queuePreview.length > 0 ? /* @__PURE__ */ jsx35(QueuedComposerNotice, { followUps: queuePreview, onEdit: onEditQueued }) : null,
10013
- hotReloadEnabled ? /* @__PURE__ */ jsx35(
9966
+ queuePreview.length > 0 ? /* @__PURE__ */ jsx33(QueuedComposerNotice, { followUps: queuePreview, onEdit: onEditQueued }) : null,
9967
+ hotReloadEnabled ? /* @__PURE__ */ jsx33(
10014
9968
  PluginUpdateStatus,
10015
9969
  {
10016
9970
  state: pluginUpdateState,
@@ -10018,14 +9972,14 @@ function PiChatComposerSurface({
10018
9972
  onRetry: onRunPluginUpdate
10019
9973
  }
10020
9974
  ) : null,
10021
- /* @__PURE__ */ jsx35(
9975
+ /* @__PURE__ */ jsx33(
10022
9976
  CommandRunStatus,
10023
9977
  {
10024
9978
  state: commandNotifyState,
10025
9979
  onDismiss: onDismissCommandNotify
10026
9980
  }
10027
9981
  ),
10028
- attachmentNotice ? /* @__PURE__ */ jsx35(
9982
+ attachmentNotice ? /* @__PURE__ */ jsx33(
10029
9983
  "div",
10030
9984
  {
10031
9985
  role: "status",
@@ -10034,12 +9988,12 @@ function PiChatComposerSurface({
10034
9988
  children: attachmentNotice
10035
9989
  }
10036
9990
  ) : null,
10037
- /* @__PURE__ */ jsxs30("div", { className: cn("@container group/composer relative mx-auto w-full", chrome ? "max-w-3xl" : "max-w-[680px]"), children: [
10038
- /* @__PURE__ */ jsxs30("div", { className: cn(
9991
+ /* @__PURE__ */ jsxs29("div", { className: cn("@container group/composer relative mx-auto w-full", chrome ? "max-w-3xl" : "max-w-[680px]"), children: [
9992
+ /* @__PURE__ */ jsxs29("div", { className: cn(
10039
9993
  "absolute inset-x-0 z-30",
10040
9994
  pickerPlacement === "above-compact" ? "bottom-[calc(100%+4px)] [&_[cmdk-list]]:!max-h-[200px]" : "bottom-[calc(100%+4px)]"
10041
9995
  ), children: [
10042
- mentionState ? /* @__PURE__ */ jsx35("div", { className: "mr-px ml-[43px]", children: /* @__PURE__ */ jsx35(
9996
+ mentionState ? /* @__PURE__ */ jsx33("div", { className: "mr-px ml-[43px]", children: /* @__PURE__ */ jsx33(
10043
9997
  MentionPicker,
10044
9998
  {
10045
9999
  mention: mentionState,
@@ -10051,7 +10005,7 @@ function PiChatComposerSurface({
10051
10005
  onDismiss: onDismissMention
10052
10006
  }
10053
10007
  ) }) : null,
10054
- slashQuery !== null ? /* @__PURE__ */ jsx35("div", { className: "mr-px ml-[43px]", children: /* @__PURE__ */ jsx35(
10008
+ slashQuery !== null ? /* @__PURE__ */ jsx33("div", { className: "mr-px ml-[43px]", children: /* @__PURE__ */ jsx33(
10055
10009
  SlashCommandPicker,
10056
10010
  {
10057
10011
  query: slashQuery,
@@ -10060,7 +10014,7 @@ function PiChatComposerSurface({
10060
10014
  onDismiss: onDismissSlash
10061
10015
  }
10062
10016
  ) }) : null,
10063
- mentionState === null && slashQuery === null && modelPickerOpen ? /* @__PURE__ */ jsx35("div", { className: "mr-px mb-1 ml-[43px]", children: /* @__PURE__ */ jsx35(
10017
+ mentionState === null && slashQuery === null && modelPickerOpen ? /* @__PURE__ */ jsx33("div", { className: "mr-px mb-1 ml-[43px]", children: /* @__PURE__ */ jsx33(
10064
10018
  ModelPickerMenu,
10065
10019
  {
10066
10020
  value: selectedModel,
@@ -10071,7 +10025,7 @@ function PiChatComposerSurface({
10071
10025
  onClose: () => onSetModelPickerOpen(false)
10072
10026
  }
10073
10027
  ) }) : null,
10074
- mentionState === null && slashQuery === null && thinkingPickerOpen ? /* @__PURE__ */ jsx35("div", { className: "mr-px mb-1 ml-[43px]", children: /* @__PURE__ */ jsx35(
10028
+ mentionState === null && slashQuery === null && thinkingPickerOpen ? /* @__PURE__ */ jsx33("div", { className: "mr-px mb-1 ml-[43px]", children: /* @__PURE__ */ jsx33(
10075
10029
  ThinkingPickerMenu,
10076
10030
  {
10077
10031
  value: selectedThinking,
@@ -10081,17 +10035,17 @@ function PiChatComposerSurface({
10081
10035
  }
10082
10036
  ) }) : null
10083
10037
  ] }),
10084
- composerContributions.map(({ id, Top }) => Top ? /* @__PURE__ */ jsx35(
10038
+ composerContributions.map(({ id, Top }) => Top ? /* @__PURE__ */ jsx33(
10085
10039
  "div",
10086
10040
  {
10087
10041
  "data-boring-agent-part": "composer-contribution-top",
10088
10042
  "data-boring-agent-contribution-id": id,
10089
10043
  className: cn("mx-auto mb-2 w-full empty:hidden", chrome ? "max-w-3xl" : "max-w-[680px]"),
10090
- children: /* @__PURE__ */ jsx35(Top, {})
10044
+ children: /* @__PURE__ */ jsx33(Top, {})
10091
10045
  },
10092
10046
  id
10093
10047
  ) : null),
10094
- /* @__PURE__ */ jsx35(
10048
+ /* @__PURE__ */ jsx33(
10095
10049
  "div",
10096
10050
  {
10097
10051
  "data-boring-agent-part": "composer-rail",
@@ -10110,7 +10064,7 @@ function PiChatComposerSurface({
10110
10064
  "[&[data-composer-multiline=true]_[data-boring-agent-part=composer-submit-addon]]:self-end",
10111
10065
  "[&[data-composer-multiline=true]_[data-boring-agent-part=composer-submit-addon]]:mb-2"
10112
10066
  ),
10113
- children: /* @__PURE__ */ jsxs30(
10067
+ children: /* @__PURE__ */ jsxs29(
10114
10068
  PromptInput,
10115
10069
  {
10116
10070
  "data-boring-state": status,
@@ -10126,15 +10080,15 @@ function PiChatComposerSurface({
10126
10080
  else onAttachmentNotice(err.message || "Attachment rejected.");
10127
10081
  },
10128
10082
  children: [
10129
- /* @__PURE__ */ jsx35(AttachmentsList, {}),
10130
- /* @__PURE__ */ jsxs30(
10083
+ /* @__PURE__ */ jsx33(AttachmentsList, {}),
10084
+ /* @__PURE__ */ jsxs29(
10131
10085
  "div",
10132
10086
  {
10133
10087
  "data-boring-agent-part": "composer-input-row",
10134
10088
  className: "flex min-h-[var(--composer-input-group-height)] w-full items-center",
10135
10089
  children: [
10136
- /* @__PURE__ */ jsx35("div", { className: "flex h-14 shrink-0 items-center pl-2", children: /* @__PURE__ */ jsx35(AttachmentButton, { disabled: disabled || isStreaming }) }),
10137
- /* @__PURE__ */ jsx35(
10090
+ /* @__PURE__ */ jsx33("div", { className: "flex h-14 shrink-0 items-center pl-2", children: /* @__PURE__ */ jsx33(AttachmentButton, { disabled: disabled || isStreaming }) }),
10091
+ /* @__PURE__ */ jsx33(
10138
10092
  PromptInputTextarea,
10139
10093
  {
10140
10094
  value: draft,
@@ -10158,24 +10112,24 @@ function PiChatComposerSurface({
10158
10112
  )
10159
10113
  }
10160
10114
  ),
10161
- /* @__PURE__ */ jsx35(
10115
+ /* @__PURE__ */ jsx33(
10162
10116
  PromptInputFooter,
10163
10117
  {
10164
10118
  align: "inline-end",
10165
10119
  "data-boring-agent-part": "composer-submit-addon",
10166
10120
  className: "!order-none !w-auto shrink-0 self-center justify-between border-0 bg-transparent !px-2 !py-0",
10167
- children: /* @__PURE__ */ jsxs30("div", { className: "ml-auto flex items-center gap-1.5", children: [
10168
- composerContributions.map(({ id, Action }) => Action ? /* @__PURE__ */ jsx35(
10121
+ children: /* @__PURE__ */ jsxs29("div", { className: "ml-auto flex items-center gap-1.5", children: [
10122
+ composerContributions.map(({ id, Action }) => Action ? /* @__PURE__ */ jsx33(
10169
10123
  "span",
10170
10124
  {
10171
10125
  "data-boring-agent-part": "composer-contribution-action",
10172
10126
  "data-boring-agent-contribution-id": id,
10173
10127
  className: "contents",
10174
- children: /* @__PURE__ */ jsx35(Action, { updateDraft })
10128
+ children: /* @__PURE__ */ jsx33(Action, { updateDraft })
10175
10129
  },
10176
10130
  id
10177
10131
  ) : null),
10178
- /* @__PURE__ */ jsx35(
10132
+ /* @__PURE__ */ jsx33(
10179
10133
  PromptInputSubmit,
10180
10134
  {
10181
10135
  "data-boring-agent-part": "composer-submit",
@@ -10205,7 +10159,7 @@ function PiChatComposerSurface({
10205
10159
  )
10206
10160
  }
10207
10161
  ),
10208
- hideComposerSettings ? null : /* @__PURE__ */ jsx35(
10162
+ hideComposerSettings ? null : /* @__PURE__ */ jsx33(
10209
10163
  "div",
10210
10164
  {
10211
10165
  "data-boring-agent-part": "composer-settings-row",
@@ -10213,8 +10167,8 @@ function PiChatComposerSurface({
10213
10167
  "mx-auto mt-2 grid min-h-8 w-full grid-cols-[minmax(0,1fr)_auto] items-center text-xs text-muted-foreground",
10214
10168
  chrome ? "max-w-3xl" : "max-w-[680px]"
10215
10169
  ),
10216
- children: /* @__PURE__ */ jsxs30("div", { className: "flex min-w-0 items-center justify-center gap-1", children: [
10217
- /* @__PURE__ */ jsx35(
10170
+ children: /* @__PURE__ */ jsxs29("div", { className: "flex min-w-0 items-center justify-center gap-1", children: [
10171
+ /* @__PURE__ */ jsx33(
10218
10172
  ModelSelectTrigger,
10219
10173
  {
10220
10174
  value: selectedModel,
@@ -10232,7 +10186,7 @@ function PiChatComposerSurface({
10232
10186
  }
10233
10187
  }
10234
10188
  ),
10235
- thinkingControl ? /* @__PURE__ */ jsx35(
10189
+ thinkingControl ? /* @__PURE__ */ jsx33(
10236
10190
  ThinkingSelectTrigger,
10237
10191
  {
10238
10192
  value: selectedThinking,
@@ -10463,8 +10417,8 @@ function useRemotePiSessionState(session) {
10463
10417
  }
10464
10418
 
10465
10419
  // src/front/chat/PiChatPanel.tsx
10466
- import { jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
10467
- var DebugDrawer2 = lazy(() => import("../DebugDrawer-2TO5SE2D.js").then((m) => ({ default: m.DebugDrawer })));
10420
+ import { jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
10421
+ var DebugDrawer2 = lazy(() => import("../DebugDrawer-JNA43SVR.js").then((m) => ({ default: m.DebugDrawer })));
10468
10422
  var EMPTY_COMMANDS = [];
10469
10423
  var EMPTY_COMMAND_NAMES = [];
10470
10424
  var EMPTY_BLOCKERS = [];
@@ -11267,7 +11221,7 @@ function PiChatPanel({
11267
11221
  if (result === false) setComposerDraft(text);
11268
11222
  });
11269
11223
  }, [sendComposerMessage, setComposerDraft]);
11270
- const composerSurface = /* @__PURE__ */ jsx36(
11224
+ const composerSurface = /* @__PURE__ */ jsx34(
11271
11225
  PiChatComposerSurface,
11272
11226
  {
11273
11227
  chrome,
@@ -11332,7 +11286,7 @@ function PiChatPanel({
11332
11286
  onStop: stop
11333
11287
  }
11334
11288
  );
11335
- return /* @__PURE__ */ jsx36(ArtifactOpenProvider, { onOpenArtifact, children: /* @__PURE__ */ jsxs31(
11289
+ return /* @__PURE__ */ jsx34(ArtifactOpenProvider, { onOpenArtifact, children: /* @__PURE__ */ jsxs30(
11336
11290
  "div",
11337
11291
  {
11338
11292
  "data-boring-agent": "",
@@ -11350,7 +11304,7 @@ function PiChatPanel({
11350
11304
  role: "region",
11351
11305
  "aria-label": "Agent assistant",
11352
11306
  children: [
11353
- showSessionSidebar ? /* @__PURE__ */ jsx36("aside", { "data-boring-agent-part": "pi-chat-session-sidebar", className: "min-h-0 w-64 shrink-0 border-r border-border/60", children: /* @__PURE__ */ jsx36(
11307
+ showSessionSidebar ? /* @__PURE__ */ jsx34("aside", { "data-boring-agent-part": "pi-chat-session-sidebar", className: "min-h-0 w-64 shrink-0 border-r border-border/60", children: /* @__PURE__ */ jsx34(
11354
11308
  SessionList,
11355
11309
  {
11356
11310
  sessions: sessionList,
@@ -11364,7 +11318,7 @@ function PiChatPanel({
11364
11318
  loadingMore: sessions.loadingMore
11365
11319
  }
11366
11320
  ) }) : null,
11367
- /* @__PURE__ */ jsx36("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: /* @__PURE__ */ jsxs31(
11321
+ /* @__PURE__ */ jsx34("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: /* @__PURE__ */ jsxs30(
11368
11322
  "div",
11369
11323
  {
11370
11324
  className: cn(
@@ -11373,7 +11327,7 @@ function PiChatPanel({
11373
11327
  chrome && "mx-3 my-3 rounded-xl bg-[color:var(--surface-chat)] shadow-[0_1px_0_oklch(0_0_0/0.02),0_1px_2px_-1px_oklch(0_0_0/0.04),inset_0_0_0_1px_oklch(from_var(--border)_l_c_h/0.6)]"
11374
11328
  ),
11375
11329
  children: [
11376
- /* @__PURE__ */ jsx36(
11330
+ /* @__PURE__ */ jsx34(
11377
11331
  PiConversationSurface,
11378
11332
  {
11379
11333
  chrome,
@@ -11399,13 +11353,13 @@ function PiChatPanel({
11399
11353
  }
11400
11354
  ),
11401
11355
  composerSurface,
11402
- emptyHero ? /* @__PURE__ */ jsxs31(
11356
+ emptyHero ? /* @__PURE__ */ jsxs30(
11403
11357
  "div",
11404
11358
  {
11405
11359
  "data-boring-agent-part": "empty-hero-suggestions",
11406
11360
  className: "@container mx-auto w-full max-w-[640px] px-2 pb-4",
11407
11361
  children: [
11408
- /* @__PURE__ */ jsx36(ChatSuggestionGrid, { suggestions, onSelect: selectEmptySuggestion, className: "mt-4" }),
11362
+ /* @__PURE__ */ jsx34(ChatSuggestionGrid, { suggestions, onSelect: selectEmptySuggestion, className: "mt-4" }),
11409
11363
  emptyState?.footer
11410
11364
  ]
11411
11365
  }
@@ -11413,7 +11367,7 @@ function PiChatPanel({
11413
11367
  ]
11414
11368
  }
11415
11369
  ) }),
11416
- debug ? /* @__PURE__ */ jsx36(Suspense, { fallback: null, children: /* @__PURE__ */ jsx36("div", { "aria-label": "Chat debug metadata", className: "contents", role: "region", children: /* @__PURE__ */ jsx36(
11370
+ debug ? /* @__PURE__ */ jsx34(Suspense, { fallback: null, children: /* @__PURE__ */ jsx34("div", { "aria-label": "Chat debug metadata", className: "contents", role: "region", children: /* @__PURE__ */ jsx34(
11417
11371
  DebugDrawer2,
11418
11372
  {
11419
11373
  agentTypeId,
@@ -11602,7 +11556,13 @@ function getAgentCommands(options = {}) {
11602
11556
  return commands;
11603
11557
  }
11604
11558
  export {
11559
+ Artifact,
11560
+ ArtifactAction,
11561
+ ArtifactActions,
11562
+ ArtifactDescription,
11563
+ ArtifactHeader,
11605
11564
  ArtifactOpenProvider,
11565
+ ArtifactTitle,
11606
11566
  ChatEmptyState,
11607
11567
  ChatMessageContributionProvider,
11608
11568
  PiChatPanel as ChatPanel,