@mcp-b/react-components 0.75.0 → 0.75.2

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 (203) hide show
  1. package/dist/{AgentComputer-KhPwXwh8.js → AgentComputer-B1rKkSUP.js} +14 -14
  2. package/dist/{AgentComputer-BI8RsGzq.d.ts → AgentComputer-MNiC5pQC.d.ts} +3 -3
  3. package/dist/{ChatGptSignInScreen-CLq5cetL.js → ChatGptSignInScreen-CeKZ0htx.js} +1 -1
  4. package/dist/{CodeBlock-ZG47S5e4.js → CodeBlock-DOVQbHdt.js} +1 -1
  5. package/dist/{ComputerCalendar-B3xdMl90.js → ComputerCalendar-WTEQV--E.js} +9 -9
  6. package/dist/{ComputerPresentation-rzx6n36S.js → ComputerPresentation-3f4QYD2Z.js} +5 -5
  7. package/dist/{ExecutionResult-BojdvFEY.js → ExecutionResult-oj5iiK-R.js} +2 -2
  8. package/dist/{FileTree-C7fh3_H5.js → FileTree-BLQF5D2f.js} +1 -1
  9. package/dist/{ManagerOffice-80ZkVjSt.js → ManagerOffice-CU_aPVzD.js} +5 -5
  10. package/dist/{SetupChecklist-BKCMkUuh.js → SetupChecklist-4Qyuw5R1.js} +2 -2
  11. package/dist/{ThinkChatActivity-Cb47dKAW.d.ts → ThinkChatActivity-BdPJiQYr.d.ts} +2 -2
  12. package/dist/{ThinkChatActivitySummary-Hvur11FV.d.ts → ThinkChatActivitySummary-xAIIxiW9.d.ts} +1 -1
  13. package/dist/{ThinkChatToolParts-vSzcCbQW.d.ts → ThinkChatToolParts-kV8Ayg16.d.ts} +0 -8
  14. package/dist/{ThinkSchedule-gDwDmWOF.d.ts → ThinkSchedule-Ce2tV1BF.d.ts} +1 -1
  15. package/dist/{Workspace-mZddFyvP.d.ts → Workspace-Hw8GhSp9.d.ts} +26 -7
  16. package/dist/{WorkspaceAutomation-Dugk4RkK.d.ts → WorkspaceAutomation-BiZzDc4y.d.ts} +2 -2
  17. package/dist/{WorkspaceBrowser-BFdnZrm7.js → WorkspaceBrowser-B7qBJrNE.js} +7 -7
  18. package/dist/{WorkspaceBrowser-CNVAKXXZ.d.ts → WorkspaceBrowser-DYQIXLO8.d.ts} +5 -4
  19. package/dist/{WorkspaceConcept-DqzfZWws.d.ts → WorkspaceConcept-EqNa4417.d.ts} +1 -1
  20. package/dist/{WorkspaceFileCommands-CN2oVUzx.d.ts → WorkspaceFileCommands-DAGsAfrn.d.ts} +2 -2
  21. package/dist/{WorkspaceFileTransfer-D2cOoVyO.js → WorkspaceFileTransfer-DlCEZRuz.js} +13 -11
  22. package/dist/{WorkspaceFileTransfer-D--dVla2.d.ts → WorkspaceFileTransfer-gzr9DQvv.d.ts} +1 -1
  23. package/dist/{codex-model-catalog-CFEGgUAj.d.ts → codex-model-catalog-18yO7dln.d.ts} +8 -8
  24. package/dist/components/agents-sdk/AIProviderDialog.js +3 -3
  25. package/dist/components/agents-sdk/AgentActivity.js +1 -1
  26. package/dist/components/agents-sdk/AgentChat.js +8 -8
  27. package/dist/components/agents-sdk/AgentComputer.d.ts +1 -1
  28. package/dist/components/agents-sdk/AgentComputer.js +1 -1
  29. package/dist/components/agents-sdk/AgentEvent.js +3 -3
  30. package/dist/components/agents-sdk/AgentScreenSwitcher.js +5 -5
  31. package/dist/components/agents-sdk/BrowserLiveScreen.js +1 -1
  32. package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
  33. package/dist/components/agents-sdk/BrowserReplay.js +3 -3
  34. package/dist/components/agents-sdk/BrowserRunPanel.js +3 -3
  35. package/dist/components/agents-sdk/ComputerAutomations.d.ts +3 -3
  36. package/dist/components/agents-sdk/ComputerAutomations.js +13 -13
  37. package/dist/components/agents-sdk/ComputerCalendar.d.ts +1 -1
  38. package/dist/components/agents-sdk/ComputerCalendar.js +1 -1
  39. package/dist/components/agents-sdk/ComputerChannels.js +5 -5
  40. package/dist/components/agents-sdk/ComputerFileThumbnail.d.ts +1 -1
  41. package/dist/components/agents-sdk/ComputerFiles.d.ts +4 -4
  42. package/dist/components/agents-sdk/ComputerFiles.js +16 -17
  43. package/dist/components/agents-sdk/ComputerHome.js +1 -1
  44. package/dist/components/agents-sdk/ComputerHost.d.ts +1 -1
  45. package/dist/components/agents-sdk/ComputerLayout.d.ts +1 -1
  46. package/dist/components/agents-sdk/ComputerNotifications.js +1 -1
  47. package/dist/components/agents-sdk/ComputerPresentation.d.ts +1 -1
  48. package/dist/components/agents-sdk/ComputerPresentation.js +1 -1
  49. package/dist/components/agents-sdk/ComputerScreen.d.ts +1 -1
  50. package/dist/components/agents-sdk/ComputerScreen.js +6 -6
  51. package/dist/components/agents-sdk/ComputerSettings.d.ts +1 -1
  52. package/dist/components/agents-sdk/ComputerSettings.js +7 -7
  53. package/dist/components/agents-sdk/ComputerSpotlight.js +1 -1
  54. package/dist/components/agents-sdk/ComputerViewer.js +2 -2
  55. package/dist/components/agents-sdk/EmployeeApp.js +1 -1
  56. package/dist/components/agents-sdk/EmployeeChat.js +5 -5
  57. package/dist/components/agents-sdk/EmployeeChrome.js +14 -14
  58. package/dist/components/agents-sdk/EmployeeSchedules.d.ts +2 -2
  59. package/dist/components/agents-sdk/EmployeeSchedules.js +2 -2
  60. package/dist/components/agents-sdk/EmployeeStartScreen.js +4 -4
  61. package/dist/components/agents-sdk/ExecutionBoard.js +5 -5
  62. package/dist/components/agents-sdk/ManagerAccountActions.js +3 -3
  63. package/dist/components/agents-sdk/ManagerOffice.d.ts +1 -1
  64. package/dist/components/agents-sdk/ManagerOffice.js +1 -1
  65. package/dist/components/agents-sdk/ManagerOfficeScreens.js +3 -3
  66. package/dist/components/agents-sdk/McpConnectionRequest.js +2 -2
  67. package/dist/components/agents-sdk/McpConnectorForm.js +2 -2
  68. package/dist/components/agents-sdk/McpPluginCatalog.js +5 -5
  69. package/dist/components/agents-sdk/McpServerPicker.js +3 -3
  70. package/dist/components/agents-sdk/ModelSelector.js +5 -5
  71. package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
  72. package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
  73. package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
  74. package/dist/components/agents-sdk/SubagentRunLanes.js +2 -2
  75. package/dist/components/agents-sdk/SubagentRunPanel.js +4 -4
  76. package/dist/components/agents-sdk/SubagentRunSelector.js +1 -1
  77. package/dist/components/agents-sdk/ThinkChat.d.ts +2 -2
  78. package/dist/components/agents-sdk/ThinkChat.js +2 -2
  79. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
  80. package/dist/components/agents-sdk/ThinkChatActivity.js +3 -3
  81. package/dist/components/agents-sdk/ThinkChatActivitySummary.d.ts +1 -1
  82. package/dist/components/agents-sdk/ThinkChatActivitySummary.js +2 -3
  83. package/dist/components/agents-sdk/ThinkChatToolPanels.d.ts +2 -2
  84. package/dist/components/agents-sdk/ThinkChatToolPanels.js +15 -39
  85. package/dist/components/agents-sdk/ThinkChatToolParts.d.ts +1 -1
  86. package/dist/components/agents-sdk/ThinkChatToolParts.js +3 -8
  87. package/dist/components/agents-sdk/ThinkExecutionDetail.js +1 -1
  88. package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
  89. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +6 -6
  90. package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
  91. package/dist/components/agents-sdk/ThinkSchedule.d.ts +1 -1
  92. package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +1 -1
  93. package/dist/components/agents-sdk/ThinkScheduleActions.js +3 -3
  94. package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +1 -1
  95. package/dist/components/agents-sdk/ThinkScheduleBrowser.js +3 -3
  96. package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +2 -2
  97. package/dist/components/agents-sdk/ThinkScheduleDetail.js +4 -4
  98. package/dist/components/agents-sdk/ThinkScheduleForm.d.ts +1 -1
  99. package/dist/components/agents-sdk/ThinkScheduleForm.js +12 -12
  100. package/dist/components/agents-sdk/ThinkThreadPicker.js +5 -5
  101. package/dist/components/agents-sdk/WorkbenchBack.js +1 -1
  102. package/dist/components/agents-sdk/Workspace.d.ts +2 -2
  103. package/dist/components/agents-sdk/Workspace.js +353 -319
  104. package/dist/components/agents-sdk/WorkspaceAutomation.d.ts +1 -1
  105. package/dist/components/agents-sdk/WorkspaceAutomation.js +15 -15
  106. package/dist/components/agents-sdk/WorkspaceAutomationTable.d.ts +1 -1
  107. package/dist/components/agents-sdk/WorkspaceAutomationTable.js +10 -10
  108. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
  109. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  110. package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
  111. package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +1 -1
  112. package/dist/components/agents-sdk/WorkspaceCorrespondence.js +3 -3
  113. package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +2 -2
  114. package/dist/components/agents-sdk/WorkspaceDesktop.js +4 -4
  115. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +4 -3
  116. package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -3
  117. package/dist/components/agents-sdk/WorkspaceFileCommands.d.ts +1 -1
  118. package/dist/components/agents-sdk/WorkspaceFileCommands.js +1 -1
  119. package/dist/components/agents-sdk/WorkspaceFileDetails.js +4 -4
  120. package/dist/components/agents-sdk/WorkspaceFileTransfer.d.ts +1 -1
  121. package/dist/components/agents-sdk/WorkspaceFileTransfer.js +1 -1
  122. package/dist/components/agents-sdk/WorkspaceFileView.js +8 -8
  123. package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
  124. package/dist/components/agents-sdk/WorkspaceLive.d.ts +1 -1
  125. package/dist/components/agents-sdk/WorkspaceLive.js +1 -1
  126. package/dist/components/agents-sdk/WorkspaceLocalFolder.d.ts +1 -1
  127. package/dist/components/agents-sdk/WorkspaceLocalFolder.js +4 -3
  128. package/dist/components/agents-sdk/WorkspaceMountManager.js +1 -1
  129. package/dist/components/agents-sdk/WorkspacePerson.d.ts +2 -2
  130. package/dist/components/agents-sdk/WorkspacePerson.js +3 -3
  131. package/dist/components/agents-sdk/WorkspaceProject.d.ts +2 -2
  132. package/dist/components/agents-sdk/WorkspaceProject.js +4 -4
  133. package/dist/components/ai-sdk/Activity.js +1 -1
  134. package/dist/components/ai-sdk/AgentChatMessageEditor.js +2 -2
  135. package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
  136. package/dist/components/ai-sdk/Approval.js +3 -3
  137. package/dist/components/ai-sdk/Artifact.js +1 -1
  138. package/dist/components/ai-sdk/ChainOfThought.js +1 -1
  139. package/dist/components/ai-sdk/Checkpoint.js +1 -1
  140. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  141. package/dist/components/ai-sdk/ComposerLink.js +1 -1
  142. package/dist/components/ai-sdk/ConnectedAppCards.js +2 -2
  143. package/dist/components/ai-sdk/Conversation.js +1 -1
  144. package/dist/components/ai-sdk/Goal.js +2 -2
  145. package/dist/components/ai-sdk/MediaPreviewCard.js +2 -2
  146. package/dist/components/ai-sdk/Message.js +3 -3
  147. package/dist/components/ai-sdk/MessageScroller.js +1 -1
  148. package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
  149. package/dist/components/ai-sdk/Plan.js +1 -1
  150. package/dist/components/ai-sdk/PromptInput.js +9 -9
  151. package/dist/components/ai-sdk/Queue.js +2 -2
  152. package/dist/components/ai-sdk/Reasoning.js +1 -1
  153. package/dist/components/ai-sdk/Sources.js +1 -1
  154. package/dist/components/ai-sdk/Task.js +1 -1
  155. package/dist/components/ai-sdk/ToolInvocation.js +1 -1
  156. package/dist/components/extension/ChatGptSignInScreen.js +1 -1
  157. package/dist/components/extension/CodexModelSelector.d.ts +1 -1
  158. package/dist/components/extension/CodexModelSelector.js +3 -3
  159. package/dist/components/extension/ConversationTabPicker.js +2 -2
  160. package/dist/components/extension/FirstRunSetup.d.ts +2 -2
  161. package/dist/components/extension/FirstRunSetup.js +13 -13
  162. package/dist/components/foundations/Checkbox.js +2 -2
  163. package/dist/components/foundations/Collapsible.js +1 -1
  164. package/dist/components/foundations/ContextMenu.js +1 -1
  165. package/dist/components/foundations/Favicon.js +1 -1
  166. package/dist/components/foundations/Menubar.js +1 -1
  167. package/dist/components/foundations/SearchField.js +1 -1
  168. package/dist/components/foundations/Select.js +1 -1
  169. package/dist/components/foundations/Stepper.js +1 -1
  170. package/dist/components/foundations/Toast.js +1 -1
  171. package/dist/components/foundations/ToggleGroup.d.ts +1 -1
  172. package/dist/components/foundations/ToggleGroup.js +1 -1
  173. package/dist/components/foundations/icons.js +1 -1
  174. package/dist/components/general-purpose/CommandPalette.js +1 -1
  175. package/dist/components/general-purpose/Commit.js +2 -2
  176. package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
  177. package/dist/components/general-purpose/FileTree.js +1 -1
  178. package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
  179. package/dist/components/general-purpose/PricingPlanCard.js +2 -2
  180. package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
  181. package/dist/components/general-purpose/ResponsiveSidebarShell.js +3 -3
  182. package/dist/components/general-purpose/SettingsFormDialog.js +4 -4
  183. package/dist/components/general-purpose/SetupChecklist.js +1 -1
  184. package/dist/components/general-purpose/TestResults.js +1 -1
  185. package/dist/components/general-purpose/ThemeModeControl.js +1 -1
  186. package/dist/components/general-purpose/WallpaperPicker.js +1 -1
  187. package/dist/components/general-purpose/WebPreview.js +1 -1
  188. package/dist/components/nanites/AgentConnection.js +2 -2
  189. package/dist/components/nanites/AgentToolDetail.js +5 -5
  190. package/dist/{connected-app-drafts-D2ijldOR.js → connected-app-drafts-BcWAz2A5.js} +6 -6
  191. package/dist/{copy-button-UNBY7oXF.js → copy-button-CseE2x9v.js} +1 -1
  192. package/dist/{parts-Bb1aZP2y.js → parts-BH-SeHct.js} +1 -1
  193. package/dist/{scheduled-table-source-6YdnC3Sh.js → scheduled-table-source-D0Pv1_Hb.js} +1 -1
  194. package/dist/utils/codex-model-catalog.d.ts +1 -1
  195. package/dist/{workspace-assets-CadpUKoz.js → workspace-assets-BPkMEXP5.js} +1 -1
  196. package/dist/{workspace-concept-panel-CzxPyGpN.js → workspace-concept-panel-BC2aq8rz.js} +2 -2
  197. package/dist/{workspace-concept-panel-BC2W28pu.d.ts → workspace-concept-panel-Cq7odBRZ.d.ts} +1 -1
  198. package/dist/{workspace-delete-D9ZesEdu.js → workspace-delete-DrV618jg.js} +1 -1
  199. package/dist/{workspace-drag-BNhZIN8F.js → workspace-drag-BldB7Yr3.js} +1 -1
  200. package/dist/{workspace-media-preview-kXaEY4AN.js → workspace-media-preview-B9BmB8Tu.js} +2 -2
  201. package/dist/{workspace-quick-look-BDD-jXn3.js → workspace-quick-look-Dw047GMK.js} +5 -5
  202. package/package.json +2 -2
  203. package/dist/{icons-CNwk7DEu.js → icons-B7D1XaPY.js} +1 -1
@@ -85,7 +85,8 @@ function workspaceFileQueryKey(sourceKey, root, requestedPath) {
85
85
  }
86
86
  /**
87
87
  * The source's summary. It does not depend on the root and each read is a
88
- * whole-workspace aggregate, so every root of one source shares it.
88
+ * whole-workspace aggregate, so every root of one source shares it. Mark it
89
+ * stale with {@link invalidateWorkspaceInfo}, never by cancelling a read.
89
90
  */
90
91
  function workspaceInfoQueryKey(sourceKey) {
91
92
  return [
@@ -94,6 +95,31 @@ function workspaceInfoQueryKey(sourceKey) {
94
95
  "info"
95
96
  ];
96
97
  }
98
+ /** The one follow-up read queued behind each summary read in flight. */
99
+ const summaryFollowUps = /* @__PURE__ */ new WeakMap();
100
+ /**
101
+ * Marks the source's summary stale. Only a mounted reader that shows it reads
102
+ * it again, and never beside a read in flight: a source may walk every file to
103
+ * answer and cannot abort the walk, so every change during one waits for it to
104
+ * land and then shares a single follow-up read.
105
+ */
106
+ function invalidateWorkspaceInfo(queryClient, sourceKey) {
107
+ const queryKey = workspaceInfoQueryKey(sourceKey);
108
+ const inFlight = queryClient.getQueryCache().find({
109
+ queryKey,
110
+ exact: true
111
+ })?.promise;
112
+ if (!inFlight) return queryClient.invalidateQueries({
113
+ queryKey,
114
+ exact: true
115
+ });
116
+ let followUp = summaryFollowUps.get(inFlight);
117
+ if (!followUp) {
118
+ followUp = inFlight.then(() => invalidateWorkspaceInfo(queryClient, sourceKey), () => invalidateWorkspaceInfo(queryClient, sourceKey));
119
+ summaryFollowUps.set(inFlight, followUp);
120
+ }
121
+ return followUp;
122
+ }
97
123
  function workspaceFileVersion(target) {
98
124
  return {
99
125
  path: target.readPath,
@@ -128,15 +154,16 @@ function workspaceDirectoryQueryOptions(source, sourceKey, root, path) {
128
154
  staleTime: Infinity
129
155
  });
130
156
  }
131
- /** Shared workspace-summary options for workspace components and route loaders. */
157
+ /**
158
+ * Shared workspace-summary options for a surface that shows the summary.
159
+ * The read ignores its abort signal, since a source cannot abort its walk: a
160
+ * reader that unmounts mid-read lets it land in the cache, so a reader that
161
+ * mounts next shares it rather than starting a second walk beside it.
162
+ */
132
163
  function workspaceInfoQueryOptions(source, sourceKey) {
133
164
  return queryOptions({
134
165
  queryKey: workspaceInfoQueryKey(sourceKey),
135
- queryFn: async ({ signal }) => {
136
- const info = await source.getWorkspaceInfo();
137
- throwIfAborted(signal);
138
- return info;
139
- },
166
+ queryFn: () => source.getWorkspaceInfo(),
140
167
  staleTime: Infinity
141
168
  });
142
169
  }
@@ -294,210 +321,221 @@ function createDirectoryListingStore(queryClient, sourceKey, root) {
294
321
  * selection, while this hook only keeps local tree expansion state.
295
322
  */
296
323
  function useWorkspace(t0) {
297
- const $ = c(143);
298
- const { source, sourceKey, root: t1, selectedPath, onSelectedPathChange, resolveFileAsset, maxInlineAssetBytes: t2 } = t0;
324
+ const $ = c(146);
325
+ const { source, sourceKey, root: t1, selectedPath, onSelectedPathChange, resolveFileAsset, maxInlineAssetBytes: t2, info: t3 } = t0;
299
326
  const root = t1 === void 0 ? "/" : t1;
300
327
  const maxInlineAssetBytes = t2 === void 0 ? DEFAULT_MAX_INLINE_ASSET_BYTES : t2;
328
+ const showsInfo = t3 === void 0 ? false : t3;
301
329
  const queryClient = useQueryClient();
302
- let t3;
330
+ let t4;
303
331
  if ($[0] !== root || $[1] !== sourceKey) {
304
- t3 = JSON.stringify([sourceKey, root]);
332
+ t4 = JSON.stringify([sourceKey, root]);
305
333
  $[0] = root;
306
334
  $[1] = sourceKey;
307
- $[2] = t3;
308
- } else t3 = $[2];
309
- const scopeKey = t3;
310
- let t4;
335
+ $[2] = t4;
336
+ } else t4 = $[2];
337
+ const scopeKey = t4;
338
+ let t5;
311
339
  if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
312
- t4 = {};
313
- $[3] = t4;
314
- } else t4 = $[3];
315
- const [expandedPathsByScope, setExpandedPathsByScope] = React.useState(t4);
340
+ t5 = {};
341
+ $[3] = t5;
342
+ } else t5 = $[3];
343
+ const [expandedPathsByScope, setExpandedPathsByScope] = React.useState(t5);
316
344
  const expandedPaths = expandedPathsByScope[scopeKey] ?? EMPTY_PATHS;
317
- let t5;
345
+ let t6;
318
346
  if ($[4] !== expandedPaths || $[5] !== scopeKey) {
319
- t5 = {
347
+ t6 = {
320
348
  scopeKey,
321
349
  paths: expandedPaths
322
350
  };
323
351
  $[4] = expandedPaths;
324
352
  $[5] = scopeKey;
325
- $[6] = t5;
326
- } else t5 = $[6];
327
- const latestExpansionRef = React.useRef(t5);
353
+ $[6] = t6;
354
+ } else t6 = $[6];
355
+ const latestExpansionRef = React.useRef(t6);
328
356
  const normalizedMaxInlineAssetBytes = Number.isFinite(maxInlineAssetBytes) && maxInlineAssetBytes >= 0 ? maxInlineAssetBytes : DEFAULT_MAX_INLINE_ASSET_BYTES;
329
- let t6;
357
+ let t7;
330
358
  if ($[7] !== expandedPaths || $[8] !== root) {
331
- t6 = [.../* @__PURE__ */ new Set([root, ...expandedPaths])].sort();
359
+ t7 = [.../* @__PURE__ */ new Set([root, ...expandedPaths])].sort();
332
360
  $[7] = expandedPaths;
333
361
  $[8] = root;
334
- $[9] = t6;
335
- } else t6 = $[9];
336
- const directoryPaths = t6;
337
- let t7;
362
+ $[9] = t7;
363
+ } else t7 = $[9];
364
+ const directoryPaths = t7;
365
+ let t8;
338
366
  if ($[10] !== directoryPaths || $[11] !== root || $[12] !== source || $[13] !== sourceKey) {
339
- let t8;
367
+ let t9;
340
368
  if ($[15] !== root || $[16] !== source || $[17] !== sourceKey) {
341
- t8 = (path) => workspaceDirectoryQueryOptions(source, sourceKey, root, path);
369
+ t9 = (path) => workspaceDirectoryQueryOptions(source, sourceKey, root, path);
342
370
  $[15] = root;
343
371
  $[16] = source;
344
372
  $[17] = sourceKey;
345
- $[18] = t8;
346
- } else t8 = $[18];
347
- t7 = directoryPaths.map(t8);
373
+ $[18] = t9;
374
+ } else t9 = $[18];
375
+ t8 = directoryPaths.map(t9);
348
376
  $[10] = directoryPaths;
349
377
  $[11] = root;
350
378
  $[12] = source;
351
379
  $[13] = sourceKey;
352
- $[14] = t7;
353
- } else t7 = $[14];
354
- let t8;
355
- if ($[19] !== t7) {
356
- t8 = { queries: t7 };
357
- $[19] = t7;
358
- $[20] = t8;
359
- } else t8 = $[20];
360
- const directoryQueries = useQueries(t8);
380
+ $[14] = t8;
381
+ } else t8 = $[14];
361
382
  let t9;
383
+ if ($[19] !== t8) {
384
+ t9 = { queries: t8 };
385
+ $[19] = t8;
386
+ $[20] = t9;
387
+ } else t9 = $[20];
388
+ const directoryQueries = useQueries(t9);
389
+ let t10;
362
390
  if ($[21] !== source || $[22] !== sourceKey) {
363
- t9 = workspaceInfoQueryOptions(source, sourceKey);
391
+ t10 = workspaceInfoQueryOptions(source, sourceKey);
364
392
  $[21] = source;
365
393
  $[22] = sourceKey;
366
- $[23] = t9;
367
- } else t9 = $[23];
368
- const infoQuery = useQuery(t9);
369
- const t10 = selectedPath ?? root;
394
+ $[23] = t10;
395
+ } else t10 = $[23];
370
396
  let t11;
371
- if ($[24] !== root || $[25] !== source || $[26] !== sourceKey || $[27] !== t10) {
372
- t11 = workspaceFileStatQueryOptions(source, sourceKey, root, t10);
373
- $[24] = root;
374
- $[25] = source;
375
- $[26] = sourceKey;
376
- $[27] = t10;
377
- $[28] = t11;
378
- } else t11 = $[28];
379
- const t12 = selectedPath !== null;
380
- let t13;
381
- if ($[29] !== t11 || $[30] !== t12) {
382
- t13 = {
383
- ...t11,
384
- enabled: t12
397
+ if ($[24] !== showsInfo || $[25] !== t10) {
398
+ t11 = {
399
+ ...t10,
400
+ enabled: showsInfo
385
401
  };
386
- $[29] = t11;
402
+ $[24] = showsInfo;
403
+ $[25] = t10;
404
+ $[26] = t11;
405
+ } else t11 = $[26];
406
+ const infoQuery = useQuery(t11);
407
+ const t12 = selectedPath ?? root;
408
+ let t13;
409
+ if ($[27] !== root || $[28] !== source || $[29] !== sourceKey || $[30] !== t12) {
410
+ t13 = workspaceFileStatQueryOptions(source, sourceKey, root, t12);
411
+ $[27] = root;
412
+ $[28] = source;
413
+ $[29] = sourceKey;
387
414
  $[30] = t12;
388
415
  $[31] = t13;
389
416
  } else t13 = $[31];
390
- const statQuery = useQuery(t13);
417
+ const t14 = selectedPath !== null;
418
+ let t15;
419
+ if ($[32] !== t13 || $[33] !== t14) {
420
+ t15 = {
421
+ ...t13,
422
+ enabled: t14
423
+ };
424
+ $[32] = t13;
425
+ $[33] = t14;
426
+ $[34] = t15;
427
+ } else t15 = $[34];
428
+ const statQuery = useQuery(t15);
391
429
  const target = selectedPath === null ? void 0 : statQuery.data;
392
430
  const statSettled = target !== void 0 && statQuery.isSuccess && !statQuery.isFetching;
393
- let t14;
394
- if ($[32] !== root || $[33] !== selectedPath || $[34] !== target) {
395
- t14 = target ?? {
431
+ let t16;
432
+ if ($[35] !== root || $[36] !== selectedPath || $[37] !== target) {
433
+ t16 = target ?? {
396
434
  requestedPath: selectedPath ?? root,
397
435
  readPath: selectedPath ?? root,
398
436
  info: INACTIVE_FILE_INFO,
399
437
  media: null
400
438
  };
401
- $[32] = root;
402
- $[33] = selectedPath;
403
- $[34] = target;
404
- $[35] = t14;
405
- } else t14 = $[35];
406
- const queryTarget = t14;
407
- let t15;
408
- if ($[36] !== target) {
409
- t15 = target ? isWorkspaceTextPath(target.readPath, target.info.mimeType) : false;
410
- $[36] = target;
411
- $[37] = t15;
412
- } else t15 = $[37];
413
- const targetIsText = t15;
414
- const t16 = resolveFileAsset ?? INACTIVE_FILE_ASSET_RESOLVER;
439
+ $[35] = root;
440
+ $[36] = selectedPath;
441
+ $[37] = target;
442
+ $[38] = t16;
443
+ } else t16 = $[38];
444
+ const queryTarget = t16;
415
445
  let t17;
416
- if ($[38] !== queryTarget || $[39] !== root || $[40] !== sourceKey || $[41] !== t16) {
417
- t17 = workspaceFileAssetQueryOptions(sourceKey, root, queryTarget, t16);
418
- $[38] = queryTarget;
419
- $[39] = root;
420
- $[40] = sourceKey;
421
- $[41] = t16;
422
- $[42] = t17;
423
- } else t17 = $[42];
424
- const t18 = statSettled && resolveFileAsset !== void 0;
446
+ if ($[39] !== target) {
447
+ t17 = target ? isWorkspaceTextPath(target.readPath, target.info.mimeType) : false;
448
+ $[39] = target;
449
+ $[40] = t17;
450
+ } else t17 = $[40];
451
+ const targetIsText = t17;
452
+ const t18 = resolveFileAsset ?? INACTIVE_FILE_ASSET_RESOLVER;
425
453
  let t19;
426
- if ($[43] !== t17 || $[44] !== t18) {
427
- t19 = {
428
- ...t17,
429
- enabled: t18
430
- };
431
- $[43] = t17;
454
+ if ($[41] !== queryTarget || $[42] !== root || $[43] !== sourceKey || $[44] !== t18) {
455
+ t19 = workspaceFileAssetQueryOptions(sourceKey, root, queryTarget, t18);
456
+ $[41] = queryTarget;
457
+ $[42] = root;
458
+ $[43] = sourceKey;
432
459
  $[44] = t18;
433
460
  $[45] = t19;
434
461
  } else t19 = $[45];
435
- const assetQuery = useQuery(t19);
462
+ const t20 = statSettled && resolveFileAsset !== void 0;
463
+ let t21;
464
+ if ($[46] !== t19 || $[47] !== t20) {
465
+ t21 = {
466
+ ...t19,
467
+ enabled: t20
468
+ };
469
+ $[46] = t19;
470
+ $[47] = t20;
471
+ $[48] = t21;
472
+ } else t21 = $[48];
473
+ const assetQuery = useQuery(t21);
436
474
  const resolvedAsset = assetQuery.data ?? null;
437
475
  const resolverSettled = !resolveFileAsset || assetQuery.isSuccess && !assetQuery.isFetching;
438
- let t20;
439
- if ($[46] !== queryTarget || $[47] !== root || $[48] !== source || $[49] !== sourceKey) {
440
- t20 = workspaceTextFileQueryOptions(source, sourceKey, root, queryTarget);
441
- $[46] = queryTarget;
442
- $[47] = root;
443
- $[48] = source;
444
- $[49] = sourceKey;
445
- $[50] = t20;
446
- } else t20 = $[50];
447
- const t21 = statSettled && resolverSettled && !resolvedAsset && !target.media && targetIsText;
448
476
  let t22;
449
- if ($[51] !== t20 || $[52] !== t21) {
450
- t22 = {
451
- ...t20,
452
- enabled: t21
453
- };
454
- $[51] = t20;
455
- $[52] = t21;
477
+ if ($[49] !== queryTarget || $[50] !== root || $[51] !== source || $[52] !== sourceKey) {
478
+ t22 = workspaceTextFileQueryOptions(source, sourceKey, root, queryTarget);
479
+ $[49] = queryTarget;
480
+ $[50] = root;
481
+ $[51] = source;
482
+ $[52] = sourceKey;
456
483
  $[53] = t22;
457
484
  } else t22 = $[53];
458
- const textQuery = useQuery(t22);
459
- let t23;
460
- if ($[54] !== normalizedMaxInlineAssetBytes || $[55] !== queryTarget || $[56] !== root || $[57] !== source || $[58] !== sourceKey) {
461
- t23 = workspaceBinaryFileQueryOptions(source, sourceKey, root, queryTarget, normalizedMaxInlineAssetBytes);
462
- $[54] = normalizedMaxInlineAssetBytes;
463
- $[55] = queryTarget;
464
- $[56] = root;
465
- $[57] = source;
466
- $[58] = sourceKey;
467
- $[59] = t23;
468
- } else t23 = $[59];
469
- const t24 = statSettled && resolverSettled && !resolvedAsset && Boolean(target.media);
470
- let t25;
471
- if ($[60] !== t23 || $[61] !== t24) {
472
- t25 = {
473
- ...t23,
474
- enabled: t24
485
+ const t23 = statSettled && resolverSettled && !resolvedAsset && !target.media && targetIsText;
486
+ let t24;
487
+ if ($[54] !== t22 || $[55] !== t23) {
488
+ t24 = {
489
+ ...t22,
490
+ enabled: t23
475
491
  };
476
- $[60] = t23;
477
- $[61] = t24;
492
+ $[54] = t22;
493
+ $[55] = t23;
494
+ $[56] = t24;
495
+ } else t24 = $[56];
496
+ const textQuery = useQuery(t24);
497
+ let t25;
498
+ if ($[57] !== normalizedMaxInlineAssetBytes || $[58] !== queryTarget || $[59] !== root || $[60] !== source || $[61] !== sourceKey) {
499
+ t25 = workspaceBinaryFileQueryOptions(source, sourceKey, root, queryTarget, normalizedMaxInlineAssetBytes);
500
+ $[57] = normalizedMaxInlineAssetBytes;
501
+ $[58] = queryTarget;
502
+ $[59] = root;
503
+ $[60] = source;
504
+ $[61] = sourceKey;
478
505
  $[62] = t25;
479
506
  } else t25 = $[62];
480
- const binaryQuery = useQuery(t25);
481
- let t26;
482
- if ($[63] !== queryClient || $[64] !== root || $[65] !== sourceKey) {
483
- t26 = createDirectoryListingStore(queryClient, sourceKey, root);
484
- $[63] = queryClient;
485
- $[64] = root;
486
- $[65] = sourceKey;
487
- $[66] = t26;
488
- } else t26 = $[66];
489
- const directoryListings = t26;
507
+ const t26 = statSettled && resolverSettled && !resolvedAsset && Boolean(target.media);
508
+ let t27;
509
+ if ($[63] !== t25 || $[64] !== t26) {
510
+ t27 = {
511
+ ...t25,
512
+ enabled: t26
513
+ };
514
+ $[63] = t25;
515
+ $[64] = t26;
516
+ $[65] = t27;
517
+ } else t27 = $[65];
518
+ const binaryQuery = useQuery(t27);
519
+ let t28;
520
+ if ($[66] !== queryClient || $[67] !== root || $[68] !== sourceKey) {
521
+ t28 = createDirectoryListingStore(queryClient, sourceKey, root);
522
+ $[66] = queryClient;
523
+ $[67] = root;
524
+ $[68] = sourceKey;
525
+ $[69] = t28;
526
+ } else t28 = $[69];
527
+ const directoryListings = t28;
490
528
  const entriesByDirectory = React.useSyncExternalStore(directoryListings.subscribe, directoryListings.getSnapshot, directoryListings.getSnapshot);
491
529
  let entryByPath;
492
- if ($[67] !== entriesByDirectory) {
530
+ if ($[70] !== entriesByDirectory) {
493
531
  entryByPath = /* @__PURE__ */ new Map();
494
532
  for (const directoryEntries of Object.values(entriesByDirectory)) for (const entry of directoryEntries) entryByPath.set(entry.path, entry);
495
- $[67] = entriesByDirectory;
496
- $[68] = entryByPath;
497
- } else entryByPath = $[68];
498
- let t27;
499
- if ($[69] !== scopeKey) {
500
- t27 = (next) => {
533
+ $[70] = entriesByDirectory;
534
+ $[71] = entryByPath;
535
+ } else entryByPath = $[71];
536
+ let t29;
537
+ if ($[72] !== scopeKey) {
538
+ t29 = (next) => {
501
539
  latestExpansionRef.current = {
502
540
  scopeKey,
503
541
  paths: next
@@ -507,151 +545,151 @@ function useWorkspace(t0) {
507
545
  [scopeKey]: next
508
546
  }));
509
547
  };
510
- $[69] = scopeKey;
511
- $[70] = t27;
512
- } else t27 = $[70];
513
- const setExpandedPaths = t27;
514
- let t28;
515
- if ($[71] !== onSelectedPathChange) {
516
- t28 = (path_0) => onSelectedPathChange?.(path_0);
517
- $[71] = onSelectedPathChange;
518
- $[72] = t28;
519
- } else t28 = $[72];
520
- const selectFile = t28;
548
+ $[72] = scopeKey;
549
+ $[73] = t29;
550
+ } else t29 = $[73];
551
+ const setExpandedPaths = t29;
552
+ let t30;
553
+ if ($[74] !== onSelectedPathChange) {
554
+ t30 = (path_0) => onSelectedPathChange?.(path_0);
555
+ $[74] = onSelectedPathChange;
556
+ $[75] = t30;
557
+ } else t30 = $[75];
558
+ const selectFile = t30;
521
559
  const selectedError = statQuery.error ?? assetQuery.error ?? textQuery.error ?? binaryQuery.error;
522
560
  let selectedFile = null;
523
561
  if (selectedPath && selectedError) {
524
- let t29;
525
- if ($[73] !== selectedPath) {
526
- t29 = workspaceBasename(selectedPath);
527
- $[73] = selectedPath;
528
- $[74] = t29;
529
- } else t29 = $[74];
530
- const t30 = target?.info ?? null;
531
562
  let t31;
532
- if ($[75] !== selectedError) {
533
- t31 = formatErrorMessage(selectedError);
534
- $[75] = selectedError;
535
- $[76] = t31;
536
- } else t31 = $[76];
537
- let t32;
538
- if ($[77] !== selectedPath || $[78] !== t29 || $[79] !== t30 || $[80] !== t31) {
539
- t32 = {
563
+ if ($[76] !== selectedPath) {
564
+ t31 = workspaceBasename(selectedPath);
565
+ $[76] = selectedPath;
566
+ $[77] = t31;
567
+ } else t31 = $[77];
568
+ const t32 = target?.info ?? null;
569
+ let t33;
570
+ if ($[78] !== selectedError) {
571
+ t33 = formatErrorMessage(selectedError);
572
+ $[78] = selectedError;
573
+ $[79] = t33;
574
+ } else t33 = $[79];
575
+ let t34;
576
+ if ($[80] !== selectedPath || $[81] !== t31 || $[82] !== t32 || $[83] !== t33) {
577
+ t34 = {
540
578
  path: selectedPath,
541
- name: t29,
579
+ name: t31,
542
580
  content: null,
543
581
  asset: null,
544
- info: t30,
545
- error: t31
582
+ info: t32,
583
+ error: t33
546
584
  };
547
- $[77] = selectedPath;
548
- $[78] = t29;
549
- $[79] = t30;
550
- $[80] = t31;
551
- $[81] = t32;
552
- } else t32 = $[81];
553
- selectedFile = t32;
585
+ $[80] = selectedPath;
586
+ $[81] = t31;
587
+ $[82] = t32;
588
+ $[83] = t33;
589
+ $[84] = t34;
590
+ } else t34 = $[84];
591
+ selectedFile = t34;
554
592
  } else if (selectedPath && statSettled && target && resolverSettled) {
555
593
  if (resolvedAsset) {
556
- let t29;
557
- if ($[82] !== selectedPath) {
558
- t29 = workspaceBasename(selectedPath);
559
- $[82] = selectedPath;
560
- $[83] = t29;
561
- } else t29 = $[83];
562
- let t30;
563
- if ($[84] !== resolvedAsset.asset || $[85] !== selectedPath || $[86] !== t29 || $[87] !== target.info) {
564
- t30 = {
594
+ let t31;
595
+ if ($[85] !== selectedPath) {
596
+ t31 = workspaceBasename(selectedPath);
597
+ $[85] = selectedPath;
598
+ $[86] = t31;
599
+ } else t31 = $[86];
600
+ let t32;
601
+ if ($[87] !== resolvedAsset.asset || $[88] !== selectedPath || $[89] !== t31 || $[90] !== target.info) {
602
+ t32 = {
565
603
  path: selectedPath,
566
- name: t29,
604
+ name: t31,
567
605
  content: null,
568
606
  asset: resolvedAsset.asset,
569
607
  info: target.info,
570
608
  error: null
571
609
  };
572
- $[84] = resolvedAsset.asset;
573
- $[85] = selectedPath;
574
- $[86] = t29;
575
- $[87] = target.info;
576
- $[88] = t30;
577
- } else t30 = $[88];
578
- selectedFile = t30;
610
+ $[87] = resolvedAsset.asset;
611
+ $[88] = selectedPath;
612
+ $[89] = t31;
613
+ $[90] = target.info;
614
+ $[91] = t32;
615
+ } else t32 = $[91];
616
+ selectedFile = t32;
579
617
  } else if (target.media && binaryQuery.isSuccess && !binaryQuery.isFetching) {
580
- let t29;
581
- if ($[89] !== selectedPath) {
582
- t29 = workspaceBasename(selectedPath);
583
- $[89] = selectedPath;
584
- $[90] = t29;
585
- } else t29 = $[90];
586
- const t30 = binaryQuery.data?.asset ?? null;
587
618
  let t31;
588
- if ($[91] !== selectedPath || $[92] !== t29 || $[93] !== t30 || $[94] !== target.info) {
589
- t31 = {
619
+ if ($[92] !== selectedPath) {
620
+ t31 = workspaceBasename(selectedPath);
621
+ $[92] = selectedPath;
622
+ $[93] = t31;
623
+ } else t31 = $[93];
624
+ const t32 = binaryQuery.data?.asset ?? null;
625
+ let t33;
626
+ if ($[94] !== selectedPath || $[95] !== t31 || $[96] !== t32 || $[97] !== target.info) {
627
+ t33 = {
590
628
  path: selectedPath,
591
- name: t29,
629
+ name: t31,
592
630
  content: null,
593
- asset: t30,
631
+ asset: t32,
594
632
  info: target.info,
595
633
  error: null
596
634
  };
597
- $[91] = selectedPath;
598
- $[92] = t29;
599
- $[93] = t30;
600
- $[94] = target.info;
635
+ $[94] = selectedPath;
601
636
  $[95] = t31;
602
- } else t31 = $[95];
603
- selectedFile = t31;
637
+ $[96] = t32;
638
+ $[97] = target.info;
639
+ $[98] = t33;
640
+ } else t33 = $[98];
641
+ selectedFile = t33;
604
642
  } else if (targetIsText && textQuery.isSuccess) {
605
- let t29;
606
- if ($[96] !== selectedPath) {
607
- t29 = workspaceBasename(selectedPath);
608
- $[96] = selectedPath;
609
- $[97] = t29;
610
- } else t29 = $[97];
611
- let t30;
612
- if ($[98] !== selectedPath || $[99] !== t29 || $[100] !== target.info || $[101] !== textQuery.data) {
613
- t30 = {
643
+ let t31;
644
+ if ($[99] !== selectedPath) {
645
+ t31 = workspaceBasename(selectedPath);
646
+ $[99] = selectedPath;
647
+ $[100] = t31;
648
+ } else t31 = $[100];
649
+ let t32;
650
+ if ($[101] !== selectedPath || $[102] !== t31 || $[103] !== target.info || $[104] !== textQuery.data) {
651
+ t32 = {
614
652
  path: selectedPath,
615
- name: t29,
653
+ name: t31,
616
654
  content: textQuery.data,
617
655
  asset: null,
618
656
  info: target.info,
619
657
  error: null
620
658
  };
621
- $[98] = selectedPath;
622
- $[99] = t29;
623
- $[100] = target.info;
624
- $[101] = textQuery.data;
625
- $[102] = t30;
626
- } else t30 = $[102];
627
- selectedFile = t30;
659
+ $[101] = selectedPath;
660
+ $[102] = t31;
661
+ $[103] = target.info;
662
+ $[104] = textQuery.data;
663
+ $[105] = t32;
664
+ } else t32 = $[105];
665
+ selectedFile = t32;
628
666
  } else if (!target.media && !targetIsText) {
629
- let t29;
630
- if ($[103] !== selectedPath) {
631
- t29 = workspaceBasename(selectedPath);
632
- $[103] = selectedPath;
633
- $[104] = t29;
634
- } else t29 = $[104];
635
- let t30;
636
- if ($[105] !== selectedPath || $[106] !== t29 || $[107] !== target.info) {
637
- t30 = {
667
+ let t31;
668
+ if ($[106] !== selectedPath) {
669
+ t31 = workspaceBasename(selectedPath);
670
+ $[106] = selectedPath;
671
+ $[107] = t31;
672
+ } else t31 = $[107];
673
+ let t32;
674
+ if ($[108] !== selectedPath || $[109] !== t31 || $[110] !== target.info) {
675
+ t32 = {
638
676
  path: selectedPath,
639
- name: t29,
677
+ name: t31,
640
678
  content: null,
641
679
  asset: null,
642
680
  info: target.info,
643
681
  error: null
644
682
  };
645
- $[105] = selectedPath;
646
- $[106] = t29;
647
- $[107] = target.info;
648
- $[108] = t30;
649
- } else t30 = $[108];
650
- selectedFile = t30;
683
+ $[108] = selectedPath;
684
+ $[109] = t31;
685
+ $[110] = target.info;
686
+ $[111] = t32;
687
+ } else t32 = $[111];
688
+ selectedFile = t32;
651
689
  }
652
690
  }
653
691
  let paths;
654
- if ($[109] !== assetQuery || $[110] !== binaryQuery || $[111] !== directoryPaths || $[112] !== directoryQueries || $[113] !== selectedPath || $[114] !== statQuery || $[115] !== textQuery) {
692
+ if ($[112] !== assetQuery || $[113] !== binaryQuery || $[114] !== directoryPaths || $[115] !== directoryQueries || $[116] !== selectedPath || $[117] !== statQuery || $[118] !== textQuery) {
655
693
  paths = /* @__PURE__ */ new Set();
656
694
  for (const [index, path_1] of directoryPaths.entries()) if (directoryQueries[index]?.isFetching) paths.add(path_1);
657
695
  if (selectedPath && [
@@ -660,28 +698,28 @@ function useWorkspace(t0) {
660
698
  textQuery,
661
699
  binaryQuery
662
700
  ].some(_temp)) paths.add(selectedPath);
663
- $[109] = assetQuery;
664
- $[110] = binaryQuery;
665
- $[111] = directoryPaths;
666
- $[112] = directoryQueries;
667
- $[113] = selectedPath;
668
- $[114] = statQuery;
669
- $[115] = textQuery;
670
- $[116] = paths;
671
- } else paths = $[116];
701
+ $[112] = assetQuery;
702
+ $[113] = binaryQuery;
703
+ $[114] = directoryPaths;
704
+ $[115] = directoryQueries;
705
+ $[116] = selectedPath;
706
+ $[117] = statQuery;
707
+ $[118] = textQuery;
708
+ $[119] = paths;
709
+ } else paths = $[119];
672
710
  const loadingPaths = paths;
673
711
  const rootDirectoryIndex = directoryPaths.indexOf(root);
674
- const isLoading = Boolean(directoryQueries[rootDirectoryIndex]?.isFetching) || infoQuery.isFetching;
675
- let t29;
676
- if ($[117] !== directoryQueries) {
677
- t29 = [...new Set(directoryQueries.map(_temp2).filter(_temp3).map(formatErrorMessage))].join("; ") || null;
678
- $[117] = directoryQueries;
679
- $[118] = t29;
680
- } else t29 = $[118];
681
- const error = t29;
682
- let t30;
683
- if ($[119] !== expandedPaths || $[120] !== normalizedMaxInlineAssetBytes || $[121] !== queryClient || $[122] !== resolveFileAsset || $[123] !== root || $[124] !== scopeKey || $[125] !== selectedPath || $[126] !== source || $[127] !== sourceKey) {
684
- t30 = () => {
712
+ const isLoading = Boolean(directoryQueries[rootDirectoryIndex]?.isFetching) || showsInfo && infoQuery.isFetching;
713
+ let t31;
714
+ if ($[120] !== directoryQueries) {
715
+ t31 = [...new Set(directoryQueries.map(_temp2).filter(_temp3).map(formatErrorMessage))].join("; ") || null;
716
+ $[120] = directoryQueries;
717
+ $[121] = t31;
718
+ } else t31 = $[121];
719
+ const error = t31;
720
+ let t32;
721
+ if ($[122] !== expandedPaths || $[123] !== normalizedMaxInlineAssetBytes || $[124] !== queryClient || $[125] !== resolveFileAsset || $[126] !== root || $[127] !== scopeKey || $[128] !== selectedPath || $[129] !== source || $[130] !== sourceKey) {
722
+ t32 = () => {
685
723
  (async () => {
686
724
  const latestExpandedPaths = latestExpansionRef.current.scopeKey === scopeKey ? latestExpansionRef.current.paths : expandedPaths;
687
725
  const refreshedDirectoryPaths = [.../* @__PURE__ */ new Set([root, ...latestExpandedPaths])].sort();
@@ -697,10 +735,7 @@ function useWorkspace(t0) {
697
735
  return false;
698
736
  }
699
737
  }));
700
- await queryClient.fetchQuery({
701
- ...workspaceInfoQueryOptions(source, sourceKey),
702
- staleTime: 0
703
- }).catch(_temp4);
738
+ invalidateWorkspaceInfo(queryClient, sourceKey);
704
739
  if (refreshedDirectories.includes(false)) return;
705
740
  await refreshWorkspaceFileQueries(queryClient, {
706
741
  source,
@@ -710,58 +745,57 @@ function useWorkspace(t0) {
710
745
  resolveFileAsset,
711
746
  maxInlineAssetBytes: normalizedMaxInlineAssetBytes
712
747
  });
713
- })().catch(_temp5);
748
+ })().catch(_temp4);
714
749
  };
715
- $[119] = expandedPaths;
716
- $[120] = normalizedMaxInlineAssetBytes;
717
- $[121] = queryClient;
718
- $[122] = resolveFileAsset;
719
- $[123] = root;
720
- $[124] = scopeKey;
721
- $[125] = selectedPath;
722
- $[126] = source;
723
- $[127] = sourceKey;
724
- $[128] = t30;
725
- } else t30 = $[128];
726
- const refresh = t30;
727
- const t31 = entryByPath.size > 0 ? entryByPath : EMPTY_ENTRY_BY_PATH;
728
- const t32 = loadingPaths.size > 0 ? loadingPaths : EMPTY_PATHS;
729
- const t33 = infoQuery.data ?? null;
730
- let t34;
731
- if ($[129] !== entriesByDirectory || $[130] !== error || $[131] !== expandedPaths || $[132] !== isLoading || $[133] !== refresh || $[134] !== root || $[135] !== selectFile || $[136] !== selectedFile || $[137] !== selectedPath || $[138] !== setExpandedPaths || $[139] !== t31 || $[140] !== t32 || $[141] !== t33) {
732
- t34 = {
750
+ $[122] = expandedPaths;
751
+ $[123] = normalizedMaxInlineAssetBytes;
752
+ $[124] = queryClient;
753
+ $[125] = resolveFileAsset;
754
+ $[126] = root;
755
+ $[127] = scopeKey;
756
+ $[128] = selectedPath;
757
+ $[129] = source;
758
+ $[130] = sourceKey;
759
+ $[131] = t32;
760
+ } else t32 = $[131];
761
+ const refresh = t32;
762
+ const t33 = entryByPath.size > 0 ? entryByPath : EMPTY_ENTRY_BY_PATH;
763
+ const t34 = loadingPaths.size > 0 ? loadingPaths : EMPTY_PATHS;
764
+ const t35 = showsInfo ? infoQuery.data ?? null : null;
765
+ let t36;
766
+ if ($[132] !== entriesByDirectory || $[133] !== error || $[134] !== expandedPaths || $[135] !== isLoading || $[136] !== refresh || $[137] !== root || $[138] !== selectFile || $[139] !== selectedFile || $[140] !== selectedPath || $[141] !== setExpandedPaths || $[142] !== t33 || $[143] !== t34 || $[144] !== t35) {
767
+ t36 = {
733
768
  root,
734
769
  entriesByDirectory,
735
- entryByPath: t31,
770
+ entryByPath: t33,
736
771
  expandedPaths,
737
772
  setExpandedPaths,
738
773
  selectedPath,
739
774
  selectFile,
740
775
  selectedFile,
741
776
  isLoading,
742
- loadingPaths: t32,
777
+ loadingPaths: t34,
743
778
  error,
744
- info: t33,
779
+ info: t35,
745
780
  refresh
746
781
  };
747
- $[129] = entriesByDirectory;
748
- $[130] = error;
749
- $[131] = expandedPaths;
750
- $[132] = isLoading;
751
- $[133] = refresh;
752
- $[134] = root;
753
- $[135] = selectFile;
754
- $[136] = selectedFile;
755
- $[137] = selectedPath;
756
- $[138] = setExpandedPaths;
757
- $[139] = t31;
758
- $[140] = t32;
759
- $[141] = t33;
760
- $[142] = t34;
761
- } else t34 = $[142];
762
- return t34;
782
+ $[132] = entriesByDirectory;
783
+ $[133] = error;
784
+ $[134] = expandedPaths;
785
+ $[135] = isLoading;
786
+ $[136] = refresh;
787
+ $[137] = root;
788
+ $[138] = selectFile;
789
+ $[139] = selectedFile;
790
+ $[140] = selectedPath;
791
+ $[141] = setExpandedPaths;
792
+ $[142] = t33;
793
+ $[143] = t34;
794
+ $[144] = t35;
795
+ $[145] = t36;
796
+ } else t36 = $[145];
797
+ return t36;
763
798
  }
764
- function _temp5() {}
765
799
  function _temp4() {}
766
800
  function _temp3(queryError) {
767
801
  return queryError !== null;
@@ -773,4 +807,4 @@ function _temp(query) {
773
807
  return query.isFetching;
774
808
  }
775
809
  //#endregion
776
- export { refreshWorkspaceFileQueries, useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileQueryKey, workspaceFileStatQueryOptions, workspaceInfoQueryKey, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions };
810
+ export { invalidateWorkspaceInfo, refreshWorkspaceFileQueries, useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileQueryKey, workspaceFileStatQueryOptions, workspaceInfoQueryKey, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions };