@mcp-b/react-components 0.48.0 → 0.49.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/AgentChatQueue-v5890eA1.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-DruTQ-oa.js} +38 -36
- package/dist/{IconButton-BAUFhUk8.d.ts → IconButton-ByiyjkYE.d.ts} +2 -2
- package/dist/{Menu-yb6QXWA3.d.ts → Menu-CgfUZhZd.d.ts} +1 -1
- 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-4kCz3T9P.d.ts} +45 -32
- 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 +5 -4
- 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/AgentChatMessageEditor.js +5 -1
- 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 +40 -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 +6 -1
- package/dist/components/extension/CodexModelSelector.js +3 -3
- 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.d.ts +10 -23
- package/dist/components/foundations/ContextMenu.js +3 -2
- 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/Menu.d.ts +1 -1
- package/dist/components/foundations/Menubar.d.ts +1 -1
- 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/PreviewCard.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/Tooltip.d.ts +1 -1
- 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/accessibility.css +20 -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 -9
- 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/codex-model-selector.css +4 -0
- package/dist/styles/color-contrast.test.ts +212 -0
- package/dist/styles/composition-motion.css +0 -2
- package/dist/styles/employee-chrome.css +43 -0
- package/dist/styles/file-tree.css +10 -1
- package/dist/styles/index.css +4 -2
- package/dist/styles/manager-office.css +5 -5
- package/dist/styles/message.css +2 -10
- package/dist/styles/queue.css +71 -0
- package/dist/styles/responsive-sidebar-shell.css +1 -1
- 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/codex-model-catalog.d.ts +25 -6
- package/dist/utils/codex-model-catalog.js +22 -5
- 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 +8 -4
- 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,107 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Dialog } from "@base-ui/react/dialog";
|
|
3
|
-
|
|
4
|
-
//#region src/components/foundations/Dialog.d.ts
|
|
5
|
-
type DialogProps<Payload = unknown> = Dialog.Root.Props<Payload>;
|
|
6
|
-
type DialogTriggerProps<Payload = unknown> = Dialog.Trigger.Props<Payload> & React.RefAttributes<HTMLElement>;
|
|
7
|
-
interface DialogPortalProps extends React.ComponentPropsWithRef<typeof Dialog.Portal> {}
|
|
8
|
-
interface DialogBackdropProps extends React.ComponentPropsWithRef<typeof Dialog.Backdrop> {}
|
|
9
|
-
interface DialogViewportProps extends React.ComponentPropsWithRef<typeof Dialog.Viewport> {}
|
|
10
|
-
interface DialogPopupProps extends React.ComponentPropsWithRef<typeof Dialog.Popup> {
|
|
11
|
-
/**
|
|
12
|
-
* The size of the dialog.
|
|
13
|
-
* @default 'md'
|
|
14
|
-
*/
|
|
15
|
-
size?: "sm" | "md" | "lg" | "fullscreen";
|
|
16
|
-
}
|
|
17
|
-
interface DialogTitleProps extends React.ComponentPropsWithRef<typeof Dialog.Title> {}
|
|
18
|
-
interface DialogDescriptionProps extends React.ComponentPropsWithRef<typeof Dialog.Description> {}
|
|
19
|
-
interface DialogCloseProps extends React.ComponentPropsWithRef<typeof Dialog.Close> {}
|
|
20
|
-
interface DialogHeaderProps extends React.ComponentPropsWithRef<"div"> {}
|
|
21
|
-
interface DialogFooterProps extends React.ComponentPropsWithRef<"div"> {}
|
|
22
|
-
/**
|
|
23
|
-
* A dialog component for modal interactions.
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```tsx
|
|
27
|
-
* <Dialog.Root open={isOpen} onOpenChange={setIsOpen}>
|
|
28
|
-
* <Dialog.Trigger render={<Button />}>Open</Dialog.Trigger>
|
|
29
|
-
* <Dialog.Portal>
|
|
30
|
-
* <Dialog.Backdrop />
|
|
31
|
-
* <Dialog.Viewport>
|
|
32
|
-
* <Dialog.Popup>
|
|
33
|
-
* <Dialog.Title>Confirm</Dialog.Title>
|
|
34
|
-
* <Dialog.Description>Are you sure?</Dialog.Description>
|
|
35
|
-
* <Dialog.Close>Cancel</Dialog.Close>
|
|
36
|
-
* </Dialog.Popup>
|
|
37
|
-
* </Dialog.Viewport>
|
|
38
|
-
* </Dialog.Portal>
|
|
39
|
-
* </Dialog.Root>
|
|
40
|
-
* ```
|
|
41
|
-
*
|
|
42
|
-
* @see {@link https://base-ui.com/react/components/dialog | Base UI Dialog}
|
|
43
|
-
*/
|
|
44
|
-
declare function DialogTrigger<Payload>({
|
|
45
|
-
render,
|
|
46
|
-
className,
|
|
47
|
-
ref,
|
|
48
|
-
...props
|
|
49
|
-
}: DialogTriggerProps<Payload>): React.JSX.Element;
|
|
50
|
-
declare function DialogBackdrop({
|
|
51
|
-
className,
|
|
52
|
-
ref,
|
|
53
|
-
...props
|
|
54
|
-
}: DialogBackdropProps): React.JSX.Element;
|
|
55
|
-
declare function DialogViewport({
|
|
56
|
-
className,
|
|
57
|
-
ref,
|
|
58
|
-
...props
|
|
59
|
-
}: DialogViewportProps): React.JSX.Element;
|
|
60
|
-
declare function DialogPopup({
|
|
61
|
-
size,
|
|
62
|
-
className,
|
|
63
|
-
ref,
|
|
64
|
-
...props
|
|
65
|
-
}: DialogPopupProps): React.JSX.Element;
|
|
66
|
-
declare function DialogHeader({
|
|
67
|
-
className,
|
|
68
|
-
ref,
|
|
69
|
-
...props
|
|
70
|
-
}: DialogHeaderProps): React.JSX.Element;
|
|
71
|
-
declare function DialogFooter({
|
|
72
|
-
className,
|
|
73
|
-
ref,
|
|
74
|
-
...props
|
|
75
|
-
}: DialogFooterProps): React.JSX.Element;
|
|
76
|
-
declare function DialogTitle({
|
|
77
|
-
className,
|
|
78
|
-
ref,
|
|
79
|
-
...props
|
|
80
|
-
}: DialogTitleProps): React.JSX.Element;
|
|
81
|
-
declare function DialogDescription({
|
|
82
|
-
className,
|
|
83
|
-
ref,
|
|
84
|
-
...props
|
|
85
|
-
}: DialogDescriptionProps): React.JSX.Element;
|
|
86
|
-
declare function DialogClose({
|
|
87
|
-
render,
|
|
88
|
-
className,
|
|
89
|
-
ref,
|
|
90
|
-
...props
|
|
91
|
-
}: DialogCloseProps): React.JSX.Element;
|
|
92
|
-
declare const Dialog$1: {
|
|
93
|
-
Root: typeof Dialog.Root;
|
|
94
|
-
Trigger: typeof DialogTrigger;
|
|
95
|
-
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
96
|
-
Backdrop: typeof DialogBackdrop;
|
|
97
|
-
Viewport: typeof DialogViewport;
|
|
98
|
-
Popup: typeof DialogPopup;
|
|
99
|
-
Header: typeof DialogHeader;
|
|
100
|
-
Footer: typeof DialogFooter;
|
|
101
|
-
Title: typeof DialogTitle;
|
|
102
|
-
Description: typeof DialogDescription;
|
|
103
|
-
Close: typeof DialogClose;
|
|
104
|
-
createHandle: typeof Dialog.createHandle;
|
|
105
|
-
};
|
|
106
|
-
//#endregion
|
|
107
|
-
export { DialogFooterProps as a, DialogPortalProps as c, DialogTriggerProps as d, DialogViewportProps as f, DialogDescriptionProps as i, DialogProps as l, DialogBackdropProps as n, DialogHeaderProps as o, DialogCloseProps as r, DialogPopupProps as s, Dialog$1 as t, DialogTitleProps as u };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { d as McpServerSetupAuthFieldName, l as McpServerSetupAuth } from "./mcp-server-catalog-C_g7C-9o.js";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/agents-sdk/McpConnectorForm.d.ts
|
|
5
|
-
type CredentialFieldName = Exclude<McpServerSetupAuthFieldName, "redirectUrl">;
|
|
6
|
-
type McpConnectorFormValues = Readonly<Partial<Record<CredentialFieldName, string>> & {
|
|
7
|
-
readonly name: string;
|
|
8
|
-
readonly url: string;
|
|
9
|
-
}>;
|
|
10
|
-
type McpConnectorFormProps = Omit<React.FormHTMLAttributes<HTMLFormElement>, "onSubmit" | "status"> & {
|
|
11
|
-
/** Authentication metadata that decides which credential fields render. */readonly auth?: McpServerSetupAuth; /** Initial connector values. Publisher client credentials remain app-owned. */
|
|
12
|
-
readonly defaults?: Partial<McpConnectorFormValues>; /** Optional pattern used to validate the MCP name field. */
|
|
13
|
-
readonly namePattern?: string; /** Keep a catalog-owned MCP name and URL visible but immutable. */
|
|
14
|
-
readonly readOnlyServer?: boolean; /** Read-only redirect URL shown for manual OAuth client setup. */
|
|
15
|
-
readonly redirectUrl?: string; /** Inline connection status announced politely to assistive tech. */
|
|
16
|
-
readonly status?: React.ReactNode; /** Label for the submit button. */
|
|
17
|
-
readonly submitLabel?: string; /** Label shown while submit is pending. */
|
|
18
|
-
readonly submittingLabel?: string; /** Called with normalized connector values after native form validation passes. */
|
|
19
|
-
readonly onSubmit: (values: McpConnectorFormValues) => void | Promise<void>;
|
|
20
|
-
};
|
|
21
|
-
/** Collects MCP connector settings and optional credentials with native form validation. */
|
|
22
|
-
declare function McpConnectorForm({
|
|
23
|
-
auth,
|
|
24
|
-
className,
|
|
25
|
-
defaults,
|
|
26
|
-
namePattern,
|
|
27
|
-
readOnlyServer,
|
|
28
|
-
redirectUrl,
|
|
29
|
-
status,
|
|
30
|
-
submitLabel,
|
|
31
|
-
submittingLabel,
|
|
32
|
-
onSubmit,
|
|
33
|
-
ref,
|
|
34
|
-
...props
|
|
35
|
-
}: McpConnectorFormProps & {
|
|
36
|
-
ref?: React.Ref<HTMLFormElement>;
|
|
37
|
-
}): React.JSX.Element;
|
|
38
|
-
//#endregion
|
|
39
|
-
export { McpConnectorFormProps as n, McpConnectorFormValues as r, McpConnectorForm as t };
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { o as McpServerCard } from "./mcp-server-catalog-C_g7C-9o.js";
|
|
2
|
-
import { r as McpConnectorFormValues } from "./McpConnectorForm-CeYNY0MI.js";
|
|
3
|
-
import { l as DialogProps } from "./Dialog-B_FhRWaz.js";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
import { MCPServersState } from "agents";
|
|
6
|
-
|
|
7
|
-
//#region src/components/agents-sdk/McpPluginCatalog.d.ts
|
|
8
|
-
/** Optional plugin-specific copy layered over the canonical MCP server card. */
|
|
9
|
-
interface McpPluginDetails {
|
|
10
|
-
developerName?: string;
|
|
11
|
-
marketplaceName?: string;
|
|
12
|
-
longDescription?: string;
|
|
13
|
-
capabilities?: readonly string[];
|
|
14
|
-
skills?: readonly string[];
|
|
15
|
-
}
|
|
16
|
-
interface McpPluginCatalogProps extends Omit<React.HTMLAttributes<HTMLElement>, "onSelect"> {
|
|
17
|
-
/** Canonical connector cards. The directory does not create a second plugin registry. */
|
|
18
|
-
servers: readonly McpServerCard[];
|
|
19
|
-
/** Upstream Agents MCP state used to project connected and recovery states. */
|
|
20
|
-
mcp?: MCPServersState;
|
|
21
|
-
/** Optional plugin metadata keyed by the canonical server ID. */
|
|
22
|
-
detailsByServerId?: Readonly<Record<string, McpPluginDetails | undefined>>;
|
|
23
|
-
/** Server IDs promoted into the Featured section, in display order. */
|
|
24
|
-
featuredServerIds?: readonly string[];
|
|
25
|
-
/** Host product name paired with the plugin in the connection dialog. */
|
|
26
|
-
brandName?: string;
|
|
27
|
-
/** Host product mark paired with the plugin in the connection dialog. */
|
|
28
|
-
brandLogo?: React.ReactNode;
|
|
29
|
-
/** Product-authored trust and data-sharing copy. Pass null to omit it. */
|
|
30
|
-
disclosure?: React.ReactNode;
|
|
31
|
-
/** Starts or recovers the existing MCP connection path. */
|
|
32
|
-
onConnect?: (server: McpServerCard) => void | Promise<void>;
|
|
33
|
-
/** Removes the exact upstream MCP entry. */
|
|
34
|
-
onDisconnect?: (serverId: string) => void | Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* Connects a user-supplied MCP server. Providing it puts the "Custom
|
|
37
|
-
* plugin" action in the bar, opening the shared connector setup dialog.
|
|
38
|
-
*/
|
|
39
|
-
onAddCustom?: (values: McpConnectorFormValues) => void | Promise<void>;
|
|
40
|
-
/** Accessible name only — the hosting tab or icon is the visible title. */
|
|
41
|
-
heading?: React.ReactNode;
|
|
42
|
-
searchLabel?: string;
|
|
43
|
-
emptyMessage?: React.ReactNode;
|
|
44
|
-
}
|
|
45
|
-
interface McpPluginDetailsDialogProps {
|
|
46
|
-
/** Selected canonical server card. Passing null closes the dialog. */
|
|
47
|
-
server: McpServerCard | null;
|
|
48
|
-
details?: McpPluginDetails;
|
|
49
|
-
mcp?: MCPServersState;
|
|
50
|
-
brandName?: string;
|
|
51
|
-
brandLogo?: React.ReactNode;
|
|
52
|
-
disclosure?: React.ReactNode;
|
|
53
|
-
onConnect?: (server: McpServerCard) => void | Promise<void>;
|
|
54
|
-
onDisconnect?: (serverId: string) => void | Promise<void>;
|
|
55
|
-
onOpenChange: NonNullable<DialogProps["onOpenChange"]>;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Searchable plugin directory backed by the same MCP cards and live Agents
|
|
59
|
-
* state as {@link McpServerPicker}. Selecting a row opens the shared details
|
|
60
|
-
* dialog; connecting still delegates to the host's existing MCP/OAuth path.
|
|
61
|
-
*/
|
|
62
|
-
declare function McpPluginCatalog({
|
|
63
|
-
servers,
|
|
64
|
-
mcp,
|
|
65
|
-
detailsByServerId,
|
|
66
|
-
featuredServerIds,
|
|
67
|
-
brandName,
|
|
68
|
-
brandLogo,
|
|
69
|
-
disclosure,
|
|
70
|
-
onConnect,
|
|
71
|
-
onDisconnect,
|
|
72
|
-
onAddCustom,
|
|
73
|
-
heading,
|
|
74
|
-
searchLabel,
|
|
75
|
-
emptyMessage,
|
|
76
|
-
className,
|
|
77
|
-
...props
|
|
78
|
-
}: McpPluginCatalogProps): React.JSX.Element;
|
|
79
|
-
/** Reference-derived plugin detail surface without a parallel install state. */
|
|
80
|
-
declare function McpPluginDetailsDialog({
|
|
81
|
-
server,
|
|
82
|
-
details,
|
|
83
|
-
mcp,
|
|
84
|
-
brandName,
|
|
85
|
-
brandLogo,
|
|
86
|
-
disclosure,
|
|
87
|
-
onConnect,
|
|
88
|
-
onDisconnect,
|
|
89
|
-
onOpenChange
|
|
90
|
-
}: McpPluginDetailsDialogProps): React.JSX.Element;
|
|
91
|
-
//#endregion
|
|
92
|
-
export { McpPluginDetailsDialogProps as a, McpPluginDetailsDialog as i, McpPluginCatalogProps as n, McpPluginDetails as r, McpPluginCatalog as t };
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
//#region src/components/general-purpose/ResponsiveSidebarShell.d.ts
|
|
4
|
-
interface ResponsiveSidebarShellControls {
|
|
5
|
-
/** Close the sidebar and move focus to the main content. */
|
|
6
|
-
closeSidebar: () => void;
|
|
7
|
-
/** Close only when the shell is currently using its compact drawer layout. */
|
|
8
|
-
closeSidebarOnCompact: () => void;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Bar slot content shared by every shell-owning surface's `bar` prop, so an
|
|
12
|
-
* app writes one shape whether it is configuring ThinkFullApp, the routine
|
|
13
|
-
* library, or the shell directly.
|
|
14
|
-
*/
|
|
15
|
-
interface AppBarSlots {
|
|
16
|
-
/**
|
|
17
|
-
* App-owned route element rendered as a labelled back control. Back owns
|
|
18
|
-
* the leading slot the same way `leading` does: the shell's own sidebar
|
|
19
|
-
* toggle stands down and compact sidebars stay reachable through
|
|
20
|
-
* `compactTitleTrigger`.
|
|
21
|
-
*/
|
|
22
|
-
back?: {
|
|
23
|
-
label: string;
|
|
24
|
-
link: React.ReactElement;
|
|
25
|
-
};
|
|
26
|
-
/** App-owned leading navigation that owns the leading slot at every width. */
|
|
27
|
-
leading?: React.ReactNode;
|
|
28
|
-
/** Compact-only navigation that replaces the drawer trigger without hiding the wide rail toggle. */
|
|
29
|
-
compactLeading?: React.ReactNode;
|
|
30
|
-
/** Bar title content. Hidden at compact widths when `compactTitleTrigger` stands in. */
|
|
31
|
-
title?: React.ReactNode;
|
|
32
|
-
/** Trailing group, before `primary`. Overflow menus and secondary icon controls. */
|
|
33
|
-
actions?: React.ReactNode;
|
|
34
|
-
/**
|
|
35
|
-
* Rightmost trailing control. Sits after `actions` so a host can keep a
|
|
36
|
-
* single primary action (new thread, new schedule) on the trailing edge
|
|
37
|
-
* without fighting whatever else the surface puts in the bar.
|
|
38
|
-
*/
|
|
39
|
-
primary?: React.ReactNode;
|
|
40
|
-
}
|
|
41
|
-
interface ResponsiveSidebarShellBar extends AppBarSlots {
|
|
42
|
-
/** Element the bar title renders into, e.g. `<h1 id={…}/>` for a labelled page. */
|
|
43
|
-
titleRender?: React.ReactElement<Record<string, unknown>>;
|
|
44
|
-
/**
|
|
45
|
-
* Label content for a compact-width drawer trigger that replaces the plain
|
|
46
|
-
* title and the icon toggle: the title itself becomes the control that opens
|
|
47
|
-
* the sidebar. The shell renders the button and the disclosure chevron.
|
|
48
|
-
*/
|
|
49
|
-
compactTitleTrigger?: React.ReactNode;
|
|
50
|
-
/** Accessible name for the bar toolbar. Defaults to "Application controls". */
|
|
51
|
-
label?: string;
|
|
52
|
-
/** Class for the bar root, the owning surface's styling hook. */
|
|
53
|
-
className?: string;
|
|
54
|
-
/**
|
|
55
|
-
* No bar row at all — for content that brings its own application bar.
|
|
56
|
-
* Distinct from passing no slots: an empty shell with a sidebar still shows
|
|
57
|
-
* a bar carrying the toggle.
|
|
58
|
-
*/
|
|
59
|
-
hidden?: boolean;
|
|
60
|
-
}
|
|
61
|
-
interface ResponsiveSidebarShellProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "title"> {
|
|
62
|
-
/**
|
|
63
|
-
* Navigation or other secondary surface shown beside the selected content.
|
|
64
|
-
* Omit for a shell that is only a bar row over content — the app bar then
|
|
65
|
-
* has one mount point whether or not a sidebar exists.
|
|
66
|
-
*
|
|
67
|
-
* Open/closed is shell-internal: it is ephemeral presentation state, not a
|
|
68
|
-
* route, so no host controls it and no resize ever writes into a router.
|
|
69
|
-
*/
|
|
70
|
-
sidebar?: React.ReactNode | ((controls: ResponsiveSidebarShellControls) => React.ReactNode);
|
|
71
|
-
/** Main content. */
|
|
72
|
-
children?: React.ReactNode;
|
|
73
|
-
/** Short noun used by the toggle and resize control, such as “threads” or “schedules”. */
|
|
74
|
-
sidebarLabel?: string;
|
|
75
|
-
/** Whether the sidebar is open. Omit for internal state. */
|
|
76
|
-
sidebarOpen?: boolean;
|
|
77
|
-
/** Move the wide-layout toggle into the sidebar while it is open. */
|
|
78
|
-
sidebarTogglePlacement?: "main" | "sidebar";
|
|
79
|
-
/** Initial sidebar state when `sidebarOpen` is uncontrolled. */
|
|
80
|
-
defaultSidebarOpen?: boolean;
|
|
81
|
-
/** Called when the sidebar is opened or closed. */
|
|
82
|
-
onSidebarOpenChange?: (open: boolean) => void;
|
|
83
|
-
/** Initial desktop sidebar width in CSS pixels. */
|
|
84
|
-
defaultSidebarWidth?: number;
|
|
85
|
-
/** Shell-owned application bar composed from slots. */
|
|
86
|
-
bar?: ResponsiveSidebarShellBar;
|
|
87
|
-
/**
|
|
88
|
-
* Host-owned error shown in the main column above the content, without
|
|
89
|
-
* replacing it. The shell renders the alert anatomy; pass the message.
|
|
90
|
-
*/
|
|
91
|
-
error?: React.ReactNode;
|
|
92
|
-
/** Accessible name for the mobile peek target that returns to the main content. */
|
|
93
|
-
showMainLabel?: string;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* The one application shell: responsive master-detail with a resizable desktop
|
|
97
|
-
* sidebar, a compact floating drawer that leaves the main content in place as
|
|
98
|
-
* a dismiss target, and a shell-owned application bar composed from slots.
|
|
99
|
-
* The root exposes `data-sidebar-open="true" | "false"` as its public styling
|
|
100
|
-
* hook, and its container name `responsive-sidebar-shell` is public contract:
|
|
101
|
-
* surfaces that compose the shell size themselves against it.
|
|
102
|
-
*/
|
|
103
|
-
declare function ResponsiveSidebarShell({
|
|
104
|
-
sidebar,
|
|
105
|
-
sidebarLabel,
|
|
106
|
-
sidebarOpen,
|
|
107
|
-
sidebarTogglePlacement,
|
|
108
|
-
defaultSidebarOpen,
|
|
109
|
-
defaultSidebarWidth,
|
|
110
|
-
onSidebarOpenChange,
|
|
111
|
-
bar,
|
|
112
|
-
error,
|
|
113
|
-
showMainLabel,
|
|
114
|
-
className,
|
|
115
|
-
children,
|
|
116
|
-
ref,
|
|
117
|
-
style,
|
|
118
|
-
...props
|
|
119
|
-
}: ResponsiveSidebarShellProps & {
|
|
120
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
121
|
-
}): React.JSX.Element;
|
|
122
|
-
//#endregion
|
|
123
|
-
export { ResponsiveSidebarShellProps as a, ResponsiveSidebarShellControls as i, ResponsiveSidebarShell as n, ResponsiveSidebarShellBar as r, AppBarSlots as t };
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { ChatStatus, UIMessage } from "ai";
|
|
2
|
-
|
|
3
|
-
//#region src/components/agents-sdk/SessionCompaction.d.ts
|
|
4
|
-
type SessionStatusPhase = "idle" | "compacting";
|
|
5
|
-
interface SessionStatusFrame {
|
|
6
|
-
phase: SessionStatusPhase;
|
|
7
|
-
/** Present on the idle frame that follows a successful compaction. */
|
|
8
|
-
compacted: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Session's own estimate for the history this frame describes, or null when
|
|
11
|
-
* the frame omits it or carries a non-finite value. Not provider-reported
|
|
12
|
-
* usage — never render it as an exact token count, and never feed it to the
|
|
13
|
-
* `Context` ring, which reads `metadata.usage`.
|
|
14
|
-
*/
|
|
15
|
-
tokenEstimate: number | null;
|
|
16
|
-
/**
|
|
17
|
-
* The same estimate taken before the compaction this frame reports, from its
|
|
18
|
-
* `compacted` payload. Null on every other frame. Both numbers come from one
|
|
19
|
-
* estimator over one history, so their difference is a meaningful size even
|
|
20
|
-
* though neither is exact.
|
|
21
|
-
*/
|
|
22
|
-
tokensBefore: number | null;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Parse a raw websocket payload as a `cf_agent_session` status frame.
|
|
26
|
-
* Returns null for every other frame on the connection.
|
|
27
|
-
*/
|
|
28
|
-
declare function parseSessionStatusFrame(data: unknown): SessionStatusFrame | null;
|
|
29
|
-
/**
|
|
30
|
-
* Parse a raw websocket payload as a `cf_agent_session_error` frame,
|
|
31
|
-
* returning its error text. Null for every other frame on the connection.
|
|
32
|
-
*/
|
|
33
|
-
declare function parseSessionErrorFrame(data: unknown): string | null;
|
|
34
|
-
/** The message-frame surface of a `useAgent` connection. */
|
|
35
|
-
interface SessionFrameSource {
|
|
36
|
-
addEventListener(type: "message", listener: (event: MessageEvent) => void): void;
|
|
37
|
-
removeEventListener(type: "message", listener: (event: MessageEvent) => void): void;
|
|
38
|
-
}
|
|
39
|
-
interface UseSessionCompactionOptions<MessageT extends UIMessage> {
|
|
40
|
-
/** The conversation agent's `useAgent` connection. */
|
|
41
|
-
agent: SessionFrameSource;
|
|
42
|
-
/** The conversation's `useAgentChat` value (status + local view setter). */
|
|
43
|
-
chat: {
|
|
44
|
-
status: ChatStatus;
|
|
45
|
-
setMessages: (messages: MessageT[]) => void;
|
|
46
|
-
};
|
|
47
|
-
/** Server read used to reload the transcript after a compaction lands. */
|
|
48
|
-
getMessages: () => Promise<MessageT[]>;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* How much a landed compaction shortened the history, per Session's own
|
|
52
|
-
* estimator. A UI may show the difference as an approximate size; it must not
|
|
53
|
-
* present either number as exact usage.
|
|
54
|
-
*/
|
|
55
|
-
interface SessionCompactionSize {
|
|
56
|
-
tokensBefore: number;
|
|
57
|
-
tokensAfter: number;
|
|
58
|
-
}
|
|
59
|
-
interface UseSessionCompactionResult {
|
|
60
|
-
compacting: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Size of the compaction that landed most recently on this connection, or
|
|
63
|
-
* null when none has landed or the frames carried no usable estimates. A new
|
|
64
|
-
* object per compaction, so a consumer can dismiss one acknowledgement by
|
|
65
|
-
* identity and still show the next. Cleared when the next compaction starts.
|
|
66
|
-
*/
|
|
67
|
-
lastCompaction: SessionCompactionSize | null;
|
|
68
|
-
/**
|
|
69
|
-
* Set when the post-compaction transcript reload rejected — the local view
|
|
70
|
-
* is stale relative to the server until a retry succeeds. Surface it
|
|
71
|
-
* ("Transcript may be out of date"); the hook retries on the next status
|
|
72
|
-
* transition to `"ready"`.
|
|
73
|
-
*/
|
|
74
|
-
reloadError: unknown;
|
|
75
|
-
/**
|
|
76
|
-
* Error text from the last `cf_agent_session_error` frame — the only signal
|
|
77
|
-
* a user who ran /compact gets when the server-side compaction itself fails
|
|
78
|
-
* (the phase just flips back to idle with no `compacted` payload). Cleared
|
|
79
|
-
* when the next compaction starts.
|
|
80
|
-
*/
|
|
81
|
-
sessionError: string | null;
|
|
82
|
-
}
|
|
83
|
-
declare function useSessionCompaction<MessageT extends UIMessage>({
|
|
84
|
-
agent,
|
|
85
|
-
chat,
|
|
86
|
-
getMessages
|
|
87
|
-
}: UseSessionCompactionOptions<MessageT>): UseSessionCompactionResult;
|
|
88
|
-
//#endregion
|
|
89
|
-
export { UseSessionCompactionOptions as a, parseSessionStatusFrame as c, SessionStatusPhase as i, useSessionCompaction as l, SessionFrameSource as n, UseSessionCompactionResult as o, SessionStatusFrame as r, parseSessionErrorFrame as s, SessionCompactionSize as t };
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { n as mergeBaseClassName } from "./class-names-BiMDVpUo.js";
|
|
2
|
-
import { B as PlusIcon, d as CheckIcon, et as WarningIcon, f as ChevronDownIcon } from "./icons-CeGfXO21.js";
|
|
3
|
-
import { Button } from "./components/foundations/Button.js";
|
|
4
|
-
import { Menu } from "./components/foundations/Menu.js";
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
//#region src/components/_internal/MenuDisclosureGroup.tsx
|
|
8
|
-
/**
|
|
9
|
-
* A menu-native disclosure: its trigger stays in the menu roving-focus model,
|
|
10
|
-
* while its rows mount only after the user expands the section.
|
|
11
|
-
*/
|
|
12
|
-
function MenuDisclosureGroup({ children, className, defaultOpen = false, label, triggerClassName, ...props }) {
|
|
13
|
-
const [open, setOpen] = React.useState(defaultOpen);
|
|
14
|
-
return /* @__PURE__ */ jsxs(Menu.Group, {
|
|
15
|
-
className: mergeBaseClassName("menu-disclosure-group", className),
|
|
16
|
-
...props,
|
|
17
|
-
children: [/* @__PURE__ */ jsxs(Menu.Item, {
|
|
18
|
-
"aria-expanded": open,
|
|
19
|
-
className: mergeBaseClassName("menu-disclosure-group__trigger", triggerClassName),
|
|
20
|
-
closeOnClick: false,
|
|
21
|
-
onClick: () => setOpen((current) => !current),
|
|
22
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
23
|
-
className: "sigvelo-truncate-grow",
|
|
24
|
-
children: label
|
|
25
|
-
}), /* @__PURE__ */ jsx(ChevronDownIcon, { "aria-hidden": "true" })]
|
|
26
|
-
}), open ? /* @__PURE__ */ jsx("div", {
|
|
27
|
-
className: "menu-disclosure-group__items",
|
|
28
|
-
children
|
|
29
|
-
}) : null]
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/components/general-purpose/SetupChecklist.tsx
|
|
34
|
-
/** Checklist rows for any Menu surface (composer plus menu, tray menu). */
|
|
35
|
-
function SetupChecklistGroup({ label, entries, defaultOpen = false, onSelect }) {
|
|
36
|
-
return /* @__PURE__ */ jsx(MenuDisclosureGroup, {
|
|
37
|
-
label,
|
|
38
|
-
defaultOpen,
|
|
39
|
-
children: entries.map((entry) => /* @__PURE__ */ jsxs(Menu.Item, {
|
|
40
|
-
"aria-label": `${entry.name}, ${entry.complete ? "complete" : "not set up"}`,
|
|
41
|
-
onClick: () => onSelect(entry.id),
|
|
42
|
-
children: [
|
|
43
|
-
entry.icon,
|
|
44
|
-
/* @__PURE__ */ jsx("span", {
|
|
45
|
-
className: "sigvelo-truncate-grow",
|
|
46
|
-
children: entry.description
|
|
47
|
-
}),
|
|
48
|
-
entry.complete ? /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true" }) : /* @__PURE__ */ jsx(PlusIcon, { "aria-hidden": "true" })
|
|
49
|
-
]
|
|
50
|
-
}, entry.id))
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
/** Progress-aware tray trigger opening the checklist in its own menu. */
|
|
54
|
-
function SetupChecklistAction({ actionLabel, label, entries, onSelect }) {
|
|
55
|
-
const completed = entries.filter((entry) => entry.complete).length;
|
|
56
|
-
return /* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */ jsxs(Button, {
|
|
57
|
-
type: "button",
|
|
58
|
-
variant: "ghost",
|
|
59
|
-
color: "neutral",
|
|
60
|
-
size: "sm",
|
|
61
|
-
"aria-label": `${actionLabel} — ${completed} of ${entries.length} set up`,
|
|
62
|
-
render: /* @__PURE__ */ jsx(Menu.Trigger, { unstyled: true }),
|
|
63
|
-
children: [completed === entries.length ? /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true" }) : /* @__PURE__ */ jsx(WarningIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", { children: actionLabel })]
|
|
64
|
-
}), /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
65
|
-
side: "bottom",
|
|
66
|
-
align: "start",
|
|
67
|
-
sideOffset: 4,
|
|
68
|
-
children: /* @__PURE__ */ jsx(Menu.Popup, { children: /* @__PURE__ */ jsx(SetupChecklistGroup, {
|
|
69
|
-
defaultOpen: true,
|
|
70
|
-
label,
|
|
71
|
-
entries,
|
|
72
|
-
onSelect
|
|
73
|
-
}) })
|
|
74
|
-
}) })] });
|
|
75
|
-
}
|
|
76
|
-
//#endregion
|
|
77
|
-
export { SetupChecklistGroup as n, SetupChecklistAction as t };
|