@mcp-b/react-components 0.31.7 → 0.33.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.
- package/dist/AgentToolRunsContext-BCVqCtJ1.d.ts +44 -0
- package/dist/{CodeBlock-B5I7wje1.js → CodeBlock-CM5gfmdq.js} +1 -1
- package/dist/{FileTree-DbQMpvxV.js → FileTree-4WP4Uc_m.js} +1 -1
- package/dist/{ModelSelector-DZcpUBgn.js → ModelSelector-DzdEs2fX.js} +1 -1
- package/dist/{ThinkChat-BUoXVfrn.js → ThinkChat-en0UbkVv.js} +4 -15
- package/dist/{WorkspaceFileView-BeUpr6TU.js → WorkspaceFileView-BtzVKAed.js} +2 -2
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentActivityPreview.js +3 -3
- package/dist/components/agents-sdk/AgentChat.js +23 -14
- package/dist/components/agents-sdk/AgentToolRunsContext.d.ts +2 -2
- package/dist/components/agents-sdk/AgentToolRunsContext.js +20 -1
- package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
- package/dist/components/agents-sdk/McpConnectionRequest.js +2 -2
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +3 -3
- package/dist/components/agents-sdk/McpServerPicker.js +2 -2
- package/dist/components/agents-sdk/ModelSelector.js +1 -1
- package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
- package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
- package/dist/components/agents-sdk/SubagentRunSelector.js +2 -2
- package/dist/components/agents-sdk/ThinkChat.d.ts +3 -3
- package/dist/components/agents-sdk/ThinkChat.js +3 -3
- package/dist/components/agents-sdk/ThinkChatActivity.js +1 -1
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +3 -3
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +8 -0
- package/dist/components/agents-sdk/ThinkFullApp.js +3 -4
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +2 -2
- package/dist/components/agents-sdk/ThinkRoutineForm.js +3 -3
- package/dist/components/agents-sdk/ThinkRoutineLibrary.js +3 -3
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +2 -2
- package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -3
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.js +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
- package/dist/components/agents-sdk/WorkspaceMountManager.js +2 -2
- package/dist/components/ai-sdk/Activity.js +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
- package/dist/components/ai-sdk/Approval.js +1 -1
- package/dist/components/ai-sdk/Artifact.js +1 -1
- package/dist/components/ai-sdk/ChainOfThought.js +1 -1
- package/dist/components/ai-sdk/Checkpoint.js +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/Conversation.js +1 -1
- package/dist/components/ai-sdk/Goal.js +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
- package/dist/components/ai-sdk/Message.js +3 -3
- package/dist/components/ai-sdk/MessageScroller.js +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
- package/dist/components/ai-sdk/Plan.d.ts +2 -2
- package/dist/components/ai-sdk/Plan.js +3 -3
- package/dist/components/ai-sdk/PromptInput.js +3 -3
- package/dist/components/ai-sdk/Queue.js +1 -1
- package/dist/components/ai-sdk/Reasoning.d.ts +3 -2
- package/dist/components/ai-sdk/Reasoning.js +7 -16
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.js +1 -1
- package/dist/components/extension/ChatGptSignInScreen.js +2 -2
- package/dist/components/extension/CodexModelSelector.js +2 -2
- package/dist/components/extension/ConversationTabPicker.js +3 -3
- package/dist/components/foundations/Checkbox.js +1 -1
- package/dist/components/foundations/Collapsible.js +1 -1
- package/dist/components/foundations/ContextMenu.js +1 -1
- package/dist/components/foundations/Menubar.js +1 -1
- package/dist/components/foundations/SearchField.js +1 -1
- package/dist/components/foundations/Select.js +1 -1
- package/dist/components/foundations/Stepper.js +1 -1
- package/dist/components/foundations/Toast.js +1 -1
- package/dist/components/foundations/icons.js +1 -1
- package/dist/components/general-purpose/Commit.js +3 -3
- package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/PricingPlanCard.js +2 -2
- package/dist/components/general-purpose/PricingUsageCalculator.js +1 -1
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
- package/dist/components/general-purpose/SettingsFormDialog.js +2 -2
- package/dist/components/general-purpose/SetupChecklist.js +1 -1
- package/dist/components/general-purpose/Terminal.js +2 -2
- package/dist/components/general-purpose/TestResults.js +1 -1
- package/dist/components/general-purpose/ThemeModeControl.js +1 -1
- package/dist/components/general-purpose/WebPreview.js +2 -2
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.d.ts +14 -1
- package/dist/components/nanites/AgentToolDetail.js +19 -11
- package/dist/{copy-button-4YvddK4e.js → copy-button-CsNSSKYG.js} +1 -1
- package/dist/styles/activity.css +2 -0
- package/dist/styles/message.css +32 -2
- package/dist/styles/reasoning.css +6 -0
- package/package.json +2 -2
- package/dist/AgentToolRunsContext-Cgve-Upx.d.ts +0 -21
- package/dist/{icons-B4mGvCvc.js → icons-B1Qw05te.js} +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as MonitorIcon, I as MoonIcon, Z as SunIcon } from "../../icons-
|
|
1
|
+
import { F as MonitorIcon, I as MoonIcon, Z as SunIcon } from "../../icons-B1Qw05te.js";
|
|
2
2
|
import { Radio, RadioGroup } from "../foundations/RadioGroup.js";
|
|
3
3
|
import { useTheme } from "../foundations/ThemeProvider.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { W as RefreshIcon, f as ChevronDownIcon, i as ArrowRightIcon, r as ArrowLeftIcon } from "../../icons-B1Qw05te.js";
|
|
2
3
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
3
|
-
import { W as RefreshIcon, f as ChevronDownIcon, i as ArrowRightIcon, r as ArrowLeftIcon } from "../../icons-B4mGvCvc.js";
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
5
|
import { Badge } from "../foundations/Badge.js";
|
|
6
|
-
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
7
6
|
import { Input } from "../foundations/Input.js";
|
|
7
|
+
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
8
8
|
import * as React from "react";
|
|
9
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
//#region src/components/general-purpose/WebPreview.tsx
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { k as LinkIcon } from "../../icons-
|
|
2
|
+
import { k as LinkIcon } from "../../icons-B1Qw05te.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
-
import { a as CodeBlockCopyButton, i as CodeBlockContent, n as CodeBlockActions, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock } from "../../CodeBlock-B5I7wje1.js";
|
|
5
4
|
import { Popover } from "../foundations/Popover.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-CM5gfmdq.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/nanites/AgentConnection.tsx
|
|
@@ -45,6 +45,19 @@ interface SelectedAgentToolChildProps<ParentAgentT extends ThinkAgent<ParentStat
|
|
|
45
45
|
/** App-authored TanStack Router Link to the parent conversation. */
|
|
46
46
|
backLink?: React.ReactElement;
|
|
47
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Child connection options for a selected retained run: the parent's
|
|
50
|
+
* root-first base (or the app-supplied options) with the run's sub-agent step
|
|
51
|
+
* appended to the sub path.
|
|
52
|
+
*/
|
|
53
|
+
declare function selectedAgentToolChildOptions<ChildState = unknown>(parentAgent: {
|
|
54
|
+
agent: string;
|
|
55
|
+
name: string;
|
|
56
|
+
path: ReadonlyArray<{
|
|
57
|
+
agent: string;
|
|
58
|
+
name: string;
|
|
59
|
+
}>;
|
|
60
|
+
}, run: Pick<AgentToolRunState, "subAgent">, connectionOptions?: UseAgentOptions<ChildState>): UseAgentOptions<ChildState>;
|
|
48
61
|
/** Lazily connects one selected retained child and renders its real Think chat. */
|
|
49
62
|
declare function SelectedAgentToolChild<ParentAgentT extends ThinkAgent<ParentState>, ParentState = unknown, ChildState = unknown, MessageT extends UIMessage = UIMessage>({
|
|
50
63
|
backLink,
|
|
@@ -54,4 +67,4 @@ declare function SelectedAgentToolChild<ParentAgentT extends ThinkAgent<ParentSt
|
|
|
54
67
|
run
|
|
55
68
|
}: SelectedAgentToolChildProps<ParentAgentT, ParentState, ChildState, MessageT>): React.JSX.Element;
|
|
56
69
|
//#endregion
|
|
57
|
-
export { AgentToolDetail, AgentToolDetailProps, SelectedAgentToolChild, SelectedAgentToolChildProps };
|
|
70
|
+
export { AgentToolDetail, AgentToolDetailProps, SelectedAgentToolChild, SelectedAgentToolChildProps, selectedAgentToolChildOptions };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { r as ArrowLeftIcon } from "../../icons-
|
|
2
|
+
import { r as ArrowLeftIcon } from "../../icons-B1Qw05te.js";
|
|
3
3
|
import { TransitionSurface } from "../foundations/TransitionSurface.js";
|
|
4
4
|
import { SubagentRunMilestone, SubagentRunMilestones, SubagentRunProgress } from "../agents-sdk/SubagentRunDetails.js";
|
|
5
5
|
import { SubagentRunIndicator, getSubagentRunName } from "../agents-sdk/SubagentRunIndicator.js";
|
|
6
|
-
import { t as ThinkChat } from "../../ThinkChat-
|
|
6
|
+
import { t as ThinkChat } from "../../ThinkChat-en0UbkVv.js";
|
|
7
7
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
8
8
|
import { NaniteMark } from "./NaniteScene.js";
|
|
9
9
|
import * as React from "react";
|
|
@@ -80,21 +80,29 @@ function AgentToolDetail({ backLink, chat, className, messages, ref, run, ...pro
|
|
|
80
80
|
]
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Child connection options for a selected retained run: the parent's
|
|
85
|
+
* root-first base (or the app-supplied options) with the run's sub-agent step
|
|
86
|
+
* appended to the sub path.
|
|
87
|
+
*/
|
|
88
|
+
function selectedAgentToolChildOptions(parentAgent, run, connectionOptions) {
|
|
89
|
+
const [root, ...parentSubPath] = parentAgent.path;
|
|
90
|
+
return {
|
|
91
|
+
...connectionOptions ?? {
|
|
92
|
+
agent: root?.agent ?? parentAgent.agent,
|
|
93
|
+
name: root?.name ?? parentAgent.name
|
|
94
|
+
},
|
|
95
|
+
sub: [...connectionOptions?.sub ?? parentSubPath, run.subAgent]
|
|
96
|
+
};
|
|
97
|
+
}
|
|
83
98
|
/** Lazily connects one selected retained child and renders its real Think chat. */
|
|
84
99
|
function SelectedAgentToolChild({ backLink, connectionOptions, messages, parentAgent, run }) {
|
|
85
|
-
const [root, ...parentSubPath] = parentAgent.path;
|
|
86
100
|
return /* @__PURE__ */ jsx(AgentToolDetail, {
|
|
87
101
|
run,
|
|
88
|
-
chat: useAgentChat({ agent: useAgent(
|
|
89
|
-
...connectionOptions ?? {
|
|
90
|
-
agent: root?.agent ?? parentAgent.agent,
|
|
91
|
-
name: root?.name ?? parentAgent.name
|
|
92
|
-
},
|
|
93
|
-
sub: [...connectionOptions?.sub ?? parentSubPath, run.subAgent]
|
|
94
|
-
}) }),
|
|
102
|
+
chat: useAgentChat({ agent: useAgent(selectedAgentToolChildOptions(parentAgent, run, connectionOptions)) }),
|
|
95
103
|
messages,
|
|
96
104
|
backLink
|
|
97
105
|
}, run.runId);
|
|
98
106
|
}
|
|
99
107
|
//#endregion
|
|
100
|
-
export { AgentToolDetail, SelectedAgentToolChild };
|
|
108
|
+
export { AgentToolDetail, SelectedAgentToolChild, selectedAgentToolChildOptions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as CheckIcon, g as CopyIcon } from "./icons-
|
|
1
|
+
import { d as CheckIcon, g as CopyIcon } from "./icons-B1Qw05te.js";
|
|
2
2
|
import { IconButton } from "./components/foundations/IconButton.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
package/dist/styles/activity.css
CHANGED
package/dist/styles/message.css
CHANGED
|
@@ -122,8 +122,34 @@
|
|
|
122
122
|
color: var(--sigvelo-color-text-muted);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
.
|
|
126
|
-
|
|
125
|
+
.message__actions--reserved {
|
|
126
|
+
min-block-size: var(--sigvelo-control-height-sm);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.message[data-from="user"]:has(> .message__actions--inline) {
|
|
130
|
+
flex-direction: row-reverse;
|
|
131
|
+
align-items: center;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.message[data-from="user"] > .message__actions--inline {
|
|
135
|
+
align-self: center;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.message[data-from="user"] > .message__actions--inline[data-unavailable] {
|
|
139
|
+
visibility: hidden;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@media (hover: hover) and (pointer: fine) {
|
|
143
|
+
.message[data-from="user"] > .message__actions--inline {
|
|
144
|
+
opacity: 0;
|
|
145
|
+
pointer-events: none;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.message[data-from="user"]:hover > .message__actions--inline,
|
|
149
|
+
.message[data-from="user"]:focus-within > .message__actions--inline {
|
|
150
|
+
opacity: 1;
|
|
151
|
+
pointer-events: auto;
|
|
152
|
+
}
|
|
127
153
|
}
|
|
128
154
|
|
|
129
155
|
.message__action {
|
|
@@ -135,6 +161,10 @@
|
|
|
135
161
|
}
|
|
136
162
|
|
|
137
163
|
@media (any-pointer: coarse) {
|
|
164
|
+
.message__actions--reserved {
|
|
165
|
+
min-block-size: var(--sigvelo-control-height-xl);
|
|
166
|
+
}
|
|
167
|
+
|
|
138
168
|
.message__action {
|
|
139
169
|
--sigvelo-recipe-button-height: var(--sigvelo-control-height-xl);
|
|
140
170
|
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
.reasoning__status-icon {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
inline-size: var(--sigvelo-control-icon-size-md);
|
|
4
|
+
block-size: var(--sigvelo-control-icon-size-md);
|
|
5
|
+
}
|
|
6
|
+
|
|
1
7
|
.reasoning__text {
|
|
2
8
|
padding-inline-start: var(--sigvelo-spacing-3);
|
|
3
9
|
border-inline-start: var(--sigvelo-border-style) calc(var(--sigvelo-border-width) * 2)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-b/react-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "MCP-B React components built on Base UI and shared design tokens, including Cloudflare Think chat primitives.",
|
|
5
5
|
"homepage": "https://design-system.sigvelo.com",
|
|
6
6
|
"bugs": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"streamdown": "^2.5.0",
|
|
59
59
|
"unist-util-visit": "^5.1.0",
|
|
60
60
|
"yet-another-react-lightbox": "^3.32.1",
|
|
61
|
-
"@mcp-b/design-tokens": "0.
|
|
61
|
+
"@mcp-b/design-tokens": "0.33.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@ai-sdk/react": "^3.0.230",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { UIMessage } from "ai";
|
|
3
|
-
import { useAgentToolEvents } from "agents/react";
|
|
4
|
-
import { AgentToolRunPart } from "agents/agent-tools";
|
|
5
|
-
|
|
6
|
-
//#region src/components/agents-sdk/AgentToolRunsContext.d.ts
|
|
7
|
-
/** The complete upstream retained-run hook result for one parent connection. */
|
|
8
|
-
type AgentToolEventsValue<Part extends AgentToolRunPart = UIMessage["parts"][number]> = ReturnType<typeof useAgentToolEvents<Part>>;
|
|
9
|
-
interface AgentToolRunsProviderProps<Part extends AgentToolRunPart = UIMessage["parts"][number]> {
|
|
10
|
-
/** Pass the whole `useAgentToolEvents({ agent })` result directly. */
|
|
11
|
-
agentTools: AgentToolEventsValue<Part>;
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
}
|
|
14
|
-
/** Provides one parent connection's retained Agent Tool event projection. */
|
|
15
|
-
declare function AgentToolRunsProvider<Part extends AgentToolRunPart = UIMessage["parts"][number]>({
|
|
16
|
-
agentTools,
|
|
17
|
-
children
|
|
18
|
-
}: AgentToolRunsProviderProps<Part>): React.JSX.Element;
|
|
19
|
-
declare function useOptionalAgentToolRuns<Part extends AgentToolRunPart = UIMessage["parts"][number]>(): AgentToolEventsValue<Part> | null;
|
|
20
|
-
//#endregion
|
|
21
|
-
export { useOptionalAgentToolRuns as i, AgentToolRunsProvider as n, AgentToolRunsProviderProps as r, AgentToolEventsValue as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { Archive, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpRight, Bookmark, Box, Brain, CalendarDays, Check, ChevronDown, ChevronLeft, ChevronRight, CircleStop, CodeXml, Copy, CornerDownRight, Dot, Download, Ellipsis, Eye, EyeOff, File, Folder, FolderOpen, Hash, Image, Info, Link2, ListRestart, LoaderCircle, Maximize2, MessageSquare, Mic, Minus, Monitor, Moon, PanelLeft, Paperclip, Pause, Pencil, Play, Plus, RefreshCw, Search, Square, Sun, Target, Terminal, Trash2, TriangleAlert, Wrench, X } from "lucide-react";
|
|
4
3
|
import { FaSlack } from "react-icons/fa6";
|
|
5
4
|
import { SiDiscord, SiModelcontextprotocol } from "react-icons/si";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/_internal/icons.tsx
|
|
7
7
|
function icon(Component) {
|
|
8
8
|
return function DesignSystemIcon({ size = 16, strokeWidth = 1.75, ...props }) {
|