@mcp-b/react-components 0.58.1 → 0.59.1
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.
- package/dist/{CodeBlock-Bs_Z03eC.js → CodeBlock-B4K656LO.js} +1 -1
- package/dist/{EmployeeChrome-DsdIek0l.d.ts → EmployeeChrome-QSki0QT4.d.ts} +4 -4
- package/dist/{ExecutionResult-BSZsUbrL.js → ExecutionResult-Wd1sKAvD.js} +2 -2
- package/dist/{FileTree-DyLBn7O_.js → FileTree-BpCJuvji.js} +1 -1
- package/dist/{ManagerOffice-C8AQcaXs.js → ManagerOffice-BaHSBcSF.js} +4 -4
- package/dist/{ResponsiveSidebarShell-DoZlSP30.d.ts → ResponsiveSidebarShell-DzBGlRJF.d.ts} +23 -8
- package/dist/{SetupChecklist-CKQ-mKYt.js → SetupChecklist-BNK2XFaI.js} +2 -2
- package/dist/{ThinkChatActivity-BkGjTY4r.d.ts → ThinkChatActivity-C4_hPEmb.d.ts} +20 -4
- package/dist/{ThinkChatActivitySummary-DZVy3uQV.d.ts → ThinkChatActivitySummary-ChJ8Iu2T.d.ts} +3 -3
- package/dist/{ThinkChatToolParts-BucHi63O.d.ts → ThinkChatToolParts-BrntWlpa.d.ts} +29 -3
- package/dist/{WorkspaceConceptPanel-97ZyVpZI.js → WorkspaceConceptPanel-D21iRsWm.js} +7 -4
- package/dist/{WorkspaceFileView-M2jC2P4p.js → WorkspaceFileView-5SHsjamf.js} +84 -78
- package/dist/app-bar-outlet-CNfNzY4Y.js +6 -0
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentChat.js +7 -7
- package/dist/components/agents-sdk/BrowserLiveScreen.js +50 -12
- package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
- package/dist/components/agents-sdk/EmployeeApp.d.ts +2 -3
- package/dist/components/agents-sdk/EmployeeApp.js +5 -5
- package/dist/components/agents-sdk/EmployeeChat.js +4 -4
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeChrome.js +219 -207
- package/dist/components/agents-sdk/EmployeeSchedules.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeSchedules.js +7 -7
- package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeStartScreen.js +3 -3
- package/dist/components/agents-sdk/ExecutionBoard.js +4 -4
- package/dist/components/agents-sdk/ManagerAccountActions.js +2 -2
- package/dist/components/agents-sdk/ManagerOffice.js +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.js +6 -19
- package/dist/components/agents-sdk/McpConnectionRequest.js +2 -2
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +2 -2
- package/dist/components/agents-sdk/McpServerPicker.js +2 -2
- package/dist/components/agents-sdk/ModelEndpointDialog.js +1 -1
- package/dist/components/agents-sdk/ModelSelector.js +5 -5
- package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
- package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
- package/dist/components/agents-sdk/SubagentRunPanel.d.ts +8 -9
- package/dist/components/agents-sdk/SubagentRunPanel.js +133 -122
- package/dist/components/agents-sdk/SubagentRunSelector.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChat.js +26 -3
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +110 -110
- package/dist/components/agents-sdk/ThinkChatActivitySummary.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivitySummary.js +183 -40
- package/dist/components/agents-sdk/ThinkChatToolPanels.d.ts +8 -4
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +310 -64
- package/dist/components/agents-sdk/ThinkChatToolParts.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkChatToolParts.js +71 -1
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +3 -4
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +8 -8
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkFullApp.js +6 -1
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineActions.js +15 -23
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +2 -2
- package/dist/components/agents-sdk/ThinkRoutineDetail.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineForm.js +6 -6
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +1 -1
- package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -3
- package/dist/components/agents-sdk/WorkbenchBack.js +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +7 -7
- package/dist/components/agents-sdk/WorkspaceExecution.js +146 -139
- package/dist/components/agents-sdk/WorkspaceExecutionTable.js +5 -5
- package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -3
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/agents-sdk/WorkspaceHeader.js +27 -29
- package/dist/components/agents-sdk/WorkspaceMountManager.js +1 -1
- package/dist/components/agents-sdk/WorkspaceProject.js +6 -6
- package/dist/components/agents-sdk/WorkspaceUserScript.js +6 -6
- package/dist/components/ai-sdk/Activity.d.ts +1 -1
- package/dist/components/ai-sdk/Activity.js +85 -7
- package/dist/components/ai-sdk/AgentChatMessageEditor.js +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
- package/dist/components/ai-sdk/Approval.js +4 -3
- package/dist/components/ai-sdk/Artifact.js +1 -1
- package/dist/components/ai-sdk/ChainOfThought.js +1 -1
- package/dist/components/ai-sdk/Checkpoint.js +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/ComposerLink.js +2 -2
- package/dist/components/ai-sdk/ConnectedAppCards.js +66 -48
- package/dist/components/ai-sdk/Context.js +1 -1
- package/dist/components/ai-sdk/Conversation.js +2 -2
- package/dist/components/ai-sdk/ExpansionState.d.ts +16 -6
- package/dist/components/ai-sdk/ExpansionState.js +25 -7
- package/dist/components/ai-sdk/Goal.js +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.js +2 -2
- package/dist/components/ai-sdk/Message.js +2 -2
- package/dist/components/ai-sdk/MessageScroller.js +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +99 -12
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.js +13 -9
- package/dist/components/ai-sdk/PromptInputComposerEditor.js +2 -2
- package/dist/components/ai-sdk/Queue.js +2 -2
- package/dist/components/ai-sdk/Reasoning.js +1 -1
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.js +1 -1
- package/dist/components/ai-sdk/ToolInvocation.d.ts +8 -0
- package/dist/components/ai-sdk/ToolInvocation.js +45 -19
- package/dist/components/extension/ChatGptSignInScreen.js +1 -1
- package/dist/components/extension/CodexModelSelector.js +2 -2
- package/dist/components/extension/ConversationTabPicker.js +2 -2
- package/dist/components/foundations/Checkbox.js +1 -1
- package/dist/components/foundations/Collapsible.js +1 -1
- package/dist/components/foundations/ContextMenu.js +1 -1
- package/dist/components/foundations/Menubar.js +1 -1
- package/dist/components/foundations/SearchField.js +1 -1
- package/dist/components/foundations/Select.js +1 -1
- package/dist/components/foundations/Stepper.js +1 -1
- package/dist/components/foundations/Toast.js +1 -1
- package/dist/components/foundations/ToggleGroup.js +1 -1
- package/dist/components/foundations/icons.js +1 -1
- package/dist/components/general-purpose/AccountSignInDialog.js +1 -1
- package/dist/components/general-purpose/Commit.js +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/PricingPlanCard.js +2 -2
- package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +2 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +163 -88
- package/dist/components/general-purpose/SettingsFormDialog.js +2 -2
- package/dist/components/general-purpose/SetupChecklist.js +1 -1
- package/dist/components/general-purpose/Terminal.js +3 -3
- package/dist/components/general-purpose/TestResults.js +1 -1
- package/dist/components/general-purpose/ThemeModeControl.js +1 -1
- package/dist/components/general-purpose/WebPreview.js +2 -2
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.d.ts +1 -3
- package/dist/components/nanites/AgentToolDetail.js +30 -39
- package/dist/{copy-button-M4sAp9xS.js → copy-button-BsmxSSeD.js} +1 -1
- package/dist/merge-refs-DAh6reu8.js +26 -0
- package/dist/styles/activity.css +74 -0
- package/dist/styles/agent-chat.css +8 -1
- package/dist/styles/agent-tool-detail.css +2 -17
- package/dist/styles/app-top-bar.css +6 -7
- package/dist/styles/base.css +1 -1
- package/dist/styles/employee-chrome.css +0 -7
- package/dist/styles/message.css +1 -1
- package/dist/styles/responsive-sidebar-shell.css +10 -25
- package/dist/styles/scroll-area.css +16 -0
- package/dist/styles/scrollbars.css +55 -41
- package/dist/styles/search-field.css +0 -1
- package/dist/styles/subagent-run.css +36 -196
- package/dist/styles/think-chat-tool-panels.css +38 -5
- package/dist/styles/think-execution-workbench.css +4 -0
- package/dist/styles/think-full-app.css +1 -6
- package/dist/styles/workspace-concepts.css +6 -39
- package/dist/styles/workspace-explorer.css +4 -11
- package/dist/{workspace-assets-DVn0d-fN.js → workspace-assets-RD6IhOyh.js} +1 -1
- package/dist/{workspace-delete-DfloiBWp.js → workspace-delete-CrNGUuBp.js} +1 -1
- package/package.json +2 -2
- package/dist/components/agents-sdk/SubagentRunDetails.d.ts +0 -40
- package/dist/components/agents-sdk/SubagentRunDetails.js +0 -98
- package/dist/merge-refs-DF_7w2x_.js +0 -18
- package/dist/{icons-DvlrWt54.js → icons-Cn3vWZRs.js} +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { C as FolderIcon, D as LinkIcon, K as SpinnerIcon, R as PencilIcon, S as FileIcon, Y as StopIcon, d as CheckIcon, h as CopyIcon, nt as WrenchIcon, r as ArrowLeftIcon, tt as WarningIcon, u as CalendarIcon, z as PlayIcon } from "../../icons-Cn3vWZRs.js";
|
|
1
2
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
2
|
-
import { C as FolderIcon, D as LinkIcon, K as SpinnerIcon, R as PencilIcon, S as FileIcon, Y as StopIcon, d as CheckIcon, h as CopyIcon, nt as WrenchIcon, r as ArrowLeftIcon, tt as WarningIcon, u as CalendarIcon, z as PlayIcon } from "../../icons-DvlrWt54.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
-
import { Field } from "../foundations/Field.js";
|
|
5
|
-
import { Textarea } from "../foundations/Textarea.js";
|
|
6
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
7
5
|
import { a as formatErrorMessage } from "../../format-CWaZEp5o.js";
|
|
6
|
+
import { Field } from "../foundations/Field.js";
|
|
7
|
+
import { Textarea } from "../foundations/Textarea.js";
|
|
8
8
|
import { Select } from "../foundations/Select.js";
|
|
9
9
|
import { a as readExecutionResult, i as executionResultSummary, t as executionErrorSummary } from "../../execution-result-DWVmm-bL.js";
|
|
10
|
-
import { a as httpUrl, r as WebsiteLink, t as FaviconMark } from "../../workspace-assets-
|
|
11
|
-
import { n as executionResultLabel, t as ExecutionResult } from "../../ExecutionResult-
|
|
10
|
+
import { a as httpUrl, r as WebsiteLink, t as FaviconMark } from "../../workspace-assets-RD6IhOyh.js";
|
|
11
|
+
import { n as executionResultLabel, t as ExecutionResult } from "../../ExecutionResult-Wd1sKAvD.js";
|
|
12
12
|
import { ExecutionBoard } from "./ExecutionBoard.js";
|
|
13
13
|
import { Checkbox } from "../foundations/Checkbox.js";
|
|
14
14
|
import { Progress } from "../foundations/Progress.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { C as FolderIcon } from "../../icons-
|
|
3
|
-
import { n as mergeRefs } from "../../merge-refs-
|
|
2
|
+
import { C as FolderIcon } from "../../icons-Cn3vWZRs.js";
|
|
3
|
+
import { n as mergeRefs } from "../../merge-refs-DAh6reu8.js";
|
|
4
4
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
5
5
|
import { WorkspaceMountManager } from "./WorkspaceMountManager.js";
|
|
6
6
|
import { n as WorkspaceNavigationProvider, r as resolveWorkspaceLink } from "../../WorkspaceLink-BeFAXpbI.js";
|
|
7
7
|
import { WorkspaceNavigationRestorationBoundary, useRequiredWorkspaceNavigationRestoration } from "./WorkspaceNavigationRestoration.js";
|
|
8
8
|
import { WorkspaceBrowser } from "./WorkspaceBrowser.js";
|
|
9
|
-
import { t as WorkspaceFileView } from "../../WorkspaceFileView-
|
|
9
|
+
import { t as WorkspaceFileView } from "../../WorkspaceFileView-5SHsjamf.js";
|
|
10
10
|
import * as React from "react";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region src/components/agents-sdk/WorkspaceExplorer.tsx
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as WorkspaceFileView } from "../../WorkspaceFileView-
|
|
1
|
+
import { t as WorkspaceFileView } from "../../WorkspaceFileView-5SHsjamf.js";
|
|
2
2
|
export { WorkspaceFileView };
|
|
@@ -1,39 +1,37 @@
|
|
|
1
|
-
import { H as RefreshIcon } from "../../icons-
|
|
1
|
+
import { H as RefreshIcon } from "../../icons-Cn3vWZRs.js";
|
|
2
2
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
3
|
+
import { ResponsiveSidebarAppBar } from "../general-purpose/ResponsiveSidebarShell.js";
|
|
3
4
|
import "react";
|
|
4
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/agents-sdk/WorkspaceHeader.tsx
|
|
6
7
|
/** Shared workspace app bar for browser and file-preview surfaces. */
|
|
7
8
|
function WorkspaceHeader({ title, fileCount, path, leading, actions, copyAction, isRefreshing, onRefresh }) {
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ jsx(ResponsiveSidebarAppBar, {
|
|
9
10
|
className: "workspace-explorer__header",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
})
|
|
35
|
-
] })
|
|
36
|
-
]
|
|
11
|
+
label: "Workspace controls",
|
|
12
|
+
leading,
|
|
13
|
+
title: /* @__PURE__ */ jsx("span", {
|
|
14
|
+
className: "workspace-explorer__heading",
|
|
15
|
+
title: path,
|
|
16
|
+
children: path ? /* @__PURE__ */ jsx("span", {
|
|
17
|
+
className: "workspace-explorer__path",
|
|
18
|
+
"data-workspace-file-heading": "",
|
|
19
|
+
children: path
|
|
20
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", { children: title }), fileCount !== void 0 ? /* @__PURE__ */ jsxs("span", {
|
|
21
|
+
className: "workspace-explorer__count",
|
|
22
|
+
children: [fileCount.toLocaleString(), " files"]
|
|
23
|
+
}) : null] })
|
|
24
|
+
}),
|
|
25
|
+
actions: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26
|
+
actions,
|
|
27
|
+
copyAction,
|
|
28
|
+
/* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
29
|
+
label: "Refresh workspace",
|
|
30
|
+
onClick: onRefresh,
|
|
31
|
+
disabled: isRefreshing,
|
|
32
|
+
children: /* @__PURE__ */ jsx(RefreshIcon, { "aria-hidden": "true" })
|
|
33
|
+
})
|
|
34
|
+
] })
|
|
37
35
|
});
|
|
38
36
|
}
|
|
39
37
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button } from "../foundations/Button.js";
|
|
2
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
2
3
|
import { Card, CardFooter, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
3
4
|
import { Popover } from "../foundations/Popover.js";
|
|
4
|
-
import { EmptyState } from "../foundations/EmptyState.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/agents-sdk/WorkspaceMountManager.tsx
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { C as FolderIcon, D as LinkIcon, K as SpinnerIcon, S as FileIcon, et as UserIcon, j as MessageSquareIcon, u as CalendarIcon } from "../../icons-
|
|
2
|
+
import { C as FolderIcon, D as LinkIcon, K as SpinnerIcon, S as FileIcon, et as UserIcon, j as MessageSquareIcon, u as CalendarIcon } from "../../icons-Cn3vWZRs.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
5
|
import { a as formatErrorMessage } from "../../format-CWaZEp5o.js";
|
|
6
|
-
import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
7
|
-
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
8
6
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
7
|
+
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
9
8
|
import { LinkButton } from "../foundations/LinkButton.js";
|
|
10
|
-
import {
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
9
|
+
import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
10
|
+
import { i as WorkspaceComposerLink, t as FaviconMark } from "../../workspace-assets-RD6IhOyh.js";
|
|
11
|
+
import { t as WorkspaceDeleteControl } from "../../workspace-delete-CrNGUuBp.js";
|
|
12
|
+
import { t as WorkspaceConceptPanel } from "../../WorkspaceConceptPanel-D21iRsWm.js";
|
|
13
13
|
import * as React from "react";
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
import { useQuery } from "@tanstack/react-query";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { P as MonitorIcon, S as FileIcon, m as CodeIcon } from "../../icons-
|
|
2
|
+
import { P as MonitorIcon, S as FileIcon, m as CodeIcon } from "../../icons-Cn3vWZRs.js";
|
|
3
3
|
import { IconButton } from "../foundations/IconButton.js";
|
|
4
|
-
import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
5
|
-
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
6
4
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
7
|
-
import {
|
|
5
|
+
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
6
|
+
import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
7
|
+
import { i as WorkspaceComposerLink, t as FaviconMark } from "../../workspace-assets-RD6IhOyh.js";
|
|
8
8
|
import { Switch } from "../foundations/Switch.js";
|
|
9
|
-
import { t as WorkspaceDeleteControl } from "../../workspace-delete-
|
|
10
|
-
import { t as WorkspaceConceptPanel } from "../../WorkspaceConceptPanel-
|
|
9
|
+
import { t as WorkspaceDeleteControl } from "../../workspace-delete-CrNGUuBp.js";
|
|
10
|
+
import { t as WorkspaceConceptPanel } from "../../WorkspaceConceptPanel-D21iRsWm.js";
|
|
11
11
|
import * as React from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/agents-sdk/WorkspaceUserScript.tsx
|
|
@@ -128,7 +128,7 @@ export interface ActivityPanelProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
128
128
|
status?: React.ReactNode;
|
|
129
129
|
error?: boolean;
|
|
130
130
|
}
|
|
131
|
-
/** Quiet detail
|
|
131
|
+
/** Quiet tool detail with a bounded, fading scroll body and a persistent label/status. */
|
|
132
132
|
export declare function ActivityPanel({ className, label, text, status, error, children, ref, ...props }: ActivityPanelProps & {
|
|
133
133
|
ref?: React.Ref<HTMLDivElement>;
|
|
134
134
|
}): React.JSX.Element;
|
|
@@ -1,10 +1,65 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { p as ChevronRightIcon } from "../../icons-Cn3vWZRs.js";
|
|
2
3
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
4
|
+
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
3
5
|
import { useExpansionState } from "./ExpansionState.js";
|
|
4
|
-
import { p as ChevronRightIcon } from "../../icons-DvlrWt54.js";
|
|
5
6
|
import * as React from "react";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
//#region src/components/ai-sdk/Activity.tsx
|
|
9
|
+
function observeActivityContent(list) {
|
|
10
|
+
if (!list || typeof ResizeObserver === "undefined") return;
|
|
11
|
+
const panel = list.closest(".activity__content, .activity__shell-viewport");
|
|
12
|
+
if (!panel) return;
|
|
13
|
+
let previousHeight;
|
|
14
|
+
let pendingHeight;
|
|
15
|
+
let pendingFrame;
|
|
16
|
+
const updatePanelSize = () => {
|
|
17
|
+
pendingFrame = void 0;
|
|
18
|
+
const height = pendingHeight;
|
|
19
|
+
pendingHeight = void 0;
|
|
20
|
+
if (height === void 0) return;
|
|
21
|
+
if (panel.closest("[hidden]")) {
|
|
22
|
+
previousHeight = void 0;
|
|
23
|
+
delete list.dataset.contentReady;
|
|
24
|
+
panel.style.removeProperty("--activity-content-panel-height");
|
|
25
|
+
panel.style.removeProperty("--activity-content-transition-duration");
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
list.dataset.contentReady ??= "";
|
|
29
|
+
const hasNestedSizeTransition = list.getAnimations({ subtree: true }).some((animation) => {
|
|
30
|
+
if (!("transitionProperty" in animation)) return false;
|
|
31
|
+
const property = animation.transitionProperty;
|
|
32
|
+
return property === "block-size" || property === "height";
|
|
33
|
+
});
|
|
34
|
+
const panelIsOpen = (panel.hasAttribute("data-open") || panel.classList.contains("activity__shell-viewport")) && !panel.hasAttribute("data-starting-style") && !panel.hasAttribute("data-ending-style");
|
|
35
|
+
const hasPanelSizeTransition = panel.getAnimations().some((animation) => {
|
|
36
|
+
if (!("transitionProperty" in animation)) return false;
|
|
37
|
+
const property = animation.transitionProperty;
|
|
38
|
+
return (property === "block-size" || property === "height") && (animation.playState === "running" || animation.playState === "paused");
|
|
39
|
+
});
|
|
40
|
+
const heightValue = hasNestedSizeTransition && panelIsOpen && !hasPanelSizeTransition ? "auto" : previousHeight === "auto" ? getComputedStyle(list).blockSize : `${height}px`;
|
|
41
|
+
if (heightValue === "auto") panel.style.setProperty("--activity-content-transition-duration", "0ms");
|
|
42
|
+
else panel.style.removeProperty("--activity-content-transition-duration");
|
|
43
|
+
if (heightValue !== previousHeight) {
|
|
44
|
+
previousHeight = heightValue;
|
|
45
|
+
panel.style.setProperty("--activity-content-panel-height", heightValue);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const schedulePanelSize = (entries) => {
|
|
49
|
+
const height = entries.find((candidate) => candidate.target === list)?.borderBoxSize[0]?.blockSize;
|
|
50
|
+
if (height === void 0) return;
|
|
51
|
+
pendingHeight = height;
|
|
52
|
+
if (pendingFrame === void 0) pendingFrame = requestAnimationFrame(updatePanelSize);
|
|
53
|
+
};
|
|
54
|
+
const observer = new ResizeObserver(schedulePanelSize);
|
|
55
|
+
observer.observe(list, { box: "border-box" });
|
|
56
|
+
return () => {
|
|
57
|
+
observer.disconnect();
|
|
58
|
+
if (pendingFrame !== void 0) cancelAnimationFrame(pendingFrame);
|
|
59
|
+
panel.style.removeProperty("--activity-content-panel-height");
|
|
60
|
+
panel.style.removeProperty("--activity-content-transition-duration");
|
|
61
|
+
};
|
|
62
|
+
}
|
|
8
63
|
function usePersistedActivityOpenProps({ defaultOpen = false, open: controlledOpen, onOpenChange, stateKey }) {
|
|
9
64
|
const [persistedOpen, setPersistedOpen] = useExpansionState(stateKey, defaultOpen);
|
|
10
65
|
const handleOpenChange = React.useCallback((nextOpen, eventDetails) => {
|
|
@@ -119,6 +174,7 @@ function ActivityContent({ className, children, ref, ...props }) {
|
|
|
119
174
|
...props,
|
|
120
175
|
unstyled: true,
|
|
121
176
|
children: /* @__PURE__ */ jsx("div", {
|
|
177
|
+
ref: observeActivityContent,
|
|
122
178
|
className: "activity__list",
|
|
123
179
|
children
|
|
124
180
|
})
|
|
@@ -178,13 +234,12 @@ function ActivityItemGroup({ className, action, detail, icon, children, defaultO
|
|
|
178
234
|
}
|
|
179
235
|
/** Scrollable plain-text detail inside an ActivityItemGroup. */
|
|
180
236
|
function ActivityText({ className, children, ref, ...props }) {
|
|
181
|
-
return /* @__PURE__ */ jsx(
|
|
237
|
+
return /* @__PURE__ */ jsxs(ScrollArea.Root, { children: [/* @__PURE__ */ jsx(ScrollArea.Viewport, {
|
|
182
238
|
ref,
|
|
183
|
-
tabIndex: 0,
|
|
184
239
|
className: cx("activity__group-text", className),
|
|
185
240
|
...props,
|
|
186
|
-
children
|
|
187
|
-
});
|
|
241
|
+
children: /* @__PURE__ */ jsx(ScrollArea.Content, { children })
|
|
242
|
+
}), /* @__PURE__ */ jsx(ScrollArea.Scrollbar, { children: /* @__PURE__ */ jsx(ScrollArea.Thumb, {}) })] });
|
|
188
243
|
}
|
|
189
244
|
/**
|
|
190
245
|
* A single activity row — "Searched code", "Edited a file", etc. Free-form
|
|
@@ -223,18 +278,41 @@ function ActivityOutput({ className, children, ref, ...props }) {
|
|
|
223
278
|
children
|
|
224
279
|
});
|
|
225
280
|
}
|
|
226
|
-
/** Quiet detail
|
|
281
|
+
/** Quiet tool detail with a bounded, fading scroll body and a persistent label/status. */
|
|
227
282
|
function ActivityPanel({ className, label, text, status, error, children, ref, ...props }) {
|
|
283
|
+
const labelId = React.useId();
|
|
284
|
+
const content = children ?? (text ? /* @__PURE__ */ jsx(ActivityOutput, { children: text }) : null);
|
|
228
285
|
return /* @__PURE__ */ jsxs("div", {
|
|
229
286
|
ref,
|
|
230
287
|
className: cx("activity__shell", className),
|
|
231
288
|
...props,
|
|
232
289
|
children: [
|
|
233
290
|
/* @__PURE__ */ jsx("span", {
|
|
291
|
+
id: labelId,
|
|
234
292
|
className: "activity__shell-label",
|
|
235
293
|
children: label
|
|
236
294
|
}),
|
|
237
|
-
|
|
295
|
+
content != null ? /* @__PURE__ */ jsxs(ScrollArea.Root, {
|
|
296
|
+
className: "activity__shell-body",
|
|
297
|
+
children: [
|
|
298
|
+
/* @__PURE__ */ jsx(ScrollArea.Viewport, {
|
|
299
|
+
className: "activity__shell-viewport",
|
|
300
|
+
role: "group",
|
|
301
|
+
"aria-labelledby": labelId,
|
|
302
|
+
children: /* @__PURE__ */ jsx(ScrollArea.Content, {
|
|
303
|
+
ref: observeActivityContent,
|
|
304
|
+
className: "activity__shell-content",
|
|
305
|
+
children: content
|
|
306
|
+
})
|
|
307
|
+
}),
|
|
308
|
+
/* @__PURE__ */ jsx(ScrollArea.Scrollbar, { children: /* @__PURE__ */ jsx(ScrollArea.Thumb, {}) }),
|
|
309
|
+
/* @__PURE__ */ jsx(ScrollArea.Scrollbar, {
|
|
310
|
+
orientation: "horizontal",
|
|
311
|
+
children: /* @__PURE__ */ jsx(ScrollArea.Thumb, {})
|
|
312
|
+
}),
|
|
313
|
+
/* @__PURE__ */ jsx(ScrollArea.Corner, {})
|
|
314
|
+
]
|
|
315
|
+
}) : null,
|
|
238
316
|
status ? /* @__PURE__ */ jsx("span", {
|
|
239
317
|
className: "activity__shell-status",
|
|
240
318
|
"data-error": error || void 0,
|
|
@@ -61,7 +61,7 @@ function AgentChatMessageEditor({ message, originalText, onCancel, onSubmit, onS
|
|
|
61
61
|
if (error) setError(void 0);
|
|
62
62
|
},
|
|
63
63
|
onKeyDown: (event) => {
|
|
64
|
-
if (event.key !== "Escape" || isSubmitting) return;
|
|
64
|
+
if (event.key !== "Escape" || isSubmitting || event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;
|
|
65
65
|
event.preventDefault();
|
|
66
66
|
onCancel();
|
|
67
67
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { rt as XIcon } from "../../icons-
|
|
2
|
+
import { rt as XIcon } from "../../icons-Cn3vWZRs.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
5
|
import { PromptInputTray, usePromptInputController } from "./PromptInput.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { R as PencilIcon } from "../../icons-
|
|
2
|
+
import { R as PencilIcon } from "../../icons-Cn3vWZRs.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
-
import { Kbd } from "../foundations/Kbd.js";
|
|
5
4
|
import { o as formatUnknownValue } from "../../format-CWaZEp5o.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
|
|
@@ -120,6 +120,7 @@ function ApprovalDecision({ className, onDecision, onSkip, subject = "this actio
|
|
|
120
120
|
className: cx("approval__options", className),
|
|
121
121
|
"aria-busy": busy || void 0,
|
|
122
122
|
onKeyDown: (event) => {
|
|
123
|
+
if (event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;
|
|
123
124
|
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
124
125
|
event.preventDefault();
|
|
125
126
|
(selected === "approve" ? reasonRef : approveRef).current?.focus();
|
|
@@ -183,7 +184,7 @@ function ApprovalDecision({ className, onDecision, onSkip, subject = "this actio
|
|
|
183
184
|
setReason(event.currentTarget.value);
|
|
184
185
|
},
|
|
185
186
|
onKeyDown: (event) => {
|
|
186
|
-
if (event.key === "Enter" && !event.nativeEvent.isComposing) {
|
|
187
|
+
if (event.key === "Enter" && !event.nativeEvent.isComposing && event.nativeEvent.keyCode !== 229) {
|
|
187
188
|
event.preventDefault();
|
|
188
189
|
respond(false);
|
|
189
190
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SpinnerIcon, rt as XIcon, tt as WarningIcon } from "../../icons-
|
|
2
|
+
import { K as SpinnerIcon, rt as XIcon, tt as WarningIcon } from "../../icons-Cn3vWZRs.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,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-Cn3vWZRs.js";
|
|
2
3
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
3
|
-
import { K as SpinnerIcon, _ as DotIcon, d as CheckIcon, p as ChevronRightIcon } from "../../icons-DvlrWt54.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-
|
|
2
|
+
import { s as BookmarkIcon } from "../../icons-Cn3vWZRs.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-
|
|
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-B4K656LO.js";
|
|
2
2
|
export { CODE_BLOCK_LANGUAGES, CodeBlock, CodeBlockActions, CodeBlockContainer, CodeBlockContent, CodeBlockCopyButton, CodeBlockFilename, CodeBlockHeader, CodeBlockLanguageSelector, CodeBlockLanguageSelectorContent, CodeBlockLanguageSelectorItem, CodeBlockLanguageSelectorTrigger, CodeBlockLanguageSelectorValue, CodeBlockTitle };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { brandHexFromIconSrc, parseComposerHref, sampleImageAccent } from "../../utils/composer-link.js";
|
|
2
2
|
import { findCatalogMcpServerCard, 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-
|
|
5
|
-
import { n as mergeRefs } from "../../merge-refs-
|
|
4
|
+
import { c as BoxIcon } from "../../icons-Cn3vWZRs.js";
|
|
5
|
+
import { n as mergeRefs } from "../../merge-refs-DAh6reu8.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/ai-sdk/ComposerLink.tsx
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { G as SlackIcon, O as MailIcon, _ as DotIcon, d as CheckIcon, rt as XIcon, u as CalendarIcon } from "../../icons-
|
|
2
|
+
import { G as SlackIcon, O as MailIcon, _ as DotIcon, d as CheckIcon, rt as XIcon, u as CalendarIcon } from "../../icons-Cn3vWZRs.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { Field } from "../foundations/Field.js";
|
|
5
5
|
import { Textarea } from "../foundations/Textarea.js";
|
|
6
|
-
import { Card, CardAction, CardContent, CardFooter, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
7
|
-
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
8
6
|
import { Input } from "../foundations/Input.js";
|
|
7
|
+
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
8
|
+
import { Card, CardAction, CardContent, CardFooter, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
9
9
|
import { CorrespondentName, emailDestinationCorrespondent, slackDestinationCorrespondent } from "./Correspondent.js";
|
|
10
10
|
import * as React from "react";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -95,8 +95,6 @@ function ConnectedAppCardFrame({ children, className, headerActions, icon, kind,
|
|
|
95
95
|
onReject,
|
|
96
96
|
onSend
|
|
97
97
|
});
|
|
98
|
-
const saveBlocked = saveState !== void 0;
|
|
99
|
-
const saveErrorMessage = saveState?.status === "error" ? saveState.message : "";
|
|
100
98
|
return /* @__PURE__ */ jsxs(Card, {
|
|
101
99
|
render: /* @__PURE__ */ jsx("article", {}),
|
|
102
100
|
...props,
|
|
@@ -140,61 +138,81 @@ function ConnectedAppCardFrame({ children, className, headerActions, icon, kind,
|
|
|
140
138
|
placeholder: "Shorter, and skip the recap",
|
|
141
139
|
onChange: (event) => decision.setReason(event.currentTarget.value),
|
|
142
140
|
onKeyDown: (event) => {
|
|
143
|
-
if (event.key === "Enter" && !event.nativeEvent.isComposing) {
|
|
141
|
+
if (event.key === "Enter" && !event.nativeEvent.isComposing && event.nativeEvent.keyCode !== 229) {
|
|
144
142
|
event.preventDefault();
|
|
145
143
|
decision.reject?.();
|
|
146
144
|
}
|
|
147
145
|
}
|
|
148
146
|
})] }) : null,
|
|
149
|
-
|
|
150
|
-
className: "connected-app-card__save-error",
|
|
151
|
-
children: [/* @__PURE__ */ jsx(Field.Errors, { errors: [saveErrorMessage] }), saveState?.status === "error" && saveState.onRetry ? /* @__PURE__ */ jsx(Button, {
|
|
152
|
-
type: "button",
|
|
153
|
-
size: "sm",
|
|
154
|
-
variant: "ghost",
|
|
155
|
-
color: "neutral",
|
|
156
|
-
onClick: saveState.onRetry,
|
|
157
|
-
children: "Retry save"
|
|
158
|
-
}) : null]
|
|
159
|
-
}) : null,
|
|
147
|
+
/* @__PURE__ */ jsx(ConnectedAppCardSaveError, { saveState }),
|
|
160
148
|
decision.errorMessage ? /* @__PURE__ */ jsx(Field.Errors, { errors: [decision.errorMessage] }) : null,
|
|
161
149
|
/* @__PURE__ */ jsx("span", {
|
|
162
150
|
className: "sigvelo-visually-hidden",
|
|
163
151
|
role: "status",
|
|
164
152
|
"aria-atomic": "true",
|
|
165
|
-
children:
|
|
153
|
+
children: connectedAppCardAnnouncement(saveState, decision)
|
|
166
154
|
})
|
|
167
155
|
] }),
|
|
168
|
-
hasDecision ? /* @__PURE__ */
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
156
|
+
hasDecision ? /* @__PURE__ */ jsx(ConnectedAppCardDecisions, {
|
|
157
|
+
decision,
|
|
158
|
+
sendLabel,
|
|
159
|
+
saveBlocked: saveState !== void 0
|
|
160
|
+
}) : null
|
|
161
|
+
]
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
/** A failed save stays visible, with its retry, until the store holds the draft. */
|
|
165
|
+
function ConnectedAppCardSaveError({ saveState }) {
|
|
166
|
+
if (saveState?.status !== "error" || !saveState.message) return null;
|
|
167
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
168
|
+
className: "connected-app-card__save-error",
|
|
169
|
+
children: [/* @__PURE__ */ jsx(Field.Errors, { errors: [saveState.message] }), saveState.onRetry ? /* @__PURE__ */ jsx(Button, {
|
|
170
|
+
type: "button",
|
|
171
|
+
size: "sm",
|
|
172
|
+
variant: "ghost",
|
|
173
|
+
color: "neutral",
|
|
174
|
+
onClick: saveState.onRetry,
|
|
175
|
+
children: "Retry save"
|
|
176
|
+
}) : null]
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
/** One polite announcement: errors first, then the action in flight. */
|
|
180
|
+
function connectedAppCardAnnouncement(saveState, decision) {
|
|
181
|
+
if (saveState?.status === "error" && saveState.message) return saveState.message;
|
|
182
|
+
if (decision.errorMessage) return decision.errorMessage;
|
|
183
|
+
if (saveState?.status === "saving") return "Saving";
|
|
184
|
+
return decision.busy ? "Submitting" : "";
|
|
185
|
+
}
|
|
186
|
+
/** The pending draft's release decisions; an unsaved draft cannot be sent. */
|
|
187
|
+
function ConnectedAppCardDecisions({ decision, sendLabel, saveBlocked }) {
|
|
188
|
+
return /* @__PURE__ */ jsxs(CardFooter, {
|
|
189
|
+
render: /* @__PURE__ */ jsx("footer", {}),
|
|
190
|
+
className: "connected-app-card__footer",
|
|
191
|
+
children: [
|
|
192
|
+
decision.send ? /* @__PURE__ */ jsx(Button, {
|
|
193
|
+
type: "button",
|
|
194
|
+
size: "sm",
|
|
195
|
+
disabled: decision.busy || saveBlocked,
|
|
196
|
+
onClick: () => void decision.send?.(),
|
|
197
|
+
children: sendLabel
|
|
198
|
+
}) : null,
|
|
199
|
+
decision.discard ? /* @__PURE__ */ jsx(Button, {
|
|
200
|
+
type: "button",
|
|
201
|
+
size: "sm",
|
|
202
|
+
variant: "outline",
|
|
203
|
+
color: "neutral",
|
|
204
|
+
disabled: decision.busy,
|
|
205
|
+
onClick: () => void decision.discard?.(),
|
|
206
|
+
children: "Discard"
|
|
207
|
+
}) : null,
|
|
208
|
+
decision.reject ? /* @__PURE__ */ jsx(Button, {
|
|
209
|
+
type: "button",
|
|
210
|
+
size: "sm",
|
|
211
|
+
variant: "ghost",
|
|
212
|
+
color: "neutral",
|
|
213
|
+
disabled: decision.busy,
|
|
214
|
+
onClick: () => void decision.reject?.(),
|
|
215
|
+
children: "Send feedback"
|
|
198
216
|
}) : null
|
|
199
217
|
]
|
|
200
218
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as mergeBaseClassName, t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { Popover } from "../foundations/Popover.js";
|
|
3
2
|
import { Separator } from "../foundations/Separator.js";
|
|
3
|
+
import { Popover } from "../foundations/Popover.js";
|
|
4
4
|
import { t as ProgressRing } from "../../progress-ring-L2bbF0ji.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { n as ArrowDownIcon, v as DownloadIcon } from "../../icons-
|
|
2
|
+
import { n as ArrowDownIcon, v as DownloadIcon } from "../../icons-Cn3vWZRs.js";
|
|
3
3
|
import { IconButton } from "../foundations/IconButton.js";
|
|
4
|
-
import { t as assignRef } from "../../merge-refs-
|
|
4
|
+
import { t as assignRef } from "../../merge-refs-DAh6reu8.js";
|
|
5
5
|
import { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport } from "./MessageScroller.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
//#region src/components/ai-sdk/ExpansionState.d.ts
|
|
3
3
|
/**
|
|
4
|
-
* Disclosure
|
|
5
|
-
* rows so a virtualized transcript can unmount a row and
|
|
6
|
-
*
|
|
4
|
+
* Disclosure and numeric inspection state keyed by stable transcript ids,
|
|
5
|
+
* held outside the rows so a virtualized transcript can unmount a row and
|
|
6
|
+
* restore its state when it scrolls back into view.
|
|
7
7
|
*/
|
|
8
8
|
export interface ExpansionStore {
|
|
9
9
|
get(key: string): boolean | undefined;
|
|
10
10
|
set(key: string, open: boolean): void;
|
|
11
|
+
getNumber(key: string): number | undefined;
|
|
12
|
+
setNumber(key: string, value: number): void;
|
|
11
13
|
}
|
|
12
|
-
/**
|
|
14
|
+
/** Typed Map-backed disclosure and numeric state. Create one per conversation/thread. */
|
|
13
15
|
export declare function createExpansionStore(): ExpansionStore;
|
|
14
16
|
export interface ExpansionStateProviderProps {
|
|
15
17
|
/**
|
|
@@ -27,8 +29,8 @@ export interface ExpansionStateProviderProps {
|
|
|
27
29
|
children: React.ReactNode;
|
|
28
30
|
}
|
|
29
31
|
/**
|
|
30
|
-
* Provides the
|
|
31
|
-
* `
|
|
32
|
+
* Provides the store that `Activity`, `ActivityItemGroup`, `ToolInvocation`,
|
|
33
|
+
* and `useExpansionNumber` write through with stable keys. (`Reasoning` is the
|
|
32
34
|
* deliberate exception — it keeps its own auto-open/auto-close streaming
|
|
33
35
|
* state and resets on remount.) `AgentChat` renders one around its transcript
|
|
34
36
|
* automatically; wrap it yourself (with an app-held `store`) to persist
|
|
@@ -43,4 +45,12 @@ export declare function ExpansionStateProvider({ store, children }: ExpansionSta
|
|
|
43
45
|
* store. Without a provider or a `stateKey` this is plain local state.
|
|
44
46
|
*/
|
|
45
47
|
export declare function useExpansionState(stateKey: string | undefined, defaultOpen: boolean): [boolean, (open: boolean) => void];
|
|
48
|
+
/**
|
|
49
|
+
* Numeric inspection state initialized from the surrounding store (falling
|
|
50
|
+
* back to `defaultValue`) and written through on every change. Only the
|
|
51
|
+
* mounted row reads a given key, so there is no subscription — remounting
|
|
52
|
+
* re-reads the store. Without a provider or a `stateKey` this is plain local
|
|
53
|
+
* state.
|
|
54
|
+
*/
|
|
55
|
+
export declare function useExpansionNumber(stateKey: string | undefined, defaultValue: number): [number, (value: number) => void];
|
|
46
56
|
//#endregion
|