@mcp-b/react-components 0.41.0 → 0.43.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 (125) hide show
  1. package/dist/{AgentChat-DVr2giwD.d.ts → AgentChat-Bibfj7u1.d.ts} +1 -1
  2. package/dist/{AgentChatStartScreen-CO49yepa.d.ts → AgentChatStartScreen-Bkv7Avni.d.ts} +6 -0
  3. package/dist/McpPluginCatalog-mbGw8FTu.d.ts +92 -0
  4. package/dist/ResponsiveSidebarShell-DOXd5T-d.d.ts +111 -0
  5. package/dist/SetupChecklist-H1JRCIIe.js +77 -0
  6. package/dist/{ThinkChatActivity-DyGHj01E.d.ts → ThinkChatActivity-CgvmTXXB.d.ts} +4 -1
  7. package/dist/Workspace-F3raHdYV.d.ts +140 -0
  8. package/dist/{WorkspaceFileView-D0yFwoDr.js → WorkspaceFileView-DWMKxX_u.js} +15 -21
  9. package/dist/components/agents-sdk/AgentActivity.js +3 -2
  10. package/dist/components/agents-sdk/AgentChat.d.ts +1 -1
  11. package/dist/components/agents-sdk/AgentChat.js +1 -0
  12. package/dist/components/agents-sdk/BrowserRunPanel.js +2 -1
  13. package/dist/components/agents-sdk/ManagerOffice.d.ts +39 -27
  14. package/dist/components/agents-sdk/ManagerOffice.js +80 -44
  15. package/dist/components/agents-sdk/McpPluginCatalog.d.ts +1 -91
  16. package/dist/components/agents-sdk/McpPluginCatalog.js +3 -1
  17. package/dist/components/agents-sdk/ModelSelector.js +1 -1
  18. package/dist/components/agents-sdk/ThinkChat.d.ts +2 -2
  19. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
  20. package/dist/components/agents-sdk/ThinkChatActivity.js +18 -4
  21. package/dist/components/agents-sdk/ThinkChatToolPanels.js +6 -2
  22. package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -0
  23. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +1 -0
  24. package/dist/components/agents-sdk/ThinkFullApp.d.ts +56 -90
  25. package/dist/components/agents-sdk/ThinkFullApp.js +74 -122
  26. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +1 -1
  27. package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +8 -6
  28. package/dist/components/agents-sdk/ThinkRoutineLibrary.js +71 -93
  29. package/dist/components/agents-sdk/ThinkSidepanel.d.ts +173 -0
  30. package/dist/components/agents-sdk/ThinkSidepanel.js +656 -0
  31. package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +4 -5
  32. package/dist/components/agents-sdk/ThinkThreadPicker.js +6 -5
  33. package/dist/components/agents-sdk/Workspace.d.ts +1 -139
  34. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
  35. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +1 -1
  36. package/dist/components/agents-sdk/WorkspaceExplorer.js +4 -3
  37. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  38. package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +1 -1
  39. package/dist/components/ai-sdk/AgentChatStartScreen.js +5 -2
  40. package/dist/components/ai-sdk/MessageScroller.js +2 -1
  41. package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -0
  42. package/dist/components/ai-sdk/PromptInput.js +20 -14
  43. package/dist/components/extension/ChatGptSignInScreen.js +1 -0
  44. package/dist/components/foundations/ToggleGroup.d.ts +79 -1
  45. package/dist/components/foundations/Toolbar.d.ts +151 -1
  46. package/dist/components/general-purpose/AppFrame.js +1 -0
  47. package/dist/components/general-purpose/AppTopBar.d.ts +96 -1
  48. package/dist/components/general-purpose/ResizableSidePanel.d.ts +8 -0
  49. package/dist/components/general-purpose/ResizableSidePanel.js +3 -2
  50. package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +2 -95
  51. package/dist/components/general-purpose/ResponsiveSidebarShell.js +74 -74
  52. package/dist/components/general-purpose/SetupChecklist.js +1 -76
  53. package/dist/components/general-purpose/ThemeModeControl.js +1 -1
  54. package/dist/components/general-purpose/WebPreview.d.ts +3 -0
  55. package/dist/components/general-purpose/WebPreview.js +2 -2
  56. package/dist/components/nanites/AgentToolDetail.js +1 -0
  57. package/dist/styles/accordion.css +1 -0
  58. package/dist/styles/action-guide.css +8 -7
  59. package/dist/styles/activity-header.css +13 -39
  60. package/dist/styles/activity.css +40 -55
  61. package/dist/styles/agent-attention.css +14 -14
  62. package/dist/styles/agent-chat.css +80 -58
  63. package/dist/styles/agent-connection.css +10 -4
  64. package/dist/styles/agent-tool-detail.css +4 -4
  65. package/dist/styles/alert-dialog.css +4 -4
  66. package/dist/styles/app-frame.css +1 -3
  67. package/dist/styles/app-top-bar.css +5 -9
  68. package/dist/styles/approval.css +1 -0
  69. package/dist/styles/artifact.css +6 -6
  70. package/dist/styles/attachment-preview.css +5 -4
  71. package/dist/styles/browser-replay.css +6 -6
  72. package/dist/styles/browser-run-panel.css +1 -0
  73. package/dist/styles/button.css +15 -6
  74. package/dist/styles/card.css +5 -5
  75. package/dist/styles/chatgpt-sign-in-screen.css +1 -1
  76. package/dist/styles/code-block.css +14 -13
  77. package/dist/styles/codex-model-selector.css +2 -0
  78. package/dist/styles/collapsible.css +1 -0
  79. package/dist/styles/commit.css +6 -6
  80. package/dist/styles/context.css +9 -9
  81. package/dist/styles/conversation-tab-picker.css +1 -1
  82. package/dist/styles/conversation.css +6 -8
  83. package/dist/styles/dialog.css +4 -4
  84. package/dist/styles/empty-state.css +3 -3
  85. package/dist/styles/environment-variables.css +9 -9
  86. package/dist/styles/field.css +2 -1
  87. package/dist/styles/fieldset.css +2 -2
  88. package/dist/styles/index.css +4 -3
  89. package/dist/styles/manager-office.css +23 -29
  90. package/dist/styles/mcp-plugin-catalog.css +11 -10
  91. package/dist/styles/mcp-server-picker.css +3 -3
  92. package/dist/styles/message-scroller.css +9 -11
  93. package/dist/styles/message.css +43 -20
  94. package/dist/styles/navigation-menu.css +1 -0
  95. package/dist/styles/plan.css +13 -12
  96. package/dist/styles/pricing-page.css +26 -23
  97. package/dist/styles/prompt-input.css +18 -5
  98. package/dist/styles/queue.css +1 -0
  99. package/dist/styles/reasoning.css +1 -9
  100. package/dist/styles/recipes.css +28 -1
  101. package/dist/styles/responsive-sidebar-shell.css +55 -24
  102. package/dist/styles/separator.css +5 -5
  103. package/dist/styles/sources.css +4 -4
  104. package/dist/styles/stepper.css +1 -0
  105. package/dist/styles/streamdown.css +31 -21
  106. package/dist/styles/tabs.css +1 -0
  107. package/dist/styles/task.css +5 -17
  108. package/dist/styles/terminal.css +10 -10
  109. package/dist/styles/test-results.css +6 -6
  110. package/dist/styles/think-execution-status.css +2 -2
  111. package/dist/styles/think-execution-workbench.css +12 -15
  112. package/dist/styles/think-full-app.css +26 -64
  113. package/dist/styles/think-routine-library.css +26 -55
  114. package/dist/styles/think-sidepanel.css +74 -0
  115. package/dist/styles/think-thread-picker.css +9 -9
  116. package/dist/styles/utilities.css +33 -0
  117. package/dist/styles/web-preview.css +20 -19
  118. package/dist/styles/workspace-explorer.css +18 -21
  119. package/dist/styles/workspace-mount-manager.css +2 -2
  120. package/dist/utils/favicon.d.ts +6 -1
  121. package/dist/utils/favicon.js +18 -1
  122. package/package.json +2 -2
  123. package/dist/AppTopBar-ZdgmB_Lu.d.ts +0 -97
  124. package/dist/ToggleGroup-BrQZOQn_.d.ts +0 -80
  125. package/dist/Toolbar-CBOseBQr.d.ts +0 -152
@@ -5,6 +5,7 @@ import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
5
5
  import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
6
6
  import { ScrollArea } from "../foundations/ScrollArea.js";
7
7
  import { EmptyState } from "../foundations/EmptyState.js";
8
+ import { LinkButton } from "../foundations/LinkButton.js";
8
9
  import { SearchField } from "../foundations/SearchField.js";
9
10
  import { AlertDialog } from "../foundations/AlertDialog.js";
10
11
  import * as React from "react";
@@ -108,7 +109,7 @@ function ThinkThreadStatusIndicators({ summary, className }) {
108
109
  * notes beside the parent Think agent because
109
110
  * `listThreads()`/`createThread()`/`deleteThread()` are app-owned.
110
111
  */
111
- function ThinkThreadPicker({ threads, renderThreadLink, onCreate, onSelect, onDelete, className, title = "Recents", "aria-label": ariaLabel = "Threads", ref, ...props }) {
112
+ function ThinkThreadPicker({ threads, renderThreadLink, createThreadLink, onSelect, onDelete, className, title = "Recents", "aria-label": ariaLabel = "Threads", ref, ...props }) {
112
113
  const statusSummary = summarizeThinkThreads(threads);
113
114
  const [query, setQuery] = React.useState("");
114
115
  const [deleteOpen, setDeleteOpen] = React.useState(false);
@@ -156,6 +157,7 @@ function ThinkThreadPicker({ threads, renderThreadLink, onCreate, onSelect, onDe
156
157
  ref,
157
158
  className: cx("think-thread-picker", className),
158
159
  ...props,
160
+ "data-recipe": "fill-host",
159
161
  children: [
160
162
  /* @__PURE__ */ jsxs("header", {
161
163
  className: "think-thread-picker__header",
@@ -257,16 +259,15 @@ function ThinkThreadPicker({ threads, renderThreadLink, onCreate, onSelect, onDe
257
259
  })]
258
260
  })
259
261
  }),
260
- onCreate ? /* @__PURE__ */ jsx("div", {
262
+ createThreadLink ? /* @__PURE__ */ jsx("div", {
261
263
  className: "think-thread-picker__footer",
262
- children: /* @__PURE__ */ jsxs(Button, {
264
+ children: /* @__PURE__ */ jsxs(LinkButton, {
263
265
  ref: createButtonRef,
264
- type: "button",
265
266
  variant: "normal",
266
267
  color: "neutral",
267
268
  size: "sm",
268
269
  className: "think-thread-picker__create",
269
- onClick: () => void onCreate(),
270
+ render: createThreadLink,
270
271
  children: [/* @__PURE__ */ jsx(PlusIcon, {}), /* @__PURE__ */ jsx("span", { children: "New thread" })]
271
272
  })
272
273
  }) : null,
@@ -1,140 +1,2 @@
1
- import { a as WorkspaceMediaInfo, i as WorkspaceFileState, r as WorkspaceFileAssetResolver, t as WorkspaceFileAsset } from "../../WorkspaceFile-BLaFmMrt.js";
2
- import { DataTag, QueryKey, UnusedSkipTokenOptions } from "@tanstack/react-query";
3
- import { WorkspaceLike } from "@cloudflare/think";
4
- import { FileInfo, Workspace } from "@cloudflare/shell";
5
-
6
- //#region src/components/agents-sdk/Workspace.d.ts
7
- /** Workspace summary, as returned by `Workspace.getWorkspaceInfo()` upstream. */
8
- type WorkspaceInfo = Awaited<ReturnType<Workspace["getWorkspaceInfo"]>>;
9
- /** Whole upstream workspace shapes, accepted without narrowing or mirroring. */
10
- type WorkspaceSource = Workspace | WorkspaceLike;
11
- interface UseWorkspaceOptions {
12
- /** Must be referentially stable (memoize in the app). */
13
- source: WorkspaceSource;
14
- /**
15
- * Stable, non-secret identity for the endpoint/account/tenant/workspace
16
- * behind `source`. Change it whenever that backing workspace changes.
17
- */
18
- sourceKey: string;
19
- /** Root directory to list first. Defaults to "/". */
20
- root?: string;
21
- /** Route-owned selected file path. */
22
- selectedPath: string | null;
23
- /** Called when a non-link browser asks the app to select a file. */
24
- onSelectedPathChange?: (path: string | null) => void;
25
- /**
26
- * Optional host adapter called before text/binary reads. Return `null` for
27
- * ordinary text files and prefer signed/range-friendly URLs for large media.
28
- * The configured root scopes navigation; hosts must enforce authorization
29
- * atomically when resolving assets across a trust boundary.
30
- * Keep this resolver semantically stable for a given `sourceKey`; function
31
- * identity is intentionally excluded from serializable query keys.
32
- */
33
- resolveFileAsset?: WorkspaceFileAssetResolver;
34
- /** Maximum size for the built-in buffered-byte fallback. Defaults to 32 MiB. */
35
- maxInlineAssetBytes?: number;
36
- }
37
- interface WorkspaceState {
38
- root: string;
39
- /** Loaded directory listings, keyed by directory path. */
40
- entriesByDirectory: Readonly<Record<string, readonly FileInfo[]>>;
41
- /** Every loaded entry, keyed by its path. */
42
- entryByPath: ReadonlyMap<string, FileInfo>;
43
- expandedPaths: ReadonlySet<string>;
44
- /** Update expansion; newly expanded directories load lazily. */
45
- setExpandedPaths: (next: Set<string>) => void;
46
- selectedPath: string | null;
47
- /** Ask the route owner to select a file. */
48
- selectFile: (path: string | null) => void;
49
- /** The selected file once its read settles; null while loading. */
50
- selectedFile: WorkspaceFileState | null;
51
- /** Initial root/info load or explicit refresh in flight. */
52
- isLoading: boolean;
53
- /** Directory and file paths with a query in flight. */
54
- loadingPaths: ReadonlySet<string>;
55
- /** Root/directory listing failure. Per-file read errors live on the file state. */
56
- error: string | null;
57
- /** Workspace summary, when the source provides `getWorkspaceInfo`. */
58
- info: WorkspaceInfo | null;
59
- /** Reload the root, every expanded directory, and the selected file. */
60
- refresh: () => void;
61
- }
62
- interface WorkspaceFileReadTarget {
63
- requestedPath: string;
64
- readPath: string;
65
- info: FileInfo;
66
- media: WorkspaceMediaInfo | null;
67
- }
68
- interface WorkspaceResolvedAsset {
69
- asset: WorkspaceFileAsset;
70
- media: WorkspaceMediaInfo;
71
- }
72
- type WorkspaceQueryOptions<TData, TQueryKey extends QueryKey> = UnusedSkipTokenOptions<TData, Error, TData, TQueryKey> & {
73
- queryKey: DataTag<TQueryKey, TData, Error>;
74
- };
75
- /**
76
- * Source/root prefix for cache inspection, cancellation, or removal.
77
- * Do not broadly invalidate this prefix: active file queries must refresh in
78
- * stat → resolver → content order. Use a resource option key or `refresh()`.
79
- */
80
- declare function workspaceQueryKey(sourceKey: string, root: string): readonly ["workspace", string, string];
81
- type WorkspaceQueryKey = ReturnType<typeof workspaceQueryKey>;
82
- /** Directory-listing prefix for targeted cache invalidation. */
83
- declare function workspaceDirectoryQueryPrefix(sourceKey: string, root: string): readonly ["workspace", string, string, "directory"];
84
- /** Exact directory-listing key shared by query options and live hosts. */
85
- declare function workspaceDirectoryQueryKey(sourceKey: string, root: string, path: string): readonly ["workspace", string, string, "directory", string];
86
- type WorkspaceDirectoryQueryKey = ReturnType<typeof workspaceDirectoryQueryKey>;
87
- declare function workspaceFileQueryKey(sourceKey: string, root: string, requestedPath: string): readonly ["workspace", string, string, "file", string];
88
- type WorkspaceFileQueryKey = ReturnType<typeof workspaceFileQueryKey>;
89
- declare function workspaceFileVersion(target: WorkspaceFileReadTarget): {
90
- readonly path: string;
91
- readonly name: string;
92
- readonly type: import("@cloudflare/shell").EntryType;
93
- readonly mimeType: string;
94
- readonly size: number;
95
- readonly createdAt: number;
96
- readonly updatedAt: number;
97
- readonly target: string | null;
98
- };
99
- type WorkspaceFileVersion = ReturnType<typeof workspaceFileVersion>;
100
- type WorkspaceDirectoryQueryOptions = WorkspaceQueryOptions<readonly FileInfo[], WorkspaceDirectoryQueryKey>;
101
- type WorkspaceInfoQueryKey = readonly [...WorkspaceQueryKey, "info"];
102
- type WorkspaceInfoQueryOptions = WorkspaceQueryOptions<WorkspaceInfo | null, WorkspaceInfoQueryKey>;
103
- type WorkspaceFileStatQueryKey = readonly [...WorkspaceFileQueryKey, "stat"];
104
- type WorkspaceFileStatQueryOptions = WorkspaceQueryOptions<WorkspaceFileReadTarget, WorkspaceFileStatQueryKey>;
105
- type WorkspaceFileAssetQueryKey = readonly [...WorkspaceFileQueryKey, "asset", WorkspaceFileVersion];
106
- type WorkspaceFileAssetQueryOptions = WorkspaceQueryOptions<WorkspaceResolvedAsset | null, WorkspaceFileAssetQueryKey>;
107
- type WorkspaceTextFileQueryKey = readonly [...WorkspaceFileQueryKey, "text", WorkspaceFileVersion];
108
- type WorkspaceTextFileQueryOptions = WorkspaceQueryOptions<string | null, WorkspaceTextFileQueryKey>;
109
- type WorkspaceBinaryFileQueryKey = readonly [...WorkspaceFileQueryKey, "bytes", WorkspaceFileVersion, {
110
- readonly maxInlineAssetBytes: number;
111
- }];
112
- type WorkspaceBinaryFileQueryOptions = WorkspaceQueryOptions<WorkspaceResolvedAsset | null, WorkspaceBinaryFileQueryKey>;
113
- /** Shared directory options for workspace components and route loaders. */
114
- declare function workspaceDirectoryQueryOptions(source: WorkspaceSource, sourceKey: string, root: string, path: string): WorkspaceDirectoryQueryOptions;
115
- /** Shared workspace-summary options for workspace components and route loaders. */
116
- declare function workspaceInfoQueryOptions(source: WorkspaceSource, sourceKey: string, root: string): WorkspaceInfoQueryOptions;
117
- /** Re-stat and validate a requested path before any resolver or file read. */
118
- declare function workspaceFileStatQueryOptions(source: WorkspaceSource, sourceKey: string, root: string, requestedPath: string): WorkspaceFileStatQueryOptions;
119
- /** Optional host asset resolution, scoped to the current stat result. */
120
- declare function workspaceFileAssetQueryOptions(sourceKey: string, root: string, target: WorkspaceFileReadTarget, resolveFileAsset: WorkspaceFileAssetResolver): WorkspaceFileAssetQueryOptions;
121
- /** Cached text read options, scoped to the validated stat result. */
122
- declare function workspaceTextFileQueryOptions(source: WorkspaceSource, sourceKey: string, root: string, target: WorkspaceFileReadTarget): WorkspaceTextFileQueryOptions;
123
- /** Active-file-only buffered asset options, scoped to the validated stat result. */
124
- declare function workspaceBinaryFileQueryOptions(source: WorkspaceSource, sourceKey: string, root: string, target: WorkspaceFileReadTarget, maxInlineAssetBytes: number): WorkspaceBinaryFileQueryOptions;
125
- /**
126
- * Headless state for browsing a Think workspace. TanStack Query owns remote
127
- * directory, metadata, resolver, text, and byte lifecycles; the route owns
128
- * selection, while this hook only keeps local tree expansion state.
129
- */
130
- declare function useWorkspace({
131
- source,
132
- sourceKey,
133
- root,
134
- selectedPath,
135
- onSelectedPathChange,
136
- resolveFileAsset,
137
- maxInlineAssetBytes
138
- }: UseWorkspaceOptions): WorkspaceState;
139
- //#endregion
1
+ import { A as workspaceQueryKey, C as workspaceBinaryFileQueryOptions, D as workspaceFileAssetQueryOptions, E as workspaceDirectoryQueryPrefix, O as workspaceFileStatQueryOptions, S as useWorkspace, T as workspaceDirectoryQueryOptions, _ as WorkspaceResolvedAsset, a as WorkspaceDirectoryQueryOptions, b as WorkspaceTextFileQueryKey, c as WorkspaceFileQueryKey, d as WorkspaceFileStatQueryOptions, f as WorkspaceFileVersion, g as WorkspaceQueryKey, h as WorkspaceInfoQueryOptions, i as WorkspaceDirectoryQueryKey, j as workspaceTextFileQueryOptions, k as workspaceInfoQueryOptions, 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 WorkspaceSource, w as workspaceDirectoryQueryKey, x as WorkspaceTextFileQueryOptions, y as WorkspaceState } from "../../Workspace-F3raHdYV.js";
140
2
  export { UseWorkspaceOptions, WorkspaceBinaryFileQueryKey, WorkspaceBinaryFileQueryOptions, WorkspaceDirectoryQueryKey, WorkspaceDirectoryQueryOptions, WorkspaceFileAssetQueryKey, WorkspaceFileAssetQueryOptions, WorkspaceFileQueryKey, WorkspaceFileReadTarget, WorkspaceFileStatQueryKey, WorkspaceFileStatQueryOptions, WorkspaceFileVersion, WorkspaceInfo, WorkspaceInfoQueryKey, WorkspaceInfoQueryOptions, WorkspaceQueryKey, WorkspaceResolvedAsset, WorkspaceSource, WorkspaceState, WorkspaceTextFileQueryKey, WorkspaceTextFileQueryOptions, useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileStatQueryOptions, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions };
@@ -1,4 +1,4 @@
1
- import { WorkspaceState } from "./Workspace.js";
1
+ import { y as WorkspaceState } from "../../Workspace-F3raHdYV.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 { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-Bh9-Jo1r.js";
2
- import { WorkspaceState } from "./Workspace.js";
2
+ import { y as WorkspaceState } from "../../Workspace-F3raHdYV.js";
3
3
  import * as React from "react";
4
4
 
5
5
  //#region src/components/agents-sdk/WorkspaceExplorer.d.ts
@@ -2,7 +2,7 @@ import { t as cx } from "../../class-names-BiMDVpUo.js";
2
2
  import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
3
3
  import { a as WorkspaceNavigationRestorationBoundary, n as WorkspaceNavigationProvider, o as useRequiredWorkspaceNavigationRestoration, r as resolveWorkspaceLink } from "../../WorkspaceLink-DtH66bAY.js";
4
4
  import { WorkspaceBrowser } from "./WorkspaceBrowser.js";
5
- import { t as WorkspaceFileView } from "../../WorkspaceFileView-D0yFwoDr.js";
5
+ import { t as WorkspaceFileView } from "../../WorkspaceFileView-DWMKxX_u.js";
6
6
  import * as React from "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  //#region src/components/agents-sdk/WorkspaceExplorer.tsx
@@ -70,12 +70,12 @@ function WorkspaceExplorerContent({ workspace, navigation, className, title = "W
70
70
  const surface = explorerRef.current;
71
71
  const target = [...surface?.querySelectorAll(".file-tree__node") ?? []].find((candidate) => candidate.dataset.workspacePath === pending.path);
72
72
  if (target) {
73
- target.focus();
73
+ target.focus({ preventScroll: true });
74
74
  pendingTreeFocusRef.current = null;
75
75
  return;
76
76
  }
77
77
  if (isLoading || ancestors.some((path) => loadingPaths.has(path))) return;
78
- (surface?.querySelector(".file-tree__node") ?? surface?.querySelector("[data-workspace-browser-focus-target]"))?.focus();
78
+ (surface?.querySelector(".file-tree__node") ?? surface?.querySelector("[data-workspace-browser-focus-target]"))?.focus({ preventScroll: true });
79
79
  pendingTreeFocusRef.current = null;
80
80
  }, [
81
81
  entriesByDirectory,
@@ -89,6 +89,7 @@ function WorkspaceExplorerContent({ workspace, navigation, className, title = "W
89
89
  return /* @__PURE__ */ jsx("div", {
90
90
  ref: mergeRefs(explorerRef, ref),
91
91
  className: cx("workspace-explorer", className),
92
+ "data-recipe": "fill-host",
92
93
  ...props,
93
94
  children: fileDestination ? /* @__PURE__ */ jsx(WorkspaceNavigationProvider, {
94
95
  root: workspace.root,
@@ -1,2 +1,2 @@
1
- import { t as WorkspaceFileView } from "../../WorkspaceFileView-D0yFwoDr.js";
1
+ import { t as WorkspaceFileView } from "../../WorkspaceFileView-DWMKxX_u.js";
2
2
  export { WorkspaceFileView };
@@ -1,2 +1,2 @@
1
- import { a as AgentChatStarterList, i as AgentChatStarterItem, n as AgentChatStartScreenProps, o as AgentChatStarterListProps, r as AgentChatStarter, s as AgentChatStarterProps, t as AgentChatStartScreen } from "../../AgentChatStartScreen-CO49yepa.js";
1
+ import { a as AgentChatStarterList, i as AgentChatStarterItem, n as AgentChatStartScreenProps, o as AgentChatStarterListProps, r as AgentChatStarter, s as AgentChatStarterProps, t as AgentChatStartScreen } from "../../AgentChatStartScreen-Bkv7Avni.js";
2
2
  export { AgentChatStartScreen, AgentChatStartScreenProps, AgentChatStarter, AgentChatStarterItem, AgentChatStarterList, AgentChatStarterListProps, AgentChatStarterProps };
@@ -13,7 +13,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
13
13
  * the same live composer moves from the center of the empty view to the pinned
14
14
  * transcript position after the first message.
15
15
  */
16
- function AgentChatStartScreen({ heading = "What should we work on?", composer, composerTray, starters, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }) {
16
+ function AgentChatStartScreen({ heading = "What should we work on?", composer, composerTray, lead, starters, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }) {
17
17
  const headingId = React.useId();
18
18
  return /* @__PURE__ */ jsx("section", {
19
19
  "data-slot": "agent-chat-start-screen",
@@ -37,7 +37,10 @@ function AgentChatStartScreen({ heading = "What should we work on?", composer, c
37
37
  children: composerTray
38
38
  }) : null]
39
39
  })]
40
- }), starters?.items.length ? /* @__PURE__ */ jsx("div", {
40
+ }), lead ? /* @__PURE__ */ jsx("div", {
41
+ className: "agent-chat-start-screen__lead",
42
+ children: lead
43
+ }) : starters?.items.length ? /* @__PURE__ */ jsx("div", {
41
44
  className: "agent-chat-start-screen__starters",
42
45
  children: /* @__PURE__ */ jsx(AgentChatStarterList, { ...starters })
43
46
  }) : null]
@@ -17,7 +17,8 @@ function MessageScroller({ className, ...props }) {
17
17
  return /* @__PURE__ */ jsx(MessageScroller$1.Root, {
18
18
  "data-slot": messageScrollerContract.root.slot,
19
19
  className: cx(messageScrollerContract.root.className, className),
20
- ...props
20
+ ...props,
21
+ "data-recipe": "fill-host"
21
22
  });
22
23
  }
23
24
  function MessageScrollerViewport({ "aria-label": ariaLabel = messageScrollerContract.viewport.ariaLabel, className, role = messageScrollerContract.viewport.role, tabIndex = messageScrollerContract.viewport.tabIndex, ...props }) {
@@ -77,6 +77,7 @@ function VirtualMessageScroller({ items, getItemKey, renderItem, estimateSize =
77
77
  "data-slot": messageScrollerContract.root.slot,
78
78
  className: cx(messageScrollerContract.root.className, className),
79
79
  ...props,
80
+ "data-recipe": "fill-host",
80
81
  children: [/* @__PURE__ */ jsx("div", {
81
82
  ref: viewportRef,
82
83
  "aria-label": messageScrollerContract.viewport.ariaLabel,
@@ -26,21 +26,17 @@ function useAttachmentStore() {
26
26
  revokeFileUrls(filesRef.current);
27
27
  }, []);
28
28
  const add = React.useCallback((incomingFiles) => {
29
- const incoming = Array.from(incomingFiles);
30
- setFiles((current) => [...current, ...incoming.map(fileToPart)]);
29
+ const incoming = Array.from(incomingFiles).map(fileToPart);
30
+ setFiles((current) => [...current, ...incoming]);
31
31
  }, []);
32
32
  const remove = React.useCallback((id) => {
33
- setFiles((current) => {
34
- const found = current.find((file) => file.id === id);
35
- if (found?.url) URL.revokeObjectURL(found.url);
36
- return current.filter((file) => file.id !== id);
37
- });
33
+ const found = filesRef.current.find((file) => file.id === id);
34
+ if (found) revokeFileObjectUrl(found);
35
+ setFiles((current) => current.filter((file) => file.id !== id));
38
36
  }, []);
39
37
  const clear = React.useCallback(() => {
40
- setFiles((current) => {
41
- revokeFileUrls(current);
42
- return [];
43
- });
38
+ revokeFileUrls(filesRef.current);
39
+ setFiles([]);
44
40
  }, []);
45
41
  return React.useMemo(() => ({
46
42
  add,
@@ -1207,17 +1203,27 @@ function defaultSubmitLabel(status) {
1207
1203
  default: return "Send message";
1208
1204
  }
1209
1205
  }
1206
+ const fileObjectUrls = /* @__PURE__ */ new WeakMap();
1210
1207
  function fileToPart(file) {
1211
- return {
1208
+ const objectUrl = URL.createObjectURL(file);
1209
+ const part = {
1212
1210
  id: createId(),
1213
1211
  type: "file",
1214
1212
  filename: file.name,
1215
1213
  mediaType: file.type,
1216
- url: URL.createObjectURL(file)
1214
+ url: objectUrl
1217
1215
  };
1216
+ fileObjectUrls.set(part, objectUrl);
1217
+ return part;
1218
+ }
1219
+ function revokeFileObjectUrl(file) {
1220
+ const objectUrl = fileObjectUrls.get(file) ?? (file.url.startsWith("blob:") ? file.url : void 0);
1221
+ if (!objectUrl) return;
1222
+ fileObjectUrls.delete(file);
1223
+ URL.revokeObjectURL(objectUrl);
1218
1224
  }
1219
1225
  function revokeFileUrls(files) {
1220
- for (const file of files) if (file.url.startsWith("blob:")) URL.revokeObjectURL(file.url);
1226
+ for (const file of files) revokeFileObjectUrl(file);
1221
1227
  }
1222
1228
  async function resolveSubmittedFile(file) {
1223
1229
  const { id: _id, ...part } = file;
@@ -23,6 +23,7 @@ function ChatGptSignInScreen({ busy = false, control, error, label = "Sign in wi
23
23
  onPointerLeave: handlePointerLeave,
24
24
  onPointerMove: handlePointerMove,
25
25
  ...props,
26
+ "data-recipe": "fill-host",
26
27
  children: [/* @__PURE__ */ jsxs("div", {
27
28
  className: "chatgpt-sign-in__panel",
28
29
  children: [
@@ -1,2 +1,80 @@
1
- import { n as ToggleGroupItemProps, r as ToggleGroupProps, t as ToggleGroup } from "../../ToggleGroup-BrQZOQn_.js";
1
+ import { r as ToggleVariantsOptions } from "../../Toggle-DLrIf5YH.js";
2
+ import * as React from "react";
3
+ import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
4
+ import { Toggle } from "@base-ui/react/toggle";
5
+
6
+ //#region src/components/foundations/ToggleGroup.d.ts
7
+ type ToggleGroupSize = ToggleVariantsOptions["size"];
8
+ type ToggleGroupProps<Value extends string = string> = ToggleGroup$1.Props<Value> & {
9
+ variant?: ToggleVariantsOptions["variant"];
10
+ /**
11
+ * The size of the toggle group.
12
+ * @default 'md'
13
+ */
14
+ size?: ToggleGroupSize;
15
+ spacing?: number;
16
+ /**
17
+ * Draws one shared thumb that slides between segments rather than lighting up
18
+ * each item's own background. This is the permission-mode / view-switch
19
+ * control; it is a presentation of this group, not a separate component.
20
+ *
21
+ * Only meaningful for single selection — a sliding thumb cannot be in two
22
+ * places, so a `multiple` group ignores it.
23
+ */
24
+ segmented?: boolean;
25
+ };
26
+ interface ToggleGroupItemProps extends React.ComponentPropsWithRef<typeof Toggle>, Omit<ToggleVariantsOptions, "className"> {}
27
+ /**
28
+ * A toggle group component for selecting one or multiple options.
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * // Single selection (defaultValue is an array)
33
+ * <ToggleGroup.Root defaultValue={["center"]}>
34
+ * <ToggleGroup.Item value="left">Left</ToggleGroup.Item>
35
+ * <ToggleGroup.Item value="center">Center</ToggleGroup.Item>
36
+ * <ToggleGroup.Item value="right">Right</ToggleGroup.Item>
37
+ * </ToggleGroup.Root>
38
+ * ```
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * // Multiple selection
43
+ * <ToggleGroup.Root multiple defaultValue={["bold", "italic"]}>
44
+ * <ToggleGroup.Item value="bold">Bold</ToggleGroup.Item>
45
+ * <ToggleGroup.Item value="italic">Italic</ToggleGroup.Item>
46
+ * <ToggleGroup.Item value="underline">Underline</ToggleGroup.Item>
47
+ * </ToggleGroup.Root>
48
+ * ```
49
+ *
50
+ * @see {@link https://base-ui.com/react/components/toggle-group | Base UI Toggle Group}
51
+ */
52
+ declare function ToggleGroupRoot<Value extends string>({
53
+ size,
54
+ spacing,
55
+ segmented,
56
+ variant,
57
+ className,
58
+ children,
59
+ style,
60
+ ref,
61
+ ...props
62
+ }: ToggleGroupProps<Value>): React.JSX.Element;
63
+ /**
64
+ * A single toggle item within a ToggleGroup.
65
+ */
66
+ declare function ToggleGroupItem({
67
+ className,
68
+ variant,
69
+ size,
70
+ ref,
71
+ ...props
72
+ }: ToggleGroupItemProps & {
73
+ ref?: React.Ref<HTMLButtonElement>;
74
+ }): React.JSX.Element;
75
+ declare const ToggleGroup: {
76
+ Root: typeof ToggleGroupRoot;
77
+ Item: typeof ToggleGroupItem;
78
+ };
79
+ //#endregion
2
80
  export { ToggleGroup, ToggleGroupItemProps, ToggleGroupProps };
@@ -1,2 +1,152 @@
1
- import { a as ToolbarLinkProps, i as ToolbarInputProps, n as ToolbarButtonProps, o as ToolbarRootProps, r as ToolbarGroupProps, s as ToolbarSeparatorProps, t as Toolbar } from "../../Toolbar-CBOseBQr.js";
1
+ import * as React from "react";
2
+ import { Toolbar as Toolbar$1 } from "@base-ui/react/toolbar";
3
+
4
+ //#region src/components/foundations/Toolbar.d.ts
5
+ /**
6
+ * Props for the Toolbar.Root component.
7
+ */
8
+ interface ToolbarRootProps extends React.ComponentPropsWithoutRef<typeof Toolbar$1.Root> {}
9
+ /**
10
+ * Props for the Toolbar.Button component.
11
+ */
12
+ interface ToolbarButtonProps extends React.ComponentPropsWithoutRef<typeof Toolbar$1.Button> {
13
+ /** Skip the default Button chrome when a composed control owns its visuals. */
14
+ unstyled?: boolean;
15
+ }
16
+ /**
17
+ * Props for the Toolbar.Link component.
18
+ */
19
+ interface ToolbarLinkProps extends React.ComponentPropsWithoutRef<typeof Toolbar$1.Link> {
20
+ /** Skip the default Button chrome when a composed link owns its visuals. */
21
+ unstyled?: boolean;
22
+ }
23
+ /**
24
+ * Props for the Toolbar.Group component.
25
+ */
26
+ interface ToolbarGroupProps extends React.ComponentPropsWithoutRef<typeof Toolbar$1.Group> {}
27
+ /**
28
+ * Props for the Toolbar.Separator component.
29
+ */
30
+ interface ToolbarSeparatorProps extends React.ComponentPropsWithoutRef<typeof Toolbar$1.Separator> {}
31
+ /**
32
+ * Props for the Toolbar.Input component.
33
+ */
34
+ interface ToolbarInputProps extends React.ComponentPropsWithoutRef<typeof Toolbar$1.Input> {}
35
+ /**
36
+ * Container for grouping toolbar buttons and controls.
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * <Toolbar.Root>
41
+ * <Toolbar.Button>Bold</Toolbar.Button>
42
+ * <Toolbar.Button>Italic</Toolbar.Button>
43
+ * <Toolbar.Separator />
44
+ * <Toolbar.Button>Align Left</Toolbar.Button>
45
+ * </Toolbar.Root>
46
+ * ```
47
+ *
48
+ * @see {@link https://base-ui.com/react/components/toolbar | Base UI Toolbar}
49
+ */
50
+ declare function ToolbarRoot({
51
+ className,
52
+ ref,
53
+ ...props
54
+ }: ToolbarRootProps & {
55
+ ref?: React.Ref<HTMLDivElement>;
56
+ }): React.JSX.Element;
57
+ /**
58
+ * A clickable button within the toolbar.
59
+ */
60
+ declare function ToolbarButton({
61
+ unstyled,
62
+ className,
63
+ ref,
64
+ ...props
65
+ }: ToolbarButtonProps & {
66
+ ref?: React.Ref<HTMLButtonElement>;
67
+ }): React.JSX.Element;
68
+ /**
69
+ * A link element within the toolbar.
70
+ */
71
+ declare function ToolbarLink({
72
+ unstyled,
73
+ className,
74
+ ref,
75
+ ...props
76
+ }: ToolbarLinkProps & {
77
+ ref?: React.Ref<HTMLAnchorElement>;
78
+ }): React.JSX.Element;
79
+ /**
80
+ * Groups toolbar items together.
81
+ */
82
+ declare function ToolbarGroup({
83
+ className,
84
+ ref,
85
+ ...props
86
+ }: ToolbarGroupProps & {
87
+ ref?: React.Ref<HTMLDivElement>;
88
+ }): React.JSX.Element;
89
+ /**
90
+ * Visual separator between toolbar sections.
91
+ */
92
+ declare function ToolbarSeparator({
93
+ className,
94
+ ref,
95
+ ...props
96
+ }: ToolbarSeparatorProps & {
97
+ ref?: React.Ref<HTMLDivElement>;
98
+ }): React.JSX.Element;
99
+ /**
100
+ * Input element within the toolbar.
101
+ */
102
+ declare function ToolbarInput({
103
+ className,
104
+ ref,
105
+ ...props
106
+ }: ToolbarInputProps & {
107
+ ref?: React.Ref<HTMLInputElement>;
108
+ }): React.JSX.Element;
109
+ /**
110
+ * A container for grouping buttons and controls.
111
+ * Provides keyboard navigation between items.
112
+ *
113
+ * @example
114
+ * ```tsx
115
+ * // Text formatting toolbar
116
+ * <Toolbar.Root>
117
+ * <Toolbar.Group>
118
+ * <Toolbar.Button>Bold</Toolbar.Button>
119
+ * <Toolbar.Button>Italic</Toolbar.Button>
120
+ * <Toolbar.Button>Underline</Toolbar.Button>
121
+ * </Toolbar.Group>
122
+ * <Toolbar.Separator />
123
+ * <Toolbar.Group>
124
+ * <Toolbar.Button>Left</Toolbar.Button>
125
+ * <Toolbar.Button>Center</Toolbar.Button>
126
+ * <Toolbar.Button>Right</Toolbar.Button>
127
+ * </Toolbar.Group>
128
+ * </Toolbar.Root>
129
+ * ```
130
+ *
131
+ * @example
132
+ * ```tsx
133
+ * // Vertical toolbar
134
+ * <Toolbar.Root orientation="vertical">
135
+ * <Toolbar.Button>Item 1</Toolbar.Button>
136
+ * <Toolbar.Button>Item 2</Toolbar.Button>
137
+ * <Toolbar.Button>Item 3</Toolbar.Button>
138
+ * </Toolbar.Root>
139
+ * ```
140
+ *
141
+ * @see {@link https://base-ui.com/react/components/toolbar | Base UI Toolbar}
142
+ */
143
+ declare const Toolbar: {
144
+ Root: typeof ToolbarRoot;
145
+ Button: typeof ToolbarButton;
146
+ Link: typeof ToolbarLink;
147
+ Group: typeof ToolbarGroup;
148
+ Separator: typeof ToolbarSeparator;
149
+ Input: typeof ToolbarInput;
150
+ };
151
+ //#endregion
2
152
  export { Toolbar, ToolbarButtonProps, ToolbarGroupProps, ToolbarInputProps, ToolbarLinkProps, ToolbarRootProps, ToolbarSeparatorProps };
@@ -6,6 +6,7 @@ function Root({ className, ref, ...props }) {
6
6
  return /* @__PURE__ */ jsx("div", {
7
7
  ref,
8
8
  className: cx("app-frame", className),
9
+ "data-recipe": "fill-host",
9
10
  ...props
10
11
  });
11
12
  }