@mcp-b/react-components 0.51.2 → 0.53.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/{CodeBlock--r6GS8YV.d.ts → CodeBlock-DJ99TQWy.d.ts} +1 -1
- package/dist/{CodeBlock-g8sADidM.js → CodeBlock-Dw1z6jc8.js} +2 -1
- package/dist/EmployeeChrome-B605rpVz.d.ts +233 -0
- package/dist/{FileTree-DruTQ-oa.js → FileTree-okaLnS5j.js} +1 -1
- package/dist/{IconButton-ByiyjkYE.d.ts → IconButton-CAlFVb2L.d.ts} +3 -0
- package/dist/{ManagerOffice-D-7SOJ4x.js → ManagerOffice-CJwBAEMv.js} +17 -12
- package/dist/McpPluginCatalog-DNeHDrts.d.ts +94 -0
- package/dist/{Message-DyaTBiV7.d.ts → Message-COsMPZSC.d.ts} +2 -2
- package/dist/{ResponsiveSidebarShell-CAmmtQTR.d.ts → ResponsiveSidebarShell-BUBQa_IV.d.ts} +3 -1
- package/dist/{SetupChecklist-Btmy3-_C.js → SetupChecklist-DWyifWWg.js} +6 -5
- package/dist/{ThinkThreadPicker-yetGX_s5.d.ts → ThinkThreadPicker-DX0lL-P7.d.ts} +3 -0
- package/dist/{Workspace-HzGrWDX3.d.ts → Workspace-mzMZSdts.d.ts} +1 -1
- package/dist/WorkspaceConceptPanel-97ZyVpZI.js +20 -0
- package/dist/{WorkspaceFile-Bouauobc.d.ts → WorkspaceFile-19WP0EU1.d.ts} +1 -1
- package/dist/{WorkspaceFileView-DYPtRVpM.js → WorkspaceFileView-DQDWUpAH.js} +3 -2
- package/dist/{WorkspaceMessageResponse-8lOSAbw_.d.ts → WorkspaceMessageResponse-BApg8KZv.d.ts} +1 -1
- package/dist/WorkspaceMountManager-CkLI1B-G.d.ts +33 -0
- package/dist/assets/sigvelo-logo.svg +54 -0
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentChat.d.ts +6 -2
- package/dist/components/agents-sdk/AgentChat.js +12 -18
- package/dist/components/agents-sdk/BrowserLiveScreen.js +1 -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/EmployeeApp.d.ts +43 -30
- package/dist/components/agents-sdk/EmployeeApp.js +47 -34
- package/dist/components/agents-sdk/EmployeeChat.d.ts +31 -10
- package/dist/components/agents-sdk/EmployeeChat.js +35 -7
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +1 -219
- package/dist/components/agents-sdk/EmployeeChrome.js +219 -162
- package/dist/components/agents-sdk/EmployeeSchedules.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeSchedules.js +2 -3
- package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +12 -11
- package/dist/components/agents-sdk/EmployeeStartScreen.js +22 -15
- package/dist/components/agents-sdk/ManagerAccountActions.js +2 -3
- package/dist/components/agents-sdk/ManagerOffice.js +1 -2
- package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +2 -2
- package/dist/components/agents-sdk/ManagerOfficeScreens.js +33 -13
- package/dist/components/agents-sdk/McpConnectionRequest.js +2 -2
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +1 -93
- package/dist/components/agents-sdk/McpPluginCatalog.js +5 -5
- package/dist/components/agents-sdk/McpServerPicker.js +5 -5
- package/dist/components/agents-sdk/ModelSelector.js +4 -4
- 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/SubagentRunPanel.d.ts +3 -0
- package/dist/components/agents-sdk/SubagentRunPanel.js +67 -47
- package/dist/components/agents-sdk/SubagentRunSelector.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +2 -2
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +7 -14
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +2 -0
- package/dist/components/agents-sdk/ThinkFullApp.js +2 -0
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineActions.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +2 -2
- package/dist/components/agents-sdk/ThinkRoutineDetail.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineForm.js +3 -3
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +1 -1
- package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkThreadPicker.js +32 -19
- package/dist/components/agents-sdk/WorkbenchBack.d.ts +18 -0
- package/dist/components/agents-sdk/WorkbenchBack.js +27 -0
- package/dist/components/agents-sdk/Workspace.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +3 -1
- package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +6 -6
- package/dist/components/agents-sdk/WorkspaceExecution.js +13 -10
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +4 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.js +13 -4
- package/dist/components/agents-sdk/WorkspaceFile.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.d.ts +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/WorkspaceLive.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceMountManager.d.ts +1 -32
- package/dist/components/agents-sdk/WorkspaceMountManager.js +2 -2
- package/dist/components/agents-sdk/WorkspaceProject.js +7 -5
- package/dist/components/agents-sdk/WorkspaceUserScript.js +7 -5
- 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 +2 -2
- package/dist/components/ai-sdk/Artifact.d.ts +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.d.ts +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/ComposerLink.js +1 -1
- package/dist/components/ai-sdk/ConnectedAppCards.js +3 -3
- package/dist/components/ai-sdk/Context.js +1 -1
- package/dist/components/ai-sdk/Conversation.d.ts +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.d.ts +1 -1
- package/dist/components/ai-sdk/Message.js +2 -2
- package/dist/components/ai-sdk/MessageScroller.js +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.js +46 -43
- package/dist/components/ai-sdk/Queue.js +1 -1
- package/dist/components/ai-sdk/Reasoning.js +1 -1
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.js +1 -1
- package/dist/components/extension/ChatGptSignInScreen.d.ts +1 -1
- package/dist/components/extension/ChatGptSignInScreen.js +61 -186
- package/dist/components/extension/CodexModelSelector.js +4 -8
- package/dist/components/extension/ConversationTabPicker.js +2 -2
- 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/IconButton.d.ts +1 -1
- package/dist/components/foundations/IconButton.js +7 -4
- 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/AccountSignInDialog.d.ts +5 -9
- package/dist/components/general-purpose/AccountSignInDialog.js +13 -5
- package/dist/components/general-purpose/BrandLoading.d.ts +14 -0
- package/dist/components/general-purpose/BrandLoading.js +25 -0
- package/dist/components/general-purpose/Commit.d.ts +1 -1
- package/dist/components/general-purpose/Commit.js +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.d.ts +1 -1
- package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
- package/dist/components/general-purpose/PricingPlanCard.js +2 -2
- package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -1
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +59 -27
- package/dist/components/general-purpose/SettingsFormDialog.js +2 -2
- package/dist/components/general-purpose/SetupChecklist.js +1 -1
- package/dist/components/general-purpose/StatusScreen.d.ts +13 -2
- package/dist/components/general-purpose/StatusScreen.js +27 -3
- package/dist/components/general-purpose/Terminal.d.ts +2 -2
- 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.d.ts +1 -1
- package/dist/components/general-purpose/WebPreview.js +2 -2
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.js +2 -2
- package/dist/{copy-button-OUwOdgEm.d.ts → copy-button-CJYYgCIU.d.ts} +1 -1
- package/dist/{copy-button-CSDuDfdP.js → copy-button-Dk2vRe9j.js} +1 -1
- package/dist/styles/activity.css +2 -2
- package/dist/styles/agent-chat.css +6 -105
- package/dist/styles/app-root.css +9 -0
- package/dist/styles/app-top-bar.css +10 -4
- package/dist/styles/avatar.css +2 -2
- package/dist/styles/base.css +6 -2
- package/dist/styles/brand-loading.css +58 -0
- package/dist/styles/brand.test.ts +158 -0
- package/dist/styles/browser-control-overlay.css +22 -0
- package/dist/styles/button.css +22 -1
- package/dist/styles/chatgpt-sign-in-screen.css +111 -225
- package/dist/styles/code-block.css +5 -0
- package/dist/styles/codex-model-selector.css +2 -12
- package/dist/styles/description-list.css +9 -2
- package/dist/styles/employee-app.css +19 -1
- package/dist/styles/employee-chrome.css +39 -5
- package/dist/styles/file-tree.css +15 -2
- package/dist/styles/index.css +1 -0
- package/dist/styles/manager-office.css +80 -55
- package/dist/styles/manager-work.css +5 -11
- package/dist/styles/mcp-plugin-catalog.css +29 -34
- package/dist/styles/mcp-server-picker.css +13 -5
- package/dist/styles/prompt-input.css +3 -13
- package/dist/styles/queue.css +1 -1
- package/dist/styles/recipes.css +9 -2
- package/dist/styles/responsive-sidebar-shell-motion.test.ts +67 -0
- package/dist/styles/responsive-sidebar-shell.css +70 -25
- package/dist/styles/search-field.css +8 -6
- package/dist/styles/subagent-run.css +81 -0
- package/dist/styles/switch.css +7 -0
- package/dist/styles/think-execution-workbench.css +0 -17
- package/dist/styles/think-full-app.css +11 -4
- package/dist/styles/think-thread-picker.css +16 -38
- package/dist/styles/workspace-concepts.css +29 -2
- package/dist/styles/workspace-explorer.css +6 -48
- package/dist/utils/structured-code.d.ts +1 -1
- package/dist/{workspace-assets-Bg7XhPsk.js → workspace-assets-C3QT6UlQ.js} +1 -1
- package/package.json +2 -2
- package/dist/styles/extension-status.css +0 -46
- package/dist/{icons-cuEtsgj9.js → icons-CeGfXO21.js} +1 -1
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import { n as ManagerOfficeSidebar, r as ManagerOfficeSidebarAlert, t as ManagerOffice } from "../../ManagerOffice-D-7SOJ4x.js";
|
|
1
|
+
import { n as ManagerOfficeSidebar, r as ManagerOfficeSidebarAlert, t as ManagerOffice } from "../../ManagerOffice-CJwBAEMv.js";
|
|
3
2
|
export { ManagerOffice, ManagerOfficeSidebar, ManagerOfficeSidebarAlert };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EmployeeShellProps } from "
|
|
1
|
+
import { f as EmployeeShellProps } from "../../EmployeeChrome-B605rpVz.js";
|
|
2
2
|
import { ManagerOfficeConnectedEmployee, ManagerOfficeDestination, ManagerOfficeEmployee } from "./ManagerOffice.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ type ManagerOfficeView = {
|
|
|
9
9
|
kind: "employee";
|
|
10
10
|
employeeId: string;
|
|
11
11
|
};
|
|
12
|
-
interface ManagerWorkShellProps extends EmployeeShellProps {
|
|
12
|
+
interface ManagerWorkShellProps extends Omit<EmployeeShellProps, "appBarLeading"> {
|
|
13
13
|
employees: readonly ManagerOfficeEmployee[];
|
|
14
14
|
employee: ManagerOfficeEmployee;
|
|
15
15
|
renderOfficeLink: (destination: ManagerOfficeDestination) => React.ReactElement;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { B as PlusIcon, C as FolderIcon, G as SlackIcon, P as MonitorIcon, R as PencilIcon, et as WarningIcon,
|
|
1
|
+
import { B as PlusIcon, C as FolderIcon, G as SlackIcon, P as MonitorIcon, R as PencilIcon, W as SidebarIcon, et as WarningIcon, r as ArrowLeftIcon } from "../../icons-CeGfXO21.js";
|
|
2
|
+
import { IconButton } from "../foundations/IconButton.js";
|
|
2
3
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
3
|
-
import "../foundations/icons.js";
|
|
4
4
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
5
5
|
import { ResponsiveSidebarShell } from "../general-purpose/ResponsiveSidebarShell.js";
|
|
6
6
|
import { ThinkThreadPicker } from "./ThinkThreadPicker.js";
|
|
7
7
|
import { EmployeeChrome } from "./EmployeeChrome.js";
|
|
8
|
-
import { n as ManagerOfficeSidebar, r as ManagerOfficeSidebarAlert, t as ManagerOffice } from "../../ManagerOffice-
|
|
8
|
+
import { n as ManagerOfficeSidebar, r as ManagerOfficeSidebarAlert, t as ManagerOffice } from "../../ManagerOffice-CJwBAEMv.js";
|
|
9
9
|
import "react";
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/agents-sdk/ManagerOfficeScreens.tsx
|
|
@@ -16,35 +16,47 @@ function ManagerWorkShell({ employees, employee, renderOfficeLink, officeActions
|
|
|
16
16
|
renderLink: renderOfficeLink,
|
|
17
17
|
children: /* @__PURE__ */ jsx(EmployeeChrome.Shell, {
|
|
18
18
|
...chrome,
|
|
19
|
+
appBarLeading: /* @__PURE__ */ jsx(AppTopBar.Link, {
|
|
20
|
+
label: "Back to office",
|
|
21
|
+
render: renderOfficeLink({
|
|
22
|
+
kind: "employee",
|
|
23
|
+
employee
|
|
24
|
+
}),
|
|
25
|
+
children: /* @__PURE__ */ jsx(ArrowLeftIcon, {})
|
|
26
|
+
}),
|
|
19
27
|
sidebarLabel: "employees",
|
|
20
28
|
navigation: [
|
|
21
|
-
{
|
|
22
|
-
id: "chat",
|
|
23
|
-
label: "Chat",
|
|
24
|
-
icon: /* @__PURE__ */ jsx(MessageSquareIcon, {})
|
|
25
|
-
},
|
|
26
29
|
{
|
|
27
30
|
id: "files",
|
|
28
31
|
label: "Files",
|
|
32
|
+
description: "Browse files in this employee’s workspace.",
|
|
29
33
|
icon: /* @__PURE__ */ jsx(FolderIcon, {})
|
|
30
34
|
},
|
|
31
35
|
{
|
|
32
|
-
id: "
|
|
36
|
+
id: "browser",
|
|
33
37
|
label: "Browser",
|
|
38
|
+
description: "View this employee’s browser and current activity.",
|
|
34
39
|
icon: /* @__PURE__ */ jsx(MonitorIcon, {})
|
|
35
40
|
},
|
|
36
41
|
{
|
|
37
42
|
id: "channels",
|
|
38
43
|
label: "Channels",
|
|
44
|
+
description: "Manage the messaging channels connected to this employee.",
|
|
39
45
|
icon: /* @__PURE__ */ jsx(SlackIcon, {})
|
|
40
46
|
}
|
|
41
47
|
],
|
|
42
|
-
sidebar: ({ closeSidebarOnCompact }) => /* @__PURE__ */ jsx(ManagerOfficeSidebar, {
|
|
48
|
+
sidebar: ({ closeSidebar, closeSidebarOnCompact }) => /* @__PURE__ */ jsx(ManagerOfficeSidebar, {
|
|
43
49
|
layout: "chat",
|
|
44
50
|
employees,
|
|
45
51
|
selectedEmployeeId: employee.id,
|
|
46
52
|
closeSidebarOnCompact,
|
|
47
|
-
officeActions,
|
|
53
|
+
officeActions: /* @__PURE__ */ jsxs(Fragment, { children: [officeActions, /* @__PURE__ */ jsx(IconButton, {
|
|
54
|
+
label: "Hide workforce",
|
|
55
|
+
variant: "ghost",
|
|
56
|
+
size: "sm",
|
|
57
|
+
onClick: closeSidebar,
|
|
58
|
+
children: /* @__PURE__ */ jsx(SidebarIcon, {})
|
|
59
|
+
})] }),
|
|
48
60
|
renderLink: (destination) => {
|
|
49
61
|
if (destination.kind === "employee" && "work" in destination.employee) {
|
|
50
62
|
const first = destination.employee.work[0];
|
|
@@ -127,18 +139,26 @@ function ManagerOfficeScreen({ employees, renderLink, view, emptyOfficeAction, o
|
|
|
127
139
|
employees,
|
|
128
140
|
renderLink,
|
|
129
141
|
render: /* @__PURE__ */ jsx(ResponsiveSidebarShell, {
|
|
142
|
+
className: "employee-shell__navigation",
|
|
130
143
|
sidebarLabel: "employees",
|
|
131
144
|
showMainLabel: "Show workforce",
|
|
132
|
-
sidebar: ({ closeSidebarOnCompact }) => /* @__PURE__ */ jsx(ManagerOfficeSidebar, {
|
|
145
|
+
sidebar: ({ closeSidebar, closeSidebarOnCompact }) => /* @__PURE__ */ jsx(ManagerOfficeSidebar, {
|
|
133
146
|
employees,
|
|
134
147
|
renderLink,
|
|
135
148
|
selectedEmployeeId: employee?.id ?? null,
|
|
136
149
|
closeSidebarOnCompact,
|
|
137
|
-
officeActions
|
|
150
|
+
officeActions: /* @__PURE__ */ jsxs(Fragment, { children: [officeActions, /* @__PURE__ */ jsx(IconButton, {
|
|
151
|
+
label: "Hide workforce",
|
|
152
|
+
variant: "ghost",
|
|
153
|
+
size: "sm",
|
|
154
|
+
onClick: closeSidebar,
|
|
155
|
+
children: /* @__PURE__ */ jsx(SidebarIcon, {})
|
|
156
|
+
})] })
|
|
138
157
|
}),
|
|
139
158
|
bar: {
|
|
140
159
|
label: "Workforce controls",
|
|
141
160
|
title,
|
|
161
|
+
compactTitleTrigger: /* @__PURE__ */ jsx("span", { children: title }),
|
|
142
162
|
titleRender: (props) => /* @__PURE__ */ jsx("h1", {
|
|
143
163
|
...props,
|
|
144
164
|
children: props.children
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SpinnerIcon, d as CheckIcon, et as WarningIcon } from "../../icons-
|
|
2
|
+
import { K as SpinnerIcon, d as CheckIcon, et as WarningIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
+
import { AgentAttention, AgentAttentionActions, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
|
|
4
5
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
5
6
|
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
6
7
|
import { McpServerIcon } from "./McpServerIcon.js";
|
|
7
8
|
import { t as getMcpServerProjection } from "../../mcp-server-mAErsxHU.js";
|
|
8
|
-
import { AgentAttention, AgentAttentionActions, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
|
|
9
9
|
import * as React from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { getToolPartState } from "@cloudflare/think/react";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CUSTOM_MCP_SERVER_CARD } from "../../utils/mcp-server-catalog.js";
|
|
2
2
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
-
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
5
4
|
import { Field } from "../foundations/Field.js";
|
|
6
5
|
import { Form } from "../foundations/Form.js";
|
|
6
|
+
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
7
7
|
import { Fieldset } from "../foundations/Fieldset.js";
|
|
8
8
|
import * as React from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,94 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as McpServerCard } from "../../mcp-server-catalog-D9p4gGeJ.js";
|
|
3
|
-
import { r as McpConnectorFormValues } from "../../McpConnectorForm--HB0MEGC.js";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
import { MCPServersState } from "agents";
|
|
6
|
-
|
|
7
|
-
//#region src/components/agents-sdk/McpPluginCatalog.d.ts
|
|
8
|
-
/** Optional plugin-specific copy layered over the canonical MCP server card. */
|
|
9
|
-
interface McpPluginDetails {
|
|
10
|
-
developerName?: string;
|
|
11
|
-
marketplaceName?: string;
|
|
12
|
-
longDescription?: string;
|
|
13
|
-
capabilities?: readonly string[];
|
|
14
|
-
skills?: readonly string[];
|
|
15
|
-
}
|
|
16
|
-
interface McpPluginCatalogProps extends Omit<React.HTMLAttributes<HTMLElement>, "onSelect"> {
|
|
17
|
-
/** Canonical connector cards. The directory does not create a second plugin registry. */
|
|
18
|
-
servers: readonly McpServerCard[];
|
|
19
|
-
/** Upstream Agents MCP state used to project connected and recovery states. */
|
|
20
|
-
mcp?: MCPServersState;
|
|
21
|
-
/** Optional plugin metadata keyed by the canonical server ID. */
|
|
22
|
-
detailsByServerId?: Readonly<Record<string, McpPluginDetails | undefined>>;
|
|
23
|
-
/** Server IDs promoted into the Featured section, in display order. */
|
|
24
|
-
featuredServerIds?: readonly string[];
|
|
25
|
-
/** Host product name paired with the plugin in the connection dialog. */
|
|
26
|
-
brandName?: string;
|
|
27
|
-
/** Host product mark paired with the plugin in the connection dialog. */
|
|
28
|
-
brandLogo?: React.ReactNode;
|
|
29
|
-
/** Product-authored trust and data-sharing copy. Pass null to omit it. */
|
|
30
|
-
disclosure?: React.ReactNode;
|
|
31
|
-
/** Starts or recovers the existing MCP connection path. */
|
|
32
|
-
onConnect?: (server: McpServerCard) => void | Promise<void>;
|
|
33
|
-
/** Removes the exact upstream MCP entry. */
|
|
34
|
-
onDisconnect?: (serverId: string) => void | Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* Connects a user-supplied MCP server. Providing it puts the "Custom
|
|
37
|
-
* plugin" action in the bar, opening the shared connector setup dialog.
|
|
38
|
-
*/
|
|
39
|
-
onAddCustom?: (values: McpConnectorFormValues) => void | Promise<void>;
|
|
40
|
-
/** Accessible name only — the hosting tab or icon is the visible title. */
|
|
41
|
-
heading?: React.ReactNode;
|
|
42
|
-
/** Accessible label and placeholder for the plugin filter. */
|
|
43
|
-
searchLabel?: string;
|
|
44
|
-
/** Content shown when no plugins match the current filter. */
|
|
45
|
-
emptyMessage?: React.ReactNode;
|
|
46
|
-
}
|
|
47
|
-
interface McpPluginDetailsDialogProps {
|
|
48
|
-
/** Selected canonical server card. Passing null closes the dialog. */
|
|
49
|
-
server: McpServerCard | null;
|
|
50
|
-
details?: McpPluginDetails;
|
|
51
|
-
mcp?: MCPServersState;
|
|
52
|
-
brandName?: string;
|
|
53
|
-
brandLogo?: React.ReactNode;
|
|
54
|
-
disclosure?: React.ReactNode;
|
|
55
|
-
onConnect?: (server: McpServerCard) => void | Promise<void>;
|
|
56
|
-
onDisconnect?: (serverId: string) => void | Promise<void>;
|
|
57
|
-
onOpenChange: NonNullable<DialogProps["onOpenChange"]>;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Searchable plugin directory backed by the same MCP cards and live Agents
|
|
61
|
-
* state as {@link McpServerPicker}. Selecting a row opens the shared details
|
|
62
|
-
* dialog; connecting still delegates to the host's existing MCP/OAuth path.
|
|
63
|
-
*/
|
|
64
|
-
declare function McpPluginCatalog({
|
|
65
|
-
servers,
|
|
66
|
-
mcp,
|
|
67
|
-
detailsByServerId,
|
|
68
|
-
featuredServerIds,
|
|
69
|
-
brandName,
|
|
70
|
-
brandLogo,
|
|
71
|
-
disclosure,
|
|
72
|
-
onConnect,
|
|
73
|
-
onDisconnect,
|
|
74
|
-
onAddCustom,
|
|
75
|
-
heading,
|
|
76
|
-
searchLabel,
|
|
77
|
-
emptyMessage,
|
|
78
|
-
className,
|
|
79
|
-
...props
|
|
80
|
-
}: McpPluginCatalogProps): React.JSX.Element;
|
|
81
|
-
/** Reference-derived plugin detail surface without a parallel install state. */
|
|
82
|
-
declare function McpPluginDetailsDialog({
|
|
83
|
-
server,
|
|
84
|
-
details,
|
|
85
|
-
mcp,
|
|
86
|
-
brandName,
|
|
87
|
-
brandLogo,
|
|
88
|
-
disclosure,
|
|
89
|
-
onConnect,
|
|
90
|
-
onDisconnect,
|
|
91
|
-
onOpenChange
|
|
92
|
-
}: McpPluginDetailsDialogProps): React.JSX.Element;
|
|
93
|
-
//#endregion
|
|
1
|
+
import { a as McpPluginDetailsDialogProps, i as McpPluginDetailsDialog, n as McpPluginCatalogProps, r as McpPluginDetails, t as McpPluginCatalog } from "../../McpPluginCatalog-DNeHDrts.js";
|
|
94
2
|
export { McpPluginCatalog, McpPluginCatalogProps, McpPluginDetails, McpPluginDetailsDialog, McpPluginDetailsDialogProps };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CUSTOM_MCP_SERVER_CARD } from "../../utils/mcp-server-catalog.js";
|
|
2
2
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
3
|
-
import { B as PlusIcon, K as SpinnerIcon, et as WarningIcon, nt as XIcon, o as ArrowUpRightIcon, y as EllipsisIcon } from "../../icons-
|
|
3
|
+
import { B as PlusIcon, K as SpinnerIcon, et as WarningIcon, nt as XIcon, o as ArrowUpRightIcon, y as EllipsisIcon } from "../../icons-CeGfXO21.js";
|
|
4
4
|
import { Button } from "../foundations/Button.js";
|
|
5
|
+
import { AgentAttention, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
|
|
5
6
|
import { IconButton } from "../foundations/IconButton.js";
|
|
6
7
|
import { Dialog } from "../foundations/Dialog.js";
|
|
7
8
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
@@ -11,7 +12,6 @@ import { McpServerIcon } from "./McpServerIcon.js";
|
|
|
11
12
|
import { SearchField } from "../foundations/SearchField.js";
|
|
12
13
|
import { t as getMcpServerProjection } from "../../mcp-server-mAErsxHU.js";
|
|
13
14
|
import { McpServerSetupDialog } from "./McpServerPicker.js";
|
|
14
|
-
import { AgentAttention, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
|
|
15
15
|
import * as React from "react";
|
|
16
16
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
17
17
|
//#region src/components/agents-sdk/McpPluginCatalog.tsx
|
|
@@ -35,7 +35,7 @@ function McpPluginCatalog({ servers, mcp, detailsByServerId, featuredServerIds =
|
|
|
35
35
|
className: "mcp-plugin-catalog__header",
|
|
36
36
|
children: [
|
|
37
37
|
/* @__PURE__ */ jsx("h1", {
|
|
38
|
-
className: "
|
|
38
|
+
className: "mcp-plugin-catalog__title",
|
|
39
39
|
children: heading
|
|
40
40
|
}),
|
|
41
41
|
/* @__PURE__ */ jsxs(SearchField.Root, {
|
|
@@ -131,7 +131,7 @@ function McpPluginCatalog({ servers, mcp, detailsByServerId, featuredServerIds =
|
|
|
131
131
|
function McpPluginDetailsDialog({ server, details, mcp, brandName = "your AI", brandLogo = /* @__PURE__ */ jsx("img", {
|
|
132
132
|
alt: "",
|
|
133
133
|
className: "sigvelo-brand-mark sigvelo-brand-mark--colorful",
|
|
134
|
-
src: new URL("../../assets/
|
|
134
|
+
src: new URL("../../assets/sigvelo-logo.svg", import.meta.url).href,
|
|
135
135
|
width: 128,
|
|
136
136
|
height: 128
|
|
137
137
|
}), disclosure = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -227,7 +227,7 @@ function McpPluginCard({ server, details, mcp, onSelect }) {
|
|
|
227
227
|
onClick: onSelect,
|
|
228
228
|
children: [/* @__PURE__ */ jsx(McpServerIcon, {
|
|
229
229
|
server,
|
|
230
|
-
size: "
|
|
230
|
+
size: "sm"
|
|
231
231
|
}), /* @__PURE__ */ jsxs("span", {
|
|
232
232
|
className: "mcp-plugin-catalog__card-copy",
|
|
233
233
|
children: [/* @__PURE__ */ jsx("span", {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as mergeBaseClassName } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SpinnerIcon, N as MinusIcon, d as CheckIcon, et as WarningIcon } from "../../icons-
|
|
2
|
+
import { K as SpinnerIcon, N as MinusIcon, d as CheckIcon, et as WarningIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { buttonVariants } from "../foundations/Button.js";
|
|
4
|
+
import { Menu } from "../foundations/Menu.js";
|
|
4
5
|
import { Dialog } from "../foundations/Dialog.js";
|
|
5
6
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
6
|
-
import { Menu } from "../foundations/Menu.js";
|
|
7
7
|
import { PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuTrigger } from "../ai-sdk/PromptInput.js";
|
|
8
8
|
import { McpServerIcon } from "./McpServerIcon.js";
|
|
9
9
|
import { t as getMcpServerProjection } from "../../mcp-server-mAErsxHU.js";
|
|
@@ -30,7 +30,7 @@ function McpServerSetupDialog({ server, defaults, onOpenChange, onSubmit, redire
|
|
|
30
30
|
open: server !== null,
|
|
31
31
|
onOpenChange,
|
|
32
32
|
children: /* @__PURE__ */ jsxs(Dialog.Portal, { children: [/* @__PURE__ */ jsx(Dialog.Backdrop, {}), /* @__PURE__ */ jsx(Dialog.Viewport, { children: /* @__PURE__ */ jsxs(Dialog.Popup, { children: [
|
|
33
|
-
/* @__PURE__ */ jsxs(Dialog.Header, { children: [/* @__PURE__ */ jsx(Dialog.Title, { children: server ? server.name.endsWith("MCP") ? server.name : `${server.name} MCP` : "
|
|
33
|
+
/* @__PURE__ */ jsxs(Dialog.Header, { children: [/* @__PURE__ */ jsx(Dialog.Title, { children: server ? server.name.endsWith("MCP") ? server.name : `${server.name} MCP` : "Plugins" }), /* @__PURE__ */ jsx(Dialog.Description, { children: server?.manualSetup?.description ?? "Connect a remote MCP server the model can call." })] }),
|
|
34
34
|
server?.manualSetup?.links.length ? /* @__PURE__ */ jsx("div", {
|
|
35
35
|
className: "mcp-server-setup-dialog__links",
|
|
36
36
|
children: server.manualSetup.links.map((link) => /* @__PURE__ */ jsx("a", {
|
|
@@ -262,14 +262,14 @@ function getPickerRows(servers, mcp) {
|
|
|
262
262
|
function groupPickerRows(rows) {
|
|
263
263
|
const groups = /* @__PURE__ */ new Map();
|
|
264
264
|
for (const row of rows) {
|
|
265
|
-
const key = row.projection.connectionKind === "connected" ? "Connected" : row.server.category === "Auto" ? "
|
|
265
|
+
const key = row.projection.connectionKind === "connected" ? "Connected" : row.server.category === "Auto" ? "Plugins" : row.server.category === "Manual" ? "Manual setup" : row.server.category ?? "Other";
|
|
266
266
|
const group = groups.get(key) ?? [];
|
|
267
267
|
group.push(row);
|
|
268
268
|
groups.set(key, group);
|
|
269
269
|
}
|
|
270
270
|
const order = [
|
|
271
271
|
"Connected",
|
|
272
|
-
"
|
|
272
|
+
"Plugins",
|
|
273
273
|
"Manual setup",
|
|
274
274
|
"Other"
|
|
275
275
|
];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { U as SearchIcon, f as ChevronDownIcon } from "../../icons-
|
|
2
|
+
import { U as SearchIcon, f as ChevronDownIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
+
import { Autocomplete } from "../foundations/Autocomplete.js";
|
|
4
5
|
import { Dialog } from "../foundations/Dialog.js";
|
|
5
6
|
import { c as titleCase } from "../../format-COCyV98Z.js";
|
|
6
|
-
import {
|
|
7
|
+
import { Separator } from "../foundations/Separator.js";
|
|
7
8
|
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
8
|
-
import { EmptyState } from "../foundations/EmptyState.js";
|
|
9
9
|
import { t as ProviderLogo } from "../../provider-logos-DWYY8wNz.js";
|
|
10
|
-
import {
|
|
10
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
11
11
|
import * as React from "react";
|
|
12
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { createPortal } from "react-dom";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { ThinkExecutionApproval, ThinkPendingApproval, getPausedExecution } from "./ThinkPendingApproval.js";
|
|
3
2
|
import { ToolApproval } from "../ai-sdk/ToolApproval.js";
|
|
3
|
+
import { ThinkExecutionApproval, ThinkPendingApproval, getPausedExecution } from "./ThinkPendingApproval.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { isToolUIPart } from "ai";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { composerLinkHref } from "../../utils/composer-link.js";
|
|
2
2
|
import { findCatalogMcpServerCard, getMcpServerIconSrc } from "../../utils/mcp-server-catalog.js";
|
|
3
|
-
import { A as McpIcon, c as BoxIcon } from "../../icons-
|
|
3
|
+
import { A as McpIcon, c as BoxIcon } from "../../icons-CeGfXO21.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/agents-sdk/PromptInputCommands.tsx
|
|
6
6
|
function mcpServerCommandIcon(server) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { J as StopIcon, K as SpinnerIcon, d as CheckIcon, et as WarningIcon } from "../../icons-
|
|
2
|
+
import { J as StopIcon, K as SpinnerIcon, d as CheckIcon, et as WarningIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { r as firstLine, s as textLines } from "../../format-COCyV98Z.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -15,6 +15,8 @@ interface SubagentRunCollectionState {
|
|
|
15
15
|
error?: string;
|
|
16
16
|
}
|
|
17
17
|
interface SubagentRunPanelProviderProps {
|
|
18
|
+
/** Conversation identity; changing it resets transient controls without remounting children. */
|
|
19
|
+
scopeKey: string;
|
|
18
20
|
/** The one upstream event-hook value from the parent connection. */
|
|
19
21
|
agentTools: AgentToolEventsValue<AgentToolRunPart>;
|
|
20
22
|
collection: SubagentRunCollectionState;
|
|
@@ -39,6 +41,7 @@ interface SubagentRunPanelValue extends Pick<SubagentRunPanelProviderProps, "age
|
|
|
39
41
|
}
|
|
40
42
|
/** A thread's transient controls/disclosure state; run facts remain in the SDK value. */
|
|
41
43
|
declare function SubagentRunPanelProvider({
|
|
44
|
+
scopeKey,
|
|
42
45
|
agentTools,
|
|
43
46
|
collection,
|
|
44
47
|
mayExecute,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createExpansionStore } from "../ai-sdk/ExpansionState.js";
|
|
2
2
|
import { Button } from "../foundations/Button.js";
|
|
3
|
+
import { Queue, QueueItem, QueueItemAction, QueueItemActions, QueueItemContent, QueueItemDescription, QueueList, QueueSection, QueueSectionActions, QueueSectionContent, QueueSectionLabel, QueueSectionTrigger } from "../ai-sdk/Queue.js";
|
|
3
4
|
import { getSubagentRunName } from "./SubagentRunIndicator.js";
|
|
4
5
|
import { useOptionalAgentChatQueue } from "./AgentChatQueue.js";
|
|
5
|
-
import { Queue, QueueItem, QueueItemAction, QueueItemActions, QueueItemContent, QueueItemDescription, QueueList, QueueSection, QueueSectionActions, QueueSectionContent, QueueSectionLabel, QueueSectionTrigger } from "../ai-sdk/Queue.js";
|
|
6
6
|
import { AgentChatNotice, AgentChatPromptTray } from "./AgentChat.js";
|
|
7
7
|
import { SubagentRunSelector } from "./SubagentRunSelector.js";
|
|
8
8
|
import * as React from "react";
|
|
@@ -10,41 +10,55 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
10
10
|
//#region src/components/agents-sdk/SubagentRunPanel.tsx
|
|
11
11
|
const IDLE = { pending: false };
|
|
12
12
|
const SubagentRunPanelContext = React.createContext(null);
|
|
13
|
+
function createPanelState(scopeKey, selectedRunId) {
|
|
14
|
+
return {
|
|
15
|
+
scopeKey,
|
|
16
|
+
open: true,
|
|
17
|
+
hiddenCompleted: /* @__PURE__ */ new Set(),
|
|
18
|
+
commands: {},
|
|
19
|
+
reportDisclosures: createExpansionStore(),
|
|
20
|
+
inFlight: /* @__PURE__ */ new Map(),
|
|
21
|
+
restoreFocusRunId: { current: selectedRunId }
|
|
22
|
+
};
|
|
23
|
+
}
|
|
13
24
|
/** A thread's transient controls/disclosure state; run facts remain in the SDK value. */
|
|
14
|
-
function SubagentRunPanelProvider({ agentTools, collection, mayExecute, selectedRunId, parentRunning, onStopCurrentWork, onStopRun, children }) {
|
|
15
|
-
const [
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
function SubagentRunPanelProvider({ scopeKey, agentTools, collection, mayExecute, selectedRunId, parentRunning, onStopCurrentWork, onStopRun, children }) {
|
|
26
|
+
const [state, setState] = React.useState(() => createPanelState(scopeKey, selectedRunId));
|
|
27
|
+
if (state.scopeKey !== scopeKey) setState(createPanelState(scopeKey, selectedRunId));
|
|
28
|
+
const { open, hiddenCompleted, commands, reportDisclosures, inFlight, restoreFocusRunId } = state;
|
|
29
|
+
const setOpen = React.useCallback((open) => setState((current) => current.inFlight === inFlight ? {
|
|
30
|
+
...current,
|
|
31
|
+
open
|
|
32
|
+
} : current), [inFlight]);
|
|
33
|
+
const setHiddenCompleted = React.useCallback((hiddenCompleted) => setState((current) => current.inFlight === inFlight ? {
|
|
34
|
+
...current,
|
|
35
|
+
hiddenCompleted
|
|
36
|
+
} : current), [inFlight]);
|
|
21
37
|
React.useLayoutEffect(() => {
|
|
22
38
|
if (selectedRunId) restoreFocusRunId.current = selectedRunId;
|
|
23
|
-
}, [selectedRunId]);
|
|
39
|
+
}, [restoreFocusRunId, selectedRunId]);
|
|
24
40
|
const execute = React.useCallback((key, command) => {
|
|
25
|
-
const pending = inFlight.
|
|
41
|
+
const pending = inFlight.get(key);
|
|
26
42
|
if (pending) return pending;
|
|
27
|
-
|
|
28
|
-
...current,
|
|
29
|
-
[key]: { pending: true }
|
|
30
|
-
}));
|
|
31
|
-
const operation = Promise.resolve().then(command).then(() => setCommands((current) => ({
|
|
43
|
+
const setCommand = (command) => setState((current) => current.inFlight === inFlight ? {
|
|
32
44
|
...current,
|
|
33
|
-
|
|
34
|
-
|
|
45
|
+
commands: {
|
|
46
|
+
...current.commands,
|
|
47
|
+
[key]: command
|
|
48
|
+
}
|
|
49
|
+
} : current);
|
|
50
|
+
setCommand({ pending: true });
|
|
51
|
+
const operation = Promise.resolve().then(command).then(() => setCommand(IDLE), (cause) => {
|
|
35
52
|
const error = cause instanceof Error ? cause.message : "Stop could not be confirmed. Try again.";
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
error
|
|
41
|
-
}
|
|
42
|
-
}));
|
|
53
|
+
setCommand({
|
|
54
|
+
pending: false,
|
|
55
|
+
error
|
|
56
|
+
});
|
|
43
57
|
throw cause;
|
|
44
|
-
}).finally(() => inFlight.
|
|
45
|
-
inFlight.
|
|
58
|
+
}).finally(() => inFlight.delete(key));
|
|
59
|
+
inFlight.set(key, operation);
|
|
46
60
|
return operation;
|
|
47
|
-
}, []);
|
|
61
|
+
}, [inFlight]);
|
|
48
62
|
const stopCurrentWork = React.useCallback(() => execute("current-work", onStopCurrentWork), [execute, onStopCurrentWork]);
|
|
49
63
|
const stopRun = React.useCallback((id) => execute(id, () => onStopRun(id)), [execute, onStopRun]);
|
|
50
64
|
const value = React.useMemo(() => ({
|
|
@@ -71,6 +85,9 @@ function SubagentRunPanelProvider({ agentTools, collection, mayExecute, selected
|
|
|
71
85
|
open,
|
|
72
86
|
hiddenCompleted,
|
|
73
87
|
reportDisclosures,
|
|
88
|
+
restoreFocusRunId,
|
|
89
|
+
setOpen,
|
|
90
|
+
setHiddenCompleted,
|
|
74
91
|
commands,
|
|
75
92
|
stopCurrentWork,
|
|
76
93
|
stopRun
|
|
@@ -135,14 +152,14 @@ function delegatedWorkLabel(active, completed) {
|
|
|
135
152
|
const counts = [active ? `${active} active` : null, completed ? `${completed} finished` : null].filter(Boolean).join(", ");
|
|
136
153
|
return `Delegated work${counts ? `, ${counts}` : ""}`;
|
|
137
154
|
}
|
|
138
|
-
function SubagentRunPanelControls({ panel, active
|
|
155
|
+
function SubagentRunPanelControls({ panel, active }) {
|
|
139
156
|
const queue = useOptionalAgentChatQueue();
|
|
140
157
|
const stop = panel.commands["current-work"] ?? IDLE;
|
|
141
158
|
const canStop = panel.parentRunning || active > 1 || panel.collection.status !== "ready";
|
|
142
|
-
if (!canStop && !stop.error && !stop.pending
|
|
143
|
-
return /* @__PURE__ */
|
|
159
|
+
if (!canStop && !stop.error && !stop.pending) return null;
|
|
160
|
+
return /* @__PURE__ */ jsx(QueueSectionActions, {
|
|
144
161
|
"aria-label": "Delegated work controls",
|
|
145
|
-
children:
|
|
162
|
+
children: canStop || stop.error || stop.pending ? /* @__PURE__ */ jsx(Button, {
|
|
146
163
|
size: "xs",
|
|
147
164
|
variant: "ghost",
|
|
148
165
|
color: "neutral",
|
|
@@ -154,13 +171,7 @@ function SubagentRunPanelControls({ panel, active, completed }) {
|
|
|
154
171
|
panel.stopCurrentWork().catch(() => void 0);
|
|
155
172
|
},
|
|
156
173
|
children: stop.pending ? "Stopping current work…" : "Stop current work"
|
|
157
|
-
}) : null
|
|
158
|
-
size: "xs",
|
|
159
|
-
variant: "ghost",
|
|
160
|
-
color: "neutral",
|
|
161
|
-
onClick: () => panel.setHiddenCompleted(panel.hiddenCompleted.size ? /* @__PURE__ */ new Set() : new Set(completed.map((run) => run.runId))),
|
|
162
|
-
children: panel.hiddenCompleted.size ? `Show completed (${completed.length})` : "Hide completed"
|
|
163
|
-
}) : null]
|
|
174
|
+
}) : null
|
|
164
175
|
});
|
|
165
176
|
}
|
|
166
177
|
function SubagentRunRow({ panel, run, renderRunLink }) {
|
|
@@ -206,13 +217,23 @@ function SubagentRunPanelContent({ panel, renderRunLink }) {
|
|
|
206
217
|
onOpenChange: panel.setOpen,
|
|
207
218
|
onFocusCapture: focus.onFocusCapture,
|
|
208
219
|
onBlurCapture: focus.onBlurCapture,
|
|
209
|
-
children: [/* @__PURE__ */
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
children:
|
|
215
|
-
|
|
220
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
221
|
+
className: "subagent-run__panel-header",
|
|
222
|
+
children: [/* @__PURE__ */ jsx(QueueSectionTrigger, {
|
|
223
|
+
"data-slot": "subagent-run-panel-trigger",
|
|
224
|
+
"aria-label": delegatedWorkLabel(active.length, completed.length),
|
|
225
|
+
children: /* @__PURE__ */ jsx(QueueSectionLabel, {
|
|
226
|
+
count: runs.length || void 0,
|
|
227
|
+
children: "Delegated work"
|
|
228
|
+
})
|
|
229
|
+
}), completed.length ? /* @__PURE__ */ jsx(Button, {
|
|
230
|
+
className: "subagent-run__completed-toggle",
|
|
231
|
+
size: "xs",
|
|
232
|
+
variant: "ghost",
|
|
233
|
+
color: "neutral",
|
|
234
|
+
onClick: () => panel.setHiddenCompleted(panel.hiddenCompleted.size ? /* @__PURE__ */ new Set() : new Set(completed.map((run) => run.runId))),
|
|
235
|
+
children: panel.hiddenCompleted.size ? `Show completed (${completed.length})` : "Hide completed"
|
|
236
|
+
}) : null]
|
|
216
237
|
}), /* @__PURE__ */ jsxs(QueueSectionContent, { children: [
|
|
217
238
|
stop.error ? /* @__PURE__ */ jsx(AgentChatNotice, {
|
|
218
239
|
"data-tone": "danger",
|
|
@@ -235,8 +256,7 @@ function SubagentRunPanelContent({ panel, renderRunLink }) {
|
|
|
235
256
|
}),
|
|
236
257
|
/* @__PURE__ */ jsx(SubagentRunPanelControls, {
|
|
237
258
|
panel,
|
|
238
|
-
active: active.length
|
|
239
|
-
completed
|
|
259
|
+
active: active.length
|
|
240
260
|
})
|
|
241
261
|
] })]
|
|
242
262
|
})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { buttonVariants } from "../foundations/Button.js";
|
|
3
3
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
4
|
-
import { SubagentRunLabel, getSubagentRunName, getSubagentRunStatusText } from "./SubagentRunIndicator.js";
|
|
5
4
|
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
5
|
+
import { SubagentRunLabel, getSubagentRunName, getSubagentRunStatusText } from "./SubagentRunIndicator.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/agents-sdk/SubagentRunSelector.tsx
|
|
@@ -3,7 +3,7 @@ import { i as AgentMessageRenderPartContext } from "../../AgentMessageParts-C7L-
|
|
|
3
3
|
import { AgentChatMessageContentProps, AgentChatRootProps } from "./AgentChat.js";
|
|
4
4
|
import { o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, t as ThinkChatActivity } from "../../ThinkChatActivity-DENkintt.js";
|
|
5
5
|
import { i as ThinkChatValue } from "../../ThinkChatContext-COIgzkYp.js";
|
|
6
|
-
import { n as WorkspaceFileRenderer } from "../../WorkspaceMessageResponse-
|
|
6
|
+
import { n as WorkspaceFileRenderer } from "../../WorkspaceMessageResponse-BApg8KZv.js";
|
|
7
7
|
import { o as UseSessionCompactionResult } from "../../SessionCompaction-CmTJFpzj.js";
|
|
8
8
|
import * as React from "react";
|
|
9
9
|
import { ChatStatus, UIMessage } from "ai";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { AgentActivityFavicon, AgentActivityIcon } from "./AgentActivity.js";
|
|
2
1
|
import { useExpansionState } from "../ai-sdk/ExpansionState.js";
|
|
3
2
|
import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityText, ActivityTrigger } from "../ai-sdk/Activity.js";
|
|
4
3
|
import { Button } from "../foundations/Button.js";
|
|
5
4
|
import { MessageResponse } from "../ai-sdk/Message.js";
|
|
5
|
+
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
6
|
+
import { AgentActivityFavicon, AgentActivityIcon } from "./AgentActivity.js";
|
|
6
7
|
import { useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
|
|
7
8
|
import { getSubagentRunName } from "./SubagentRunIndicator.js";
|
|
8
|
-
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
9
9
|
import { useOptionalThinkChatLive } from "./ThinkChatContext.js";
|
|
10
10
|
import { isBrowserToolPart, isExecuteToolPart, isFetchToolPart, isPartWorking, isSessionContextToolPart, isSkillToolPart, isThinkChatActivityPart, isWorkspaceToolPart } from "./ThinkChatToolParts.js";
|
|
11
11
|
import { ThinkChatBrowserPanel, ThinkChatExecutePanel, ThinkChatFetchPanel, ThinkChatSessionContextPanel, ThinkChatSkillPanel, ThinkChatWorkspacePanel } from "./ThinkChatToolPanels.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ActivityOutput, ActivityPanel } from "../ai-sdk/Activity.js";
|
|
2
|
-
import { o as formatUnknownValue } from "../../format-COCyV98Z.js";
|
|
3
2
|
import { Tabs } from "../foundations/Tabs.js";
|
|
3
|
+
import { o as formatUnknownValue } from "../../format-COCyV98Z.js";
|
|
4
|
+
import { i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "../../CodeBlock-Dw1z6jc8.js";
|
|
4
5
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
5
|
-
import { i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "../../CodeBlock-g8sADidM.js";
|
|
6
6
|
import { inferWorkspaceLanguage } from "./WorkspaceFile.js";
|
|
7
7
|
import { displayUrl, isSessionContextToolFailure } from "./ThinkChatToolParts.js";
|
|
8
8
|
import * as React from "react";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { S as FileIcon, T as InfoIcon } from "../../icons-
|
|
2
|
+
import { S as FileIcon, T as InfoIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { Activity, ActivityContent, ActivityItemGroup, ActivityOutput, ActivityTrigger } from "../ai-sdk/Activity.js";
|
|
4
4
|
import { o as formatUnknownValue } from "../../format-COCyV98Z.js";
|
|
5
|
-
import { EmptyState } from "../foundations/EmptyState.js";
|
|
6
5
|
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
6
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
7
7
|
import { formatThinkExecutionTimestamp, getThinkExecutionRunError, getThinkExecutionRunId, getThinkExecutionRunKindLabel, getThinkExecutionRunProgressedAt, getThinkExecutionRunProgressedLabel, getThinkExecutionRunTitle, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
8
8
|
import { ThinkExecutionStatus } from "./ThinkExecutionStatus.js";
|
|
9
9
|
import "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SpinnerIcon, L as PauseIcon, T as InfoIcon, d as CheckIcon, nt as XIcon } from "../../icons-
|
|
2
|
+
import { K as SpinnerIcon, L as PauseIcon, T as InfoIcon, d as CheckIcon, nt as XIcon } from "../../icons-CeGfXO21.js";
|
|
3
3
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
4
4
|
import { formatThinkExecutionRunProgress, formatThinkExecutionStatus, getThinkExecutionRunKindLabel, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, getThinkExecutionRunTitle } from "./ThinkExecutionRun.js";
|
|
5
5
|
import "react";
|