@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
@@ -1,5 +1,5 @@
1
1
  import { i as AgentMessageRenderPartContext } from "./AgentMessageParts-C7L-Mv9U.js";
2
- import { n as AgentChatStartScreenProps } from "./AgentChatStartScreen-CO49yepa.js";
2
+ import { n as AgentChatStartScreenProps } from "./AgentChatStartScreen-Bkv7Avni.js";
3
3
  import { D as PromptInputCommandDefinition, F as PromptInputDictationProps, K as PromptInputMessage, M as PromptInputContextSelectorProps, Q as PromptInputReference, n as PermissionMode } from "./PromptInput-BRX7FhjH.js";
4
4
  import * as React from "react";
5
5
  import { ChatAddToolApproveResponseFunction, ChatStatus, UIMessage } from "ai";
@@ -25,6 +25,11 @@ interface AgentChatStartScreenProps extends Omit<React.ComponentPropsWithoutRef<
25
25
  composer: React.ReactNode;
26
26
  /** App-authored content for the utility tray beneath the first-turn composer. */
27
27
  composerTray?: React.ReactNode;
28
+ /**
29
+ * Optional article below the composer. Replaces starters when present —
30
+ * used for a first-turn capability guide.
31
+ */
32
+ lead?: React.ReactNode;
28
33
  /** Host-authored starter data and callables rendered below the composer. */
29
34
  starters?: AgentChatStarterListProps;
30
35
  }
@@ -39,6 +44,7 @@ declare function AgentChatStartScreen({
39
44
  heading,
40
45
  composer,
41
46
  composerTray,
47
+ lead,
42
48
  starters,
43
49
  className,
44
50
  "aria-label": ariaLabel,
@@ -0,0 +1,92 @@
1
+ import { o as McpServerCard } from "./mcp-server-catalog-CCj2ItkV.js";
2
+ import { r as McpConnectorFormValues } from "./McpConnectorForm-MRm1r59e.js";
3
+ import { l as DialogProps } from "./Dialog-B_FhRWaz.js";
4
+ import * as React from "react";
5
+ import { MCPServersState } from "agents";
6
+
7
+ //#region src/components/agents-sdk/McpPluginCatalog.d.ts
8
+ /** Optional plugin-specific copy layered over the canonical MCP server card. */
9
+ interface McpPluginDetails {
10
+ developerName?: string;
11
+ marketplaceName?: string;
12
+ longDescription?: string;
13
+ capabilities?: readonly string[];
14
+ skills?: readonly string[];
15
+ }
16
+ interface McpPluginCatalogProps extends Omit<React.HTMLAttributes<HTMLElement>, "onSelect"> {
17
+ /** Canonical connector cards. The directory does not create a second plugin registry. */
18
+ servers: readonly McpServerCard[];
19
+ /** Upstream Agents MCP state used to project connected and recovery states. */
20
+ mcp?: MCPServersState;
21
+ /** Optional plugin metadata keyed by the canonical server ID. */
22
+ detailsByServerId?: Readonly<Record<string, McpPluginDetails | undefined>>;
23
+ /** Server IDs promoted into the Featured section, in display order. */
24
+ featuredServerIds?: readonly string[];
25
+ /** Host product name paired with the plugin in the connection dialog. */
26
+ brandName?: string;
27
+ /** Host product mark paired with the plugin in the connection dialog. */
28
+ brandLogo?: React.ReactNode;
29
+ /** Product-authored trust and data-sharing copy. Pass null to omit it. */
30
+ disclosure?: React.ReactNode;
31
+ /** Starts or recovers the existing MCP connection path. */
32
+ onConnect?: (server: McpServerCard) => void | Promise<void>;
33
+ /** Removes the exact upstream MCP entry. */
34
+ onDisconnect?: (serverId: string) => void | Promise<void>;
35
+ /**
36
+ * Connects a user-supplied MCP server. Providing it puts the "Custom
37
+ * plugin" action in the bar, opening the shared connector setup dialog.
38
+ */
39
+ onAddCustom?: (values: McpConnectorFormValues) => void | Promise<void>;
40
+ /** Accessible name only — the hosting tab or icon is the visible title. */
41
+ heading?: React.ReactNode;
42
+ searchLabel?: string;
43
+ emptyMessage?: React.ReactNode;
44
+ }
45
+ interface McpPluginDetailsDialogProps {
46
+ /** Selected canonical server card. Passing null closes the dialog. */
47
+ server: McpServerCard | null;
48
+ details?: McpPluginDetails;
49
+ mcp?: MCPServersState;
50
+ brandName?: string;
51
+ brandLogo?: React.ReactNode;
52
+ disclosure?: React.ReactNode;
53
+ onConnect?: (server: McpServerCard) => void | Promise<void>;
54
+ onDisconnect?: (serverId: string) => void | Promise<void>;
55
+ onOpenChange: NonNullable<DialogProps["onOpenChange"]>;
56
+ }
57
+ /**
58
+ * Searchable plugin directory backed by the same MCP cards and live Agents
59
+ * state as {@link McpServerPicker}. Selecting a row opens the shared details
60
+ * dialog; connecting still delegates to the host's existing MCP/OAuth path.
61
+ */
62
+ declare function McpPluginCatalog({
63
+ servers,
64
+ mcp,
65
+ detailsByServerId,
66
+ featuredServerIds,
67
+ brandName,
68
+ brandLogo,
69
+ disclosure,
70
+ onConnect,
71
+ onDisconnect,
72
+ onAddCustom,
73
+ heading,
74
+ searchLabel,
75
+ emptyMessage,
76
+ className,
77
+ ...props
78
+ }: McpPluginCatalogProps): React.JSX.Element;
79
+ /** Reference-derived plugin detail surface without a parallel install state. */
80
+ declare function McpPluginDetailsDialog({
81
+ server,
82
+ details,
83
+ mcp,
84
+ brandName,
85
+ brandLogo,
86
+ disclosure,
87
+ onConnect,
88
+ onDisconnect,
89
+ onOpenChange
90
+ }: McpPluginDetailsDialogProps): React.JSX.Element;
91
+ //#endregion
92
+ export { McpPluginDetailsDialogProps as a, McpPluginDetailsDialog as i, McpPluginCatalogProps as n, McpPluginDetails as r, McpPluginCatalog as t };
@@ -0,0 +1,111 @@
1
+ import * as React from "react";
2
+
3
+ //#region src/components/general-purpose/ResponsiveSidebarShell.d.ts
4
+ interface ResponsiveSidebarShellControls {
5
+ /** Close the sidebar and move focus to the main content. */
6
+ closeSidebar: () => void;
7
+ /** Close only when the shell is currently using its compact drawer layout. */
8
+ closeSidebarOnCompact: () => void;
9
+ }
10
+ /**
11
+ * Bar slot content shared by every shell-owning surface's `bar` prop, so an
12
+ * app writes one shape whether it is configuring ThinkFullApp, the routine
13
+ * library, or the shell directly.
14
+ */
15
+ interface AppBarSlots {
16
+ /**
17
+ * App-owned route element rendered as a labelled back control. Back owns
18
+ * the leading slot the same way `leading` does: the shell's own sidebar
19
+ * toggle stands down and compact sidebars stay reachable through
20
+ * `compactTitleTrigger`.
21
+ */
22
+ back?: {
23
+ label: string;
24
+ link: React.ReactElement;
25
+ };
26
+ /** App-owned leading navigation that owns the leading slot at every width. */
27
+ leading?: React.ReactNode;
28
+ /** Compact-only navigation that replaces the drawer trigger without hiding the wide rail toggle. */
29
+ compactLeading?: React.ReactNode;
30
+ /** Bar title content. Hidden at compact widths when `compactTitleTrigger` stands in. */
31
+ title?: React.ReactNode;
32
+ /** Trailing group, before `primary`. Overflow menus and secondary icon controls. */
33
+ actions?: React.ReactNode;
34
+ /**
35
+ * Rightmost trailing control. Sits after `actions` so a host can keep a
36
+ * single primary action (new thread, new schedule) on the trailing edge
37
+ * without fighting whatever else the surface puts in the bar.
38
+ */
39
+ primary?: React.ReactNode;
40
+ }
41
+ interface ResponsiveSidebarShellBar extends AppBarSlots {
42
+ /** Element the bar title renders into, e.g. `<h1 id={…}/>` for a labelled page. */
43
+ titleRender?: React.ReactElement<Record<string, unknown>>;
44
+ /**
45
+ * Label content for a compact-width drawer trigger that replaces the plain
46
+ * title and the icon toggle: the title itself becomes the control that opens
47
+ * the sidebar. The shell renders the button and the disclosure chevron.
48
+ */
49
+ compactTitleTrigger?: React.ReactNode;
50
+ /** Accessible name for the bar toolbar. Defaults to "Application controls". */
51
+ label?: string;
52
+ /** Class for the bar root, the owning surface's styling hook. */
53
+ className?: string;
54
+ /**
55
+ * No bar row at all — for content that brings its own application bar.
56
+ * Distinct from passing no slots: an empty shell with a sidebar still shows
57
+ * a bar carrying the toggle.
58
+ */
59
+ hidden?: boolean;
60
+ }
61
+ interface ResponsiveSidebarShellProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "title"> {
62
+ /**
63
+ * Navigation or other secondary surface shown beside the selected content.
64
+ * Omit for a shell that is only a bar row over content — the app bar then
65
+ * has one mount point whether or not a sidebar exists.
66
+ *
67
+ * Open/closed is shell-internal: it is ephemeral presentation state, not a
68
+ * route, so no host controls it and no resize ever writes into a router.
69
+ */
70
+ sidebar?: React.ReactNode | ((controls: ResponsiveSidebarShellControls) => React.ReactNode);
71
+ /** Main content. */
72
+ children?: React.ReactNode;
73
+ /** Short noun used by the toggle and resize control, such as “threads” or “schedules”. */
74
+ sidebarLabel?: string;
75
+ /** Initial desktop sidebar width in CSS pixels. */
76
+ defaultSidebarWidth?: number;
77
+ /** Shell-owned application bar composed from slots. */
78
+ bar?: ResponsiveSidebarShellBar;
79
+ /**
80
+ * Host-owned error shown in the main column above the content, without
81
+ * replacing it. The shell renders the alert anatomy; pass the message.
82
+ */
83
+ error?: React.ReactNode;
84
+ /** Accessible name for the mobile peek target that returns to the main content. */
85
+ showMainLabel?: string;
86
+ }
87
+ /**
88
+ * The one application shell: responsive master-detail with a resizable desktop
89
+ * sidebar, a compact floating drawer that leaves the main content in place as
90
+ * a dismiss target, and a shell-owned application bar composed from slots.
91
+ * The root exposes `data-sidebar-open="true" | "false"` as its public styling
92
+ * hook, and its container name `responsive-sidebar-shell` is public contract:
93
+ * surfaces that compose the shell size themselves against it.
94
+ */
95
+ declare function ResponsiveSidebarShell({
96
+ sidebar,
97
+ sidebarLabel,
98
+ defaultSidebarWidth,
99
+ bar,
100
+ error,
101
+ showMainLabel,
102
+ className,
103
+ children,
104
+ ref,
105
+ style,
106
+ ...props
107
+ }: ResponsiveSidebarShellProps & {
108
+ ref?: React.Ref<HTMLDivElement>;
109
+ }): React.JSX.Element;
110
+ //#endregion
111
+ export { ResponsiveSidebarShellProps as a, ResponsiveSidebarShellControls as i, ResponsiveSidebarShell as n, ResponsiveSidebarShellBar as r, AppBarSlots as t };
@@ -0,0 +1,77 @@
1
+ import { n as mergeBaseClassName } from "./class-names-BiMDVpUo.js";
2
+ import { $ as WarningIcon, B as PlusIcon, d as CheckIcon, f as ChevronDownIcon } from "./icons-CVFSeTJn.js";
3
+ import { Button } from "./components/foundations/Button.js";
4
+ import { Menu } from "./components/foundations/Menu.js";
5
+ import * as React from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ //#region src/components/_internal/MenuDisclosureGroup.tsx
8
+ /**
9
+ * A menu-native disclosure: its trigger stays in the menu roving-focus model,
10
+ * while its rows mount only after the user expands the section.
11
+ */
12
+ function MenuDisclosureGroup({ children, className, defaultOpen = false, label, triggerClassName, ...props }) {
13
+ const [open, setOpen] = React.useState(defaultOpen);
14
+ return /* @__PURE__ */ jsxs(Menu.Group, {
15
+ className: mergeBaseClassName("menu-disclosure-group", className),
16
+ ...props,
17
+ children: [/* @__PURE__ */ jsxs(Menu.Item, {
18
+ "aria-expanded": open,
19
+ className: mergeBaseClassName("menu-disclosure-group__trigger", triggerClassName),
20
+ closeOnClick: false,
21
+ onClick: () => setOpen((current) => !current),
22
+ children: [/* @__PURE__ */ jsx("span", {
23
+ className: "sigvelo-truncate-grow",
24
+ children: label
25
+ }), /* @__PURE__ */ jsx(ChevronDownIcon, { "aria-hidden": "true" })]
26
+ }), open ? /* @__PURE__ */ jsx("div", {
27
+ className: "menu-disclosure-group__items",
28
+ children
29
+ }) : null]
30
+ });
31
+ }
32
+ //#endregion
33
+ //#region src/components/general-purpose/SetupChecklist.tsx
34
+ /** Checklist rows for any Menu surface (composer plus menu, tray menu). */
35
+ function SetupChecklistGroup({ label, entries, defaultOpen = false, onSelect }) {
36
+ return /* @__PURE__ */ jsx(MenuDisclosureGroup, {
37
+ label,
38
+ defaultOpen,
39
+ children: entries.map((entry) => /* @__PURE__ */ jsxs(Menu.Item, {
40
+ "aria-label": `${entry.name}, ${entry.complete ? "complete" : "not set up"}`,
41
+ onClick: () => onSelect(entry.id),
42
+ children: [
43
+ entry.icon,
44
+ /* @__PURE__ */ jsx("span", {
45
+ className: "sigvelo-truncate-grow",
46
+ children: entry.description
47
+ }),
48
+ entry.complete ? /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true" }) : /* @__PURE__ */ jsx(PlusIcon, { "aria-hidden": "true" })
49
+ ]
50
+ }, entry.id))
51
+ });
52
+ }
53
+ /** Progress-aware tray trigger opening the checklist in its own menu. */
54
+ function SetupChecklistAction({ actionLabel, label, entries, onSelect }) {
55
+ const completed = entries.filter((entry) => entry.complete).length;
56
+ return /* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */ jsxs(Button, {
57
+ type: "button",
58
+ variant: "ghost",
59
+ color: "neutral",
60
+ size: "md",
61
+ "aria-label": `${actionLabel} — ${completed} of ${entries.length} set up`,
62
+ render: /* @__PURE__ */ jsx(Menu.Trigger, { unstyled: true }),
63
+ children: [completed === entries.length ? /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true" }) : /* @__PURE__ */ jsx(WarningIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", { children: actionLabel })]
64
+ }), /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
65
+ side: "bottom",
66
+ align: "start",
67
+ sideOffset: 4,
68
+ children: /* @__PURE__ */ jsx(Menu.Popup, { children: /* @__PURE__ */ jsx(SetupChecklistGroup, {
69
+ defaultOpen: true,
70
+ label,
71
+ entries,
72
+ onSelect
73
+ }) })
74
+ }) })] });
75
+ }
76
+ //#endregion
77
+ export { SetupChecklistGroup as n, SetupChecklistAction as t };
@@ -1,5 +1,5 @@
1
1
  import { i as AgentMessageRenderPartContext } from "./AgentMessageParts-C7L-Mv9U.js";
2
- import { r as AgentChatProps } from "./AgentChat-DVr2giwD.js";
2
+ import { r as AgentChatProps } from "./AgentChat-Bibfj7u1.js";
3
3
  import { l as ThinkChatPart } from "./ThinkChatToolParts-D4qcnnxt.js";
4
4
  import { t as ThinkChatActivityDescription } from "./ThinkChatActivitySummary-BtBQgMg6.js";
5
5
  import * as React from "react";
@@ -40,6 +40,8 @@ interface ThinkChatActivityProps {
40
40
  isStreaming?: boolean;
41
41
  /** Per-tool action/panel overrides, keyed by tool name. */
42
42
  toolRenderers?: ThinkChatToolRenderers;
43
+ /** Replaces the summary action after the activity settles. */
44
+ settledAction?: string;
43
45
  /**
44
46
  * Uniquely identifies this run across the whole transcript for persisted
45
47
  * disclosure state (the activity renderer passes `${message.id}:${runStart}`).
@@ -54,6 +56,7 @@ declare function ThinkChatActivity({
54
56
  defaultOpen,
55
57
  isStreaming,
56
58
  toolRenderers,
59
+ settledAction,
57
60
  stateKey
58
61
  }: ThinkChatActivityProps): React.JSX.Element | null;
59
62
  /**
@@ -0,0 +1,140 @@
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
140
+ export { workspaceQueryKey as A, workspaceBinaryFileQueryOptions as C, workspaceFileAssetQueryOptions as D, workspaceDirectoryQueryPrefix as E, workspaceFileStatQueryOptions as O, useWorkspace as S, workspaceDirectoryQueryOptions as T, WorkspaceResolvedAsset as _, WorkspaceDirectoryQueryOptions as a, WorkspaceTextFileQueryKey as b, WorkspaceFileQueryKey as c, WorkspaceFileStatQueryOptions as d, WorkspaceFileVersion as f, WorkspaceQueryKey as g, WorkspaceInfoQueryOptions as h, WorkspaceDirectoryQueryKey as i, workspaceTextFileQueryOptions as j, workspaceInfoQueryOptions as k, WorkspaceFileReadTarget as l, WorkspaceInfoQueryKey as m, WorkspaceBinaryFileQueryKey as n, WorkspaceFileAssetQueryKey as o, WorkspaceInfo as p, WorkspaceBinaryFileQueryOptions as r, WorkspaceFileAssetQueryOptions as s, UseWorkspaceOptions as t, WorkspaceFileStatQueryKey as u, WorkspaceSource as v, workspaceDirectoryQueryKey as w, WorkspaceTextFileQueryOptions as x, WorkspaceState as y };
@@ -70,32 +70,27 @@ function useWorkspaceAssetUrl(asset, mimeType) {
70
70
  });
71
71
  return;
72
72
  }
73
- let url = null;
74
- let downloadUrl = null;
75
- try {
76
- const previewBlob = new Blob([toBlobPart(asset.data)], { type: mimeType });
77
- url = URL.createObjectURL(previewBlob);
78
- downloadUrl = mimeType === SVG_MIME_TYPE ? URL.createObjectURL(new Blob([previewBlob], { type: "application/octet-stream" })) : url;
73
+ const previewBlob = new Blob([toBlobPart(asset.data)], { type: mimeType });
74
+ const previewUrl = URL.createObjectURL(previewBlob);
75
+ if (mimeType !== SVG_MIME_TYPE) {
79
76
  setObjectUrl({
80
77
  asset,
81
- url,
82
- downloadUrl,
78
+ url: previewUrl,
79
+ downloadUrl: previewUrl,
83
80
  error: null
84
81
  });
85
- } catch {
86
- if (url) URL.revokeObjectURL(url);
87
- if (downloadUrl && downloadUrl !== url) URL.revokeObjectURL(downloadUrl);
88
- setObjectUrl({
89
- asset,
90
- url: null,
91
- downloadUrl: null,
92
- error: "This file could not be prepared for preview."
93
- });
94
- return;
82
+ return () => URL.revokeObjectURL(previewUrl);
95
83
  }
84
+ const svgDownloadUrl = URL.createObjectURL(new Blob([previewBlob], { type: "application/octet-stream" }));
85
+ setObjectUrl({
86
+ asset,
87
+ url: previewUrl,
88
+ downloadUrl: svgDownloadUrl,
89
+ error: null
90
+ });
96
91
  return () => {
97
- if (url) URL.revokeObjectURL(url);
98
- if (downloadUrl && downloadUrl !== url) URL.revokeObjectURL(downloadUrl);
92
+ URL.revokeObjectURL(previewUrl);
93
+ URL.revokeObjectURL(svgDownloadUrl);
99
94
  };
100
95
  }, [asset, mimeType]);
101
96
  if (!asset) return {
@@ -529,7 +524,6 @@ function WorkspaceFileView({ appearance = "contained", file, path, isLoading, is
529
524
  target ??= surface.querySelector("article");
530
525
  if (!target) return;
531
526
  if (!target.matches("a, button, input, select, textarea")) target.tabIndex = -1;
532
- if (saved?.scrollTop === void 0 && !saved?.focusDestination) target.scrollIntoView({ block: "start" });
533
527
  target.focus({ preventScroll: true });
534
528
  handledFocusRequestRef.current = focusRequest;
535
529
  }, [
@@ -1,4 +1,4 @@
1
- import { inferFaviconUrl } from "../../utils/favicon.js";
1
+ import { canRequestFavicon, inferFaviconUrl } from "../../utils/favicon.js";
2
2
  import { $ as WarningIcon, D as LinkIcon, N as MonitorIcon, R as PencilIcon, S as FileIcon, T as InfoIcon, U as SearchIcon, Z as TerminalIcon, et as WrenchIcon } from "../../icons-CVFSeTJn.js";
3
3
  import * as React from "react";
4
4
  import { jsx } from "react/jsx-runtime";
@@ -21,7 +21,8 @@ function AgentActivityIcon({ kind }) {
21
21
  function AgentActivityFavicon({ fallbackKind = "web", url }) {
22
22
  const src = inferFaviconUrl(url);
23
23
  const [failedSrc, setFailedSrc] = React.useState(null);
24
- if (!src || failedSrc === src) return /* @__PURE__ */ jsx(AgentActivityIcon, { kind: fallbackKind });
24
+ const failed = failedSrc === src;
25
+ if (!src || !canRequestFavicon(src) || failed) return /* @__PURE__ */ jsx(AgentActivityIcon, { kind: fallbackKind });
25
26
  return /* @__PURE__ */ jsx("img", {
26
27
  className: "activity__favicon",
27
28
  src,
@@ -1,2 +1,2 @@
1
- import { a as PermissionModeControl, i as AgentChatRenderMessageContext, n as AgentChatComposerDraft, o as compactingNotice, r as AgentChatProps, t as AgentChat } from "../../AgentChat-DVr2giwD.js";
1
+ import { a as PermissionModeControl, i as AgentChatRenderMessageContext, n as AgentChatComposerDraft, o as compactingNotice, r as AgentChatProps, t as AgentChat } from "../../AgentChat-Bibfj7u1.js";
2
2
  export { AgentChat, AgentChatComposerDraft, AgentChatProps, AgentChatRenderMessageContext, PermissionModeControl, compactingNotice };
@@ -681,6 +681,7 @@ function AgentChat({ className, messages, status = "ready", onSubmit, showCompos
681
681
  ref,
682
682
  variant: "fade",
683
683
  className: cx("agent-chat", className),
684
+ "data-recipe": "fill-host",
684
685
  "data-composer-hidden": showComposer ? void 0 : "",
685
686
  children: [
686
687
  /* @__PURE__ */ jsx("span", {
@@ -45,7 +45,8 @@ function BrowserRunPanelFrame({ body, bodyBusy, bodyTabValue, className, error,
45
45
  ...onOpenUrl ? { onUrlChange: onOpenUrl } : {},
46
46
  role: "region",
47
47
  "aria-label": typeof label === "string" ? label : "Browser",
48
- ...props
48
+ ...props,
49
+ "data-recipe": "fill-host"
49
50
  }),
50
51
  children: [
51
52
  tabs.length > 1 ? /* @__PURE__ */ jsx(WebPreviewNavigation, { children: /* @__PURE__ */ jsx(Tabs.List, {