@mcp-b/react-components 0.58.1 → 0.59.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/{CodeBlock-Bs_Z03eC.js → CodeBlock-B4K656LO.js} +1 -1
- package/dist/{EmployeeChrome-DsdIek0l.d.ts → EmployeeChrome-QSki0QT4.d.ts} +4 -4
- package/dist/{ExecutionResult-BSZsUbrL.js → ExecutionResult-Wd1sKAvD.js} +2 -2
- package/dist/{FileTree-DyLBn7O_.js → FileTree-BpCJuvji.js} +1 -1
- package/dist/{ManagerOffice-C8AQcaXs.js → ManagerOffice-BaHSBcSF.js} +4 -4
- package/dist/{ResponsiveSidebarShell-DoZlSP30.d.ts → ResponsiveSidebarShell-DzBGlRJF.d.ts} +23 -8
- package/dist/{SetupChecklist-CKQ-mKYt.js → SetupChecklist-BNK2XFaI.js} +2 -2
- package/dist/{ThinkChatActivity-BkGjTY4r.d.ts → ThinkChatActivity-C4_hPEmb.d.ts} +20 -4
- package/dist/{ThinkChatActivitySummary-DZVy3uQV.d.ts → ThinkChatActivitySummary-ChJ8Iu2T.d.ts} +3 -3
- package/dist/{ThinkChatToolParts-BucHi63O.d.ts → ThinkChatToolParts-BrntWlpa.d.ts} +29 -3
- package/dist/{WorkspaceConceptPanel-97ZyVpZI.js → WorkspaceConceptPanel-D21iRsWm.js} +7 -4
- package/dist/{WorkspaceFileView-M2jC2P4p.js → WorkspaceFileView-5SHsjamf.js} +84 -78
- package/dist/app-bar-outlet-CNfNzY4Y.js +6 -0
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentChat.js +7 -7
- package/dist/components/agents-sdk/BrowserLiveScreen.js +50 -12
- 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 +2 -3
- package/dist/components/agents-sdk/EmployeeApp.js +5 -5
- package/dist/components/agents-sdk/EmployeeChat.js +4 -4
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeChrome.js +219 -207
- package/dist/components/agents-sdk/EmployeeSchedules.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeSchedules.js +7 -7
- package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeStartScreen.js +3 -3
- package/dist/components/agents-sdk/ExecutionBoard.js +4 -4
- package/dist/components/agents-sdk/ManagerAccountActions.js +2 -2
- package/dist/components/agents-sdk/ManagerOffice.js +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.js +6 -19
- package/dist/components/agents-sdk/McpConnectionRequest.js +2 -2
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +2 -2
- package/dist/components/agents-sdk/McpServerPicker.js +2 -2
- package/dist/components/agents-sdk/ModelEndpointDialog.js +1 -1
- package/dist/components/agents-sdk/ModelSelector.js +5 -5
- 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 +8 -9
- package/dist/components/agents-sdk/SubagentRunPanel.js +133 -122
- package/dist/components/agents-sdk/SubagentRunSelector.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChat.js +26 -3
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +110 -110
- package/dist/components/agents-sdk/ThinkChatActivitySummary.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivitySummary.js +183 -40
- package/dist/components/agents-sdk/ThinkChatToolPanels.d.ts +8 -4
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +310 -64
- package/dist/components/agents-sdk/ThinkChatToolParts.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkChatToolParts.js +71 -1
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +3 -4
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +8 -8
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkFullApp.js +6 -1
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineActions.js +15 -23
- 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 +6 -6
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +1 -1
- package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -3
- package/dist/components/agents-sdk/WorkbenchBack.js +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +7 -7
- package/dist/components/agents-sdk/WorkspaceExecution.js +146 -139
- package/dist/components/agents-sdk/WorkspaceExecutionTable.js +5 -5
- package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -3
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/agents-sdk/WorkspaceHeader.js +27 -29
- package/dist/components/agents-sdk/WorkspaceMountManager.js +1 -1
- package/dist/components/agents-sdk/WorkspaceProject.js +6 -6
- package/dist/components/agents-sdk/WorkspaceUserScript.js +6 -6
- package/dist/components/ai-sdk/Activity.d.ts +1 -1
- package/dist/components/ai-sdk/Activity.js +85 -7
- package/dist/components/ai-sdk/AgentChatMessageEditor.js +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
- package/dist/components/ai-sdk/Approval.js +4 -3
- 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.js +1 -1
- package/dist/components/ai-sdk/ComposerLink.js +2 -2
- package/dist/components/ai-sdk/ConnectedAppCards.js +66 -48
- package/dist/components/ai-sdk/Context.js +1 -1
- package/dist/components/ai-sdk/Conversation.js +2 -2
- package/dist/components/ai-sdk/ExpansionState.d.ts +16 -6
- package/dist/components/ai-sdk/ExpansionState.js +25 -7
- package/dist/components/ai-sdk/Goal.js +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.js +2 -2
- 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 +99 -12
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.js +13 -9
- package/dist/components/ai-sdk/PromptInputComposerEditor.js +2 -2
- package/dist/components/ai-sdk/Queue.js +2 -2
- 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/ai-sdk/ToolInvocation.d.ts +8 -0
- package/dist/components/ai-sdk/ToolInvocation.js +45 -19
- package/dist/components/extension/ChatGptSignInScreen.js +1 -1
- package/dist/components/extension/CodexModelSelector.js +2 -2
- 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/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/ToggleGroup.js +1 -1
- package/dist/components/foundations/icons.js +1 -1
- package/dist/components/general-purpose/AccountSignInDialog.js +1 -1
- package/dist/components/general-purpose/Commit.js +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
- package/dist/components/general-purpose/FileTree.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 +2 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +163 -88
- package/dist/components/general-purpose/SettingsFormDialog.js +2 -2
- package/dist/components/general-purpose/SetupChecklist.js +1 -1
- package/dist/components/general-purpose/Terminal.js +3 -3
- package/dist/components/general-purpose/TestResults.js +1 -1
- package/dist/components/general-purpose/ThemeModeControl.js +1 -1
- package/dist/components/general-purpose/WebPreview.js +2 -2
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.d.ts +1 -3
- package/dist/components/nanites/AgentToolDetail.js +30 -39
- package/dist/{copy-button-M4sAp9xS.js → copy-button-BsmxSSeD.js} +1 -1
- package/dist/merge-refs-DAh6reu8.js +26 -0
- package/dist/styles/activity.css +74 -0
- package/dist/styles/agent-chat.css +8 -1
- package/dist/styles/agent-tool-detail.css +2 -17
- package/dist/styles/app-top-bar.css +6 -7
- package/dist/styles/base.css +1 -1
- package/dist/styles/employee-chrome.css +0 -7
- package/dist/styles/message.css +1 -1
- package/dist/styles/responsive-sidebar-shell.css +10 -25
- package/dist/styles/scroll-area.css +16 -0
- package/dist/styles/scrollbars.css +55 -41
- package/dist/styles/search-field.css +0 -1
- package/dist/styles/subagent-run.css +36 -196
- package/dist/styles/think-chat-tool-panels.css +38 -5
- package/dist/styles/think-execution-workbench.css +4 -0
- package/dist/styles/think-full-app.css +1 -6
- package/dist/styles/workspace-concepts.css +6 -39
- package/dist/styles/workspace-explorer.css +4 -11
- package/dist/{workspace-assets-DVn0d-fN.js → workspace-assets-RD6IhOyh.js} +1 -1
- package/dist/{workspace-delete-DfloiBWp.js → workspace-delete-CrNGUuBp.js} +1 -1
- package/package.json +2 -2
- package/dist/components/agents-sdk/SubagentRunDetails.d.ts +0 -40
- package/dist/components/agents-sdk/SubagentRunDetails.js +0 -98
- package/dist/merge-refs-DF_7w2x_.js +0 -18
- package/dist/{icons-DvlrWt54.js → icons-Cn3vWZRs.js} +1 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { H as RefreshIcon, tt as WarningIcon, y as EllipsisIcon } from "../../icons-
|
|
2
|
+
import { H as RefreshIcon, tt as WarningIcon, y as EllipsisIcon } from "../../icons-Cn3vWZRs.js";
|
|
3
3
|
import { buttonVariants } from "../foundations/Button.js";
|
|
4
|
-
import { Menu } from "../foundations/Menu.js";
|
|
5
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
6
5
|
import { a as formatErrorMessage } from "../../format-CWaZEp5o.js";
|
|
7
|
-
import {
|
|
6
|
+
import { Menu } from "../foundations/Menu.js";
|
|
8
7
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
9
8
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
9
|
+
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
10
|
+
import { ResponsiveSidebarAppBar } from "../general-purpose/ResponsiveSidebarShell.js";
|
|
10
11
|
import { getThinkExecutionRunAccessibleName, getThinkExecutionRunId, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
11
12
|
import { ThinkExecutionRunSummary } from "./ThinkExecutionStatus.js";
|
|
12
13
|
import * as React from "react";
|
|
@@ -183,12 +184,11 @@ function useWorkbench() {
|
|
|
183
184
|
if (!value) throw new Error("ThinkExecutionWorkbench parts require ThinkExecutionWorkbench.Root.");
|
|
184
185
|
return value;
|
|
185
186
|
}
|
|
186
|
-
/**
|
|
187
|
-
function ThinkExecutionWorkbenchHeader({ className,
|
|
188
|
-
return /* @__PURE__ */ jsx(
|
|
189
|
-
titleAlign: "start",
|
|
190
|
-
"aria-label": label,
|
|
187
|
+
/** Workbench controls composed into a standalone or host-owned application bar. */
|
|
188
|
+
function ThinkExecutionWorkbenchHeader({ className, label = "Run controls", ...props }) {
|
|
189
|
+
return /* @__PURE__ */ jsx(ResponsiveSidebarAppBar, {
|
|
191
190
|
...props,
|
|
191
|
+
label,
|
|
192
192
|
className: cx("think-execution-workbench__header", className)
|
|
193
193
|
});
|
|
194
194
|
}
|
|
@@ -19,7 +19,7 @@ export interface ThinkFullAppConversationProps extends useRender.ComponentProps<
|
|
|
19
19
|
declare function ThinkFullAppConversation({ render, className, ref, ...props }: ThinkFullAppConversationProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
20
20
|
export interface ThinkFullAppWorkbenchProps extends useRender.ComponentProps<"aside"> {}
|
|
21
21
|
/** The single raised output plane. Unmounts its content when the host closes it. */
|
|
22
|
-
declare function ThinkFullAppWorkbench({ render, className, ref, ...props }: ThinkFullAppWorkbenchProps): React.
|
|
22
|
+
declare function ThinkFullAppWorkbench({ render, className, ref, ...props }: ThinkFullAppWorkbenchProps): React.JSX.Element | null;
|
|
23
23
|
export interface ThinkFullAppResizeHandleProps extends ResizableSidePanelHandleProps {}
|
|
24
24
|
/** Keyboard and pointer resize control; absent while the workbench is closed. */
|
|
25
25
|
declare function ThinkFullAppResizeHandle({ className, ...props }: ThinkFullAppResizeHandleProps): React.JSX.Element | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { n as mergeBaseClassName, t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { n as ShellAppBarOutletContext, t as ContentAppBarOutletContext } from "../../app-bar-outlet-CNfNzY4Y.js";
|
|
2
3
|
import { ResizableSidePanel } from "../general-purpose/ResizableSidePanel.js";
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -57,6 +58,7 @@ function ThinkFullAppConversation({ render, className, ref, ...props }) {
|
|
|
57
58
|
/** The single raised output plane. Unmounts its content when the host closes it. */
|
|
58
59
|
function ThinkFullAppWorkbench({ render, className, ref, ...props }) {
|
|
59
60
|
const open = useWorkbenchOpen();
|
|
61
|
+
const outlet = React.useContext(ShellAppBarOutletContext);
|
|
60
62
|
const element = useRender({
|
|
61
63
|
defaultTagName: "aside",
|
|
62
64
|
render,
|
|
@@ -67,7 +69,10 @@ function ThinkFullAppWorkbench({ render, className, ref, ...props }) {
|
|
|
67
69
|
className: mergeBaseClassName("think-full-app__aside", className)
|
|
68
70
|
}, props)
|
|
69
71
|
});
|
|
70
|
-
return open ?
|
|
72
|
+
return open ? /* @__PURE__ */ jsx(ContentAppBarOutletContext.Provider, {
|
|
73
|
+
value: outlet,
|
|
74
|
+
children: element
|
|
75
|
+
}) : null;
|
|
71
76
|
}
|
|
72
77
|
/** Keyboard and pointer resize control; absent while the workbench is closed. */
|
|
73
78
|
function ThinkFullAppResizeHandle({ className, ...props }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AgentChatTurnError } from "../ai-sdk/AgentChatTurnError.js";
|
|
2
1
|
import { TransitionSurface } from "../foundations/TransitionSurface.js";
|
|
2
|
+
import { AgentChatTurnError } from "../ai-sdk/AgentChatTurnError.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/agents-sdk/ThinkRecoveryNotice.tsx
|
|
5
5
|
function connectionReason(error) {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { $ as TrashIcon, K as SpinnerIcon, z as PlayIcon } from "../../icons-
|
|
2
|
-
import { Button
|
|
3
|
-
import { Tooltip } from "../foundations/Tooltip.js";
|
|
1
|
+
import { $ as TrashIcon, K as SpinnerIcon, z as PlayIcon } from "../../icons-Cn3vWZRs.js";
|
|
2
|
+
import { Button } from "../foundations/Button.js";
|
|
4
3
|
import { a as formatErrorMessage } from "../../format-CWaZEp5o.js";
|
|
5
|
-
import { n as mergeRefs } from "../../merge-refs-
|
|
6
|
-
import { Toolbar } from "../foundations/Toolbar.js";
|
|
4
|
+
import { n as mergeRefs } from "../../merge-refs-DAh6reu8.js";
|
|
7
5
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
8
6
|
import { AlertDialog } from "../foundations/AlertDialog.js";
|
|
9
7
|
import { t as executionErrorSummary } from "../../execution-result-DWVmm-bL.js";
|
|
@@ -101,24 +99,18 @@ function ThinkRoutineActionsRoot({ routine, sourceKey, onRun, onEnabledChange, o
|
|
|
101
99
|
function ThinkRoutineRun({ label = "Run now", tooltip = label, children, ...props }) {
|
|
102
100
|
const { busy, run } = useRoutineActions();
|
|
103
101
|
if (!run) return null;
|
|
104
|
-
return /* @__PURE__ */
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [busy ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(PlayIcon, {}), "Run now"] })
|
|
117
|
-
}), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
118
|
-
side: "bottom",
|
|
119
|
-
sideOffset: 6,
|
|
120
|
-
children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: tooltip })
|
|
121
|
-
}) })] });
|
|
102
|
+
return /* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
103
|
+
...mergeProps({
|
|
104
|
+
label,
|
|
105
|
+
tooltip,
|
|
106
|
+
onClick: () => {
|
|
107
|
+
run();
|
|
108
|
+
}
|
|
109
|
+
}, props),
|
|
110
|
+
label,
|
|
111
|
+
disabled: busy || props.disabled,
|
|
112
|
+
children: children ?? (busy ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(PlayIcon, {}))
|
|
113
|
+
});
|
|
122
114
|
}
|
|
123
115
|
/** Delete confirmation stays open on failure; only its source-scoped action can settle it. */
|
|
124
116
|
function ThinkRoutineDelete(props) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { B as PlusIcon } from "../../icons-
|
|
2
|
+
import { B as PlusIcon } from "../../icons-Cn3vWZRs.js";
|
|
3
3
|
import { buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
5
5
|
import { t as capitalize } from "../../format-CWaZEp5o.js";
|
|
6
|
-
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
7
6
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
7
|
+
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
8
8
|
import { SearchField } from "../foundations/SearchField.js";
|
|
9
9
|
import { ToggleGroup } from "../foundations/ToggleGroup.js";
|
|
10
10
|
import { getThinkRoutineNextRun } from "./ThinkRoutine.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
3
|
-
import { t as ExecutionResult } from "../../ExecutionResult-
|
|
3
|
+
import { t as ExecutionResult } from "../../ExecutionResult-Wd1sKAvD.js";
|
|
4
4
|
import { getThinkRoutineNextRun } from "./ThinkRoutine.js";
|
|
5
5
|
import { Switch } from "../foundations/Switch.js";
|
|
6
6
|
import { ThinkRoutineRuns } from "./ThinkRoutineRuns.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SpinnerIcon, T as InfoIcon, d as CheckIcon, f as ChevronDownIcon, r as ArrowLeftIcon, tt as WarningIcon } from "../../icons-
|
|
2
|
+
import { K as SpinnerIcon, T as InfoIcon, d as CheckIcon, f as ChevronDownIcon, r as ArrowLeftIcon, tt as WarningIcon } from "../../icons-Cn3vWZRs.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
+
import { IconButton } from "../foundations/IconButton.js";
|
|
5
|
+
import { a as formatErrorMessage } from "../../format-CWaZEp5o.js";
|
|
4
6
|
import { Field } from "../foundations/Field.js";
|
|
5
7
|
import { Form } from "../foundations/Form.js";
|
|
6
8
|
import { Textarea } from "../foundations/Textarea.js";
|
|
7
|
-
import { IconButton } from "../foundations/IconButton.js";
|
|
8
|
-
import { a as formatErrorMessage } from "../../format-CWaZEp5o.js";
|
|
9
|
-
import { Select } from "../foundations/Select.js";
|
|
10
9
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
11
10
|
import { Fieldset } from "../foundations/Fieldset.js";
|
|
11
|
+
import { Select } from "../foundations/Select.js";
|
|
12
12
|
import { t as executionErrorSummary } from "../../execution-result-DWVmm-bL.js";
|
|
13
|
-
import { a as httpUrl, t as FaviconMark } from "../../workspace-assets-
|
|
14
|
-
import { t as ExecutionResult } from "../../ExecutionResult-
|
|
13
|
+
import { a as httpUrl, t as FaviconMark } from "../../workspace-assets-RD6IhOyh.js";
|
|
14
|
+
import { t as ExecutionResult } from "../../ExecutionResult-Wd1sKAvD.js";
|
|
15
15
|
import { Checkbox } from "../foundations/Checkbox.js";
|
|
16
16
|
import { CheckboxGroup } from "../foundations/CheckboxGroup.js";
|
|
17
17
|
import { Combobox } from "../foundations/Combobox.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { buttonVariants } from "../foundations/Button.js";
|
|
3
|
-
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
4
3
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
4
|
+
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
5
5
|
import { getThinkExecutionRunAccessibleName, getThinkExecutionRunId, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
6
6
|
import { ThinkExecutionRunSummary } from "./ThinkExecutionStatus.js";
|
|
7
7
|
import * as React from "react";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SpinnerIcon, R as PencilIcon, t as ArchiveIcon, tt as WarningIcon } from "../../icons-
|
|
2
|
+
import { K as SpinnerIcon, R as PencilIcon, t as ArchiveIcon, tt as WarningIcon } from "../../icons-Cn3vWZRs.js";
|
|
3
|
+
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
3
4
|
import { Button, buttonVariants } from "../foundations/Button.js";
|
|
4
5
|
import { Tooltip } from "../foundations/Tooltip.js";
|
|
5
6
|
import { a as formatErrorMessage } from "../../format-CWaZEp5o.js";
|
|
6
|
-
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
7
|
-
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
8
7
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
8
|
+
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
9
9
|
import { AlertDialog } from "../foundations/AlertDialog.js";
|
|
10
10
|
import { LinkButton } from "../foundations/LinkButton.js";
|
|
11
11
|
import { SearchField } from "../foundations/SearchField.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as ArrowLeftIcon } from "../../icons-
|
|
1
|
+
import { r as ArrowLeftIcon } from "../../icons-Cn3vWZRs.js";
|
|
2
2
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/agents-sdk/WorkbenchBack.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SearchField } from "../foundations/SearchField.js";
|
|
2
|
-
import { i as FileTreeFolder, r as FileTreeFile, t as FileTree } from "../../FileTree-
|
|
2
|
+
import { i as FileTreeFolder, r as FileTreeFile, t as FileTree } from "../../FileTree-BpCJuvji.js";
|
|
3
3
|
import { WorkspaceHeader } from "./WorkspaceHeader.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { S as FileIcon, d as CheckIcon } from "../../icons-
|
|
2
|
+
import { S as FileIcon, d as CheckIcon } from "../../icons-Cn3vWZRs.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
-
import { Field } from "../foundations/Field.js";
|
|
5
|
-
import { Textarea } from "../foundations/Textarea.js";
|
|
6
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
7
5
|
import { a as formatErrorMessage } from "../../format-CWaZEp5o.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { Field } from "../foundations/Field.js";
|
|
7
|
+
import { Textarea } from "../foundations/Textarea.js";
|
|
10
8
|
import { Input } from "../foundations/Input.js";
|
|
9
|
+
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
10
|
+
import { Card, CardAction, CardContent, CardFooter, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
11
|
+
import { a as httpUrl, t as FaviconMark } from "../../workspace-assets-RD6IhOyh.js";
|
|
11
12
|
import { EmailMessageCard, SlackMessageCard } from "../ai-sdk/ConnectedAppCards.js";
|
|
12
|
-
import {
|
|
13
|
-
import { t as WorkspaceDeleteControl } from "../../workspace-delete-DfloiBWp.js";
|
|
13
|
+
import { t as WorkspaceDeleteControl } from "../../workspace-delete-CrNGUuBp.js";
|
|
14
14
|
import * as React from "react";
|
|
15
15
|
import { createElement } from "react";
|
|
16
16
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SpinnerIcon, S as FileIcon, T as InfoIcon, V as QueueIcon, Y as StopIcon, d as CheckIcon, p as ChevronRightIcon, q as SplitIcon, r as ArrowLeftIcon, u as CalendarIcon, z as PlayIcon } from "../../icons-
|
|
2
|
+
import { K as SpinnerIcon, S as FileIcon, T as InfoIcon, V as QueueIcon, Y as StopIcon, d as CheckIcon, p as ChevronRightIcon, q as SplitIcon, r as ArrowLeftIcon, u as CalendarIcon, z as PlayIcon } from "../../icons-Cn3vWZRs.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
+
import { IconButton } from "../foundations/IconButton.js";
|
|
5
|
+
import { a as formatErrorMessage, r as firstLine } from "../../format-CWaZEp5o.js";
|
|
6
|
+
import { n as mergeRefs } from "../../merge-refs-DAh6reu8.js";
|
|
4
7
|
import { Field } from "../foundations/Field.js";
|
|
5
8
|
import { Form } from "../foundations/Form.js";
|
|
6
9
|
import { Tabs } from "../foundations/Tabs.js";
|
|
7
|
-
import { IconButton } from "../foundations/IconButton.js";
|
|
8
|
-
import { a as formatErrorMessage, r as firstLine } from "../../format-CWaZEp5o.js";
|
|
9
|
-
import { Card, CardAction, CardContent, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
10
|
-
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
11
10
|
import { Input } from "../foundations/Input.js";
|
|
12
11
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
12
|
+
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
13
|
+
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
14
|
+
import { ResponsiveSidebarAppBar } from "../general-purpose/ResponsiveSidebarShell.js";
|
|
15
|
+
import { Card, CardAction, CardContent, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
13
16
|
import { i as executionResultSummary, t as executionErrorSummary } from "../../execution-result-DWVmm-bL.js";
|
|
14
|
-
import { a as httpUrl, i as WorkspaceComposerLink, n as Hint, t as FaviconMark } from "../../workspace-assets-
|
|
15
|
-
import { t as ExecutionResult } from "../../ExecutionResult-
|
|
17
|
+
import { a as httpUrl, i as WorkspaceComposerLink, n as Hint, t as FaviconMark } from "../../workspace-assets-RD6IhOyh.js";
|
|
18
|
+
import { t as ExecutionResult } from "../../ExecutionResult-Wd1sKAvD.js";
|
|
16
19
|
import { ExecutionBoard } from "./ExecutionBoard.js";
|
|
17
20
|
import { Checkbox } from "../foundations/Checkbox.js";
|
|
18
|
-
import { t as WorkspaceDeleteControl } from "../../workspace-delete-
|
|
19
|
-
import { t as WorkspaceConceptPanel } from "../../WorkspaceConceptPanel-
|
|
21
|
+
import { t as WorkspaceDeleteControl } from "../../workspace-delete-CrNGUuBp.js";
|
|
22
|
+
import { t as WorkspaceConceptPanel } from "../../WorkspaceConceptPanel-D21iRsWm.js";
|
|
20
23
|
import { WorkspaceExecutionTable } from "./WorkspaceExecutionTable.js";
|
|
21
24
|
import * as React from "react";
|
|
22
25
|
import { createElement } from "react";
|
|
@@ -472,10 +475,32 @@ function WorkspaceExecutionsPanel({ className, source, selectedPath, selectedTra
|
|
|
472
475
|
parameters: [],
|
|
473
476
|
graph: selectedGraph
|
|
474
477
|
} : void 0);
|
|
475
|
-
|
|
478
|
+
const panelRef = React.useRef(null);
|
|
479
|
+
const focusedControl = React.useRef(null);
|
|
480
|
+
const selectionKey = `${JSON.stringify(source.queryOptions.queryKey)}:${selectedPath ?? selected?.path ?? ""}`;
|
|
481
|
+
React.useLayoutEffect(() => {
|
|
482
|
+
const previous = focusedControl.current;
|
|
483
|
+
if (!previous || previous.isConnected) return;
|
|
484
|
+
focusedControl.current = null;
|
|
485
|
+
if (document.activeElement === document.body) panelRef.current?.focus({ preventScroll: true });
|
|
486
|
+
}, [selectionKey]);
|
|
487
|
+
const mergedPanelRef = React.useMemo(() => mergeRefs(ref, panelRef), [ref]);
|
|
488
|
+
const panelProps = {
|
|
476
489
|
...props,
|
|
477
|
-
ref,
|
|
478
|
-
|
|
490
|
+
ref: mergedPanelRef,
|
|
491
|
+
tabIndex: props.tabIndex ?? -1,
|
|
492
|
+
onFocusCapture: (event) => {
|
|
493
|
+
focusedControl.current = event.target;
|
|
494
|
+
props.onFocusCapture?.(event);
|
|
495
|
+
},
|
|
496
|
+
onBlurCapture: (event) => {
|
|
497
|
+
focusedControl.current = null;
|
|
498
|
+
props.onBlurCapture?.(event);
|
|
499
|
+
}
|
|
500
|
+
};
|
|
501
|
+
if (selected) return /* @__PURE__ */ createElement(WorkspaceExecutionWorkbench, {
|
|
502
|
+
...panelProps,
|
|
503
|
+
key: selectionKey,
|
|
479
504
|
className,
|
|
480
505
|
module: {
|
|
481
506
|
...selected,
|
|
@@ -485,10 +510,9 @@ function WorkspaceExecutionsPanel({ className, source, selectedPath, selectedTra
|
|
|
485
510
|
});
|
|
486
511
|
return /* @__PURE__ */ jsx(WorkspaceConceptPanel, {
|
|
487
512
|
heading: "Workflows",
|
|
488
|
-
ref,
|
|
489
513
|
"data-slot": "workspace-executions-panel",
|
|
490
514
|
className: cx("workspace-concept-panel", className),
|
|
491
|
-
...
|
|
515
|
+
...panelProps,
|
|
492
516
|
"aria-label": props["aria-label"] ?? "Workflows",
|
|
493
517
|
children: /* @__PURE__ */ jsx(WorkspaceExecutionLibrary, {
|
|
494
518
|
modules,
|
|
@@ -536,98 +560,58 @@ function WorkbenchResult({ module, graph, busy, completed, errorMessage }) {
|
|
|
536
560
|
description: placeholder.description
|
|
537
561
|
});
|
|
538
562
|
}
|
|
539
|
-
function WorkbenchRunAction({ module, tableMode, busy, stopping, onStop }) {
|
|
563
|
+
function WorkbenchRunAction({ module, tableMode, busy, stopping, onStop, formId }) {
|
|
540
564
|
if (tableMode) return null;
|
|
541
|
-
if (module.trace?.status === "running" && module.onStop) return /* @__PURE__ */
|
|
542
|
-
|
|
543
|
-
"aria-label": "Stop run",
|
|
544
|
-
color: "neutral",
|
|
565
|
+
if (module.trace?.status === "running" && module.onStop) return /* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
566
|
+
label: "Stop run",
|
|
545
567
|
onClick: onStop,
|
|
546
568
|
disabled: stopping,
|
|
547
|
-
children:
|
|
569
|
+
children: stopping ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(StopIcon, {})
|
|
548
570
|
});
|
|
549
571
|
if (!module.onRun) return null;
|
|
550
|
-
return /* @__PURE__ */
|
|
572
|
+
return /* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
551
573
|
type: "submit",
|
|
552
|
-
|
|
574
|
+
form: formId,
|
|
575
|
+
label: `Run now: ${module.name}`,
|
|
553
576
|
disabled: busy,
|
|
554
|
-
children:
|
|
577
|
+
children: busy ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(PlayIcon, {})
|
|
555
578
|
});
|
|
556
579
|
}
|
|
557
|
-
function
|
|
558
|
-
return /* @__PURE__ */
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
})
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
color: "neutral",
|
|
575
|
-
onClick: module.onSchedule,
|
|
576
|
-
children: [/* @__PURE__ */ jsx(CalendarIcon, {}), "Schedule"]
|
|
577
|
-
}) : null,
|
|
578
|
-
module.onRunTable ? /* @__PURE__ */ jsxs(Button, {
|
|
579
|
-
type: "button",
|
|
580
|
-
size: "sm",
|
|
581
|
-
variant: "ghost",
|
|
582
|
-
color: "neutral",
|
|
580
|
+
function WorkbenchHeader({ module, onBack, tableMode, onToggleTable, busy, stopping, onStop, formId }) {
|
|
581
|
+
return /* @__PURE__ */ jsx(ResponsiveSidebarAppBar, {
|
|
582
|
+
label: "Workflow controls",
|
|
583
|
+
className: "workspace-execution-workbench__header",
|
|
584
|
+
title: module.name,
|
|
585
|
+
titleRender: (props) => /* @__PURE__ */ jsx("h2", {
|
|
586
|
+
...props,
|
|
587
|
+
children: props.children
|
|
588
|
+
}),
|
|
589
|
+
leading: onBack ? /* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
590
|
+
label: "Back to workflows",
|
|
591
|
+
onClick: onBack,
|
|
592
|
+
children: /* @__PURE__ */ jsx(ArrowLeftIcon, {})
|
|
593
|
+
}) : void 0,
|
|
594
|
+
actions: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
595
|
+
module.onRunTable ? /* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
596
|
+
label: tableMode ? "Single run" : "Run on a table",
|
|
583
597
|
disabled: busy || module.tableExecution?.status === "running",
|
|
584
598
|
onClick: onToggleTable,
|
|
585
|
-
children:
|
|
586
|
-
}) : null
|
|
587
|
-
]
|
|
588
|
-
});
|
|
589
|
-
}
|
|
590
|
-
function WorkbenchHeader({ module, graph, onBack, tableMode, onToggleTable, busy, stopping, onStop, errorMessage }) {
|
|
591
|
-
return /* @__PURE__ */ jsxs("header", {
|
|
592
|
-
className: "workspace-execution-workbench__header",
|
|
593
|
-
children: [
|
|
594
|
-
onBack ? /* @__PURE__ */ jsxs(Button, {
|
|
595
|
-
className: "workspace-execution-workbench__back",
|
|
596
|
-
type: "button",
|
|
597
|
-
size: "sm",
|
|
598
|
-
variant: "ghost",
|
|
599
|
-
color: "neutral",
|
|
600
|
-
"aria-label": "Back to workflows",
|
|
601
|
-
onClick: onBack,
|
|
602
|
-
children: [/* @__PURE__ */ jsx(ArrowLeftIcon, {}), "Workflows"]
|
|
599
|
+
children: /* @__PURE__ */ jsx(QueueIcon, {})
|
|
603
600
|
}) : null,
|
|
604
|
-
/* @__PURE__ */
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
color: "neutral",
|
|
611
|
-
children: /* @__PURE__ */ jsx(InfoIcon, {})
|
|
612
|
-
}) : null]
|
|
613
|
-
}),
|
|
614
|
-
/* @__PURE__ */ jsx(WorkflowApps, { graph }),
|
|
615
|
-
/* @__PURE__ */ jsx(WorkbenchActions, {
|
|
601
|
+
module.onSchedule && !tableMode ? /* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
602
|
+
label: `Schedule ${module.name}`,
|
|
603
|
+
onClick: module.onSchedule,
|
|
604
|
+
children: /* @__PURE__ */ jsx(CalendarIcon, {})
|
|
605
|
+
}) : null,
|
|
606
|
+
/* @__PURE__ */ jsx(WorkbenchRunAction, {
|
|
616
607
|
module,
|
|
617
608
|
tableMode,
|
|
618
|
-
onToggleTable,
|
|
619
609
|
busy,
|
|
620
610
|
stopping,
|
|
621
|
-
onStop
|
|
622
|
-
|
|
623
|
-
!tableMode && errorMessage ? /* @__PURE__ */ jsx(Field.Errors, { errors: [errorMessage] }) : null,
|
|
624
|
-
/* @__PURE__ */ jsx("span", {
|
|
625
|
-
className: "sigvelo-visually-hidden",
|
|
626
|
-
role: "status",
|
|
627
|
-
"aria-atomic": "true",
|
|
628
|
-
children: busy && module.trace?.status !== "running" ? "Starting run" : ""
|
|
611
|
+
onStop,
|
|
612
|
+
formId
|
|
629
613
|
})
|
|
630
|
-
]
|
|
614
|
+
] })
|
|
631
615
|
});
|
|
632
616
|
}
|
|
633
617
|
function WorkbenchSingleRun({ module, graph, draft, setDraft, tab, setTab, busy, completed, errorMessage, outcome }) {
|
|
@@ -705,7 +689,6 @@ function useWorkbenchTabs(trace, runStatus, busy) {
|
|
|
705
689
|
if (runStatus !== seenRunStatus) {
|
|
706
690
|
setSeenRunStatus(runStatus);
|
|
707
691
|
if (runStatus === "pending") setTab("steps");
|
|
708
|
-
else if (seenRunStatus === "pending" && runStatus === "success") setTab("results");
|
|
709
692
|
}
|
|
710
693
|
const [seenTrace, setSeenTrace] = React.useState(() => ({
|
|
711
694
|
executionId: trace?.executionId,
|
|
@@ -717,24 +700,33 @@ function useWorkbenchTabs(trace, runStatus, busy) {
|
|
|
717
700
|
status: trace?.status
|
|
718
701
|
});
|
|
719
702
|
if (trace?.status === "running") setTab("steps");
|
|
720
|
-
else if (trace?.status === "completed" && (seenTrace.executionId !== trace.executionId || seenTrace.status === "running")) setTab("results");
|
|
721
703
|
}
|
|
722
704
|
return [tab, setTab];
|
|
723
705
|
}
|
|
706
|
+
/** Each newly attached table run reopens table mode; the user can still leave it. */
|
|
707
|
+
function useTableMode(tableExecution) {
|
|
708
|
+
const [tableMode, setTableMode] = React.useState(Boolean(tableExecution));
|
|
709
|
+
const [seenTablePath, setSeenTablePath] = React.useState(tableExecution?.path);
|
|
710
|
+
if (tableExecution?.path !== seenTablePath) {
|
|
711
|
+
setSeenTablePath(tableExecution?.path);
|
|
712
|
+
if (tableExecution) setTableMode(true);
|
|
713
|
+
}
|
|
714
|
+
return [tableMode, setTableMode];
|
|
715
|
+
}
|
|
716
|
+
/** Keeps the last completed result inspectable while its replacement is running. */
|
|
717
|
+
function useVisibleCompleted(outcome, trace, busy) {
|
|
718
|
+
const completed = outcome ?? (trace?.status === "completed" ? trace : void 0);
|
|
719
|
+
const [lastCompleted, setLastCompleted] = React.useState(completed);
|
|
720
|
+
if (completed && completed !== lastCompleted) setLastCompleted(completed);
|
|
721
|
+
return busy ? lastCompleted : completed;
|
|
722
|
+
}
|
|
724
723
|
function WorkspaceExecutionWorkbench({ module, onBack, className, ref, ...props }) {
|
|
725
724
|
const { draft, setDraft, runMutation, stopMutation, busy, errorMessage, outcome, runStatus } = useExecutionSession(module);
|
|
725
|
+
const formId = React.useId();
|
|
726
726
|
const graph = module.trace?.graph ?? module.graph;
|
|
727
|
-
const [tableMode, setTableMode] =
|
|
728
|
-
const [seenTablePath, setSeenTablePath] = React.useState(module.tableExecution?.path);
|
|
729
|
-
if (module.tableExecution?.path !== seenTablePath) {
|
|
730
|
-
setSeenTablePath(module.tableExecution?.path);
|
|
731
|
-
if (module.tableExecution) setTableMode(true);
|
|
732
|
-
}
|
|
727
|
+
const [tableMode, setTableMode] = useTableMode(module.tableExecution);
|
|
733
728
|
const [tab, setTab] = useWorkbenchTabs(module.trace, runStatus, busy);
|
|
734
|
-
const
|
|
735
|
-
const [lastCompleted, setLastCompleted] = React.useState(completed);
|
|
736
|
-
if (completed && completed !== lastCompleted) setLastCompleted(completed);
|
|
737
|
-
const visibleCompleted = busy ? lastCompleted : completed;
|
|
729
|
+
const visibleCompleted = useVisibleCompleted(outcome, module.trace, busy);
|
|
738
730
|
const tableValues = new Map(collectRunParameters(module.parameters, draft).map(({ name, value }) => [name, value]));
|
|
739
731
|
return /* @__PURE__ */ jsx("section", {
|
|
740
732
|
...props,
|
|
@@ -743,6 +735,7 @@ function WorkspaceExecutionWorkbench({ module, onBack, className, ref, ...props
|
|
|
743
735
|
"data-slot": "workspace-executions-panel",
|
|
744
736
|
className: cx("workspace-execution-workbench", className),
|
|
745
737
|
children: /* @__PURE__ */ jsxs(Form, {
|
|
738
|
+
id: formId,
|
|
746
739
|
noValidate: true,
|
|
747
740
|
onSubmit: (event) => {
|
|
748
741
|
event.preventDefault();
|
|
@@ -752,44 +745,58 @@ function WorkspaceExecutionWorkbench({ module, onBack, className, ref, ...props
|
|
|
752
745
|
runMutation.mutate(collectRunParameters(module.parameters, draft));
|
|
753
746
|
}
|
|
754
747
|
},
|
|
755
|
-
children: [
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
})
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
748
|
+
children: [
|
|
749
|
+
/* @__PURE__ */ jsx(WorkbenchHeader, {
|
|
750
|
+
module,
|
|
751
|
+
formId,
|
|
752
|
+
onBack,
|
|
753
|
+
tableMode,
|
|
754
|
+
onToggleTable: () => setTableMode((current) => !current),
|
|
755
|
+
busy,
|
|
756
|
+
stopping: stopMutation.isPending,
|
|
757
|
+
onStop: () => stopMutation.mutate()
|
|
758
|
+
}),
|
|
759
|
+
module.description ? /* @__PURE__ */ jsx("p", {
|
|
760
|
+
className: "workspace-execution-workbench__description",
|
|
761
|
+
children: module.description
|
|
762
|
+
}) : null,
|
|
763
|
+
/* @__PURE__ */ jsx(WorkflowApps, { graph }),
|
|
764
|
+
!tableMode && errorMessage ? /* @__PURE__ */ jsx(Field.Errors, { errors: [errorMessage] }) : null,
|
|
765
|
+
/* @__PURE__ */ jsx("span", {
|
|
766
|
+
className: "sigvelo-visually-hidden",
|
|
767
|
+
role: "status",
|
|
768
|
+
"aria-atomic": "true",
|
|
769
|
+
children: busy && module.trace?.status !== "running" ? "Starting run" : ""
|
|
770
|
+
}),
|
|
771
|
+
tableMode ? /* @__PURE__ */ jsx(WorkspaceExecutionTable, {
|
|
772
|
+
path: module.path,
|
|
773
|
+
parameters: module.parameters.map((parameter) => ({
|
|
774
|
+
...parameter,
|
|
775
|
+
value: tableValues.get(parameter.name)
|
|
776
|
+
})),
|
|
777
|
+
execution: module.tableExecution,
|
|
778
|
+
trace: module.trace,
|
|
779
|
+
graph,
|
|
780
|
+
onLoadTable: module.onLoadTable,
|
|
781
|
+
onRequestTableSource: module.onRequestTableSource,
|
|
782
|
+
onPrepareTable: module.onPrepareTable,
|
|
783
|
+
onRunTable: module.onRunTable,
|
|
784
|
+
onStopTable: module.onStopTable,
|
|
785
|
+
onLoadTableTrace: module.onLoadTableTrace,
|
|
786
|
+
onScheduleTable: module.onScheduleTable
|
|
787
|
+
}) : /* @__PURE__ */ jsx(WorkbenchSingleRun, {
|
|
788
|
+
module,
|
|
789
|
+
graph,
|
|
790
|
+
draft,
|
|
791
|
+
setDraft,
|
|
792
|
+
tab,
|
|
793
|
+
setTab,
|
|
794
|
+
busy,
|
|
795
|
+
completed: visibleCompleted,
|
|
796
|
+
errorMessage,
|
|
797
|
+
outcome
|
|
798
|
+
})
|
|
799
|
+
]
|
|
793
800
|
})
|
|
794
801
|
});
|
|
795
802
|
}
|