@mcp-b/react-components 0.4.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) 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/components/Activity.js +1 -1
  4. package/dist/components/AgentChat.d.ts +0 -7
  5. package/dist/components/AgentChat.js +99 -67
  6. package/dist/components/AgentConnection.js +2 -2
  7. package/dist/components/Artifact.js +1 -1
  8. package/dist/components/BrowserLiveView.js +1 -1
  9. package/dist/components/BrowserReplay.js +1 -1
  10. package/dist/components/ChainOfThought.d.ts +1 -1
  11. package/dist/components/ChainOfThought.js +1 -1
  12. package/dist/components/CodeBlock.js +1 -1
  13. package/dist/components/Commit.js +2 -2
  14. package/dist/components/ContextMenu.js +1 -1
  15. package/dist/components/Conversation.js +1 -1
  16. package/dist/components/Dialog.js +1 -1
  17. package/dist/components/EnvironmentVariables.js +1 -1
  18. package/dist/components/FileTree.js +1 -1
  19. package/dist/components/Menubar.js +1 -1
  20. package/dist/components/Message.js +4 -4
  21. package/dist/components/ModelSelector.js +1 -1
  22. package/dist/components/NavigationMenu.js +1 -1
  23. package/dist/components/PricingPage.js +1 -1
  24. package/dist/components/PromptInput.js +7 -7
  25. package/dist/components/Queue.js +1 -1
  26. package/dist/components/Reasoning.js +9 -17
  27. package/dist/components/Select.js +1 -1
  28. package/dist/components/Sources.js +1 -1
  29. package/dist/components/Stepper.js +1 -1
  30. package/dist/components/Task.js +1 -1
  31. package/dist/components/Terminal.js +2 -2
  32. package/dist/components/TestResults.js +1 -1
  33. package/dist/components/ThinkChat.d.ts +4 -6
  34. package/dist/components/ThinkChat.js +2 -2
  35. package/dist/components/WebPreview.js +1 -1
  36. package/dist/components/WorkspaceExplorer.js +3 -3
  37. package/dist/components/icons.d.ts +2 -2
  38. package/dist/components/icons.js +2 -2
  39. package/dist/{copy-button-Dd6DEhOm.js → copy-button-BmJEAKuP.js} +1 -1
  40. package/dist/{icons-DQC4Zw5R.js → icons-CZRH4FVH.js} +1 -15
  41. package/dist/{icons-ctdVxng0.d.ts → icons-CmO7-pNY.d.ts} +1 -2
  42. package/dist/styles/agent-chat.css +24 -10
  43. package/dist/styles/conversation.css +3 -3
  44. package/dist/styles/index.css +2 -2
  45. package/dist/styles/message.css +7 -2
  46. package/dist/styles/prompt-input.css +17 -6
  47. package/dist/styles/reasoning.css +0 -1
  48. package/dist/styles/streamdown.css +381 -0
  49. package/package.json +2 -2
  50. package/dist/components/Suggestion.d.ts +0 -43
  51. package/dist/components/Suggestion.js +0 -39
  52. package/dist/components/Tool.d.ts +0 -123
  53. package/dist/components/Tool.js +0 -209
  54. package/dist/styles/suggestions.css +0 -21
  55. package/dist/styles/tool.css +0 -203
@@ -1,6 +1,6 @@
1
1
  import { t as cx } from "./class-names-9UtZwb0J.js";
2
2
  import { Select, SelectContent, SelectItem, SelectList, SelectTrigger, SelectValue } from "./components/Select.js";
3
- import { t as CopyButton } from "./copy-button-Dd6DEhOm.js";
3
+ import { t as CopyButton } from "./copy-button-BmJEAKuP.js";
4
4
  import * as React from "react";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { createHighlighter } from "shiki";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "./class-names-9UtZwb0J.js";
2
- import { _ as FolderOpenIcon, g as FolderIcon, h as FileIcon, l as ChevronRightIcon } from "./icons-DQC4Zw5R.js";
2
+ import { c as ChevronRightIcon, g as FolderOpenIcon, h as FolderIcon, m as FileIcon } from "./icons-CZRH4FVH.js";
3
3
  import * as React from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/components/_internal/use-file-tree-nav.ts
@@ -1,6 +1,6 @@
1
1
  import { CollapsiblePanel, CollapsibleRoot, CollapsibleTrigger } from "./Collapsible.js";
2
2
  import { t as cx } from "../class-names-9UtZwb0J.js";
3
- import { l as ChevronRightIcon } from "../icons-DQC4Zw5R.js";
3
+ import { c as ChevronRightIcon } from "../icons-CZRH4FVH.js";
4
4
  import "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/Activity.tsx
@@ -30,12 +30,6 @@ interface AgentChatProps<MessageT extends UIMessage = UIMessage> {
30
30
  emptyState?: React.ReactNode;
31
31
  /** Extra controls rendered in the composer toolbar. */
32
32
  composerTools?: React.ReactNode;
33
- /**
34
- * Prompt suggestions shown as a chip row above the composer; clicking one
35
- * submits it as the message text. Strings double as React keys — keep them
36
- * unique.
37
- */
38
- suggestions?: readonly string[];
39
33
  /**
40
34
  * Transient status rendered between the transcript and the composer —
41
35
  * e.g. a "Reconnecting…" pill. `ThinkChat.Messages` fills this from the
@@ -92,7 +86,6 @@ declare function AgentChat<MessageT extends UIMessage = UIMessage>({
92
86
  disabled,
93
87
  emptyState,
94
88
  composerTools,
95
- suggestions,
96
89
  notice,
97
90
  onRegenerate,
98
91
  onApprovalResponse,
@@ -1,15 +1,14 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { D as PlusIcon, O as RefreshIcon } from "../icons-DQC4Zw5R.js";
2
+ import { D as RefreshIcon, E as PlusIcon } from "../icons-CZRH4FVH.js";
3
+ import { Activity, ActivityContent, ActivityPanel, ActivityTrigger } from "./Activity.js";
3
4
  import { Context, ContextContent, ContextContentBody, ContextContentHeader, ContextTrigger, getContextUsage, getContextUsedTokens } from "./Context.js";
4
5
  import { Conversation, ConversationContent, ConversationEmptyState, ConversationScrollButton } from "./Conversation.js";
5
6
  import { Message, MessageAction, MessageActions, MessageAttachment, MessageContent, MessageResponse } from "./Message.js";
6
7
  import { PromptInput, PromptInputApproval, PromptInputAttachments, PromptInputBody, PromptInputButton, PromptInputFooter, PromptInputPermissionSelector, PromptInputSubmit, PromptInputTextarea, PromptInputTools, getApprovalRequestId, getPendingToolApprovals, usePromptInputAttachments } from "./PromptInput.js";
7
8
  import { Reasoning, ReasoningContent, ReasoningTrigger } from "./Reasoning.js";
8
- import { Suggestion, Suggestions } from "./Suggestion.js";
9
- import { Tool, ToolContent, ToolHeader, ToolInput, ToolOutput } from "./Tool.js";
10
9
  import * as React from "react";
11
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
- import { isFileUIPart, isReasoningUIPart, isTextUIPart, isToolOrDynamicToolUIPart } from "ai";
11
+ import { getToolName, isFileUIPart, isReasoningUIPart, isTextUIPart, isToolOrDynamicToolUIPart } from "ai";
13
12
  //#region src/components/AgentChat.tsx
14
13
  function AgentChatAttachButton() {
15
14
  const attachments = usePromptInputAttachments();
@@ -30,6 +29,46 @@ function getPartKey(part, partIndex) {
30
29
  if ("id" in part && typeof part.id === "string") return `${part.type}-${part.id}`;
31
30
  return `${part.type}-${partIndex}`;
32
31
  }
32
+ function summarizeToolInput(input) {
33
+ if (!input || typeof input !== "object") return null;
34
+ for (const value of Object.values(input)) if (typeof value === "string" && value.trim()) {
35
+ const line = value.trim().split("\n", 1)[0] ?? "";
36
+ return line.length > 64 ? `${line.slice(0, 64)}…` : line;
37
+ }
38
+ return null;
39
+ }
40
+ function isToolPartWorking(part) {
41
+ return part.state === "input-streaming" || part.state === "input-available" || part.state === "approval-requested";
42
+ }
43
+ function isToolPartFailed(part) {
44
+ return part.state === "output-error" || part.state === "output-denied";
45
+ }
46
+ function describeToolPart(part) {
47
+ const name = getToolName(part);
48
+ const verb = isToolPartFailed(part) ? `${name} failed` : isToolPartWorking(part) ? `Running ${name}` : `Ran ${name}`;
49
+ const detail = summarizeToolInput(part.input);
50
+ return detail ? `${verb} · ${detail}` : verb;
51
+ }
52
+ function formatToolValue(value) {
53
+ if (value === void 0) return void 0;
54
+ return typeof value === "string" ? value : JSON.stringify(value, null, 2);
55
+ }
56
+ function renderToolActivity(part) {
57
+ const failed = isToolPartFailed(part);
58
+ const output = part.state === "output-error" ? part.errorText : part.state === "output-denied" ? part.approval.reason ?? "Denied" : formatToolValue("output" in part ? part.output : void 0);
59
+ return /* @__PURE__ */ jsxs(Activity, {
60
+ isStreaming: isToolPartWorking(part),
61
+ children: [/* @__PURE__ */ jsx(ActivityTrigger, { label: describeToolPart(part) }), /* @__PURE__ */ jsxs(ActivityContent, { children: [/* @__PURE__ */ jsx(ActivityPanel, {
62
+ label: getToolName(part),
63
+ text: formatToolValue(part.input)
64
+ }), output ? /* @__PURE__ */ jsx(ActivityPanel, {
65
+ label: "output",
66
+ text: output,
67
+ status: part.state === "output-denied" ? "denied" : failed ? "error" : void 0,
68
+ error: failed
69
+ }) : null] })]
70
+ });
71
+ }
33
72
  function renderDefaultPart(part) {
34
73
  if (isTextUIPart(part) && part.text) return /* @__PURE__ */ jsx(MessageResponse, { children: part.text });
35
74
  if (isFileUIPart(part)) return /* @__PURE__ */ jsx(MessageAttachment, { part });
@@ -37,10 +76,7 @@ function renderDefaultPart(part) {
37
76
  isStreaming: part.state === "streaming",
38
77
  children: [/* @__PURE__ */ jsx(ReasoningTrigger, {}), /* @__PURE__ */ jsx(ReasoningContent, { children: part.text })]
39
78
  });
40
- if (isToolOrDynamicToolUIPart(part)) return /* @__PURE__ */ jsxs(Tool, {
41
- part,
42
- children: [/* @__PURE__ */ jsx(ToolHeader, {}), /* @__PURE__ */ jsxs(ToolContent, { children: [/* @__PURE__ */ jsx(ToolInput, {}), /* @__PURE__ */ jsx(ToolOutput, {})] })]
43
- });
79
+ if (isToolOrDynamicToolUIPart(part)) return renderToolActivity(part);
44
80
  return null;
45
81
  }
46
82
  /**
@@ -52,7 +88,7 @@ function renderDefaultPart(part) {
52
88
  * transport. Use it directly with plain AI SDK `useChat` or a read-only
53
89
  * transcript; if you have a Cloudflare Think agent, use `ThinkChat` instead.
54
90
  */
55
- function AgentChat({ className, messages, status = "ready", onSubmit, onStop, placeholder = "Ask anything...", disabled, emptyState, composerTools, suggestions, notice, onRegenerate, onApprovalResponse, executionApprovals, contextWindow, renderPart, renderMessageAfter, ref }) {
91
+ function AgentChat({ className, messages, status = "ready", onSubmit, onStop, placeholder = "Ask anything...", disabled, emptyState, composerTools, notice, onRegenerate, onApprovalResponse, executionApprovals, contextWindow, renderPart, renderMessageAfter, ref }) {
56
92
  const handleSubmit = React.useCallback((message) => {
57
93
  onSubmit?.(message);
58
94
  }, [onSubmit]);
@@ -86,6 +122,15 @@ function AgentChat({ className, messages, status = "ready", onSubmit, onStop, pl
86
122
  const pendingApproval = permissionMode === "bypass" ? void 0 : pendingApprovals[0];
87
123
  const contextUsage = contextWindow ? getContextUsage(messages) : void 0;
88
124
  const lastAssistantIndex = onRegenerate && status !== "streaming" && status !== "submitted" ? messages.findLastIndex((message) => message.role === "assistant") : -1;
125
+ const composerRef = (el) => {
126
+ if (!el || typeof ResizeObserver === "undefined") return;
127
+ const root = el.parentElement;
128
+ const observer = new ResizeObserver(() => {
129
+ root?.style.setProperty("--agent-chat-composer-size", `${el.offsetHeight}px`);
130
+ });
131
+ observer.observe(el);
132
+ return () => observer.disconnect();
133
+ };
89
134
  return /* @__PURE__ */ jsxs("div", {
90
135
  ref,
91
136
  className: cx("agent-chat", className),
@@ -124,65 +169,52 @@ function AgentChat({ className, messages, status = "ready", onSubmit, onStop, pl
124
169
  ]
125
170
  }, message.id ?? messageIndex))] }), /* @__PURE__ */ jsx(ConversationScrollButton, {})]
126
171
  }), /* @__PURE__ */ jsxs("div", {
172
+ ref: composerRef,
127
173
  className: "agent-chat__composer",
128
- children: [
129
- notice ? /* @__PURE__ */ jsx("div", {
130
- className: "agent-chat__notice",
131
- children: notice
132
- }) : null,
133
- suggestions?.length && !pendingApproval ? /* @__PURE__ */ jsx(Suggestions, {
134
- className: "agent-chat__suggestions",
135
- children: suggestions.map((suggestion) => /* @__PURE__ */ jsx(Suggestion, {
136
- suggestion,
137
- disabled,
138
- onClick: (text) => handleSubmit({
139
- text,
140
- files: []
141
- })
142
- }, suggestion))
143
- }) : null,
144
- /* @__PURE__ */ jsx(PromptInput, {
145
- multiple: true,
146
- onSubmit: handleSubmit,
147
- children: pendingApproval ? /* @__PURE__ */ jsx(PromptInputApproval, {
148
- part: pendingApproval.part,
149
- count: pendingApprovals.length,
150
- onRespond: onApprovalResponse,
151
- executionApprovals,
152
- onSkip: () => {
153
- const id = getApprovalRequestId(pendingApproval.part);
154
- if (id) setSkippedApprovalIds((previous) => [...previous, id]);
155
- }
156
- }) : /* @__PURE__ */ jsxs(Fragment, { children: [
157
- /* @__PURE__ */ jsx(PromptInputAttachments, {}),
158
- /* @__PURE__ */ jsx(PromptInputBody, { children: /* @__PURE__ */ jsx(PromptInputTextarea, {
159
- "aria-label": "Message",
160
- placeholder,
161
- disabled
162
- }) }),
163
- /* @__PURE__ */ jsxs(PromptInputFooter, { children: [/* @__PURE__ */ jsxs(PromptInputTools, { children: [
164
- /* @__PURE__ */ jsx(AgentChatAttachButton, {}),
165
- approvalsWired ? /* @__PURE__ */ jsx(PromptInputPermissionSelector, {
166
- value: permissionMode,
167
- onValueChange: setPermissionMode
168
- }) : null,
169
- composerTools
170
- ] }), /* @__PURE__ */ jsxs("div", {
171
- className: "prompt-input__footer-end",
172
- children: [contextWindow ? /* @__PURE__ */ jsxs(Context, {
173
- usedTokens: getContextUsedTokens(contextUsage),
174
- maxTokens: contextWindow.maxTokens,
175
- usage: contextUsage,
176
- modelId: contextWindow.modelId,
177
- children: [/* @__PURE__ */ jsx(ContextTrigger, {}), /* @__PURE__ */ jsxs(ContextContent, { children: [/* @__PURE__ */ jsx(ContextContentHeader, {}), /* @__PURE__ */ jsx(ContextContentBody, {})] })]
178
- }) : null, /* @__PURE__ */ jsx(PromptInputSubmit, {
179
- status,
180
- onStop
181
- })]
182
- })] })
183
- ] })
184
- })
185
- ]
174
+ children: [notice ? /* @__PURE__ */ jsx("div", {
175
+ className: "agent-chat__notice",
176
+ children: notice
177
+ }) : null, /* @__PURE__ */ jsx(PromptInput, {
178
+ multiple: true,
179
+ onSubmit: handleSubmit,
180
+ children: pendingApproval ? /* @__PURE__ */ jsx(PromptInputApproval, {
181
+ part: pendingApproval.part,
182
+ count: pendingApprovals.length,
183
+ onRespond: onApprovalResponse,
184
+ executionApprovals,
185
+ onSkip: () => {
186
+ const id = getApprovalRequestId(pendingApproval.part);
187
+ if (id) setSkippedApprovalIds((previous) => [...previous, id]);
188
+ }
189
+ }) : /* @__PURE__ */ jsxs(Fragment, { children: [
190
+ /* @__PURE__ */ jsx(PromptInputAttachments, {}),
191
+ /* @__PURE__ */ jsx(PromptInputBody, { children: /* @__PURE__ */ jsx(PromptInputTextarea, {
192
+ "aria-label": "Message",
193
+ placeholder,
194
+ disabled
195
+ }) }),
196
+ /* @__PURE__ */ jsxs(PromptInputFooter, { children: [/* @__PURE__ */ jsxs(PromptInputTools, { children: [
197
+ /* @__PURE__ */ jsx(AgentChatAttachButton, {}),
198
+ approvalsWired ? /* @__PURE__ */ jsx(PromptInputPermissionSelector, {
199
+ value: permissionMode,
200
+ onValueChange: setPermissionMode
201
+ }) : null,
202
+ composerTools
203
+ ] }), /* @__PURE__ */ jsxs("div", {
204
+ className: "prompt-input__footer-end",
205
+ children: [contextWindow ? /* @__PURE__ */ jsxs(Context, {
206
+ usedTokens: getContextUsedTokens(contextUsage),
207
+ maxTokens: contextWindow.maxTokens,
208
+ usage: contextUsage,
209
+ modelId: contextWindow.modelId,
210
+ children: [/* @__PURE__ */ jsx(ContextTrigger, {}), /* @__PURE__ */ jsxs(ContextContent, { children: [/* @__PURE__ */ jsx(ContextContentHeader, {}), /* @__PURE__ */ jsx(ContextContentBody, {})] })]
211
+ }) : null, /* @__PURE__ */ jsx(PromptInputSubmit, {
212
+ status,
213
+ onStop
214
+ })]
215
+ })] })
216
+ ] })
217
+ })]
186
218
  })]
187
219
  });
188
220
  }
@@ -1,8 +1,8 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { b as LinkIcon } from "../icons-DQC4Zw5R.js";
2
+ import { y as LinkIcon } from "../icons-CZRH4FVH.js";
3
3
  import { Popover } from "./Popover.js";
4
4
  import { Button } from "./Button.js";
5
- import { a as CodeBlockCopyButton, i as CodeBlockContent, n as CodeBlockActions, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock } from "../CodeBlock-C2Xjxu9M.js";
5
+ import { a as CodeBlockCopyButton, i as CodeBlockContent, n as CodeBlockActions, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock } from "../CodeBlock-D-a84xBL.js";
6
6
  import * as React from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region src/components/AgentConnection.tsx
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { F as XIcon } from "../icons-DQC4Zw5R.js";
2
+ import { P as XIcon } 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 "react";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { A as SpinnerIcon, x as MaximizeIcon } from "../icons-DQC4Zw5R.js";
2
+ import { b as MaximizeIcon, k as SpinnerIcon } from "../icons-CZRH4FVH.js";
3
3
  import { Button } from "./Button.js";
4
4
  import { Dialog, DialogContent, DialogTitle } from "./Dialog.js";
5
5
  import { Badge } from "./Badge.js";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { E as PlayIcon, w as PauseIcon } from "../icons-DQC4Zw5R.js";
2
+ import { C as PauseIcon, T as PlayIcon } from "../icons-CZRH4FVH.js";
3
3
  import { Button } from "./Button.js";
4
4
  import { Slider, SliderControl, SliderIndicator, SliderThumb, SliderTrack } from "./Slider.js";
5
5
  import * as React from "react";
@@ -1,5 +1,5 @@
1
1
  import { CollapsiblePanelProps, CollapsibleRootProps, CollapsibleTriggerProps } from "./Collapsible.js";
2
- import { v as IconProps } from "../icons-ctdVxng0.js";
2
+ import { _ as IconProps } from "../icons-CmO7-pNY.js";
3
3
  import * as React from "react";
4
4
 
5
5
  //#region src/components/ChainOfThought.d.ts
@@ -1,6 +1,6 @@
1
1
  import { CollapsiblePanel, CollapsibleRoot, CollapsibleTrigger } from "./Collapsible.js";
2
2
  import { t as cx } from "../class-names-9UtZwb0J.js";
3
- import { A as SpinnerIcon, d as DotIcon, l as ChevronRightIcon, o as CheckIcon } from "../icons-DQC4Zw5R.js";
3
+ import { a as CheckIcon, c as ChevronRightIcon, k as SpinnerIcon, u as DotIcon } from "../icons-CZRH4FVH.js";
4
4
  import "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/ChainOfThought.tsx
@@ -1,2 +1,2 @@
1
- import { a as CodeBlockCopyButton, c as CodeBlockLanguageSelector, d as CodeBlockLanguageSelectorTrigger, f as CodeBlockLanguageSelectorValue, h as CODE_BLOCK_LANGUAGES, i as CodeBlockContent, l as CodeBlockLanguageSelectorContent, m as highlightCode, n as CodeBlockActions, o as CodeBlockFilename, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock, u as CodeBlockLanguageSelectorItem } from "../CodeBlock-C2Xjxu9M.js";
1
+ import { a as CodeBlockCopyButton, c as CodeBlockLanguageSelector, d as CodeBlockLanguageSelectorTrigger, f as CodeBlockLanguageSelectorValue, h as CODE_BLOCK_LANGUAGES, i as CodeBlockContent, l as CodeBlockLanguageSelectorContent, m as highlightCode, n as CodeBlockActions, o as CodeBlockFilename, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock, u as CodeBlockLanguageSelectorItem } from "../CodeBlock-D-a84xBL.js";
2
2
  export { CODE_BLOCK_LANGUAGES, CodeBlock, CodeBlockActions, CodeBlockContainer, CodeBlockContent, CodeBlockCopyButton, CodeBlockFilename, CodeBlockHeader, CodeBlockLanguageSelector, CodeBlockLanguageSelectorContent, CodeBlockLanguageSelectorItem, CodeBlockLanguageSelectorTrigger, CodeBlockLanguageSelectorValue, CodeBlockTitle, highlightCode };
@@ -1,10 +1,10 @@
1
1
  import { CollapsiblePanel, CollapsibleRoot, CollapsibleTrigger } from "./Collapsible.js";
2
2
  import { t as cx } from "../class-names-9UtZwb0J.js";
3
- import { h as FileIcon, l as ChevronRightIcon, o as CheckIcon, u as CopyIcon } from "../icons-DQC4Zw5R.js";
3
+ import { a as CheckIcon, c as ChevronRightIcon, l as CopyIcon, m as FileIcon } from "../icons-CZRH4FVH.js";
4
4
  import { Button } from "./Button.js";
5
5
  import { Tooltip, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipTrigger } from "./Tooltip.js";
6
- import { Badge } from "./Badge.js";
7
6
  import { Avatar } from "./Avatar.js";
7
+ import { Badge } from "./Badge.js";
8
8
  import * as React from "react";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  //#region src/components/Commit.tsx
@@ -1,4 +1,4 @@
1
- import { d as DotIcon, l as ChevronRightIcon, o as CheckIcon } from "../icons-DQC4Zw5R.js";
1
+ import { a as CheckIcon, c as ChevronRightIcon, u as DotIcon } from "../icons-CZRH4FVH.js";
2
2
  import "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { ContextMenu as ContextMenu$1 } from "@base-ui/react/context-menu";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { f as DownloadIcon, t as ArrowDownIcon } from "../icons-DQC4Zw5R.js";
2
+ import { d as DownloadIcon, t as ArrowDownIcon } from "../icons-CZRH4FVH.js";
3
3
  import { Button } from "./Button.js";
4
4
  import { useStickToBottom } from "./useStickToBottom.js";
5
5
  import * as React from "react";
@@ -1,4 +1,4 @@
1
- import { F as XIcon } from "../icons-DQC4Zw5R.js";
1
+ import { P as XIcon } from "../icons-CZRH4FVH.js";
2
2
  import "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { m as EyeOffIcon, o as CheckIcon, p as EyeIcon, u as CopyIcon } from "../icons-DQC4Zw5R.js";
2
+ import { a as CheckIcon, f as EyeIcon, l as CopyIcon, p as EyeOffIcon } 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,2 +1,2 @@
1
- import { a as FileTreeIcon, i as FileTreeFolder, n as FileTreeActions, o as FileTreeName, r as FileTreeFile, t as FileTree } from "../FileTree-D0c9Yj9U.js";
1
+ import { a as FileTreeIcon, i as FileTreeFolder, n as FileTreeActions, o as FileTreeName, r as FileTreeFile, t as FileTree } from "../FileTree-D8rtTLgK.js";
2
2
  export { FileTree, FileTreeActions, FileTreeFile, FileTreeFolder, FileTreeIcon, FileTreeName };
@@ -1,4 +1,4 @@
1
- import { d as DotIcon, l as ChevronRightIcon, o as CheckIcon } from "../icons-DQC4Zw5R.js";
1
+ import { a as CheckIcon, c as ChevronRightIcon, u as DotIcon } from "../icons-CZRH4FVH.js";
2
2
  import "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { Menu } from "@base-ui/react/menu";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { h as FileIcon, n as ArrowLeftIcon, r as ArrowRightIcon } from "../icons-DQC4Zw5R.js";
2
+ import { m as FileIcon, n as ArrowLeftIcon, 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 { t as AttachmentPreview } from "../attachment-preview-ChtC3HiU.js";
@@ -116,7 +116,7 @@ function MessageActions({ className, children, ref, ...props }) {
116
116
  * A single icon button inside {@link MessageActions}. Always has an accessible
117
117
  * name; shows a tooltip on hover/focus when {@link tooltip} is set.
118
118
  */
119
- function MessageAction({ className, label, tooltip, variant = "ghost", color = "neutral", size = "sm", children, ref, ...props }) {
119
+ function MessageAction({ className, label, tooltip, variant = "ghost", color = "neutral", size = "icon-xs", children, ref, ...props }) {
120
120
  const button = /* @__PURE__ */ jsx(Button, {
121
121
  ref,
122
122
  type: "button",
@@ -224,7 +224,7 @@ function MessageBranchSelector({ className, children, ref, ...props }) {
224
224
  });
225
225
  }
226
226
  /** Button that selects the previous branch. Disabled at the first branch. */
227
- function MessageBranchPrevious({ className, label = "Previous response", variant = "ghost", color = "neutral", size = "sm", children, onClick, ref, ...props }) {
227
+ function MessageBranchPrevious({ className, label = "Previous response", variant = "ghost", color = "neutral", size = "icon-xs", children, onClick, ref, ...props }) {
228
228
  const { branchIndex, branchCount, setBranchIndex } = useMessageBranch("MessageBranchPrevious");
229
229
  return /* @__PURE__ */ jsx(Button, {
230
230
  ref,
@@ -244,7 +244,7 @@ function MessageBranchPrevious({ className, label = "Previous response", variant
244
244
  });
245
245
  }
246
246
  /** Button that selects the next branch. Disabled at the last branch. */
247
- function MessageBranchNext({ className, label = "Next response", variant = "ghost", color = "neutral", size = "sm", children, onClick, ref, ...props }) {
247
+ function MessageBranchNext({ className, label = "Next response", variant = "ghost", color = "neutral", size = "icon-xs", children, onClick, ref, ...props }) {
248
248
  const { branchIndex, branchCount, setBranchIndex } = useMessageBranch("MessageBranchNext");
249
249
  return /* @__PURE__ */ jsx(Button, {
250
250
  ref,
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { k as SearchIcon, s as ChevronDownIcon } from "../icons-DQC4Zw5R.js";
2
+ import { O as SearchIcon, o as ChevronDownIcon } from "../icons-CZRH4FVH.js";
3
3
  import { Button } from "./Button.js";
4
4
  import { Dialog, DialogBackdrop, DialogPopup, DialogPortal, DialogTitle, DialogTrigger } from "./Dialog.js";
5
5
  import * as React from "react";
@@ -1,4 +1,4 @@
1
- import { s as ChevronDownIcon } from "../icons-DQC4Zw5R.js";
1
+ import { o as ChevronDownIcon } from "../icons-CZRH4FVH.js";
2
2
  import * as React from "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { NavigationMenu as NavigationMenu$1 } from "@base-ui/react/navigation-menu";
@@ -2,8 +2,8 @@ import { Accordion, AccordionItem, AccordionPanel, AccordionTrigger } from "./Ac
2
2
  import { Separator } from "./Separator.js";
3
3
  import { Button } from "./Button.js";
4
4
  import { Tooltip, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipTrigger } from "./Tooltip.js";
5
- import { Badge } from "./Badge.js";
6
5
  import { AlertDialog, AlertDialogBackdrop, AlertDialogClose, AlertDialogDescription, AlertDialogPopup, AlertDialogPortal, AlertDialogTitle } from "./AlertDialog.js";
6
+ import { Badge } from "./Badge.js";
7
7
  import { Slider, SliderControl, SliderIndicator, SliderThumb, SliderTrack } from "./Slider.js";
8
8
  import { Card } from "./Card.js";
9
9
  import { Checkbox } from "./Checkbox.js";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { A as SpinnerIcon, C as MonitorIcon, D as PlusIcon, F as XIcon, N as WarningIcon, T as PencilIcon, h as FileIcon, i as ArrowUpIcon, j as SquareIcon, s as ChevronDownIcon, v as ImageIcon } from "../icons-DQC4Zw5R.js";
2
+ import { A as SquareIcon, E as PlusIcon, M as WarningIcon, P as XIcon, S as MonitorIcon, _ as ImageIcon, i as ArrowUpIcon, k as SpinnerIcon, m as FileIcon, o as ChevronDownIcon, w as PencilIcon } 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 { t as AttachmentPreview } from "../attachment-preview-ChtC3HiU.js";
@@ -417,7 +417,7 @@ function PromptInputTools({ className, children, ref, ...props }) {
417
417
  children
418
418
  });
419
419
  }
420
- const MIN_TEXTAREA_HEIGHT_PX = 48;
420
+ const MIN_TEXTAREA_HEIGHT_PX = 24;
421
421
  const MAX_TEXTAREA_HEIGHT_PX = 240;
422
422
  function PromptInputTextarea({ className, placeholder = "How can I help?", rows = 1, minHeight = MIN_TEXTAREA_HEIGHT_PX, maxHeight = MAX_TEXTAREA_HEIGHT_PX, onChange, onCompositionEnd, onCompositionStart, onKeyDown, onInput, onPaste, ref, ...props }) {
423
423
  const { submit } = usePromptInputContext("PromptInputTextarea");
@@ -500,7 +500,7 @@ function PromptInputTextarea({ className, placeholder = "How can I help?", rows
500
500
  });
501
501
  }
502
502
  function PromptInputButton({ className, tooltip, variant = "ghost", color = "neutral", size, children, "aria-label": ariaLabel, ref, ...props }) {
503
- const resolvedSize = size ?? (React.Children.count(children) > 1 ? "sm" : "icon");
503
+ const resolvedSize = size ?? (React.Children.count(children) > 1 ? "xs" : "icon-xs");
504
504
  const tooltipConfig = typeof tooltip === "string" ? { content: tooltip } : tooltip;
505
505
  const fallbackLabel = ariaLabel ?? (typeof tooltipConfig?.content === "string" ? tooltipConfig.content : void 0);
506
506
  const button = /* @__PURE__ */ jsx(Button, {
@@ -595,7 +595,7 @@ const PERMISSION_MODES = [{
595
595
  */
596
596
  function PromptInputPermissionSelector({ value, onValueChange, question = "How should agent actions be approved?" }) {
597
597
  return /* @__PURE__ */ jsxs(MenuRoot, { children: [/* @__PURE__ */ jsx(MenuTrigger, { render: /* @__PURE__ */ jsxs(PromptInputButton, {
598
- size: "sm",
598
+ size: "xs",
599
599
  className: "prompt-input__permissions-trigger",
600
600
  "data-mode": value,
601
601
  "aria-label": (PERMISSION_MODES.find((mode) => mode.value === value) ?? PERMISSION_MODES[0]).label,
@@ -633,7 +633,7 @@ function PromptInputPermissionSelector({ value, onValueChange, question = "How s
633
633
  })]
634
634
  }) }) })] });
635
635
  }
636
- function PromptInputSubmit({ className, status = "ready", onStop, variant = "normal", color = "primary", size = "icon", onClick, children, label, ref, ...props }) {
636
+ function PromptInputSubmit({ className, status = "ready", onStop, variant = "normal", color = "primary", size = "icon-sm", onClick, children, label, ref, ...props }) {
637
637
  const isStopping = status === "submitted" || status === "streaming";
638
638
  const resolvedLabel = label ?? defaultSubmitLabel(status);
639
639
  return /* @__PURE__ */ jsx(Button, {
@@ -835,7 +835,7 @@ function PromptInputApproval({ part, onRespond, executionApprovals, onSkip, ques
835
835
  }),
836
836
  onSkip ? /* @__PURE__ */ jsx(Button, {
837
837
  type: "button",
838
- size: "sm",
838
+ size: "xs",
839
839
  variant: "ghost",
840
840
  color: "neutral",
841
841
  className: "prompt-input__approval-skip",
@@ -845,7 +845,7 @@ function PromptInputApproval({ part, onRespond, executionApprovals, onSkip, ques
845
845
  }) : null,
846
846
  /* @__PURE__ */ jsxs(Button, {
847
847
  type: "button",
848
- size: "sm",
848
+ size: "xs",
849
849
  color: "primary",
850
850
  className: "prompt-input__approval-submit",
851
851
  disabled: busy,
@@ -1,6 +1,6 @@
1
1
  import { CollapsiblePanel, CollapsibleRoot, CollapsibleTrigger } from "./Collapsible.js";
2
2
  import { t as cx } from "../class-names-9UtZwb0J.js";
3
- import { d as DotIcon, h as FileIcon, l as ChevronRightIcon, o as CheckIcon } from "../icons-DQC4Zw5R.js";
3
+ import { a as CheckIcon, c as ChevronRightIcon, m as FileIcon, u as DotIcon } from "../icons-CZRH4FVH.js";
4
4
  import { Button } from "./Button.js";
5
5
  import { Badge } from "./Badge.js";
6
6
  import { ScrollArea } from "./ScrollArea.js";
@@ -1,6 +1,6 @@
1
1
  import { CollapsiblePanel, CollapsibleRoot, CollapsibleTrigger } from "./Collapsible.js";
2
2
  import { t as cx } from "../class-names-9UtZwb0J.js";
3
- import { a as BrainIcon, l as ChevronRightIcon } from "../icons-DQC4Zw5R.js";
3
+ import { c as ChevronRightIcon } from "../icons-CZRH4FVH.js";
4
4
  import * as React from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { cjk } from "@streamdown/cjk";
@@ -140,22 +140,14 @@ function ReasoningTrigger({ className, children, getThinkingMessage = defaultGet
140
140
  "data-streaming": isStreaming ? "" : void 0,
141
141
  ...props,
142
142
  unstyled: true,
143
- children: [
144
- /* @__PURE__ */ jsx("span", {
145
- className: "reasoning__trigger-leading-icon",
146
- "aria-hidden": "true",
147
- children: /* @__PURE__ */ jsx(BrainIcon, {})
148
- }),
149
- /* @__PURE__ */ jsx("span", {
150
- className: "reasoning__trigger-label",
151
- children: getThinkingMessage(isStreaming, duration)
152
- }),
153
- /* @__PURE__ */ jsx("span", {
154
- className: "reasoning__trigger-icon",
155
- "aria-hidden": "true",
156
- children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
157
- })
158
- ]
143
+ children: [/* @__PURE__ */ jsx("span", {
144
+ className: "reasoning__trigger-label",
145
+ children: getThinkingMessage(isStreaming, duration)
146
+ }), /* @__PURE__ */ jsx("span", {
147
+ className: "reasoning__trigger-icon",
148
+ "aria-hidden": "true",
149
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
150
+ })]
159
151
  });
160
152
  }
161
153
  const streamdownPlugins = {
@@ -1,4 +1,4 @@
1
- import { i as ArrowUpIcon, o as CheckIcon, t as ArrowDownIcon } from "../icons-DQC4Zw5R.js";
1
+ import { a as CheckIcon, i as ArrowUpIcon, t as ArrowDownIcon } from "../icons-CZRH4FVH.js";
2
2
  import * as React from "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { Select as Select$1 } from "@base-ui/react/select";
@@ -1,6 +1,6 @@
1
1
  import { CollapsiblePanel, CollapsibleRoot, CollapsibleTrigger } from "./Collapsible.js";
2
2
  import { t as cx } from "../class-names-9UtZwb0J.js";
3
- import { b as LinkIcon, l as ChevronRightIcon } from "../icons-DQC4Zw5R.js";
3
+ import { c as ChevronRightIcon, y as LinkIcon } from "../icons-CZRH4FVH.js";
4
4
  import "react";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/Sources.tsx
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { A as SpinnerIcon, o as CheckIcon } from "../icons-DQC4Zw5R.js";
2
+ import { a as CheckIcon, k as SpinnerIcon } from "../icons-CZRH4FVH.js";
3
3
  import * as React from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/components/Stepper.tsx
@@ -1,6 +1,6 @@
1
1
  import { CollapsiblePanel, CollapsibleRoot, CollapsibleTrigger } from "./Collapsible.js";
2
2
  import { t as cx } from "../class-names-9UtZwb0J.js";
3
- import { h as FileIcon, k as SearchIcon, l as ChevronRightIcon } from "../icons-DQC4Zw5R.js";
3
+ import { O as SearchIcon, c as ChevronRightIcon, m as FileIcon } from "../icons-CZRH4FVH.js";
4
4
  import "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/Task.tsx
@@ -1,9 +1,9 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { F as XIcon, M as TerminalIcon } from "../icons-DQC4Zw5R.js";
2
+ import { P as XIcon, j as TerminalIcon } from "../icons-CZRH4FVH.js";
3
3
  import { Button } from "./Button.js";
4
4
  import { Tooltip, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipTrigger } from "./Tooltip.js";
5
+ import { t as CopyButton } from "../copy-button-BmJEAKuP.js";
5
6
  import { Badge } from "./Badge.js";
6
- import { t as CopyButton } from "../copy-button-Dd6DEhOm.js";
7
7
  import { ScrollArea } from "./ScrollArea.js";
8
8
  import * as React from "react";
9
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
1
  import { CollapsiblePanel, CollapsibleRoot, CollapsibleTrigger } from "./Collapsible.js";
2
2
  import { t as cx } from "../class-names-9UtZwb0J.js";
3
- import { A as SpinnerIcon, F as XIcon, l as ChevronRightIcon, o as CheckIcon } from "../icons-DQC4Zw5R.js";
3
+ import { P as XIcon, a as CheckIcon, c as ChevronRightIcon, k as SpinnerIcon } from "../icons-CZRH4FVH.js";
4
4
  import { Badge } from "./Badge.js";
5
5
  import * as React from "react";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";