@mcp-b/react-components 0.48.0 → 0.49.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.
- package/dist/AgentChatQueue-v5890eA1.d.ts +48 -0
- package/dist/AgentToolRunsContext-GMe_hSnD.d.ts +35 -0
- package/dist/Avatar-o2NO1fCG.d.ts +124 -0
- package/dist/{Button-CZt3yywF.d.ts → Button-DjONW5UW.d.ts} +1 -1
- package/dist/{CodeBlock-C380GD5t.d.ts → CodeBlock--r6GS8YV.d.ts} +8 -2
- package/dist/{CodeBlock-BSJl682D.js → CodeBlock-g8sADidM.js} +8 -8
- package/dist/{FileTree-DvE0hNZu.js → FileTree-DruTQ-oa.js} +38 -36
- package/dist/{IconButton-BAUFhUk8.d.ts → IconButton-ByiyjkYE.d.ts} +2 -2
- package/dist/{Menu-yb6QXWA3.d.ts → Menu-CgfUZhZd.d.ts} +1 -1
- package/dist/{Message-D_vCVEGB.d.ts → Message-DyaTBiV7.d.ts} +17 -4
- package/dist/MessageScrollerVirtual-D4afYwVB.d.ts +84 -0
- package/dist/{PromptInput-DtJHyp0S.d.ts → PromptInput-4kCz3T9P.d.ts} +45 -32
- package/dist/PromptInputApproval-D2hpn54U.d.ts +44 -0
- package/dist/Separator-CzhtLYE1.d.ts +41 -0
- package/dist/Toolbar-CGY004u0.d.ts +155 -0
- package/dist/{Workspace-LIoU30n7.d.ts → Workspace-HzGrWDX3.d.ts} +1 -1
- package/dist/{WorkspaceFile-Dq-GC0_T.d.ts → WorkspaceFile-Bouauobc.d.ts} +1 -1
- package/dist/{WorkspaceFileView-C_WnYm-a.js → WorkspaceFileView-DYPtRVpM.js} +5 -4
- package/dist/{WorkspaceLink-B1d2GIGl.js → WorkspaceLink-BYZG-V_I.js} +8 -91
- package/dist/{WorkspaceMessageResponse-BqOezptB.js → WorkspaceMessageResponse-CUJk9_P5.js} +2 -2
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentChat.d.ts +198 -2
- package/dist/components/agents-sdk/AgentChat.js +527 -672
- package/dist/components/agents-sdk/AgentChatQueue.d.ts +2 -0
- package/dist/components/agents-sdk/AgentChatQueue.js +206 -0
- package/dist/components/agents-sdk/AgentEvent.js +2 -2
- package/dist/components/agents-sdk/AgentToolRunsContext.d.ts +2 -2
- package/dist/components/agents-sdk/AgentToolRunsContext.js +1 -36
- package/dist/components/agents-sdk/BrowserLiveScreen.js +22 -14
- package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
- package/dist/components/agents-sdk/BrowserReplay.d.ts +1 -1
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.d.ts +3 -0
- package/dist/components/agents-sdk/BrowserRunPanel.js +32 -31
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +212 -0
- package/dist/components/agents-sdk/EmployeeChrome.js +555 -0
- package/dist/components/agents-sdk/ManagerOffice.d.ts +79 -40
- package/dist/components/agents-sdk/ManagerOffice.js +291 -281
- package/dist/components/agents-sdk/McpConnectionRequest.d.ts +4 -4
- package/dist/components/agents-sdk/McpConnectionRequest.js +4 -3
- package/dist/components/agents-sdk/McpConnectorForm.d.ts +38 -1
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +93 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +5 -4
- package/dist/components/agents-sdk/McpServerIcon.d.ts +17 -0
- package/dist/components/agents-sdk/McpServerIcon.js +25 -0
- package/dist/components/agents-sdk/McpServerPicker.d.ts +5 -4
- package/dist/components/agents-sdk/McpServerPicker.js +4 -3
- package/dist/components/agents-sdk/ModelSelector.d.ts +4 -4
- package/dist/components/agents-sdk/ModelSelector.js +4 -4
- package/dist/components/agents-sdk/PromptInputApproval.d.ts +1 -43
- package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +2 -3
- package/dist/components/agents-sdk/SessionCompaction.d.ts +88 -1
- package/dist/components/agents-sdk/SessionCompaction.js +2 -2
- package/dist/components/agents-sdk/SubagentRunDetails.d.ts +30 -1
- package/dist/components/agents-sdk/SubagentRunDetails.js +57 -1
- package/dist/components/agents-sdk/SubagentRunIndicator.d.ts +9 -9
- package/dist/components/agents-sdk/SubagentRunIndicator.js +19 -24
- package/dist/components/agents-sdk/SubagentRunList.d.ts +6 -3
- package/dist/components/agents-sdk/SubagentRunList.js +4 -2
- package/dist/components/agents-sdk/SubagentRunPanel.d.ts +60 -0
- package/dist/components/agents-sdk/SubagentRunPanel.js +255 -0
- package/dist/components/agents-sdk/SubagentRunSelector.d.ts +8 -4
- package/dist/components/agents-sdk/SubagentRunSelector.js +5 -3
- package/dist/components/agents-sdk/ThinkChat.d.ts +102 -2
- package/dist/components/agents-sdk/ThinkChat.js +233 -2
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +76 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +18 -10
- package/dist/components/agents-sdk/ThinkChatContext.d.ts +27 -1
- package/dist/components/agents-sdk/ThinkChatContext.js +1 -1
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +24 -19
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +85 -28
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +159 -102
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +40 -158
- package/dist/components/agents-sdk/ThinkFullApp.js +71 -290
- package/dist/components/agents-sdk/ThinkRecoveryNotice.d.ts +18 -1
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineActions.d.ts +51 -0
- package/dist/components/agents-sdk/ThinkRoutineActions.js +201 -0
- package/dist/components/agents-sdk/ThinkRoutineBrowser.d.ts +4 -1
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +17 -15
- package/dist/components/agents-sdk/ThinkRoutineDetail.js +11 -11
- package/dist/components/agents-sdk/ThinkRoutineForm.d.ts +2 -1
- package/dist/components/agents-sdk/ThinkRoutineForm.js +14 -14
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +7 -7
- package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +90 -1
- package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -3
- package/dist/components/agents-sdk/Workspace.d.ts +1 -1
- package/dist/components/agents-sdk/Workspace.js +7 -13
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +10 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +10 -7
- package/dist/components/agents-sdk/WorkspaceExecution.d.ts +5 -14
- package/dist/components/agents-sdk/WorkspaceExecution.js +24 -38
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +5 -2
- package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -2
- 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/WorkspaceLink.js +1 -1
- package/dist/components/agents-sdk/WorkspaceLive.d.ts +60 -1
- package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +47 -1
- package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
- package/dist/components/agents-sdk/WorkspaceMountManager.d.ts +3 -2
- package/dist/components/agents-sdk/WorkspaceMountManager.js +6 -9
- package/dist/components/agents-sdk/WorkspaceNavigationRestoration.d.ts +38 -0
- package/dist/components/agents-sdk/WorkspaceNavigationRestoration.js +86 -0
- package/dist/components/agents-sdk/WorkspaceProject.d.ts +5 -14
- package/dist/components/agents-sdk/WorkspaceProject.js +21 -35
- package/dist/components/agents-sdk/WorkspaceUserScript.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceUserScript.js +8 -5
- package/dist/components/ai-sdk/Activity.d.ts +1 -1
- package/dist/components/ai-sdk/Activity.js +1 -1
- package/dist/components/ai-sdk/AgentAttention.d.ts +2 -2
- package/dist/components/ai-sdk/AgentChatMessageEditor.js +5 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +89 -2
- package/dist/components/ai-sdk/AgentChatStartScreen.js +64 -43
- package/dist/components/ai-sdk/AgentMessageParts.d.ts +45 -1
- package/dist/components/ai-sdk/Approval.d.ts +1 -1
- package/dist/components/ai-sdk/Approval.js +2 -2
- package/dist/components/ai-sdk/Artifact.d.ts +2 -2
- package/dist/components/ai-sdk/Artifact.js +1 -1
- package/dist/components/ai-sdk/ChainOfThought.d.ts +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 +2 -3
- package/dist/components/ai-sdk/ConnectedAppCards.d.ts +9 -1
- package/dist/components/ai-sdk/ConnectedAppCards.js +28 -21
- package/dist/components/ai-sdk/Context.d.ts +7 -3
- package/dist/components/ai-sdk/Context.js +7 -17
- package/dist/components/ai-sdk/Conversation.d.ts +2 -2
- package/dist/components/ai-sdk/Conversation.js +1 -1
- package/dist/components/ai-sdk/Goal.d.ts +3 -3
- package/dist/components/ai-sdk/Goal.js +3 -3
- package/dist/components/ai-sdk/InlineCitation.d.ts +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.d.ts +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
- package/dist/components/ai-sdk/Message.d.ts +2 -2
- package/dist/components/ai-sdk/Message.js +12 -3
- package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
- package/dist/components/ai-sdk/MessageScroller.js +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.d.ts +2 -76
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +40 -5
- package/dist/components/ai-sdk/Plan.d.ts +1 -1
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.d.ts +2 -2
- package/dist/components/ai-sdk/PromptInput.js +175 -231
- package/dist/components/ai-sdk/PromptInputComposerEditor.js +32 -9
- package/dist/components/ai-sdk/Queue.d.ts +28 -5
- package/dist/components/ai-sdk/Queue.js +20 -5
- package/dist/components/ai-sdk/Reasoning.d.ts +1 -1
- package/dist/components/ai-sdk/Reasoning.js +5 -5
- package/dist/components/ai-sdk/Sources.d.ts +1 -1
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.d.ts +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 +1 -1
- package/dist/components/extension/CodexModelSelector.d.ts +6 -1
- package/dist/components/extension/CodexModelSelector.js +3 -3
- package/dist/components/extension/ConversationTabPicker.d.ts +1 -0
- package/dist/components/extension/ConversationTabPicker.js +2 -2
- package/dist/components/foundations/AlertDialog.d.ts +1 -1
- package/dist/components/foundations/AppIcon.d.ts +3 -2
- package/dist/components/foundations/Autocomplete.js +6 -1
- package/dist/components/foundations/Avatar.d.ts +1 -121
- package/dist/components/foundations/Button.d.ts +1 -1
- package/dist/components/foundations/Card.d.ts +22 -27
- package/dist/components/foundations/Card.js +51 -32
- package/dist/components/foundations/Checkbox.js +1 -1
- package/dist/components/foundations/CheckboxGroup.d.ts +1 -1
- package/dist/components/foundations/Collapsible.d.ts +1 -1
- package/dist/components/foundations/Collapsible.js +1 -1
- package/dist/components/foundations/Combobox.js +6 -1
- package/dist/components/foundations/ContextMenu.d.ts +10 -23
- package/dist/components/foundations/ContextMenu.js +3 -2
- package/dist/components/foundations/Dialog.d.ts +106 -1
- package/dist/components/foundations/EmptyState.d.ts +1 -1
- package/dist/components/foundations/Field.d.ts +2 -1
- package/dist/components/foundations/Fieldset.d.ts +1 -1
- package/dist/components/foundations/Form.d.ts +4 -4
- package/dist/components/foundations/IconButton.d.ts +1 -1
- package/dist/components/foundations/Label.d.ts +1 -1
- package/dist/components/foundations/LinkButton.d.ts +2 -2
- package/dist/components/foundations/Menu.d.ts +1 -1
- package/dist/components/foundations/Menubar.d.ts +1 -1
- package/dist/components/foundations/Menubar.js +1 -1
- package/dist/components/foundations/Meter.d.ts +1 -1
- package/dist/components/foundations/NumberField.d.ts +1 -1
- package/dist/components/foundations/PreviewCard.d.ts +1 -1
- package/dist/components/foundations/ScrollArea.d.ts +1 -1
- package/dist/components/foundations/SearchField.d.ts +1 -1
- package/dist/components/foundations/SearchField.js +1 -1
- package/dist/components/foundations/Select.js +7 -2
- package/dist/components/foundations/Separator.d.ts +1 -40
- package/dist/components/foundations/Stepper.d.ts +1 -1
- package/dist/components/foundations/Stepper.js +1 -1
- package/dist/components/foundations/Textarea.d.ts +1 -1
- package/dist/components/foundations/Toast.d.ts +5 -1
- package/dist/components/foundations/Toast.js +1 -1
- package/dist/components/foundations/Toggle.d.ts +70 -1
- package/dist/components/foundations/ToggleGroup.d.ts +4 -3
- package/dist/components/foundations/ToggleGroup.js +1 -1
- package/dist/components/foundations/Toolbar.d.ts +1 -151
- package/dist/components/foundations/Tooltip.d.ts +1 -1
- package/dist/components/foundations/TransitionSurface.d.ts +1 -1
- package/dist/components/foundations/icons.js +1 -1
- package/dist/components/general-purpose/ActionGuide.d.ts +10 -26
- package/dist/components/general-purpose/ActionGuide.js +4 -18
- package/dist/components/general-purpose/AppTopBar.d.ts +4 -2
- package/dist/components/general-purpose/Commit.d.ts +2 -2
- package/dist/components/general-purpose/Commit.js +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.d.ts +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
- package/dist/components/general-purpose/FileTree.d.ts +1 -7
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/PricingPlanCard.d.ts +4 -0
- package/dist/components/general-purpose/PricingPlanCard.js +2 -2
- package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
- package/dist/components/general-purpose/ResizableSidePanel.d.ts +2 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +128 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +120 -102
- package/dist/components/general-purpose/SettingsFormDialog.d.ts +14 -27
- package/dist/components/general-purpose/SettingsFormDialog.js +42 -72
- package/dist/components/general-purpose/SetupChecklist.d.ts +1 -0
- package/dist/components/general-purpose/SetupChecklist.js +76 -1
- package/dist/components/general-purpose/Terminal.d.ts +3 -3
- package/dist/components/general-purpose/Terminal.js +11 -6
- package/dist/components/general-purpose/TestResults.d.ts +23 -11
- package/dist/components/general-purpose/TestResults.js +49 -51
- package/dist/components/general-purpose/ThemeModeControl.d.ts +2 -0
- package/dist/components/general-purpose/ThemeModeControl.js +2 -2
- package/dist/components/general-purpose/WebPreview.d.ts +29 -4
- package/dist/components/general-purpose/WebPreview.js +39 -14
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.d.ts +13 -11
- package/dist/components/nanites/AgentToolDetail.js +21 -42
- package/dist/{copy-button-Dk2vRe9j.js → copy-button-CSDuDfdP.js} +1 -1
- package/dist/{copy-button-C0JyjClr.d.ts → copy-button-OUwOdgEm.d.ts} +1 -1
- package/dist/mcp-server-mAErsxHU.js +27 -0
- package/dist/styles/accessibility.css +20 -0
- package/dist/styles/activity.css +1 -96
- package/dist/styles/agent-chat.css +75 -102
- package/dist/styles/agent-tool-detail.css +0 -16
- package/dist/styles/base.css +1 -9
- package/dist/styles/browser-run-panel.css +1 -15
- package/dist/styles/button.css +7 -1
- package/dist/styles/code-block.css +12 -0
- package/dist/styles/codex-model-selector.css +4 -0
- package/dist/styles/color-contrast.test.ts +212 -0
- package/dist/styles/composition-motion.css +0 -2
- package/dist/styles/employee-chrome.css +43 -0
- package/dist/styles/file-tree.css +10 -1
- package/dist/styles/index.css +4 -2
- package/dist/styles/manager-office.css +5 -5
- package/dist/styles/message.css +2 -10
- package/dist/styles/queue.css +71 -0
- package/dist/styles/responsive-sidebar-shell.css +1 -1
- package/dist/styles/subagent-run.css +122 -6
- package/dist/styles/test-results.css +2 -5
- package/dist/styles/think-chat-activity.css +13 -0
- package/dist/styles/think-chat-tool-panels.css +81 -0
- package/dist/styles/think-execution-workbench.css +2 -8
- package/dist/styles/think-full-app.css +42 -251
- package/dist/styles/{think-routine-library.css → think-routine.css} +64 -80
- package/dist/styles/web-preview.css +15 -1
- package/dist/utils/codex-model-catalog.d.ts +25 -6
- package/dist/utils/codex-model-catalog.js +22 -5
- package/dist/utils/mcp-server-catalog.d.ts +1112 -2
- package/dist/utils/mcp-server-catalog.js +28 -9
- package/dist/utils/structured-code.d.ts +1 -1
- package/dist/{workspace-assets-GqsCYxqT.js → workspace-assets-Bg7XhPsk.js} +2 -2
- package/package.json +8 -4
- package/dist/AgentChat-BLmQghkt.d.ts +0 -327
- package/dist/AgentChatStartScreen-Bkv7Avni.d.ts +0 -84
- package/dist/AgentMessageParts-C7L-Mv9U.d.ts +0 -46
- package/dist/AgentToolRunsContext-jtmveaRE.d.ts +0 -57
- package/dist/Dialog-B_FhRWaz.d.ts +0 -107
- package/dist/McpConnectorForm-CeYNY0MI.d.ts +0 -39
- package/dist/McpPluginCatalog-3qWu8oK1.d.ts +0 -92
- package/dist/ResponsiveSidebarShell-BTVPxLJK.d.ts +0 -123
- package/dist/SessionCompaction-CmTJFpzj.d.ts +0 -89
- package/dist/SetupChecklist-DeTU9YpW.js +0 -77
- package/dist/ThinkChat-CwMdEum8.d.ts +0 -185
- package/dist/ThinkChat-DiI6hhDP.js +0 -332
- package/dist/ThinkChatActivity-B3lGVS-6.d.ts +0 -77
- package/dist/ThinkChatContext-COIgzkYp.d.ts +0 -28
- package/dist/ThinkRecoveryNotice-DGWr94rk.d.ts +0 -19
- package/dist/ThinkThreadPicker-yFz4vvIf.d.ts +0 -91
- package/dist/Toggle-DLrIf5YH.d.ts +0 -69
- package/dist/WorkspaceLive-DfjH1Ypm.d.ts +0 -61
- package/dist/WorkspaceMessageResponse-kJYU8Onj.d.ts +0 -48
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +0 -31
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.js +0 -34
- package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +0 -80
- package/dist/components/agents-sdk/ThinkRoutineLibrary.js +0 -159
- package/dist/components/agents-sdk/ThinkSidepanel.d.ts +0 -200
- package/dist/components/agents-sdk/ThinkSidepanel.js +0 -775
- package/dist/mcp-server-7NR24ASj.js +0 -69
- package/dist/mcp-server-catalog-C_g7C-9o.d.ts +0 -1108
- package/dist/styles/think-sidepanel.css +0 -78
- package/dist/think-agent-Cip5KAPj.d.ts +0 -7
- package/dist/{icons-CeGfXO21.js → icons-cuEtsgj9.js} +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { McpServerCard } from "../../utils/mcp-server-catalog.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { DynamicToolUIPart, ToolUIPart } from "ai";
|
|
4
4
|
import { MCPServersState } from "agents";
|
|
@@ -20,10 +20,10 @@ interface McpConnectionRequestBaseProps extends Omit<React.HTMLAttributes<HTMLDi
|
|
|
20
20
|
onDecline?: () => void | Promise<void>;
|
|
21
21
|
}
|
|
22
22
|
type McpConnectionRequestProps = (McpConnectionRequestBaseProps & {
|
|
23
|
-
/** A live authorization outcome must identify its assigned Agents MCP entry. */outcome: "authorization-required";
|
|
23
|
+
/** A live authorization outcome must identify its assigned Agents MCP entry. */outcome: "authorization-required"; /** Agents MCP entry assigned to this authorization request. */
|
|
24
24
|
serverId: string;
|
|
25
25
|
}) | (McpConnectionRequestBaseProps & {
|
|
26
|
-
/** App-validated terminal outcome, or omitted while the request is active. */outcome?: Exclude<McpConnectionRequestOutcome, "authorization-required">;
|
|
26
|
+
/** App-validated terminal outcome, or omitted while the request is active. */outcome?: Exclude<McpConnectionRequestOutcome, "authorization-required">; /** Unused unless the outcome requires authorization. */
|
|
27
27
|
serverId?: never;
|
|
28
28
|
});
|
|
29
29
|
/**
|
|
@@ -32,7 +32,7 @@ type McpConnectionRequestProps = (McpConnectionRequestBaseProps & {
|
|
|
32
32
|
* same `onConnect` seam instead of introducing recovery operations.
|
|
33
33
|
*/
|
|
34
34
|
declare function McpConnectionRequest(props: McpConnectionRequestProps & {
|
|
35
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
35
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
|
|
36
36
|
}): React.JSX.Element;
|
|
37
37
|
//#endregion
|
|
38
38
|
export { McpConnectionRequest, McpConnectionRequestOutcome, McpConnectionRequestProps };
|
|
@@ -1,10 +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-cuEtsgj9.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
-
import { AgentAttention, AgentAttentionActions, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
|
|
5
4
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
6
|
-
import {
|
|
5
|
+
import { McpServerIcon } from "./McpServerIcon.js";
|
|
7
6
|
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
7
|
+
import { AgentAttention, AgentAttentionActions, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
|
|
8
|
+
import { t as getMcpServerProjection } from "../../mcp-server-mAErsxHU.js";
|
|
8
9
|
import * as React from "react";
|
|
9
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
11
|
import { getToolPartState } from "@cloudflare/think/react";
|
|
@@ -1,2 +1,39 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { McpServerSetupAuth, McpServerSetupAuthFieldName } from "../../utils/mcp-server-catalog.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/agents-sdk/McpConnectorForm.d.ts
|
|
5
|
+
type CredentialFieldName = Exclude<McpServerSetupAuthFieldName, "redirectUrl">;
|
|
6
|
+
type McpConnectorFormValues = Readonly<Partial<Record<CredentialFieldName, string>> & {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly url: string;
|
|
9
|
+
}>;
|
|
10
|
+
type McpConnectorFormProps = Omit<React.FormHTMLAttributes<HTMLFormElement>, "onSubmit" | "status"> & {
|
|
11
|
+
/** Authentication metadata that decides which credential fields render. */readonly auth?: McpServerSetupAuth; /** Initial connector values. Publisher client credentials remain app-owned. */
|
|
12
|
+
readonly defaults?: Partial<McpConnectorFormValues>; /** Optional pattern used to validate the MCP name field. */
|
|
13
|
+
readonly namePattern?: string; /** Keep a catalog-owned MCP name and URL visible but immutable. */
|
|
14
|
+
readonly readOnlyServer?: boolean; /** Read-only redirect URL shown for manual OAuth client setup. */
|
|
15
|
+
readonly redirectUrl?: string; /** Inline connection status announced politely to assistive tech. */
|
|
16
|
+
readonly status?: React.ReactNode; /** Label for the submit button. */
|
|
17
|
+
readonly submitLabel?: string; /** Label shown while submit is pending. */
|
|
18
|
+
readonly submittingLabel?: string; /** Called with normalized connector values after native form validation passes. */
|
|
19
|
+
readonly onSubmit: (values: McpConnectorFormValues) => void | Promise<void>;
|
|
20
|
+
};
|
|
21
|
+
/** Collects MCP connector settings and optional credentials with native form validation. */
|
|
22
|
+
declare function McpConnectorForm({
|
|
23
|
+
auth,
|
|
24
|
+
className,
|
|
25
|
+
defaults,
|
|
26
|
+
namePattern,
|
|
27
|
+
readOnlyServer,
|
|
28
|
+
redirectUrl,
|
|
29
|
+
status,
|
|
30
|
+
submitLabel,
|
|
31
|
+
submittingLabel,
|
|
32
|
+
onSubmit,
|
|
33
|
+
ref,
|
|
34
|
+
...props
|
|
35
|
+
}: McpConnectorFormProps & {
|
|
36
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLFormElement>;
|
|
37
|
+
}): React.JSX.Element;
|
|
38
|
+
//#endregion
|
|
2
39
|
export { McpConnectorForm, McpConnectorFormProps, McpConnectorFormValues };
|
|
@@ -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";
|
|
4
5
|
import { Field } from "../foundations/Field.js";
|
|
5
6
|
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,2 +1,94 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { McpServerCard } from "../../utils/mcp-server-catalog.js";
|
|
2
|
+
import { McpConnectorFormValues } from "./McpConnectorForm.js";
|
|
3
|
+
import { DialogProps } from "../foundations/Dialog.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
|
|
2
94
|
export { McpPluginCatalog, McpPluginCatalogProps, McpPluginDetails, McpPluginDetailsDialog, McpPluginDetailsDialogProps };
|
|
@@ -1,15 +1,16 @@
|
|
|
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-cuEtsgj9.js";
|
|
4
4
|
import { Button } from "../foundations/Button.js";
|
|
5
|
-
import { AgentAttention, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
|
|
6
5
|
import { IconButton } from "../foundations/IconButton.js";
|
|
7
6
|
import { Dialog } from "../foundations/Dialog.js";
|
|
8
7
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
9
8
|
import { AppIcon } from "../foundations/AppIcon.js";
|
|
10
|
-
import {
|
|
11
|
-
import { Separator } from "../foundations/Separator.js";
|
|
9
|
+
import { McpServerIcon } from "./McpServerIcon.js";
|
|
12
10
|
import { SearchField } from "../foundations/SearchField.js";
|
|
11
|
+
import { Separator } from "../foundations/Separator.js";
|
|
12
|
+
import { AgentAttention, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
|
|
13
|
+
import { t as getMcpServerProjection } from "../../mcp-server-mAErsxHU.js";
|
|
13
14
|
import { McpServerSetupDialog } from "./McpServerPicker.js";
|
|
14
15
|
import * as React from "react";
|
|
15
16
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { McpServerCard } from "../../utils/mcp-server-catalog.js";
|
|
2
|
+
import { AppIconSize, AppIconVariant } from "../foundations/AppIcon.js";
|
|
3
|
+
|
|
4
|
+
//#region src/components/agents-sdk/McpServerIcon.d.ts
|
|
5
|
+
interface McpServerIconProps {
|
|
6
|
+
server: McpServerCard;
|
|
7
|
+
size?: AppIconSize;
|
|
8
|
+
variant?: AppIconVariant;
|
|
9
|
+
}
|
|
10
|
+
/** Catalog-backed MCP identity mark. The owning control supplies its accessible name. */
|
|
11
|
+
declare function McpServerIcon({
|
|
12
|
+
server,
|
|
13
|
+
size,
|
|
14
|
+
variant
|
|
15
|
+
}: McpServerIconProps): import("react").JSX.Element;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { McpServerIcon, McpServerIconProps };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { findCatalogMcpServerCard, getMcpServerIconSrc } from "../../utils/mcp-server-catalog.js";
|
|
2
|
+
import { AppIcon } from "../foundations/AppIcon.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/agents-sdk/McpServerIcon.tsx
|
|
5
|
+
/** Catalog-backed MCP identity mark. The owning control supplies its accessible name. */
|
|
6
|
+
function McpServerIcon({ server, size = "lg", variant }) {
|
|
7
|
+
const resolved = server.icon == null ? findCatalogMcpServerCard({
|
|
8
|
+
id: server.id,
|
|
9
|
+
name: server.name,
|
|
10
|
+
url: server.url
|
|
11
|
+
}) ?? server : server;
|
|
12
|
+
const src = getMcpServerIconSrc(resolved);
|
|
13
|
+
return /* @__PURE__ */ jsxs(AppIcon.Root, {
|
|
14
|
+
size,
|
|
15
|
+
variant,
|
|
16
|
+
"aria-hidden": "true",
|
|
17
|
+
children: [src ? /* @__PURE__ */ jsx(AppIcon.Image, {
|
|
18
|
+
alt: "",
|
|
19
|
+
fit: "contain",
|
|
20
|
+
src
|
|
21
|
+
}, src) : null, /* @__PURE__ */ jsx(AppIcon.Fallback, { children: resolved.name.slice(0, 1) })]
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { McpServerIcon };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as MenuItemProps, t as Menu } from "../../Menu-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { s as MenuItemProps, t as Menu } from "../../Menu-CgfUZhZd.js";
|
|
2
|
+
import { McpServerCard } from "../../utils/mcp-server-catalog.js";
|
|
3
|
+
import { McpConnectorFormProps } from "./McpConnectorForm.js";
|
|
4
|
+
import { DialogProps } from "../foundations/Dialog.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { MCPServersState } from "agents";
|
|
7
7
|
|
|
@@ -17,6 +17,7 @@ interface McpServerPickerProps {
|
|
|
17
17
|
onDisconnect?: (serverId: string) => void | Promise<void>;
|
|
18
18
|
/** App-owned connection actions shown before the server catalog. */
|
|
19
19
|
actions?: readonly McpServerPickerActionItem[];
|
|
20
|
+
/** Visible heading for the app-owned actions group. */
|
|
20
21
|
actionsLabel?: React.ReactNode;
|
|
21
22
|
/** Offset from the plus trigger to the menu, useful for prompt composers. */
|
|
22
23
|
sideOffset?: number;
|
|
@@ -1,11 +1,12 @@
|
|
|
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-cuEtsgj9.js";
|
|
3
3
|
import { buttonVariants } from "../foundations/Button.js";
|
|
4
|
-
import { Menu } from "../foundations/Menu.js";
|
|
5
4
|
import { Dialog } from "../foundations/Dialog.js";
|
|
6
5
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
7
|
-
import {
|
|
6
|
+
import { Menu } from "../foundations/Menu.js";
|
|
8
7
|
import { PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuTrigger } from "../ai-sdk/PromptInput.js";
|
|
8
|
+
import { McpServerIcon } from "./McpServerIcon.js";
|
|
9
|
+
import { t as getMcpServerProjection } from "../../mcp-server-mAErsxHU.js";
|
|
9
10
|
import { McpConnectorForm } from "./McpConnectorForm.js";
|
|
10
11
|
import * as React from "react";
|
|
11
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as ButtonProps } from "../../Button-
|
|
2
|
-
import {
|
|
3
|
-
import { SeparatorProps } from "
|
|
1
|
+
import { r as ButtonProps } from "../../Button-DjONW5UW.js";
|
|
2
|
+
import { DialogProps } from "../foundations/Dialog.js";
|
|
3
|
+
import { n as SeparatorProps } from "../../Separator-CzhtLYE1.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import Cloudflare from "cloudflare";
|
|
6
6
|
import { AiModelsSearchObject } from "@cloudflare/workers-types";
|
|
@@ -110,7 +110,7 @@ declare function ModelSelector({
|
|
|
110
110
|
ref,
|
|
111
111
|
...props
|
|
112
112
|
}: ModelSelectorProps & {
|
|
113
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
113
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
|
|
114
114
|
}): React.JSX.Element;
|
|
115
115
|
declare function CloudflareModelSelector({
|
|
116
116
|
models,
|
|
@@ -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-cuEtsgj9.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
-
import { Autocomplete } from "../foundations/Autocomplete.js";
|
|
5
4
|
import { Dialog } from "../foundations/Dialog.js";
|
|
6
5
|
import { c as titleCase } from "../../format-COCyV98Z.js";
|
|
7
|
-
import {
|
|
6
|
+
import { Autocomplete } from "../foundations/Autocomplete.js";
|
|
8
7
|
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
9
|
-
import { t as ProviderLogo } from "../../provider-logos-DWYY8wNz.js";
|
|
10
8
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
9
|
+
import { t as ProviderLogo } from "../../provider-logos-DWYY8wNz.js";
|
|
10
|
+
import { Separator } from "../foundations/Separator.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,44 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ChatAddToolApproveResponseFunction, DynamicToolUIPart, ToolUIPart, UIMessage } from "ai";
|
|
3
|
-
import { PendingApproval, Think } from "@cloudflare/think";
|
|
4
|
-
import { AgentStub } from "agents/client";
|
|
5
|
-
|
|
6
|
-
//#region src/components/agents-sdk/PromptInputApproval.d.ts
|
|
7
|
-
/** The id a response must carry: the approval id, or the paused run's executionId. */
|
|
8
|
-
declare function getApprovalRequestId(part: ToolUIPart | DynamicToolUIPart): string | undefined;
|
|
9
|
-
/** Component-local identity: paused executions can ask for multiple approvals. */
|
|
10
|
-
declare function getApprovalStateKey(part: ToolUIPart | DynamicToolUIPart): string | undefined;
|
|
11
|
-
/** Derives pending tool approvals straight from the messages — no app-owned shapes. */
|
|
12
|
-
declare function getPendingToolApprovals(messages: readonly UIMessage[], {
|
|
13
|
-
pausedExecutions
|
|
14
|
-
}?: {
|
|
15
|
-
pausedExecutions?: boolean;
|
|
16
|
-
}): Array<ToolUIPart | DynamicToolUIPart>;
|
|
17
|
-
interface PromptInputApprovalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "part"> {
|
|
18
|
-
part?: ToolUIPart | DynamicToolUIPart;
|
|
19
|
-
approval?: PendingApproval;
|
|
20
|
-
onRespond?: ChatAddToolApproveResponseFunction;
|
|
21
|
-
thinkStub?: AgentStub<Think>;
|
|
22
|
-
onExecutionSettled?: () => void | Promise<void>;
|
|
23
|
-
onSkip?: () => void;
|
|
24
|
-
question?: React.ReactNode;
|
|
25
|
-
count?: number;
|
|
26
|
-
}
|
|
27
|
-
/** Adapts AI SDK and Think approval states into the prompt-input approval surface. */
|
|
28
|
-
declare function PromptInputApproval({
|
|
29
|
-
part,
|
|
30
|
-
approval: durableApproval,
|
|
31
|
-
onRespond,
|
|
32
|
-
thinkStub,
|
|
33
|
-
onExecutionSettled,
|
|
34
|
-
onSkip,
|
|
35
|
-
question,
|
|
36
|
-
count,
|
|
37
|
-
className,
|
|
38
|
-
ref,
|
|
39
|
-
...props
|
|
40
|
-
}: PromptInputApprovalProps & {
|
|
41
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
42
|
-
}): React.JSX.Element | null;
|
|
43
|
-
//#endregion
|
|
1
|
+
import { a as getPendingToolApprovals, i as getApprovalStateKey, n as PromptInputApprovalProps, r as getApprovalRequestId, t as PromptInputApproval } from "../../PromptInputApproval-D2hpn54U.js";
|
|
44
2
|
export { PromptInputApproval, PromptInputApprovalProps, getApprovalRequestId, getApprovalStateKey, getPendingToolApprovals };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { ToolApproval } from "../ai-sdk/ToolApproval.js";
|
|
3
2
|
import { ThinkExecutionApproval, ThinkPendingApproval, getPausedExecution } from "./ThinkPendingApproval.js";
|
|
3
|
+
import { ToolApproval } from "../ai-sdk/ToolApproval.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { isToolUIPart } from "ai";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as PromptInputCommandDefinition } from "../../PromptInput-
|
|
1
|
+
import { D as PromptInputCommandDefinition } from "../../PromptInput-4kCz3T9P.js";
|
|
2
2
|
import { ConversationTabPickerItem } from "../extension/ConversationTabPicker.js";
|
|
3
3
|
import { MCPServersState } from "agents";
|
|
4
4
|
import { SkillDescriptor } from "agents/skills";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { composerLinkHref } from "../../utils/composer-link.js";
|
|
2
|
-
import { getMcpServerIconSrc } from "../../utils/mcp-server-catalog.js";
|
|
3
|
-
import { A as McpIcon, c as BoxIcon } from "../../icons-
|
|
4
|
-
import { n as findCatalogMcpServerCard } from "../../mcp-server-7NR24ASj.js";
|
|
2
|
+
import { findCatalogMcpServerCard, getMcpServerIconSrc } from "../../utils/mcp-server-catalog.js";
|
|
3
|
+
import { A as McpIcon, c as BoxIcon } from "../../icons-cuEtsgj9.js";
|
|
5
4
|
import { jsx } from "react/jsx-runtime";
|
|
6
5
|
//#region src/components/agents-sdk/PromptInputCommands.tsx
|
|
7
6
|
function mcpServerCommandIcon(server) {
|
|
@@ -1,2 +1,89 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChatStatus, UIMessage } from "ai";
|
|
2
|
+
|
|
3
|
+
//#region src/components/agents-sdk/SessionCompaction.d.ts
|
|
4
|
+
type SessionStatusPhase = "idle" | "compacting";
|
|
5
|
+
interface SessionStatusFrame {
|
|
6
|
+
phase: SessionStatusPhase;
|
|
7
|
+
/** Present on the idle frame that follows a successful compaction. */
|
|
8
|
+
compacted: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Session's own estimate for the history this frame describes, or null when
|
|
11
|
+
* the frame omits it or carries a non-finite value. Not provider-reported
|
|
12
|
+
* usage — never render it as an exact token count, and never feed it to the
|
|
13
|
+
* `Context` ring, which reads `metadata.usage`.
|
|
14
|
+
*/
|
|
15
|
+
tokenEstimate: number | null;
|
|
16
|
+
/**
|
|
17
|
+
* The same estimate taken before the compaction this frame reports, from its
|
|
18
|
+
* `compacted` payload. Null on every other frame. Both numbers come from one
|
|
19
|
+
* estimator over one history, so their difference is a meaningful size even
|
|
20
|
+
* though neither is exact.
|
|
21
|
+
*/
|
|
22
|
+
tokensBefore: number | null;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Parse a raw websocket payload as a `cf_agent_session` status frame.
|
|
26
|
+
* Returns null for every other frame on the connection.
|
|
27
|
+
*/
|
|
28
|
+
declare function parseSessionStatusFrame(data: unknown): SessionStatusFrame | null;
|
|
29
|
+
/**
|
|
30
|
+
* Parse a raw websocket payload as a `cf_agent_session_error` frame,
|
|
31
|
+
* returning its error text. Null for every other frame on the connection.
|
|
32
|
+
*/
|
|
33
|
+
declare function parseSessionErrorFrame(data: unknown): string | null;
|
|
34
|
+
/** The message-frame surface of a `useAgent` connection. */
|
|
35
|
+
interface SessionFrameSource {
|
|
36
|
+
addEventListener(type: "message", listener: (event: MessageEvent) => void): void;
|
|
37
|
+
removeEventListener(type: "message", listener: (event: MessageEvent) => void): void;
|
|
38
|
+
}
|
|
39
|
+
interface UseSessionCompactionOptions<MessageT extends UIMessage> {
|
|
40
|
+
/** The conversation agent's `useAgent` connection. */
|
|
41
|
+
agent: SessionFrameSource;
|
|
42
|
+
/** The conversation's `useAgentChat` value (status + local view setter). */
|
|
43
|
+
chat: {
|
|
44
|
+
status: ChatStatus;
|
|
45
|
+
setMessages: (messages: MessageT[]) => void;
|
|
46
|
+
};
|
|
47
|
+
/** Server read used to reload the transcript after a compaction lands. */
|
|
48
|
+
getMessages: () => Promise<MessageT[]>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* How much a landed compaction shortened the history, per Session's own
|
|
52
|
+
* estimator. A UI may show the difference as an approximate size; it must not
|
|
53
|
+
* present either number as exact usage.
|
|
54
|
+
*/
|
|
55
|
+
interface SessionCompactionSize {
|
|
56
|
+
tokensBefore: number;
|
|
57
|
+
tokensAfter: number;
|
|
58
|
+
}
|
|
59
|
+
interface UseSessionCompactionResult {
|
|
60
|
+
compacting: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Size of the compaction that landed most recently on this connection, or
|
|
63
|
+
* null when none has landed or the frames carried no usable estimates. A new
|
|
64
|
+
* object per compaction, so a consumer can dismiss one acknowledgement by
|
|
65
|
+
* identity and still show the next. Cleared when the next compaction starts.
|
|
66
|
+
*/
|
|
67
|
+
lastCompaction: SessionCompactionSize | null;
|
|
68
|
+
/**
|
|
69
|
+
* Set when the post-compaction transcript reload rejected — the local view
|
|
70
|
+
* is stale relative to the server until a retry succeeds. Surface it
|
|
71
|
+
* ("Transcript may be out of date"); the hook retries on the next status
|
|
72
|
+
* transition to `"ready"`.
|
|
73
|
+
*/
|
|
74
|
+
reloadError: unknown;
|
|
75
|
+
/**
|
|
76
|
+
* Error text from the last `cf_agent_session_error` frame — the only signal
|
|
77
|
+
* a user who ran /compact gets when the server-side compaction itself fails
|
|
78
|
+
* (the phase just flips back to idle with no `compacted` payload). Cleared
|
|
79
|
+
* when the next compaction starts.
|
|
80
|
+
*/
|
|
81
|
+
sessionError: string | null;
|
|
82
|
+
}
|
|
83
|
+
declare function useSessionCompaction<MessageT extends UIMessage>({
|
|
84
|
+
agent,
|
|
85
|
+
chat,
|
|
86
|
+
getMessages
|
|
87
|
+
}: UseSessionCompactionOptions<MessageT>): UseSessionCompactionResult;
|
|
88
|
+
//#endregion
|
|
2
89
|
export { SessionCompactionSize, SessionFrameSource, SessionStatusFrame, SessionStatusPhase, UseSessionCompactionOptions, UseSessionCompactionResult, parseSessionErrorFrame, parseSessionStatusFrame, useSessionCompaction };
|
|
@@ -15,8 +15,8 @@ import * as React from "react";
|
|
|
15
15
|
* the end of the turn when one is streaming, so a mid-turn proactive
|
|
16
16
|
* compaction never clobbers streamed state.
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
18
|
+
* Compose the command with `useAgentChatCompaction`: supply the app's
|
|
19
|
+
* compaction callable, then place its command and notice explicitly.
|
|
20
20
|
*
|
|
21
21
|
* This module is the "local adapter … documented runtime-only mirror" that
|
|
22
22
|
* docs/think-session-ui.md calls for: upstream exports no payload types or
|
|
@@ -1,6 +1,35 @@
|
|
|
1
|
+
import { n as AgentToolRunValue } from "../../AgentToolRunsContext-GMe_hSnD.js";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
|
|
3
4
|
//#region src/components/agents-sdk/SubagentRunDetails.d.ts
|
|
5
|
+
interface SubagentRunMetadataProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
6
|
+
run: AgentToolRunValue;
|
|
7
|
+
/** Product-owned milestone payloads stay whole; the default displays their names. */
|
|
8
|
+
renderMilestone?: (milestone: NonNullable<AgentToolRunValue["milestones"]>[number]) => React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/** Full retained evidence, without a connection, transcript provider or second app bar. */
|
|
11
|
+
declare function SubagentRunMetadata({
|
|
12
|
+
run,
|
|
13
|
+
renderMilestone,
|
|
14
|
+
className,
|
|
15
|
+
...props
|
|
16
|
+
}: SubagentRunMetadataProps): React.JSX.Element;
|
|
17
|
+
interface SubagentRunReportProps {
|
|
18
|
+
run: AgentToolRunValue;
|
|
19
|
+
renderMilestone?: SubagentRunMetadataProps["renderMilestone"];
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The run's retained report and progress as a disclosure above its transcript
|
|
24
|
+
* on the employee run route. Open state is keyed by run through the enclosing
|
|
25
|
+
* ExpansionStateProvider (the panel's `reportDisclosures` store), so a report
|
|
26
|
+
* collapsed once stays collapsed across drill-in navigation.
|
|
27
|
+
*/
|
|
28
|
+
declare function SubagentRunReport({
|
|
29
|
+
run,
|
|
30
|
+
renderMilestone,
|
|
31
|
+
className
|
|
32
|
+
}: SubagentRunReportProps): React.JSX.Element;
|
|
4
33
|
interface SubagentRunProgressProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
34
|
/** Human-readable current action or phase. */
|
|
6
35
|
label: string;
|
|
@@ -33,4 +62,4 @@ declare function SubagentRunMilestone({
|
|
|
33
62
|
ref?: React.Ref<HTMLLIElement>;
|
|
34
63
|
}): React.JSX.Element;
|
|
35
64
|
//#endregion
|
|
36
|
-
export { SubagentRunMilestone, SubagentRunMilestoneProps, SubagentRunMilestones, SubagentRunMilestonesProps, SubagentRunProgress, SubagentRunProgressProps };
|
|
65
|
+
export { SubagentRunMetadata, SubagentRunMetadataProps, SubagentRunMilestone, SubagentRunMilestoneProps, SubagentRunMilestones, SubagentRunMilestonesProps, SubagentRunProgress, SubagentRunProgressProps, SubagentRunReport, SubagentRunReportProps };
|
|
@@ -1,9 +1,65 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { Collapsible } from "../foundations/Collapsible.js";
|
|
3
|
+
import { useExpansionState } from "../ai-sdk/ExpansionState.js";
|
|
2
4
|
import { n as clamp } from "../../format-COCyV98Z.js";
|
|
3
5
|
import { Progress } from "../foundations/Progress.js";
|
|
4
6
|
import * as React from "react";
|
|
5
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
8
|
//#region src/components/agents-sdk/SubagentRunDetails.tsx
|
|
9
|
+
/** Full retained evidence, without a connection, transcript provider or second app bar. */
|
|
10
|
+
function SubagentRunMetadata({ run, renderMilestone, className, ...props }) {
|
|
11
|
+
const progressLabel = run.progress?.message ?? run.progress?.phase;
|
|
12
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
13
|
+
className: cx("subagent-run__metadata", className),
|
|
14
|
+
...props,
|
|
15
|
+
children: [
|
|
16
|
+
progressLabel ? /* @__PURE__ */ jsx(SubagentRunProgress, {
|
|
17
|
+
label: progressLabel,
|
|
18
|
+
value: run.progress?.fraction
|
|
19
|
+
}) : null,
|
|
20
|
+
run.milestones?.length ? /* @__PURE__ */ jsx(SubagentRunMilestones, {
|
|
21
|
+
"aria-label": "Run milestones",
|
|
22
|
+
children: run.milestones.map((milestone) => /* @__PURE__ */ jsx(SubagentRunMilestone, { children: renderMilestone ? renderMilestone(milestone) : milestone.name }, milestone.sequence))
|
|
23
|
+
}) : null,
|
|
24
|
+
run.childStillRunning !== false && (run.status === "interrupted" || run.status === "aborted") ? /* @__PURE__ */ jsx("p", {
|
|
25
|
+
role: "status",
|
|
26
|
+
children: "The child may still be running."
|
|
27
|
+
}) : null,
|
|
28
|
+
run.error ? /* @__PURE__ */ jsx("p", {
|
|
29
|
+
role: "alert",
|
|
30
|
+
children: run.error
|
|
31
|
+
}) : null,
|
|
32
|
+
run.summary ? /* @__PURE__ */ jsx("p", { children: run.summary }) : null
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The run's retained report and progress as a disclosure above its transcript
|
|
38
|
+
* on the employee run route. Open state is keyed by run through the enclosing
|
|
39
|
+
* ExpansionStateProvider (the panel's `reportDisclosures` store), so a report
|
|
40
|
+
* collapsed once stays collapsed across drill-in navigation.
|
|
41
|
+
*/
|
|
42
|
+
function SubagentRunReport({ run, renderMilestone, className }) {
|
|
43
|
+
const [open, setOpen] = useExpansionState(`run-report:${run.runId}`, true);
|
|
44
|
+
return /* @__PURE__ */ jsxs(Collapsible.Root, {
|
|
45
|
+
"data-slot": "subagent-run-report",
|
|
46
|
+
className: cx("subagent-run__report", className),
|
|
47
|
+
open,
|
|
48
|
+
onOpenChange: setOpen,
|
|
49
|
+
unstyled: true,
|
|
50
|
+
children: [/* @__PURE__ */ jsx(Collapsible.Trigger, {
|
|
51
|
+
className: "subagent-run__report-trigger",
|
|
52
|
+
unstyled: true,
|
|
53
|
+
children: "Run report and progress"
|
|
54
|
+
}), /* @__PURE__ */ jsx(Collapsible.Panel, {
|
|
55
|
+
unstyled: true,
|
|
56
|
+
children: /* @__PURE__ */ jsx(SubagentRunMetadata, {
|
|
57
|
+
run,
|
|
58
|
+
renderMilestone
|
|
59
|
+
})
|
|
60
|
+
})]
|
|
61
|
+
});
|
|
62
|
+
}
|
|
7
63
|
function SubagentRunProgress({ className, label, value, ref, ...props }) {
|
|
8
64
|
const labelId = React.useId();
|
|
9
65
|
const percent = value === void 0 ? null : Math.round(clamp(value, 0, 1) * 100);
|
|
@@ -39,4 +95,4 @@ function SubagentRunMilestone({ className, ref, ...props }) {
|
|
|
39
95
|
});
|
|
40
96
|
}
|
|
41
97
|
//#endregion
|
|
42
|
-
export { SubagentRunMilestone, SubagentRunMilestones, SubagentRunProgress };
|
|
98
|
+
export { SubagentRunMetadata, SubagentRunMilestone, SubagentRunMilestones, SubagentRunProgress, SubagentRunReport };
|