@mcp-b/react-components 0.40.0 → 0.41.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 (196) hide show
  1. package/dist/{AgentChat-CVO7xyLC.d.ts → AgentChat-DVr2giwD.d.ts} +1 -1
  2. package/dist/{AgentToolRunsContext-BCVqCtJ1.d.ts → AgentToolRunsContext-daY67hFM.d.ts} +12 -0
  3. package/dist/AppTopBar-ZdgmB_Lu.d.ts +97 -0
  4. package/dist/{CodeBlock-CWk1FVtm.js → CodeBlock-BjELA-_s.js} +1 -1
  5. package/dist/{FileTree-xqHYBw4g.js → FileTree-DMYRdT6R.js} +1 -1
  6. package/dist/McpConnectorForm-MRm1r59e.d.ts +39 -0
  7. package/dist/{Message-DBsHHhcM.d.ts → Message-D_vCVEGB.d.ts} +20 -1
  8. package/dist/{ThinkChatActivity-D6-_5Phw.d.ts → ThinkChatActivity-DyGHj01E.d.ts} +1 -1
  9. package/dist/{ThinkExecutionRun-lYYgyeE1.d.ts → ThinkExecutionRun-k8bpyXqt.d.ts} +3 -3
  10. package/dist/{ToggleGroup-_pQMyHGM.d.ts → ToggleGroup-BrQZOQn_.d.ts} +1 -1
  11. package/dist/Toolbar-CBOseBQr.d.ts +152 -0
  12. package/dist/{WorkspaceFileView-Lab3om3F.js → WorkspaceFileView-D0yFwoDr.js} +2 -2
  13. package/dist/{WorkspaceMessageResponse-Cy28WGSz.d.ts → WorkspaceMessageResponse-D66ty4FO.d.ts} +1 -1
  14. package/dist/components/agents-sdk/AgentActivity.js +1 -1
  15. package/dist/components/agents-sdk/AgentChat.d.ts +1 -1
  16. package/dist/components/agents-sdk/AgentChat.js +41 -18
  17. package/dist/components/agents-sdk/AgentToolRunsContext.d.ts +1 -1
  18. package/dist/components/agents-sdk/AgentToolRunsContext.js +12 -0
  19. package/dist/components/agents-sdk/BrowserLiveScreen.d.ts +135 -0
  20. package/dist/components/agents-sdk/BrowserLiveScreen.js +637 -0
  21. package/dist/components/agents-sdk/BrowserLiveView.d.ts +2 -2
  22. package/dist/components/agents-sdk/BrowserLiveView.js +6 -9
  23. package/dist/components/agents-sdk/BrowserReplay.js +1 -1
  24. package/dist/components/agents-sdk/BrowserRunPanel.d.ts +1 -1
  25. package/dist/components/agents-sdk/BrowserRunPanel.js +6 -12
  26. package/dist/components/agents-sdk/ManagerOffice.d.ts +156 -0
  27. package/dist/components/agents-sdk/ManagerOffice.js +662 -0
  28. package/dist/components/agents-sdk/McpConnectionRequest.js +3 -3
  29. package/dist/components/agents-sdk/McpConnectorForm.d.ts +1 -38
  30. package/dist/components/agents-sdk/McpPluginCatalog.d.ts +8 -2
  31. package/dist/components/agents-sdk/McpPluginCatalog.js +80 -62
  32. package/dist/components/agents-sdk/McpServerPicker.d.ts +1 -1
  33. package/dist/components/agents-sdk/McpServerPicker.js +2 -2
  34. package/dist/components/agents-sdk/ModelSelector.js +2 -2
  35. package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
  36. package/dist/components/agents-sdk/SubagentRunDetails.d.ts +1 -9
  37. package/dist/components/agents-sdk/SubagentRunDetails.js +1 -9
  38. package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
  39. package/dist/components/agents-sdk/SubagentRunSelector.d.ts +4 -2
  40. package/dist/components/agents-sdk/SubagentRunSelector.js +7 -6
  41. package/dist/components/agents-sdk/ThinkChat.d.ts +4 -4
  42. package/dist/components/agents-sdk/ThinkChat.js +1 -1
  43. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
  44. package/dist/components/agents-sdk/ThinkChatActivity.js +1 -1
  45. package/dist/components/agents-sdk/ThinkChatToolPanels.js +1 -1
  46. package/dist/components/agents-sdk/ThinkExecutionDetail.d.ts +1 -1
  47. package/dist/components/agents-sdk/ThinkExecutionDetail.js +43 -43
  48. package/dist/components/agents-sdk/ThinkExecutionRun.d.ts +2 -2
  49. package/dist/components/agents-sdk/ThinkExecutionRun.js +5 -6
  50. package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +1 -1
  51. package/dist/components/agents-sdk/ThinkExecutionStatus.js +8 -12
  52. package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +8 -1
  53. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +42 -37
  54. package/dist/components/agents-sdk/ThinkFullApp.d.ts +18 -6
  55. package/dist/components/agents-sdk/ThinkFullApp.js +113 -145
  56. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +1 -1
  57. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.js +1 -1
  58. package/dist/components/agents-sdk/ThinkRoutine.d.ts +1 -1
  59. package/dist/components/agents-sdk/ThinkRoutineBrowser.js +1 -1
  60. package/dist/components/agents-sdk/ThinkRoutineDetail.js +5 -16
  61. package/dist/components/agents-sdk/ThinkRoutineForm.js +1 -1
  62. package/dist/components/agents-sdk/ThinkRoutineLibrary.js +69 -89
  63. package/dist/components/agents-sdk/ThinkRoutineRuns.d.ts +1 -1
  64. package/dist/components/agents-sdk/ThinkRoutineRuns.js +3 -10
  65. package/dist/components/agents-sdk/ThinkThreadPicker.js +2 -2
  66. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  67. package/dist/components/agents-sdk/WorkspaceExplorer.js +1 -1
  68. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  69. package/dist/components/agents-sdk/WorkspaceHeader.js +2 -1
  70. package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +1 -1
  71. package/dist/components/agents-sdk/WorkspaceMountManager.js +11 -11
  72. package/dist/components/ai-sdk/Activity.js +1 -1
  73. package/dist/components/ai-sdk/AgentAttention.d.ts +1 -1
  74. package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
  75. package/dist/components/ai-sdk/Approval.js +1 -1
  76. package/dist/components/ai-sdk/Artifact.js +1 -1
  77. package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
  78. package/dist/components/ai-sdk/ChainOfThought.js +1 -1
  79. package/dist/components/ai-sdk/Checkpoint.js +1 -1
  80. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  81. package/dist/components/ai-sdk/Conversation.js +1 -1
  82. package/dist/components/ai-sdk/Goal.js +1 -1
  83. package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
  84. package/dist/components/ai-sdk/Message.d.ts +2 -2
  85. package/dist/components/ai-sdk/Message.js +25 -3
  86. package/dist/components/ai-sdk/MessageScroller.js +1 -1
  87. package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
  88. package/dist/components/ai-sdk/Plan.js +1 -1
  89. package/dist/components/ai-sdk/PromptInput.js +1 -1
  90. package/dist/components/ai-sdk/Queue.d.ts +4 -4
  91. package/dist/components/ai-sdk/Queue.js +6 -15
  92. package/dist/components/ai-sdk/Reasoning.js +1 -1
  93. package/dist/components/ai-sdk/Sources.js +1 -1
  94. package/dist/components/ai-sdk/Task.d.ts +2 -2
  95. package/dist/components/ai-sdk/Task.js +2 -2
  96. package/dist/components/extension/ChatGptSignInScreen.js +1 -1
  97. package/dist/components/extension/CodexModelSelector.js +1 -1
  98. package/dist/components/extension/ConversationTabPicker.js +1 -1
  99. package/dist/components/foundations/Avatar.d.ts +1 -10
  100. package/dist/components/foundations/Avatar.js +1 -10
  101. package/dist/components/foundations/Checkbox.js +1 -1
  102. package/dist/components/foundations/CheckboxGroup.js +1 -0
  103. package/dist/components/foundations/ContextMenu.js +1 -1
  104. package/dist/components/foundations/LinkButton.d.ts +12 -10
  105. package/dist/components/foundations/LinkButton.js +15 -11
  106. package/dist/components/foundations/Menubar.js +1 -1
  107. package/dist/components/foundations/SearchField.js +1 -1
  108. package/dist/components/foundations/Select.js +1 -1
  109. package/dist/components/foundations/Stepper.js +1 -1
  110. package/dist/components/foundations/Toast.js +1 -1
  111. package/dist/components/foundations/ToggleGroup.d.ts +1 -1
  112. package/dist/components/foundations/ToggleGroup.js +1 -1
  113. package/dist/components/foundations/Toolbar.d.ts +1 -151
  114. package/dist/components/foundations/icons.d.ts +2 -2
  115. package/dist/components/foundations/icons.js +2 -2
  116. package/dist/components/general-purpose/AppTopBar.d.ts +1 -90
  117. package/dist/components/general-purpose/AppTopBar.js +2 -1
  118. package/dist/components/general-purpose/Commit.d.ts +2 -2
  119. package/dist/components/general-purpose/Commit.js +5 -13
  120. package/dist/components/general-purpose/EnvironmentVariables.d.ts +2 -2
  121. package/dist/components/general-purpose/EnvironmentVariables.js +4 -7
  122. package/dist/components/general-purpose/FileTree.js +1 -1
  123. package/dist/components/general-purpose/PricingBillingToggle.js +5 -10
  124. package/dist/components/general-purpose/PricingPlanCard.js +15 -14
  125. package/dist/components/general-purpose/PricingUsageCalculator.js +1 -1
  126. package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +95 -2
  127. package/dist/components/general-purpose/ResponsiveSidebarShell.js +90 -34
  128. package/dist/components/general-purpose/SetupChecklist.js +1 -1
  129. package/dist/components/general-purpose/Terminal.d.ts +1 -1
  130. package/dist/components/general-purpose/Terminal.js +4 -12
  131. package/dist/components/general-purpose/TestResults.d.ts +1 -1
  132. package/dist/components/general-purpose/TestResults.js +8 -21
  133. package/dist/components/general-purpose/ThemeModeControl.js +1 -1
  134. package/dist/components/general-purpose/WebPreview.d.ts +1 -1
  135. package/dist/components/general-purpose/WebPreview.js +4 -12
  136. package/dist/components/nanites/AgentConnection.js +2 -2
  137. package/dist/components/nanites/AgentToolDetail.d.ts +1 -1
  138. package/dist/components/nanites/AgentToolDetail.js +7 -7
  139. package/dist/components/nanites/NaniteScene.js +11 -11
  140. package/dist/{copy-button-Bc7jsYv_.js → copy-button-lys9N_aI.js} +1 -1
  141. package/dist/{icons-DwgNir1Q.d.ts → icons-0corjfxR.d.ts} +1 -16
  142. package/dist/{icons-MmIXciMO.js → icons-CVFSeTJn.js} +2 -5
  143. package/dist/styles/agent-attention.css +5 -5
  144. package/dist/styles/agent-chat.css +47 -12
  145. package/dist/styles/agent-tool-detail.css +2 -12
  146. package/dist/styles/app-icon.css +12 -18
  147. package/dist/styles/app-top-bar.css +32 -6
  148. package/dist/styles/avatar.css +6 -22
  149. package/dist/styles/base.css +2 -8
  150. package/dist/styles/browser-live-screen.css +38 -0
  151. package/dist/styles/browser-live-view.css +12 -4
  152. package/dist/styles/browser-run-panel.css +20 -18
  153. package/dist/styles/chatgpt-sign-in-screen.css +5 -5
  154. package/dist/styles/commit.css +24 -1
  155. package/dist/styles/environment-variables.css +3 -0
  156. package/dist/styles/index.css +5 -4
  157. package/dist/styles/manager-office.css +486 -0
  158. package/dist/styles/mcp-plugin-catalog.css +39 -35
  159. package/dist/styles/mcp-server-picker.css +1 -1
  160. package/dist/styles/message.css +41 -18
  161. package/dist/styles/nanite-scene.css +9 -9
  162. package/dist/styles/pricing-page.css +12 -8
  163. package/dist/styles/prompt-input.css +8 -13
  164. package/dist/styles/recipes.css +1 -57
  165. package/dist/styles/responsive-sidebar-shell.css +70 -20
  166. package/dist/styles/subagent-run.css +20 -3
  167. package/dist/styles/terminal.css +19 -0
  168. package/dist/styles/test-results.css +10 -1
  169. package/dist/styles/think-execution-status.css +8 -24
  170. package/dist/styles/think-execution-workbench.css +98 -105
  171. package/dist/styles/think-full-app.css +81 -193
  172. package/dist/styles/think-routine-library.css +0 -40
  173. package/dist/styles/think-thread-picker.css +8 -3
  174. package/dist/styles/transition-surface.css +7 -8
  175. package/dist/styles/utilities.css +42 -0
  176. package/dist/styles/web-preview.css +28 -5
  177. package/dist/styles/workspace-explorer.css +4 -23
  178. package/dist/styles/workspace-mount-manager.css +22 -0
  179. package/package.json +37 -35
  180. package/dist/ResponsiveSidebarShell-DWjULskY.d.ts +0 -68
  181. package/dist/components/agents-sdk/AgentActivityPreview.d.ts +0 -46
  182. package/dist/components/agents-sdk/AgentActivityPreview.js +0 -93
  183. package/dist/components/agents-sdk/ThinkThreadShell.d.ts +0 -38
  184. package/dist/components/agents-sdk/ThinkThreadShell.js +0 -27
  185. package/dist/components/foundations/Badge.d.ts +0 -62
  186. package/dist/components/foundations/Badge.js +0 -55
  187. package/dist/components/foundations/StatusPill.d.ts +0 -43
  188. package/dist/components/foundations/StatusPill.js +0 -35
  189. package/dist/components/general-purpose/Shell.d.ts +0 -149
  190. package/dist/components/general-purpose/Shell.js +0 -116
  191. package/dist/styles/agent-activity-preview-overlay.css +0 -169
  192. package/dist/styles/agent-activity-preview.css +0 -209
  193. package/dist/styles/badge.css +0 -120
  194. package/dist/styles/shell.css +0 -122
  195. package/dist/styles/status-pill.css +0 -39
  196. package/dist/{ThinkChat-DkA4Wr71.js → ThinkChat-BES_3Mb-.js} +1 -1
@@ -10,6 +10,9 @@ function getThinkExecutionRunId(run) {
10
10
  function getThinkExecutionRunTitle(run) {
11
11
  return isThinkSubmissionRun(run) ? run.submissionId : run.workflowName;
12
12
  }
13
+ function getThinkExecutionRunKindLabel(run) {
14
+ return isThinkSubmissionRun(run) ? "Submission" : "Workflow";
15
+ }
13
16
  function getThinkExecutionRunSubtitle(run) {
14
17
  return isThinkSubmissionRun(run) ? void 0 : run.workflowId;
15
18
  }
@@ -31,7 +34,7 @@ function getThinkExecutionRunStatusTone(run) {
31
34
  const status = getThinkExecutionRunStatus(run);
32
35
  if (status === "completed" || status === "complete") return "success";
33
36
  if (status === "error" || status === "errored" || status === "terminated") return "danger";
34
- if (status === "aborted" || status === "skipped" || status === "paused" || status === "waiting") return "warning";
37
+ if (status === "aborted" || status === "skipped" || status === "paused" || status === "waiting") return "paused";
35
38
  if (status === "running" || status === "pending" || status === "queued" || status === "waitingForPause" || status === "rollingBack") return "primary";
36
39
  return "neutral";
37
40
  }
@@ -64,9 +67,5 @@ function getThinkExecutionRunAccessibleName(run) {
64
67
  function getThinkExecutionRunError(run) {
65
68
  return isThinkSubmissionRun(run) ? run.error : run.error ? `${run.error.name}: ${run.error.message}` : void 0;
66
69
  }
67
- function isSameThinkExecutionRun(first, second) {
68
- if (!first || isThinkSubmissionRun(first) !== isThinkSubmissionRun(second)) return false;
69
- return getThinkExecutionRunId(first) === getThinkExecutionRunId(second);
70
- }
71
70
  //#endregion
72
- export { formatThinkExecutionRunProgress, formatThinkExecutionShortTimestamp, formatThinkExecutionStatus, formatThinkExecutionTimestamp, getThinkExecutionRunAccessibleName, getThinkExecutionRunError, getThinkExecutionRunId, getThinkExecutionRunProgressedAt, getThinkExecutionRunProgressedLabel, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, getThinkExecutionRunSubtitle, getThinkExecutionRunTitle, isSameThinkExecutionRun, isThinkSubmissionRun };
71
+ export { formatThinkExecutionRunProgress, formatThinkExecutionShortTimestamp, formatThinkExecutionStatus, formatThinkExecutionTimestamp, getThinkExecutionRunAccessibleName, getThinkExecutionRunError, getThinkExecutionRunId, getThinkExecutionRunKindLabel, getThinkExecutionRunProgressedAt, getThinkExecutionRunProgressedLabel, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, getThinkExecutionRunSubtitle, getThinkExecutionRunTitle, isThinkSubmissionRun };
@@ -1,4 +1,4 @@
1
- import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-lYYgyeE1.js";
1
+ import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-k8bpyXqt.js";
2
2
  import * as React from "react";
3
3
 
4
4
  //#region src/components/agents-sdk/ThinkExecutionStatus.d.ts
@@ -1,14 +1,14 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { B as PauseIcon, O as InfoIcon, Y as SpinnerIcon, d as CheckIcon, it as XIcon } from "../../icons-MmIXciMO.js";
2
+ import { K as SpinnerIcon, L as PauseIcon, T as InfoIcon, d as CheckIcon, tt as XIcon } from "../../icons-CVFSeTJn.js";
3
3
  import { Tooltip } from "../foundations/Tooltip.js";
4
- import { formatThinkExecutionRunProgress, formatThinkExecutionStatus, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, getThinkExecutionRunSubtitle, getThinkExecutionRunTitle } from "./ThinkExecutionRun.js";
4
+ import { formatThinkExecutionRunProgress, formatThinkExecutionStatus, getThinkExecutionRunKindLabel, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, getThinkExecutionRunTitle } from "./ThinkExecutionRun.js";
5
5
  import "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region src/components/agents-sdk/ThinkExecutionStatus.tsx
8
8
  function statusIcon(tone) {
9
9
  if (tone === "success") return /* @__PURE__ */ jsx(CheckIcon, {});
10
10
  if (tone === "danger") return /* @__PURE__ */ jsx(XIcon, {});
11
- if (tone === "warning") return /* @__PURE__ */ jsx(PauseIcon, {});
11
+ if (tone === "paused") return /* @__PURE__ */ jsx(PauseIcon, {});
12
12
  if (tone === "primary") return /* @__PURE__ */ jsx(SpinnerIcon, {});
13
13
  return /* @__PURE__ */ jsx(InfoIcon, {});
14
14
  }
@@ -34,7 +34,6 @@ function ThinkExecutionStatus({ className, label, run, ref, ...props }) {
34
34
  }
35
35
  /** Shared identity, status, and progress summary for a whole Think execution record. */
36
36
  function ThinkExecutionRunSummary({ className, run, ref, ...props }) {
37
- const subtitle = getThinkExecutionRunSubtitle(run);
38
37
  return /* @__PURE__ */ jsxs("span", {
39
38
  ref,
40
39
  "data-slot": "think-execution-run-summary",
@@ -42,15 +41,12 @@ function ThinkExecutionRunSummary({ className, run, ref, ...props }) {
42
41
  ...props,
43
42
  children: [/* @__PURE__ */ jsx(ThinkExecutionStatus, { run }), /* @__PURE__ */ jsxs("span", {
44
43
  className: "think-execution-run-summary__copy",
45
- children: [/* @__PURE__ */ jsxs("span", {
46
- className: "think-execution-run-summary__heading",
47
- children: [/* @__PURE__ */ jsx("span", {
48
- className: "think-execution-run-summary__title sigvelo-truncate",
49
- children: getThinkExecutionRunTitle(run)
50
- }), subtitle ? /* @__PURE__ */ jsx("code", { children: subtitle }) : null]
44
+ children: [/* @__PURE__ */ jsx("span", {
45
+ className: "think-execution-run-summary__title sigvelo-truncate",
46
+ children: getThinkExecutionRunTitle(run)
51
47
  }), /* @__PURE__ */ jsx("span", {
52
- className: "think-execution-run-summary__progress",
53
- children: formatThinkExecutionRunProgress(run)
48
+ className: "think-execution-run-summary__meta sigvelo-truncate",
49
+ children: `${getThinkExecutionRunKindLabel(run)} · ${formatThinkExecutionStatus(getThinkExecutionRunStatus(run))} · ${formatThinkExecutionRunProgress(run)}`
54
50
  })]
55
51
  })]
56
52
  });
@@ -1,4 +1,4 @@
1
- import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-lYYgyeE1.js";
1
+ import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-k8bpyXqt.js";
2
2
  import * as React from "react";
3
3
  import { DataTag, UnusedSkipTokenOptions } from "@tanstack/react-query";
4
4
  import { Think, ThinkSubmissionInspection } from "@cloudflare/think";
@@ -21,6 +21,12 @@ interface ThinkExecutionWorkbenchProps extends Omit<React.HTMLAttributes<HTMLDiv
21
21
  selectedRun: ThinkExecutionRun | null;
22
22
  /** Returns an application-authored TanStack Router Link for the run. */
23
23
  renderRunLink: (run: ThinkExecutionRun) => React.ReactElement;
24
+ /**
25
+ * Returns an application-authored TanStack Router Link back to the run
26
+ * list. A selected run replaces the list — the workspace drill-in pattern —
27
+ * so this link is the way back out.
28
+ */
29
+ renderRunsLink: () => React.ReactElement;
24
30
  }
25
31
  interface ThinkExecutionRunsData {
26
32
  submissions: readonly ThinkSubmissionInspection[];
@@ -48,6 +54,7 @@ declare function ThinkExecutionWorkbench({
48
54
  pageSize,
49
55
  ref,
50
56
  renderRunLink,
57
+ renderRunsLink,
51
58
  selectedRun,
52
59
  source,
53
60
  sourceKey,
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { G as RefreshIcon, b as EllipsisIcon } from "../../icons-MmIXciMO.js";
2
+ import { $ as WarningIcon, H as RefreshIcon, r as ArrowLeftIcon, y as EllipsisIcon } from "../../icons-CVFSeTJn.js";
3
3
  import { buttonVariants } from "../foundations/Button.js";
4
4
  import { IconButton } from "../foundations/IconButton.js";
5
5
  import { Menu } from "../foundations/Menu.js";
@@ -7,7 +7,7 @@ import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
7
7
  import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
8
8
  import { EmptyState } from "../foundations/EmptyState.js";
9
9
  import { AppTopBar } from "../general-purpose/AppTopBar.js";
10
- import { getThinkExecutionRunAccessibleName, getThinkExecutionRunId, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, isSameThinkExecutionRun, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
10
+ import { getThinkExecutionRunAccessibleName, getThinkExecutionRunId, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
11
11
  import { ThinkExecutionRunSummary } from "./ThinkExecutionStatus.js";
12
12
  import { ThinkExecutionDetail } from "./ThinkExecutionDetail.js";
13
13
  import * as React from "react";
@@ -117,7 +117,7 @@ function thinkExecutionRunsQueryOptions(source, sourceKey, pageSize = executionP
117
117
  * not normalize execution records or own workflow authoring. Its first
118
118
  * uncached list read suspends to the consuming route's Suspense boundary.
119
119
  */
120
- function ThinkExecutionWorkbench({ backButton, className, pageSize = executionPanelPageSize, ref, renderRunLink, selectedRun, source, sourceKey, title = "Execution", ...props }) {
120
+ function ThinkExecutionWorkbench({ backButton, className, pageSize = executionPanelPageSize, ref, renderRunLink, renderRunsLink, selectedRun, source, sourceKey, title = "Execution", ...props }) {
121
121
  const runsId = React.useId();
122
122
  const runsOptions = thinkExecutionRunsQueryOptions(source, sourceKey, pageSize);
123
123
  const runsQueryKey = thinkExecutionRunsScopeQueryKey(sourceKey);
@@ -146,14 +146,24 @@ function ThinkExecutionWorkbench({ backButton, className, pageSize = executionPa
146
146
  children: [
147
147
  /* @__PURE__ */ jsxs(AppTopBar.Root, {
148
148
  className: "think-execution-workbench__header",
149
+ titleAlign: "start",
149
150
  "aria-label": "Run controls",
150
151
  children: [
151
- /* @__PURE__ */ jsx(AppTopBar.Leading, { children: backButton }),
152
+ /* @__PURE__ */ jsx(AppTopBar.Leading, { children: selectedRun ? /* @__PURE__ */ jsx(AppTopBar.Link, {
153
+ label: "Back to runs",
154
+ render: renderRunsLink(),
155
+ children: /* @__PURE__ */ jsx(ArrowLeftIcon, { "aria-hidden": "true" })
156
+ }) : backButton }),
152
157
  /* @__PURE__ */ jsx(AppTopBar.Title, { children: /* @__PURE__ */ jsx("h2", {
153
158
  className: "think-execution-workbench__title",
154
159
  children: title
155
160
  }) }),
156
- /* @__PURE__ */ jsx(AppTopBar.Trailing, { children: /* @__PURE__ */ jsx(AppTopBar.Button, {
161
+ /* @__PURE__ */ jsxs(AppTopBar.Trailing, { children: [selectedRun ? /* @__PURE__ */ jsx(RunActions, {
162
+ busy: actionIsPending,
163
+ run: selectedRun,
164
+ source,
165
+ onAction: runAction
166
+ }) : null, /* @__PURE__ */ jsx(AppTopBar.Button, {
157
167
  label: "Refresh runs",
158
168
  disabled: busyAction !== null,
159
169
  onClick: () => {
@@ -161,18 +171,22 @@ function ThinkExecutionWorkbench({ backButton, className, pageSize = executionPa
161
171
  runsQuery.refetch();
162
172
  },
163
173
  children: /* @__PURE__ */ jsx(RefreshIcon, {})
164
- }) })
174
+ })] })
165
175
  ]
166
176
  }),
167
- error ? /* @__PURE__ */ jsx("div", {
177
+ error ? /* @__PURE__ */ jsxs("div", {
168
178
  className: "think-execution-workbench__error",
169
179
  role: "alert",
170
- children: formatErrorMessage(error)
180
+ children: [/* @__PURE__ */ jsx(WarningIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", { children: formatErrorMessage(error) })]
171
181
  }) : null,
172
- /* @__PURE__ */ jsxs("div", {
182
+ /* @__PURE__ */ jsx("div", {
173
183
  className: "think-execution-workbench__content",
174
184
  "aria-busy": busyAction !== null,
175
- children: [/* @__PURE__ */ jsxs("section", {
185
+ children: selectedRun ? /* @__PURE__ */ jsx("section", {
186
+ className: "think-execution-workbench__detail",
187
+ "aria-label": "Run detail",
188
+ children: /* @__PURE__ */ jsx(ThinkExecutionDetail, { run: selectedRun })
189
+ }) : /* @__PURE__ */ jsxs("section", {
176
190
  className: "think-execution-workbench__run-list",
177
191
  "aria-labelledby": runsId,
178
192
  children: [/* @__PURE__ */ jsx("div", {
@@ -190,35 +204,26 @@ function ThinkExecutionWorkbench({ backButton, className, pageSize = executionPa
190
204
  children: runs.map((run) => {
191
205
  const id = getThinkExecutionRunId(run);
192
206
  const kind = isThinkSubmissionRun(run) ? "submission" : "workflow";
193
- const selected = isSameThinkExecutionRun(selectedRun, run);
194
- return /* @__PURE__ */ jsxs("li", {
195
- "data-selected": selected || void 0,
196
- children: [/* @__PURE__ */ jsx(NavigationLink, {
197
- render: renderRunLink(run),
198
- "data-slot": "button",
199
- className: buttonVariants({
200
- variant: "ghost",
201
- color: "neutral",
202
- size: "sm",
203
- className: "think-execution-workbench__run"
204
- }),
205
- "aria-label": getThinkExecutionRunAccessibleName(run),
206
- "aria-current": selected ? "page" : void 0,
207
- children: /* @__PURE__ */ jsx(ThinkExecutionRunSummary, { run })
208
- }), /* @__PURE__ */ jsx(RunActions, {
209
- busy: actionIsPending,
210
- run,
211
- source,
212
- onAction: runAction
213
- })]
214
- }, `${kind}:${id}`);
207
+ return /* @__PURE__ */ jsxs("li", { children: [/* @__PURE__ */ jsx(NavigationLink, {
208
+ render: renderRunLink(run),
209
+ "data-slot": "button",
210
+ className: buttonVariants({
211
+ variant: "ghost",
212
+ color: "neutral",
213
+ size: "sm",
214
+ className: "think-execution-workbench__run"
215
+ }),
216
+ "aria-label": getThinkExecutionRunAccessibleName(run),
217
+ children: /* @__PURE__ */ jsx(ThinkExecutionRunSummary, { run })
218
+ }), /* @__PURE__ */ jsx(RunActions, {
219
+ busy: actionIsPending,
220
+ run,
221
+ source,
222
+ onAction: runAction
223
+ })] }, `${kind}:${id}`);
215
224
  })
216
225
  })]
217
- }), /* @__PURE__ */ jsx("section", {
218
- className: "think-execution-workbench__detail",
219
- "aria-label": "Run detail",
220
- children: /* @__PURE__ */ jsx(ThinkExecutionDetail, { run: selectedRun })
221
- })]
226
+ })
222
227
  })
223
228
  ]
224
229
  });
@@ -1,12 +1,12 @@
1
1
  import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-Bh9-Jo1r.js";
2
- import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-BCVqCtJ1.js";
2
+ import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-daY67hFM.js";
3
3
  import { McpPluginCatalogProps } from "./McpPluginCatalog.js";
4
4
  import { ThinkChatMessagesProps } from "./ThinkChat.js";
5
- import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-lYYgyeE1.js";
5
+ import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-k8bpyXqt.js";
6
6
  import { ThinkExecutionWorkbenchProps } from "./ThinkExecutionWorkbench.js";
7
+ import { ResponsiveSidebarShell } from "../general-purpose/ResponsiveSidebarShell.js";
7
8
  import { ThinkFullAppView } from "./ThinkFullAppViewSwitch.js";
8
9
  import { ThinkThreadStatusSummary } from "./ThinkThreadPicker.js";
9
- import { ThinkThreadShell } from "./ThinkThreadShell.js";
10
10
  import { r as WorkspaceFileAssetResolver } from "../../WorkspaceFile-BLaFmMrt.js";
11
11
  import { WorkspaceSource } from "./Workspace.js";
12
12
  import { t as ThinkAgent } from "../../think-agent-Cip5KAPj.js";
@@ -67,8 +67,10 @@ interface ThinkFullAppProps<AgentT extends ThinkFullAppAgent<State>, State = unk
67
67
  plugins?: McpPluginCatalogProps;
68
68
  /** Product-specific actions rendered in the application top bar. */
69
69
  appBarActions?: React.ReactNode;
70
- /** Product-specific navigation rendered after the built-in sidebar control. */
70
+ /** Product-specific navigation that owns the leading slot at every width. */
71
71
  appBarLeading?: React.ReactNode;
72
+ /** Product-specific compact navigation; the wide layout keeps its sidebar toggle. */
73
+ compactAppBarLeading?: React.ReactNode;
72
74
  /** Active conversation or page title rendered in the application top bar. */
73
75
  appBarTitle?: React.ReactNode;
74
76
  /** Aggregate thread activity rendered beside the compact thread-title disclosure. */
@@ -88,8 +90,16 @@ interface ThinkFullAppProps<AgentT extends ThinkFullAppAgent<State>, State = unk
88
90
  * has its own source identity.
89
91
  */
90
92
  sourceKey: string;
91
- /** Returns an application-authored TanStack Router Link and enables the Execution workbench. */
93
+ /**
94
+ * Returns an application-authored TanStack Router Link for a run. Together
95
+ * with `renderExecutionRunsLink` this enables the Execution workbench.
96
+ */
92
97
  renderExecutionRunLink?: ThinkExecutionWorkbenchProps["renderRunLink"];
98
+ /**
99
+ * Returns an application-authored TanStack Router Link back to the run
100
+ * list — the way out of a selected run, which replaces the list in place.
101
+ */
102
+ renderExecutionRunsLink?: ThinkExecutionWorkbenchProps["renderRunsLink"];
93
103
  /** Message rendering labels and approval overrides for ThinkChat. */
94
104
  messages?: ThinkChatMessagesProps<MessageT>;
95
105
  /** Extra workbench panels appended after the enabled built-in panels. */
@@ -100,7 +110,7 @@ interface ThinkFullAppProps<AgentT extends ThinkFullAppAgent<State>, State = unk
100
110
  * Optional parent-owned thread picker/sidebar rendered beside the selected child app.
101
111
  * Use the render form to close the compact drawer after selecting a thread.
102
112
  */
103
- threadSidebar?: React.ComponentProps<typeof ThinkThreadShell>["sidebar"];
113
+ threadSidebar?: React.ComponentProps<typeof ResponsiveSidebarShell>["sidebar"];
104
114
  /** Whether the thread sidebar is open. Omit for internal state. */
105
115
  threadSidebarOpen?: boolean;
106
116
  /** Initial thread sidebar state when `threadSidebarOpen` is uncontrolled. */
@@ -134,6 +144,7 @@ declare function ThinkFullApp<AgentT extends ThinkFullAppAgent<State>, State = u
134
144
  appBarActions,
135
145
  appBarLeading,
136
146
  appBarTitle,
147
+ compactAppBarLeading,
137
148
  className,
138
149
  conversation,
139
150
  defaultMobileView,
@@ -151,6 +162,7 @@ declare function ThinkFullApp<AgentT extends ThinkFullAppAgent<State>, State = u
151
162
  ref,
152
163
  renderAgentToolRunLink,
153
164
  renderExecutionRunLink,
165
+ renderExecutionRunsLink,
154
166
  selectedExecutionRun,
155
167
  showMobileViewSwitch,
156
168
  showWorkbenchViewSwitch,