@mcp-b/react-components 0.73.0 → 0.75.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/ConversationTabPicker-C_hMt0GY.d.ts +28 -0
- package/dist/{EmployeeChrome-kegSASjC.d.ts → EmployeeChrome-D8_6ZbLc.d.ts} +2 -8
- package/dist/{ThinkChatActivity-C7xnO0Fx.d.ts → ThinkChatActivity-Cb47dKAW.d.ts} +2 -2
- package/dist/{ThinkChatActivitySummary-Dh4Av7x_.d.ts → ThinkChatActivitySummary-Hvur11FV.d.ts} +1 -1
- package/dist/{ThinkChatToolParts-BrntWlpa.d.ts → ThinkChatToolParts-vSzcCbQW.d.ts} +144 -25
- package/dist/{ThinkSchedule-C9vErgZQ.d.ts → ThinkSchedule-gDwDmWOF.d.ts} +1 -1
- package/dist/{WorkspaceAutomation-hwl6C1aX.d.ts → WorkspaceAutomation-Dugk4RkK.d.ts} +1 -1
- package/dist/components/agents-sdk/ComputerAutomations.d.ts +2 -2
- package/dist/components/agents-sdk/ComputerSettings.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeApp.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeChat.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +2 -2
- package/dist/components/agents-sdk/EmployeeChrome.js +62 -111
- package/dist/components/agents-sdk/EmployeeSchedules.d.ts +3 -3
- package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +1 -1
- package/dist/components/agents-sdk/ManagerOffice.d.ts +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +13 -4
- package/dist/components/agents-sdk/PromptInputCommands.js +4 -6
- package/dist/components/agents-sdk/ThinkChat.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivitySummary.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivitySummary.js +17 -10
- package/dist/components/agents-sdk/ThinkChatToolPanels.d.ts +5 -5
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +498 -254
- package/dist/components/agents-sdk/ThinkChatToolParts.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkChatToolParts.js +13 -4
- package/dist/components/agents-sdk/ThinkSchedule.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkScheduleForm.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceAutomation.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceAutomationTable.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspacePerson.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceProject.d.ts +1 -1
- package/dist/components/extension/ConversationTabPicker.d.ts +2 -27
- package/dist/components/extension/FirstRunSetup.d.ts +4 -4
- package/dist/styles/employee-chrome.css +1 -6
- package/dist/{workspace-concept-panel-D1czupvi.d.ts → workspace-concept-panel-BC2W28pu.d.ts} +1 -1
- package/package.json +16 -11
|
@@ -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-
|
|
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";
|
|
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-
|
|
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";
|
|
2
2
|
export { ThinkChatActivityDescription, ThinkChatActivityHeader, ThinkChatToolDescriber, ThinkChatToolDescribers, ThinkChatToolLifecycleSnapshot, activityPartIconKind, activityPartUrl, deriveThinkChatActivityHeader, deriveThinkChatToolLifecycleHeader, describeThinkChatActivityPart, summarizeActivitySteps };
|
|
@@ -3,7 +3,7 @@ import { getToolDisplayName } from "../ai-sdk/ToolPart.js";
|
|
|
3
3
|
import { t as summarizeToolInput } from "../../summarize-tool-input-CqTcGRYy.js";
|
|
4
4
|
import { i as workspaceBasename } from "../../workspace-path-TZggP-u4.js";
|
|
5
5
|
import { formatThinkExecutionShortTimestamp } from "./ThinkExecutionRun.js";
|
|
6
|
-
import { displayUrl, isBrowserToolPart, isExecuteToolPart, isFetchToolPart, isPartFailed, isPartWorking, isSessionContextToolFailure, isSessionContextToolPart, isSkillToolPart, isWorkspaceToolPart, readFollowUpReceipt, thinkToolOutcome } from "./ThinkChatToolParts.js";
|
|
6
|
+
import { displayUrl, isBrowserToolPart, isExecuteToolPart, isFetchToolPart, isPartFailed, isPartWorking, isSessionContextToolFailure, isSessionContextToolPart, isSkillToolPart, isWorkspaceToolPart, readFollowUpReceipt, thinkToolOutcome, workspaceToolError } from "./ThinkChatToolParts.js";
|
|
7
7
|
import { getStaticToolName, getToolName, isReasoningUIPart, isStaticToolUIPart, isToolUIPart } from "ai";
|
|
8
8
|
//#region src/components/agents-sdk/ThinkChatActivitySummary.ts
|
|
9
9
|
function described(action, detail) {
|
|
@@ -222,12 +222,14 @@ function activityPartIconKind(part, hasUrl) {
|
|
|
222
222
|
if (isReasoningUIPart(part)) return "thought";
|
|
223
223
|
if (isWorkspaceToolPart(part)) switch (part.type) {
|
|
224
224
|
case "tool-read":
|
|
225
|
-
case "tool-
|
|
225
|
+
case "tool-ls": return "read";
|
|
226
226
|
case "tool-write":
|
|
227
227
|
case "tool-edit":
|
|
228
228
|
case "tool-delete": return "edit";
|
|
229
229
|
case "tool-find":
|
|
230
230
|
case "tool-grep": return "search";
|
|
231
|
+
case "tool-publish": return "web";
|
|
232
|
+
case "tool-exec":
|
|
231
233
|
case "tool-bash": return "command";
|
|
232
234
|
}
|
|
233
235
|
if (isSkillToolPart(part)) return "tool";
|
|
@@ -244,7 +246,8 @@ function activityPartWorkspaceDestination(part) {
|
|
|
244
246
|
case "tool-read":
|
|
245
247
|
case "tool-write":
|
|
246
248
|
case "tool-edit":
|
|
247
|
-
case "tool-delete":
|
|
249
|
+
case "tool-delete":
|
|
250
|
+
case "tool-publish": {
|
|
248
251
|
const path = part.input?.path;
|
|
249
252
|
return typeof path === "string" && path.length > 0 ? {
|
|
250
253
|
kind: "file",
|
|
@@ -252,9 +255,10 @@ function activityPartWorkspaceDestination(part) {
|
|
|
252
255
|
fragment: null
|
|
253
256
|
} : null;
|
|
254
257
|
}
|
|
255
|
-
case "tool-
|
|
258
|
+
case "tool-ls":
|
|
256
259
|
case "tool-find":
|
|
257
260
|
case "tool-grep":
|
|
261
|
+
case "tool-exec":
|
|
258
262
|
case "tool-bash": return null;
|
|
259
263
|
}
|
|
260
264
|
}
|
|
@@ -312,9 +316,9 @@ function describeBuiltInThinkChatActivityPart(part) {
|
|
|
312
316
|
}
|
|
313
317
|
function describeWorkspaceToolPart(part) {
|
|
314
318
|
const working = isPartWorking(part);
|
|
315
|
-
const failed = isPartFailed(part);
|
|
316
|
-
if (part.type === "tool-bash") {
|
|
317
|
-
const command = part.input?.script?.trim() ?? "";
|
|
319
|
+
const failed = isPartFailed(part) || workspaceToolError(part) !== void 0;
|
|
320
|
+
if (part.type === "tool-exec" || part.type === "tool-bash") {
|
|
321
|
+
const command = (part.type === "tool-exec" ? part.input?.command : part.input?.script)?.trim() ?? "";
|
|
318
322
|
if (failed) return described("Command failed", command);
|
|
319
323
|
const verb = working ? "Running" : "Ran";
|
|
320
324
|
return command ? described(verb, command) : described(`${verb} a command`);
|
|
@@ -325,12 +329,13 @@ function describeWorkspaceToolPart(part) {
|
|
|
325
329
|
case "tool-write": return described(working ? "Writing" : "Wrote", part.input?.path ? workspaceBasename(part.input.path) : "a file");
|
|
326
330
|
case "tool-edit": return described(working ? "Editing" : "Edited", part.input?.path ? workspaceBasename(part.input.path) : "a file");
|
|
327
331
|
case "tool-delete": return described(working ? "Deleting" : "Deleted", part.input?.path || "a file");
|
|
328
|
-
case "tool-
|
|
332
|
+
case "tool-ls": {
|
|
329
333
|
const path = part.input?.path;
|
|
330
334
|
return described(working ? "Listing" : "Listed", path && path !== "/" ? path : "files");
|
|
331
335
|
}
|
|
332
336
|
case "tool-find": return described(working ? "Searching" : "Searched", `for ${part.input?.pattern || "files"}`);
|
|
333
337
|
case "tool-grep": return described(working ? "Searching" : "Searched", `for ${part.input?.query || "text"}`);
|
|
338
|
+
case "tool-publish": return described(working ? "Publishing" : "Published", part.input?.path ? workspaceBasename(part.input.path) : "a file");
|
|
334
339
|
}
|
|
335
340
|
})();
|
|
336
341
|
return failed ? described(`${action} ${detail ?? ""}`.trim() + " · failed") : described(action, detail);
|
|
@@ -442,7 +447,8 @@ function summarizeActivitySteps(parts) {
|
|
|
442
447
|
const reads = count("read");
|
|
443
448
|
const edits = count("edit") + count("write");
|
|
444
449
|
const deletes = count("delete");
|
|
445
|
-
const commands = count("bash");
|
|
450
|
+
const commands = count("exec") + count("bash");
|
|
451
|
+
const publishes = count("publish");
|
|
446
452
|
const segments = [];
|
|
447
453
|
if (thoughts > 0) segments.push("thought");
|
|
448
454
|
if (skillParts > 0) segments.push(skillNames.size === 1 ? `used the ${[...skillNames][0]} skill` : skillNames.size > 1 ? `used ${skillNames.size} skills` : "used a skill");
|
|
@@ -451,7 +457,8 @@ function summarizeActivitySteps(parts) {
|
|
|
451
457
|
if (edits > 0) segments.push(`edited ${files(edits)}`);
|
|
452
458
|
if (deletes > 0) segments.push(`deleted ${files(deletes)}`);
|
|
453
459
|
if (count("find") + count("grep") > 0) segments.push("searched code");
|
|
454
|
-
if (count("
|
|
460
|
+
if (count("ls") > 0) segments.push("listed files");
|
|
461
|
+
if (publishes > 0) segments.push(`published ${files(publishes)}`);
|
|
455
462
|
if (fetches > 0) segments.push(fetches === 1 ? "fetched a URL" : `fetched ${fetches} URLs`);
|
|
456
463
|
if (browses > 0) segments.push("used the browser");
|
|
457
464
|
if (codeRuns > 0) segments.push("ran code");
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as SkillToolPart, f as WorkspaceToolPart, n as ExecuteToolPart, o as SessionContextToolPart, r as FetchToolPart, t as BrowserToolPart } from "../../ThinkChatToolParts-vSzcCbQW.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
|
|
5
|
-
/** Default panels for the
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
the
|
|
5
|
+
/** Default panels for the workspace tools, Claude Code-style: read/write show
|
|
6
|
+
the file, edit shows upstream's line-numbered diff, ls/find/grep show
|
|
7
|
+
their pages of results, and exec or a host's bash get the shell panel.
|
|
8
|
+
Every field comes from the tool contract in ThinkChatToolParts. */
|
|
9
9
|
export declare function ThinkChatWorkspacePanel({ part }: {
|
|
10
10
|
part: WorkspaceToolPart;
|
|
11
11
|
}): React.JSX.Element | null;
|