@mcp-b/react-components 0.58.0 → 0.59.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/{EmployeeChrome-DsdIek0l.d.ts → EmployeeChrome-QSki0QT4.d.ts} +4 -4
- package/dist/{ResponsiveSidebarShell-DoZlSP30.d.ts → ResponsiveSidebarShell-DzBGlRJF.d.ts} +23 -8
- 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-CsWwQA1U.js} +80 -74
- package/dist/app-bar-outlet-CNfNzY4Y.js +6 -0
- package/dist/components/agents-sdk/AgentEvent.js +2 -2
- package/dist/components/agents-sdk/BrowserLiveScreen.js +49 -11
- package/dist/components/agents-sdk/EmployeeApp.d.ts +2 -3
- package/dist/components/agents-sdk/EmployeeApp.js +4 -4
- package/dist/components/agents-sdk/EmployeeChat.js +1 -1
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeChrome.js +213 -201
- package/dist/components/agents-sdk/EmployeeSchedules.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeSchedules.js +6 -6
- package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.js +5 -18
- package/dist/components/agents-sdk/ModelSelector.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/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 +308 -62
- package/dist/components/agents-sdk/ThinkChatToolParts.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkChatToolParts.js +71 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +3 -4
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +5 -5
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkFullApp.js +6 -1
- package/dist/components/agents-sdk/ThinkRoutineActions.js +14 -22
- package/dist/components/agents-sdk/ThinkThreadPicker.js +1 -1
- package/dist/components/agents-sdk/WorkspaceExecution.js +138 -131
- 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 +26 -28
- package/dist/components/agents-sdk/WorkspaceProject.js +1 -1
- package/dist/components/agents-sdk/WorkspaceUserScript.js +1 -1
- package/dist/components/ai-sdk/Activity.d.ts +1 -1
- package/dist/components/ai-sdk/Activity.js +84 -6
- package/dist/components/ai-sdk/AgentChatMessageEditor.js +1 -1
- package/dist/components/ai-sdk/Approval.js +2 -1
- package/dist/components/ai-sdk/ComposerLink.js +1 -1
- package/dist/components/ai-sdk/ConnectedAppCards.js +63 -45
- package/dist/components/ai-sdk/Conversation.js +1 -1
- package/dist/components/ai-sdk/ExpansionState.d.ts +16 -6
- package/dist/components/ai-sdk/ExpansionState.js +25 -7
- package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +98 -11
- package/dist/components/ai-sdk/PromptInput.js +7 -3
- package/dist/components/ai-sdk/PromptInputComposerEditor.js +2 -2
- package/dist/components/ai-sdk/Queue.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/foundations/ToggleGroup.js +1 -1
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +2 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +162 -87
- package/dist/components/general-purpose/Terminal.js +1 -1
- package/dist/components/general-purpose/WebPreview.js +1 -1
- package/dist/components/nanites/AgentToolDetail.d.ts +1 -3
- package/dist/components/nanites/AgentToolDetail.js +30 -39
- package/dist/merge-refs-DAh6reu8.js +26 -0
- package/dist/styles/activity.css +74 -0
- package/dist/styles/agent-chat.css +7 -0
- 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-scroller.css +8 -0
- 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/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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { n as mergeBaseClassName, t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { ResizableSidePanel } from "../general-purpose/ResizableSidePanel.js";
|
|
3
|
+
import { n as ShellAppBarOutletContext, t as ContentAppBarOutletContext } from "../../app-bar-outlet-CNfNzY4Y.js";
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
import { useRender } from "@base-ui/react/use-render";
|
|
@@ -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,10 +1,8 @@
|
|
|
1
1
|
import { $ as TrashIcon, K as SpinnerIcon, z as PlayIcon } from "../../icons-DvlrWt54.js";
|
|
2
|
-
import { Button
|
|
3
|
-
import { Tooltip } from "../foundations/Tooltip.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-
|
|
4
|
+
import { n as mergeRefs } from "../../merge-refs-DAh6reu8.js";
|
|
6
5
|
import { AlertDialog } from "../foundations/AlertDialog.js";
|
|
7
|
-
import { Toolbar } from "../foundations/Toolbar.js";
|
|
8
6
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
9
7
|
import { t as executionErrorSummary } from "../../execution-result-DWVmm-bL.js";
|
|
10
8
|
import * as React from "react";
|
|
@@ -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 { ScrollArea } from "../foundations/ScrollArea.js";
|
|
2
3
|
import { K as SpinnerIcon, R as PencilIcon, t as ArchiveIcon, tt as WarningIcon } from "../../icons-DvlrWt54.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
7
|
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
7
|
-
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
8
8
|
import { AlertDialog } from "../foundations/AlertDialog.js";
|
|
9
9
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
10
10
|
import { LinkButton } from "../foundations/LinkButton.js";
|
|
@@ -6,17 +6,20 @@ import { Form } from "../foundations/Form.js";
|
|
|
6
6
|
import { Tabs } from "../foundations/Tabs.js";
|
|
7
7
|
import { IconButton } from "../foundations/IconButton.js";
|
|
8
8
|
import { a as formatErrorMessage, r as firstLine } from "../../format-CWaZEp5o.js";
|
|
9
|
+
import { n as mergeRefs } from "../../merge-refs-DAh6reu8.js";
|
|
9
10
|
import { Card, CardAction, CardContent, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
10
11
|
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
11
12
|
import { Input } from "../foundations/Input.js";
|
|
12
13
|
import { Checkbox } from "../foundations/Checkbox.js";
|
|
13
14
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
15
|
+
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
16
|
+
import { ResponsiveSidebarAppBar } from "../general-purpose/ResponsiveSidebarShell.js";
|
|
14
17
|
import { i as executionResultSummary, t as executionErrorSummary } from "../../execution-result-DWVmm-bL.js";
|
|
15
18
|
import { a as httpUrl, i as WorkspaceComposerLink, n as Hint, t as FaviconMark } from "../../workspace-assets-DVn0d-fN.js";
|
|
16
19
|
import { t as ExecutionResult } from "../../ExecutionResult-BSZsUbrL.js";
|
|
17
20
|
import { ExecutionBoard } from "./ExecutionBoard.js";
|
|
18
21
|
import { t as WorkspaceDeleteControl } from "../../workspace-delete-DfloiBWp.js";
|
|
19
|
-
import { t as WorkspaceConceptPanel } from "../../WorkspaceConceptPanel-
|
|
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
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { C as FolderIcon } from "../../icons-DvlrWt54.js";
|
|
3
|
-
import { n as mergeRefs } from "../../merge-refs-
|
|
3
|
+
import { n as mergeRefs } from "../../merge-refs-DAh6reu8.js";
|
|
4
4
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
5
|
+
import { WorkspaceMountManager } from "./WorkspaceMountManager.js";
|
|
5
6
|
import { n as WorkspaceNavigationProvider, r as resolveWorkspaceLink } from "../../WorkspaceLink-BeFAXpbI.js";
|
|
6
7
|
import { WorkspaceNavigationRestorationBoundary, useRequiredWorkspaceNavigationRestoration } from "./WorkspaceNavigationRestoration.js";
|
|
7
|
-
import { WorkspaceMountManager } from "./WorkspaceMountManager.js";
|
|
8
8
|
import { WorkspaceBrowser } from "./WorkspaceBrowser.js";
|
|
9
|
-
import { t as WorkspaceFileView } from "../../WorkspaceFileView-
|
|
9
|
+
import { t as WorkspaceFileView } from "../../WorkspaceFileView-CsWwQA1U.js";
|
|
10
10
|
import * as React from "react";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region src/components/agents-sdk/WorkspaceExplorer.tsx
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as WorkspaceFileView } from "../../WorkspaceFileView-
|
|
1
|
+
import { t as WorkspaceFileView } from "../../WorkspaceFileView-CsWwQA1U.js";
|
|
2
2
|
export { WorkspaceFileView };
|
|
@@ -1,39 +1,37 @@
|
|
|
1
1
|
import { H as RefreshIcon } from "../../icons-DvlrWt54.js";
|
|
2
2
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
3
|
+
import { ResponsiveSidebarAppBar } from "../general-purpose/ResponsiveSidebarShell.js";
|
|
3
4
|
import "react";
|
|
4
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/agents-sdk/WorkspaceHeader.tsx
|
|
6
7
|
/** Shared workspace app bar for browser and file-preview surfaces. */
|
|
7
8
|
function WorkspaceHeader({ title, fileCount, path, leading, actions, copyAction, isRefreshing, onRefresh }) {
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ jsx(ResponsiveSidebarAppBar, {
|
|
9
10
|
className: "workspace-explorer__header",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
})
|
|
35
|
-
] })
|
|
36
|
-
]
|
|
11
|
+
label: "Workspace controls",
|
|
12
|
+
leading,
|
|
13
|
+
title: /* @__PURE__ */ jsx("span", {
|
|
14
|
+
className: "workspace-explorer__heading",
|
|
15
|
+
title: path,
|
|
16
|
+
children: path ? /* @__PURE__ */ jsx("span", {
|
|
17
|
+
className: "workspace-explorer__path",
|
|
18
|
+
"data-workspace-file-heading": "",
|
|
19
|
+
children: path
|
|
20
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", { children: title }), fileCount !== void 0 ? /* @__PURE__ */ jsxs("span", {
|
|
21
|
+
className: "workspace-explorer__count",
|
|
22
|
+
children: [fileCount.toLocaleString(), " files"]
|
|
23
|
+
}) : null] })
|
|
24
|
+
}),
|
|
25
|
+
actions: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26
|
+
actions,
|
|
27
|
+
copyAction,
|
|
28
|
+
/* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
29
|
+
label: "Refresh workspace",
|
|
30
|
+
onClick: onRefresh,
|
|
31
|
+
disabled: isRefreshing,
|
|
32
|
+
children: /* @__PURE__ */ jsx(RefreshIcon, { "aria-hidden": "true" })
|
|
33
|
+
})
|
|
34
|
+
] })
|
|
37
35
|
});
|
|
38
36
|
}
|
|
39
37
|
//#endregion
|
|
@@ -9,7 +9,7 @@ import { EmptyState } from "../foundations/EmptyState.js";
|
|
|
9
9
|
import { LinkButton } from "../foundations/LinkButton.js";
|
|
10
10
|
import { i as WorkspaceComposerLink, t as FaviconMark } from "../../workspace-assets-DVn0d-fN.js";
|
|
11
11
|
import { t as WorkspaceDeleteControl } from "../../workspace-delete-DfloiBWp.js";
|
|
12
|
-
import { t as WorkspaceConceptPanel } from "../../WorkspaceConceptPanel-
|
|
12
|
+
import { t as WorkspaceConceptPanel } from "../../WorkspaceConceptPanel-D21iRsWm.js";
|
|
13
13
|
import * as React from "react";
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
import { useQuery } from "@tanstack/react-query";
|
|
@@ -7,7 +7,7 @@ import { EmptyState } from "../foundations/EmptyState.js";
|
|
|
7
7
|
import { Switch } from "../foundations/Switch.js";
|
|
8
8
|
import { i as WorkspaceComposerLink, t as FaviconMark } from "../../workspace-assets-DVn0d-fN.js";
|
|
9
9
|
import { t as WorkspaceDeleteControl } from "../../workspace-delete-DfloiBWp.js";
|
|
10
|
-
import { t as WorkspaceConceptPanel } from "../../WorkspaceConceptPanel-
|
|
10
|
+
import { t as WorkspaceConceptPanel } from "../../WorkspaceConceptPanel-D21iRsWm.js";
|
|
11
11
|
import * as React from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/agents-sdk/WorkspaceUserScript.tsx
|
|
@@ -128,7 +128,7 @@ export interface ActivityPanelProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
128
128
|
status?: React.ReactNode;
|
|
129
129
|
error?: boolean;
|
|
130
130
|
}
|
|
131
|
-
/** Quiet detail
|
|
131
|
+
/** Quiet tool detail with a bounded, fading scroll body and a persistent label/status. */
|
|
132
132
|
export declare function ActivityPanel({ className, label, text, status, error, children, ref, ...props }: ActivityPanelProps & {
|
|
133
133
|
ref?: React.Ref<HTMLDivElement>;
|
|
134
134
|
}): React.JSX.Element;
|