@mcp-b/react-components 0.47.0 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/dist/AgentChatQueue-C_Jaw3Ia.d.ts +48 -0
  2. package/dist/AgentToolRunsContext-GMe_hSnD.d.ts +35 -0
  3. package/dist/Avatar-o2NO1fCG.d.ts +124 -0
  4. package/dist/{Button-CZt3yywF.d.ts → Button-DjONW5UW.d.ts} +1 -1
  5. package/dist/{CodeBlock-C380GD5t.d.ts → CodeBlock--r6GS8YV.d.ts} +8 -2
  6. package/dist/{CodeBlock-DMHZiw86.js → CodeBlock-g8sADidM.js} +7 -7
  7. package/dist/Correspondent-7K6uNLUm.d.ts +64 -0
  8. package/dist/{FileTree-BHebfvkK.js → FileTree-H8mMg4rV.js} +20 -29
  9. package/dist/{IconButton-BAUFhUk8.d.ts → IconButton-ByiyjkYE.d.ts} +2 -2
  10. package/dist/{Message-D_vCVEGB.d.ts → Message-DyaTBiV7.d.ts} +17 -4
  11. package/dist/MessageScrollerVirtual-D4afYwVB.d.ts +84 -0
  12. package/dist/{PromptInput-DtJHyp0S.d.ts → PromptInput-C4Mofitz.d.ts} +44 -31
  13. package/dist/PromptInputApproval-D2hpn54U.d.ts +44 -0
  14. package/dist/Separator-CzhtLYE1.d.ts +41 -0
  15. package/dist/Toolbar-CGY004u0.d.ts +155 -0
  16. package/dist/{Workspace-C_zHq9KZ.d.ts → Workspace-HzGrWDX3.d.ts} +14 -3
  17. package/dist/{WorkspaceFile-Dq-GC0_T.d.ts → WorkspaceFile-Bouauobc.d.ts} +1 -1
  18. package/dist/{WorkspaceFileView-ChIJz-fl.js → WorkspaceFileView-DYPtRVpM.js} +4 -3
  19. package/dist/{WorkspaceLink-B1d2GIGl.js → WorkspaceLink-BYZG-V_I.js} +8 -91
  20. package/dist/{WorkspaceMessageResponse-Dg_aNpoj.js → WorkspaceMessageResponse-CUJk9_P5.js} +6 -3
  21. package/dist/components/agents-sdk/AgentChat.d.ts +198 -2
  22. package/dist/components/agents-sdk/AgentChat.js +525 -670
  23. package/dist/components/agents-sdk/AgentChatQueue.d.ts +2 -0
  24. package/dist/components/agents-sdk/AgentChatQueue.js +206 -0
  25. package/dist/components/agents-sdk/AgentEvent.js +1 -1
  26. package/dist/components/agents-sdk/AgentToolRunsContext.d.ts +2 -2
  27. package/dist/components/agents-sdk/AgentToolRunsContext.js +1 -36
  28. package/dist/components/agents-sdk/BrowserLiveScreen.js +21 -13
  29. package/dist/components/agents-sdk/BrowserReplay.d.ts +1 -1
  30. package/dist/components/agents-sdk/BrowserRunPanel.d.ts +3 -0
  31. package/dist/components/agents-sdk/BrowserRunPanel.js +31 -30
  32. package/dist/components/agents-sdk/EmployeeChrome.d.ts +212 -0
  33. package/dist/components/agents-sdk/EmployeeChrome.js +555 -0
  34. package/dist/components/agents-sdk/ManagerOffice.d.ts +115 -85
  35. package/dist/components/agents-sdk/ManagerOffice.js +545 -1154
  36. package/dist/components/agents-sdk/McpConnectionRequest.d.ts +4 -4
  37. package/dist/components/agents-sdk/McpConnectionRequest.js +3 -2
  38. package/dist/components/agents-sdk/McpConnectorForm.d.ts +38 -1
  39. package/dist/components/agents-sdk/McpPluginCatalog.d.ts +93 -1
  40. package/dist/components/agents-sdk/McpPluginCatalog.js +3 -2
  41. package/dist/components/agents-sdk/McpServerIcon.d.ts +17 -0
  42. package/dist/components/agents-sdk/McpServerIcon.js +25 -0
  43. package/dist/components/agents-sdk/McpServerPicker.d.ts +4 -3
  44. package/dist/components/agents-sdk/McpServerPicker.js +2 -1
  45. package/dist/components/agents-sdk/ModelSelector.d.ts +4 -4
  46. package/dist/components/agents-sdk/ModelSelector.js +3 -3
  47. package/dist/components/agents-sdk/PromptInputApproval.d.ts +1 -43
  48. package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
  49. package/dist/components/agents-sdk/PromptInputCommands.js +1 -2
  50. package/dist/components/agents-sdk/SessionCompaction.d.ts +88 -1
  51. package/dist/components/agents-sdk/SessionCompaction.js +2 -2
  52. package/dist/components/agents-sdk/SubagentRunDetails.d.ts +30 -1
  53. package/dist/components/agents-sdk/SubagentRunDetails.js +57 -1
  54. package/dist/components/agents-sdk/SubagentRunIndicator.d.ts +9 -9
  55. package/dist/components/agents-sdk/SubagentRunIndicator.js +18 -23
  56. package/dist/components/agents-sdk/SubagentRunList.d.ts +6 -3
  57. package/dist/components/agents-sdk/SubagentRunList.js +4 -2
  58. package/dist/components/agents-sdk/SubagentRunPanel.d.ts +60 -0
  59. package/dist/components/agents-sdk/SubagentRunPanel.js +255 -0
  60. package/dist/components/agents-sdk/SubagentRunSelector.d.ts +8 -4
  61. package/dist/components/agents-sdk/SubagentRunSelector.js +4 -2
  62. package/dist/components/agents-sdk/ThinkChat.d.ts +102 -2
  63. package/dist/components/agents-sdk/ThinkChat.js +233 -2
  64. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +76 -1
  65. package/dist/components/agents-sdk/ThinkChatActivity.js +17 -9
  66. package/dist/components/agents-sdk/ThinkChatContext.d.ts +27 -1
  67. package/dist/components/agents-sdk/ThinkChatContext.js +1 -1
  68. package/dist/components/agents-sdk/ThinkChatToolPanels.js +23 -18
  69. package/dist/components/agents-sdk/ThinkExecutionDetail.js +1 -1
  70. package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +1 -1
  71. package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +85 -28
  72. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +158 -101
  73. package/dist/components/agents-sdk/ThinkFullApp.d.ts +40 -158
  74. package/dist/components/agents-sdk/ThinkFullApp.js +71 -285
  75. package/dist/components/agents-sdk/ThinkRecoveryNotice.d.ts +18 -1
  76. package/dist/components/agents-sdk/ThinkRoutineActions.d.ts +51 -0
  77. package/dist/components/agents-sdk/ThinkRoutineActions.js +201 -0
  78. package/dist/components/agents-sdk/ThinkRoutineBrowser.d.ts +4 -1
  79. package/dist/components/agents-sdk/ThinkRoutineBrowser.js +16 -14
  80. package/dist/components/agents-sdk/ThinkRoutineDetail.js +12 -12
  81. package/dist/components/agents-sdk/ThinkRoutineForm.d.ts +2 -1
  82. package/dist/components/agents-sdk/ThinkRoutineForm.js +11 -11
  83. package/dist/components/agents-sdk/ThinkRoutineRuns.js +6 -6
  84. package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +90 -1
  85. package/dist/components/agents-sdk/ThinkThreadPicker.js +2 -2
  86. package/dist/components/agents-sdk/Workspace.d.ts +2 -2
  87. package/dist/components/agents-sdk/Workspace.js +20 -23
  88. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
  89. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  90. package/dist/components/agents-sdk/WorkspaceConcept.d.ts +3 -2
  91. package/dist/components/agents-sdk/WorkspaceConcept.js +3 -3
  92. package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +15 -10
  93. package/dist/components/agents-sdk/WorkspaceCorrespondence.js +43 -40
  94. package/dist/components/agents-sdk/WorkspaceExecution.d.ts +31 -31
  95. package/dist/components/agents-sdk/WorkspaceExecution.js +115 -192
  96. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +5 -2
  97. package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -2
  98. package/dist/components/agents-sdk/WorkspaceFile.d.ts +1 -1
  99. package/dist/components/agents-sdk/WorkspaceFileView.d.ts +1 -1
  100. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  101. package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
  102. package/dist/components/agents-sdk/WorkspaceLive.d.ts +60 -1
  103. package/dist/components/agents-sdk/WorkspaceLive.js +33 -5
  104. package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +47 -1
  105. package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
  106. package/dist/components/agents-sdk/WorkspaceMountManager.d.ts +3 -2
  107. package/dist/components/agents-sdk/WorkspaceMountManager.js +5 -8
  108. package/dist/components/agents-sdk/WorkspaceNavigationRestoration.d.ts +38 -0
  109. package/dist/components/agents-sdk/WorkspaceNavigationRestoration.js +86 -0
  110. package/dist/components/agents-sdk/WorkspaceProject.d.ts +44 -15
  111. package/dist/components/agents-sdk/WorkspaceProject.js +74 -51
  112. package/dist/components/agents-sdk/WorkspaceUserScript.d.ts +1 -1
  113. package/dist/components/agents-sdk/WorkspaceUserScript.js +5 -2
  114. package/dist/components/ai-sdk/Activity.d.ts +1 -1
  115. package/dist/components/ai-sdk/AgentAttention.d.ts +2 -2
  116. package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +89 -2
  117. package/dist/components/ai-sdk/AgentChatStartScreen.js +63 -42
  118. package/dist/components/ai-sdk/AgentMessageParts.d.ts +45 -1
  119. package/dist/components/ai-sdk/Approval.d.ts +1 -1
  120. package/dist/components/ai-sdk/Artifact.d.ts +2 -2
  121. package/dist/components/ai-sdk/Artifact.js +2 -2
  122. package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
  123. package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
  124. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  125. package/dist/components/ai-sdk/ComposerLink.js +1 -2
  126. package/dist/components/ai-sdk/ConnectedAppCards.d.ts +16 -1
  127. package/dist/components/ai-sdk/ConnectedAppCards.js +69 -94
  128. package/dist/components/ai-sdk/Context.d.ts +7 -3
  129. package/dist/components/ai-sdk/Context.js +7 -17
  130. package/dist/components/ai-sdk/Conversation.d.ts +2 -2
  131. package/dist/components/ai-sdk/Correspondent.d.ts +2 -0
  132. package/dist/components/ai-sdk/Correspondent.js +145 -0
  133. package/dist/components/ai-sdk/Goal.d.ts +3 -3
  134. package/dist/components/ai-sdk/Goal.js +2 -2
  135. package/dist/components/ai-sdk/InlineCitation.d.ts +1 -1
  136. package/dist/components/ai-sdk/InlineCitation.js +1 -1
  137. package/dist/components/ai-sdk/MediaPreviewCard.d.ts +1 -1
  138. package/dist/components/ai-sdk/Message.d.ts +2 -2
  139. package/dist/components/ai-sdk/Message.js +11 -2
  140. package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
  141. package/dist/components/ai-sdk/MessageScrollerVirtual.d.ts +2 -76
  142. package/dist/components/ai-sdk/MessageScrollerVirtual.js +38 -4
  143. package/dist/components/ai-sdk/Plan.d.ts +1 -1
  144. package/dist/components/ai-sdk/PromptInput.d.ts +2 -2
  145. package/dist/components/ai-sdk/PromptInput.js +170 -226
  146. package/dist/components/ai-sdk/PromptInputComposerEditor.js +32 -9
  147. package/dist/components/ai-sdk/Queue.d.ts +28 -5
  148. package/dist/components/ai-sdk/Queue.js +19 -4
  149. package/dist/components/ai-sdk/Reasoning.d.ts +1 -1
  150. package/dist/components/ai-sdk/Reasoning.js +4 -4
  151. package/dist/components/ai-sdk/Sources.d.ts +1 -1
  152. package/dist/components/ai-sdk/Task.d.ts +1 -1
  153. package/dist/components/extension/ChatGptSignInScreen.d.ts +1 -1
  154. package/dist/components/extension/CodexModelSelector.d.ts +5 -0
  155. package/dist/components/extension/ConversationTabPicker.d.ts +1 -0
  156. package/dist/components/extension/ConversationTabPicker.js +1 -1
  157. package/dist/components/foundations/AlertDialog.d.ts +1 -1
  158. package/dist/components/foundations/AppIcon.d.ts +3 -2
  159. package/dist/components/foundations/Autocomplete.js +6 -1
  160. package/dist/components/foundations/Avatar.d.ts +1 -121
  161. package/dist/components/foundations/Button.d.ts +1 -1
  162. package/dist/components/foundations/Card.d.ts +22 -27
  163. package/dist/components/foundations/Card.js +51 -32
  164. package/dist/components/foundations/CheckboxGroup.d.ts +1 -1
  165. package/dist/components/foundations/Collapsible.d.ts +1 -1
  166. package/dist/components/foundations/Combobox.js +6 -1
  167. package/dist/components/foundations/Dialog.d.ts +106 -1
  168. package/dist/components/foundations/EmptyState.d.ts +1 -1
  169. package/dist/components/foundations/Field.d.ts +2 -1
  170. package/dist/components/foundations/Fieldset.d.ts +1 -1
  171. package/dist/components/foundations/Form.d.ts +4 -4
  172. package/dist/components/foundations/IconButton.d.ts +1 -1
  173. package/dist/components/foundations/Label.d.ts +1 -1
  174. package/dist/components/foundations/LinkButton.d.ts +2 -2
  175. package/dist/components/foundations/Meter.d.ts +1 -1
  176. package/dist/components/foundations/NumberField.d.ts +1 -1
  177. package/dist/components/foundations/ScrollArea.d.ts +1 -1
  178. package/dist/components/foundations/SearchField.d.ts +1 -1
  179. package/dist/components/foundations/Select.js +6 -1
  180. package/dist/components/foundations/Separator.d.ts +1 -40
  181. package/dist/components/foundations/Stepper.d.ts +1 -1
  182. package/dist/components/foundations/Textarea.d.ts +1 -1
  183. package/dist/components/foundations/Toast.d.ts +5 -1
  184. package/dist/components/foundations/Toggle.d.ts +70 -1
  185. package/dist/components/foundations/ToggleGroup.d.ts +3 -2
  186. package/dist/components/foundations/Toolbar.d.ts +1 -151
  187. package/dist/components/foundations/TransitionSurface.d.ts +1 -1
  188. package/dist/components/general-purpose/ActionGuide.d.ts +10 -26
  189. package/dist/components/general-purpose/ActionGuide.js +4 -18
  190. package/dist/components/general-purpose/AppTopBar.d.ts +4 -2
  191. package/dist/components/general-purpose/Commit.d.ts +2 -2
  192. package/dist/components/general-purpose/Commit.js +1 -1
  193. package/dist/components/general-purpose/EnvironmentVariables.d.ts +2 -2
  194. package/dist/components/general-purpose/FileTree.d.ts +1 -7
  195. package/dist/components/general-purpose/FileTree.js +1 -1
  196. package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
  197. package/dist/components/general-purpose/PricingPlanCard.d.ts +4 -0
  198. package/dist/components/general-purpose/PricingUsageCalculator.js +1 -1
  199. package/dist/components/general-purpose/ResizableSidePanel.d.ts +2 -2
  200. package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +128 -2
  201. package/dist/components/general-purpose/ResponsiveSidebarShell.js +119 -101
  202. package/dist/components/general-purpose/SettingsFormDialog.d.ts +14 -27
  203. package/dist/components/general-purpose/SettingsFormDialog.js +40 -70
  204. package/dist/components/general-purpose/SetupChecklist.d.ts +1 -0
  205. package/dist/components/general-purpose/SetupChecklist.js +76 -1
  206. package/dist/components/general-purpose/Terminal.d.ts +3 -3
  207. package/dist/components/general-purpose/Terminal.js +10 -5
  208. package/dist/components/general-purpose/TestResults.d.ts +23 -11
  209. package/dist/components/general-purpose/TestResults.js +48 -50
  210. package/dist/components/general-purpose/ThemeModeControl.d.ts +2 -0
  211. package/dist/components/general-purpose/WebPreview.d.ts +29 -4
  212. package/dist/components/general-purpose/WebPreview.js +37 -12
  213. package/dist/components/nanites/AgentConnection.js +1 -1
  214. package/dist/components/nanites/AgentToolDetail.d.ts +13 -11
  215. package/dist/components/nanites/AgentToolDetail.js +20 -41
  216. package/dist/{copy-button-C0JyjClr.d.ts → copy-button-OUwOdgEm.d.ts} +1 -1
  217. package/dist/mcp-server-mAErsxHU.js +27 -0
  218. package/dist/styles/activity.css +1 -96
  219. package/dist/styles/agent-chat.css +75 -102
  220. package/dist/styles/agent-tool-detail.css +0 -16
  221. package/dist/styles/base.css +3 -3
  222. package/dist/styles/browser-run-panel.css +1 -15
  223. package/dist/styles/button.css +7 -1
  224. package/dist/styles/code-block.css +12 -0
  225. package/dist/styles/composition-motion.css +0 -2
  226. package/dist/styles/correspondent.css +73 -0
  227. package/dist/styles/employee-chrome.css +43 -0
  228. package/dist/styles/file-tree.css +5 -0
  229. package/dist/styles/index.css +5 -2
  230. package/dist/styles/manager-office.css +380 -1086
  231. package/dist/styles/message.css +2 -10
  232. package/dist/styles/queue.css +71 -0
  233. package/dist/styles/subagent-run.css +122 -6
  234. package/dist/styles/test-results.css +2 -5
  235. package/dist/styles/think-chat-activity.css +13 -0
  236. package/dist/styles/think-chat-tool-panels.css +81 -0
  237. package/dist/styles/think-execution-workbench.css +2 -8
  238. package/dist/styles/think-full-app.css +42 -251
  239. package/dist/styles/{think-routine-library.css → think-routine.css} +64 -80
  240. package/dist/styles/web-preview.css +15 -1
  241. package/dist/utils/mcp-server-catalog.d.ts +1112 -2
  242. package/dist/utils/mcp-server-catalog.js +28 -9
  243. package/dist/utils/structured-code.d.ts +1 -1
  244. package/dist/{workspace-assets-CxpEHsac.js → workspace-assets-Bg7XhPsk.js} +16 -2
  245. package/package.json +7 -3
  246. package/dist/AgentChat-BLmQghkt.d.ts +0 -327
  247. package/dist/AgentChatStartScreen-Bkv7Avni.d.ts +0 -84
  248. package/dist/AgentMessageParts-C7L-Mv9U.d.ts +0 -46
  249. package/dist/AgentToolRunsContext-jtmveaRE.d.ts +0 -57
  250. package/dist/Dialog-B_FhRWaz.d.ts +0 -107
  251. package/dist/McpConnectorForm-CeYNY0MI.d.ts +0 -39
  252. package/dist/McpPluginCatalog-3qWu8oK1.d.ts +0 -92
  253. package/dist/ResponsiveSidebarShell-BTVPxLJK.d.ts +0 -123
  254. package/dist/SessionCompaction-CmTJFpzj.d.ts +0 -89
  255. package/dist/SetupChecklist-CwRjIDH4.js +0 -77
  256. package/dist/ThinkChat-CwMdEum8.d.ts +0 -185
  257. package/dist/ThinkChat-DLDta57t.js +0 -332
  258. package/dist/ThinkChatActivity-B3lGVS-6.d.ts +0 -77
  259. package/dist/ThinkChatContext-COIgzkYp.d.ts +0 -28
  260. package/dist/ThinkRecoveryNotice-DGWr94rk.d.ts +0 -19
  261. package/dist/ThinkThreadPicker-yFz4vvIf.d.ts +0 -91
  262. package/dist/Toggle-DLrIf5YH.d.ts +0 -69
  263. package/dist/WorkspaceLive-DLGhtIly.d.ts +0 -49
  264. package/dist/WorkspaceMessageResponse-kJYU8Onj.d.ts +0 -48
  265. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +0 -31
  266. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.js +0 -34
  267. package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +0 -80
  268. package/dist/components/agents-sdk/ThinkRoutineLibrary.js +0 -159
  269. package/dist/components/agents-sdk/ThinkSidepanel.d.ts +0 -200
  270. package/dist/components/agents-sdk/ThinkSidepanel.js +0 -775
  271. package/dist/mcp-server-7NR24ASj.js +0 -69
  272. package/dist/mcp-server-catalog-C_g7C-9o.d.ts +0 -1108
  273. package/dist/styles/think-sidepanel.css +0 -78
  274. package/dist/think-agent-Cip5KAPj.d.ts +0 -7
@@ -4,10 +4,10 @@ import { buttonVariants } from "../foundations/Button.js";
4
4
  import { Tooltip } from "../foundations/Tooltip.js";
5
5
  import { t as capitalize } from "../../format-COCyV98Z.js";
6
6
  import { EmptyState } from "../foundations/EmptyState.js";
7
- import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
7
+ import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
8
8
  import { SearchField } from "../foundations/SearchField.js";
9
- import { ToggleGroup } from "../foundations/ToggleGroup.js";
10
9
  import { getThinkRoutineNextRun } from "./ThinkRoutine.js";
10
+ import { ToggleGroup } from "../foundations/ToggleGroup.js";
11
11
  import * as React from "react";
12
12
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
13
  //#region src/components/agents-sdk/ThinkRoutineBrowser.tsx
@@ -27,18 +27,18 @@ function ThinkRoutineBrowser({ className, routines, selectedRoutineId, showOwner
27
27
  const visibleRoutines = filterRoutines(routines, filter, query, showOwner);
28
28
  return /* @__PURE__ */ jsxs("nav", {
29
29
  ref,
30
- className: cx("think-routine-browser", "think-routine-library__browser", className),
30
+ className: cx("think-routine-browser", "think-routine__browser", className),
31
31
  ...props,
32
32
  children: [
33
33
  /* @__PURE__ */ jsx("h2", {
34
- className: "think-routine-library__title sigvelo-visually-hidden",
34
+ className: "sigvelo-visually-hidden",
35
35
  children: "Schedules"
36
36
  }),
37
37
  /* @__PURE__ */ jsxs("div", {
38
- className: "think-routine-library__browser-toolbar",
38
+ className: "think-routine__browser-toolbar",
39
39
  children: [/* @__PURE__ */ jsx(ToggleGroup.Root, {
40
40
  segmented: true,
41
- className: "think-routine-library__filters",
41
+ className: "think-routine__filters",
42
42
  size: "sm",
43
43
  "aria-label": "Filter schedules",
44
44
  value: [filter],
@@ -75,10 +75,10 @@ function ThinkRoutineBrowser({ className, routines, selectedRoutineId, showOwner
75
75
  }) })] }) : null]
76
76
  }),
77
77
  /* @__PURE__ */ jsxs(SearchField.Root, {
78
- className: "think-routine-library__search",
78
+ className: "think-routine__search",
79
79
  name: "routine-search",
80
80
  children: [/* @__PURE__ */ jsx(SearchField.Label, {
81
- className: "think-routine-library__title sigvelo-visually-hidden",
81
+ className: "sigvelo-visually-hidden",
82
82
  children: "Search schedules"
83
83
  }), /* @__PURE__ */ jsx(SearchField.Control, {
84
84
  value: query,
@@ -87,7 +87,7 @@ function ThinkRoutineBrowser({ className, routines, selectedRoutineId, showOwner
87
87
  })]
88
88
  }),
89
89
  /* @__PURE__ */ jsxs("p", {
90
- className: "think-routine-library__status sigvelo-visually-hidden",
90
+ className: "sigvelo-visually-hidden",
91
91
  role: "status",
92
92
  "aria-atomic": "true",
93
93
  children: [
@@ -98,7 +98,7 @@ function ThinkRoutineBrowser({ className, routines, selectedRoutineId, showOwner
98
98
  ]
99
99
  }),
100
100
  visibleRoutines.length ? /* @__PURE__ */ jsx("ul", {
101
- className: "think-routine-library__routine-list",
101
+ className: "think-routine__routine-list",
102
102
  role: "list",
103
103
  children: visibleRoutines.map((routine) => {
104
104
  const selected = routine.id === selectedRoutineId;
@@ -113,19 +113,21 @@ function ThinkRoutineBrowser({ className, routines, selectedRoutineId, showOwner
113
113
  className: "think-routine-browser__routine"
114
114
  }),
115
115
  "aria-current": selected ? "page" : void 0,
116
- onClick: onRoutineLinkClick,
116
+ onClick: (event) => {
117
+ if (isPlainPrimaryLinkActivation(event)) onRoutineLinkClick?.(event);
118
+ },
117
119
  children: [
118
120
  /* @__PURE__ */ jsx("span", {
119
- className: "think-routine-library__routine-status",
121
+ className: "think-routine__routine-status",
120
122
  "data-enabled": routine.enabled || void 0,
121
123
  "aria-hidden": "true"
122
124
  }),
123
125
  /* @__PURE__ */ jsx("span", {
124
- className: "think-routine-library__title sigvelo-visually-hidden",
126
+ className: "sigvelo-visually-hidden",
125
127
  children: routine.enabled ? "Active" : "Paused"
126
128
  }),
127
129
  /* @__PURE__ */ jsxs("span", {
128
- className: "think-routine-library__routine-copy",
130
+ className: "think-routine__routine-copy",
129
131
  children: [
130
132
  /* @__PURE__ */ jsx("strong", { children: routine.name }),
131
133
  /* @__PURE__ */ jsx("span", { children: routine.task.schedule }),
@@ -1,6 +1,6 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { getThinkRoutineNextRun } from "./ThinkRoutine.js";
3
2
  import { Switch } from "../foundations/Switch.js";
3
+ import { getThinkRoutineNextRun } from "./ThinkRoutine.js";
4
4
  import { ThinkRoutineRuns } from "./ThinkRoutineRuns.js";
5
5
  import * as React from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -16,14 +16,14 @@ function ThinkRoutineDetail({ busy = false, className, routine, showOwner = true
16
16
  const enabledLabelId = React.useId();
17
17
  return /* @__PURE__ */ jsxs("article", {
18
18
  ref,
19
- className: cx("think-routine-detail", "think-routine-library__detail", className),
19
+ className: cx("think-routine-detail", "think-routine__detail", className),
20
20
  "aria-labelledby": titleId,
21
21
  ...props,
22
22
  children: [
23
23
  /* @__PURE__ */ jsx("header", {
24
- className: "think-routine-library__detail-header",
24
+ className: "think-routine__detail-header",
25
25
  children: /* @__PURE__ */ jsxs("div", {
26
- className: "think-routine-library__detail-heading",
26
+ className: "think-routine__detail-heading",
27
27
  children: [/* @__PURE__ */ jsx("h1", {
28
28
  id: titleId,
29
29
  children: routine.name
@@ -31,33 +31,33 @@ function ThinkRoutineDetail({ busy = false, className, routine, showOwner = true
31
31
  })
32
32
  }),
33
33
  /* @__PURE__ */ jsxs("div", {
34
- className: "think-routine-library__detail-grid",
34
+ className: "think-routine__detail-grid",
35
35
  children: [/* @__PURE__ */ jsxs("section", {
36
- className: "think-routine-library__definition",
36
+ className: "think-routine__definition",
37
37
  "aria-labelledby": definitionId,
38
38
  children: [/* @__PURE__ */ jsx("div", {
39
- className: "think-routine-library__section-heading",
39
+ className: "think-routine__section-heading",
40
40
  children: /* @__PURE__ */ jsx("h2", {
41
41
  id: definitionId,
42
42
  children: "Instructions"
43
43
  })
44
44
  }), /* @__PURE__ */ jsx("p", {
45
- className: "think-routine-library__instructions",
45
+ className: "think-routine__instructions",
46
46
  children: taskInstructions(routine)
47
47
  })]
48
48
  }), /* @__PURE__ */ jsxs("aside", {
49
- className: "think-routine-library__settings",
49
+ className: "think-routine__settings",
50
50
  "aria-labelledby": settingsId,
51
51
  children: [
52
52
  /* @__PURE__ */ jsx("div", {
53
- className: "think-routine-library__section-heading",
53
+ className: "think-routine__section-heading",
54
54
  children: /* @__PURE__ */ jsx("h2", {
55
55
  id: settingsId,
56
56
  children: "Schedule"
57
57
  })
58
58
  }),
59
59
  /* @__PURE__ */ jsxs("dl", {
60
- className: "think-routine-library__facts",
60
+ className: "think-routine__facts",
61
61
  children: [
62
62
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: "Repeats" }), /* @__PURE__ */ jsx("dd", { children: routine.task.schedule })] }),
63
63
  routine.schedule ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: "Next run" }), /* @__PURE__ */ jsx("dd", { children: getThinkRoutineNextRun(routine) })] }) : null,
@@ -65,7 +65,7 @@ function ThinkRoutineDetail({ busy = false, className, routine, showOwner = true
65
65
  ]
66
66
  }),
67
67
  /* @__PURE__ */ jsxs("div", {
68
- className: "think-routine-library__status-control",
68
+ className: "think-routine__status-control",
69
69
  children: [/* @__PURE__ */ jsx("div", {
70
70
  id: enabledLabelId,
71
71
  children: /* @__PURE__ */ jsx("strong", { children: "Enabled" })
@@ -32,6 +32,7 @@ interface ThinkRoutineFormProps extends Omit<React.HTMLAttributes<HTMLDivElement
32
32
  routine?: ThinkRoutineFormRoutine;
33
33
  /** App-authored TanStack Router Link to the routine catalog. */
34
34
  cancelLink?: React.ReactElement;
35
+ /** Receives the validated routine fields when the user creates or updates the schedule. */
35
36
  onSubmit: (value: ThinkRoutineFormValue) => void | Promise<void>;
36
37
  }
37
38
  /** Complete create/edit surface for a prompt-based Think scheduled task. */
@@ -43,7 +44,7 @@ declare function ThinkRoutineForm({
43
44
  ref,
44
45
  ...props
45
46
  }: ThinkRoutineFormProps & {
46
- ref?: React.Ref<HTMLDivElement>;
47
+ /** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
47
48
  }): React.JSX.Element;
48
49
  //#endregion
49
50
  export { ThinkRoutineForm, ThinkRoutineFormProps, ThinkRoutineFormRoutine, ThinkRoutineFormSchedule, ThinkRoutineFormValue };
@@ -5,9 +5,9 @@ import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
5
5
  import { Field } from "../foundations/Field.js";
6
6
  import { Form } from "../foundations/Form.js";
7
7
  import { Textarea } from "../foundations/Textarea.js";
8
- import { Select } from "../foundations/Select.js";
9
8
  import { AppTopBar } from "../general-purpose/AppTopBar.js";
10
9
  import { Fieldset } from "../foundations/Fieldset.js";
10
+ import { Select } from "../foundations/Select.js";
11
11
  import { Checkbox } from "../foundations/Checkbox.js";
12
12
  import { CheckboxGroup } from "../foundations/CheckboxGroup.js";
13
13
  import { Combobox } from "../foundations/Combobox.js";
@@ -101,7 +101,7 @@ function timezoneOptions() {
101
101
  const TIMEZONE_OPTIONS = timezoneOptions();
102
102
  function RoutineSelect({ label, onValueChange, options, value }) {
103
103
  return /* @__PURE__ */ jsx("div", {
104
- className: "think-routine-library__select-field",
104
+ className: "think-routine__select-field",
105
105
  children: /* @__PURE__ */ jsxs(Select.Root, {
106
106
  items: options,
107
107
  value,
@@ -198,7 +198,7 @@ function ThinkRoutineForm({ cancelLink, className, routine, onSubmit, ref, ...pr
198
198
  }
199
199
  return /* @__PURE__ */ jsxs("div", {
200
200
  ref,
201
- className: cx("think-routine-library", "think-routine-library__editor", className),
201
+ className: cx("think-routine__editor", className),
202
202
  ...props,
203
203
  children: [
204
204
  /* @__PURE__ */ jsxs(AppTopBar.Root, {
@@ -210,18 +210,18 @@ function ThinkRoutineForm({ cancelLink, className, routine, onSubmit, ref, ...pr
210
210
  }) }) : null, /* @__PURE__ */ jsx(AppTopBar.Title, { children: editing ? "Edit schedule" : "New schedule" })]
211
211
  }),
212
212
  error ? /* @__PURE__ */ jsxs("div", {
213
- className: "think-routine-library__editor-error",
213
+ className: "think-routine__editor-error",
214
214
  role: "alert",
215
215
  children: [/* @__PURE__ */ jsx(WarningIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", { children: error })]
216
216
  }) : null,
217
217
  /* @__PURE__ */ jsxs("main", {
218
- className: "think-routine-form think-routine-library__create",
218
+ className: "think-routine-form think-routine__create",
219
219
  "aria-labelledby": titleId,
220
220
  children: [/* @__PURE__ */ jsx("header", {
221
- className: "think-routine-library__create-header",
221
+ className: "think-routine__create-header",
222
222
  children: /* @__PURE__ */ jsxs("div", { children: [
223
223
  /* @__PURE__ */ jsx("p", {
224
- className: "think-routine-library__eyebrow",
224
+ className: "think-routine__eyebrow",
225
225
  children: editing ? "Edit schedule" : "New schedule"
226
226
  }),
227
227
  /* @__PURE__ */ jsx("h1", {
@@ -231,7 +231,7 @@ function ThinkRoutineForm({ cancelLink, className, routine, onSubmit, ref, ...pr
231
231
  /* @__PURE__ */ jsx("p", { children: "Each run starts a new conversation with these instructions." })
232
232
  ] })
233
233
  }), /* @__PURE__ */ jsxs(Form, {
234
- className: "think-routine-library__form",
234
+ className: "think-routine__form",
235
235
  validationMode: "onBlur",
236
236
  onSubmit: submit,
237
237
  children: [/* @__PURE__ */ jsxs(Field.Group, { children: [
@@ -279,7 +279,7 @@ function ThinkRoutineForm({ cancelLink, className, routine, onSubmit, ref, ...pr
279
279
  onValueChange: setScheduleKind
280
280
  }),
281
281
  scheduleKind === "interval" ? /* @__PURE__ */ jsxs("div", {
282
- className: "think-routine-library__form-row",
282
+ className: "think-routine__form-row",
283
283
  children: [/* @__PURE__ */ jsxs(Field.Root, {
284
284
  name: "interval",
285
285
  children: [/* @__PURE__ */ jsx(Field.Label, {
@@ -341,7 +341,7 @@ function ThinkRoutineForm({ cancelLink, className, routine, onSubmit, ref, ...pr
341
341
  }) : null
342
342
  ]
343
343
  }) : null, /* @__PURE__ */ jsxs("div", {
344
- className: "think-routine-library__form-row",
344
+ className: "think-routine__form-row",
345
345
  children: [/* @__PURE__ */ jsxs(Field.Root, {
346
346
  name: "time",
347
347
  children: [
@@ -410,7 +410,7 @@ function ThinkRoutineForm({ cancelLink, className, routine, onSubmit, ref, ...pr
410
410
  })]
411
411
  })] })
412
412
  ] }), /* @__PURE__ */ jsxs("footer", {
413
- className: "think-routine-library__form-actions",
413
+ className: "think-routine__form-actions",
414
414
  children: [cancelLink ? /* @__PURE__ */ jsx(Button, {
415
415
  variant: "ghost",
416
416
  color: "neutral",
@@ -12,17 +12,17 @@ function ThinkRoutineRuns({ className, runs, title = "Recent runs", emptyState =
12
12
  const titleId = React.useId();
13
13
  return /* @__PURE__ */ jsxs("section", {
14
14
  ref,
15
- className: cx("think-routine-runs", "think-routine-library__runs", className),
15
+ className: cx("think-routine-runs", "think-routine__runs", className),
16
16
  "aria-labelledby": titleId,
17
17
  ...props,
18
18
  children: [/* @__PURE__ */ jsx("div", {
19
- className: "think-routine-library__section-heading",
19
+ className: "think-routine__section-heading",
20
20
  children: /* @__PURE__ */ jsx("h2", {
21
21
  id: titleId,
22
22
  children: title
23
23
  })
24
24
  }), runs.length ? /* @__PURE__ */ jsx("ol", {
25
- className: "think-routine-library__run-list",
25
+ className: "think-routine__run-list",
26
26
  children: runs.map((run) => {
27
27
  const kind = isThinkSubmissionRun(run) ? "submission" : "workflow";
28
28
  const content = /* @__PURE__ */ jsx(ThinkExecutionRunSummary, { run });
@@ -30,7 +30,7 @@ function ThinkRoutineRuns({ className, runs, title = "Recent runs", emptyState =
30
30
  variant: "ghost",
31
31
  color: "neutral",
32
32
  size: "sm",
33
- className: "think-routine-library__run"
33
+ className: "think-routine__run"
34
34
  });
35
35
  return /* @__PURE__ */ jsx("li", { children: renderRunLink ? /* @__PURE__ */ jsx(NavigationLink, {
36
36
  render: renderRunLink(run),
@@ -38,12 +38,12 @@ function ThinkRoutineRuns({ className, runs, title = "Recent runs", emptyState =
38
38
  "aria-label": getThinkExecutionRunAccessibleName(run),
39
39
  children: content
40
40
  }) : /* @__PURE__ */ jsx("div", {
41
- className: "think-routine-library__run",
41
+ className: "think-routine__run",
42
42
  children: content
43
43
  }) }, `${kind}:${getThinkExecutionRunId(run)}`);
44
44
  })
45
45
  }) : /* @__PURE__ */ jsx(EmptyState, {
46
- className: "think-routine-library__empty-runs",
46
+ className: "think-routine__empty-runs",
47
47
  description: emptyState
48
48
  })]
49
49
  });
@@ -1,2 +1,91 @@
1
- import { a as ThinkThreadStatusIndicatorsProps, i as ThinkThreadStatusIndicators, n as ThinkThreadPicker, o as ThinkThreadStatusSummary, r as ThinkThreadPickerProps, s as summarizeThinkThreads, t as ThinkThreadItem } from "../../ThinkThreadPicker-yFz4vvIf.js";
1
+ import * as React from "react";
2
+
3
+ //#region src/components/agents-sdk/ThinkThreadPicker.d.ts
4
+ interface ThinkThreadItem {
5
+ /** Stable child-agent/thread id used by the app-authored link's route params. */
6
+ id: string;
7
+ /** Human-readable thread title, usually generated by the parent Think agent. */
8
+ title: string;
9
+ /** Optional parent-owned preview for apps that render their own richer sidebar. */
10
+ lastMessagePreview?: string;
11
+ /** Timestamp from the parent registry or metadata row. `updatedAt` wins over `createdAt`. */
12
+ createdAt?: Date | number;
13
+ /** Timestamp from parent-owned thread metadata when available. */
14
+ updatedAt?: Date | number;
15
+ /** Preformatted timestamp label when the app already has one, such as "14m". */
16
+ updatedAtLabel?: string;
17
+ /** Optional upstream/app status string. The picker only displays it; it does not derive it. */
18
+ status?: string;
19
+ /** Human label for `status` when the raw upstream value is not user-facing. */
20
+ statusLabel?: string;
21
+ }
22
+ interface ThinkThreadStatusSummary {
23
+ /** Threads currently processing a turn. */
24
+ running: number;
25
+ /** Completed or interrupted background threads that have not been reviewed. */
26
+ attention: number;
27
+ /** Threads whose latest turn failed. */
28
+ failed: number;
29
+ }
30
+ interface ThinkThreadStatusIndicatorsProps {
31
+ summary: ThinkThreadStatusSummary;
32
+ className?: string;
33
+ }
34
+ interface ThinkThreadPickerProps<Thread extends ThinkThreadItem = ThinkThreadItem> extends Omit<React.HTMLAttributes<HTMLElement>, "onSelect" | "title"> {
35
+ /** Threads from the parent agent, already sorted in the order the app wants to show. */
36
+ threads: readonly Thread[];
37
+ /**
38
+ * Renders the application-owned TanStack Router Link for a thread.
39
+ *
40
+ * Put `to`, `params`, `search`, and active state on this element so they stay
41
+ * inferred from the consuming application's registered route tree.
42
+ */
43
+ renderThreadLink: (thread: Thread) => React.ReactElement;
44
+ /**
45
+ * App-authored TanStack Router Link to the new-thread screen. A thread
46
+ * created on click is an empty thread until someone writes in it.
47
+ */
48
+ createThreadLink?: React.ReactElement;
49
+ /**
50
+ * Notified on unmodified primary activation. The link still navigates — the
51
+ * route is the selection — so this is for side effects such as closing a
52
+ * compact drawer, never for performing the selection itself.
53
+ */
54
+ onSelect?: (thread: Thread) => void;
55
+ /** Optional parent-agent delete action, usually `parent.stub.deleteThread(thread.id)`. */
56
+ onDelete?: (thread: Thread) => void | Promise<void>;
57
+ /** Visible heading for the roster. */
58
+ title?: React.ReactNode;
59
+ /** Accessible label for the list navigation. */
60
+ "aria-label"?: string;
61
+ }
62
+ declare function summarizeThinkThreads(threads: readonly Pick<ThinkThreadItem, "status">[]): ThinkThreadStatusSummary;
63
+ declare function ThinkThreadStatusIndicators({
64
+ summary,
65
+ className
66
+ }: ThinkThreadStatusIndicatorsProps): React.JSX.Element | null;
67
+ /**
68
+ * Thread roster UI for sub-agent chat apps.
69
+ *
70
+ * This component does not call Think or Cloudflare RPC methods directly. Feed
71
+ * it from the parent agent's roster method, then render app-owned route links
72
+ * that select the child `useAgent({ sub: [...] })` name. Keep backend contract
73
+ * notes beside the parent Think agent because
74
+ * `listThreads()`/`createThread()`/`deleteThread()` are app-owned.
75
+ */
76
+ declare function ThinkThreadPicker<Thread extends ThinkThreadItem>({
77
+ threads,
78
+ renderThreadLink,
79
+ createThreadLink,
80
+ onSelect,
81
+ onDelete,
82
+ className,
83
+ title,
84
+ "aria-label": ariaLabel,
85
+ ref,
86
+ ...props
87
+ }: ThinkThreadPickerProps<Thread> & {
88
+ /** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLElement>;
89
+ }): React.JSX.Element;
90
+ //#endregion
2
91
  export { ThinkThreadItem, ThinkThreadPicker, ThinkThreadPickerProps, ThinkThreadStatusIndicators, ThinkThreadStatusIndicatorsProps, ThinkThreadStatusSummary, summarizeThinkThreads };
@@ -2,12 +2,12 @@ import { t as cx } from "../../class-names-BiMDVpUo.js";
2
2
  import { B as PlusIcon, K as SpinnerIcon, _ as DotIcon, et as WarningIcon, t as ArchiveIcon } from "../../icons-cuEtsgj9.js";
3
3
  import { Button, buttonVariants } from "../foundations/Button.js";
4
4
  import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
5
- import { EmptyState } from "../foundations/EmptyState.js";
6
5
  import { ScrollArea } from "../foundations/ScrollArea.js";
6
+ import { EmptyState } from "../foundations/EmptyState.js";
7
+ import { AlertDialog } from "../foundations/AlertDialog.js";
7
8
  import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
8
9
  import { LinkButton } from "../foundations/LinkButton.js";
9
10
  import { SearchField } from "../foundations/SearchField.js";
10
- import { AlertDialog } from "../foundations/AlertDialog.js";
11
11
  import * as React from "react";
12
12
  import { jsx, jsxs } from "react/jsx-runtime";
13
13
  //#region src/components/agents-sdk/ThinkThreadPicker.tsx
@@ -1,2 +1,2 @@
1
- import { A as workspaceInfoQueryOptions, C as useWorkspace, D as workspaceDirectoryQueryPrefix, E as workspaceDirectoryQueryOptions, M as workspaceTextFileQueryOptions, O as workspaceFileAssetQueryOptions, S as WorkspaceTextFileQueryOptions, T as workspaceDirectoryQueryKey, _ as WorkspaceQueryOptions, a as WorkspaceDirectoryQueryOptions, b as WorkspaceState, c as WorkspaceFileQueryKey, d as WorkspaceFileStatQueryOptions, f as WorkspaceFileVersion, g as WorkspaceQueryKey, h as WorkspaceInfoQueryOptions, i as WorkspaceDirectoryQueryKey, j as workspaceQueryKey, k as workspaceFileStatQueryOptions, l as WorkspaceFileReadTarget, m as WorkspaceInfoQueryKey, n as WorkspaceBinaryFileQueryKey, o as WorkspaceFileAssetQueryKey, p as WorkspaceInfo, r as WorkspaceBinaryFileQueryOptions, s as WorkspaceFileAssetQueryOptions, t as UseWorkspaceOptions, u as WorkspaceFileStatQueryKey, v as WorkspaceResolvedAsset, w as workspaceBinaryFileQueryOptions, x as WorkspaceTextFileQueryKey, y as WorkspaceSource } from "../../Workspace-C_zHq9KZ.js";
2
- export { UseWorkspaceOptions, WorkspaceBinaryFileQueryKey, WorkspaceBinaryFileQueryOptions, WorkspaceDirectoryQueryKey, WorkspaceDirectoryQueryOptions, WorkspaceFileAssetQueryKey, WorkspaceFileAssetQueryOptions, WorkspaceFileQueryKey, WorkspaceFileReadTarget, WorkspaceFileStatQueryKey, WorkspaceFileStatQueryOptions, WorkspaceFileVersion, WorkspaceInfo, WorkspaceInfoQueryKey, WorkspaceInfoQueryOptions, WorkspaceQueryKey, WorkspaceQueryOptions, WorkspaceResolvedAsset, WorkspaceSource, WorkspaceState, WorkspaceTextFileQueryKey, WorkspaceTextFileQueryOptions, useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileStatQueryOptions, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions };
1
+ import { A as workspaceFileQueryKey, C as refreshWorkspaceFileQueries, D as workspaceDirectoryQueryOptions, E as workspaceDirectoryQueryKey, F as workspaceTextFileQueryOptions, M as workspaceInfoQueryKey, N as workspaceInfoQueryOptions, O as workspaceDirectoryQueryPrefix, P as workspaceQueryKey, S as WorkspaceTextFileQueryOptions, T as workspaceBinaryFileQueryOptions, _ as WorkspaceQueryOptions, a as WorkspaceDirectoryQueryOptions, b as WorkspaceState, c as WorkspaceFileQueryKey, d as WorkspaceFileStatQueryOptions, f as WorkspaceFileVersion, g as WorkspaceQueryKey, h as WorkspaceInfoQueryOptions, i as WorkspaceDirectoryQueryKey, j as workspaceFileStatQueryOptions, k as workspaceFileAssetQueryOptions, l as WorkspaceFileReadTarget, m as WorkspaceInfoQueryKey, n as WorkspaceBinaryFileQueryKey, o as WorkspaceFileAssetQueryKey, p as WorkspaceInfo, r as WorkspaceBinaryFileQueryOptions, s as WorkspaceFileAssetQueryOptions, t as UseWorkspaceOptions, u as WorkspaceFileStatQueryKey, v as WorkspaceResolvedAsset, w as useWorkspace, x as WorkspaceTextFileQueryKey, y as WorkspaceSource } from "../../Workspace-HzGrWDX3.js";
2
+ export { UseWorkspaceOptions, WorkspaceBinaryFileQueryKey, WorkspaceBinaryFileQueryOptions, WorkspaceDirectoryQueryKey, WorkspaceDirectoryQueryOptions, WorkspaceFileAssetQueryKey, WorkspaceFileAssetQueryOptions, WorkspaceFileQueryKey, WorkspaceFileReadTarget, WorkspaceFileStatQueryKey, WorkspaceFileStatQueryOptions, WorkspaceFileVersion, WorkspaceInfo, WorkspaceInfoQueryKey, WorkspaceInfoQueryOptions, WorkspaceQueryKey, WorkspaceQueryOptions, WorkspaceResolvedAsset, WorkspaceSource, WorkspaceState, WorkspaceTextFileQueryKey, WorkspaceTextFileQueryOptions, refreshWorkspaceFileQueries, useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileQueryKey, workspaceFileStatQueryOptions, workspaceInfoQueryKey, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions };
@@ -75,12 +75,15 @@ function workspaceDirectoryQueryPrefix(sourceKey, root) {
75
75
  function workspaceDirectoryQueryKey(sourceKey, root, path) {
76
76
  return [...workspaceDirectoryQueryPrefix(sourceKey, root), path];
77
77
  }
78
+ /** File-resource prefix shared by the exact resource keys below. */
79
+ function workspaceFileQueryPrefix(sourceKey, root) {
80
+ return [...workspaceQueryKey(sourceKey, root), "file"];
81
+ }
78
82
  function workspaceFileQueryKey(sourceKey, root, requestedPath) {
79
- return [
80
- ...workspaceQueryKey(sourceKey, root),
81
- "file",
82
- requestedPath
83
- ];
83
+ return [...workspaceFileQueryPrefix(sourceKey, root), requestedPath];
84
+ }
85
+ function workspaceInfoQueryKey(sourceKey, root) {
86
+ return [...workspaceQueryKey(sourceKey, root), "info"];
84
87
  }
85
88
  function workspaceFileVersion(target) {
86
89
  return {
@@ -119,7 +122,7 @@ function workspaceDirectoryQueryOptions(source, sourceKey, root, path) {
119
122
  /** Shared workspace-summary options for workspace components and route loaders. */
120
123
  function workspaceInfoQueryOptions(source, sourceKey, root) {
121
124
  return queryOptions({
122
- queryKey: [...workspaceQueryKey(sourceKey, root), "info"],
125
+ queryKey: workspaceInfoQueryKey(sourceKey, root),
123
126
  queryFn: async ({ signal }) => {
124
127
  const info = await source.getWorkspaceInfo();
125
128
  throwIfAborted(signal);
@@ -222,7 +225,7 @@ function workspaceBinaryFileQueryOptions(source, sourceKey, root, target, maxInl
222
225
  retry: false
223
226
  });
224
227
  }
225
- async function refreshWorkspaceFile(queryClient, { source, sourceKey, root, selectedPath, resolveFileAsset, maxInlineAssetBytes }) {
228
+ async function refreshWorkspaceFileQueries(queryClient, { source, sourceKey, root, selectedPath, resolveFileAsset, maxInlineAssetBytes }) {
226
229
  if (!selectedPath) return;
227
230
  const target = await queryClient.fetchQuery({
228
231
  ...workspaceFileStatQueryOptions(source, sourceKey, root, selectedPath),
@@ -237,7 +240,7 @@ async function refreshWorkspaceFile(queryClient, { source, sourceKey, root, sele
237
240
  })) return;
238
241
  }
239
242
  if (target.media) {
240
- const options = workspaceBinaryFileQueryOptions(source, sourceKey, root, target, maxInlineAssetBytes);
243
+ const options = workspaceBinaryFileQueryOptions(source, sourceKey, root, target, maxInlineAssetBytes ?? DEFAULT_MAX_INLINE_ASSET_BYTES);
241
244
  if (queryClient.getQueryState(options.queryKey)) await queryClient.fetchQuery({
242
245
  ...options,
243
246
  staleTime: 0
@@ -296,19 +299,13 @@ function useWorkspace({ source, sourceKey, root = "/", selectedPath, onSelectedP
296
299
  ...workspaceBinaryFileQueryOptions(source, sourceKey, root, queryTarget, normalizedMaxInlineAssetBytes),
297
300
  enabled: statSettled && resolverSettled && !resolvedAsset && Boolean(target.media)
298
301
  });
299
- const entriesByDirectory = React.useMemo(() => {
300
- const entries = {};
301
- for (const [index, path] of directoryPaths.entries()) {
302
- const data = directoryQueries[index]?.data;
303
- if (data) entries[path] = data;
304
- }
305
- return entries;
306
- }, [directoryPaths, directoryQueries]);
307
- const entryByPath = React.useMemo(() => {
308
- const entries = /* @__PURE__ */ new Map();
309
- for (const directoryEntries of Object.values(entriesByDirectory)) for (const entry of directoryEntries) entries.set(entry.path, entry);
310
- return entries;
311
- }, [entriesByDirectory]);
302
+ const entriesByDirectory = {};
303
+ for (const [key, data] of queryClient.getQueriesData({ queryKey: workspaceDirectoryQueryPrefix(sourceKey, root) })) {
304
+ const path = key.at(-1);
305
+ if (typeof path === "string" && data) entriesByDirectory[path] = data;
306
+ }
307
+ const entryByPath = /* @__PURE__ */ new Map();
308
+ for (const directoryEntries of Object.values(entriesByDirectory)) for (const entry of directoryEntries) entryByPath.set(entry.path, entry);
312
309
  const setExpandedPaths = React.useCallback((next) => {
313
310
  latestExpansionRef.current = {
314
311
  scopeKey,
@@ -407,7 +404,7 @@ function useWorkspace({ source, sourceKey, root = "/", selectedPath, onSelectedP
407
404
  staleTime: 0
408
405
  }).catch(() => void 0);
409
406
  if (refreshedDirectories.includes(false)) return;
410
- await refreshWorkspaceFile(queryClient, {
407
+ await refreshWorkspaceFileQueries(queryClient, {
411
408
  source,
412
409
  sourceKey,
413
410
  root,
@@ -444,4 +441,4 @@ function useWorkspace({ source, sourceKey, root = "/", selectedPath, onSelectedP
444
441
  };
445
442
  }
446
443
  //#endregion
447
- export { useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileStatQueryOptions, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions };
444
+ export { refreshWorkspaceFileQueries, useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileQueryKey, workspaceFileStatQueryOptions, workspaceInfoQueryKey, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions };
@@ -1,4 +1,4 @@
1
- import { b as WorkspaceState } from "../../Workspace-C_zHq9KZ.js";
1
+ import { b as WorkspaceState } from "../../Workspace-HzGrWDX3.js";
2
2
  import * as React from "react";
3
3
 
4
4
  //#region src/components/agents-sdk/WorkspaceBrowser.d.ts
@@ -1,5 +1,5 @@
1
1
  import { SearchField } from "../foundations/SearchField.js";
2
- import { i as FileTreeFolder, r as FileTreeFile, t as FileTree } from "../../FileTree-BHebfvkK.js";
2
+ import { i as FileTreeFolder, r as FileTreeFile, t as FileTree } from "../../FileTree-H8mMg4rV.js";
3
3
  import { WorkspaceHeader } from "./WorkspaceHeader.js";
4
4
  import * as React from "react";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { _ as WorkspaceQueryOptions, g as WorkspaceQueryKey } from "../../Workspace-C_zHq9KZ.js";
1
+ import { _ as WorkspaceQueryOptions, g as WorkspaceQueryKey } from "../../Workspace-HzGrWDX3.js";
2
2
  import { QueryClient, QueryFunction } from "@tanstack/react-query";
3
3
 
4
4
  //#region src/components/agents-sdk/WorkspaceConcept.d.ts
@@ -34,6 +34,7 @@ declare function workspaceConceptQueryOptions<TData>({
34
34
  scope,
35
35
  queryFn
36
36
  }: WorkspaceConceptQueryInput<TData>): WorkspaceConceptQueryOptions<TData>;
37
+ declare function workspacePathsOverlap(left: string, right: string): boolean;
37
38
  /**
38
39
  * Invalidate active concept queries touched by an external workspace change.
39
40
  * `root` is required and must be the same root the concept options were built
@@ -41,4 +42,4 @@ declare function workspaceConceptQueryOptions<TData>({
41
42
  */
42
43
  declare function invalidateWorkspaceConceptQueries(queryClient: QueryClient, sourceKey: string, root: string, changedPaths?: readonly string[]): Promise<void>;
43
44
  //#endregion
44
- export { WorkspaceConceptQueryInput, WorkspaceConceptQueryKey, WorkspaceConceptQueryOptions, invalidateWorkspaceConceptQueries, workspaceConceptQueryKey, workspaceConceptQueryOptions, workspaceConceptQueryPrefix };
45
+ export { WorkspaceConceptQueryInput, WorkspaceConceptQueryKey, WorkspaceConceptQueryOptions, invalidateWorkspaceConceptQueries, workspaceConceptQueryKey, workspaceConceptQueryOptions, workspaceConceptQueryPrefix, workspacePathsOverlap };
@@ -19,7 +19,7 @@ function workspaceConceptQueryOptions({ sourceKey, root, concept, scope, queryFn
19
19
  staleTime: Infinity
20
20
  });
21
21
  }
22
- function pathsOverlap(left, right) {
22
+ function workspacePathsOverlap(left, right) {
23
23
  return left === right || left === "/" || right === "/" || left.startsWith(`${right}/`) || right.startsWith(`${left}/`);
24
24
  }
25
25
  /**
@@ -34,9 +34,9 @@ function invalidateWorkspaceConceptQueries(queryClient, sourceKey, root, changed
34
34
  predicate: (query) => {
35
35
  if (!changedPaths || changedPaths.length === 0) return true;
36
36
  const scope = query.queryKey[prefix.length + 1];
37
- return typeof scope === "string" && changedPaths.some((path) => pathsOverlap(scope, path));
37
+ return typeof scope === "string" && changedPaths.some((path) => workspacePathsOverlap(scope, path));
38
38
  }
39
39
  });
40
40
  }
41
41
  //#endregion
42
- export { invalidateWorkspaceConceptQueries, workspaceConceptQueryKey, workspaceConceptQueryOptions, workspaceConceptQueryPrefix };
42
+ export { invalidateWorkspaceConceptQueries, workspaceConceptQueryKey, workspaceConceptQueryOptions, workspaceConceptQueryPrefix, workspacePathsOverlap };