@mcp-b/react-components 0.64.1 → 0.66.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 (116) hide show
  1. package/dist/AgentComputer-2uYB8kmu.js +8084 -0
  2. package/dist/{ExecutionResult-CXnGcmM4.js → ExecutionResult-C7SzVquo.js} +1 -1
  3. package/dist/WallpaperPicker-C-FItmDS.d.ts +34 -0
  4. package/dist/WorkspaceBrowser-Dz48H-7X.d.ts +89 -0
  5. package/dist/{WorkspaceFileCommands-SNIjRgtU.d.ts → WorkspaceFileCommands-1s9Ol8CG.d.ts} +11 -3
  6. package/dist/{WorkspaceMessageResponse-CXGOQgpo.js → WorkspaceMessageResponse-BoeeltJM.js} +1 -1
  7. package/dist/assets/wallpapers/README.md +31 -0
  8. package/dist/assets/wallpapers/alpine.webp +0 -0
  9. package/dist/assets/wallpapers/dusk.webp +0 -0
  10. package/dist/assets/wallpapers/ember.webp +0 -0
  11. package/dist/assets/wallpapers/graphite.webp +0 -0
  12. package/dist/assets/wallpapers/sigvelo.webp +0 -0
  13. package/dist/assets/wallpapers/tide.webp +0 -0
  14. package/dist/automations-host-DPORjdc7.js +17 -0
  15. package/dist/components/agents-sdk/AgentComputer.d.ts +7 -1
  16. package/dist/components/agents-sdk/AgentComputer.js +1 -8044
  17. package/dist/components/agents-sdk/AgentScreenSwitcher.js +1 -0
  18. package/dist/components/agents-sdk/BrowserLiveScreen.d.ts +7 -1
  19. package/dist/components/agents-sdk/BrowserLiveScreen.js +259 -257
  20. package/dist/components/agents-sdk/BrowserRunPanel.d.ts +2 -0
  21. package/dist/components/agents-sdk/BrowserRunPanel.js +1 -0
  22. package/dist/components/agents-sdk/ComputerAutomations.d.ts +70 -0
  23. package/dist/components/agents-sdk/ComputerAutomations.js +1410 -0
  24. package/dist/components/agents-sdk/ComputerCalendar.d.ts +7 -0
  25. package/dist/components/agents-sdk/ComputerCalendar.js +1344 -0
  26. package/dist/components/agents-sdk/ComputerFiles.d.ts +153 -0
  27. package/dist/components/agents-sdk/ComputerFiles.js +2401 -0
  28. package/dist/components/agents-sdk/ComputerHome.d.ts +15 -0
  29. package/dist/components/agents-sdk/ComputerHome.js +90 -0
  30. package/dist/components/agents-sdk/ComputerNotifications.d.ts +54 -0
  31. package/dist/components/agents-sdk/ComputerNotifications.js +692 -0
  32. package/dist/components/agents-sdk/ComputerScreen.d.ts +78 -0
  33. package/dist/components/agents-sdk/ComputerScreen.js +750 -0
  34. package/dist/components/agents-sdk/ComputerSettings.d.ts +69 -0
  35. package/dist/components/agents-sdk/ComputerSettings.js +1371 -0
  36. package/dist/components/agents-sdk/ComputerSpotlight.d.ts +29 -0
  37. package/dist/components/agents-sdk/ComputerSpotlight.js +232 -0
  38. package/dist/components/agents-sdk/ComputerViewer.d.ts +51 -0
  39. package/dist/components/agents-sdk/ComputerViewer.js +339 -0
  40. package/dist/components/agents-sdk/ComputerWallpapers.d.ts +11 -0
  41. package/dist/components/agents-sdk/ComputerWallpapers.js +43 -0
  42. package/dist/components/agents-sdk/EmployeeApp.js +1 -1
  43. package/dist/components/agents-sdk/EmployeeChat.js +1 -1
  44. package/dist/components/agents-sdk/EmployeeChrome.js +4 -4
  45. package/dist/components/agents-sdk/EmployeeSchedules.js +3 -3
  46. package/dist/components/agents-sdk/EmployeeStartScreen.js +1 -1
  47. package/dist/components/agents-sdk/ExecutionBoard.js +1 -1
  48. package/dist/components/agents-sdk/ManagerOffice.js +1 -1
  49. package/dist/components/agents-sdk/ManagerOfficeScreens.js +1 -1
  50. package/dist/components/agents-sdk/McpPluginCatalog.js +1 -1
  51. package/dist/components/agents-sdk/ModelSelector.js +1 -1
  52. package/dist/components/agents-sdk/ThinkChat.js +1 -1
  53. package/dist/components/agents-sdk/ThinkChatActivitySummary.js +1 -1
  54. package/dist/components/agents-sdk/ThinkChatToolPanels.js +5 -5
  55. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +3 -3
  56. package/dist/components/agents-sdk/ThinkFullApp.d.ts +13 -0
  57. package/dist/components/agents-sdk/ThinkFullApp.js +13 -0
  58. package/dist/components/agents-sdk/ThinkScheduleActions.js +1 -1
  59. package/dist/components/agents-sdk/ThinkScheduleDetail.js +3 -3
  60. package/dist/components/agents-sdk/ThinkScheduleForm.js +4 -4
  61. package/dist/components/agents-sdk/WorkspaceAutomation.js +4 -4
  62. package/dist/components/agents-sdk/WorkspaceAutomationTable.js +1 -1
  63. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +2 -88
  64. package/dist/components/agents-sdk/WorkspaceCorrespondence.js +1 -1
  65. package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +1 -1
  66. package/dist/components/agents-sdk/WorkspaceDocumentFrame.d.ts +17 -0
  67. package/dist/components/agents-sdk/WorkspaceDocumentFrame.js +90 -0
  68. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +4 -1
  69. package/dist/components/agents-sdk/WorkspaceExplorer.js +70 -66
  70. package/dist/components/agents-sdk/WorkspaceFileCommands.d.ts +2 -2
  71. package/dist/components/agents-sdk/WorkspaceFileCommands.js +346 -316
  72. package/dist/components/agents-sdk/WorkspaceFileView.d.ts +7 -1
  73. package/dist/components/agents-sdk/WorkspaceFileView.js +83 -71
  74. package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
  75. package/dist/components/agents-sdk/WorkspaceLive.d.ts +2 -4
  76. package/dist/components/agents-sdk/WorkspaceLive.js +18 -11
  77. package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
  78. package/dist/components/agents-sdk/WorkspaceProject.d.ts +2 -1
  79. package/dist/components/agents-sdk/WorkspaceProject.js +7 -4
  80. package/dist/components/ai-sdk/ConnectedAppCards.js +1 -1
  81. package/dist/components/ai-sdk/Goal.d.ts +1 -2
  82. package/dist/components/ai-sdk/Goal.js +1 -2
  83. package/dist/components/extension/FirstRunSetup.d.ts +132 -37
  84. package/dist/components/extension/FirstRunSetup.js +1920 -1567
  85. package/dist/components/general-purpose/CommandPalette.d.ts +6 -1
  86. package/dist/components/general-purpose/CommandPalette.js +90 -82
  87. package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
  88. package/dist/components/general-purpose/StatusScreen.d.ts +6 -1
  89. package/dist/components/general-purpose/StatusScreen.js +44 -36
  90. package/dist/components/general-purpose/ThemeModeControl.js +1 -1
  91. package/dist/components/general-purpose/WallpaperPicker.d.ts +2 -33
  92. package/dist/components/nanites/AgentConnection.js +1 -1
  93. package/dist/parts-BxJC0QVb.js +112 -0
  94. package/dist/styles/agent-computer.css +28 -0
  95. package/dist/styles/base.css +6 -0
  96. package/dist/styles/chatgpt-sign-in-screen.css +2 -0
  97. package/dist/styles/computer-app-tile.css +20 -0
  98. package/dist/styles/computer-automations.css +454 -0
  99. package/dist/styles/computer-calendar.css +648 -0
  100. package/dist/styles/computer-files.css +566 -0
  101. package/dist/styles/computer-home.css +90 -0
  102. package/dist/styles/computer-notifications.css +242 -0
  103. package/dist/styles/computer-screen.css +89 -0
  104. package/dist/styles/computer-settings.css +550 -0
  105. package/dist/styles/computer-spotlight.css +7 -0
  106. package/dist/styles/computer-viewer.css +130 -0
  107. package/dist/styles/first-run-setup.css +107 -96
  108. package/dist/styles/index.css +11 -0
  109. package/dist/styles/recipes.css +42 -0
  110. package/dist/styles/select.css +2 -1
  111. package/dist/styles/switch.css +20 -5
  112. package/dist/styles/workspace-document-frame.css +31 -0
  113. package/package.json +2 -2
  114. package/dist/{ManagerOffice-T79utm-P.js → ManagerOffice-kSK7vTBl.js} +1 -1
  115. package/dist/{WorkspaceLink-DDkj-Tq5.js → WorkspaceLink-DK9kdMUH.js} +1 -1
  116. package/dist/{connected-app-drafts-Bocdg3Z-.js → connected-app-drafts-C49343p9.js} +1 -1
@@ -36,8 +36,14 @@ export interface WorkspaceFileViewProps {
36
36
  * already present the skill identity can omit it while retaining validation.
37
37
  */
38
38
  showSkillIdentity?: boolean;
39
+ /**
40
+ * Body for a file the view cannot preview (an unsupported media type or a
41
+ * file without text), such as a `WorkspaceDocumentFrame`. Returning null
42
+ * keeps the default unsupported message.
43
+ */
44
+ renderUnsupported?: (file: WorkspaceFileState) => React.ReactNode;
39
45
  onRefresh: () => void;
40
46
  }
41
47
  /** Workspace file preview composed from CodeBlock and AppTopBar. */
42
- export declare function WorkspaceFileView({ preview, appearance, header, file, path, isLoading, isRefreshing, leading, actions, showSkillIdentity, view, onViewChange, onRefresh }: WorkspaceFileViewProps): React.JSX.Element;
48
+ export declare function WorkspaceFileView({ preview, appearance, header, file, path, isLoading, isRefreshing, leading, actions, showSkillIdentity, view, onViewChange, renderUnsupported, onRefresh }: WorkspaceFileViewProps): React.JSX.Element;
43
49
  //#endregion
@@ -1,15 +1,15 @@
1
1
  import { E as EyeIcon, mt as WarningIcon, p as CheckIcon, r as ArrowLeftIcon, y as CodeIcon } from "../../icons-nLTnB9kd.js";
2
2
  import { t as CopyButton } from "../../copy-button-DWBVJR6D.js";
3
- import { AppTopBar } from "../general-purpose/AppTopBar.js";
3
+ import { i as useWorkspaceNavigationContext } from "../../WorkspaceLink-DK9kdMUH.js";
4
+ import { useWorkspaceNavigationRestoration } from "./WorkspaceNavigationRestoration.js";
5
+ import { t as ExecutionResult } from "../../ExecutionResult-C7SzVquo.js";
4
6
  import { t as ContentAppBarOutletContext } from "../../app-bar-outlet-BEIGl9iF.js";
5
- import { a as CodeBlockCopyButton, i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "../../CodeBlock-dt0L8md0.js";
7
+ import { AppTopBar } from "../general-purpose/AppTopBar.js";
6
8
  import { inferWorkspaceLanguage, inferWorkspaceMedia, isWorkspaceMarkdownPath, isWorkspaceSkillPath, parseWorkspaceSkill } from "./WorkspaceFile.js";
7
- import { i as useWorkspaceNavigationContext } from "../../WorkspaceLink-DDkj-Tq5.js";
8
- import { useWorkspaceNavigationRestoration } from "./WorkspaceNavigationRestoration.js";
9
- import { t as ExecutionResult } from "../../ExecutionResult-CXnGcmM4.js";
10
- import { n as WorkspaceMessageResponse, r as createWorkspaceRehypePlugins } from "../../WorkspaceMessageResponse-CXGOQgpo.js";
11
9
  import { WorkspaceHeader } from "./WorkspaceHeader.js";
12
10
  import { i as useWorkspaceAssetUrl, n as WorkspaceMediaPreview, t as WorkspaceAssetActions } from "../../workspace-media-preview-B4iB5Tvi.js";
11
+ import { a as CodeBlockCopyButton, i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "../../CodeBlock-dt0L8md0.js";
12
+ import { n as WorkspaceMessageResponse, r as createWorkspaceRehypePlugins } from "../../WorkspaceMessageResponse-BoeeltJM.js";
13
13
  import { WorkspaceFileDetails } from "./WorkspaceFileDetails.js";
14
14
  import { c } from "react/compiler-runtime";
15
15
  import * as React from "react";
@@ -44,10 +44,16 @@ function filePreviewStatus(file, isLoading, assetError, isPreparingAsset, media)
44
44
  role: "alert"
45
45
  };
46
46
  if (isPreparingAsset) return { message: "Preparing file preview..." };
47
- if (file.asset && !media) return { message: "This media type is not supported." };
47
+ if (file.asset && !media) return {
48
+ message: "This media type is not supported.",
49
+ unsupported: true
50
+ };
48
51
  if (file.asset) return null;
49
52
  if (media && file.asset === null) return { message: "This workspace source did not provide preview data for this file." };
50
- if (file.content === null) return { message: "This file has no text preview." };
53
+ if (file.content === null) return {
54
+ message: "This file has no text preview.",
55
+ unsupported: true
56
+ };
51
57
  if (file.content.length === 0) return { message: "This file is empty." };
52
58
  return null;
53
59
  }
@@ -310,8 +316,8 @@ function useWorkspaceFileNavigation(path, file, isLoading, isPreparingAsset) {
310
316
  }
311
317
  /** Workspace file preview composed from CodeBlock and AppTopBar. */
312
318
  function WorkspaceFileView(t0) {
313
- const $ = c(70);
314
- const { preview, appearance: t1, header: t2, file, path, isLoading, isRefreshing, leading, actions, showSkillIdentity: t3, view, onViewChange, onRefresh } = t0;
319
+ const $ = c(73);
320
+ const { preview, appearance: t1, header: t2, file, path, isLoading, isRefreshing, leading, actions, showSkillIdentity: t3, view, onViewChange, renderUnsupported, onRefresh } = t0;
315
321
  const appearance = t1 === void 0 ? "contained" : t1;
316
322
  const header = t2 === void 0 ? "bar" : t2;
317
323
  const showSkillIdentity = t3 === void 0 ? true : t3;
@@ -452,87 +458,93 @@ function WorkspaceFileView(t0) {
452
458
  } else t18 = $[39];
453
459
  const viewActions = t18;
454
460
  const previewing = markdownView === "preview";
455
- const t19 = "workspace-explorer__file";
456
- const t20 = "file";
457
- const T0 = WorkspaceFileBody;
458
- const t21 = filePreviewStatus(file, isLoading, assetUrl.error, isPreparingAsset, media);
459
- const t22 = appearance === "fill" ? "none" : "caption";
460
- const t23 = previewing ? preview : void 0;
461
- let t24;
462
- if ($[40] !== file || $[41] !== isMarkdown || $[42] !== markdownComponents || $[43] !== path || $[44] !== previewing || $[45] !== showSkillIdentity || $[46] !== workspaceRehypePlugins) {
463
- t24 = file && isMarkdown && previewing ? /* @__PURE__ */ jsx(WorkspaceMarkdownArticle, {
461
+ const unavailable = filePreviewStatus(file, isLoading, assetUrl.error, isPreparingAsset, media);
462
+ let t19;
463
+ if ($[40] !== file || $[41] !== renderUnsupported || $[42] !== unavailable?.unsupported) {
464
+ t19 = file && unavailable?.unsupported ? renderUnsupported?.(file) : null;
465
+ $[40] = file;
466
+ $[41] = renderUnsupported;
467
+ $[42] = unavailable?.unsupported;
468
+ $[43] = t19;
469
+ } else t19 = $[43];
470
+ const unsupported = t19;
471
+ const t20 = unsupported == null ? unavailable : null;
472
+ const t21 = appearance === "fill" ? "none" : "caption";
473
+ const t22 = unsupported ?? (previewing ? preview : void 0);
474
+ let t23;
475
+ if ($[44] !== file || $[45] !== isMarkdown || $[46] !== markdownComponents || $[47] !== path || $[48] !== previewing || $[49] !== showSkillIdentity || $[50] !== workspaceRehypePlugins) {
476
+ t23 = file && isMarkdown && previewing ? /* @__PURE__ */ jsx(WorkspaceMarkdownArticle, {
464
477
  file,
465
478
  path,
466
479
  showSkillIdentity,
467
480
  components: markdownComponents,
468
481
  rehypePlugins: workspaceRehypePlugins
469
482
  }) : void 0;
470
- $[40] = file;
471
- $[41] = isMarkdown;
472
- $[42] = markdownComponents;
473
- $[43] = path;
474
- $[44] = previewing;
475
- $[45] = showSkillIdentity;
476
- $[46] = workspaceRehypePlugins;
477
- $[47] = t24;
478
- } else t24 = $[47];
479
- let t25;
480
- if ($[48] !== isRefreshing || $[49] !== onRefresh || $[50] !== path || $[51] !== resolvedLeading || $[52] !== showHeader || $[53] !== viewActions) {
481
- t25 = showHeader ? {
483
+ $[44] = file;
484
+ $[45] = isMarkdown;
485
+ $[46] = markdownComponents;
486
+ $[47] = path;
487
+ $[48] = previewing;
488
+ $[49] = showSkillIdentity;
489
+ $[50] = workspaceRehypePlugins;
490
+ $[51] = t23;
491
+ } else t23 = $[51];
492
+ let t24;
493
+ if ($[52] !== isRefreshing || $[53] !== onRefresh || $[54] !== path || $[55] !== resolvedLeading || $[56] !== showHeader || $[57] !== viewActions) {
494
+ t24 = showHeader ? {
482
495
  path,
483
496
  leading: resolvedLeading,
484
497
  actions: viewActions,
485
498
  isRefreshing,
486
499
  onRefresh
487
500
  } : void 0;
488
- $[48] = isRefreshing;
489
- $[49] = onRefresh;
490
- $[50] = path;
491
- $[51] = resolvedLeading;
492
- $[52] = showHeader;
493
- $[53] = viewActions;
494
- $[54] = t25;
495
- } else t25 = $[54];
496
- let t26;
497
- if ($[55] !== T0 || $[56] !== assetUrl || $[57] !== file || $[58] !== handleScroll || $[59] !== media || $[60] !== t21 || $[61] !== t22 || $[62] !== t23 || $[63] !== t24 || $[64] !== t25) {
498
- t26 = /* @__PURE__ */ jsx(T0, {
501
+ $[52] = isRefreshing;
502
+ $[53] = onRefresh;
503
+ $[54] = path;
504
+ $[55] = resolvedLeading;
505
+ $[56] = showHeader;
506
+ $[57] = viewActions;
507
+ $[58] = t24;
508
+ } else t24 = $[58];
509
+ let t25;
510
+ if ($[59] !== assetUrl || $[60] !== file || $[61] !== handleScroll || $[62] !== media || $[63] !== t20 || $[64] !== t21 || $[65] !== t22 || $[66] !== t23 || $[67] !== t24) {
511
+ t25 = /* @__PURE__ */ jsx(WorkspaceFileBody, {
499
512
  file,
500
- unavailable: t21,
513
+ unavailable: t20,
501
514
  media,
502
- details: t22,
515
+ details: t21,
503
516
  assetUrl,
504
- preview: t23,
505
- markdown: t24,
506
- headerProps: t25,
517
+ preview: t22,
518
+ markdown: t23,
519
+ headerProps: t24,
507
520
  handleScroll
508
521
  });
509
- $[55] = T0;
510
- $[56] = assetUrl;
511
- $[57] = file;
512
- $[58] = handleScroll;
513
- $[59] = media;
514
- $[60] = t21;
515
- $[61] = t22;
516
- $[62] = t23;
517
- $[63] = t24;
518
- $[64] = t25;
519
- $[65] = t26;
520
- } else t26 = $[65];
521
- let t27;
522
- if ($[66] !== appearance || $[67] !== fileViewRef || $[68] !== t26) {
523
- t27 = /* @__PURE__ */ jsx("div", {
522
+ $[59] = assetUrl;
523
+ $[60] = file;
524
+ $[61] = handleScroll;
525
+ $[62] = media;
526
+ $[63] = t20;
527
+ $[64] = t21;
528
+ $[65] = t22;
529
+ $[66] = t23;
530
+ $[67] = t24;
531
+ $[68] = t25;
532
+ } else t25 = $[68];
533
+ let t26;
534
+ if ($[69] !== appearance || $[70] !== fileViewRef || $[71] !== t25) {
535
+ t26 = /* @__PURE__ */ jsx("div", {
524
536
  ref: fileViewRef,
525
- className: t19,
537
+ className: "workspace-explorer__file",
526
538
  "data-appearance": appearance,
527
- "data-workspace-restoration-scope": t20,
528
- children: t26
539
+ "data-workspace-restoration-scope": "file",
540
+ children: t25
529
541
  });
530
- $[66] = appearance;
531
- $[67] = fileViewRef;
532
- $[68] = t26;
533
- $[69] = t27;
534
- } else t27 = $[69];
535
- return t27;
542
+ $[69] = appearance;
543
+ $[70] = fileViewRef;
544
+ $[71] = t25;
545
+ $[72] = t26;
546
+ } else t26 = $[72];
547
+ return t26;
536
548
  }
537
549
  /** Markdown and host previews open rendered for each path; source is one toggle away. */
538
550
  function useWorkspaceFileViewMode(path, controlledView, onViewChange) {
@@ -1,3 +1,3 @@
1
+ import { n as WorkspaceNavigationProvider, r as resolveWorkspaceLink, t as WorkspaceFileLink } from "../../WorkspaceLink-DK9kdMUH.js";
1
2
  import { n as isPlainPrimaryLinkActivation } from "../../navigation-link-DMmtdqsM.js";
2
- import { n as WorkspaceNavigationProvider, r as resolveWorkspaceLink, t as WorkspaceFileLink } from "../../WorkspaceLink-DDkj-Tq5.js";
3
3
  export { WorkspaceFileLink, WorkspaceNavigationProvider, isPlainPrimaryLinkActivation, resolveWorkspaceLink };
@@ -1,6 +1,5 @@
1
1
  import { r as WorkspaceFileAssetResolver } from "../../WorkspaceFile-BJC6vlp_.js";
2
2
  import { y as WorkspaceSource } from "../../Workspace-B9nuTfIi.js";
3
- import { QueryClient } from "@tanstack/react-query";
4
3
  //#region src/components/agents-sdk/WorkspaceLive.d.ts
5
4
  export type WorkspaceChange = {
6
5
  type: "changed";
@@ -20,15 +19,14 @@ export interface WorkspaceChangeSource {
20
19
  */
21
20
  live?(): boolean;
22
21
  }
23
- export declare function invalidateWorkspaceDirectories(queryClient: QueryClient, sourceKey: string, directories: Iterable<string>, root: string): void;
24
22
  export interface UseWorkspaceLiveQueriesOptions {
25
23
  /** Native observer adapter. Omit for hosts without workspace observation. */
26
24
  changes?: WorkspaceChangeSource;
27
25
  sourceKey: string | undefined;
28
26
  /**
29
27
  * The host's workspace boundary. Required, and the same value the concept
30
- * options were built with: invalidation is prefix-matched on it, so a root
31
- * that disagrees with the queries silently invalidates nothing.
28
+ * options were built with: their invalidation is prefix-matched on it, so a
29
+ * root that disagrees with the queries silently invalidates nothing.
32
30
  */
33
31
  root: string;
34
32
  /** Workspace read adapter used to refresh an observed open file in order. */
@@ -1,19 +1,26 @@
1
1
  import { a as workspaceDirname } from "../../workspace-path-TZggP-u4.js";
2
- import { refreshWorkspaceFileQueries, workspaceDirectoryQueryKey, workspaceDirectoryQueryPrefix, workspaceFileQueryKey, workspaceInfoQueryKey } from "./Workspace.js";
2
+ import { refreshWorkspaceFileQueries, workspaceFileQueryKey } from "./Workspace.js";
3
3
  import { invalidateWorkspaceConceptQueries, workspacePathsOverlap } from "./WorkspaceConcept.js";
4
4
  import { c } from "react/compiler-runtime";
5
5
  import * as React from "react";
6
6
  import { useQueryClient } from "@tanstack/react-query";
7
7
  //#region src/components/agents-sdk/WorkspaceLive.ts
8
8
  const DEFAULT_DEBOUNCE_MS = 200;
9
- function invalidateWorkspaceDirectories(queryClient, sourceKey, directories, root) {
10
- for (const directory of directories) queryClient.invalidateQueries({ queryKey: workspaceDirectoryQueryKey(sourceKey, root, directory) });
9
+ /**
10
+ * Listings the host's root does not own: a Finder folder, Recents and a
11
+ * search each read under a root of their own (a dot root for the queries), so
12
+ * a change refreshes every root's info (a volume's and each Get Info file's),
13
+ * the listings of the changed folders, and every query root's listings since
14
+ * any change can move them. Without `directories`, every listing of the
15
+ * source refreshes.
16
+ */
17
+ function invalidateEveryRoot(queryClient, sourceKey, directories) {
18
+ return queryClient.invalidateQueries({
19
+ queryKey: ["workspace", sourceKey],
20
+ predicate: ({ queryKey: [, , root, segment, path] }) => segment === "info" || segment === "directory" && (!directories || typeof root === "string" && root.startsWith("/.") || typeof path === "string" && directories.has(path))
21
+ });
11
22
  }
12
23
  async function invalidateWorkspaceResources(queryClient, sourceKey, root, source, selectedPath, resolveFileAsset, maxInlineAssetBytes, paths) {
13
- queryClient.invalidateQueries({
14
- queryKey: workspaceInfoQueryKey(sourceKey, root),
15
- exact: true
16
- });
17
24
  if (!source || !selectedPath || paths && !paths.some((path) => workspacePathsOverlap(selectedPath, path))) return;
18
25
  await queryClient.cancelQueries({ queryKey: workspaceFileQueryKey(sourceKey, root, selectedPath) });
19
26
  await refreshWorkspaceFileQueries(queryClient, {
@@ -65,7 +72,7 @@ function useWorkspaceLiveQueries(t0) {
65
72
  };
66
73
  if (previous?.sourceKey === sourceKey && previous.root === root && previous.revision === revision) return;
67
74
  if (changes?.live?.()) return;
68
- queryClient.invalidateQueries({ queryKey: workspaceDirectoryQueryPrefix(sourceKey, root) });
75
+ invalidateEveryRoot(queryClient, sourceKey);
69
76
  invalidateWorkspaceConceptQueries(queryClient, sourceKey, root);
70
77
  refreshResources();
71
78
  };
@@ -109,12 +116,12 @@ function useWorkspaceLiveQueries(t0) {
109
116
  refreshAll = false;
110
117
  pendingDirectories.clear();
111
118
  pendingPaths.clear();
112
- queryClient.invalidateQueries({ queryKey: workspaceDirectoryQueryPrefix(sourceKey, root) });
119
+ invalidateEveryRoot(queryClient, sourceKey);
113
120
  invalidateWorkspaceConceptQueries(queryClient, sourceKey, root);
114
121
  refreshResources();
115
122
  return;
116
123
  }
117
- invalidateWorkspaceDirectories(queryClient, sourceKey, pendingDirectories, root);
124
+ invalidateEveryRoot(queryClient, sourceKey, new Set(pendingDirectories));
118
125
  const paths_0 = [...pendingPaths];
119
126
  pendingDirectories.clear();
120
127
  pendingPaths.clear();
@@ -165,4 +172,4 @@ function _temp(error) {
165
172
  console.error("The workspace change source failed to start.", error);
166
173
  }
167
174
  //#endregion
168
- export { invalidateWorkspaceDirectories, useWorkspaceLiveQueries };
175
+ export { useWorkspaceLiveQueries };
@@ -1,2 +1,2 @@
1
- import { n as WorkspaceMessageResponse, t as WorkspaceFileRendererProvider } from "../../WorkspaceMessageResponse-CXGOQgpo.js";
1
+ import { n as WorkspaceMessageResponse, t as WorkspaceFileRendererProvider } from "../../WorkspaceMessageResponse-BoeeltJM.js";
2
2
  export { WorkspaceFileRendererProvider, WorkspaceMessageResponse };
@@ -2,7 +2,8 @@ import { t as WorkspaceConceptQueryOptions } from "../../WorkspaceConcept-D46cYe
2
2
  import { n as WorkspaceConceptPanelProps, t as WorkspaceConceptFileProps } from "../../workspace-concept-panel-BDTBISNO.js";
3
3
  import * as React from "react";
4
4
  //#region src/components/agents-sdk/WorkspaceProject.d.ts
5
- export type WorkspaceProjectThreadOrigin = "user" | "schedule" | "messenger";
5
+ /** Who started a thread: the person, a schedule, a messenger, or first-run setup. */
6
+ export type WorkspaceProjectThreadOrigin = "user" | "schedule" | "messenger" | "setup";
6
7
  /** A file in the project's folder. */
7
8
  export interface WorkspaceProjectLink {
8
9
  path: string;
@@ -1,4 +1,4 @@
1
- import { V as MessageSquareIcon, f as CalendarIcon, ft as UserIcon, k as FolderIcon } from "../../icons-nLTnB9kd.js";
1
+ import { V as MessageSquareIcon, f as CalendarIcon, ft as UserIcon, ht as WrenchIcon, k as FolderIcon } from "../../icons-nLTnB9kd.js";
2
2
  import { DescriptionList } from "../foundations/DescriptionList.js";
3
3
  import { n as OutboundLink, r as WorkspaceComposerLink } from "../../workspace-assets-DdtnBDU3.js";
4
4
  import { n as useConceptEntry, t as WorkspaceConceptPanel } from "../../workspace-concept-panel-VkjvFCY_.js";
@@ -17,17 +17,20 @@ const projectsWorkbenchItem = {
17
17
  const ORIGIN_LABEL = {
18
18
  user: "From you",
19
19
  schedule: "Schedule",
20
- messenger: "Messenger"
20
+ messenger: "Messenger",
21
+ setup: "Setup"
21
22
  };
22
23
  const ORIGIN_ICON = {
23
24
  user: /* @__PURE__ */ jsx(UserIcon, {}),
24
25
  schedule: /* @__PURE__ */ jsx(CalendarIcon, {}),
25
- messenger: /* @__PURE__ */ jsx(MessageSquareIcon, {})
26
+ messenger: /* @__PURE__ */ jsx(MessageSquareIcon, {}),
27
+ setup: /* @__PURE__ */ jsx(WrenchIcon, {})
26
28
  };
27
29
  const ORIGIN_ORDER = [
28
30
  "user",
29
31
  "schedule",
30
- "messenger"
32
+ "messenger",
33
+ "setup"
31
34
  ];
32
35
  /** One labeled run of links. Each child is an `<li>` with its own key. */
33
36
  function LinkFact(t0) {
@@ -1,6 +1,6 @@
1
1
  import { f as CalendarIcon } from "../../icons-nLTnB9kd.js";
2
2
  import { isToolPartWorking } from "./ToolPart.js";
3
- import { i as FieldList, n as SlackDraftCard, r as ConnectedAppCardFrame, t as EmailDraftCard } from "../../connected-app-drafts-Bocdg3Z-.js";
3
+ import { i as FieldList, n as SlackDraftCard, r as ConnectedAppCardFrame, t as EmailDraftCard } from "../../connected-app-drafts-C49343p9.js";
4
4
  import { c } from "react/compiler-runtime";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region src/components/ai-sdk/ConnectedAppCards.tsx
@@ -20,8 +20,7 @@ export interface GoalProps extends React.HTMLAttributes<HTMLDivElement> {
20
20
  * via `title` (or a popover) rather than rendering it inline.
21
21
  *
22
22
  * Actions are ordinary composed buttons; this primitive does not set, pause,
23
- * resume, or clear a goal and owns no timer or transport. The host-side goal
24
- * contract lives in docs/think-goal.md.
23
+ * resume, or clear a goal and owns no timer or transport.
25
24
  */
26
25
  export declare function Goal({ className, status, ref, ...props }: GoalProps & {
27
26
  /** Ref forwarded to the component's rendered root element. */
@@ -23,8 +23,7 @@ const STATUS_LABELS = {
23
23
  * via `title` (or a popover) rather than rendering it inline.
24
24
  *
25
25
  * Actions are ordinary composed buttons; this primitive does not set, pause,
26
- * resume, or clear a goal and owns no timer or transport. The host-side goal
27
- * contract lives in docs/think-goal.md.
26
+ * resume, or clear a goal and owns no timer or transport.
28
27
  */
29
28
  function Goal(t0) {
30
29
  const $ = c(15);