@mcp-b/react-components 0.58.1 → 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.
Files changed (103) hide show
  1. package/dist/{EmployeeChrome-DsdIek0l.d.ts → EmployeeChrome-QSki0QT4.d.ts} +4 -4
  2. package/dist/{ResponsiveSidebarShell-DoZlSP30.d.ts → ResponsiveSidebarShell-DzBGlRJF.d.ts} +23 -8
  3. package/dist/{ThinkChatActivity-BkGjTY4r.d.ts → ThinkChatActivity-C4_hPEmb.d.ts} +20 -4
  4. package/dist/{ThinkChatActivitySummary-DZVy3uQV.d.ts → ThinkChatActivitySummary-ChJ8Iu2T.d.ts} +3 -3
  5. package/dist/{ThinkChatToolParts-BucHi63O.d.ts → ThinkChatToolParts-BrntWlpa.d.ts} +29 -3
  6. package/dist/{WorkspaceConceptPanel-97ZyVpZI.js → WorkspaceConceptPanel-D21iRsWm.js} +7 -4
  7. package/dist/{WorkspaceFileView-M2jC2P4p.js → WorkspaceFileView-CsWwQA1U.js} +80 -74
  8. package/dist/app-bar-outlet-CNfNzY4Y.js +6 -0
  9. package/dist/components/agents-sdk/AgentChat.js +1 -1
  10. package/dist/components/agents-sdk/BrowserLiveScreen.js +49 -11
  11. package/dist/components/agents-sdk/EmployeeApp.d.ts +2 -3
  12. package/dist/components/agents-sdk/EmployeeApp.js +5 -5
  13. package/dist/components/agents-sdk/EmployeeChat.js +1 -1
  14. package/dist/components/agents-sdk/EmployeeChrome.d.ts +1 -1
  15. package/dist/components/agents-sdk/EmployeeChrome.js +217 -205
  16. package/dist/components/agents-sdk/EmployeeSchedules.d.ts +1 -1
  17. package/dist/components/agents-sdk/EmployeeSchedules.js +8 -8
  18. package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +1 -1
  19. package/dist/components/agents-sdk/EmployeeStartScreen.js +2 -2
  20. package/dist/components/agents-sdk/ManagerAccountActions.js +1 -1
  21. package/dist/components/agents-sdk/ManagerOffice.js +1 -1
  22. package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +1 -1
  23. package/dist/components/agents-sdk/ManagerOfficeScreens.js +6 -19
  24. package/dist/components/agents-sdk/McpPluginCatalog.js +1 -1
  25. package/dist/components/agents-sdk/ModelEndpointDialog.js +1 -1
  26. package/dist/components/agents-sdk/ModelSelector.js +1 -1
  27. package/dist/components/agents-sdk/SubagentRunPanel.d.ts +8 -9
  28. package/dist/components/agents-sdk/SubagentRunPanel.js +133 -122
  29. package/dist/components/agents-sdk/ThinkChat.d.ts +1 -1
  30. package/dist/components/agents-sdk/ThinkChat.js +26 -3
  31. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
  32. package/dist/components/agents-sdk/ThinkChatActivity.js +108 -108
  33. package/dist/components/agents-sdk/ThinkChatActivitySummary.d.ts +1 -1
  34. package/dist/components/agents-sdk/ThinkChatActivitySummary.js +183 -40
  35. package/dist/components/agents-sdk/ThinkChatToolPanels.d.ts +8 -4
  36. package/dist/components/agents-sdk/ThinkChatToolPanels.js +308 -62
  37. package/dist/components/agents-sdk/ThinkChatToolParts.d.ts +2 -2
  38. package/dist/components/agents-sdk/ThinkChatToolParts.js +71 -1
  39. package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +3 -4
  40. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +5 -5
  41. package/dist/components/agents-sdk/ThinkFullApp.d.ts +1 -1
  42. package/dist/components/agents-sdk/ThinkFullApp.js +6 -1
  43. package/dist/components/agents-sdk/ThinkRoutineActions.js +15 -23
  44. package/dist/components/agents-sdk/ThinkRoutineDetail.js +1 -1
  45. package/dist/components/agents-sdk/ThinkRoutineForm.js +5 -5
  46. package/dist/components/agents-sdk/ThinkThreadPicker.js +2 -2
  47. package/dist/components/agents-sdk/WorkspaceExecution.js +139 -132
  48. package/dist/components/agents-sdk/WorkspaceExecutionTable.js +2 -2
  49. package/dist/components/agents-sdk/WorkspaceExplorer.js +2 -2
  50. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  51. package/dist/components/agents-sdk/WorkspaceHeader.js +26 -28
  52. package/dist/components/agents-sdk/WorkspaceProject.js +1 -1
  53. package/dist/components/agents-sdk/WorkspaceUserScript.js +2 -2
  54. package/dist/components/ai-sdk/Activity.d.ts +1 -1
  55. package/dist/components/ai-sdk/Activity.js +84 -6
  56. package/dist/components/ai-sdk/AgentChatMessageEditor.js +1 -1
  57. package/dist/components/ai-sdk/Approval.js +2 -1
  58. package/dist/components/ai-sdk/ComposerLink.js +1 -1
  59. package/dist/components/ai-sdk/ConnectedAppCards.js +63 -45
  60. package/dist/components/ai-sdk/Conversation.js +1 -1
  61. package/dist/components/ai-sdk/ExpansionState.d.ts +16 -6
  62. package/dist/components/ai-sdk/ExpansionState.js +25 -7
  63. package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
  64. package/dist/components/ai-sdk/MessageScrollerVirtual.js +98 -11
  65. package/dist/components/ai-sdk/PromptInput.js +7 -3
  66. package/dist/components/ai-sdk/PromptInputComposerEditor.js +2 -2
  67. package/dist/components/ai-sdk/Queue.js +1 -1
  68. package/dist/components/ai-sdk/ToolInvocation.d.ts +8 -0
  69. package/dist/components/ai-sdk/ToolInvocation.js +45 -19
  70. package/dist/components/foundations/ToggleGroup.d.ts +1 -1
  71. package/dist/components/foundations/ToggleGroup.js +2 -2
  72. package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
  73. package/dist/components/general-purpose/PricingUsageCalculator.js +1 -1
  74. package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +2 -2
  75. package/dist/components/general-purpose/ResponsiveSidebarShell.js +162 -87
  76. package/dist/components/general-purpose/Terminal.js +1 -1
  77. package/dist/components/general-purpose/ThemeModeControl.js +1 -1
  78. package/dist/components/general-purpose/WebPreview.js +1 -1
  79. package/dist/components/nanites/AgentToolDetail.d.ts +1 -3
  80. package/dist/components/nanites/AgentToolDetail.js +31 -40
  81. package/dist/merge-refs-DAh6reu8.js +26 -0
  82. package/dist/styles/activity.css +74 -0
  83. package/dist/styles/agent-chat.css +7 -0
  84. package/dist/styles/agent-tool-detail.css +2 -17
  85. package/dist/styles/app-top-bar.css +6 -7
  86. package/dist/styles/base.css +1 -1
  87. package/dist/styles/employee-chrome.css +0 -7
  88. package/dist/styles/message.css +1 -1
  89. package/dist/styles/responsive-sidebar-shell.css +10 -25
  90. package/dist/styles/scroll-area.css +16 -0
  91. package/dist/styles/scrollbars.css +55 -41
  92. package/dist/styles/search-field.css +0 -1
  93. package/dist/styles/subagent-run.css +36 -196
  94. package/dist/styles/think-chat-tool-panels.css +38 -5
  95. package/dist/styles/think-execution-workbench.css +4 -0
  96. package/dist/styles/think-full-app.css +1 -6
  97. package/dist/styles/workspace-concepts.css +6 -39
  98. package/dist/styles/workspace-explorer.css +4 -11
  99. package/package.json +2 -2
  100. package/dist/components/agents-sdk/SubagentRunDetails.d.ts +0 -40
  101. package/dist/components/agents-sdk/SubagentRunDetails.js +0 -98
  102. package/dist/merge-refs-DF_7w2x_.js +0 -18
  103. package/dist/{ManagerOffice-C8AQcaXs.js → ManagerOffice-DHcLRhFu.js} +2 -2
@@ -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 ? element : null;
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,11 +1,9 @@
1
1
  import { $ as TrashIcon, K as SpinnerIcon, z as PlayIcon } from "../../icons-DvlrWt54.js";
2
- import { Button, buttonVariants } from "../foundations/Button.js";
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-DF_7w2x_.js";
6
- import { Toolbar } from "../foundations/Toolbar.js";
7
- import { AppTopBar } from "../general-purpose/AppTopBar.js";
4
+ import { n as mergeRefs } from "../../merge-refs-DAh6reu8.js";
8
5
  import { AlertDialog } from "../foundations/AlertDialog.js";
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";
11
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -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__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, {
105
- render: /* @__PURE__ */ jsx(Toolbar.Button, {
106
- ...mergeProps({
107
- unstyled: true,
108
- className: buttonVariants({ size: "sm" }),
109
- onClick: () => {
110
- run();
111
- }
112
- }, props),
113
- "aria-label": label,
114
- disabled: busy || props.disabled
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,8 +1,8 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
2
  import { DescriptionList } from "../foundations/DescriptionList.js";
3
+ import { Switch } from "../foundations/Switch.js";
3
4
  import { t as ExecutionResult } from "../../ExecutionResult-BSZsUbrL.js";
4
5
  import { getThinkRoutineNextRun } from "./ThinkRoutine.js";
5
- import { Switch } from "../foundations/Switch.js";
6
6
  import { ThinkRoutineRuns } from "./ThinkRoutineRuns.js";
7
7
  import * as React from "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -7,15 +7,15 @@ import { Textarea } from "../foundations/Textarea.js";
7
7
  import { IconButton } from "../foundations/IconButton.js";
8
8
  import { a as formatErrorMessage } from "../../format-CWaZEp5o.js";
9
9
  import { Select } from "../foundations/Select.js";
10
- import { AppTopBar } from "../general-purpose/AppTopBar.js";
11
- import { Fieldset } from "../foundations/Fieldset.js";
12
- import { t as executionErrorSummary } from "../../execution-result-DWVmm-bL.js";
13
- import { a as httpUrl, t as FaviconMark } from "../../workspace-assets-DVn0d-fN.js";
14
- import { t as ExecutionResult } from "../../ExecutionResult-BSZsUbrL.js";
15
10
  import { Checkbox } from "../foundations/Checkbox.js";
16
11
  import { CheckboxGroup } from "../foundations/CheckboxGroup.js";
17
12
  import { Combobox } from "../foundations/Combobox.js";
13
+ import { Fieldset } from "../foundations/Fieldset.js";
18
14
  import { NumberField } from "../foundations/NumberField.js";
15
+ import { AppTopBar } from "../general-purpose/AppTopBar.js";
16
+ import { t as executionErrorSummary } from "../../execution-result-DWVmm-bL.js";
17
+ import { a as httpUrl, t as FaviconMark } from "../../workspace-assets-DVn0d-fN.js";
18
+ import { t as ExecutionResult } from "../../ExecutionResult-BSZsUbrL.js";
19
19
  import * as React from "react";
20
20
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
21
21
  //#region src/components/agents-sdk/ThinkRoutineForm.tsx
@@ -1,12 +1,12 @@
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
- import { EmptyState } from "../foundations/EmptyState.js";
9
8
  import { AlertDialog } from "../foundations/AlertDialog.js";
9
+ import { EmptyState } from "../foundations/EmptyState.js";
10
10
  import { LinkButton } from "../foundations/LinkButton.js";
11
11
  import { SearchField } from "../foundations/SearchField.js";
12
12
  import * as React from "react";
@@ -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";
13
+ import { Checkbox } from "../foundations/Checkbox.js";
12
14
  import { EmptyState } from "../foundations/EmptyState.js";
15
+ import { AppTopBar } from "../general-purpose/AppTopBar.js";
16
+ import { ResponsiveSidebarAppBar } from "../general-purpose/ResponsiveSidebarShell.js";
13
17
  import { i as executionResultSummary, t as executionErrorSummary } from "../../execution-result-DWVmm-bL.js";
14
18
  import { a as httpUrl, i as WorkspaceComposerLink, n as Hint, t as FaviconMark } from "../../workspace-assets-DVn0d-fN.js";
15
19
  import { t as ExecutionResult } from "../../ExecutionResult-BSZsUbrL.js";
16
20
  import { ExecutionBoard } from "./ExecutionBoard.js";
17
- import { Checkbox } from "../foundations/Checkbox.js";
18
21
  import { t as WorkspaceDeleteControl } from "../../workspace-delete-DfloiBWp.js";
19
- import { t as WorkspaceConceptPanel } from "../../WorkspaceConceptPanel-97ZyVpZI.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
- if (selected) return /* @__PURE__ */ createElement(WorkspaceExecutionWorkbench, {
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
- key: `${JSON.stringify(source.queryOptions.queryKey)}:${selectedPath ?? selected.path}`,
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
- ...props,
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__ */ jsxs(Button, {
542
- type: "button",
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: [stopping ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(StopIcon, {}), stopping ? "Stopping…" : "Stop"]
569
+ children: stopping ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(StopIcon, {})
548
570
  });
549
571
  if (!module.onRun) return null;
550
- return /* @__PURE__ */ jsxs(Button, {
572
+ return /* @__PURE__ */ jsx(AppTopBar.Button, {
551
573
  type: "submit",
552
- "aria-label": `Run now: ${module.name}`,
574
+ form: formId,
575
+ label: `Run now: ${module.name}`,
553
576
  disabled: busy,
554
- children: [busy ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(PlayIcon, {}), busy ? "Running…" : "Run"]
577
+ children: busy ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(PlayIcon, {})
555
578
  });
556
579
  }
557
- function WorkbenchActions({ module, tableMode, onToggleTable, busy, stopping, onStop }) {
558
- return /* @__PURE__ */ jsxs("div", {
559
- className: "workspace-execution-workbench__actions",
560
- role: "toolbar",
561
- "aria-label": "Workflow controls",
562
- children: [
563
- /* @__PURE__ */ jsx(WorkbenchRunAction, {
564
- module,
565
- tableMode,
566
- busy,
567
- stopping,
568
- onStop
569
- }),
570
- module.onSchedule && !tableMode ? /* @__PURE__ */ jsxs(Button, {
571
- type: "button",
572
- "aria-label": `Schedule ${module.name}`,
573
- variant: "outline",
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: [/* @__PURE__ */ jsx(QueueIcon, {}), tableMode ? "Single run" : "Run on a table"]
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__ */ jsxs("div", {
605
- className: "workspace-execution-workbench__heading",
606
- children: [/* @__PURE__ */ jsx("h2", { children: module.name }), module.description ? /* @__PURE__ */ jsx(IconButton, {
607
- label: `About ${module.name}`,
608
- tooltip: module.description,
609
- variant: "ghost",
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] = React.useState(Boolean(module.tableExecution));
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 completed = outcome ?? (module.trace?.status === "completed" ? module.trace : void 0);
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: [/* @__PURE__ */ jsx(WorkbenchHeader, {
756
- module,
757
- graph,
758
- onBack,
759
- tableMode,
760
- onToggleTable: () => setTableMode((current) => !current),
761
- busy,
762
- stopping: stopMutation.isPending,
763
- onStop: () => stopMutation.mutate(),
764
- errorMessage
765
- }), tableMode ? /* @__PURE__ */ jsx(WorkspaceExecutionTable, {
766
- path: module.path,
767
- parameters: module.parameters.map((parameter) => ({
768
- ...parameter,
769
- value: tableValues.get(parameter.name)
770
- })),
771
- execution: module.tableExecution,
772
- trace: module.trace,
773
- graph,
774
- onLoadTable: module.onLoadTable,
775
- onRequestTableSource: module.onRequestTableSource,
776
- onPrepareTable: module.onPrepareTable,
777
- onRunTable: module.onRunTable,
778
- onStopTable: module.onStopTable,
779
- onLoadTableTrace: module.onLoadTableTrace,
780
- onScheduleTable: module.onScheduleTable
781
- }) : /* @__PURE__ */ jsx(WorkbenchSingleRun, {
782
- module,
783
- graph,
784
- draft,
785
- setDraft,
786
- tab,
787
- setTab,
788
- busy,
789
- completed: visibleCompleted,
790
- errorMessage,
791
- outcome
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
  }
@@ -6,12 +6,12 @@ import { Textarea } from "../foundations/Textarea.js";
6
6
  import { IconButton } from "../foundations/IconButton.js";
7
7
  import { a as formatErrorMessage } from "../../format-CWaZEp5o.js";
8
8
  import { Select } from "../foundations/Select.js";
9
+ import { Checkbox } from "../foundations/Checkbox.js";
10
+ import { Progress } from "../foundations/Progress.js";
9
11
  import { a as readExecutionResult, i as executionResultSummary, t as executionErrorSummary } from "../../execution-result-DWVmm-bL.js";
10
12
  import { a as httpUrl, r as WebsiteLink, t as FaviconMark } from "../../workspace-assets-DVn0d-fN.js";
11
13
  import { n as executionResultLabel, t as ExecutionResult } from "../../ExecutionResult-BSZsUbrL.js";
12
14
  import { ExecutionBoard } from "./ExecutionBoard.js";
13
- import { Checkbox } from "../foundations/Checkbox.js";
14
- import { Progress } from "../foundations/Progress.js";
15
15
  import * as React from "react";
16
16
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
17
17
  import { useMutation, useQuery } from "@tanstack/react-query";
@@ -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-DF_7w2x_.js";
3
+ import { n as mergeRefs } from "../../merge-refs-DAh6reu8.js";
4
4
  import { AppTopBar } from "../general-purpose/AppTopBar.js";
5
5
  import { WorkspaceMountManager } from "./WorkspaceMountManager.js";
6
6
  import { n as WorkspaceNavigationProvider, r as resolveWorkspaceLink } from "../../WorkspaceLink-BeFAXpbI.js";
7
7
  import { WorkspaceNavigationRestorationBoundary, useRequiredWorkspaceNavigationRestoration } from "./WorkspaceNavigationRestoration.js";
8
8
  import { WorkspaceBrowser } from "./WorkspaceBrowser.js";
9
- import { t as WorkspaceFileView } from "../../WorkspaceFileView-M2jC2P4p.js";
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-M2jC2P4p.js";
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__ */ jsxs(AppTopBar.Root, {
9
+ return /* @__PURE__ */ jsx(ResponsiveSidebarAppBar, {
9
10
  className: "workspace-explorer__header",
10
- titleAlign: "start",
11
- "aria-label": "Workspace controls",
12
- children: [
13
- /* @__PURE__ */ jsx(AppTopBar.Leading, { children: leading }),
14
- /* @__PURE__ */ jsx(AppTopBar.Title, {
15
- className: "workspace-explorer__heading",
16
- title: path,
17
- children: path ? /* @__PURE__ */ jsx("span", {
18
- className: "workspace-explorer__path",
19
- "data-workspace-file-heading": "",
20
- children: path
21
- }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", { children: title }), fileCount !== void 0 ? /* @__PURE__ */ jsxs("span", {
22
- className: "workspace-explorer__count",
23
- children: [fileCount.toLocaleString(), " files"]
24
- }) : null] })
25
- }),
26
- /* @__PURE__ */ jsxs(AppTopBar.Trailing, { children: [
27
- actions,
28
- copyAction,
29
- /* @__PURE__ */ jsx(AppTopBar.Button, {
30
- label: "Refresh workspace",
31
- onClick: onRefresh,
32
- disabled: isRefreshing,
33
- children: /* @__PURE__ */ jsx(RefreshIcon, { "aria-hidden": "true" })
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-97ZyVpZI.js";
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";
@@ -4,10 +4,10 @@ import { IconButton } from "../foundations/IconButton.js";
4
4
  import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "../foundations/Card.js";
5
5
  import { DescriptionList } from "../foundations/DescriptionList.js";
6
6
  import { EmptyState } from "../foundations/EmptyState.js";
7
- import { i as WorkspaceComposerLink, t as FaviconMark } from "../../workspace-assets-DVn0d-fN.js";
8
7
  import { Switch } from "../foundations/Switch.js";
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-97ZyVpZI.js";
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 panel for tool output inside an ActivityItemGroup. */
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;