@mcp-b/react-components 0.48.0 → 0.49.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.
- package/dist/AgentChatQueue-C_Jaw3Ia.d.ts +48 -0
- package/dist/AgentToolRunsContext-GMe_hSnD.d.ts +35 -0
- package/dist/Avatar-o2NO1fCG.d.ts +124 -0
- package/dist/{Button-CZt3yywF.d.ts → Button-DjONW5UW.d.ts} +1 -1
- package/dist/{CodeBlock-C380GD5t.d.ts → CodeBlock--r6GS8YV.d.ts} +8 -2
- package/dist/{CodeBlock-BSJl682D.js → CodeBlock-g8sADidM.js} +8 -8
- package/dist/{FileTree-DvE0hNZu.js → FileTree-H8mMg4rV.js} +21 -30
- package/dist/{IconButton-BAUFhUk8.d.ts → IconButton-ByiyjkYE.d.ts} +2 -2
- package/dist/{Message-D_vCVEGB.d.ts → Message-DyaTBiV7.d.ts} +17 -4
- package/dist/MessageScrollerVirtual-D4afYwVB.d.ts +84 -0
- package/dist/{PromptInput-DtJHyp0S.d.ts → PromptInput-C4Mofitz.d.ts} +44 -31
- package/dist/PromptInputApproval-D2hpn54U.d.ts +44 -0
- package/dist/Separator-CzhtLYE1.d.ts +41 -0
- package/dist/Toolbar-CGY004u0.d.ts +155 -0
- package/dist/{Workspace-LIoU30n7.d.ts → Workspace-HzGrWDX3.d.ts} +1 -1
- package/dist/{WorkspaceFile-Dq-GC0_T.d.ts → WorkspaceFile-Bouauobc.d.ts} +1 -1
- package/dist/{WorkspaceFileView-C_WnYm-a.js → WorkspaceFileView-DYPtRVpM.js} +5 -4
- package/dist/{WorkspaceLink-B1d2GIGl.js → WorkspaceLink-BYZG-V_I.js} +8 -91
- package/dist/{WorkspaceMessageResponse-BqOezptB.js → WorkspaceMessageResponse-CUJk9_P5.js} +2 -2
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentChat.d.ts +198 -2
- package/dist/components/agents-sdk/AgentChat.js +527 -672
- package/dist/components/agents-sdk/AgentChatQueue.d.ts +2 -0
- package/dist/components/agents-sdk/AgentChatQueue.js +206 -0
- package/dist/components/agents-sdk/AgentEvent.js +2 -2
- package/dist/components/agents-sdk/AgentToolRunsContext.d.ts +2 -2
- package/dist/components/agents-sdk/AgentToolRunsContext.js +1 -36
- package/dist/components/agents-sdk/BrowserLiveScreen.js +22 -14
- package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
- package/dist/components/agents-sdk/BrowserReplay.d.ts +1 -1
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.d.ts +3 -0
- package/dist/components/agents-sdk/BrowserRunPanel.js +32 -31
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +212 -0
- package/dist/components/agents-sdk/EmployeeChrome.js +555 -0
- package/dist/components/agents-sdk/ManagerOffice.d.ts +79 -40
- package/dist/components/agents-sdk/ManagerOffice.js +291 -281
- package/dist/components/agents-sdk/McpConnectionRequest.d.ts +4 -4
- package/dist/components/agents-sdk/McpConnectionRequest.js +4 -3
- package/dist/components/agents-sdk/McpConnectorForm.d.ts +38 -1
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +93 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +5 -4
- package/dist/components/agents-sdk/McpServerIcon.d.ts +17 -0
- package/dist/components/agents-sdk/McpServerIcon.js +25 -0
- package/dist/components/agents-sdk/McpServerPicker.d.ts +4 -3
- package/dist/components/agents-sdk/McpServerPicker.js +4 -3
- package/dist/components/agents-sdk/ModelSelector.d.ts +4 -4
- package/dist/components/agents-sdk/ModelSelector.js +4 -4
- package/dist/components/agents-sdk/PromptInputApproval.d.ts +1 -43
- package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +2 -3
- package/dist/components/agents-sdk/SessionCompaction.d.ts +88 -1
- package/dist/components/agents-sdk/SessionCompaction.js +2 -2
- package/dist/components/agents-sdk/SubagentRunDetails.d.ts +30 -1
- package/dist/components/agents-sdk/SubagentRunDetails.js +57 -1
- package/dist/components/agents-sdk/SubagentRunIndicator.d.ts +9 -9
- package/dist/components/agents-sdk/SubagentRunIndicator.js +19 -24
- package/dist/components/agents-sdk/SubagentRunList.d.ts +6 -3
- package/dist/components/agents-sdk/SubagentRunList.js +4 -2
- package/dist/components/agents-sdk/SubagentRunPanel.d.ts +60 -0
- package/dist/components/agents-sdk/SubagentRunPanel.js +255 -0
- package/dist/components/agents-sdk/SubagentRunSelector.d.ts +8 -4
- package/dist/components/agents-sdk/SubagentRunSelector.js +5 -3
- package/dist/components/agents-sdk/ThinkChat.d.ts +102 -2
- package/dist/components/agents-sdk/ThinkChat.js +233 -2
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +76 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +18 -10
- package/dist/components/agents-sdk/ThinkChatContext.d.ts +27 -1
- package/dist/components/agents-sdk/ThinkChatContext.js +1 -1
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +24 -19
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +85 -28
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +159 -102
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +40 -158
- package/dist/components/agents-sdk/ThinkFullApp.js +71 -290
- package/dist/components/agents-sdk/ThinkRecoveryNotice.d.ts +18 -1
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineActions.d.ts +51 -0
- package/dist/components/agents-sdk/ThinkRoutineActions.js +201 -0
- package/dist/components/agents-sdk/ThinkRoutineBrowser.d.ts +4 -1
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +17 -15
- package/dist/components/agents-sdk/ThinkRoutineDetail.js +11 -11
- package/dist/components/agents-sdk/ThinkRoutineForm.d.ts +2 -1
- package/dist/components/agents-sdk/ThinkRoutineForm.js +14 -14
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +7 -7
- package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +90 -1
- package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -3
- package/dist/components/agents-sdk/Workspace.d.ts +1 -1
- package/dist/components/agents-sdk/Workspace.js +7 -13
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +10 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +10 -7
- package/dist/components/agents-sdk/WorkspaceExecution.d.ts +5 -14
- package/dist/components/agents-sdk/WorkspaceExecution.js +24 -38
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +5 -2
- package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -2
- package/dist/components/agents-sdk/WorkspaceFile.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
- package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
- package/dist/components/agents-sdk/WorkspaceLive.d.ts +60 -1
- package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +47 -1
- package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
- package/dist/components/agents-sdk/WorkspaceMountManager.d.ts +3 -2
- package/dist/components/agents-sdk/WorkspaceMountManager.js +6 -9
- package/dist/components/agents-sdk/WorkspaceNavigationRestoration.d.ts +38 -0
- package/dist/components/agents-sdk/WorkspaceNavigationRestoration.js +86 -0
- package/dist/components/agents-sdk/WorkspaceProject.d.ts +5 -14
- package/dist/components/agents-sdk/WorkspaceProject.js +21 -35
- package/dist/components/agents-sdk/WorkspaceUserScript.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceUserScript.js +8 -5
- package/dist/components/ai-sdk/Activity.d.ts +1 -1
- package/dist/components/ai-sdk/Activity.js +1 -1
- package/dist/components/ai-sdk/AgentAttention.d.ts +2 -2
- package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +89 -2
- package/dist/components/ai-sdk/AgentChatStartScreen.js +64 -43
- package/dist/components/ai-sdk/AgentMessageParts.d.ts +45 -1
- package/dist/components/ai-sdk/Approval.d.ts +1 -1
- package/dist/components/ai-sdk/Approval.js +2 -2
- package/dist/components/ai-sdk/Artifact.d.ts +2 -2
- package/dist/components/ai-sdk/Artifact.js +1 -1
- package/dist/components/ai-sdk/ChainOfThought.d.ts +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.d.ts +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/ComposerLink.js +2 -3
- package/dist/components/ai-sdk/ConnectedAppCards.d.ts +9 -1
- package/dist/components/ai-sdk/ConnectedAppCards.js +28 -21
- package/dist/components/ai-sdk/Context.d.ts +7 -3
- package/dist/components/ai-sdk/Context.js +7 -17
- package/dist/components/ai-sdk/Conversation.d.ts +2 -2
- package/dist/components/ai-sdk/Conversation.js +1 -1
- package/dist/components/ai-sdk/Goal.d.ts +3 -3
- package/dist/components/ai-sdk/Goal.js +3 -3
- package/dist/components/ai-sdk/InlineCitation.d.ts +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.d.ts +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
- package/dist/components/ai-sdk/Message.d.ts +2 -2
- package/dist/components/ai-sdk/Message.js +12 -3
- package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
- package/dist/components/ai-sdk/MessageScroller.js +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.d.ts +2 -76
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +39 -5
- package/dist/components/ai-sdk/Plan.d.ts +1 -1
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.d.ts +2 -2
- package/dist/components/ai-sdk/PromptInput.js +175 -231
- package/dist/components/ai-sdk/PromptInputComposerEditor.js +32 -9
- package/dist/components/ai-sdk/Queue.d.ts +28 -5
- package/dist/components/ai-sdk/Queue.js +20 -5
- package/dist/components/ai-sdk/Reasoning.d.ts +1 -1
- package/dist/components/ai-sdk/Reasoning.js +5 -5
- package/dist/components/ai-sdk/Sources.d.ts +1 -1
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.d.ts +1 -1
- package/dist/components/ai-sdk/Task.js +1 -1
- package/dist/components/extension/ChatGptSignInScreen.d.ts +1 -1
- package/dist/components/extension/ChatGptSignInScreen.js +1 -1
- package/dist/components/extension/CodexModelSelector.d.ts +5 -0
- package/dist/components/extension/CodexModelSelector.js +2 -2
- package/dist/components/extension/ConversationTabPicker.d.ts +1 -0
- package/dist/components/extension/ConversationTabPicker.js +2 -2
- package/dist/components/foundations/AlertDialog.d.ts +1 -1
- package/dist/components/foundations/AppIcon.d.ts +3 -2
- package/dist/components/foundations/Autocomplete.js +6 -1
- package/dist/components/foundations/Avatar.d.ts +1 -121
- package/dist/components/foundations/Button.d.ts +1 -1
- package/dist/components/foundations/Card.d.ts +22 -27
- package/dist/components/foundations/Card.js +51 -32
- package/dist/components/foundations/Checkbox.js +1 -1
- package/dist/components/foundations/CheckboxGroup.d.ts +1 -1
- package/dist/components/foundations/Collapsible.d.ts +1 -1
- package/dist/components/foundations/Collapsible.js +1 -1
- package/dist/components/foundations/Combobox.js +6 -1
- package/dist/components/foundations/ContextMenu.js +1 -1
- package/dist/components/foundations/Dialog.d.ts +106 -1
- package/dist/components/foundations/EmptyState.d.ts +1 -1
- package/dist/components/foundations/Field.d.ts +2 -1
- package/dist/components/foundations/Fieldset.d.ts +1 -1
- package/dist/components/foundations/Form.d.ts +4 -4
- package/dist/components/foundations/IconButton.d.ts +1 -1
- package/dist/components/foundations/Label.d.ts +1 -1
- package/dist/components/foundations/LinkButton.d.ts +2 -2
- package/dist/components/foundations/Menubar.js +1 -1
- package/dist/components/foundations/Meter.d.ts +1 -1
- package/dist/components/foundations/NumberField.d.ts +1 -1
- package/dist/components/foundations/ScrollArea.d.ts +1 -1
- package/dist/components/foundations/SearchField.d.ts +1 -1
- package/dist/components/foundations/SearchField.js +1 -1
- package/dist/components/foundations/Select.js +7 -2
- package/dist/components/foundations/Separator.d.ts +1 -40
- package/dist/components/foundations/Stepper.d.ts +1 -1
- package/dist/components/foundations/Stepper.js +1 -1
- package/dist/components/foundations/Textarea.d.ts +1 -1
- package/dist/components/foundations/Toast.d.ts +5 -1
- package/dist/components/foundations/Toast.js +1 -1
- package/dist/components/foundations/Toggle.d.ts +70 -1
- package/dist/components/foundations/ToggleGroup.d.ts +4 -3
- package/dist/components/foundations/ToggleGroup.js +1 -1
- package/dist/components/foundations/Toolbar.d.ts +1 -151
- package/dist/components/foundations/TransitionSurface.d.ts +1 -1
- package/dist/components/foundations/icons.js +1 -1
- package/dist/components/general-purpose/ActionGuide.d.ts +10 -26
- package/dist/components/general-purpose/ActionGuide.js +4 -18
- package/dist/components/general-purpose/AppTopBar.d.ts +4 -2
- package/dist/components/general-purpose/Commit.d.ts +2 -2
- package/dist/components/general-purpose/Commit.js +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.d.ts +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
- package/dist/components/general-purpose/FileTree.d.ts +1 -7
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/PricingPlanCard.d.ts +4 -0
- package/dist/components/general-purpose/PricingPlanCard.js +2 -2
- package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
- package/dist/components/general-purpose/ResizableSidePanel.d.ts +2 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +128 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +120 -102
- package/dist/components/general-purpose/SettingsFormDialog.d.ts +14 -27
- package/dist/components/general-purpose/SettingsFormDialog.js +42 -72
- package/dist/components/general-purpose/SetupChecklist.d.ts +1 -0
- package/dist/components/general-purpose/SetupChecklist.js +76 -1
- package/dist/components/general-purpose/Terminal.d.ts +3 -3
- package/dist/components/general-purpose/Terminal.js +11 -6
- package/dist/components/general-purpose/TestResults.d.ts +23 -11
- package/dist/components/general-purpose/TestResults.js +49 -51
- package/dist/components/general-purpose/ThemeModeControl.d.ts +2 -0
- package/dist/components/general-purpose/ThemeModeControl.js +2 -2
- package/dist/components/general-purpose/WebPreview.d.ts +29 -4
- package/dist/components/general-purpose/WebPreview.js +39 -14
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.d.ts +13 -11
- package/dist/components/nanites/AgentToolDetail.js +21 -42
- package/dist/{copy-button-Dk2vRe9j.js → copy-button-CSDuDfdP.js} +1 -1
- package/dist/{copy-button-C0JyjClr.d.ts → copy-button-OUwOdgEm.d.ts} +1 -1
- package/dist/mcp-server-mAErsxHU.js +27 -0
- package/dist/styles/activity.css +1 -96
- package/dist/styles/agent-chat.css +75 -102
- package/dist/styles/agent-tool-detail.css +0 -16
- package/dist/styles/base.css +1 -1
- package/dist/styles/browser-run-panel.css +1 -15
- package/dist/styles/button.css +7 -1
- package/dist/styles/code-block.css +12 -0
- package/dist/styles/composition-motion.css +0 -2
- package/dist/styles/employee-chrome.css +43 -0
- package/dist/styles/file-tree.css +5 -0
- package/dist/styles/index.css +4 -2
- package/dist/styles/message.css +2 -10
- package/dist/styles/queue.css +71 -0
- package/dist/styles/subagent-run.css +122 -6
- package/dist/styles/test-results.css +2 -5
- package/dist/styles/think-chat-activity.css +13 -0
- package/dist/styles/think-chat-tool-panels.css +81 -0
- package/dist/styles/think-execution-workbench.css +2 -8
- package/dist/styles/think-full-app.css +42 -251
- package/dist/styles/{think-routine-library.css → think-routine.css} +64 -80
- package/dist/styles/web-preview.css +15 -1
- package/dist/utils/mcp-server-catalog.d.ts +1112 -2
- package/dist/utils/mcp-server-catalog.js +28 -9
- package/dist/utils/structured-code.d.ts +1 -1
- package/dist/{workspace-assets-GqsCYxqT.js → workspace-assets-Bg7XhPsk.js} +2 -2
- package/package.json +7 -3
- package/dist/AgentChat-BLmQghkt.d.ts +0 -327
- package/dist/AgentChatStartScreen-Bkv7Avni.d.ts +0 -84
- package/dist/AgentMessageParts-C7L-Mv9U.d.ts +0 -46
- package/dist/AgentToolRunsContext-jtmveaRE.d.ts +0 -57
- package/dist/Dialog-B_FhRWaz.d.ts +0 -107
- package/dist/McpConnectorForm-CeYNY0MI.d.ts +0 -39
- package/dist/McpPluginCatalog-3qWu8oK1.d.ts +0 -92
- package/dist/ResponsiveSidebarShell-BTVPxLJK.d.ts +0 -123
- package/dist/SessionCompaction-CmTJFpzj.d.ts +0 -89
- package/dist/SetupChecklist-DeTU9YpW.js +0 -77
- package/dist/ThinkChat-CwMdEum8.d.ts +0 -185
- package/dist/ThinkChat-DiI6hhDP.js +0 -332
- package/dist/ThinkChatActivity-B3lGVS-6.d.ts +0 -77
- package/dist/ThinkChatContext-COIgzkYp.d.ts +0 -28
- package/dist/ThinkRecoveryNotice-DGWr94rk.d.ts +0 -19
- package/dist/ThinkThreadPicker-yFz4vvIf.d.ts +0 -91
- package/dist/Toggle-DLrIf5YH.d.ts +0 -69
- package/dist/WorkspaceLive-DfjH1Ypm.d.ts +0 -61
- package/dist/WorkspaceMessageResponse-kJYU8Onj.d.ts +0 -48
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +0 -31
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.js +0 -34
- package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +0 -80
- package/dist/components/agents-sdk/ThinkRoutineLibrary.js +0 -159
- package/dist/components/agents-sdk/ThinkSidepanel.d.ts +0 -200
- package/dist/components/agents-sdk/ThinkSidepanel.js +0 -775
- package/dist/mcp-server-7NR24ASj.js +0 -69
- package/dist/mcp-server-catalog-C_g7C-9o.d.ts +0 -1108
- package/dist/styles/think-sidepanel.css +0 -78
- package/dist/think-agent-Cip5KAPj.d.ts +0 -7
- package/dist/{icons-CeGfXO21.js → icons-cuEtsgj9.js} +1 -1
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import { I as PaperclipIcon } from "../../icons-CeGfXO21.js";
|
|
2
1
|
import { Button } from "../foundations/Button.js";
|
|
3
|
-
import { Card, CardFooter, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
4
|
-
import { Popover } from "../foundations/Popover.js";
|
|
5
2
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
6
|
-
import {
|
|
3
|
+
import { Popover } from "../foundations/Popover.js";
|
|
4
|
+
import { Card, CardFooter, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
7
5
|
import "react";
|
|
8
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
7
|
//#region src/components/agents-sdk/WorkspaceMountManager.tsx
|
|
10
8
|
/** Controlled local-mount presentation; native handles and persistence stay in the host. */
|
|
11
|
-
function WorkspaceMountManager({ mounts, adding = false, busyMountId = null, error, onAdd, onReconnect, onRemove,
|
|
9
|
+
function WorkspaceMountManager({ mounts, adding = false, busyMountId = null, error, onAdd, onReconnect, onRemove, trigger }) {
|
|
12
10
|
const busy = adding || busyMountId !== null;
|
|
13
|
-
return /* @__PURE__ */ jsxs(Popover.Root, { children: [/* @__PURE__ */ jsx(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
children: /* @__PURE__ */ jsx(PaperclipIcon, {})
|
|
11
|
+
return /* @__PURE__ */ jsxs(Popover.Root, { children: [/* @__PURE__ */ jsx(Popover.Trigger, {
|
|
12
|
+
render: trigger,
|
|
13
|
+
unstyled: true
|
|
17
14
|
}), /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, {
|
|
18
15
|
side: "bottom",
|
|
19
16
|
align: "end",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { n as WorkspaceDestination } from "../../WorkspaceLink-Bh9-Jo1r.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/agents-sdk/WorkspaceNavigationRestoration.d.ts
|
|
5
|
+
interface WorkspaceNavigationRestoration {
|
|
6
|
+
focusDestination?: WorkspaceDestination;
|
|
7
|
+
focusScope?: string;
|
|
8
|
+
scrollTop?: number;
|
|
9
|
+
}
|
|
10
|
+
interface WorkspaceNavigationRestorationContextValue {
|
|
11
|
+
get(entryKey: string): WorkspaceNavigationRestoration | undefined;
|
|
12
|
+
recordFocus(entryKey: string, destination: WorkspaceDestination, scope?: string): void;
|
|
13
|
+
recordScroll(entryKey: string, scrollTop: number): void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Owns entry-keyed presentation state unless an ancestor already provides it.
|
|
17
|
+
* This lets a full application share restoration between chat and files while
|
|
18
|
+
* keeping a standalone WorkspaceExplorer self-contained.
|
|
19
|
+
*/
|
|
20
|
+
declare function WorkspaceNavigationRestorationBoundary({
|
|
21
|
+
children
|
|
22
|
+
}: {
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
}): string | number | bigint | boolean | React.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
|
|
25
|
+
/** Restores a link in a named surface, including when that surface renders asynchronously. */
|
|
26
|
+
declare function WorkspaceNavigationFocusRestorer({
|
|
27
|
+
entryKey,
|
|
28
|
+
rootRef,
|
|
29
|
+
scope
|
|
30
|
+
}: {
|
|
31
|
+
entryKey: string;
|
|
32
|
+
rootRef: React.RefObject<HTMLElement | null>;
|
|
33
|
+
scope: string;
|
|
34
|
+
}): null;
|
|
35
|
+
declare function useWorkspaceNavigationRestoration(): WorkspaceNavigationRestorationContextValue | null;
|
|
36
|
+
declare function useRequiredWorkspaceNavigationRestoration(): WorkspaceNavigationRestorationContextValue;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { WorkspaceNavigationFocusRestorer, WorkspaceNavigationRestoration, WorkspaceNavigationRestorationBoundary, WorkspaceNavigationRestorationContextValue, useRequiredWorkspaceNavigationRestoration, useWorkspaceNavigationRestoration };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/agents-sdk/WorkspaceNavigationRestoration.tsx
|
|
4
|
+
const WorkspaceNavigationRestorationContext = React.createContext(null);
|
|
5
|
+
/**
|
|
6
|
+
* Owns entry-keyed presentation state unless an ancestor already provides it.
|
|
7
|
+
* This lets a full application share restoration between chat and files while
|
|
8
|
+
* keeping a standalone WorkspaceExplorer self-contained.
|
|
9
|
+
*/
|
|
10
|
+
function WorkspaceNavigationRestorationBoundary({ children }) {
|
|
11
|
+
const parent = React.use(WorkspaceNavigationRestorationContext);
|
|
12
|
+
const restorationsRef = React.useRef(/* @__PURE__ */ new Map());
|
|
13
|
+
const localValue = React.useMemo(() => ({
|
|
14
|
+
get: (entryKey) => restorationsRef.current.get(entryKey),
|
|
15
|
+
recordFocus: (entryKey, destination, scope) => {
|
|
16
|
+
const current = restorationsRef.current.get(entryKey);
|
|
17
|
+
restorationsRef.current.set(entryKey, {
|
|
18
|
+
...current,
|
|
19
|
+
focusDestination: destination,
|
|
20
|
+
focusScope: scope
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
recordScroll: (entryKey, scrollTop) => {
|
|
24
|
+
const current = restorationsRef.current.get(entryKey);
|
|
25
|
+
restorationsRef.current.set(entryKey, {
|
|
26
|
+
...current,
|
|
27
|
+
scrollTop
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}), []);
|
|
31
|
+
if (parent) return children;
|
|
32
|
+
return /* @__PURE__ */ jsx(WorkspaceNavigationRestorationContext, {
|
|
33
|
+
value: localValue,
|
|
34
|
+
children
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function findDestinationLink(root, destination) {
|
|
38
|
+
if (destination.kind !== "file") return null;
|
|
39
|
+
return [...root.querySelectorAll("[data-workspace-link=\"file\"]")].find((candidate) => candidate.dataset.workspacePath === destination.path && (candidate.dataset.workspaceDestinationFragment || null) === destination.fragment) ?? null;
|
|
40
|
+
}
|
|
41
|
+
/** Restores a link in a named surface, including when that surface renders asynchronously. */
|
|
42
|
+
function WorkspaceNavigationFocusRestorer({ entryKey, rootRef, scope }) {
|
|
43
|
+
const restoration = useWorkspaceNavigationRestoration();
|
|
44
|
+
const handledEntryRef = React.useRef(null);
|
|
45
|
+
React.useEffect(() => {
|
|
46
|
+
if (handledEntryRef.current === entryKey) return;
|
|
47
|
+
const saved = restoration?.get(entryKey);
|
|
48
|
+
if (!saved?.focusDestination || saved.focusScope !== scope) return;
|
|
49
|
+
const focusDestination = saved.focusDestination;
|
|
50
|
+
const root = rootRef.current;
|
|
51
|
+
if (!root) return;
|
|
52
|
+
const restore = () => {
|
|
53
|
+
const surface = [...root.matches("[data-workspace-restoration-scope]") ? [root] : [], ...root.querySelectorAll("[data-workspace-restoration-scope]")].find((candidate) => candidate.dataset.workspaceRestorationScope === scope);
|
|
54
|
+
const target = surface ? findDestinationLink(surface, focusDestination) : null;
|
|
55
|
+
if (!target) return false;
|
|
56
|
+
target.focus({ preventScroll: true });
|
|
57
|
+
handledEntryRef.current = entryKey;
|
|
58
|
+
return true;
|
|
59
|
+
};
|
|
60
|
+
if (restore()) return;
|
|
61
|
+
const observer = new MutationObserver(() => {
|
|
62
|
+
if (restore()) observer.disconnect();
|
|
63
|
+
});
|
|
64
|
+
observer.observe(root, {
|
|
65
|
+
childList: true,
|
|
66
|
+
subtree: true
|
|
67
|
+
});
|
|
68
|
+
return () => observer.disconnect();
|
|
69
|
+
}, [
|
|
70
|
+
entryKey,
|
|
71
|
+
restoration,
|
|
72
|
+
rootRef,
|
|
73
|
+
scope
|
|
74
|
+
]);
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
function useWorkspaceNavigationRestoration() {
|
|
78
|
+
return React.use(WorkspaceNavigationRestorationContext);
|
|
79
|
+
}
|
|
80
|
+
function useRequiredWorkspaceNavigationRestoration() {
|
|
81
|
+
const restoration = useWorkspaceNavigationRestoration();
|
|
82
|
+
if (!restoration) throw new Error("Workspace navigation restoration is unavailable outside its boundary.");
|
|
83
|
+
return restoration;
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
export { WorkspaceNavigationFocusRestorer, WorkspaceNavigationRestorationBoundary, useRequiredWorkspaceNavigationRestoration, useWorkspaceNavigationRestoration };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ThinkFullAppPanel } from "./ThinkFullApp.js";
|
|
2
1
|
import { WorkspaceConceptQueryOptions } from "./WorkspaceConcept.js";
|
|
3
2
|
import { CardProps } from "../foundations/Card.js";
|
|
4
3
|
import * as React from "react";
|
|
@@ -82,11 +81,8 @@ interface WorkspaceProjectFileCardProps extends Omit<WorkspaceProjectCardProps,
|
|
|
82
81
|
fallback?: React.ReactNode;
|
|
83
82
|
}
|
|
84
83
|
interface WorkspaceProjectsPanelProps extends Omit<React.HTMLAttributes<HTMLElement>, "children"> {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
/** Query failure to show instead of the empty state. Loaded projects win. */
|
|
88
|
-
error?: string;
|
|
89
|
-
onRetry?: () => void;
|
|
84
|
+
/** Shared workspace query and host actions, also used by inline project cards. */
|
|
85
|
+
source: WorkspaceProjectSource;
|
|
90
86
|
}
|
|
91
87
|
declare function WorkspaceProjectCard({
|
|
92
88
|
className,
|
|
@@ -116,16 +112,11 @@ declare function useWorkspaceProjects(source: WorkspaceProjectSource): readonly
|
|
|
116
112
|
*/
|
|
117
113
|
declare function WorkspaceProjectsPanel({
|
|
118
114
|
className,
|
|
119
|
-
|
|
120
|
-
loading,
|
|
121
|
-
projects,
|
|
122
|
-
onRetry,
|
|
115
|
+
source,
|
|
123
116
|
ref,
|
|
124
117
|
...props
|
|
125
118
|
}: WorkspaceProjectsPanelProps & {
|
|
126
|
-
ref?: React.Ref<HTMLElement>;
|
|
119
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLElement>;
|
|
127
120
|
}): React.JSX.Element;
|
|
128
|
-
/** Canonical workbench descriptor; hosts supply only the source adapter. */
|
|
129
|
-
declare function workspaceProjectsPanel(source: WorkspaceProjectSource): ThinkFullAppPanel;
|
|
130
121
|
//#endregion
|
|
131
|
-
export { WorkspaceProject, WorkspaceProjectCard, WorkspaceProjectCardProps, WorkspaceProjectFile, WorkspaceProjectFileCard, WorkspaceProjectFileCardProps, WorkspaceProjectFileView, WorkspaceProjectSection, WorkspaceProjectSectionItem, WorkspaceProjectSectionItemView, WorkspaceProjectSectionView, WorkspaceProjectSource, WorkspaceProjectThread, WorkspaceProjectThreadOrigin, WorkspaceProjectThreadView, WorkspaceProjectView, WorkspaceProjectsPanel, WorkspaceProjectsPanelProps, useWorkspaceProjects
|
|
122
|
+
export { WorkspaceProject, WorkspaceProjectCard, WorkspaceProjectCardProps, WorkspaceProjectFile, WorkspaceProjectFileCard, WorkspaceProjectFileCardProps, WorkspaceProjectFileView, WorkspaceProjectSection, WorkspaceProjectSectionItem, WorkspaceProjectSectionItemView, WorkspaceProjectSectionView, WorkspaceProjectSource, WorkspaceProjectThread, WorkspaceProjectThreadOrigin, WorkspaceProjectThreadView, WorkspaceProjectView, WorkspaceProjectsPanel, WorkspaceProjectsPanelProps, useWorkspaceProjects };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { $ as UserIcon, C as FolderIcon, D as LinkIcon, K as SpinnerIcon, S as FileIcon, j as MessageSquareIcon, u as CalendarIcon } from "../../icons-
|
|
2
|
+
import { $ as UserIcon, C as FolderIcon, D as LinkIcon, K as SpinnerIcon, S as FileIcon, j as MessageSquareIcon, u as CalendarIcon } from "../../icons-cuEtsgj9.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-COCyV98Z.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";
|
|
9
7
|
import { LinkButton } from "../foundations/LinkButton.js";
|
|
10
|
-
import {
|
|
8
|
+
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
9
|
+
import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
10
|
+
import { i as WorkspaceDeleteControl, n as WorkspaceComposerLink, t as FaviconMark } from "../../workspace-assets-Bg7XhPsk.js";
|
|
11
11
|
import * as React from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { useQuery } from "@tanstack/react-query";
|
|
@@ -119,7 +119,10 @@ function WorkspaceProjectCard({ className, project, ref, ...props }) {
|
|
|
119
119
|
/* @__PURE__ */ jsxs(CardTitle, {
|
|
120
120
|
id: titleId,
|
|
121
121
|
className: "connected-app-card__title",
|
|
122
|
-
render: /* @__PURE__ */ jsx("h3", {
|
|
122
|
+
render: (props) => /* @__PURE__ */ jsx("h3", {
|
|
123
|
+
...props,
|
|
124
|
+
children: props.children
|
|
125
|
+
}),
|
|
123
126
|
children: [/* @__PURE__ */ jsx("span", {
|
|
124
127
|
className: "connected-app-card__icon",
|
|
125
128
|
"aria-hidden": "true",
|
|
@@ -152,7 +155,7 @@ function WorkspaceProjectFileCard({ fallback = null, path, source, ...props }) {
|
|
|
152
155
|
return project ? /* @__PURE__ */ jsx(WorkspaceProjectCard, {
|
|
153
156
|
...props,
|
|
154
157
|
project: projectWithSource(project, source)
|
|
155
|
-
}) : fallback;
|
|
158
|
+
}, JSON.stringify(source.queryOptions.queryKey)) : fallback;
|
|
156
159
|
}
|
|
157
160
|
/** Design-system-owned project query shared by panels, cards, and composer context. */
|
|
158
161
|
function useWorkspaceProjects(source) {
|
|
@@ -163,7 +166,9 @@ function useWorkspaceProjects(source) {
|
|
|
163
166
|
* query failure with nothing loaded renders as a quiet inline error, never as
|
|
164
167
|
* an empty library.
|
|
165
168
|
*/
|
|
166
|
-
function WorkspaceProjectsPanel({ className,
|
|
169
|
+
function WorkspaceProjectsPanel({ className, source, ref, ...props }) {
|
|
170
|
+
const query = useQuery(source.queryOptions);
|
|
171
|
+
const projects = query.data ?? [];
|
|
167
172
|
return /* @__PURE__ */ jsx("section", {
|
|
168
173
|
ref,
|
|
169
174
|
"data-slot": "workspace-projects-panel",
|
|
@@ -172,26 +177,26 @@ function WorkspaceProjectsPanel({ className, error, loading = false, projects, o
|
|
|
172
177
|
"aria-label": props["aria-label"] ?? "Projects",
|
|
173
178
|
children: projects.length > 0 ? /* @__PURE__ */ jsx("ul", {
|
|
174
179
|
className: "sigvelo-stack-list sigvelo-stack",
|
|
175
|
-
children: projects.map((project) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceProjectCard, { project }) }, project.path))
|
|
176
|
-
}) : error
|
|
180
|
+
children: projects.map((project) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceProjectCard, { project: projectWithSource(project, source) }) }, project.path))
|
|
181
|
+
}) : query.error ? /* @__PURE__ */ jsx(EmptyState, {
|
|
177
182
|
icon: /* @__PURE__ */ jsx(FolderIcon, {}),
|
|
178
183
|
title: "Projects unavailable",
|
|
179
|
-
description: error,
|
|
180
|
-
children:
|
|
184
|
+
description: formatErrorMessage(query.error),
|
|
185
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
181
186
|
size: "sm",
|
|
182
187
|
variant: "outline",
|
|
183
188
|
color: "neutral",
|
|
184
|
-
onClick:
|
|
189
|
+
onClick: () => void query.refetch(),
|
|
185
190
|
children: "Retry"
|
|
186
|
-
})
|
|
187
|
-
}) :
|
|
191
|
+
})
|
|
192
|
+
}) : query.isPending ? /* @__PURE__ */ jsx(EmptyState, {
|
|
188
193
|
icon: /* @__PURE__ */ jsx(SpinnerIcon, {}),
|
|
189
194
|
title: "Loading projects"
|
|
190
195
|
}) : /* @__PURE__ */ jsx(EmptyState, {
|
|
191
196
|
icon: /* @__PURE__ */ jsx(FolderIcon, {}),
|
|
192
197
|
title: "No projects"
|
|
193
198
|
})
|
|
194
|
-
});
|
|
199
|
+
}, JSON.stringify(source.queryOptions.queryKey));
|
|
195
200
|
}
|
|
196
201
|
function projectWithSource(project, source) {
|
|
197
202
|
return {
|
|
@@ -215,24 +220,5 @@ function projectWithSource(project, source) {
|
|
|
215
220
|
onDelete: source.onDelete ? () => source.onDelete?.(project.path) : void 0
|
|
216
221
|
};
|
|
217
222
|
}
|
|
218
|
-
function WorkspaceProjectSourcePanel({ source }) {
|
|
219
|
-
const query = useQuery(source.queryOptions);
|
|
220
|
-
return /* @__PURE__ */ jsx(WorkspaceProjectsPanel, {
|
|
221
|
-
projects: (query.data ?? []).map((project) => projectWithSource(project, source)),
|
|
222
|
-
error: query.isError ? formatErrorMessage(query.error) : void 0,
|
|
223
|
-
loading: query.isPending,
|
|
224
|
-
onRetry: query.isError ? () => void query.refetch() : void 0,
|
|
225
|
-
"aria-busy": query.isFetching || void 0
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
/** Canonical workbench descriptor; hosts supply only the source adapter. */
|
|
229
|
-
function workspaceProjectsPanel(source) {
|
|
230
|
-
return {
|
|
231
|
-
id: "projects",
|
|
232
|
-
label: "Projects",
|
|
233
|
-
icon: /* @__PURE__ */ jsx(FolderIcon, {}),
|
|
234
|
-
render: () => /* @__PURE__ */ jsx(WorkspaceProjectSourcePanel, { source })
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
223
|
//#endregion
|
|
238
|
-
export { WorkspaceProjectCard, WorkspaceProjectFileCard, WorkspaceProjectsPanel, useWorkspaceProjects
|
|
224
|
+
export { WorkspaceProjectCard, WorkspaceProjectFileCard, WorkspaceProjectsPanel, useWorkspaceProjects };
|
|
@@ -41,7 +41,7 @@ declare function WorkspaceUserScriptsPanel({
|
|
|
41
41
|
scripts,
|
|
42
42
|
...props
|
|
43
43
|
}: WorkspaceUserScriptsPanelProps & {
|
|
44
|
-
ref?: React.Ref<HTMLElement>;
|
|
44
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLElement>;
|
|
45
45
|
}): React.JSX.Element;
|
|
46
46
|
//#endregion
|
|
47
47
|
export { WorkspaceUserScript, WorkspaceUserScriptCard, WorkspaceUserScriptCardProps, WorkspaceUserScriptsPanel, WorkspaceUserScriptsPanelProps };
|
|
@@ -1,11 +1,11 @@
|
|
|
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-cuEtsgj9.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";
|
|
5
|
+
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
7
6
|
import { Switch } from "../foundations/Switch.js";
|
|
8
|
-
import {
|
|
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-Bg7XhPsk.js";
|
|
9
9
|
import * as React from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/agents-sdk/WorkspaceUserScript.tsx
|
|
@@ -93,7 +93,10 @@ function WorkspaceUserScriptCard({ className, script, ref, ...props }) {
|
|
|
93
93
|
/* @__PURE__ */ jsxs(CardTitle, {
|
|
94
94
|
id: titleId,
|
|
95
95
|
className: "connected-app-card__title",
|
|
96
|
-
render: /* @__PURE__ */ jsx("h3", {
|
|
96
|
+
render: (props) => /* @__PURE__ */ jsx("h3", {
|
|
97
|
+
...props,
|
|
98
|
+
children: props.children
|
|
99
|
+
}),
|
|
97
100
|
children: [/* @__PURE__ */ jsx("span", {
|
|
98
101
|
className: "connected-app-card__icon",
|
|
99
102
|
"aria-hidden": "true",
|
|
@@ -43,7 +43,7 @@ declare function Activity({
|
|
|
43
43
|
ref,
|
|
44
44
|
...props
|
|
45
45
|
}: ActivityProps & {
|
|
46
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
46
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
|
|
47
47
|
}): React.JSX.Element;
|
|
48
48
|
interface ActivityTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "unstyled" | "children"> {
|
|
49
49
|
/** The action being taken. Defaults to "Working…". */
|
|
@@ -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-CeGfXO21.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,4 +1,4 @@
|
|
|
1
|
-
import { r as ButtonProps } from "../../Button-
|
|
1
|
+
import { r as ButtonProps } from "../../Button-DjONW5UW.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ai-sdk/AgentAttention.d.ts
|
|
@@ -17,7 +17,7 @@ declare function AgentAttention({
|
|
|
17
17
|
ref,
|
|
18
18
|
...props
|
|
19
19
|
}: AgentAttentionProps & {
|
|
20
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
20
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
|
|
21
21
|
}): React.JSX.Element;
|
|
22
22
|
interface AgentAttentionHeadingProps {
|
|
23
23
|
/** Leading visual. Decorative by default; put meaning in the title. */
|
|
@@ -1,2 +1,89 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { r as ButtonProps } from "../../Button-DjONW5UW.js";
|
|
2
|
+
import { vt as PromptInputTray } from "../../PromptInput-C4Mofitz.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
5
|
+
|
|
6
|
+
//#region src/components/ai-sdk/AgentChatStartScreen.d.ts
|
|
7
|
+
interface AgentChatStarterItem {
|
|
8
|
+
id: string;
|
|
9
|
+
label: React.ReactNode;
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
muted?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Accessible label for this suggestion's optional dismiss action. */
|
|
14
|
+
dismissLabel?: string;
|
|
15
|
+
}
|
|
16
|
+
interface AgentChatStarterListProps extends Omit<React.ComponentPropsWithoutRef<"ul">, "children" | "onDismiss" | "onSelect"> {
|
|
17
|
+
/** Complete starter data from a host-owned suggestion query. */
|
|
18
|
+
items: readonly AgentChatStarterItem[];
|
|
19
|
+
onSelect: (item: AgentChatStarterItem) => void;
|
|
20
|
+
/** Enables dismiss actions for items that provide `dismissLabel`. */
|
|
21
|
+
onDismiss?: (item: AgentChatStarterItem) => void;
|
|
22
|
+
}
|
|
23
|
+
interface AgentChatStartScreenProps extends useRender.ComponentProps<"section"> {}
|
|
24
|
+
/** First-turn layout beneath the same draft provider as the live composer. */
|
|
25
|
+
declare function AgentChatStartScreen({
|
|
26
|
+
render,
|
|
27
|
+
ref,
|
|
28
|
+
children,
|
|
29
|
+
...props
|
|
30
|
+
}: AgentChatStartScreenProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
31
|
+
interface AgentChatStartScreenPrimaryProps extends useRender.ComponentProps<"div"> {
|
|
32
|
+
heading?: React.ReactNode;
|
|
33
|
+
}
|
|
34
|
+
/** Heading and live-composer group; suggestions are a separate sibling below it. */
|
|
35
|
+
declare function AgentChatStartScreenPrimary({
|
|
36
|
+
heading,
|
|
37
|
+
render,
|
|
38
|
+
ref,
|
|
39
|
+
children,
|
|
40
|
+
...props
|
|
41
|
+
}: AgentChatStartScreenPrimaryProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
42
|
+
/** Stacking boundary for a caller-owned form and its docked utility tray. */
|
|
43
|
+
declare function AgentChatStartScreenComposer({
|
|
44
|
+
render,
|
|
45
|
+
ref,
|
|
46
|
+
...props
|
|
47
|
+
}: useRender.ComponentProps<"div">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
48
|
+
/** Utility actions share PromptInputTray's native props and ref. */
|
|
49
|
+
declare function AgentChatStartScreenTray({
|
|
50
|
+
className,
|
|
51
|
+
...props
|
|
52
|
+
}: Omit<React.ComponentProps<typeof PromptInputTray>, "side">): React.JSX.Element;
|
|
53
|
+
/** Starter prompts or an app-authored guide; remains in layout while the draft is active. */
|
|
54
|
+
declare function AgentChatStartScreenSuggestions({
|
|
55
|
+
render,
|
|
56
|
+
ref,
|
|
57
|
+
...props
|
|
58
|
+
}: useRender.ComponentProps<"div">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
59
|
+
/** Semantic list for first-turn prompts below an `AgentChatStartScreen`. */
|
|
60
|
+
declare function AgentChatStarterList({
|
|
61
|
+
items,
|
|
62
|
+
onSelect,
|
|
63
|
+
onDismiss,
|
|
64
|
+
className,
|
|
65
|
+
...props
|
|
66
|
+
}: AgentChatStarterListProps): React.JSX.Element;
|
|
67
|
+
interface AgentChatStarterProps extends Omit<ButtonProps, "color" | "iconOnly" | "size" | "variant"> {
|
|
68
|
+
/** Decorative icon shown before the prompt label. */
|
|
69
|
+
icon?: React.ReactNode;
|
|
70
|
+
/** Render the prompt with quieter onboarding emphasis. */
|
|
71
|
+
muted?: boolean;
|
|
72
|
+
/** Optional independent action for removing a suggested prompt. */
|
|
73
|
+
onDismiss?: React.MouseEventHandler<HTMLButtonElement>;
|
|
74
|
+
/** Accessible name for the dismiss action. */
|
|
75
|
+
dismissLabel?: string;
|
|
76
|
+
}
|
|
77
|
+
/** One full-width, keyboard-native starter prompt. */
|
|
78
|
+
declare function AgentChatStarter({
|
|
79
|
+
icon,
|
|
80
|
+
muted,
|
|
81
|
+
onDismiss,
|
|
82
|
+
dismissLabel,
|
|
83
|
+
children,
|
|
84
|
+
className,
|
|
85
|
+
type,
|
|
86
|
+
...props
|
|
87
|
+
}: AgentChatStarterProps): React.JSX.Element;
|
|
88
|
+
//#endregion
|
|
89
|
+
export { AgentChatStartScreen, AgentChatStartScreenComposer, AgentChatStartScreenPrimary, AgentChatStartScreenPrimaryProps, AgentChatStartScreenProps, AgentChatStartScreenSuggestions, AgentChatStartScreenTray, AgentChatStarter, AgentChatStarterItem, AgentChatStarterList, AgentChatStarterListProps, AgentChatStarterProps };
|
|
@@ -1,50 +1,71 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { nt as XIcon } from "../../icons-
|
|
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
|
-
import { PromptInputTray } from "./PromptInput.js";
|
|
6
|
-
import
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { PromptInputTray, usePromptInputController } from "./PromptInput.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
9
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
8
10
|
//#region src/components/ai-sdk/AgentChatStartScreen.tsx
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
/** First-turn layout beneath the same draft provider as the live composer. */
|
|
12
|
+
function AgentChatStartScreen({ render, ref, children, ...props }) {
|
|
13
|
+
const { textInput, attachments } = usePromptInputController();
|
|
14
|
+
return useRender({
|
|
15
|
+
defaultTagName: "section",
|
|
16
|
+
render,
|
|
17
|
+
ref,
|
|
18
|
+
props: mergeProps({
|
|
19
|
+
"data-slot": "agent-chat-start-screen",
|
|
20
|
+
"data-drafting": textInput.value.length > 0 || attachments.files.length > 0 ? "" : void 0,
|
|
21
|
+
className: "agent-chat-start-screen",
|
|
22
|
+
"aria-label": props["aria-labelledby"] ? void 0 : "New conversation",
|
|
23
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
24
|
+
className: "agent-chat-start-screen__content",
|
|
25
|
+
children
|
|
26
|
+
})
|
|
27
|
+
}, props)
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/** Heading and live-composer group; suggestions are a separate sibling below it. */
|
|
31
|
+
function AgentChatStartScreenPrimary({ heading = "What should we work on?", render, ref, children, ...props }) {
|
|
32
|
+
return useRender({
|
|
33
|
+
defaultTagName: "div",
|
|
34
|
+
render,
|
|
35
|
+
ref,
|
|
36
|
+
props: mergeProps({
|
|
37
|
+
className: "agent-chat-start-screen__primary",
|
|
38
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [heading ? /* @__PURE__ */ jsx("h2", {
|
|
39
|
+
className: "agent-chat-start-screen__heading",
|
|
40
|
+
children: heading
|
|
41
|
+
}) : null, children] })
|
|
42
|
+
}, props)
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/** Stacking boundary for a caller-owned form and its docked utility tray. */
|
|
46
|
+
function AgentChatStartScreenComposer({ render, ref, ...props }) {
|
|
47
|
+
return useRender({
|
|
48
|
+
defaultTagName: "div",
|
|
49
|
+
render,
|
|
50
|
+
ref,
|
|
51
|
+
props: mergeProps({ className: "agent-chat-start-screen__composer" }, props)
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/** Utility actions share PromptInputTray's native props and ref. */
|
|
55
|
+
function AgentChatStartScreenTray({ className, ...props }) {
|
|
56
|
+
return /* @__PURE__ */ jsx(PromptInputTray, {
|
|
23
57
|
...props,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
side: "bottom",
|
|
36
|
-
className: "agent-chat-start-screen__composer-tray",
|
|
37
|
-
children: composerTray
|
|
38
|
-
}) : null]
|
|
39
|
-
})]
|
|
40
|
-
}), lead ? /* @__PURE__ */ jsx("div", {
|
|
41
|
-
className: "agent-chat-start-screen__lead",
|
|
42
|
-
children: lead
|
|
43
|
-
}) : starters?.items.length ? /* @__PURE__ */ jsx("div", {
|
|
44
|
-
className: "agent-chat-start-screen__starters",
|
|
45
|
-
children: /* @__PURE__ */ jsx(AgentChatStarterList, { ...starters })
|
|
46
|
-
}) : null]
|
|
47
|
-
})
|
|
58
|
+
side: "bottom",
|
|
59
|
+
className: cx("agent-chat-start-screen__composer-tray", className)
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/** Starter prompts or an app-authored guide; remains in layout while the draft is active. */
|
|
63
|
+
function AgentChatStartScreenSuggestions({ render, ref, ...props }) {
|
|
64
|
+
return useRender({
|
|
65
|
+
defaultTagName: "div",
|
|
66
|
+
render,
|
|
67
|
+
ref,
|
|
68
|
+
props: mergeProps({ className: "agent-chat-start-screen__suggestions" }, props)
|
|
48
69
|
});
|
|
49
70
|
}
|
|
50
71
|
/** Semantic list for first-turn prompts below an `AgentChatStartScreen`. */
|
|
@@ -99,4 +120,4 @@ function AgentChatStarter({ icon, muted = false, onDismiss, dismissLabel, childr
|
|
|
99
120
|
});
|
|
100
121
|
}
|
|
101
122
|
//#endregion
|
|
102
|
-
export { AgentChatStartScreen, AgentChatStarter, AgentChatStarterList };
|
|
123
|
+
export { AgentChatStartScreen, AgentChatStartScreenComposer, AgentChatStartScreenPrimary, AgentChatStartScreenSuggestions, AgentChatStartScreenTray, AgentChatStarter, AgentChatStarterList };
|
|
@@ -1,2 +1,46 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ChatStatus, UIMessage } from "ai";
|
|
3
|
+
|
|
4
|
+
//#region src/components/ai-sdk/AgentMessageParts.d.ts
|
|
5
|
+
type AgentMessagePart<MessageT extends UIMessage = UIMessage> = MessageT["parts"][number];
|
|
6
|
+
interface AgentMessageRenderPartContext<MessageT extends UIMessage = UIMessage> {
|
|
7
|
+
message: MessageT;
|
|
8
|
+
part: AgentMessagePart<MessageT>;
|
|
9
|
+
partIndex: number;
|
|
10
|
+
defaultRender: () => React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
interface AgentMessagePartsProps<MessageT extends UIMessage = UIMessage> {
|
|
13
|
+
/** The whole upstream AI SDK message whose parts should render in order. */
|
|
14
|
+
message: MessageT;
|
|
15
|
+
/** Drives native reasoning streaming UI. Settled messages default to `ready`. */
|
|
16
|
+
status?: ChatStatus;
|
|
17
|
+
/**
|
|
18
|
+
* Override rendering per part. Return `undefined` to use the default renderer,
|
|
19
|
+
* `null` to suppress the part, or call `defaultRender()` to compose the
|
|
20
|
+
* built-in result into custom UI.
|
|
21
|
+
*
|
|
22
|
+
* The default renderer uses upstream helpers where available:
|
|
23
|
+
* `isTextUIPart`, `isReasoningUIPart`, `isFileUIPart`, `isToolUIPart`,
|
|
24
|
+
* `getToolName`, and the native AI SDK tool-part state fields. It
|
|
25
|
+
* also renders native AI SDK `source-url`/`source-document` parts as a single
|
|
26
|
+
* grouped `Sources` block when they appear consecutively, consolidates native
|
|
27
|
+
* reasoning parts into one disclosure, and treats `step-start` as a silent
|
|
28
|
+
* structural boundary. App-defined `data-*` parts stay whole and should be
|
|
29
|
+
* narrowed with AI SDK's `isDataUIPart` inside this callback. If you override
|
|
30
|
+
* source rendering, return a React node for every source part you want to
|
|
31
|
+
* show; returning `undefined` keeps the upstream-shaped source-run grouping.
|
|
32
|
+
*/
|
|
33
|
+
renderPart?: (context: AgentMessageRenderPartContext<MessageT>) => React.ReactNode | undefined;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Renders the ordered parts of one whole AI SDK `UIMessage` without adding a
|
|
37
|
+
* transcript, message wrapper, composer, or transport. Compose it inside
|
|
38
|
+
* `Message` for read-only run previews and child-agent transcript rows.
|
|
39
|
+
*/
|
|
40
|
+
declare function AgentMessageParts<MessageT extends UIMessage = UIMessage>({
|
|
41
|
+
message,
|
|
42
|
+
status,
|
|
43
|
+
renderPart
|
|
44
|
+
}: AgentMessagePartsProps<MessageT>): (React.JSX.Element | null)[];
|
|
45
|
+
//#endregion
|
|
2
46
|
export { AgentMessagePart, AgentMessageParts, AgentMessagePartsProps, AgentMessageRenderPartContext };
|
|
@@ -11,7 +11,7 @@ declare function Approval({
|
|
|
11
11
|
ref,
|
|
12
12
|
...props
|
|
13
13
|
}: ApprovalProps & {
|
|
14
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
14
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
|
|
15
15
|
}): React.JSX.Element;
|
|
16
16
|
interface ApprovalHeaderProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
17
17
|
/** Question and optional queue position for an approval request. */
|