@mcp-b/react-components 0.3.0 → 0.5.0

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 (59) hide show
  1. package/dist/{CodeBlock-C2Xjxu9M.js → CodeBlock-D-a84xBL.js} +1 -1
  2. package/dist/{FileTree-D0c9Yj9U.js → FileTree-D8rtTLgK.js} +1 -1
  3. package/dist/attachment-preview-ChtC3HiU.js +25 -0
  4. package/dist/components/Activity.js +1 -1
  5. package/dist/components/AgentChat.d.ts +31 -1
  6. package/dist/components/AgentChat.js +166 -38
  7. package/dist/components/AgentConnection.js +3 -3
  8. package/dist/components/Artifact.js +1 -1
  9. package/dist/components/BrowserLiveView.js +2 -2
  10. package/dist/components/BrowserReplay.js +1 -1
  11. package/dist/components/ChainOfThought.d.ts +1 -1
  12. package/dist/components/ChainOfThought.js +1 -1
  13. package/dist/components/CodeBlock.js +1 -1
  14. package/dist/components/Commit.js +2 -2
  15. package/dist/components/Context.d.ts +28 -27
  16. package/dist/components/Context.js +48 -47
  17. package/dist/components/ContextMenu.js +1 -1
  18. package/dist/components/Conversation.js +1 -1
  19. package/dist/components/Dialog.js +1 -1
  20. package/dist/components/EnvironmentVariables.js +1 -1
  21. package/dist/components/FileTree.js +1 -1
  22. package/dist/components/Menubar.js +1 -1
  23. package/dist/components/Message.d.ts +16 -2
  24. package/dist/components/Message.js +39 -5
  25. package/dist/components/ModelSelector.js +1 -1
  26. package/dist/components/NavigationMenu.js +1 -1
  27. package/dist/components/PricingPage.js +2 -2
  28. package/dist/components/PromptInput.d.ts +532 -2
  29. package/dist/components/PromptInput.js +158 -20
  30. package/dist/components/Queue.js +1 -1
  31. package/dist/components/Reasoning.js +9 -17
  32. package/dist/components/Select.js +1 -1
  33. package/dist/components/Sources.js +1 -1
  34. package/dist/components/Stepper.js +1 -1
  35. package/dist/components/Task.js +1 -1
  36. package/dist/components/Terminal.js +2 -2
  37. package/dist/components/TestResults.js +1 -1
  38. package/dist/components/ThinkChat.d.ts +24 -5
  39. package/dist/components/ThinkChat.js +87 -19
  40. package/dist/components/WebPreview.js +1 -1
  41. package/dist/components/WorkspaceExplorer.js +3 -3
  42. package/dist/components/icons.d.ts +2 -2
  43. package/dist/components/icons.js +2 -2
  44. package/dist/{copy-button-Dd6DEhOm.js → copy-button-BmJEAKuP.js} +1 -1
  45. package/dist/{icons-DQC4Zw5R.js → icons-CZRH4FVH.js} +1 -15
  46. package/dist/{icons-ctdVxng0.d.ts → icons-CmO7-pNY.d.ts} +1 -2
  47. package/dist/styles/agent-chat.css +39 -6
  48. package/dist/styles/attachment-preview.css +21 -0
  49. package/dist/styles/context.css +9 -17
  50. package/dist/styles/conversation.css +3 -3
  51. package/dist/styles/index.css +1 -1
  52. package/dist/styles/message.css +50 -2
  53. package/dist/styles/prompt-input.css +189 -6
  54. package/dist/styles/reasoning.css +0 -1
  55. package/package.json +2 -2
  56. package/dist/PromptInput-Dzn-fOPc.d.ts +0 -444
  57. package/dist/components/Tool.d.ts +0 -123
  58. package/dist/components/Tool.js +0 -209
  59. package/dist/styles/tool.css +0 -203
@@ -1,7 +1,7 @@
1
1
  import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityOutput, ActivityPanel, ActivityText, ActivityTrigger } from "./Activity.js";
2
2
  import { Tab, TabPanel, Tabs, TabsList } from "./Tabs.js";
3
- import { t as CodeBlock } from "../CodeBlock-C2Xjxu9M.js";
4
3
  import { AgentChat } from "./AgentChat.js";
4
+ import { t as CodeBlock } from "../CodeBlock-D-a84xBL.js";
5
5
  import { BrowserLiveView } from "./BrowserLiveView.js";
6
6
  import { BrowserReplay } from "./BrowserReplay.js";
7
7
  import { WorkspaceExplorer, inferWorkspaceLanguage, useWorkspace } from "./WorkspaceExplorer.js";
@@ -13,7 +13,8 @@ import { useAgent } from "agents/react";
13
13
  //#region src/components/ThinkChat.tsx
14
14
  /**
15
15
  * Think-specific chat rendering: interprets a Think agent's UIMessage stream
16
- * (reasoning + workspace/skill/fetch/browser tool parts) into Activity blocks.
16
+ * (reasoning + workspace/skill/fetch/browser/execute tool parts) into
17
+ * Activity blocks.
17
18
  *
18
19
  * Every shape here mirrors an upstream contract — see docs/think-chat.md
19
20
  * ("Upstream source map" and the re-alignment checklist) for where each comes from,
@@ -55,6 +56,9 @@ const BROWSER_TOOL_NAMES = new Set([
55
56
  function isBrowserToolPart(part) {
56
57
  return isToolUIPart(part) && BROWSER_TOOL_NAMES.has(getToolName(part));
57
58
  }
59
+ function isExecuteToolPart(part) {
60
+ return isToolUIPart(part) && getToolName(part) === "execute";
61
+ }
58
62
  const ThinkChatContext = React.createContext(null);
59
63
  function useThinkChatContext(component) {
60
64
  const context = React.useContext(ThinkChatContext);
@@ -109,13 +113,17 @@ function ThinkChatRoot({ agent: agentOption, name, children }) {
109
113
  * inside the log) or `excludeTools` + your own `renderPart` (standalone
110
114
  * card) — see README "App-specific tools" and the Custom Tool Panel story.
111
115
  */
112
- function ThinkChatMessages({ renderPart, excludeTools, toolRenderers, ...props }) {
116
+ function ThinkChatMessages({ renderPart, excludeTools, toolRenderers, executionApprovals, notice, ...props }) {
113
117
  const chat = useThinkChatContext("ThinkChat.Messages");
114
118
  const status = toAgentChatStatus(chat);
115
119
  const defaultRenderPart = React.useMemo(() => createThinkChatActivityRenderer({
116
120
  excludeTools,
117
121
  toolRenderers
118
122
  }), [excludeTools, toolRenderers]);
123
+ const connectionNotice = chat.isRecovering ? /* @__PURE__ */ jsx(Fragment, { children: "Reconnecting to the agent…" }) : chat.connectionError ? /* @__PURE__ */ jsxs("span", {
124
+ "data-tone": "danger",
125
+ children: ["Connection lost", chat.connectionError.reason ? ` — ${chat.connectionError.reason}` : ""]
126
+ }) : void 0;
119
127
  return /* @__PURE__ */ jsx(AgentChat, {
120
128
  ...props,
121
129
  renderPart: renderPart ?? defaultRenderPart,
@@ -123,9 +131,15 @@ function ThinkChatMessages({ renderPart, excludeTools, toolRenderers, ...props }
123
131
  status,
124
132
  onStop: chat.stop,
125
133
  onApprovalResponse: chat.addToolApprovalResponse,
126
- onSubmit: ({ text }) => {
134
+ executionApprovals,
135
+ notice: notice ?? connectionNotice,
136
+ onRegenerate: (messageId) => void chat.regenerate({ messageId }),
137
+ onSubmit: ({ text, files }) => {
127
138
  const trimmed = text.trim();
128
- if (trimmed) chat.sendMessage({ text: trimmed });
139
+ if (trimmed || files.length) chat.sendMessage({
140
+ text: trimmed,
141
+ files
142
+ });
129
143
  }
130
144
  });
131
145
  }
@@ -177,6 +191,7 @@ function describeThinkChatActivityPart(part, toolRenderers) {
177
191
  if (isSkillToolPart(part)) return describeSkillToolPart(part);
178
192
  if (isFetchToolPart(part)) return describeFetchToolPart(part);
179
193
  if (isBrowserToolPart(part)) return describeBrowserToolPart(part);
194
+ if (isExecuteToolPart(part)) return describeExecuteToolPart(part);
180
195
  if (isToolUIPart(part)) {
181
196
  const name = getToolName(part);
182
197
  const verb = isPartFailed(part) ? `${name} failed` : isPartWorking(part) ? `Running ${name}` : `Ran ${name}`;
@@ -251,6 +266,14 @@ function describeBrowserToolPart(part) {
251
266
  })();
252
267
  return failed ? `${label} · failed` : label;
253
268
  }
269
+ function describeExecuteToolPart(part) {
270
+ const output = part.state === "output-available" ? part.output : void 0;
271
+ if (isPartFailed(part) || output?.status === "error") return "Code failed";
272
+ if (output?.status === "paused") return "Code waiting for approval";
273
+ const label = isPartWorking(part) ? "Running code" : "Ran code";
274
+ const snippet = summarizeToolInput(part.input);
275
+ return snippet ? `${label} · ${snippet}` : label;
276
+ }
254
277
  function describeFetchToolPart(part) {
255
278
  const target = part.input?.url ?? part.input?.path ?? "";
256
279
  const output = part.state === "output-available" ? part.output : void 0;
@@ -266,6 +289,7 @@ function summarizeActivitySteps(parts) {
266
289
  let skillParts = 0;
267
290
  let fetches = 0;
268
291
  let browses = 0;
292
+ let codeRuns = 0;
269
293
  for (const part of parts) if (isReasoningUIPart(part)) thoughts++;
270
294
  else if (isWorkspaceToolPart(part)) {
271
295
  const name = getToolName(part);
@@ -275,6 +299,7 @@ function summarizeActivitySteps(parts) {
275
299
  if (typeof part.input?.name === "string") skillNames.add(part.input.name);
276
300
  } else if (isFetchToolPart(part)) fetches++;
277
301
  else if (isBrowserToolPart(part)) browses++;
302
+ else if (isExecuteToolPart(part)) codeRuns++;
278
303
  else if (isToolUIPart(part)) otherTools.add(getToolName(part));
279
304
  const count = (name) => byTool.get(name) ?? 0;
280
305
  const files = (n) => n === 1 ? "a file" : `${n} files`;
@@ -292,6 +317,7 @@ function summarizeActivitySteps(parts) {
292
317
  if (count("list") > 0) segments.push("listed files");
293
318
  if (fetches > 0) segments.push(fetches === 1 ? "fetched a URL" : `fetched ${fetches} URLs`);
294
319
  if (browses > 0) segments.push("used the browser");
320
+ if (codeRuns > 0) segments.push("ran code");
295
321
  if (commands > 0) segments.push(commands === 1 ? "ran a command" : `ran ${commands} commands`);
296
322
  for (const tool of otherTools) segments.push(`used ${tool}`);
297
323
  if (segments.length === 0) return "Worked";
@@ -359,6 +385,10 @@ function ThinkChatActivityStep({ text, part, toolRenderers }) {
359
385
  label: text,
360
386
  children: /* @__PURE__ */ jsx(ThinkChatBrowserPanel, { part })
361
387
  });
388
+ if (isExecuteToolPart(part)) return /* @__PURE__ */ jsx(ActivityItemGroup, {
389
+ label: text,
390
+ children: /* @__PURE__ */ jsx(ThinkChatExecutePanel, { part })
391
+ });
362
392
  return /* @__PURE__ */ jsx(ActivityItem, { children: text });
363
393
  }
364
394
  function renderDeniedPanel(label, reason) {
@@ -552,6 +582,50 @@ function findBrowserResultMedia(value, depth = 0) {
552
582
  visit(value, depth);
553
583
  return media;
554
584
  }
585
+ function ExecuteCodeView({ code, output, hideResult }) {
586
+ const sections = [
587
+ output && "logs" in output && output.logs?.length ? output.logs.join("\n") : "",
588
+ output?.status === "error" ? output.error : "",
589
+ output?.status === "paused" ? formatPendingActions(output.pending) : "",
590
+ output?.status === "completed" && output.result !== void 0 && !hideResult ? typeof output.result === "string" ? output.result : JSON.stringify(output.result, null, 2) : ""
591
+ ].filter(Boolean);
592
+ return /* @__PURE__ */ jsxs(Fragment, { children: [code ? /* @__PURE__ */ jsx(CodeBlock, {
593
+ className: "activity__code-block",
594
+ code,
595
+ language: "ts"
596
+ }) : null, sections.length ? /* @__PURE__ */ jsx(ActivityOutput, { children: sections.join("\n\n") }) : null] });
597
+ }
598
+ function formatPendingActions(pending) {
599
+ return pending.map((action) => {
600
+ const args = action.args === void 0 ? "" : JSON.stringify(action.args);
601
+ return `awaiting approval: ${action.connector}.${action.method}(${args})`;
602
+ }).join("\n");
603
+ }
604
+ function executeStatusText(output) {
605
+ if (!output) return void 0;
606
+ return output.status === "paused" ? "paused · needs approval" : output.status;
607
+ }
608
+ /** The codemode execute tool as an activity panel: highlighted TypeScript
609
+ plus logs, result, and the paused pending-approval list. */
610
+ function ThinkChatExecutePanel({ part }) {
611
+ if (part.state === "output-error") return /* @__PURE__ */ jsx(ActivityPanel, {
612
+ label: "Code",
613
+ text: part.errorText,
614
+ status: "error",
615
+ error: true
616
+ });
617
+ if (part.state === "output-denied") return renderDeniedPanel("Code", part.approval.reason);
618
+ const output = part.state === "output-available" ? part.output : void 0;
619
+ return /* @__PURE__ */ jsx(ActivityPanel, {
620
+ label: "Code",
621
+ status: executeStatusText(output),
622
+ error: output?.status === "error",
623
+ children: /* @__PURE__ */ jsx(ExecuteCodeView, {
624
+ code: part.input?.code ?? "",
625
+ output
626
+ })
627
+ });
628
+ }
555
629
  function ThinkChatBrowserPanel({ part }) {
556
630
  const [seenAt] = React.useState(() => Date.now());
557
631
  if (part.state === "output-error") return /* @__PURE__ */ jsx(ActivityPanel, {
@@ -566,12 +640,6 @@ function ThinkChatBrowserPanel({ part }) {
566
640
  const code = part.input?.code ?? "";
567
641
  const media = output?.status === "completed" ? findBrowserResultMedia(output.result) : {};
568
642
  const hasMedia = Boolean(media.liveViewUrl || media.screenshot);
569
- const sections = [
570
- output && "logs" in output && output.logs?.length ? output.logs.join("\n") : "",
571
- output?.status === "error" ? output.error : "",
572
- output?.status === "completed" && output.result !== void 0 && !hasMedia ? typeof output.result === "string" ? output.result : JSON.stringify(output.result, null, 2) : ""
573
- ].filter(Boolean);
574
- const status = !output ? void 0 : output.status === "paused" ? "paused · needs approval" : output.status === "error" ? "error" : "completed";
575
643
  const browserView = media.liveViewUrl ? /* @__PURE__ */ jsx(BrowserLiveView, {
576
644
  url: media.liveViewUrl,
577
645
  expiresAt: seenAt + (media.expiresInMs ?? 300 * 1e3),
@@ -584,16 +652,16 @@ function ThinkChatBrowserPanel({ part }) {
584
652
  src: media.screenshot,
585
653
  alt: "Browser screenshot"
586
654
  }) : null;
587
- const codeView = /* @__PURE__ */ jsxs(Fragment, { children: [code ? /* @__PURE__ */ jsx(CodeBlock, {
588
- className: "activity__code-block",
655
+ const codeView = /* @__PURE__ */ jsx(ExecuteCodeView, {
589
656
  code,
590
- language: "js"
591
- }) : null, sections.length ? /* @__PURE__ */ jsx(ActivityOutput, { children: sections.join("\n\n") }) : null] });
657
+ output,
658
+ hideResult: hasMedia
659
+ });
592
660
  return /* @__PURE__ */ jsx(ActivityPanel, {
593
661
  label: "Browser",
594
- status,
662
+ status: executeStatusText(output),
595
663
  error: output?.status === "error",
596
- children: browserView && (code || sections.length) ? /* @__PURE__ */ jsxs(Tabs, {
664
+ children: browserView && code ? /* @__PURE__ */ jsxs(Tabs, {
597
665
  className: "activity__browser-tabs",
598
666
  defaultValue: "browser",
599
667
  children: [
@@ -616,7 +684,7 @@ function ThinkChatBrowserPanel({ part }) {
616
684
  children: codeView
617
685
  })
618
686
  ]
619
- }) : /* @__PURE__ */ jsxs(Fragment, { children: [browserView, code || sections.length ? codeView : null] })
687
+ }) : /* @__PURE__ */ jsxs(Fragment, { children: [browserView, codeView] })
620
688
  });
621
689
  }
622
690
  const output = part.state === "output-available" ? part.output : void 0;
@@ -652,7 +720,7 @@ function ThinkChatActivityGroup({ message, parts, isTrailing, toolRenderers }) {
652
720
  * parts (reasoning + tool calls) into one collapsed Activity box. Everything
653
721
  * is derived from the UIMessage stream: part order, tool states, reasoning
654
722
  * state. Excluded tools split the run and return undefined so your own
655
- * renderPart (or the generic Tool card) takes over for them.
723
+ * renderPart (or AgentChat's generic activity row) takes over for them.
656
724
  */
657
725
  function createThinkChatActivityRenderer({ excludeTools, toolRenderers } = {}) {
658
726
  const excluded = excludeTools?.length ? new Set(excludeTools) : void 0;
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { O as RefreshIcon, n as ArrowLeftIcon, r as ArrowRightIcon, s as ChevronDownIcon } from "../icons-DQC4Zw5R.js";
2
+ import { D as RefreshIcon, n as ArrowLeftIcon, o as ChevronDownIcon, r as ArrowRightIcon } from "../icons-CZRH4FVH.js";
3
3
  import { Button } from "./Button.js";
4
4
  import { Tooltip, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipTrigger } from "./Tooltip.js";
5
5
  import { Badge } from "./Badge.js";
@@ -1,8 +1,8 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { O as RefreshIcon, h as FileIcon, k as SearchIcon, n as ArrowLeftIcon } from "../icons-DQC4Zw5R.js";
2
+ import { D as RefreshIcon, O as SearchIcon, m as FileIcon, n as ArrowLeftIcon } from "../icons-CZRH4FVH.js";
3
3
  import { Button } from "./Button.js";
4
- import { a as CodeBlockCopyButton, i as CodeBlockContent, n as CodeBlockActions, o as CodeBlockFilename, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock } from "../CodeBlock-C2Xjxu9M.js";
5
- import { i as FileTreeFolder, r as FileTreeFile, t as FileTree } from "../FileTree-D0c9Yj9U.js";
4
+ import { a as CodeBlockCopyButton, i as CodeBlockContent, n as CodeBlockActions, o as CodeBlockFilename, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock } from "../CodeBlock-D-a84xBL.js";
5
+ import { i as FileTreeFolder, r as FileTreeFile, t as FileTree } from "../FileTree-D8rtTLgK.js";
6
6
  import * as React from "react";
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region src/components/WorkspaceExplorer.tsx
@@ -1,2 +1,2 @@
1
- import { A as SearchIcon, C as MinusIcon, D as PlayIcon, E as PencilIcon, F as WrenchIcon, I as XIcon, M as SquareIcon, N as TerminalIcon, O as PlusIcon, P as WarningIcon, S as MaximizeIcon, T as PauseIcon, _ as FolderOpenIcon, a as BrainIcon, b as InfoIcon, c as ChevronLeftIcon, d as DotIcon, f as DownloadIcon, g as FolderIcon, h as FileIcon, i as ArrowUpIcon, j as SpinnerIcon, k as RefreshIcon, l as ChevronRightIcon, m as EyeOffIcon, n as ArrowLeftIcon, o as CheckIcon, p as EyeIcon, r as ArrowRightIcon, s as ChevronDownIcon, t as ArrowDownIcon, u as CopyIcon, v as IconProps, w as MonitorIcon, x as LinkIcon, y as ImageIcon } from "../icons-ctdVxng0.js";
2
- export { ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, BrainIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CopyIcon, DotIcon, DownloadIcon, EyeIcon, EyeOffIcon, FileIcon, FolderIcon, FolderOpenIcon, IconProps, ImageIcon, InfoIcon, LinkIcon, MaximizeIcon, MinusIcon, MonitorIcon, PauseIcon, PencilIcon, PlayIcon, PlusIcon, RefreshIcon, SearchIcon, SpinnerIcon, SquareIcon, TerminalIcon, WarningIcon, WrenchIcon, XIcon };
1
+ import { A as SpinnerIcon, C as MonitorIcon, D as PlusIcon, E as PlayIcon, F as XIcon, M as TerminalIcon, N as WarningIcon, O as RefreshIcon, P as WrenchIcon, S as MinusIcon, T as PencilIcon, _ as IconProps, a as CheckIcon, b as LinkIcon, c as ChevronRightIcon, d as DownloadIcon, f as EyeIcon, g as FolderOpenIcon, h as FolderIcon, i as ArrowUpIcon, j as SquareIcon, k as SearchIcon, l as CopyIcon, m as FileIcon, n as ArrowLeftIcon, o as ChevronDownIcon, p as EyeOffIcon, r as ArrowRightIcon, s as ChevronLeftIcon, t as ArrowDownIcon, u as DotIcon, v as ImageIcon, w as PauseIcon, x as MaximizeIcon, y as InfoIcon } from "../icons-CmO7-pNY.js";
2
+ export { ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CopyIcon, DotIcon, DownloadIcon, EyeIcon, EyeOffIcon, FileIcon, FolderIcon, FolderOpenIcon, IconProps, ImageIcon, InfoIcon, LinkIcon, MaximizeIcon, MinusIcon, MonitorIcon, PauseIcon, PencilIcon, PlayIcon, PlusIcon, RefreshIcon, SearchIcon, SpinnerIcon, SquareIcon, TerminalIcon, WarningIcon, WrenchIcon, XIcon };
@@ -1,2 +1,2 @@
1
- import { A as SpinnerIcon, C as MonitorIcon, D as PlusIcon, E as PlayIcon, F as XIcon, M as TerminalIcon, N as WarningIcon, O as RefreshIcon, P as WrenchIcon, S as MinusIcon, T as PencilIcon, _ as FolderOpenIcon, a as BrainIcon, b as LinkIcon, c as ChevronLeftIcon, d as DotIcon, f as DownloadIcon, g as FolderIcon, h as FileIcon, i as ArrowUpIcon, j as SquareIcon, k as SearchIcon, l as ChevronRightIcon, m as EyeOffIcon, n as ArrowLeftIcon, o as CheckIcon, p as EyeIcon, r as ArrowRightIcon, s as ChevronDownIcon, t as ArrowDownIcon, u as CopyIcon, v as ImageIcon, w as PauseIcon, x as MaximizeIcon, y as InfoIcon } from "../icons-DQC4Zw5R.js";
2
- export { ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, BrainIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CopyIcon, DotIcon, DownloadIcon, EyeIcon, EyeOffIcon, FileIcon, FolderIcon, FolderOpenIcon, ImageIcon, InfoIcon, LinkIcon, MaximizeIcon, MinusIcon, MonitorIcon, PauseIcon, PencilIcon, PlayIcon, PlusIcon, RefreshIcon, SearchIcon, SpinnerIcon, SquareIcon, TerminalIcon, WarningIcon, WrenchIcon, XIcon };
1
+ import { A as SquareIcon, C as PauseIcon, D as RefreshIcon, E as PlusIcon, M as WarningIcon, N as WrenchIcon, O as SearchIcon, P as XIcon, S as MonitorIcon, T as PlayIcon, _ as ImageIcon, a as CheckIcon, b as MaximizeIcon, c as ChevronRightIcon, d as DownloadIcon, f as EyeIcon, g as FolderOpenIcon, h as FolderIcon, i as ArrowUpIcon, j as TerminalIcon, k as SpinnerIcon, l as CopyIcon, m as FileIcon, n as ArrowLeftIcon, o as ChevronDownIcon, p as EyeOffIcon, r as ArrowRightIcon, s as ChevronLeftIcon, t as ArrowDownIcon, u as DotIcon, v as InfoIcon, w as PencilIcon, x as MinusIcon, y as LinkIcon } from "../icons-CZRH4FVH.js";
2
+ export { ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CopyIcon, DotIcon, DownloadIcon, EyeIcon, EyeOffIcon, FileIcon, FolderIcon, FolderOpenIcon, ImageIcon, InfoIcon, LinkIcon, MaximizeIcon, MinusIcon, MonitorIcon, PauseIcon, PencilIcon, PlayIcon, PlusIcon, RefreshIcon, SearchIcon, SpinnerIcon, SquareIcon, TerminalIcon, WarningIcon, WrenchIcon, XIcon };
@@ -1,4 +1,4 @@
1
- import { o as CheckIcon, u as CopyIcon } from "./icons-DQC4Zw5R.js";
1
+ import { a as CheckIcon, l as CopyIcon } from "./icons-CZRH4FVH.js";
2
2
  import { Button } from "./components/Button.js";
3
3
  import { Tooltip, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipTrigger } from "./components/Tooltip.js";
4
4
  import * as React from "react";
@@ -29,20 +29,6 @@ const ChevronLeftIcon = (props) => /* @__PURE__ */ jsx(Icon, {
29
29
  ...props,
30
30
  children: /* @__PURE__ */ jsx("path", { d: "M10 3.5L5.5 8L10 12.5" })
31
31
  });
32
- const BrainIcon = (props) => /* @__PURE__ */ jsxs(Icon, {
33
- viewBox: "0 0 24 24",
34
- ...props,
35
- children: [
36
- /* @__PURE__ */ jsx("path", { d: "M12 18V5" }),
37
- /* @__PURE__ */ jsx("path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4" }),
38
- /* @__PURE__ */ jsx("path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5" }),
39
- /* @__PURE__ */ jsx("path", { d: "M17.997 5.125a4 4 0 0 1 2.526 5.77" }),
40
- /* @__PURE__ */ jsx("path", { d: "M18 18a4 4 0 0 0 2-7.464" }),
41
- /* @__PURE__ */ jsx("path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517" }),
42
- /* @__PURE__ */ jsx("path", { d: "M6 18a4 4 0 0 1-2-7.464" }),
43
- /* @__PURE__ */ jsx("path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77" })
44
- ]
45
- });
46
32
  const CheckIcon = (props) => /* @__PURE__ */ jsx(Icon, {
47
33
  ...props,
48
34
  children: /* @__PURE__ */ jsx("path", { d: "M3 8.5L6.5 12L13 4.5" })
@@ -262,4 +248,4 @@ const MaximizeIcon = (props) => /* @__PURE__ */ jsxs(Icon, {
262
248
  ]
263
249
  });
264
250
  //#endregion
265
- export { SpinnerIcon as A, MonitorIcon as C, PlusIcon as D, PlayIcon as E, XIcon as F, TerminalIcon as M, WarningIcon as N, RefreshIcon as O, WrenchIcon as P, MinusIcon as S, PencilIcon as T, FolderOpenIcon as _, BrainIcon as a, LinkIcon as b, ChevronLeftIcon as c, DotIcon as d, DownloadIcon as f, FolderIcon as g, FileIcon as h, ArrowUpIcon as i, SquareIcon as j, SearchIcon as k, ChevronRightIcon as l, EyeOffIcon as m, ArrowLeftIcon as n, CheckIcon as o, EyeIcon as p, ArrowRightIcon as r, ChevronDownIcon as s, ArrowDownIcon as t, CopyIcon as u, ImageIcon as v, PauseIcon as w, MaximizeIcon as x, InfoIcon as y };
251
+ export { SquareIcon as A, PauseIcon as C, RefreshIcon as D, PlusIcon as E, WarningIcon as M, WrenchIcon as N, SearchIcon as O, XIcon as P, MonitorIcon as S, PlayIcon as T, ImageIcon as _, CheckIcon as a, MaximizeIcon as b, ChevronRightIcon as c, DownloadIcon as d, EyeIcon as f, FolderOpenIcon as g, FolderIcon as h, ArrowUpIcon as i, TerminalIcon as j, SpinnerIcon as k, CopyIcon as l, FileIcon as m, ArrowLeftIcon as n, ChevronDownIcon as o, EyeOffIcon as p, ArrowRightIcon as r, ChevronLeftIcon as s, ArrowDownIcon as t, DotIcon as u, InfoIcon as v, PencilIcon as w, MinusIcon as x, LinkIcon as y };
@@ -13,7 +13,6 @@ type IconProps = Omit<React.SVGAttributes<SVGSVGElement>, "width" | "height"> &
13
13
  declare const ChevronRightIcon: (props: IconProps) => React.JSX.Element;
14
14
  declare const ChevronDownIcon: (props: IconProps) => React.JSX.Element;
15
15
  declare const ChevronLeftIcon: (props: IconProps) => React.JSX.Element;
16
- declare const BrainIcon: (props: IconProps) => React.JSX.Element;
17
16
  declare const CheckIcon: (props: IconProps) => React.JSX.Element;
18
17
  declare const XIcon: (props: IconProps) => React.JSX.Element;
19
18
  declare const PencilIcon: (props: IconProps) => React.JSX.Element;
@@ -46,4 +45,4 @@ declare const ImageIcon: (props: IconProps) => React.JSX.Element;
46
45
  declare const MonitorIcon: (props: IconProps) => React.JSX.Element;
47
46
  declare const MaximizeIcon: (props: IconProps) => React.JSX.Element;
48
47
  //#endregion
49
- export { SearchIcon as A, MinusIcon as C, PlayIcon as D, PencilIcon as E, WrenchIcon as F, XIcon as I, SquareIcon as M, TerminalIcon as N, PlusIcon as O, WarningIcon as P, MaximizeIcon as S, PauseIcon as T, FolderOpenIcon as _, BrainIcon as a, InfoIcon as b, ChevronLeftIcon as c, DotIcon as d, DownloadIcon as f, FolderIcon as g, FileIcon as h, ArrowUpIcon as i, SpinnerIcon as j, RefreshIcon as k, ChevronRightIcon as l, EyeOffIcon as m, ArrowLeftIcon as n, CheckIcon as o, EyeIcon as p, ArrowRightIcon as r, ChevronDownIcon as s, ArrowDownIcon as t, CopyIcon as u, IconProps as v, MonitorIcon as w, LinkIcon as x, ImageIcon as y };
48
+ export { SpinnerIcon as A, MonitorIcon as C, PlusIcon as D, PlayIcon as E, XIcon as F, TerminalIcon as M, WarningIcon as N, RefreshIcon as O, WrenchIcon as P, MinusIcon as S, PencilIcon as T, IconProps as _, CheckIcon as a, LinkIcon as b, ChevronRightIcon as c, DownloadIcon as d, EyeIcon as f, FolderOpenIcon as g, FolderIcon as h, ArrowUpIcon as i, SquareIcon as j, SearchIcon as k, CopyIcon as l, FileIcon as m, ArrowLeftIcon as n, ChevronDownIcon as o, EyeOffIcon as p, ArrowRightIcon as r, ChevronLeftIcon as s, ArrowDownIcon as t, DotIcon as u, ImageIcon as v, PauseIcon as w, MaximizeIcon as x, InfoIcon as y };
@@ -1,6 +1,5 @@
1
1
  .agent-chat {
2
- display: grid;
3
- grid-template-rows: minmax(0, 1fr) auto;
2
+ position: relative;
4
3
  width: 100%;
5
4
  height: 100%;
6
5
  min-height: 0;
@@ -10,12 +9,46 @@
10
9
  }
11
10
 
12
11
  .agent-chat__conversation {
12
+ height: 100%;
13
13
  min-height: 0;
14
14
  }
15
15
 
16
+ /* Room for the last message to scroll clear of the floating composer.
17
+ --agent-chat-composer-size is set from a ResizeObserver in AgentChat. */
18
+ .agent-chat .conversation__content {
19
+ padding-block-end: calc(var(--agent-chat-composer-size, 5rem) + 0.5rem);
20
+ }
21
+
22
+ .agent-chat .conversation__scroll-button {
23
+ inset-block-end: calc(var(--agent-chat-composer-size, 5rem) + 0.5rem);
24
+ }
25
+
26
+ /* Floating over the transcript: solid behind the controls, fading out
27
+ through the top padding so content slides under instead of hitting a bar. */
16
28
  .agent-chat__composer {
17
- border-block-start: var(--sigvelo-border-style) var(--sigvelo-border-width)
18
- var(--sigvelo-color-neutral-border-subtle);
19
- padding: 0.75rem;
20
- background-color: var(--sigvelo-color-surface);
29
+ position: absolute;
30
+ inset-inline: 0;
31
+ inset-block-end: 0;
32
+ padding: 0.625rem;
33
+ padding-block-start: 1.5rem;
34
+ background: linear-gradient(
35
+ to top,
36
+ var(--sigvelo-color-surface) calc(100% - 1.5rem),
37
+ transparent
38
+ );
39
+ }
40
+
41
+ /* Transient status pill between transcript and composer (recovery, errors). */
42
+ .agent-chat__notice {
43
+ display: flex;
44
+ align-items: center;
45
+ gap: 0.375rem;
46
+ margin-block-end: 0.5rem;
47
+ font-size: 0.75rem;
48
+ color: var(--sigvelo-color-text-muted);
49
+ }
50
+
51
+ .agent-chat__notice[data-tone="danger"],
52
+ .agent-chat__notice [data-tone="danger"] {
53
+ color: var(--sigvelo-color-danger-text);
21
54
  }
@@ -0,0 +1,21 @@
1
+ /* Click-to-zoom lightbox for image attachments (composer chips + messages).
2
+ Scoped as .dialog__popup.attachment-preview so it beats the base dialog
3
+ sizing regardless of import order. */
4
+ .dialog__popup.attachment-preview {
5
+ width: fit-content;
6
+ max-width: min(90vw, 56rem);
7
+ }
8
+
9
+ .attachment-preview__image {
10
+ display: block;
11
+ max-width: 100%;
12
+ max-height: 70vh;
13
+ border-radius: var(--sigvelo-radius-md);
14
+ }
15
+
16
+ .attachment-preview__name {
17
+ margin-block-start: 0.5rem;
18
+ font-size: 0.75rem;
19
+ color: var(--sigvelo-color-text-muted);
20
+ text-align: center;
21
+ }
@@ -3,20 +3,19 @@
3
3
  font-family: var(--sigvelo-font-sans);
4
4
  }
5
5
 
6
+ /* Bare ring icon — undo the popover__trigger pill chrome. */
6
7
  .context__trigger {
7
8
  display: inline-flex;
8
9
  align-items: center;
9
- gap: 0.375rem;
10
- font-variant-numeric: tabular-nums;
11
- }
12
-
13
- .context__trigger-ring {
14
- display: inline-flex;
10
+ justify-content: center;
11
+ padding: 0.25rem;
12
+ background: none;
13
+ border: none;
14
+ border-radius: var(--sigvelo-radius-sm);
15
15
  }
16
16
 
17
- .context__trigger-label {
18
- font-size: 0.75rem;
19
- color: var(--sigvelo-color-text-muted);
17
+ .context__trigger:hover {
18
+ background-color: color-mix(in oklab, transparent, var(--sigvelo-color-text) 5%);
20
19
  }
21
20
 
22
21
  .context__content {
@@ -98,7 +97,7 @@
98
97
 
99
98
  .context__row {
100
99
  display: grid;
101
- grid-template-columns: 1fr auto auto;
100
+ grid-template-columns: 1fr auto;
102
101
  gap: 0.75rem;
103
102
  font-size: 0.75rem;
104
103
  align-items: baseline;
@@ -113,13 +112,6 @@
113
112
  font-variant-numeric: tabular-nums;
114
113
  }
115
114
 
116
- .context__row-cost {
117
- color: var(--sigvelo-color-text-muted);
118
- font-family: var(--sigvelo-font-mono);
119
- font-size: 0.6875rem;
120
- font-variant-numeric: tabular-nums;
121
- }
122
-
123
115
  .context__footer {
124
116
  display: flex;
125
117
  flex-direction: column;
@@ -21,9 +21,9 @@
21
21
  .conversation__content {
22
22
  display: flex;
23
23
  flex-direction: column;
24
- gap: 1rem;
25
- padding-block: 1.25rem;
26
- padding-inline: 1.25rem;
24
+ gap: 0.875rem;
25
+ padding-block: 1rem;
26
+ padding-inline: 1rem;
27
27
  min-height: 100%;
28
28
  }
29
29
 
@@ -12,6 +12,7 @@
12
12
  @import "./agent-connection.css" layer(components);
13
13
  @import "./agent-chat.css" layer(components);
14
14
  @import "./alert-dialog.css" layer(components);
15
+ @import "./attachment-preview.css" layer(components);
15
16
  @import "./autocomplete.css" layer(components);
16
17
  @import "./avatar.css" layer(components);
17
18
  @import "./badge.css" layer(components);
@@ -73,7 +74,6 @@
73
74
  @import "./task.css" layer(components);
74
75
  @import "./terminal.css" layer(components);
75
76
  @import "./test-results.css" layer(components);
76
- @import "./tool.css" layer(components);
77
77
  @import "./web-preview.css" layer(components);
78
78
  @import "./workspace-explorer.css" layer(components);
79
79
 
@@ -20,8 +20,8 @@
20
20
  .message__content {
21
21
  display: inline-block;
22
22
  max-width: min(42rem, 85%);
23
- padding-block: 0.625rem;
24
- padding-inline: 0.875rem;
23
+ padding-block: 0.5rem;
24
+ padding-inline: 0.75rem;
25
25
  border-radius: var(--sigvelo-radius-lg);
26
26
  font-size: var(--sigvelo-text-sm);
27
27
  line-height: 1.55;
@@ -57,6 +57,54 @@
57
57
  overflow: auto;
58
58
  }
59
59
 
60
+ .message__attachment {
61
+ display: inline-flex;
62
+ align-items: center;
63
+ gap: 0.375rem;
64
+ max-width: 100%;
65
+ font-size: 0.8125rem;
66
+ color: inherit;
67
+ text-decoration: none;
68
+ }
69
+
70
+ .message__attachment:hover .message__attachment-name {
71
+ text-decoration: underline;
72
+ }
73
+
74
+ .message__attachment-icon {
75
+ flex-shrink: 0;
76
+ }
77
+
78
+ .message__attachment-name {
79
+ overflow: hidden;
80
+ text-overflow: ellipsis;
81
+ white-space: nowrap;
82
+ }
83
+
84
+ .message__attachment-zoom {
85
+ display: block;
86
+ max-width: 100%;
87
+ padding: 0;
88
+ border: none;
89
+ background: none;
90
+ cursor: zoom-in;
91
+ }
92
+
93
+ .message__attachment-image {
94
+ display: block;
95
+ max-width: 16rem;
96
+ max-height: 16rem;
97
+ border-radius: var(--sigvelo-radius-md);
98
+ }
99
+
100
+ /* Quiet annotation under a part whose stored content was compacted. */
101
+ .message__compacted {
102
+ margin-block-start: 0.25rem;
103
+ font-size: var(--sigvelo-text-xs);
104
+ font-style: italic;
105
+ color: var(--sigvelo-color-text-muted);
106
+ }
107
+
60
108
  .message__actions {
61
109
  display: inline-flex;
62
110
  align-items: center;