@mcp-b/react-components 0.42.0 → 0.44.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 (134) 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/{CodeBlock-BjELA-_s.js → CodeBlock-Dl7a3Wqo.js} +1 -1
  4. package/dist/{FileTree-DMYRdT6R.js → FileTree-Uu3ZnW1u.js} +1 -1
  5. package/dist/McpPluginCatalog-mbGw8FTu.d.ts +92 -0
  6. package/dist/ResponsiveSidebarShell-DOXd5T-d.d.ts +111 -0
  7. package/dist/SetupChecklist-DOp-zqjh.js +77 -0
  8. package/dist/{ThinkChatActivity-CsDql-ER.d.ts → ThinkChatActivity-CgvmTXXB.d.ts} +1 -1
  9. package/dist/Workspace-F3raHdYV.d.ts +140 -0
  10. package/dist/{WorkspaceFileView-DwdXiKku.js → WorkspaceFileView-BublZXky.js} +2 -3
  11. package/dist/components/agents-sdk/AgentActivity.js +1 -1
  12. package/dist/components/agents-sdk/AgentChat.d.ts +1 -1
  13. package/dist/components/agents-sdk/AgentChat.js +10 -10
  14. package/dist/components/agents-sdk/BrowserLiveScreen.js +4 -1
  15. package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
  16. package/dist/components/agents-sdk/BrowserReplay.js +1 -1
  17. package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
  18. package/dist/components/agents-sdk/ManagerOffice.js +4 -4
  19. package/dist/components/agents-sdk/McpConnectionRequest.js +2 -2
  20. package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
  21. package/dist/components/agents-sdk/McpPluginCatalog.d.ts +1 -91
  22. package/dist/components/agents-sdk/McpPluginCatalog.js +3 -3
  23. package/dist/components/agents-sdk/McpServerPicker.js +2 -2
  24. package/dist/components/agents-sdk/ModelSelector.js +3 -3
  25. package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
  26. package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
  27. package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
  28. package/dist/components/agents-sdk/SubagentRunSelector.js +1 -1
  29. package/dist/components/agents-sdk/ThinkChat.d.ts +2 -2
  30. package/dist/components/agents-sdk/ThinkChat.js +1 -1
  31. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
  32. package/dist/components/agents-sdk/ThinkChatActivity.js +3 -3
  33. package/dist/components/agents-sdk/ThinkChatToolPanels.js +2 -2
  34. package/dist/components/agents-sdk/ThinkExecutionDetail.js +3 -3
  35. package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
  36. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +3 -3
  37. package/dist/components/agents-sdk/ThinkFullApp.d.ts +20 -6
  38. package/dist/components/agents-sdk/ThinkFullApp.js +7 -6
  39. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.js +1 -1
  40. package/dist/components/agents-sdk/ThinkRecoveryNotice.js +3 -2
  41. package/dist/components/agents-sdk/ThinkRoutine.d.ts +1 -7
  42. package/dist/components/agents-sdk/ThinkRoutineBrowser.js +2 -2
  43. package/dist/components/agents-sdk/ThinkRoutineDetail.js +1 -1
  44. package/dist/components/agents-sdk/ThinkRoutineForm.d.ts +34 -18
  45. package/dist/components/agents-sdk/ThinkRoutineForm.js +395 -110
  46. package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +5 -4
  47. package/dist/components/agents-sdk/ThinkRoutineLibrary.js +19 -33
  48. package/dist/components/agents-sdk/ThinkRoutineRuns.js +1 -1
  49. package/dist/components/agents-sdk/ThinkSidepanel.d.ts +173 -0
  50. package/dist/components/agents-sdk/ThinkSidepanel.js +711 -0
  51. package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +4 -5
  52. package/dist/components/agents-sdk/ThinkThreadPicker.js +9 -9
  53. package/dist/components/agents-sdk/Workspace.d.ts +1 -139
  54. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
  55. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  56. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +1 -1
  57. package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -3
  58. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  59. package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
  60. package/dist/components/agents-sdk/WorkspaceMountManager.js +2 -2
  61. package/dist/components/ai-sdk/Activity.js +1 -1
  62. package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +1 -1
  63. package/dist/components/ai-sdk/AgentChatStartScreen.js +6 -3
  64. package/dist/components/ai-sdk/Approval.js +2 -2
  65. package/dist/components/ai-sdk/Artifact.js +1 -1
  66. package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
  67. package/dist/components/ai-sdk/ChainOfThought.js +1 -1
  68. package/dist/components/ai-sdk/Checkpoint.js +1 -1
  69. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  70. package/dist/components/ai-sdk/ConnectedAppCards.d.ts +106 -0
  71. package/dist/components/ai-sdk/ConnectedAppCards.js +416 -0
  72. package/dist/components/ai-sdk/Conversation.js +1 -1
  73. package/dist/components/ai-sdk/Goal.js +1 -1
  74. package/dist/components/ai-sdk/InlineCitation.js +1 -1
  75. package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
  76. package/dist/components/ai-sdk/Message.js +1 -1
  77. package/dist/components/ai-sdk/MessageScroller.js +1 -1
  78. package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
  79. package/dist/components/ai-sdk/Plan.js +1 -1
  80. package/dist/components/ai-sdk/PromptInput.js +3 -3
  81. package/dist/components/ai-sdk/Queue.js +2 -2
  82. package/dist/components/ai-sdk/Reasoning.js +2 -2
  83. package/dist/components/ai-sdk/Sources.js +1 -1
  84. package/dist/components/ai-sdk/Task.js +1 -1
  85. package/dist/components/ai-sdk/ToolInvocation.js +1 -1
  86. package/dist/components/extension/ChatGptSignInScreen.d.ts +1 -3
  87. package/dist/components/extension/ChatGptSignInScreen.js +7 -20
  88. package/dist/components/extension/CodexModelSelector.js +2 -2
  89. package/dist/components/extension/ConversationTabPicker.js +2 -2
  90. package/dist/components/foundations/Checkbox.js +1 -1
  91. package/dist/components/foundations/Collapsible.js +1 -1
  92. package/dist/components/foundations/ContextMenu.js +1 -1
  93. package/dist/components/foundations/DescriptionList.d.ts +3 -0
  94. package/dist/components/foundations/DescriptionList.js +2 -1
  95. package/dist/components/foundations/Menubar.js +1 -1
  96. package/dist/components/foundations/SearchField.js +1 -1
  97. package/dist/components/foundations/Select.js +1 -1
  98. package/dist/components/foundations/Stepper.js +1 -1
  99. package/dist/components/foundations/Toast.js +1 -1
  100. package/dist/components/foundations/ToggleGroup.d.ts +1 -1
  101. package/dist/components/foundations/ToggleGroup.js +1 -1
  102. package/dist/components/foundations/icons.d.ts +2 -2
  103. package/dist/components/foundations/icons.js +2 -2
  104. package/dist/components/general-purpose/Commit.js +2 -2
  105. package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
  106. package/dist/components/general-purpose/FileTree.js +1 -1
  107. package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
  108. package/dist/components/general-purpose/PricingPlanCard.js +1 -1
  109. package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
  110. package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -104
  111. package/dist/components/general-purpose/ResponsiveSidebarShell.js +3 -3
  112. package/dist/components/general-purpose/SettingsFormDialog.js +2 -2
  113. package/dist/components/general-purpose/SetupChecklist.js +1 -76
  114. package/dist/components/general-purpose/Terminal.js +2 -2
  115. package/dist/components/general-purpose/TestResults.js +1 -1
  116. package/dist/components/general-purpose/ThemeModeControl.js +2 -2
  117. package/dist/components/general-purpose/WebPreview.js +2 -2
  118. package/dist/components/nanites/AgentConnection.js +2 -2
  119. package/dist/components/nanites/AgentToolDetail.js +4 -4
  120. package/dist/{copy-button-lys9N_aI.js → copy-button-DHhf-J1d.js} +1 -1
  121. package/dist/{icons-0corjfxR.d.ts → icons-6ZnyZJiR.d.ts} +6 -1
  122. package/dist/{icons-CVFSeTJn.js → icons-Dw-im7lg.js} +4 -3
  123. package/dist/styles/agent-chat.css +20 -15
  124. package/dist/styles/browser-live-screen.css +3 -0
  125. package/dist/styles/button.css +1 -5
  126. package/dist/styles/chatgpt-sign-in-screen.css +87 -43
  127. package/dist/styles/connected-app-card.css +54 -0
  128. package/dist/styles/description-list.css +25 -0
  129. package/dist/styles/index.css +2 -0
  130. package/dist/styles/responsive-sidebar-shell.css +12 -9
  131. package/dist/styles/think-routine-library.css +28 -0
  132. package/dist/styles/think-sidepanel.css +74 -0
  133. package/package.json +2 -2
  134. package/dist/{ThinkChat-DkA4Wr71.js → ThinkChat-BES_3Mb-.js} +1 -1
@@ -42,11 +42,10 @@ interface ThinkThreadPickerProps extends Omit<React.HTMLAttributes<HTMLElement>,
42
42
  */
43
43
  renderThreadLink: (thread: ThinkThreadItem) => React.ReactElement;
44
44
  /**
45
- * Optional create action. An app whose threads are minted by their first
46
- * message should navigate to its new-thread screen here rather than create
47
- * one: a thread created on click is an empty thread until someone writes in it.
45
+ * App-authored TanStack Router Link to the new-thread screen. A thread
46
+ * created on click is an empty thread until someone writes in it.
48
47
  */
49
- onCreate?: () => void | Promise<void>;
48
+ createThreadLink?: React.ReactElement;
50
49
  /**
51
50
  * Notified on unmodified primary activation. The link still navigates — the
52
51
  * route is the selection — so this is for side effects such as closing a
@@ -77,7 +76,7 @@ declare function ThinkThreadStatusIndicators({
77
76
  declare function ThinkThreadPicker({
78
77
  threads,
79
78
  renderThreadLink,
80
- onCreate,
79
+ createThreadLink,
81
80
  onSelect,
82
81
  onDelete,
83
82
  className,
@@ -1,12 +1,13 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { $ as WarningIcon, B as PlusIcon, K as SpinnerIcon, _ as DotIcon, t as ArchiveIcon } from "../../icons-CVFSeTJn.js";
2
+ import { V as PlusIcon, _ as DotIcon, et as WarningIcon, q as SpinnerIcon, t as ArchiveIcon } from "../../icons-Dw-im7lg.js";
3
3
  import { Button, buttonVariants } from "../foundations/Button.js";
4
4
  import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
5
- import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
6
- import { ScrollArea } from "../foundations/ScrollArea.js";
7
- import { AlertDialog } from "../foundations/AlertDialog.js";
8
5
  import { EmptyState } from "../foundations/EmptyState.js";
6
+ import { ScrollArea } from "../foundations/ScrollArea.js";
7
+ import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
8
+ import { LinkButton } from "../foundations/LinkButton.js";
9
9
  import { SearchField } from "../foundations/SearchField.js";
10
+ import { AlertDialog } from "../foundations/AlertDialog.js";
10
11
  import * as React from "react";
11
12
  import { jsx, jsxs } from "react/jsx-runtime";
12
13
  //#region src/components/agents-sdk/ThinkThreadPicker.tsx
@@ -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);
@@ -258,16 +259,15 @@ function ThinkThreadPicker({ threads, renderThreadLink, onCreate, onSelect, onDe
258
259
  })]
259
260
  })
260
261
  }),
261
- onCreate ? /* @__PURE__ */ jsx("div", {
262
+ createThreadLink ? /* @__PURE__ */ jsx("div", {
262
263
  className: "think-thread-picker__footer",
263
- children: /* @__PURE__ */ jsxs(Button, {
264
+ children: /* @__PURE__ */ jsxs(LinkButton, {
264
265
  ref: createButtonRef,
265
- type: "button",
266
266
  variant: "normal",
267
267
  color: "neutral",
268
268
  size: "sm",
269
269
  className: "think-thread-picker__create",
270
- onClick: () => void onCreate(),
270
+ render: createThreadLink,
271
271
  children: [/* @__PURE__ */ jsx(PlusIcon, {}), /* @__PURE__ */ jsx("span", { children: "New thread" })]
272
272
  })
273
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 { SearchField } from "../foundations/SearchField.js";
2
- import { i as FileTreeFolder, r as FileTreeFile, t as FileTree } from "../../FileTree-DMYRdT6R.js";
2
+ import { i as FileTreeFolder, r as FileTreeFile, t as FileTree } from "../../FileTree-Uu3ZnW1u.js";
3
3
  import { WorkspaceHeader } from "./WorkspaceHeader.js";
4
4
  import * as React from "react";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,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-DwdXiKku.js";
5
+ import { t as WorkspaceFileView } from "../../WorkspaceFileView-BublZXky.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,
@@ -1,2 +1,2 @@
1
- import { t as WorkspaceFileView } from "../../WorkspaceFileView-DwdXiKku.js";
1
+ import { t as WorkspaceFileView } from "../../WorkspaceFileView-BublZXky.js";
2
2
  export { WorkspaceFileView };
@@ -1,4 +1,4 @@
1
- import { H as RefreshIcon } from "../../icons-CVFSeTJn.js";
1
+ import { U as RefreshIcon } from "../../icons-Dw-im7lg.js";
2
2
  import { AppTopBar } from "../general-purpose/AppTopBar.js";
3
3
  import "react";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,9 +1,9 @@
1
- import { $ as WarningIcon, I as PaperclipIcon, T as InfoIcon, d as CheckIcon, tt as XIcon } from "../../icons-CVFSeTJn.js";
1
+ import { L as PaperclipIcon, T as InfoIcon, d as CheckIcon, et as WarningIcon, nt as XIcon } from "../../icons-Dw-im7lg.js";
2
2
  import { Button } from "../foundations/Button.js";
3
3
  import { Popover } from "../foundations/Popover.js";
4
- import { Card, CardAction, CardFooter, CardHeader, CardTitle } from "../foundations/Card.js";
5
4
  import { EmptyState } from "../foundations/EmptyState.js";
6
5
  import { AppTopBar } from "../general-purpose/AppTopBar.js";
6
+ import { Card, CardAction, CardFooter, CardHeader, CardTitle } from "../foundations/Card.js";
7
7
  import "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  //#region src/components/agents-sdk/WorkspaceMountManager.tsx
@@ -1,7 +1,7 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
+ import { p as ChevronRightIcon } from "../../icons-Dw-im7lg.js";
2
3
  import { Collapsible } from "../foundations/Collapsible.js";
3
4
  import { useExpansionState } from "./ExpansionState.js";
4
- import { p as ChevronRightIcon } from "../../icons-CVFSeTJn.js";
5
5
  import * as React from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region src/components/ai-sdk/Activity.tsx
@@ -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 };
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { tt as XIcon } from "../../icons-CVFSeTJn.js";
2
+ import { nt as XIcon } from "../../icons-Dw-im7lg.js";
3
3
  import { Button } from "../foundations/Button.js";
4
4
  import { IconButton } from "../foundations/IconButton.js";
5
5
  import { PromptInputTray } from "./PromptInput.js";
@@ -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]
@@ -1,8 +1,8 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { R as PencilIcon } from "../../icons-CVFSeTJn.js";
2
+ import { z as PencilIcon } from "../../icons-Dw-im7lg.js";
3
3
  import { Button } from "../foundations/Button.js";
4
- import { Kbd } from "../foundations/Kbd.js";
5
4
  import { a as formatUnknownValue } from "../../format-DB2mX9DA.js";
5
+ import { Kbd } from "../foundations/Kbd.js";
6
6
  import * as React from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region src/components/ai-sdk/Approval.tsx
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { $ as WarningIcon, K as SpinnerIcon, tt as XIcon } from "../../icons-CVFSeTJn.js";
2
+ import { et as WarningIcon, nt as XIcon, q as SpinnerIcon } from "../../icons-Dw-im7lg.js";
3
3
  import { Button, buttonVariants } from "../foundations/Button.js";
4
4
  import { IconButton } from "../foundations/IconButton.js";
5
5
  import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
@@ -1,5 +1,5 @@
1
1
  import { Collapsible } from "../foundations/Collapsible.js";
2
- import { E as IconProps } from "../../icons-0corjfxR.js";
2
+ import { E as IconProps } from "../../icons-6ZnyZJiR.js";
3
3
  import * as React from "react";
4
4
 
5
5
  //#region src/components/ai-sdk/ChainOfThought.d.ts
@@ -1,6 +1,6 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
+ import { _ as DotIcon, d as CheckIcon, p as ChevronRightIcon, q as SpinnerIcon } from "../../icons-Dw-im7lg.js";
2
3
  import { Collapsible } from "../foundations/Collapsible.js";
3
- import { K as SpinnerIcon, _ as DotIcon, d as CheckIcon, p as ChevronRightIcon } from "../../icons-CVFSeTJn.js";
4
4
  import "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/ai-sdk/ChainOfThought.tsx
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { s as BookmarkIcon } from "../../icons-CVFSeTJn.js";
2
+ import { s as BookmarkIcon } from "../../icons-Dw-im7lg.js";
3
3
  import { Marker, MarkerIcon } from "../foundations/Marker.js";
4
4
  import "react";
5
5
  import { jsx } from "react/jsx-runtime";
@@ -1,2 +1,2 @@
1
- import { a as CodeBlockCopyButton, c as CodeBlockLanguageSelector, d as CodeBlockLanguageSelectorTrigger, f as CodeBlockLanguageSelectorValue, i as CodeBlockContent, l as CodeBlockLanguageSelectorContent, m as CODE_BLOCK_LANGUAGES, n as CodeBlockActions, o as CodeBlockFilename, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock, u as CodeBlockLanguageSelectorItem } from "../../CodeBlock-BjELA-_s.js";
1
+ import { a as CodeBlockCopyButton, c as CodeBlockLanguageSelector, d as CodeBlockLanguageSelectorTrigger, f as CodeBlockLanguageSelectorValue, i as CodeBlockContent, l as CodeBlockLanguageSelectorContent, m as CODE_BLOCK_LANGUAGES, n as CodeBlockActions, o as CodeBlockFilename, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock, u as CodeBlockLanguageSelectorItem } from "../../CodeBlock-Dl7a3Wqo.js";
2
2
  export { CODE_BLOCK_LANGUAGES, CodeBlock, CodeBlockActions, CodeBlockContainer, CodeBlockContent, CodeBlockCopyButton, CodeBlockFilename, CodeBlockHeader, CodeBlockLanguageSelector, CodeBlockLanguageSelectorContent, CodeBlockLanguageSelectorItem, CodeBlockLanguageSelectorTrigger, CodeBlockLanguageSelectorValue, CodeBlockTitle };
@@ -0,0 +1,106 @@
1
+ import { CardProps } from "../foundations/Card.js";
2
+ import * as React from "react";
3
+
4
+ //#region src/components/ai-sdk/ConnectedAppCards.d.ts
5
+ type ConnectedAppCardState = "pending" | "sent" | "denied";
6
+ type ConnectedAppCardProps = Omit<CardProps, "children" | "hover" | "size" | "title" | "onChange"> & {
7
+ /** Lifecycle of the draft. Pending can be edited; sent and denied are settled. */state?: ConnectedAppCardState; /** Optional provider mark. The domain's generic icon is used by default. */
8
+ icon?: React.ReactNode;
9
+ };
10
+ interface EmailMessageDraft {
11
+ from?: string;
12
+ to?: string;
13
+ subject: string;
14
+ body?: string;
15
+ }
16
+ interface EmailMessageCardProps extends ConnectedAppCardProps, EmailMessageDraft {
17
+ onChange?: (next: EmailMessageDraft) => void;
18
+ onDiscard?: () => void | Promise<void>;
19
+ onReject?: (reason: string) => void | Promise<void>;
20
+ onSend?: () => void | Promise<void>;
21
+ }
22
+ /**
23
+ * Email draft or result. Pending cards can be edited and released; send,
24
+ * discard, and reject-with-reason stay application-owned.
25
+ */
26
+ declare function EmailMessageCard({
27
+ body,
28
+ from,
29
+ icon,
30
+ onChange,
31
+ onDiscard,
32
+ onReject,
33
+ onSend,
34
+ state,
35
+ subject,
36
+ to,
37
+ ref,
38
+ ...props
39
+ }: EmailMessageCardProps & {
40
+ ref?: React.Ref<HTMLDivElement>;
41
+ }): React.JSX.Element;
42
+ interface SlackMessageDraft {
43
+ workspace?: string;
44
+ to: string;
45
+ thread?: string;
46
+ message: string;
47
+ }
48
+ interface SlackMessageCardProps extends ConnectedAppCardProps, SlackMessageDraft {
49
+ onChange?: (next: SlackMessageDraft) => void;
50
+ onDiscard?: () => void | Promise<void>;
51
+ onReject?: (reason: string) => void | Promise<void>;
52
+ onSend?: () => void | Promise<void>;
53
+ }
54
+ /** Slack draft or posted message with workspace, destination, and thread fields. */
55
+ declare function SlackMessageCard({
56
+ icon,
57
+ message,
58
+ onChange,
59
+ onDiscard,
60
+ onReject,
61
+ onSend,
62
+ state,
63
+ thread,
64
+ to,
65
+ workspace,
66
+ ref,
67
+ ...props
68
+ }: SlackMessageCardProps & {
69
+ ref?: React.Ref<HTMLDivElement>;
70
+ }): React.JSX.Element;
71
+ interface CalendarEventDraft {
72
+ eventTitle: string;
73
+ when: string;
74
+ whenDateTime?: string;
75
+ location?: string;
76
+ attendees?: string;
77
+ }
78
+ interface CalendarEventCardProps extends ConnectedAppCardProps, CalendarEventDraft {
79
+ onChange?: (next: CalendarEventDraft) => void;
80
+ onDiscard?: () => void | Promise<void>;
81
+ onReject?: (reason: string) => void | Promise<void>;
82
+ onSend?: () => void | Promise<void>;
83
+ }
84
+ /**
85
+ * Calendar draft or settled event. Pass `whenDateTime` for a semantic `time`
86
+ * element; the application owns locale and timezone formatting.
87
+ */
88
+ declare function CalendarEventCard({
89
+ attendees,
90
+ eventTitle,
91
+ icon,
92
+ location,
93
+ onChange,
94
+ onDiscard,
95
+ onReject,
96
+ onSend,
97
+ state,
98
+ when,
99
+ whenDateTime,
100
+ ref,
101
+ ...props
102
+ }: CalendarEventCardProps & {
103
+ ref?: React.Ref<HTMLDivElement>;
104
+ }): React.JSX.Element;
105
+ //#endregion
106
+ export { CalendarEventCard, CalendarEventCardProps, CalendarEventDraft, ConnectedAppCardState, EmailMessageCard, EmailMessageCardProps, EmailMessageDraft, SlackMessageCard, SlackMessageCardProps, SlackMessageDraft };