@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,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { S as FileIcon, p as ChevronRightIcon } from "../../icons-Cn3vWZRs.js";
|
|
2
3
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as CopyButton } from "../../copy-button-M4sAp9xS.js";
|
|
4
|
+
import { t as CopyButton } from "../../copy-button-BsmxSSeD.js";
|
|
5
5
|
import { Avatar } from "../foundations/Avatar.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { b as EyeIcon, x as EyeOffIcon } from "../../icons-
|
|
3
|
-
import { t as CopyButton } from "../../copy-button-
|
|
2
|
+
import { b as EyeIcon, x as EyeOffIcon } from "../../icons-Cn3vWZRs.js";
|
|
3
|
+
import { t as CopyButton } from "../../copy-button-BsmxSSeD.js";
|
|
4
4
|
import { Switch } from "../foundations/Switch.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as FileTreeIcon, i as FileTreeFolder, n as FileTreeActions, o as FileTreeName, r as FileTreeFile, t as FileTree } from "../../FileTree-
|
|
1
|
+
import { a as FileTreeIcon, i as FileTreeFolder, n as FileTreeActions, o as FileTreeName, r as FileTreeFile, t as FileTree } from "../../FileTree-BpCJuvji.js";
|
|
2
2
|
export { FileTree, FileTreeActions, FileTreeFile, FileTreeFolder, FileTreeIcon, FileTreeName };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { N as MinusIcon, T as InfoIcon, d as CheckIcon } from "../../icons-
|
|
2
|
+
import { N as MinusIcon, T as InfoIcon, d as CheckIcon } from "../../icons-Cn3vWZRs.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
|
-
import { Card } from "../foundations/Card.js";
|
|
6
5
|
import { Separator } from "../foundations/Separator.js";
|
|
6
|
+
import { Card } from "../foundations/Card.js";
|
|
7
7
|
import { getPlanPrice, getPlanYearlySavings } from "./Pricing.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/general-purpose/PricingPlanCard.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { Card } from "../foundations/Card.js";
|
|
3
|
-
import { Separator } from "../foundations/Separator.js";
|
|
4
2
|
import { Slider } from "../foundations/Slider.js";
|
|
3
|
+
import { Separator } from "../foundations/Separator.js";
|
|
4
|
+
import { Card } from "../foundations/Card.js";
|
|
5
5
|
import { Progress } from "../foundations/Progress.js";
|
|
6
6
|
import { formatPricingUsage, getUsagePrice } from "./Pricing.js";
|
|
7
7
|
import * as React from "react";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { AppBarSlots, ResponsiveSidebarShell, ResponsiveSidebarShellBar, ResponsiveSidebarShellControls, ResponsiveSidebarShellProps, useResponsiveSidebarShell };
|
|
1
|
+
import { a as ResponsiveSidebarShellBar, c as useResponsiveSidebarShell, i as ResponsiveSidebarShell, n as ResponsiveSidebarAppBar, o as ResponsiveSidebarShellControls, r as ResponsiveSidebarAppBarProps, s as ResponsiveSidebarShellProps, t as AppBarSlots } from "../../ResponsiveSidebarShell-DzBGlRJF.js";
|
|
2
|
+
export { AppBarSlots, ResponsiveSidebarAppBar, ResponsiveSidebarAppBarProps, ResponsiveSidebarShell, ResponsiveSidebarShellBar, ResponsiveSidebarShellControls, ResponsiveSidebarShellProps, useResponsiveSidebarShell };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { W as SidebarIcon, f as ChevronDownIcon, r as ArrowLeftIcon, tt as WarningIcon } from "../../icons-
|
|
2
|
+
import { W as SidebarIcon, f as ChevronDownIcon, r as ArrowLeftIcon, tt as WarningIcon } from "../../icons-Cn3vWZRs.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
4
|
import { t as capitalize } from "../../format-CWaZEp5o.js";
|
|
5
|
-
import { n as mergeRefs } from "../../merge-refs-
|
|
5
|
+
import { n as mergeRefs } from "../../merge-refs-DAh6reu8.js";
|
|
6
6
|
import { AppTopBar } from "./AppTopBar.js";
|
|
7
|
+
import { n as ShellAppBarOutletContext, t as ContentAppBarOutletContext } from "../../app-bar-outlet-CNfNzY4Y.js";
|
|
7
8
|
import { ResizableSidePanel } from "./ResizableSidePanel.js";
|
|
8
9
|
import * as React from "react";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { createPortal } from "react-dom";
|
|
10
12
|
//#region src/components/general-purpose/ResponsiveSidebarShell.tsx
|
|
11
13
|
/** Matches --sigvelo-layout-sidebar (16rem). */
|
|
12
14
|
const sidebarDefaultWidth = 256;
|
|
@@ -98,11 +100,25 @@ function useSidebarLayout({ rootRef, mainRef, isSidebarOpen, setSidebarOpen, pri
|
|
|
98
100
|
* hook, and its container name `responsive-sidebar-shell` is public contract:
|
|
99
101
|
* surfaces that compose the shell size themselves against it.
|
|
100
102
|
*/
|
|
101
|
-
function ResponsiveSidebarShell({ sidebar, sidebarLabel = "sidebar", sidebarOpen, sidebarTogglePlacement = "main", defaultSidebarOpen, defaultSidebarWidth = sidebarDefaultWidth, onSidebarOpenChange, bar, error, showMainLabel = "Show main content", className, children, ref, style, ...props }) {
|
|
103
|
+
function ResponsiveSidebarShell({ sidebar, sidebarLabel = "sidebar", sidebarOpen, sidebarTogglePlacement = "main", defaultSidebarOpen, defaultSidebarWidth = sidebarDefaultWidth, onSidebarOpenChange, bar, contentBar = false, error, showMainLabel = "Show main content", className, children, ref, style, ...props }) {
|
|
102
104
|
const sidebarId = React.useId();
|
|
103
105
|
const rootRef = React.useRef(null);
|
|
104
106
|
const mainRef = React.useRef(null);
|
|
105
107
|
const openerRef = React.useRef(null);
|
|
108
|
+
const [barTarget, setBarTarget] = React.useState(null);
|
|
109
|
+
const lastBarFocus = React.useRef(null);
|
|
110
|
+
const restoreBarFocus = React.useCallback(() => {
|
|
111
|
+
const previous = lastBarFocus.current;
|
|
112
|
+
if (!previous || !barTarget?.isConnected) return;
|
|
113
|
+
if (previous.bar.isConnected && previous.bar.getClientRects().length) return;
|
|
114
|
+
const active = document.activeElement;
|
|
115
|
+
if (active instanceof HTMLElement && active !== document.body && active.getClientRects().length) return;
|
|
116
|
+
const bar = Array.from(barTarget.children).find((element) => element.getClientRects().length);
|
|
117
|
+
if (!bar) return;
|
|
118
|
+
const controls = Array.from(bar.querySelectorAll("button, a[href]"));
|
|
119
|
+
(controls.find((element) => previous.label && element.getAttribute("aria-label") === previous.label) ?? controls.find((element) => element.getAttribute("aria-haspopup") === "menu") ?? controls[0])?.focus({ preventScroll: true });
|
|
120
|
+
}, [barTarget]);
|
|
121
|
+
React.useLayoutEffect(restoreBarFocus);
|
|
106
122
|
const [isSidebarOpen, setSidebarOpen, primeSidebarOpen] = useControllableSidebar({
|
|
107
123
|
sidebarOpen,
|
|
108
124
|
defaultSidebarOpen,
|
|
@@ -128,8 +144,8 @@ function ResponsiveSidebarShell({ sidebar, sidebarLabel = "sidebar", sidebarOpen
|
|
|
128
144
|
updateSidebar(() => setSidebarOpen(false), () => mainRef.current?.focus({ preventScroll: true }));
|
|
129
145
|
}, [setSidebarOpen, updateSidebar]);
|
|
130
146
|
const closeSidebarOnCompact = React.useCallback(() => {
|
|
131
|
-
if (rootRef.current && isCompactSidebar(rootRef.current)) closeSidebar();
|
|
132
|
-
}, [closeSidebar]);
|
|
147
|
+
if (isSidebarOpen && rootRef.current && isCompactSidebar(rootRef.current)) closeSidebar();
|
|
148
|
+
}, [closeSidebar, isSidebarOpen]);
|
|
133
149
|
const toggleSidebar = React.useCallback((trigger) => {
|
|
134
150
|
if (trigger) openerRef.current = trigger;
|
|
135
151
|
updateSidebar(() => setSidebarOpen(!isSidebarOpen));
|
|
@@ -145,12 +161,14 @@ function ResponsiveSidebarShell({ sidebar, sidebarLabel = "sidebar", sidebarOpen
|
|
|
145
161
|
compact,
|
|
146
162
|
contentCompact,
|
|
147
163
|
closeSidebar,
|
|
148
|
-
closeSidebarOnCompact
|
|
164
|
+
closeSidebarOnCompact,
|
|
165
|
+
restoreBarFocus
|
|
149
166
|
}), [
|
|
150
167
|
compact,
|
|
151
168
|
contentCompact,
|
|
152
169
|
closeSidebar,
|
|
153
|
-
closeSidebarOnCompact
|
|
170
|
+
closeSidebarOnCompact,
|
|
171
|
+
restoreBarFocus
|
|
154
172
|
]);
|
|
155
173
|
const sidebarContent = typeof sidebar === "function" ? sidebar(controls) : sidebar;
|
|
156
174
|
const sidebarToggle = sidebarVisible && sidebarTogglePlacement === "sidebar" ? /* @__PURE__ */ jsx(Button, {
|
|
@@ -167,82 +185,147 @@ function ResponsiveSidebarShell({ sidebar, sidebarLabel = "sidebar", sidebarOpen
|
|
|
167
185
|
onClick: (event) => toggleSidebar(event.currentTarget),
|
|
168
186
|
children: /* @__PURE__ */ jsx(SidebarIcon, {})
|
|
169
187
|
}) : null;
|
|
188
|
+
const renderBar = (slots, content = false) => /* @__PURE__ */ jsx(SidebarAppBar, {
|
|
189
|
+
bar: slots,
|
|
190
|
+
content,
|
|
191
|
+
hasSidebar,
|
|
192
|
+
sidebarTogglePlacement,
|
|
193
|
+
sidebarId,
|
|
194
|
+
isSidebarOpen,
|
|
195
|
+
toggleSidebar,
|
|
196
|
+
toggleLabel,
|
|
197
|
+
toggleTooltip
|
|
198
|
+
});
|
|
199
|
+
const outlet = contentBar && barTarget ? {
|
|
200
|
+
target: barTarget,
|
|
201
|
+
restoreFocus: restoreBarFocus,
|
|
202
|
+
render: (slots) => renderBar({
|
|
203
|
+
...bar,
|
|
204
|
+
title: slots.title ?? bar?.title,
|
|
205
|
+
titleRender: bar?.titleRender ?? slots.titleRender,
|
|
206
|
+
leading: slots.leading ?? bar?.leading,
|
|
207
|
+
back: slots.leading != null ? void 0 : bar?.back,
|
|
208
|
+
compactLeading: slots.leading ?? bar?.compactLeading,
|
|
209
|
+
compactTitleTrigger: void 0,
|
|
210
|
+
actions: /* @__PURE__ */ jsxs(Fragment, { children: [slots.actions, bar?.actions] }),
|
|
211
|
+
primary: slots.primary ?? bar?.primary,
|
|
212
|
+
label: slots.label ?? bar?.label,
|
|
213
|
+
className: cx(bar?.className, slots.className)
|
|
214
|
+
}, true)
|
|
215
|
+
} : null;
|
|
170
216
|
return /* @__PURE__ */ jsx(SidebarShellContext.Provider, {
|
|
171
217
|
value: controls,
|
|
172
|
-
children: /* @__PURE__ */ jsx(
|
|
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
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
218
|
+
children: /* @__PURE__ */ jsx(ShellAppBarOutletContext.Provider, {
|
|
219
|
+
value: outlet,
|
|
220
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
221
|
+
ref: mergeRefs(rootRef, ref),
|
|
222
|
+
className: cx("responsive-sidebar-shell", className),
|
|
223
|
+
"data-recipe": "fill-host",
|
|
224
|
+
style,
|
|
225
|
+
...props,
|
|
226
|
+
"data-sidebar-open": sidebarVisible ? "true" : "false",
|
|
227
|
+
"data-sidebar-toggle-placement": sidebarTogglePlacement,
|
|
228
|
+
onKeyDown: (event) => {
|
|
229
|
+
props.onKeyDown?.(event);
|
|
230
|
+
if (!event.defaultPrevented && !event.nativeEvent.isComposing && event.nativeEvent.keyCode !== 229 && event.key === "Escape" && sidebarVisible && rootRef.current && isCompactSidebar(rootRef.current)) {
|
|
231
|
+
event.preventDefault();
|
|
232
|
+
dismissSidebar();
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
children: /* @__PURE__ */ jsxs(ResizableSidePanel.Root, {
|
|
236
|
+
className: "responsive-sidebar-shell__frame",
|
|
237
|
+
label: sidebarLabel,
|
|
238
|
+
side: "start",
|
|
239
|
+
sizeVariable: "--responsive-sidebar-shell-sidebar-size",
|
|
240
|
+
defaultSize: defaultSidebarWidth,
|
|
241
|
+
minSize: sidebarMinWidth,
|
|
242
|
+
maxSize: sidebarMaxWidth,
|
|
243
|
+
keyboardStep: sidebarKeyboardStep,
|
|
244
|
+
children: [
|
|
245
|
+
sidebarVisible ? /* @__PURE__ */ jsx(ResizableSidePanel.Handle, { className: "responsive-sidebar-shell__resizer" }) : null,
|
|
246
|
+
hasSidebar ? /* @__PURE__ */ jsx(SidebarPane, {
|
|
247
|
+
id: sidebarId,
|
|
248
|
+
open: isSidebarOpen,
|
|
249
|
+
toggle: sidebarToggle,
|
|
250
|
+
children: sidebarContent
|
|
251
|
+
}) : null,
|
|
252
|
+
/* @__PURE__ */ jsxs("div", {
|
|
253
|
+
ref: mainRef,
|
|
254
|
+
className: "responsive-sidebar-shell__main",
|
|
255
|
+
"data-content-compact": String(contentCompact),
|
|
256
|
+
tabIndex: -1,
|
|
257
|
+
onFocusCapture: (event) => {
|
|
258
|
+
const focusedBar = event.target.closest(".app-top-bar");
|
|
259
|
+
if (focusedBar && barTarget?.contains(focusedBar)) lastBarFocus.current = {
|
|
260
|
+
bar: focusedBar,
|
|
261
|
+
label: event.target.getAttribute("aria-label")
|
|
262
|
+
};
|
|
263
|
+
else if (!event.target.closest("[role=\"menu\"]")) lastBarFocus.current = null;
|
|
264
|
+
},
|
|
265
|
+
onPointerDownCapture: (event) => {
|
|
266
|
+
if (event.target instanceof Element && !barTarget?.contains(event.target) && !event.target.closest("[role=\"menu\"]")) lastBarFocus.current = null;
|
|
267
|
+
},
|
|
268
|
+
children: [
|
|
269
|
+
contentBar ? /* @__PURE__ */ jsx("div", {
|
|
270
|
+
className: "responsive-sidebar-shell__bar",
|
|
271
|
+
ref: setBarTarget,
|
|
272
|
+
children: renderBar(bar)
|
|
273
|
+
}) : renderBar(bar),
|
|
274
|
+
error != null ? /* @__PURE__ */ jsxs("div", {
|
|
275
|
+
className: "responsive-sidebar-shell__error",
|
|
276
|
+
role: "alert",
|
|
277
|
+
children: [/* @__PURE__ */ jsx(WarningIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", { children: error })]
|
|
278
|
+
}) : null,
|
|
279
|
+
children
|
|
280
|
+
]
|
|
281
|
+
}),
|
|
282
|
+
sidebarVisible ? /* @__PURE__ */ jsx(Button, {
|
|
283
|
+
type: "button",
|
|
284
|
+
variant: "ghost",
|
|
285
|
+
color: "neutral",
|
|
286
|
+
className: "responsive-sidebar-shell__peek",
|
|
287
|
+
"aria-label": showMainLabel,
|
|
288
|
+
onClick: closeSidebar
|
|
289
|
+
}) : null
|
|
290
|
+
]
|
|
291
|
+
})
|
|
237
292
|
})
|
|
238
293
|
})
|
|
239
294
|
});
|
|
240
295
|
}
|
|
241
|
-
|
|
242
|
-
|
|
296
|
+
/**
|
|
297
|
+
* A pane's title, Back control and actions share its enclosing shell's bar.
|
|
298
|
+
* Outside an opted-in workbench this renders a standalone application bar.
|
|
299
|
+
* A portal preserves the pane's state and providers without registering
|
|
300
|
+
* React nodes in ancestor state or rerendering the conversation on each action.
|
|
301
|
+
* Submit controls moved here must name their owning form with `form`.
|
|
302
|
+
*/
|
|
303
|
+
function ResponsiveSidebarAppBar(props) {
|
|
304
|
+
const outlet = React.useContext(ContentAppBarOutletContext);
|
|
305
|
+
React.useLayoutEffect(() => {
|
|
306
|
+
if (!outlet) return;
|
|
307
|
+
outlet.restoreFocus();
|
|
308
|
+
return () => queueMicrotask(outlet.restoreFocus);
|
|
309
|
+
}, [outlet]);
|
|
310
|
+
if (outlet) return createPortal(outlet.render(props), outlet.target);
|
|
311
|
+
return /* @__PURE__ */ jsxs(AppTopBar.Root, {
|
|
312
|
+
"aria-label": props.label ?? "Application controls",
|
|
313
|
+
titleAlign: "start",
|
|
314
|
+
className: props.className,
|
|
315
|
+
children: [
|
|
316
|
+
props.leading != null ? /* @__PURE__ */ jsx(AppTopBar.Leading, { children: props.leading }) : null,
|
|
317
|
+
props.title != null ? /* @__PURE__ */ jsx(AppTopBar.Title, {
|
|
318
|
+
render: props.titleRender,
|
|
319
|
+
children: props.title
|
|
320
|
+
}) : null,
|
|
321
|
+
props.actions != null || props.primary != null ? /* @__PURE__ */ jsxs(AppTopBar.Trailing, { children: [props.actions, props.primary] }) : null
|
|
322
|
+
]
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
function SidebarAppBar({ bar, content = false, hasSidebar, sidebarTogglePlacement, sidebarId, isSidebarOpen, toggleSidebar, toggleLabel, toggleTooltip }) {
|
|
243
326
|
const hasTitleTrigger = hasSidebar && bar?.compactTitleTrigger != null && bar?.compactLeading == null;
|
|
244
|
-
const mainSidebarToggle = hasSidebar
|
|
245
|
-
className: cx("responsive-sidebar-shell__toggle",
|
|
327
|
+
const mainSidebarToggle = hasSidebar ? /* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
328
|
+
className: cx("responsive-sidebar-shell__toggle", sidebarTogglePlacement === "sidebar" && "responsive-sidebar-shell__toggle--sidebar-fallback"),
|
|
246
329
|
label: toggleLabel,
|
|
247
330
|
tooltip: toggleTooltip,
|
|
248
331
|
type: "button",
|
|
@@ -257,6 +340,7 @@ function SidebarAppBar({ bar, hasSidebar, sidebarTogglePlacement, sidebarId, isS
|
|
|
257
340
|
"aria-label": bar?.label ?? "Application controls",
|
|
258
341
|
className: bar?.className,
|
|
259
342
|
"data-compact-leading": compactLeadingMode,
|
|
343
|
+
"data-content-bar": content ? "" : void 0,
|
|
260
344
|
children: [
|
|
261
345
|
/* @__PURE__ */ jsx(SidebarAppBarLeading, {
|
|
262
346
|
bar,
|
|
@@ -294,11 +378,6 @@ function SidebarAppBarTitle({ bar, hasTitleTrigger, sidebarId, isSidebarOpen, to
|
|
|
294
378
|
}) : null]
|
|
295
379
|
});
|
|
296
380
|
}
|
|
297
|
-
function sidebarToggleClassName(placement, hasTitleTrigger, hasCompactLeading) {
|
|
298
|
-
if (placement === "sidebar") return "responsive-sidebar-shell__toggle--sidebar-fallback";
|
|
299
|
-
if (hasTitleTrigger) return "responsive-sidebar-shell__toggle--replaced-by-title";
|
|
300
|
-
if (hasCompactLeading) return "responsive-sidebar-shell__toggle--replaced-by-compact-leading";
|
|
301
|
-
}
|
|
302
381
|
function SidebarAppBarLeading({ bar, mainSidebarToggle, compactLeadingMode }) {
|
|
303
382
|
const { contentCompact } = useResponsiveSidebarShell();
|
|
304
383
|
const compactNavigationActive = contentCompact && compactLeadingMode === "custom";
|
|
@@ -310,11 +389,7 @@ function SidebarAppBarLeading({ bar, mainSidebarToggle, compactLeadingMode }) {
|
|
|
310
389
|
render: bar.back.link,
|
|
311
390
|
children: /* @__PURE__ */ jsx(ArrowLeftIcon, {})
|
|
312
391
|
}) : null,
|
|
313
|
-
compactNavigationActive ?
|
|
314
|
-
compactLeadingMode === "custom" ? /* @__PURE__ */ jsx("span", {
|
|
315
|
-
className: "responsive-sidebar-shell__compact-leading",
|
|
316
|
-
children: bar?.compactLeading
|
|
317
|
-
}) : null
|
|
392
|
+
compactNavigationActive ? bar?.compactLeading : bar?.leading
|
|
318
393
|
] });
|
|
319
394
|
}
|
|
320
395
|
function hasSidebarAppBar(bar, hasSidebar) {
|
|
@@ -343,4 +418,4 @@ function SidebarPane({ id, open, toggle, children }) {
|
|
|
343
418
|
});
|
|
344
419
|
}
|
|
345
420
|
//#endregion
|
|
346
|
-
export { ResponsiveSidebarShell, useResponsiveSidebarShell };
|
|
421
|
+
export { ResponsiveSidebarAppBar, ResponsiveSidebarShell, useResponsiveSidebarShell };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Button } from "../foundations/Button.js";
|
|
2
|
-
import { Field } from "../foundations/Field.js";
|
|
3
|
-
import { Form } from "../foundations/Form.js";
|
|
4
2
|
import { Dialog } from "../foundations/Dialog.js";
|
|
5
3
|
import { a as formatErrorMessage } from "../../format-CWaZEp5o.js";
|
|
4
|
+
import { Field } from "../foundations/Field.js";
|
|
5
|
+
import { Form } from "../foundations/Form.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/general-purpose/SettingsFormDialog.tsx
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as SetupChecklistGroup, t as SetupChecklistAction } from "../../SetupChecklist-
|
|
1
|
+
import { n as SetupChecklistGroup, t as SetupChecklistAction } from "../../SetupChecklist-BNK2XFaI.js";
|
|
2
2
|
export { SetupChecklistAction, SetupChecklistGroup };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { Q as TerminalIcon, rt as XIcon } from "../../icons-
|
|
3
|
-
import { IconButton } from "../foundations/IconButton.js";
|
|
4
|
-
import { t as CopyButton } from "../../copy-button-M4sAp9xS.js";
|
|
2
|
+
import { Q as TerminalIcon, rt as XIcon } from "../../icons-Cn3vWZRs.js";
|
|
5
3
|
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
4
|
+
import { IconButton } from "../foundations/IconButton.js";
|
|
5
|
+
import { t as CopyButton } from "../../copy-button-BsmxSSeD.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import Anser from "anser";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as mergeBaseClassName, t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { K as SpinnerIcon, d as CheckIcon, p as ChevronRightIcon, rt as XIcon } from "../../icons-Cn3vWZRs.js";
|
|
2
3
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
3
|
-
import { K as SpinnerIcon, d as CheckIcon, p as ChevronRightIcon, rt as XIcon } from "../../icons-DvlrWt54.js";
|
|
4
4
|
import { Progress } from "../foundations/Progress.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as MoonIcon, P as MonitorIcon, X as SunIcon } from "../../icons-
|
|
1
|
+
import { F as MoonIcon, P as MonitorIcon, X as SunIcon } from "../../icons-Cn3vWZRs.js";
|
|
2
2
|
import { useTheme } from "../foundations/ThemeProvider.js";
|
|
3
3
|
import { Radio, RadioGroup } from "../foundations/RadioGroup.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { H as RefreshIcon, f as ChevronDownIcon, i as ArrowRightIcon, r as ArrowLeftIcon } from "../../icons-Cn3vWZRs.js";
|
|
2
3
|
import { Collapsible } from "../foundations/Collapsible.js";
|
|
3
|
-
import {
|
|
4
|
+
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
4
5
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
6
|
import { Input } from "../foundations/Input.js";
|
|
6
|
-
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { useRender } from "@base-ui/react/use-render";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { D as LinkIcon } from "../../icons-
|
|
2
|
+
import { D as LinkIcon } from "../../icons-Cn3vWZRs.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
-
import { a as CodeBlockCopyButton, i as CodeBlockContent, n as CodeBlockActions, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock } from "../../CodeBlock-Bs_Z03eC.js";
|
|
5
4
|
import { Popover } from "../foundations/Popover.js";
|
|
5
|
+
import { a as CodeBlockCopyButton, i as CodeBlockContent, n as CodeBlockActions, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock } from "../../CodeBlock-B4K656LO.js";
|
|
6
6
|
import { ToggleGroup } from "../foundations/ToggleGroup.js";
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { n as AgentToolRunValue } from "../../AgentToolRunsContext-DniwGn96.js";
|
|
2
2
|
import { i as ThinkChatValue } from "../../ThinkChatContext-DQ6M2VlJ.js";
|
|
3
|
-
import { SubagentRunMetadataProps } from "../agents-sdk/SubagentRunDetails.js";
|
|
4
3
|
import * as React from "react";
|
|
5
4
|
import { UIMessage } from "ai";
|
|
6
5
|
import { UseAgentOptions, useAgent } from "agents/react";
|
|
@@ -27,14 +26,13 @@ export interface AgentToolDetailProps<State = unknown, MessageT extends UIMessag
|
|
|
27
26
|
* rendered in the top bar's trailing slot after the status mark.
|
|
28
27
|
*/
|
|
29
28
|
actions?: React.ReactNode;
|
|
30
|
-
renderMilestone?: SubagentRunMetadataProps["renderMilestone"];
|
|
31
29
|
}
|
|
32
30
|
/**
|
|
33
31
|
* Live retained-child detail composed from upstream connection and chat values.
|
|
34
32
|
* The full child transcript comes from `chat.messages`; `run.parts` remains a
|
|
35
33
|
* compact parent-side stream projection and is never promoted to fake history.
|
|
36
34
|
*/
|
|
37
|
-
export declare function AgentToolDetail<State = unknown, MessageT extends UIMessage = UIMessage>({ actions, backLink, chat, className, ref, run,
|
|
35
|
+
export declare function AgentToolDetail<State = unknown, MessageT extends UIMessage = UIMessage>({ actions, backLink, chat, className, ref, run, ...props }: AgentToolDetailProps<State, MessageT> & {
|
|
38
36
|
ref?: React.Ref<HTMLDivElement>;
|
|
39
37
|
}): React.JSX.Element;
|
|
40
38
|
export interface SelectedAgentToolChildProps<ParentAgentT extends ThinkAgent<ParentState>, ParentState = unknown, ChildState = unknown, MessageT extends UIMessage = UIMessage> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { r as ArrowLeftIcon } from "../../icons-
|
|
2
|
+
import { r as ArrowLeftIcon } from "../../icons-Cn3vWZRs.js";
|
|
3
3
|
import { MessageActions } from "../ai-sdk/Message.js";
|
|
4
4
|
import { SubagentRunIndicator, getSubagentRunName } from "../agents-sdk/SubagentRunIndicator.js";
|
|
5
5
|
import { NaniteMark } from "./NaniteScene.js";
|
|
@@ -7,7 +7,6 @@ import { AgentChat } from "../agents-sdk/AgentChat.js";
|
|
|
7
7
|
import { TransitionSurface } from "../foundations/TransitionSurface.js";
|
|
8
8
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
9
9
|
import { ThinkChat } from "../agents-sdk/ThinkChat.js";
|
|
10
|
-
import { SubagentRunMetadata } from "../agents-sdk/SubagentRunDetails.js";
|
|
11
10
|
import * as React from "react";
|
|
12
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
12
|
import { useAgentChat } from "@cloudflare/think/react";
|
|
@@ -18,7 +17,7 @@ import { useAgent } from "agents/react";
|
|
|
18
17
|
* The full child transcript comes from `chat.messages`; `run.parts` remains a
|
|
19
18
|
* compact parent-side stream projection and is never promoted to fake history.
|
|
20
19
|
*/
|
|
21
|
-
function AgentToolDetail({ actions, backLink, chat, className, ref, run,
|
|
20
|
+
function AgentToolDetail({ actions, backLink, chat, className, ref, run, ...props }) {
|
|
22
21
|
const backRef = React.useRef(null);
|
|
23
22
|
const name = getSubagentRunName(run);
|
|
24
23
|
React.useEffect(() => {
|
|
@@ -31,42 +30,34 @@ function AgentToolDetail({ actions, backLink, chat, className, ref, run, renderM
|
|
|
31
30
|
className: cx("agent-tool-detail", className),
|
|
32
31
|
...props,
|
|
33
32
|
"data-recipe": "fill-host",
|
|
34
|
-
children: [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
children: [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
children:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
message,
|
|
63
|
-
messageIndex,
|
|
64
|
-
messageNumber,
|
|
65
|
-
children: [/* @__PURE__ */ jsx(ThinkChat.MessageContent, { message }), /* @__PURE__ */ jsx(MessageActions, { children: /* @__PURE__ */ jsx(AgentChat.CopyAction, {}) })]
|
|
66
|
-
}) }), /* @__PURE__ */ jsx(AgentChat.Dock, { children: /* @__PURE__ */ jsx(ThinkChat.RecoveryNotice, {}) })]
|
|
67
|
-
}) : /* @__PURE__ */ jsx(AgentChat.Loading, {})
|
|
68
|
-
})
|
|
69
|
-
]
|
|
33
|
+
children: [/* @__PURE__ */ jsxs(AppTopBar.Root, {
|
|
34
|
+
titleAlign: "start",
|
|
35
|
+
"aria-label": `${name} controls`,
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsxs(AppTopBar.Leading, { children: [backLink ? /* @__PURE__ */ jsx(AppTopBar.Link, {
|
|
38
|
+
ref: backRef,
|
|
39
|
+
label: "Back to parent conversation",
|
|
40
|
+
render: backLink,
|
|
41
|
+
children: /* @__PURE__ */ jsx(ArrowLeftIcon, {})
|
|
42
|
+
}) : null, /* @__PURE__ */ jsx(NaniteMark, { index: run.order })] }),
|
|
43
|
+
/* @__PURE__ */ jsx(AppTopBar.Title, { children: /* @__PURE__ */ jsx("h2", {
|
|
44
|
+
className: "agent-tool-detail__title",
|
|
45
|
+
children: name
|
|
46
|
+
}) }),
|
|
47
|
+
/* @__PURE__ */ jsxs(AppTopBar.Trailing, { children: [/* @__PURE__ */ jsx(SubagentRunIndicator, { run }), actions] })
|
|
48
|
+
]
|
|
49
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
50
|
+
className: "agent-tool-detail__chat",
|
|
51
|
+
children: chat ? /* @__PURE__ */ jsxs(ThinkChat.Root, {
|
|
52
|
+
chat,
|
|
53
|
+
children: [/* @__PURE__ */ jsx(AgentChat.Transcript, { children: ({ message, messageIndex, messageNumber }) => /* @__PURE__ */ jsxs(AgentChat.Message, {
|
|
54
|
+
message,
|
|
55
|
+
messageIndex,
|
|
56
|
+
messageNumber,
|
|
57
|
+
children: [/* @__PURE__ */ jsx(ThinkChat.MessageContent, { message }), /* @__PURE__ */ jsx(MessageActions, { children: /* @__PURE__ */ jsx(AgentChat.CopyAction, {}) })]
|
|
58
|
+
}) }), /* @__PURE__ */ jsx(AgentChat.Dock, { children: /* @__PURE__ */ jsx(ThinkChat.RecoveryNotice, {}) })]
|
|
59
|
+
}) : /* @__PURE__ */ jsx(AgentChat.Loading, {})
|
|
60
|
+
})]
|
|
70
61
|
});
|
|
71
62
|
}
|
|
72
63
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as CheckIcon, h as CopyIcon } from "./icons-
|
|
1
|
+
import { d as CheckIcon, h as CopyIcon } from "./icons-Cn3vWZRs.js";
|
|
2
2
|
import { IconButton } from "./components/foundations/IconButton.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region src/components/_internal/merge-refs.ts
|
|
2
|
+
function assignRef(ref, value) {
|
|
3
|
+
if (!ref) return;
|
|
4
|
+
if (typeof ref === "function") {
|
|
5
|
+
const cleanup = ref(value);
|
|
6
|
+
return typeof cleanup === "function" ? cleanup : void 0;
|
|
7
|
+
}
|
|
8
|
+
ref.current = value;
|
|
9
|
+
}
|
|
10
|
+
function mergeRefs(...refs) {
|
|
11
|
+
const activeRefs = refs.filter((ref) => ref != null);
|
|
12
|
+
if (activeRefs.length === 0) return void 0;
|
|
13
|
+
return (value) => {
|
|
14
|
+
const cleanups = activeRefs.map((activeRef) => assignRef(activeRef, value));
|
|
15
|
+
if (value === null) return;
|
|
16
|
+
return () => {
|
|
17
|
+
for (const [index, activeRef] of activeRefs.entries()) {
|
|
18
|
+
const cleanup = cleanups[index];
|
|
19
|
+
if (cleanup) cleanup();
|
|
20
|
+
else assignRef(activeRef, null);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { mergeRefs as n, assignRef as t };
|