@mcp-b/react-components 0.46.6 → 0.47.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 (139) hide show
  1. package/dist/{CodeBlock-BpooTofO.js → CodeBlock-DMHZiw86.js} +1 -1
  2. package/dist/{FileTree-CAXWXH63.js → FileTree-BHebfvkK.js} +1 -1
  3. package/dist/{SetupChecklist-DyPZWzK2.js → SetupChecklist-CwRjIDH4.js} +1 -1
  4. package/dist/ThinkChat-CwMdEum8.d.ts +185 -0
  5. package/dist/{ThinkChat-qztQ6Clo.js → ThinkChat-DLDta57t.js} +16 -16
  6. package/dist/ThinkThreadPicker-yFz4vvIf.d.ts +91 -0
  7. package/dist/{Workspace-DZusrEeP.d.ts → Workspace-C_zHq9KZ.d.ts} +1 -1
  8. package/dist/{WorkspaceFileView-BvDbKM2c.js → WorkspaceFileView-ChIJz-fl.js} +4 -4
  9. package/dist/{WorkspaceLink-DtH66bAY.js → WorkspaceLink-B1d2GIGl.js} +7 -2
  10. package/dist/WorkspaceLive-DLGhtIly.d.ts +49 -0
  11. package/dist/{WorkspaceMessageResponse-CJCmGvTx.js → WorkspaceMessageResponse-Dg_aNpoj.js} +76 -40
  12. package/dist/WorkspaceMessageResponse-kJYU8Onj.d.ts +48 -0
  13. package/dist/components/agents-sdk/AgentActivity.js +1 -1
  14. package/dist/components/agents-sdk/AgentChat.js +22 -18
  15. package/dist/components/agents-sdk/AgentEvent.js +1 -1
  16. package/dist/components/agents-sdk/BrowserLiveScreen.js +1 -1
  17. package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
  18. package/dist/components/agents-sdk/BrowserReplay.js +1 -1
  19. package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
  20. package/dist/components/agents-sdk/ManagerOffice.js +4 -4
  21. package/dist/components/agents-sdk/McpConnectionRequest.js +2 -2
  22. package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
  23. package/dist/components/agents-sdk/McpPluginCatalog.js +2 -2
  24. package/dist/components/agents-sdk/McpServerPicker.js +2 -2
  25. package/dist/components/agents-sdk/ModelSelector.js +3 -3
  26. package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
  27. package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
  28. package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
  29. package/dist/components/agents-sdk/SubagentRunSelector.js +1 -1
  30. package/dist/components/agents-sdk/ThinkChat.d.ts +1 -180
  31. package/dist/components/agents-sdk/ThinkChat.js +1 -1
  32. package/dist/components/agents-sdk/ThinkChatActivity.js +1 -1
  33. package/dist/components/agents-sdk/ThinkChatToolPanels.js +2 -2
  34. package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -2
  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 +13 -4
  38. package/dist/components/agents-sdk/ThinkFullApp.js +11 -4
  39. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.js +1 -1
  40. package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
  41. package/dist/components/agents-sdk/ThinkRoutineBrowser.js +2 -2
  42. package/dist/components/agents-sdk/ThinkRoutineDetail.js +1 -1
  43. package/dist/components/agents-sdk/ThinkRoutineForm.js +4 -4
  44. package/dist/components/agents-sdk/ThinkRoutineLibrary.js +3 -3
  45. package/dist/components/agents-sdk/ThinkRoutineRuns.js +1 -1
  46. package/dist/components/agents-sdk/ThinkSidepanel.d.ts +20 -5
  47. package/dist/components/agents-sdk/ThinkSidepanel.js +56 -44
  48. package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +1 -90
  49. package/dist/components/agents-sdk/ThinkThreadPicker.js +4 -4
  50. package/dist/components/agents-sdk/Workspace.d.ts +2 -2
  51. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
  52. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  53. package/dist/components/agents-sdk/WorkspaceConcept.d.ts +44 -0
  54. package/dist/components/agents-sdk/WorkspaceConcept.js +42 -0
  55. package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +100 -0
  56. package/dist/components/agents-sdk/WorkspaceCorrespondence.js +429 -0
  57. package/dist/components/agents-sdk/WorkspaceExecution.d.ts +106 -0
  58. package/dist/components/agents-sdk/WorkspaceExecution.js +393 -0
  59. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +1 -1
  60. package/dist/components/agents-sdk/WorkspaceExplorer.js +2 -2
  61. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  62. package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
  63. package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
  64. package/dist/components/agents-sdk/WorkspaceLive.d.ts +2 -0
  65. package/dist/components/agents-sdk/WorkspaceLive.js +85 -0
  66. package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +2 -2
  67. package/dist/components/agents-sdk/WorkspaceMessageResponse.js +2 -2
  68. package/dist/components/agents-sdk/WorkspaceMountManager.js +2 -2
  69. package/dist/components/agents-sdk/WorkspaceProject.d.ts +93 -0
  70. package/dist/components/agents-sdk/WorkspaceProject.js +201 -0
  71. package/dist/components/agents-sdk/WorkspaceUserScript.d.ts +47 -0
  72. package/dist/components/agents-sdk/WorkspaceUserScript.js +146 -0
  73. package/dist/components/ai-sdk/Activity.js +1 -1
  74. package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
  75. package/dist/components/ai-sdk/Approval.js +2 -2
  76. package/dist/components/ai-sdk/Artifact.js +1 -1
  77. package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
  78. package/dist/components/ai-sdk/ChainOfThought.js +1 -1
  79. package/dist/components/ai-sdk/Checkpoint.js +1 -1
  80. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  81. package/dist/components/ai-sdk/ComposerLink.d.ts +4 -1
  82. package/dist/components/ai-sdk/ComposerLink.js +4 -3
  83. package/dist/components/ai-sdk/ConnectedAppCards.d.ts +22 -2
  84. package/dist/components/ai-sdk/ConnectedAppCards.js +50 -43
  85. package/dist/components/ai-sdk/Conversation.js +1 -1
  86. package/dist/components/ai-sdk/Goal.js +1 -1
  87. package/dist/components/ai-sdk/InlineCitation.js +1 -1
  88. package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
  89. package/dist/components/ai-sdk/Message.js +1 -1
  90. package/dist/components/ai-sdk/MessageScroller.js +1 -1
  91. package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
  92. package/dist/components/ai-sdk/Plan.js +1 -1
  93. package/dist/components/ai-sdk/PromptInput.js +5 -5
  94. package/dist/components/ai-sdk/Queue.js +1 -1
  95. package/dist/components/ai-sdk/Reasoning.js +1 -1
  96. package/dist/components/ai-sdk/Sources.js +1 -1
  97. package/dist/components/ai-sdk/Task.js +1 -1
  98. package/dist/components/extension/ChatGptSignInScreen.js +1 -1
  99. package/dist/components/extension/CodexModelSelector.js +2 -2
  100. package/dist/components/extension/ConversationTabPicker.js +2 -2
  101. package/dist/components/foundations/Checkbox.js +1 -1
  102. package/dist/components/foundations/Collapsible.js +1 -1
  103. package/dist/components/foundations/ContextMenu.js +1 -1
  104. package/dist/components/foundations/Menubar.js +1 -1
  105. package/dist/components/foundations/SearchField.js +1 -1
  106. package/dist/components/foundations/Select.js +1 -1
  107. package/dist/components/foundations/Stepper.js +1 -1
  108. package/dist/components/foundations/Toast.js +1 -1
  109. package/dist/components/foundations/ToggleGroup.d.ts +1 -1
  110. package/dist/components/foundations/ToggleGroup.js +1 -1
  111. package/dist/components/foundations/icons.d.ts +2 -2
  112. package/dist/components/foundations/icons.js +2 -2
  113. package/dist/components/general-purpose/Commit.js +2 -2
  114. package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
  115. package/dist/components/general-purpose/FileTree.js +1 -1
  116. package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
  117. package/dist/components/general-purpose/PricingPlanCard.js +2 -2
  118. package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
  119. package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
  120. package/dist/components/general-purpose/SettingsFormDialog.js +2 -2
  121. package/dist/components/general-purpose/SetupChecklist.js +1 -1
  122. package/dist/components/general-purpose/Terminal.js +2 -2
  123. package/dist/components/general-purpose/TestResults.js +1 -1
  124. package/dist/components/general-purpose/ThemeModeControl.js +2 -2
  125. package/dist/components/general-purpose/WebPreview.js +2 -2
  126. package/dist/components/nanites/AgentConnection.js +2 -2
  127. package/dist/components/nanites/AgentToolDetail.d.ts +1 -1
  128. package/dist/components/nanites/AgentToolDetail.js +5 -5
  129. package/dist/{copy-button-D7ySsRRo.js → copy-button-CSDuDfdP.js} +1 -1
  130. package/dist/{icons-D0Pd2P9v.d.ts → icons-CCZGYUwU.d.ts} +6 -6
  131. package/dist/{icons-BNEY4gO5.js → icons-cuEtsgj9.js} +4 -4
  132. package/dist/styles/agent-chat.css +33 -13
  133. package/dist/styles/connected-app-card.css +8 -0
  134. package/dist/styles/description-list.css +3 -1
  135. package/dist/styles/index.css +1 -0
  136. package/dist/styles/workspace-concepts.css +28 -0
  137. package/dist/workspace-assets-CxpEHsac.js +154 -0
  138. package/package.json +2 -2
  139. package/dist/WorkspaceMessageResponse-D66ty4FO.d.ts +0 -24
@@ -0,0 +1,201 @@
1
+ import { t as cx } from "../../class-names-BiMDVpUo.js";
2
+ import { $ as UserIcon, C as FolderIcon, S as FileIcon, j as MessageSquareIcon, u as CalendarIcon } from "../../icons-cuEtsgj9.js";
3
+ import { Button } from "../foundations/Button.js";
4
+ import { IconButton } from "../foundations/IconButton.js";
5
+ import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
6
+ import { EmptyState } from "../foundations/EmptyState.js";
7
+ import { DescriptionList } from "../foundations/DescriptionList.js";
8
+ import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "../foundations/Card.js";
9
+ import { i as WorkspaceDeleteControl, n as WorkspaceComposerLink } from "../../workspace-assets-CxpEHsac.js";
10
+ import * as React from "react";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ import { useQuery } from "@tanstack/react-query";
13
+ //#region src/components/agents-sdk/WorkspaceProject.tsx
14
+ const ORIGIN_LABEL = {
15
+ user: "From you",
16
+ routine: "Schedule",
17
+ messenger: "Messenger"
18
+ };
19
+ const ORIGIN_ICON = {
20
+ user: /* @__PURE__ */ jsx(UserIcon, {}),
21
+ routine: /* @__PURE__ */ jsx(CalendarIcon, {}),
22
+ messenger: /* @__PURE__ */ jsx(MessageSquareIcon, {})
23
+ };
24
+ const ORIGIN_ORDER = [
25
+ "user",
26
+ "routine",
27
+ "messenger"
28
+ ];
29
+ function LinkList({ items }) {
30
+ if (items.length === 1) {
31
+ const item = items[0];
32
+ return /* @__PURE__ */ jsx(WorkspaceComposerLink, {
33
+ kind: "tab",
34
+ value: item.key,
35
+ label: item.label,
36
+ icon: item.icon,
37
+ hint: item.hint,
38
+ onOpen: item.onOpen
39
+ });
40
+ }
41
+ return /* @__PURE__ */ jsx("ul", {
42
+ className: "sigvelo-stack-list",
43
+ children: items.map((item) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceComposerLink, {
44
+ kind: "tab",
45
+ value: item.key,
46
+ label: item.label,
47
+ icon: item.icon,
48
+ hint: item.hint,
49
+ onOpen: item.onOpen
50
+ }) }, item.key))
51
+ });
52
+ }
53
+ function ProjectDetails({ project }) {
54
+ const files = (project.files ?? []).filter((file) => !file.path.endsWith("/PROJECT.md"));
55
+ const threads = project.threads ?? [];
56
+ if (files.length === 0 && threads.length === 0) return null;
57
+ return /* @__PURE__ */ jsxs(DescriptionList.Root, {
58
+ align: "start",
59
+ variant: "divided",
60
+ children: [files.length > 0 ? /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [/* @__PURE__ */ jsx(DescriptionList.Term, { children: "Contents" }), /* @__PURE__ */ jsx(DescriptionList.Details, { children: /* @__PURE__ */ jsx("div", {
61
+ className: "sigvelo-cluster",
62
+ children: files.map((file) => /* @__PURE__ */ jsx(WorkspaceComposerLink, {
63
+ value: file.path,
64
+ label: file.label,
65
+ hint: file.path,
66
+ onOpen: file.onOpen
67
+ }, file.path))
68
+ }) })] }) : null, ORIGIN_ORDER.map((origin) => {
69
+ const grouped = threads.filter((thread) => thread.origin === origin);
70
+ if (grouped.length === 0) return null;
71
+ return /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [/* @__PURE__ */ jsx(DescriptionList.Term, { children: ORIGIN_LABEL[origin] }), /* @__PURE__ */ jsx(DescriptionList.Details, { children: /* @__PURE__ */ jsx(LinkList, { items: grouped.map((thread) => ({
72
+ key: thread.id,
73
+ label: thread.title,
74
+ icon: thread.icon ?? ORIGIN_ICON[origin],
75
+ onOpen: thread.onOpen
76
+ })) }) })] }, origin);
77
+ })]
78
+ });
79
+ }
80
+ function WorkspaceProjectCard({ className, project, ref, ...props }) {
81
+ const titleId = React.useId();
82
+ const ariaLabel = props["aria-label"];
83
+ const ariaLabelledBy = props["aria-labelledby"] ?? (ariaLabel ? void 0 : titleId);
84
+ return /* @__PURE__ */ jsxs(Card, {
85
+ ...props,
86
+ ref,
87
+ role: props.role ?? "article",
88
+ "aria-labelledby": ariaLabelledBy,
89
+ "data-slot": "workspace-project-card",
90
+ size: "sm",
91
+ className: cx("connected-app-card", className),
92
+ children: [/* @__PURE__ */ jsxs(CardHeader, { children: [
93
+ /* @__PURE__ */ jsxs(CardTitle, {
94
+ id: titleId,
95
+ className: "connected-app-card__title",
96
+ render: /* @__PURE__ */ jsx("h3", {}),
97
+ children: [/* @__PURE__ */ jsx("span", {
98
+ className: "connected-app-card__icon",
99
+ "aria-hidden": "true",
100
+ children: project.icon ?? /* @__PURE__ */ jsx(FolderIcon, {})
101
+ }), project.name]
102
+ }),
103
+ project.description ? /* @__PURE__ */ jsx(CardDescription, { children: project.description }) : null,
104
+ project.onOpen || project.onDelete ? /* @__PURE__ */ jsxs(CardAction, {
105
+ className: "sigvelo-cluster",
106
+ children: [project.onOpen ? /* @__PURE__ */ jsx(IconButton, {
107
+ label: `Open ${project.name}`,
108
+ tooltip: project.path,
109
+ variant: "ghost",
110
+ color: "neutral",
111
+ onClick: project.onOpen,
112
+ children: /* @__PURE__ */ jsx(FileIcon, {})
113
+ }) : null, project.onDelete ? /* @__PURE__ */ jsx(WorkspaceDeleteControl, {
114
+ name: project.name,
115
+ onDelete: project.onDelete
116
+ }) : null]
117
+ }) : null
118
+ ] }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(ProjectDetails, { project }) })]
119
+ });
120
+ }
121
+ /**
122
+ * Compact inline card for one queried PROJECT.md. Identity plus contents — no status.
123
+ */
124
+ function WorkspaceProjectFileCard({ fallback = null, path, source, ...props }) {
125
+ const project = useWorkspaceProjects(source).find((candidate) => candidate.path === path);
126
+ return project ? /* @__PURE__ */ jsx(WorkspaceProjectCard, {
127
+ ...props,
128
+ project: projectWithSource(project, source)
129
+ }) : fallback;
130
+ }
131
+ /** Design-system-owned project query shared by panels, cards, and composer context. */
132
+ function useWorkspaceProjects(source) {
133
+ return useQuery(source.queryOptions).data ?? [];
134
+ }
135
+ /**
136
+ * Workbench list of queried projects. Same card as the inline placement. A
137
+ * query failure with nothing loaded renders as a quiet inline error, never as
138
+ * an empty library.
139
+ */
140
+ function WorkspaceProjectsPanel({ className, error, projects, onRetry, ref, ...props }) {
141
+ return /* @__PURE__ */ jsx("section", {
142
+ ref,
143
+ "data-slot": "workspace-projects-panel",
144
+ className: cx("workspace-concept-panel", className),
145
+ ...props,
146
+ "aria-label": props["aria-label"] ?? "Projects",
147
+ children: projects.length > 0 ? /* @__PURE__ */ jsx("ul", {
148
+ className: "sigvelo-stack-list sigvelo-stack",
149
+ children: projects.map((project) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceProjectCard, { project }) }, project.path))
150
+ }) : error !== void 0 ? /* @__PURE__ */ jsx(EmptyState, {
151
+ icon: /* @__PURE__ */ jsx(FolderIcon, {}),
152
+ title: "Projects unavailable",
153
+ description: error,
154
+ children: onRetry ? /* @__PURE__ */ jsx(Button, {
155
+ size: "sm",
156
+ variant: "outline",
157
+ color: "neutral",
158
+ onClick: onRetry,
159
+ children: "Retry"
160
+ }) : null
161
+ }) : /* @__PURE__ */ jsx(EmptyState, {
162
+ icon: /* @__PURE__ */ jsx(FolderIcon, {}),
163
+ title: "No projects"
164
+ })
165
+ });
166
+ }
167
+ function projectWithSource(project, source) {
168
+ return {
169
+ ...project,
170
+ files: project.files?.map((file) => ({
171
+ ...file,
172
+ onOpen: source.onOpenFile ? () => source.onOpenFile?.(file.path) : void 0
173
+ })),
174
+ threads: project.threads?.map((thread) => ({
175
+ ...thread,
176
+ onOpen: source.onOpenThread ? () => source.onOpenThread?.(thread.id) : void 0
177
+ })),
178
+ onOpen: source.onOpenFile ? () => source.onOpenFile?.(project.path) : void 0,
179
+ onDelete: source.onDelete ? () => source.onDelete?.(project.path) : void 0
180
+ };
181
+ }
182
+ function WorkspaceProjectSourcePanel({ source }) {
183
+ const query = useQuery(source.queryOptions);
184
+ return /* @__PURE__ */ jsx(WorkspaceProjectsPanel, {
185
+ projects: (query.data ?? []).map((project) => projectWithSource(project, source)),
186
+ error: query.isError ? formatErrorMessage(query.error) : void 0,
187
+ onRetry: query.isError ? () => void query.refetch() : void 0,
188
+ "aria-busy": query.isFetching || void 0
189
+ });
190
+ }
191
+ /** Canonical workbench descriptor; hosts supply only the source adapter. */
192
+ function workspaceProjectsPanel(source) {
193
+ return {
194
+ id: "projects",
195
+ label: "Projects",
196
+ icon: /* @__PURE__ */ jsx(FolderIcon, {}),
197
+ render: () => /* @__PURE__ */ jsx(WorkspaceProjectSourcePanel, { source })
198
+ };
199
+ }
200
+ //#endregion
201
+ export { WorkspaceProjectCard, WorkspaceProjectFileCard, WorkspaceProjectsPanel, useWorkspaceProjects, workspaceProjectsPanel };
@@ -0,0 +1,47 @@
1
+ import { CardProps } from "../foundations/Card.js";
2
+ import * as React from "react";
3
+
4
+ //#region src/components/agents-sdk/WorkspaceUserScript.d.ts
5
+ interface WorkspaceUserScript {
6
+ /** Workspace path of the `.user.js` file. */
7
+ path: string;
8
+ name: string;
9
+ description?: string;
10
+ /** `@match` patterns from the file metadata. Displayed as hostnames. */
11
+ matches: readonly string[];
12
+ enabled: boolean;
13
+ /** Brand mark. Defaults to the favicon of the first `@match` origin. */
14
+ icon?: React.ReactNode;
15
+ onEnabledChange?: (enabled: boolean) => void;
16
+ onOpen?: () => void;
17
+ onDelete?: () => void | Promise<void>;
18
+ }
19
+ interface WorkspaceUserScriptCardProps extends Omit<CardProps, "children" | "hover" | "size" | "title"> {
20
+ script: WorkspaceUserScript;
21
+ }
22
+ interface WorkspaceUserScriptsPanelProps extends Omit<React.HTMLAttributes<HTMLElement>, "children"> {
23
+ /** Projected user scripts to list; an empty list renders the empty state. */
24
+ scripts: readonly WorkspaceUserScript[];
25
+ }
26
+ declare function WorkspaceUserScriptCard({
27
+ className,
28
+ script,
29
+ ref,
30
+ ...props
31
+ }: WorkspaceUserScriptCardProps & {
32
+ ref?: React.Ref<HTMLDivElement>;
33
+ }): React.JSX.Element;
34
+ /**
35
+ * Workbench list of user-script cards, one per projected script. Renders a
36
+ * quiet empty state when nothing is projected.
37
+ */
38
+ declare function WorkspaceUserScriptsPanel({
39
+ className,
40
+ ref,
41
+ scripts,
42
+ ...props
43
+ }: WorkspaceUserScriptsPanelProps & {
44
+ ref?: React.Ref<HTMLElement>;
45
+ }): React.JSX.Element;
46
+ //#endregion
47
+ export { WorkspaceUserScript, WorkspaceUserScriptCard, WorkspaceUserScriptCardProps, WorkspaceUserScriptsPanel, WorkspaceUserScriptsPanelProps };
@@ -0,0 +1,146 @@
1
+ import { t as cx } from "../../class-names-BiMDVpUo.js";
2
+ import { P as MonitorIcon, S as FileIcon, m as CodeIcon } from "../../icons-cuEtsgj9.js";
3
+ import { IconButton } from "../foundations/IconButton.js";
4
+ import { EmptyState } from "../foundations/EmptyState.js";
5
+ import { DescriptionList } from "../foundations/DescriptionList.js";
6
+ import { Switch } from "../foundations/Switch.js";
7
+ import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "../foundations/Card.js";
8
+ import { i as WorkspaceDeleteControl, n as WorkspaceComposerLink, t as FaviconMark } from "../../workspace-assets-CxpEHsac.js";
9
+ import * as React from "react";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ //#region src/components/agents-sdk/WorkspaceUserScript.tsx
12
+ function matchAsUrl(match) {
13
+ const withoutGlobs = match.replace(/^\*:/, "https:").replaceAll("*", "");
14
+ const candidate = withoutGlobs.includes("://") ? withoutGlobs : `https://${withoutGlobs}`;
15
+ try {
16
+ return new URL(candidate);
17
+ } catch {
18
+ return;
19
+ }
20
+ }
21
+ function siteFromMatch(match) {
22
+ const trimmed = match.trim();
23
+ if (!trimmed) return void 0;
24
+ if (trimmed === "*" || trimmed === "*://*" || trimmed === "*://*/*" || trimmed === "<all_urls>") return "All sites";
25
+ return matchAsUrl(trimmed)?.hostname.replace(/^\./, "").replace(/^www\./, "") || void 0;
26
+ }
27
+ function sitesFromMatches(matches) {
28
+ const sites = [];
29
+ for (const match of matches) {
30
+ const site = siteFromMatch(match);
31
+ if (!site || sites.some((item) => item.site === site)) continue;
32
+ sites.push({
33
+ site,
34
+ match,
35
+ href: matchAsUrl(match)?.href
36
+ });
37
+ }
38
+ return sites;
39
+ }
40
+ function ScriptIcon({ script }) {
41
+ if (script.icon) return script.icon;
42
+ return /* @__PURE__ */ jsx(FaviconMark, {
43
+ href: script.matches.map((match) => matchAsUrl(match)?.href).find(Boolean),
44
+ fallback: /* @__PURE__ */ jsx(CodeIcon, {})
45
+ });
46
+ }
47
+ function ScriptSwitch({ script }) {
48
+ return /* @__PURE__ */ jsx(Switch.Root, {
49
+ size: "sm",
50
+ checked: script.enabled,
51
+ disabled: script.onEnabledChange == null,
52
+ "aria-label": `${script.enabled ? "Disable" : "Enable"} ${script.name}`,
53
+ onCheckedChange: (checked) => {
54
+ if (typeof checked === "boolean") script.onEnabledChange?.(checked);
55
+ },
56
+ children: /* @__PURE__ */ jsx(Switch.Thumb, {})
57
+ });
58
+ }
59
+ function SiteList({ matches }) {
60
+ const sites = sitesFromMatches(matches);
61
+ if (sites.length === 0) return null;
62
+ return /* @__PURE__ */ jsx(DescriptionList.Root, {
63
+ align: "start",
64
+ variant: "divided",
65
+ children: /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [/* @__PURE__ */ jsx(DescriptionList.Term, { children: "Sites" }), /* @__PURE__ */ jsx(DescriptionList.Details, { children: /* @__PURE__ */ jsx("div", {
66
+ className: "sigvelo-cluster",
67
+ children: sites.map(({ href, match, site }) => /* @__PURE__ */ jsx(WorkspaceComposerLink, {
68
+ kind: "tab",
69
+ value: site,
70
+ label: site,
71
+ hint: match,
72
+ icon: /* @__PURE__ */ jsx(FaviconMark, {
73
+ href,
74
+ fallback: /* @__PURE__ */ jsx(MonitorIcon, {})
75
+ })
76
+ }, site))
77
+ }) })] })
78
+ });
79
+ }
80
+ function WorkspaceUserScriptCard({ className, script, ref, ...props }) {
81
+ const titleId = React.useId();
82
+ const ariaLabel = props["aria-label"];
83
+ const ariaLabelledBy = props["aria-labelledby"] ?? (ariaLabel ? void 0 : titleId);
84
+ return /* @__PURE__ */ jsxs(Card, {
85
+ ...props,
86
+ ref,
87
+ role: props.role ?? "article",
88
+ "aria-labelledby": ariaLabelledBy,
89
+ "data-slot": "workspace-user-script-card",
90
+ size: "sm",
91
+ className: cx("connected-app-card", className),
92
+ children: [/* @__PURE__ */ jsxs(CardHeader, { children: [
93
+ /* @__PURE__ */ jsxs(CardTitle, {
94
+ id: titleId,
95
+ className: "connected-app-card__title",
96
+ render: /* @__PURE__ */ jsx("h3", {}),
97
+ children: [/* @__PURE__ */ jsx("span", {
98
+ className: "connected-app-card__icon",
99
+ "aria-hidden": "true",
100
+ children: /* @__PURE__ */ jsx(ScriptIcon, { script })
101
+ }), script.name]
102
+ }),
103
+ script.description ? /* @__PURE__ */ jsx(CardDescription, { children: script.description }) : null,
104
+ /* @__PURE__ */ jsxs(CardAction, {
105
+ className: "sigvelo-cluster",
106
+ children: [
107
+ /* @__PURE__ */ jsx(ScriptSwitch, { script }),
108
+ script.onOpen ? /* @__PURE__ */ jsx(IconButton, {
109
+ label: `Open ${script.name}`,
110
+ tooltip: script.path,
111
+ variant: "ghost",
112
+ color: "neutral",
113
+ onClick: script.onOpen,
114
+ children: /* @__PURE__ */ jsx(FileIcon, {})
115
+ }) : null,
116
+ script.onDelete ? /* @__PURE__ */ jsx(WorkspaceDeleteControl, {
117
+ name: script.name,
118
+ onDelete: script.onDelete
119
+ }) : null
120
+ ]
121
+ })
122
+ ] }), script.matches.length > 0 ? /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(SiteList, { matches: script.matches }) }) : null]
123
+ });
124
+ }
125
+ /**
126
+ * Workbench list of user-script cards, one per projected script. Renders a
127
+ * quiet empty state when nothing is projected.
128
+ */
129
+ function WorkspaceUserScriptsPanel({ className, ref, scripts, ...props }) {
130
+ return /* @__PURE__ */ jsx("section", {
131
+ ref,
132
+ "data-slot": "workspace-user-scripts-panel",
133
+ className: cx("workspace-concept-panel", className),
134
+ ...props,
135
+ "aria-label": props["aria-label"] ?? "User scripts",
136
+ children: scripts.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
137
+ icon: /* @__PURE__ */ jsx(CodeIcon, {}),
138
+ title: "No scripts"
139
+ }) : /* @__PURE__ */ jsx("ul", {
140
+ className: "sigvelo-stack-list sigvelo-stack",
141
+ children: scripts.map((script) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceUserScriptCard, { script }) }, script.path))
142
+ })
143
+ });
144
+ }
145
+ //#endregion
146
+ export { WorkspaceUserScriptCard, WorkspaceUserScriptsPanel };
@@ -1,7 +1,7 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
+ import { p as ChevronRightIcon } from "../../icons-cuEtsgj9.js";
2
3
  import { Collapsible } from "../foundations/Collapsible.js";
3
4
  import { useExpansionState } from "./ExpansionState.js";
4
- import { p as ChevronRightIcon } from "../../icons-BNEY4gO5.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,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { nt as XIcon } from "../../icons-BNEY4gO5.js";
2
+ import { nt as XIcon } from "../../icons-cuEtsgj9.js";
3
3
  import { Button } from "../foundations/Button.js";
4
4
  import { IconButton } from "../foundations/IconButton.js";
5
5
  import { PromptInputTray } from "./PromptInput.js";
@@ -1,8 +1,8 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { z as PencilIcon } from "../../icons-BNEY4gO5.js";
2
+ import { R as PencilIcon } from "../../icons-cuEtsgj9.js";
3
3
  import { Button } from "../foundations/Button.js";
4
- import { Kbd } from "../foundations/Kbd.js";
5
4
  import { o as formatUnknownValue } from "../../format-COCyV98Z.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 { et as WarningIcon, nt as XIcon, q as SpinnerIcon } from "../../icons-BNEY4gO5.js";
2
+ import { K as SpinnerIcon, et as WarningIcon, nt as XIcon } from "../../icons-cuEtsgj9.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-D0Pd2P9v.js";
2
+ import { E as IconProps } from "../../icons-CCZGYUwU.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 { K as SpinnerIcon, _ as DotIcon, d as CheckIcon, p as ChevronRightIcon } from "../../icons-cuEtsgj9.js";
2
3
  import { Collapsible } from "../foundations/Collapsible.js";
3
- import { _ as DotIcon, d as CheckIcon, p as ChevronRightIcon, q as SpinnerIcon } from "../../icons-BNEY4gO5.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-BNEY4gO5.js";
2
+ import { s as BookmarkIcon } from "../../icons-cuEtsgj9.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-BpooTofO.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-DMHZiw86.js";
2
2
  export { CODE_BLOCK_LANGUAGES, CodeBlock, CodeBlockActions, CodeBlockContainer, CodeBlockContent, CodeBlockCopyButton, CodeBlockFilename, CodeBlockHeader, CodeBlockLanguageSelector, CodeBlockLanguageSelectorContent, CodeBlockLanguageSelectorItem, CodeBlockLanguageSelectorTrigger, CodeBlockLanguageSelectorValue, CodeBlockTitle };
@@ -21,7 +21,10 @@ declare function ComposerLink({
21
21
  children,
22
22
  onClick,
23
23
  style,
24
+ ref,
24
25
  ...props
25
- }: ComposerLinkProps): React.JSX.Element;
26
+ }: ComposerLinkProps & {
27
+ ref?: React.Ref<HTMLAnchorElement>;
28
+ }): React.JSX.Element;
26
29
  //#endregion
27
30
  export { ComposerLink, ComposerLinkProps, composerLinkAccent, composerLinkIconSrc, composerLinkUsesCube };
@@ -1,7 +1,8 @@
1
1
  import { brandHexFromIconSrc, parseComposerHref, sampleImageAccent } from "../../utils/composer-link.js";
2
2
  import { getMcpServerIconSrc } from "../../utils/mcp-server-catalog.js";
3
3
  import { t as cx } from "../../class-names-BiMDVpUo.js";
4
- import { c as BoxIcon } from "../../icons-BNEY4gO5.js";
4
+ import { c as BoxIcon } from "../../icons-cuEtsgj9.js";
5
+ import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
5
6
  import { n as findCatalogMcpServerCard } from "../../mcp-server-7NR24ASj.js";
6
7
  import * as React from "react";
7
8
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -74,7 +75,7 @@ function ComposerLinkIcon({ icon, parts }) {
74
75
  * skills, tabs, and files. The href is the source of truth; the visible node
75
76
  * is text plus an optional brand mark, not a button chip.
76
77
  */
77
- function ComposerLink({ href, icon, className, children, onClick, style, ...props }) {
78
+ function ComposerLink({ href, icon, className, children, onClick, style, ref, ...props }) {
78
79
  const parts = parseComposerHref(href);
79
80
  const kind = parts?.kind;
80
81
  const accent = composerLinkAccent(parts);
@@ -84,7 +85,7 @@ function ComposerLink({ href, icon, className, children, onClick, style, ...prop
84
85
  if (link) bindSampledIconColor(link, accent);
85
86
  }, [accent, href]);
86
87
  return /* @__PURE__ */ jsxs("a", {
87
- ref: linkRef,
88
+ ref: mergeRefs(linkRef, ref),
88
89
  className: cx("composer-link", className),
89
90
  "data-composer-link": kind,
90
91
  href,
@@ -3,9 +3,29 @@ import * as React from "react";
3
3
 
4
4
  //#region src/components/ai-sdk/ConnectedAppCards.d.ts
5
5
  type ConnectedAppCardState = "pending" | "sent" | "denied";
6
+ /**
7
+ * Lifecycle of persisting the visible draft. Absent means saved. While a save
8
+ * is in flight or failed the card's release action is disabled, and a failed
9
+ * save is shown inline with its retry affordance — a draft must never release
10
+ * content the backing store does not hold.
11
+ */
12
+ type ConnectedAppCardSaveState = {
13
+ status: "saving";
14
+ } | {
15
+ status: "error";
16
+ message: string;
17
+ onRetry?: () => void;
18
+ };
6
19
  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. */
20
+ /** Lifecycle of the draft. Pending can be edited; sent and denied are settled. */state?: ConnectedAppCardState; /** Persistence lifecycle of the visible draft. Absent means saved. */
21
+ saveState?: ConnectedAppCardSaveState; /** Optional provider mark. The domain's generic icon is used by default. */
8
22
  icon?: React.ReactNode;
23
+ /**
24
+ * File-level controls rendered beside the status in the header, such as Open
25
+ * and Delete. The header grid owns exactly one action cell, so these share it
26
+ * with the status rather than competing for a second one.
27
+ */
28
+ headerActions?: React.ReactNode;
9
29
  };
10
30
  interface EmailMessageDraft {
11
31
  from?: string;
@@ -103,4 +123,4 @@ declare function CalendarEventCard({
103
123
  ref?: React.Ref<HTMLDivElement>;
104
124
  }): React.JSX.Element;
105
125
  //#endregion
106
- export { CalendarEventCard, CalendarEventCardProps, CalendarEventDraft, ConnectedAppCardState, EmailMessageCard, EmailMessageCardProps, EmailMessageDraft, SlackMessageCard, SlackMessageCardProps, SlackMessageDraft };
126
+ export { CalendarEventCard, CalendarEventCardProps, CalendarEventDraft, ConnectedAppCardSaveState, ConnectedAppCardState, EmailMessageCard, EmailMessageCardProps, EmailMessageDraft, SlackMessageCard, SlackMessageCardProps, SlackMessageDraft };