@mcp-b/react-components 0.75.0 → 0.75.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.
@@ -1,8 +1,8 @@
1
1
  import { i as AgentMessageRenderPartContext } from "./AgentMessageParts-BtWwiE4f.js";
2
2
  import { AgentChatMessageContentProps } from "./components/agents-sdk/AgentChat.js";
3
3
  import { r as AgentToolRunValue } from "./AgentToolRunsContext-Br3jZ6Up.js";
4
- import { l as ThinkChatPart } from "./ThinkChatToolParts-vSzcCbQW.js";
5
- import { t as ThinkChatActivityDescription } from "./ThinkChatActivitySummary-Hvur11FV.js";
4
+ import { l as ThinkChatPart } from "./ThinkChatToolParts-kV8Ayg16.js";
5
+ import { t as ThinkChatActivityDescription } from "./ThinkChatActivitySummary-xAIIxiW9.js";
6
6
  import * as React from "react";
7
7
  import { DynamicToolUIPart, ToolUIPart, UIMessage } from "ai";
8
8
  //#region src/components/agents-sdk/ThinkChatActivity.d.ts
@@ -1,5 +1,5 @@
1
1
  import { a as AgentActivitySummary, n as AgentActivityIconKind } from "./AgentActivity-Cngwkalq.js";
2
- import { l as ThinkChatPart } from "./ThinkChatToolParts-vSzcCbQW.js";
2
+ import { l as ThinkChatPart } from "./ThinkChatToolParts-kV8Ayg16.js";
3
3
  import { DynamicToolUIPart, ToolUIPart } from "ai";
4
4
  //#region src/components/agents-sdk/ThinkChatActivitySummary.d.ts
5
5
  interface ThinkChatToolDescriber {
@@ -164,14 +164,6 @@ type SkillUITools = {
164
164
  };
165
165
  output: string;
166
166
  };
167
- run_skill_script: {
168
- input: {
169
- name: string;
170
- path: string;
171
- input?: unknown;
172
- };
173
- output: unknown;
174
- };
175
167
  };
176
168
  type SkillToolPart = ToolUIPart<SkillUITools>;
177
169
  declare function isSkillToolPart(part: ThinkChatPart): part is SkillToolPart;
@@ -1,7 +1,7 @@
1
1
  import { J as PromptInputMessage } from "../../PromptInput-DEwFMj6f.js";
2
2
  import { i as AgentMessageRenderPartContext } from "../../AgentMessageParts-BtWwiE4f.js";
3
3
  import { AgentChatMessageContentProps, AgentChatRootProps } from "./AgentChat.js";
4
- import { o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, t as ThinkChatActivity } from "../../ThinkChatActivity-Cb47dKAW.js";
4
+ import { o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, t as ThinkChatActivity } from "../../ThinkChatActivity-BdPJiQYr.js";
5
5
  import { i as ThinkChatValue } from "../../ThinkChatContext-DQ6M2VlJ.js";
6
6
  import * as React from "react";
7
7
  import { ChatStatus, UIMessage } from "ai";
@@ -1,2 +1,2 @@
1
- import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../../ThinkChatActivity-Cb47dKAW.js";
1
+ import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../../ThinkChatActivity-BdPJiQYr.js";
2
2
  export { ThinkChatActivity, ThinkChatActivityProps, ThinkChatActivityRendererOptions, ThinkChatToolRenderer, ThinkChatToolRenderers, createThinkChatActivityRenderer, renderThinkChatActivityPart };
@@ -1,2 +1,2 @@
1
- import { a as ThinkChatToolLifecycleSnapshot, c as deriveThinkChatActivityHeader, d as summarizeActivitySteps, i as ThinkChatToolDescribers, l as deriveThinkChatToolLifecycleHeader, n as ThinkChatActivityHeader, o as activityPartIconKind, r as ThinkChatToolDescriber, s as activityPartUrl, t as ThinkChatActivityDescription, u as describeThinkChatActivityPart } from "../../ThinkChatActivitySummary-Hvur11FV.js";
1
+ import { a as ThinkChatToolLifecycleSnapshot, c as deriveThinkChatActivityHeader, d as summarizeActivitySteps, i as ThinkChatToolDescribers, l as deriveThinkChatToolLifecycleHeader, n as ThinkChatActivityHeader, o as activityPartIconKind, r as ThinkChatToolDescriber, s as activityPartUrl, t as ThinkChatActivityDescription, u as describeThinkChatActivityPart } from "../../ThinkChatActivitySummary-xAIIxiW9.js";
2
2
  export { ThinkChatActivityDescription, ThinkChatActivityHeader, ThinkChatToolDescriber, ThinkChatToolDescribers, ThinkChatToolLifecycleSnapshot, activityPartIconKind, activityPartUrl, deriveThinkChatActivityHeader, deriveThinkChatToolLifecycleHeader, describeThinkChatActivityPart, summarizeActivitySteps };
@@ -249,7 +249,7 @@ function activityPartWorkspaceDestination(part) {
249
249
  case "tool-delete":
250
250
  case "tool-publish": {
251
251
  const path = part.input?.path;
252
- return typeof path === "string" && path.length > 0 ? {
252
+ return path ? {
253
253
  kind: "file",
254
254
  path,
255
255
  fragment: null
@@ -350,7 +350,6 @@ function describeSkillToolPart(part) {
350
350
  return described(working ? "Using" : "Used", name ? `the ${name} skill` : "a skill");
351
351
  }
352
352
  case "tool-read_skill_resource": return described(working ? "Reading" : "Read", part.input?.path ?? "a skill resource");
353
- case "tool-run_skill_script": return described(working ? "Running" : "Ran", part.input?.path ?? "a skill script");
354
353
  }
355
354
  })();
356
355
  return failed ? described(`${action} ${detail ?? ""}`.trim() + " · failed") : described(action, detail);
@@ -1,4 +1,4 @@
1
- import { c as SkillToolPart, f as WorkspaceToolPart, n as ExecuteToolPart, o as SessionContextToolPart, r as FetchToolPart, t as BrowserToolPart } from "../../ThinkChatToolParts-vSzcCbQW.js";
1
+ import { c as SkillToolPart, f as WorkspaceToolPart, n as ExecuteToolPart, o as SessionContextToolPart, r as FetchToolPart, t as BrowserToolPart } from "../../ThinkChatToolParts-kV8Ayg16.js";
2
2
  import { AnyToolUIPart } from "../ai-sdk/ToolPart.js";
3
3
  import * as React from "react";
4
4
  //#region src/components/agents-sdk/ThinkChatToolPanels.d.ts
@@ -10,7 +10,7 @@ export declare function ThinkChatWorkspacePanel({ part }: {
10
10
  part: WorkspaceToolPart;
11
11
  }): React.JSX.Element | null;
12
12
  /** Skill panels show what the model actually received: the activated skill's
13
- body, the resource text, or the script result. */
13
+ body or the resource text. */
14
14
  export declare function ThinkChatSkillPanel({ part }: {
15
15
  part: SkillToolPart;
16
16
  }): React.JSX.Element;
@@ -557,9 +557,9 @@ function WorkspacePublishPanel(t0) {
557
557
  return t3;
558
558
  }
559
559
  /** Skill panels show what the model actually received: the activated skill's
560
- body, the resource text, or the script result. */
560
+ body or the resource text. */
561
561
  function ThinkChatSkillPanel(t0) {
562
- const $ = c(13);
562
+ const $ = c(8);
563
563
  const { part } = t0;
564
564
  let t1;
565
565
  if ($[0] !== part) {
@@ -571,59 +571,35 @@ function ThinkChatSkillPanel(t0) {
571
571
  if (failure) return failure;
572
572
  switch (part.type) {
573
573
  case "tool-activate_skill": {
574
- const output_1 = part.state === "output-available" ? part.output : void 0;
574
+ const output_0 = part.state === "output-available" ? part.output : void 0;
575
575
  const t2 = part.input?.name ?? "skill";
576
576
  let t3;
577
- if ($[2] !== output_1 || $[3] !== t2) {
577
+ if ($[2] !== output_0 || $[3] !== t2) {
578
578
  t3 = /* @__PURE__ */ jsx(ActivityPanel, {
579
579
  label: t2,
580
- text: output_1
580
+ text: output_0
581
581
  });
582
- $[2] = output_1;
582
+ $[2] = output_0;
583
583
  $[3] = t2;
584
584
  $[4] = t3;
585
585
  } else t3 = $[4];
586
586
  return t3;
587
587
  }
588
588
  case "tool-read_skill_resource": {
589
- const output_0 = part.state === "output-available" ? part.output : void 0;
589
+ const output = part.state === "output-available" ? part.output : void 0;
590
590
  const t2 = part.input?.path ?? "resource";
591
591
  let t3;
592
- if ($[5] !== output_0 || $[6] !== t2) {
592
+ if ($[5] !== output || $[6] !== t2) {
593
593
  t3 = /* @__PURE__ */ jsx(ActivityPanel, {
594
594
  label: t2,
595
- text: output_0
595
+ text: output
596
596
  });
597
- $[5] = output_0;
597
+ $[5] = output;
598
598
  $[6] = t2;
599
599
  $[7] = t3;
600
600
  } else t3 = $[7];
601
601
  return t3;
602
602
  }
603
- case "tool-run_skill_script": {
604
- const output = part.state === "output-available" ? part.output : void 0;
605
- const t2 = part.input?.path ?? "script";
606
- let t3;
607
- if ($[8] !== output) {
608
- t3 = output !== void 0 ? /* @__PURE__ */ jsx(ExecutionResult, {
609
- result: output,
610
- showSummary: false
611
- }) : null;
612
- $[8] = output;
613
- $[9] = t3;
614
- } else t3 = $[9];
615
- let t4;
616
- if ($[10] !== t2 || $[11] !== t3) {
617
- t4 = /* @__PURE__ */ jsx(ActivityPanel, {
618
- label: t2,
619
- children: t3
620
- });
621
- $[10] = t2;
622
- $[11] = t3;
623
- $[12] = t4;
624
- } else t4 = $[12];
625
- return t4;
626
- }
627
603
  }
628
604
  }
629
605
  /** Session panels expose the durable context/search operation recorded in the
@@ -1,2 +1,2 @@
1
- import { C as isWorkspaceToolPart, E as workspaceToolError, S as isThinkChatActivityPart, T as thinkToolOutcome, _ as isPartFailed, a as SessionContextToolName, b as isSessionContextToolPart, c as SkillToolPart, d as ThinkWorkspaceToolName, f as WorkspaceToolPart, g as isFetchToolPart, h as isExecuteToolPart, i as FollowUpReceipt, l as ThinkChatPart, m as isBrowserToolPart, n as ExecuteToolPart, o as SessionContextToolPart, p as displayUrl, r as FetchToolPart, s as ShellToolPart, t as BrowserToolPart, u as ThinkToolOutcome, v as isPartWorking, w as readFollowUpReceipt, x as isSkillToolPart, y as isSessionContextToolFailure } from "../../ThinkChatToolParts-vSzcCbQW.js";
1
+ import { C as isWorkspaceToolPart, E as workspaceToolError, S as isThinkChatActivityPart, T as thinkToolOutcome, _ as isPartFailed, a as SessionContextToolName, b as isSessionContextToolPart, c as SkillToolPart, d as ThinkWorkspaceToolName, f as WorkspaceToolPart, g as isFetchToolPart, h as isExecuteToolPart, i as FollowUpReceipt, l as ThinkChatPart, m as isBrowserToolPart, n as ExecuteToolPart, o as SessionContextToolPart, p as displayUrl, r as FetchToolPart, s as ShellToolPart, t as BrowserToolPart, u as ThinkToolOutcome, v as isPartWorking, w as readFollowUpReceipt, x as isSkillToolPart, y as isSessionContextToolFailure } from "../../ThinkChatToolParts-kV8Ayg16.js";
2
2
  export { BrowserToolPart, ExecuteToolPart, FetchToolPart, FollowUpReceipt, SessionContextToolName, SessionContextToolPart, ShellToolPart, SkillToolPart, ThinkChatPart, ThinkToolOutcome, ThinkWorkspaceToolName, WorkspaceToolPart, displayUrl, isBrowserToolPart, isExecuteToolPart, isFetchToolPart, isPartFailed, isPartWorking, isSessionContextToolFailure, isSessionContextToolPart, isSkillToolPart, isThinkChatActivityPart, isWorkspaceToolPart, readFollowUpReceipt, thinkToolOutcome, workspaceToolError };
@@ -19,14 +19,9 @@ function isWorkspaceToolPart(part) {
19
19
  /** The `{ error }` (or publish's `{ ok: false, error }`) a settled workspace tool returned. */
20
20
  function workspaceToolError(part) {
21
21
  if (part.state !== "output-available" || part.preliminary) return void 0;
22
- const output = part.output;
23
- return isRecord(output) && typeof output.error === "string" ? output.error : void 0;
22
+ return "error" in part.output ? part.output.error : void 0;
24
23
  }
25
- const SKILL_TOOL_NAMES = /* @__PURE__ */ new Set([
26
- "activate_skill",
27
- "read_skill_resource",
28
- "run_skill_script"
29
- ]);
24
+ const SKILL_TOOL_NAMES = /* @__PURE__ */ new Set(["activate_skill", "read_skill_resource"]);
30
25
  function isSkillToolPart(part) {
31
26
  return isStaticToolUIPart(part) && SKILL_TOOL_NAMES.has(getStaticToolName(part));
32
27
  }
@@ -142,11 +137,11 @@ function thinkToolOutcome(part) {
142
137
  if (part.state === "output-denied" || part.state === "approval-responded" && !part.approval.approved) return "denied";
143
138
  if (!isStaticToolUIPart(part)) return void 0;
144
139
  if (part.state !== "output-available" || part.preliminary) return void 0;
140
+ if (isWorkspaceToolPart(part)) return workspaceToolError(part) === void 0 ? void 0 : "failed";
145
141
  const name = getToolName(part);
146
142
  const output = part.output;
147
143
  if (!isRecord(output)) return void 0;
148
144
  if (name === "execute" || name === "browser_execute") return output.status === "error" ? "failed" : void 0;
149
- if (isWorkspaceToolPart(part)) return workspaceToolError(part) === void 0 ? void 0 : "failed";
150
145
  if (name === "read_active_tab") return typeof output.error === "string" ? "failed" : void 0;
151
146
  if ((name === "follow_up" || name === "scheduled_tasks" || name === "search_history" || name === "set_thread_title") && isThinkActionError(output)) return "failed";
152
147
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-b/react-components",
3
- "version": "0.75.0",
3
+ "version": "0.75.1",
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": {
@@ -55,7 +55,7 @@
55
55
  "streamdown": "^2.7.0",
56
56
  "unist-util-visit": "^5.1.0",
57
57
  "yet-another-react-lightbox": "^3.32.2",
58
- "@mcp-b/design-tokens": "0.75.0"
58
+ "@mcp-b/design-tokens": "0.75.1"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@ai-sdk/react": "^4.0.136",