@mcp-b/react-components 0.48.0 → 0.49.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/AgentChatQueue-C_Jaw3Ia.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-H8mMg4rV.js} +21 -30
- package/dist/{IconButton-BAUFhUk8.d.ts → IconButton-ByiyjkYE.d.ts} +2 -2
- 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-C4Mofitz.d.ts} +44 -31
- 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 +4 -3
- 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/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 +39 -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 +5 -0
- package/dist/components/extension/CodexModelSelector.js +2 -2
- 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.js +1 -1
- 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/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/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/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/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 -1
- 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/composition-motion.css +0 -2
- package/dist/styles/employee-chrome.css +43 -0
- package/dist/styles/file-tree.css +5 -0
- package/dist/styles/index.css +4 -2
- package/dist/styles/message.css +2 -10
- package/dist/styles/queue.css +71 -0
- 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/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 +7 -3
- 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
|
@@ -20,7 +20,7 @@ declare function ThinkExecutionStatus({
|
|
|
20
20
|
ref,
|
|
21
21
|
...props
|
|
22
22
|
}: ThinkExecutionStatusProps & {
|
|
23
|
-
ref?: React.Ref<HTMLSpanElement>;
|
|
23
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLSpanElement>;
|
|
24
24
|
}): React.JSX.Element;
|
|
25
25
|
/** Shared identity, status, and progress summary for a whole Think execution record. */
|
|
26
26
|
declare function ThinkExecutionRunSummary({
|
|
@@ -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-cuEtsgj9.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";
|
|
@@ -1,32 +1,38 @@
|
|
|
1
1
|
import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-k8bpyXqt.js";
|
|
2
|
+
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
2
3
|
import * as React from "react";
|
|
4
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
5
|
import { DataTag, UnusedSkipTokenOptions } from "@tanstack/react-query";
|
|
4
6
|
import { Think, ThinkSubmissionInspection } from "@cloudflare/think";
|
|
5
7
|
import { AgentStub } from "agents/client";
|
|
6
8
|
import { WorkflowPage } from "agents/workflows";
|
|
7
9
|
|
|
10
|
+
//#region src/components/_internal/navigation-link.d.ts
|
|
11
|
+
interface NavigationLinkProps extends Omit<useRender.ComponentProps<"a">, "render"> {
|
|
12
|
+
/** App-authored TanStack Router Link with its destination already type-checked. */
|
|
13
|
+
render: React.ReactElement;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Merges design-system anchor props into an application-owned router Link.
|
|
17
|
+
*
|
|
18
|
+
* Keeping the Link element at the call site lets the consuming application's
|
|
19
|
+
* registered route tree infer `to`, `params`, and `search` without routing
|
|
20
|
+
* generics leaking through every design-system component.
|
|
21
|
+
*/
|
|
22
|
+
declare function NavigationLink({
|
|
23
|
+
render,
|
|
24
|
+
ref,
|
|
25
|
+
...props
|
|
26
|
+
}: NavigationLinkProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
27
|
+
//#endregion
|
|
8
28
|
//#region src/components/agents-sdk/ThinkExecutionWorkbench.d.ts
|
|
9
|
-
interface
|
|
10
|
-
/** Agents SDK client stub
|
|
29
|
+
interface ThinkExecutionWorkbenchRootProps extends useRender.ComponentProps<"div"> {
|
|
30
|
+
/** Whole Agents SDK client stub; native submission/workflow methods remain unchanged. */
|
|
11
31
|
source: AgentStub<Think>;
|
|
12
|
-
/**
|
|
13
|
-
* Stable, serializable identity for the remote Think agent. It must change
|
|
14
|
-
* when `source` points at a different agent and must not contain credentials.
|
|
15
|
-
*/
|
|
32
|
+
/** Stable, non-secret remote agent identity; change with the backing source. */
|
|
16
33
|
sourceKey: string;
|
|
17
|
-
|
|
18
|
-
backButton?: React.ReactNode;
|
|
34
|
+
/** Maximum submissions and workflows requested per page. */
|
|
19
35
|
pageSize?: number;
|
|
20
|
-
/** Whole native execution selected by the application route. */
|
|
21
|
-
selectedRun: ThinkExecutionRun | null;
|
|
22
|
-
/** Returns an application-authored TanStack Router Link for the run. */
|
|
23
|
-
renderRunLink: (run: ThinkExecutionRun) => React.ReactElement;
|
|
24
|
-
/**
|
|
25
|
-
* Returns an application-authored TanStack Router Link back to the run
|
|
26
|
-
* list. A selected run replaces the list — the workspace drill-in pattern —
|
|
27
|
-
* so this link is the way back out.
|
|
28
|
-
*/
|
|
29
|
-
renderRunsLink: () => React.ReactElement;
|
|
30
36
|
}
|
|
31
37
|
interface ThinkExecutionRunsData {
|
|
32
38
|
submissions: readonly ThinkSubmissionInspection[];
|
|
@@ -48,20 +54,71 @@ declare function thinkExecutionRunsQueryOptions(source: AgentStub<Think>, source
|
|
|
48
54
|
* not normalize execution records or own workflow authoring. Its first
|
|
49
55
|
* uncached list read suspends to the consuming route's Suspense boundary.
|
|
50
56
|
*/
|
|
51
|
-
declare function
|
|
52
|
-
backButton,
|
|
53
|
-
className,
|
|
57
|
+
declare function ThinkExecutionWorkbenchRoot({
|
|
54
58
|
pageSize,
|
|
59
|
+
render,
|
|
55
60
|
ref,
|
|
56
|
-
renderRunLink,
|
|
57
|
-
renderRunsLink,
|
|
58
|
-
selectedRun,
|
|
59
61
|
source,
|
|
60
62
|
sourceKey,
|
|
61
|
-
title,
|
|
62
63
|
...props
|
|
63
|
-
}:
|
|
64
|
-
|
|
64
|
+
}: ThinkExecutionWorkbenchRootProps): React.JSX.Element;
|
|
65
|
+
/** Caller-authored toolbar; no title, navigation, or action is injected. */
|
|
66
|
+
declare function ThinkExecutionWorkbenchHeader({
|
|
67
|
+
className,
|
|
68
|
+
"aria-label": label,
|
|
69
|
+
...props
|
|
70
|
+
}: Omit<React.ComponentProps<typeof AppTopBar.Root>, "aria-label"> & {
|
|
71
|
+
"aria-label"?: string;
|
|
65
72
|
}): React.JSX.Element;
|
|
73
|
+
declare function ThinkExecutionWorkbenchContent({
|
|
74
|
+
render,
|
|
75
|
+
ref,
|
|
76
|
+
...props
|
|
77
|
+
}: useRender.ComponentProps<"div">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
78
|
+
/** Refresh control retaining the complete AppTopBar button render/ref/event contract. */
|
|
79
|
+
declare function ThinkExecutionWorkbenchRefresh({
|
|
80
|
+
label,
|
|
81
|
+
...props
|
|
82
|
+
}: Omit<React.ComponentProps<typeof AppTopBar.Button>, "label"> & {
|
|
83
|
+
label?: string;
|
|
84
|
+
}): React.JSX.Element;
|
|
85
|
+
declare function ThinkExecutionWorkbenchError({
|
|
86
|
+
className,
|
|
87
|
+
...props
|
|
88
|
+
}: React.ComponentPropsWithRef<"div">): React.JSX.Element | null;
|
|
89
|
+
/** Controls for one whole native run; mount in a list row or a selected-run toolbar. */
|
|
90
|
+
declare function ThinkExecutionWorkbenchRunActions({
|
|
91
|
+
run
|
|
92
|
+
}: {
|
|
93
|
+
run: ThinkExecutionRun;
|
|
94
|
+
}): React.JSX.Element;
|
|
95
|
+
interface ThinkExecutionWorkbenchListProps extends Omit<React.ComponentPropsWithRef<"section">, "children"> {
|
|
96
|
+
/** Explicit row content; native execution identity and order come from the query. */
|
|
97
|
+
children: (run: ThinkExecutionRun) => React.ReactNode;
|
|
98
|
+
}
|
|
99
|
+
declare function ThinkExecutionWorkbenchList({
|
|
100
|
+
children,
|
|
101
|
+
className,
|
|
102
|
+
...props
|
|
103
|
+
}: ThinkExecutionWorkbenchListProps): React.JSX.Element;
|
|
104
|
+
interface ThinkExecutionWorkbenchRunLinkProps extends Omit<React.ComponentProps<typeof NavigationLink>, "children"> {
|
|
105
|
+
run: ThinkExecutionRun;
|
|
106
|
+
}
|
|
107
|
+
declare function ThinkExecutionWorkbenchRunLink({
|
|
108
|
+
run,
|
|
109
|
+
className,
|
|
110
|
+
...props
|
|
111
|
+
}: ThinkExecutionWorkbenchRunLinkProps): React.JSX.Element;
|
|
112
|
+
/** Native execution runtime with independently placed controls, rows, and route content. */
|
|
113
|
+
declare const ThinkExecutionWorkbench: {
|
|
114
|
+
Root: typeof ThinkExecutionWorkbenchRoot;
|
|
115
|
+
Header: typeof ThinkExecutionWorkbenchHeader;
|
|
116
|
+
Content: typeof ThinkExecutionWorkbenchContent;
|
|
117
|
+
Refresh: typeof ThinkExecutionWorkbenchRefresh;
|
|
118
|
+
Error: typeof ThinkExecutionWorkbenchError;
|
|
119
|
+
List: typeof ThinkExecutionWorkbenchList;
|
|
120
|
+
RunLink: typeof ThinkExecutionWorkbenchRunLink;
|
|
121
|
+
RunActions: typeof ThinkExecutionWorkbenchRunActions;
|
|
122
|
+
};
|
|
66
123
|
//#endregion
|
|
67
|
-
export { ThinkExecutionRunsData, ThinkExecutionRunsQueryKey, ThinkExecutionRunsQueryOptions, ThinkExecutionWorkbench,
|
|
124
|
+
export { ThinkExecutionRunsData, ThinkExecutionRunsQueryKey, ThinkExecutionRunsQueryOptions, ThinkExecutionWorkbench, ThinkExecutionWorkbenchListProps, ThinkExecutionWorkbenchRootProps, ThinkExecutionWorkbenchRunLinkProps, thinkExecutionRunsQueryOptions };
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { H as RefreshIcon, et as WarningIcon,
|
|
2
|
+
import { H as RefreshIcon, et as WarningIcon, y as EllipsisIcon } from "../../icons-cuEtsgj9.js";
|
|
3
3
|
import { buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
|
-
import { Menu } from "../foundations/Menu.js";
|
|
6
5
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
7
|
-
import {
|
|
6
|
+
import { Menu } from "../foundations/Menu.js";
|
|
8
7
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
8
|
+
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
9
9
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
10
10
|
import { getThinkExecutionRunAccessibleName, getThinkExecutionRunId, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
11
11
|
import { ThinkExecutionRunSummary } from "./ThinkExecutionStatus.js";
|
|
12
|
-
import { ThinkExecutionDetail } from "./ThinkExecutionDetail.js";
|
|
13
12
|
import * as React from "react";
|
|
14
13
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
15
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
15
16
|
import { queryOptions, useMutation, useSuspenseQuery } from "@tanstack/react-query";
|
|
16
17
|
//#region src/components/agents-sdk/ThinkExecutionWorkbench.tsx
|
|
17
18
|
const executionPanelPageSize = 20;
|
|
19
|
+
const workbenchDefaults = {
|
|
20
|
+
className: "think-execution-workbench",
|
|
21
|
+
"data-recipe": "fill-host"
|
|
22
|
+
};
|
|
18
23
|
function isSubmissionCancelable(status) {
|
|
19
24
|
return status === "pending" || status === "running";
|
|
20
25
|
}
|
|
@@ -117,11 +122,8 @@ function thinkExecutionRunsQueryOptions(source, sourceKey, pageSize = executionP
|
|
|
117
122
|
* not normalize execution records or own workflow authoring. Its first
|
|
118
123
|
* uncached list read suspends to the consuming route's Suspense boundary.
|
|
119
124
|
*/
|
|
120
|
-
function
|
|
121
|
-
const
|
|
122
|
-
const runsOptions = thinkExecutionRunsQueryOptions(source, sourceKey, pageSize);
|
|
123
|
-
const runsQueryKey = thinkExecutionRunsScopeQueryKey(sourceKey);
|
|
124
|
-
const runsQuery = useSuspenseQuery(runsOptions);
|
|
125
|
+
function ThinkExecutionWorkbenchRoot({ pageSize = executionPanelPageSize, render, ref, source, sourceKey, ...props }) {
|
|
126
|
+
const runsQuery = useSuspenseQuery(thinkExecutionRunsQueryOptions(source, sourceKey, pageSize));
|
|
125
127
|
const actionMutation = useMutation({
|
|
126
128
|
mutationFn: ({ action }) => action(),
|
|
127
129
|
onSuccess: (_result, action, _onMutateResult, context) => context.client.invalidateQueries({ queryKey: action.runsQueryKey })
|
|
@@ -131,103 +133,158 @@ function ThinkExecutionWorkbench({ backButton, className, pageSize = executionPa
|
|
|
131
133
|
const busyAction = actionIsPending ? currentAction.key : runsQuery.isFetching ? "refresh" : null;
|
|
132
134
|
const error = currentAction && actionMutation.isError ? actionMutation.error : runsQuery.error;
|
|
133
135
|
const runs = React.useMemo(() => [...runsQuery.data.submissions, ...runsQuery.data.workflows.workflows].sort((first, second) => Number(second.createdAt) - Number(first.createdAt)), [runsQuery.data]);
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
const { mutate, reset } = actionMutation;
|
|
137
|
+
const { refetch } = runsQuery;
|
|
138
|
+
const busy = busyAction !== null;
|
|
139
|
+
const value = React.useMemo(() => ({
|
|
140
|
+
runs,
|
|
141
|
+
source,
|
|
142
|
+
actionIsPending,
|
|
143
|
+
busy,
|
|
144
|
+
error,
|
|
145
|
+
runAction: (key, action) => {
|
|
146
|
+
mutate({
|
|
147
|
+
action,
|
|
148
|
+
key,
|
|
149
|
+
runsQueryKey: thinkExecutionRunsScopeQueryKey(sourceKey),
|
|
150
|
+
source
|
|
151
|
+
});
|
|
152
|
+
},
|
|
153
|
+
refresh: () => {
|
|
154
|
+
reset();
|
|
155
|
+
refetch();
|
|
156
|
+
}
|
|
157
|
+
}), [
|
|
158
|
+
runs,
|
|
159
|
+
source,
|
|
160
|
+
sourceKey,
|
|
161
|
+
actionIsPending,
|
|
162
|
+
busy,
|
|
163
|
+
error,
|
|
164
|
+
mutate,
|
|
165
|
+
reset,
|
|
166
|
+
refetch
|
|
167
|
+
]);
|
|
168
|
+
const element = useRender({
|
|
169
|
+
defaultTagName: "div",
|
|
170
|
+
render,
|
|
143
171
|
ref,
|
|
144
|
-
|
|
145
|
-
|
|
172
|
+
props: mergeProps(workbenchDefaults, props)
|
|
173
|
+
});
|
|
174
|
+
return /* @__PURE__ */ jsx(WorkbenchContext.Provider, {
|
|
175
|
+
value,
|
|
176
|
+
children: element
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
const WorkbenchContext = React.createContext(null);
|
|
180
|
+
function useWorkbench() {
|
|
181
|
+
const value = React.useContext(WorkbenchContext);
|
|
182
|
+
if (!value) throw new Error("ThinkExecutionWorkbench parts require ThinkExecutionWorkbench.Root.");
|
|
183
|
+
return value;
|
|
184
|
+
}
|
|
185
|
+
/** Caller-authored toolbar; no title, navigation, or action is injected. */
|
|
186
|
+
function ThinkExecutionWorkbenchHeader({ className, "aria-label": label = "Run controls", ...props }) {
|
|
187
|
+
return /* @__PURE__ */ jsx(AppTopBar.Root, {
|
|
188
|
+
titleAlign: "start",
|
|
189
|
+
"aria-label": label,
|
|
146
190
|
...props,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
render: renderRunLink(run),
|
|
210
|
-
"data-slot": "button",
|
|
211
|
-
className: buttonVariants({
|
|
212
|
-
variant: "ghost",
|
|
213
|
-
color: "neutral",
|
|
214
|
-
size: "sm",
|
|
215
|
-
className: "think-execution-workbench__run"
|
|
216
|
-
}),
|
|
217
|
-
"aria-label": getThinkExecutionRunAccessibleName(run),
|
|
218
|
-
children: /* @__PURE__ */ jsx(ThinkExecutionRunSummary, { run })
|
|
219
|
-
}), /* @__PURE__ */ jsx(RunActions, {
|
|
220
|
-
busy: actionIsPending,
|
|
221
|
-
run,
|
|
222
|
-
source,
|
|
223
|
-
onAction: runAction
|
|
224
|
-
})] }, `${kind}:${id}`);
|
|
225
|
-
})
|
|
226
|
-
})]
|
|
227
|
-
})
|
|
191
|
+
className: cx("think-execution-workbench__header", className)
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
function ThinkExecutionWorkbenchContent({ render, ref, ...props }) {
|
|
195
|
+
const { busy } = useWorkbench();
|
|
196
|
+
return useRender({
|
|
197
|
+
defaultTagName: "div",
|
|
198
|
+
render,
|
|
199
|
+
ref,
|
|
200
|
+
props: mergeProps({
|
|
201
|
+
className: "think-execution-workbench__content",
|
|
202
|
+
"aria-busy": busy
|
|
203
|
+
}, props)
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/** Refresh control retaining the complete AppTopBar button render/ref/event contract. */
|
|
207
|
+
function ThinkExecutionWorkbenchRefresh({ label = "Refresh runs", ...props }) {
|
|
208
|
+
const { busy, refresh } = useWorkbench();
|
|
209
|
+
return /* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
210
|
+
...mergeProps({
|
|
211
|
+
label,
|
|
212
|
+
disabled: busy,
|
|
213
|
+
onClick: refresh,
|
|
214
|
+
children: /* @__PURE__ */ jsx(RefreshIcon, {})
|
|
215
|
+
}, {
|
|
216
|
+
...props,
|
|
217
|
+
label
|
|
218
|
+
}),
|
|
219
|
+
disabled: busy || props.disabled
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
function ThinkExecutionWorkbenchError({ className, ...props }) {
|
|
223
|
+
const { error } = useWorkbench();
|
|
224
|
+
return error ? /* @__PURE__ */ jsxs("div", {
|
|
225
|
+
role: "alert",
|
|
226
|
+
...props,
|
|
227
|
+
className: cx("think-execution-workbench__error", className),
|
|
228
|
+
children: [/* @__PURE__ */ jsx(WarningIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", { children: formatErrorMessage(error) })]
|
|
229
|
+
}) : null;
|
|
230
|
+
}
|
|
231
|
+
/** Controls for one whole native run; mount in a list row or a selected-run toolbar. */
|
|
232
|
+
function ThinkExecutionWorkbenchRunActions({ run }) {
|
|
233
|
+
const { source, actionIsPending, runAction } = useWorkbench();
|
|
234
|
+
return /* @__PURE__ */ jsx(RunActions, {
|
|
235
|
+
run,
|
|
236
|
+
source,
|
|
237
|
+
busy: actionIsPending,
|
|
238
|
+
onAction: runAction
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
function ThinkExecutionWorkbenchList({ children, className, ...props }) {
|
|
242
|
+
const { runs } = useWorkbench();
|
|
243
|
+
const runsId = React.useId();
|
|
244
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
245
|
+
"aria-labelledby": runsId,
|
|
246
|
+
...props,
|
|
247
|
+
className: cx("think-execution-workbench__run-list", className),
|
|
248
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
249
|
+
className: "think-execution-workbench__list-header",
|
|
250
|
+
children: /* @__PURE__ */ jsx("h3", {
|
|
251
|
+
id: runsId,
|
|
252
|
+
children: "Runs"
|
|
228
253
|
})
|
|
229
|
-
|
|
254
|
+
}), runs.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
|
|
255
|
+
className: "think-execution-workbench__empty",
|
|
256
|
+
description: "No runs yet."
|
|
257
|
+
}) : /* @__PURE__ */ jsx("ul", {
|
|
258
|
+
className: "think-execution-workbench__list",
|
|
259
|
+
role: "list",
|
|
260
|
+
children: runs.map((run) => /* @__PURE__ */ jsx("li", { children: children(run) }, `${isThinkSubmissionRun(run) ? "submission" : "workflow"}:${getThinkExecutionRunId(run)}`))
|
|
261
|
+
})]
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
function ThinkExecutionWorkbenchRunLink({ run, className, ...props }) {
|
|
265
|
+
return /* @__PURE__ */ jsx(NavigationLink, {
|
|
266
|
+
"data-slot": "button",
|
|
267
|
+
"aria-label": getThinkExecutionRunAccessibleName(run),
|
|
268
|
+
...props,
|
|
269
|
+
className: buttonVariants({
|
|
270
|
+
variant: "ghost",
|
|
271
|
+
color: "neutral",
|
|
272
|
+
size: "sm",
|
|
273
|
+
className: cx("think-execution-workbench__run", className)
|
|
274
|
+
}),
|
|
275
|
+
children: /* @__PURE__ */ jsx(ThinkExecutionRunSummary, { run })
|
|
230
276
|
});
|
|
231
277
|
}
|
|
278
|
+
/** Native execution runtime with independently placed controls, rows, and route content. */
|
|
279
|
+
const ThinkExecutionWorkbench = {
|
|
280
|
+
Root: ThinkExecutionWorkbenchRoot,
|
|
281
|
+
Header: ThinkExecutionWorkbenchHeader,
|
|
282
|
+
Content: ThinkExecutionWorkbenchContent,
|
|
283
|
+
Refresh: ThinkExecutionWorkbenchRefresh,
|
|
284
|
+
Error: ThinkExecutionWorkbenchError,
|
|
285
|
+
List: ThinkExecutionWorkbenchList,
|
|
286
|
+
RunLink: ThinkExecutionWorkbenchRunLink,
|
|
287
|
+
RunActions: ThinkExecutionWorkbenchRunActions
|
|
288
|
+
};
|
|
232
289
|
//#endregion
|
|
233
290
|
export { ThinkExecutionWorkbench, thinkExecutionRunsQueryOptions };
|