@mcp-b/react-components 0.47.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-DMHZiw86.js → CodeBlock-g8sADidM.js} +7 -7
- package/dist/Correspondent-7K6uNLUm.d.ts +64 -0
- package/dist/{FileTree-BHebfvkK.js → FileTree-H8mMg4rV.js} +20 -29
- 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-C_zHq9KZ.d.ts → Workspace-HzGrWDX3.d.ts} +14 -3
- package/dist/{WorkspaceFile-Dq-GC0_T.d.ts → WorkspaceFile-Bouauobc.d.ts} +1 -1
- package/dist/{WorkspaceFileView-ChIJz-fl.js → WorkspaceFileView-DYPtRVpM.js} +4 -3
- package/dist/{WorkspaceLink-B1d2GIGl.js → WorkspaceLink-BYZG-V_I.js} +8 -91
- package/dist/{WorkspaceMessageResponse-Dg_aNpoj.js → WorkspaceMessageResponse-CUJk9_P5.js} +6 -3
- package/dist/components/agents-sdk/AgentChat.d.ts +198 -2
- package/dist/components/agents-sdk/AgentChat.js +525 -670
- 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 +1 -1
- 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 +21 -13
- package/dist/components/agents-sdk/BrowserReplay.d.ts +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.d.ts +3 -0
- package/dist/components/agents-sdk/BrowserRunPanel.js +31 -30
- 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 +115 -85
- package/dist/components/agents-sdk/ManagerOffice.js +545 -1154
- package/dist/components/agents-sdk/McpConnectionRequest.d.ts +4 -4
- package/dist/components/agents-sdk/McpConnectionRequest.js +3 -2
- package/dist/components/agents-sdk/McpConnectorForm.d.ts +38 -1
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +93 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +3 -2
- 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 +2 -1
- package/dist/components/agents-sdk/ModelSelector.d.ts +4 -4
- package/dist/components/agents-sdk/ModelSelector.js +3 -3
- package/dist/components/agents-sdk/PromptInputApproval.d.ts +1 -43
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +1 -2
- 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 +18 -23
- 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 +4 -2
- 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 +17 -9
- 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 +23 -18
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +85 -28
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +158 -101
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +40 -158
- package/dist/components/agents-sdk/ThinkFullApp.js +71 -285
- package/dist/components/agents-sdk/ThinkRecoveryNotice.d.ts +18 -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 +16 -14
- package/dist/components/agents-sdk/ThinkRoutineDetail.js +12 -12
- package/dist/components/agents-sdk/ThinkRoutineForm.d.ts +2 -1
- package/dist/components/agents-sdk/ThinkRoutineForm.js +11 -11
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +6 -6
- package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +90 -1
- package/dist/components/agents-sdk/ThinkThreadPicker.js +2 -2
- package/dist/components/agents-sdk/Workspace.d.ts +2 -2
- package/dist/components/agents-sdk/Workspace.js +20 -23
- 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 +3 -2
- package/dist/components/agents-sdk/WorkspaceConcept.js +3 -3
- package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +15 -10
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +43 -40
- package/dist/components/agents-sdk/WorkspaceExecution.d.ts +31 -31
- package/dist/components/agents-sdk/WorkspaceExecution.js +115 -192
- 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/WorkspaceLink.js +1 -1
- package/dist/components/agents-sdk/WorkspaceLive.d.ts +60 -1
- package/dist/components/agents-sdk/WorkspaceLive.js +33 -5
- 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 +5 -8
- 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 +44 -15
- package/dist/components/agents-sdk/WorkspaceProject.js +74 -51
- package/dist/components/agents-sdk/WorkspaceUserScript.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceUserScript.js +5 -2
- package/dist/components/ai-sdk/Activity.d.ts +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 +63 -42
- 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/Artifact.d.ts +2 -2
- package/dist/components/ai-sdk/Artifact.js +2 -2
- package/dist/components/ai-sdk/ChainOfThought.d.ts +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 +1 -2
- package/dist/components/ai-sdk/ConnectedAppCards.d.ts +16 -1
- package/dist/components/ai-sdk/ConnectedAppCards.js +69 -94
- 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/Correspondent.d.ts +2 -0
- package/dist/components/ai-sdk/Correspondent.js +145 -0
- package/dist/components/ai-sdk/Goal.d.ts +3 -3
- package/dist/components/ai-sdk/Goal.js +2 -2
- package/dist/components/ai-sdk/InlineCitation.d.ts +1 -1
- package/dist/components/ai-sdk/InlineCitation.js +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.d.ts +1 -1
- package/dist/components/ai-sdk/Message.d.ts +2 -2
- package/dist/components/ai-sdk/Message.js +11 -2
- package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.d.ts +2 -76
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +38 -4
- package/dist/components/ai-sdk/Plan.d.ts +1 -1
- package/dist/components/ai-sdk/PromptInput.d.ts +2 -2
- package/dist/components/ai-sdk/PromptInput.js +170 -226
- 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 +19 -4
- package/dist/components/ai-sdk/Reasoning.d.ts +1 -1
- package/dist/components/ai-sdk/Reasoning.js +4 -4
- package/dist/components/ai-sdk/Sources.d.ts +1 -1
- package/dist/components/ai-sdk/Task.d.ts +1 -1
- package/dist/components/extension/ChatGptSignInScreen.d.ts +1 -1
- package/dist/components/extension/CodexModelSelector.d.ts +5 -0
- package/dist/components/extension/ConversationTabPicker.d.ts +1 -0
- package/dist/components/extension/ConversationTabPicker.js +1 -1
- 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/CheckboxGroup.d.ts +1 -1
- package/dist/components/foundations/Collapsible.d.ts +1 -1
- package/dist/components/foundations/Combobox.js +6 -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/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/Select.js +6 -1
- package/dist/components/foundations/Separator.d.ts +1 -40
- package/dist/components/foundations/Stepper.d.ts +1 -1
- package/dist/components/foundations/Textarea.d.ts +1 -1
- package/dist/components/foundations/Toast.d.ts +5 -1
- package/dist/components/foundations/Toggle.d.ts +70 -1
- package/dist/components/foundations/ToggleGroup.d.ts +3 -2
- package/dist/components/foundations/Toolbar.d.ts +1 -151
- package/dist/components/foundations/TransitionSurface.d.ts +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 +1 -1
- package/dist/components/general-purpose/EnvironmentVariables.d.ts +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/PricingBillingToggle.js +1 -1
- package/dist/components/general-purpose/PricingPlanCard.d.ts +4 -0
- package/dist/components/general-purpose/PricingUsageCalculator.js +1 -1
- 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 +119 -101
- package/dist/components/general-purpose/SettingsFormDialog.d.ts +14 -27
- package/dist/components/general-purpose/SettingsFormDialog.js +40 -70
- 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 +10 -5
- package/dist/components/general-purpose/TestResults.d.ts +23 -11
- package/dist/components/general-purpose/TestResults.js +48 -50
- package/dist/components/general-purpose/ThemeModeControl.d.ts +2 -0
- package/dist/components/general-purpose/WebPreview.d.ts +29 -4
- package/dist/components/general-purpose/WebPreview.js +37 -12
- package/dist/components/nanites/AgentConnection.js +1 -1
- package/dist/components/nanites/AgentToolDetail.d.ts +13 -11
- package/dist/components/nanites/AgentToolDetail.js +20 -41
- 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 +3 -3
- 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/correspondent.css +73 -0
- package/dist/styles/employee-chrome.css +43 -0
- package/dist/styles/file-tree.css +5 -0
- package/dist/styles/index.css +5 -2
- package/dist/styles/manager-office.css +380 -1086
- 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-CxpEHsac.js → workspace-assets-Bg7XhPsk.js} +16 -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-CwRjIDH4.js +0 -77
- package/dist/ThinkChat-CwMdEum8.d.ts +0 -185
- package/dist/ThinkChat-DLDta57t.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-DLGhtIly.d.ts +0 -49
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as ButtonProps } from "./Button-CZt3yywF.js";
|
|
2
1
|
import { d as MenuProps, s as MenuItemProps, t as Menu } from "./Menu-yb6QXWA3.js";
|
|
3
2
|
import { a as TabsListProps, n as TabProps, t as TabPanelProps } from "./Tabs-Ptrbaynh.js";
|
|
3
|
+
import { r as ButtonProps } from "./Button-DjONW5UW.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { ChatStatus, FileUIPart } from "ai";
|
|
6
6
|
|
|
@@ -30,27 +30,19 @@ interface TextInputContext {
|
|
|
30
30
|
interface PromptInputControllerProps {
|
|
31
31
|
textInput: TextInputContext;
|
|
32
32
|
attachments: AttachmentsContext;
|
|
33
|
-
__registerFileInput: (ref: React.RefObject<HTMLInputElement | null>, open: () => void) => void;
|
|
34
33
|
}
|
|
35
34
|
declare function usePromptInputController(): PromptInputControllerProps;
|
|
36
|
-
declare function useProviderAttachments(): AttachmentsContext;
|
|
37
35
|
declare function usePromptInputAttachments(): AttachmentsContext;
|
|
38
36
|
interface PromptInputProviderProps extends React.PropsWithChildren {
|
|
37
|
+
/** Initial draft when the host does not control `value`. */
|
|
39
38
|
initialInput?: string;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}: PromptInputProviderProps): React.JSX.Element;
|
|
45
|
-
interface PromptInputProps extends Omit<React.FormHTMLAttributes<HTMLFormElement>, "onSubmit" | "onError"> {
|
|
46
|
-
/** Accepted file MIME types/extensions, passed to the hidden file input. */
|
|
39
|
+
/** Controlled draft shared by all composer parts. */
|
|
40
|
+
value?: string;
|
|
41
|
+
onValueChange?: (value: string) => void;
|
|
42
|
+
/** Accepted MIME types or filename extensions, enforced for every attachment source. */
|
|
47
43
|
accept?: string;
|
|
48
|
-
/** Allows multiple files in
|
|
44
|
+
/** Allows multiple files in one file-picker action. */
|
|
49
45
|
multiple?: boolean;
|
|
50
|
-
/** Listen for file drops on the whole document instead of only the form. */
|
|
51
|
-
globalDrop?: boolean;
|
|
52
|
-
/** Clears the hidden file input when attachments are cleared. */
|
|
53
|
-
syncHiddenInput?: boolean;
|
|
54
46
|
/** Maximum number of attached files. */
|
|
55
47
|
maxFiles?: number;
|
|
56
48
|
/** Maximum accepted file size in bytes. */
|
|
@@ -60,6 +52,26 @@ interface PromptInputProps extends Omit<React.FormHTMLAttributes<HTMLFormElement
|
|
|
60
52
|
code: "max_files" | "max_file_size" | "accept";
|
|
61
53
|
message: string;
|
|
62
54
|
}) => void;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Owns one draft and file picker across composer layouts. Keep this boundary
|
|
58
|
+
* mounted when switching between a welcome view and a conversation, and compose
|
|
59
|
+
* PromptInput forms, starters, attachments, and dictation beneath it.
|
|
60
|
+
*/
|
|
61
|
+
declare function PromptInputProvider({
|
|
62
|
+
initialInput,
|
|
63
|
+
value,
|
|
64
|
+
onValueChange,
|
|
65
|
+
accept,
|
|
66
|
+
multiple,
|
|
67
|
+
maxFiles,
|
|
68
|
+
maxFileSize,
|
|
69
|
+
onError,
|
|
70
|
+
children
|
|
71
|
+
}: PromptInputProviderProps): React.JSX.Element;
|
|
72
|
+
interface PromptInputProps extends Omit<React.FormHTMLAttributes<HTMLFormElement>, "onSubmit"> {
|
|
73
|
+
/** Listen for file drops on the whole document instead of only the form. */
|
|
74
|
+
globalDrop?: boolean;
|
|
63
75
|
/** Called with the trimmed message text and files when the form is submitted. */
|
|
64
76
|
onSubmit?: (message: PromptInputMessage, event: React.FormEvent<HTMLFormElement>) => void | Promise<void>;
|
|
65
77
|
}
|
|
@@ -79,6 +91,7 @@ interface PromptInputProps extends Omit<React.FormHTMLAttributes<HTMLFormElement
|
|
|
79
91
|
*
|
|
80
92
|
* @example
|
|
81
93
|
* ```tsx
|
|
94
|
+
* <PromptInputProvider>
|
|
82
95
|
* <PromptInput onSubmit={({ text, files }) => sendMessage({ text, files })}>
|
|
83
96
|
* <PromptInputBody>
|
|
84
97
|
* <PromptInputTextarea placeholder="Ask Sigvelo..." />
|
|
@@ -90,25 +103,20 @@ interface PromptInputProps extends Omit<React.FormHTMLAttributes<HTMLFormElement
|
|
|
90
103
|
* <PromptInputSubmit status="ready" />
|
|
91
104
|
* </PromptInputFooter>
|
|
92
105
|
* </PromptInput>
|
|
106
|
+
* </PromptInputProvider>
|
|
93
107
|
* ```
|
|
94
108
|
*
|
|
95
109
|
* @see {@link https://elements.ai-sdk.dev/components/prompt-input | AI Elements Prompt Input}
|
|
96
110
|
*/
|
|
97
111
|
declare function PromptInput({
|
|
98
112
|
className,
|
|
99
|
-
accept,
|
|
100
|
-
multiple,
|
|
101
113
|
globalDrop,
|
|
102
|
-
syncHiddenInput,
|
|
103
|
-
maxFiles,
|
|
104
|
-
maxFileSize,
|
|
105
|
-
onError,
|
|
106
114
|
onSubmit,
|
|
107
115
|
children,
|
|
108
116
|
ref,
|
|
109
117
|
...props
|
|
110
118
|
}: PromptInputProps & {
|
|
111
|
-
ref?: React.Ref<HTMLFormElement>;
|
|
119
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLFormElement>;
|
|
112
120
|
}): React.JSX.Element;
|
|
113
121
|
interface PromptInputHeaderProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
114
122
|
declare function PromptInputHeader({
|
|
@@ -174,6 +182,15 @@ declare function PromptInputFooter({
|
|
|
174
182
|
}: PromptInputFooterProps & {
|
|
175
183
|
ref?: React.Ref<HTMLDivElement>;
|
|
176
184
|
}): React.JSX.Element;
|
|
185
|
+
interface PromptInputFooterEndProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
186
|
+
/** Trailing composer controls; expands for dictation without displacing the input. */
|
|
187
|
+
declare function PromptInputFooterEnd({
|
|
188
|
+
className,
|
|
189
|
+
ref,
|
|
190
|
+
...props
|
|
191
|
+
}: PromptInputFooterEndProps & {
|
|
192
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
193
|
+
}): React.JSX.Element;
|
|
177
194
|
interface PromptInputTrayProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
178
195
|
/** Edge of the composer this supporting tray attaches to. */
|
|
179
196
|
side: "top" | "bottom";
|
|
@@ -196,7 +213,7 @@ declare function PromptInputTools({
|
|
|
196
213
|
}: PromptInputToolsProps & {
|
|
197
214
|
ref?: React.Ref<HTMLDivElement>;
|
|
198
215
|
}): React.JSX.Element;
|
|
199
|
-
interface PromptInputTextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
216
|
+
interface PromptInputTextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "value" | "defaultValue"> {
|
|
200
217
|
minHeight?: number;
|
|
201
218
|
maxHeight?: number;
|
|
202
219
|
}
|
|
@@ -339,7 +356,7 @@ interface PromptInputPermissionSelectorProps {
|
|
|
339
356
|
/**
|
|
340
357
|
* Footer control for choosing how approval requests are handled — ask each
|
|
341
358
|
* time, or bypass. Purely a picker: the auto-approve behavior lives with
|
|
342
|
-
*
|
|
359
|
+
* the application that owns the approvals. Shared chat parts never grant bypass.
|
|
343
360
|
*/
|
|
344
361
|
declare function PromptInputPermissionSelector({
|
|
345
362
|
value,
|
|
@@ -487,25 +504,21 @@ interface PromptInputReference {
|
|
|
487
504
|
trigger?: PromptInputCommandTrigger;
|
|
488
505
|
}
|
|
489
506
|
declare function composerLinksToReferences(text: string): PromptInputReference[];
|
|
490
|
-
interface PromptInputCommandComposerProps extends Omit<PromptInputTextareaProps, "
|
|
507
|
+
interface PromptInputCommandComposerProps extends Omit<PromptInputTextareaProps, "onChange"> {
|
|
491
508
|
commands: readonly PromptInputCommandDefinition[];
|
|
492
509
|
/** MCP, tab, or other mentionable entries revealed by an `@` draft. */
|
|
493
510
|
mentionCommands?: readonly PromptInputCommandDefinition[];
|
|
494
|
-
value: string;
|
|
495
|
-
onValueChange: (value: string) => void;
|
|
496
511
|
onCommandSelect: (command: PromptInputCommandDefinition, trigger: PromptInputCommandTrigger) => void;
|
|
497
512
|
emptyMessage?: React.ReactNode;
|
|
498
513
|
mentionEmptyMessage?: React.ReactNode;
|
|
499
514
|
}
|
|
500
515
|
/**
|
|
501
|
-
*
|
|
516
|
+
* Shared-draft composer field with slash-command and mention discovery.
|
|
502
517
|
* Selection inserts a special href into the draft — not a chip button.
|
|
503
518
|
*/
|
|
504
519
|
declare function PromptInputCommandComposer({
|
|
505
520
|
commands,
|
|
506
521
|
mentionCommands,
|
|
507
|
-
value,
|
|
508
|
-
onValueChange,
|
|
509
522
|
onCommandSelect,
|
|
510
523
|
emptyMessage,
|
|
511
524
|
mentionEmptyMessage,
|
|
@@ -550,4 +563,4 @@ declare function PromptInputContextSelector({
|
|
|
550
563
|
action
|
|
551
564
|
}: PromptInputContextSelectorProps): React.JSX.Element;
|
|
552
565
|
//#endregion
|
|
553
|
-
export {
|
|
566
|
+
export { PromptInputProviderProps as $, PromptInputContextItem as A, PromptInputHeader as B, PromptInputButtonProps as C, composerLinksToReferences as Ct, PromptInputCommandDefinition as D, PromptInputCommandComposerProps as E, PromptInputDictationProps as F, PromptInputHoverCardProps as G, PromptInputHoverCard as H, PromptInputFooter as I, PromptInputMessage as J, PromptInputHoverCardTrigger as K, PromptInputFooterEnd as L, PromptInputContextSelectorProps as M, PromptInputControllerProps as N, PromptInputCommandTrigger as O, PromptInputDictation as P, PromptInputProvider as Q, PromptInputFooterEndProps as R, PromptInputButton as S, TooltipSide as St, PromptInputCommandComposer as T, usePromptInputController as Tt, PromptInputHoverCardContent as U, PromptInputHeaderProps as V, PromptInputHoverCardContentProps as W, PromptInputPermissionSelectorProps as X, PromptInputPermissionSelector as Y, PromptInputProps as Z, PromptInputAttachmentProps as _, PromptInputTooltipConfig as _t, PromptInputActionAddAttachmentsProps as a, PromptInputTabBodyProps as at, PromptInputBody as b, PromptInputVoiceInput as bt, PromptInputActionMenu as c, PromptInputTabLabel as ct, PromptInputActionMenuItem as d, PromptInputTabsList as dt, PromptInputReference as et, PromptInputActionMenuItemProps as f, PromptInputTabsListProps as ft, PromptInputAttachment as g, PromptInputToolsProps as gt, PromptInputActionMenuTriggerProps as h, PromptInputTools as ht, PromptInputActionAddAttachments as i, PromptInputTabBody as it, PromptInputContextSelector as j, PromptInputContextAction as k, PromptInputActionMenuContent as l, PromptInputTabLabelProps as lt, PromptInputActionMenuTrigger as m, PromptInputTextareaProps as mt, PermissionMode as n, PromptInputSubmitProps as nt, PromptInputActionAddScreenshot as o, PromptInputTabItem as ot, PromptInputActionMenuProps as p, PromptInputTextarea as pt, PromptInputHoverCardTriggerProps as q, PromptInput as r, PromptInputTab as rt, PromptInputActionAddScreenshotProps as s, PromptInputTabItemProps as st, AttachmentsContext as t, PromptInputSubmit as tt, PromptInputActionMenuContentProps as u, PromptInputTabProps as ut, PromptInputAttachments as v, PromptInputTray as vt, PromptInputButtonTooltip as w, usePromptInputAttachments as wt, PromptInputBodyProps as x, TextInputContext as xt, PromptInputAttachmentsProps as y, PromptInputTrayProps as yt, PromptInputFooterProps as z };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ChatAddToolApproveResponseFunction, DynamicToolUIPart, ToolUIPart, UIMessage } from "ai";
|
|
3
|
+
import { PendingApproval, Think } from "@cloudflare/think";
|
|
4
|
+
import { AgentStub } from "agents/client";
|
|
5
|
+
|
|
6
|
+
//#region src/components/agents-sdk/PromptInputApproval.d.ts
|
|
7
|
+
/** The id a response must carry: the approval id, or the paused run's executionId. */
|
|
8
|
+
declare function getApprovalRequestId(part: ToolUIPart | DynamicToolUIPart): string | undefined;
|
|
9
|
+
/** Component-local identity: paused executions can ask for multiple approvals. */
|
|
10
|
+
declare function getApprovalStateKey(part: ToolUIPart | DynamicToolUIPart): string | undefined;
|
|
11
|
+
/** Derives pending tool approvals straight from the messages — no app-owned shapes. */
|
|
12
|
+
declare function getPendingToolApprovals(messages: readonly UIMessage[], {
|
|
13
|
+
pausedExecutions
|
|
14
|
+
}?: {
|
|
15
|
+
pausedExecutions?: boolean;
|
|
16
|
+
}): Array<ToolUIPart | DynamicToolUIPart>;
|
|
17
|
+
interface PromptInputApprovalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "part"> {
|
|
18
|
+
part?: ToolUIPart | DynamicToolUIPart;
|
|
19
|
+
approval?: PendingApproval;
|
|
20
|
+
onRespond?: ChatAddToolApproveResponseFunction;
|
|
21
|
+
thinkStub?: AgentStub<Think>;
|
|
22
|
+
onExecutionSettled?: () => void | Promise<void>;
|
|
23
|
+
onSkip?: () => void;
|
|
24
|
+
question?: React.ReactNode;
|
|
25
|
+
count?: number;
|
|
26
|
+
}
|
|
27
|
+
/** Adapts AI SDK and Think approval states into the prompt-input approval surface. */
|
|
28
|
+
declare function PromptInputApproval({
|
|
29
|
+
part,
|
|
30
|
+
approval: durableApproval,
|
|
31
|
+
onRespond,
|
|
32
|
+
thinkStub,
|
|
33
|
+
onExecutionSettled,
|
|
34
|
+
onSkip,
|
|
35
|
+
question,
|
|
36
|
+
count,
|
|
37
|
+
className,
|
|
38
|
+
ref,
|
|
39
|
+
...props
|
|
40
|
+
}: PromptInputApprovalProps & {
|
|
41
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
42
|
+
}): React.JSX.Element | null;
|
|
43
|
+
//#endregion
|
|
44
|
+
export { getPendingToolApprovals as a, getApprovalStateKey as i, PromptInputApprovalProps as n, getApprovalRequestId as r, PromptInputApproval as t };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Separator } from "@base-ui/react/separator";
|
|
3
|
+
|
|
4
|
+
//#region src/components/foundations/Separator.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Props for the Separator component.
|
|
7
|
+
*/
|
|
8
|
+
interface SeparatorProps extends React.ComponentPropsWithRef<typeof Separator> {
|
|
9
|
+
/**
|
|
10
|
+
* Whether the separator is purely visual.
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
decorative?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A visual divider component that separates content sections.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <Separator />
|
|
21
|
+
*
|
|
22
|
+
* <nav style={{ display: 'flex', alignItems: 'center' }}>
|
|
23
|
+
* <a href="/home">Home</a>
|
|
24
|
+
* <Separator orientation="vertical" />
|
|
25
|
+
* <a href="/about">About</a>
|
|
26
|
+
* </nav>
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @see {@link https://base-ui.com/react/components/separator | Base UI Separator}
|
|
30
|
+
*/
|
|
31
|
+
declare function Separator$1({
|
|
32
|
+
orientation,
|
|
33
|
+
decorative,
|
|
34
|
+
className,
|
|
35
|
+
ref,
|
|
36
|
+
...props
|
|
37
|
+
}: SeparatorProps & {
|
|
38
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
39
|
+
}): React.JSX.Element;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { SeparatorProps as n, Separator$1 as t };
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Toolbar } from "@base-ui/react/toolbar";
|
|
3
|
+
|
|
4
|
+
//#region src/components/foundations/Toolbar.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Props for the Toolbar.Root component.
|
|
7
|
+
*/
|
|
8
|
+
interface ToolbarRootProps extends Omit<React.ComponentPropsWithoutRef<typeof Toolbar.Root>, "disabled"> {
|
|
9
|
+
/** Disables every interactive control managed by this toolbar. */
|
|
10
|
+
disabled?: React.ComponentPropsWithoutRef<typeof Toolbar.Root>["disabled"];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Props for the Toolbar.Button component.
|
|
14
|
+
*/
|
|
15
|
+
interface ToolbarButtonProps extends React.ComponentPropsWithoutRef<typeof Toolbar.Button> {
|
|
16
|
+
/** Skip the default Button chrome when a composed control owns its visuals. */
|
|
17
|
+
unstyled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Props for the Toolbar.Link component.
|
|
21
|
+
*/
|
|
22
|
+
interface ToolbarLinkProps extends React.ComponentPropsWithoutRef<typeof Toolbar.Link> {
|
|
23
|
+
/** Skip the default Button chrome when a composed link owns its visuals. */
|
|
24
|
+
unstyled?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Props for the Toolbar.Group component.
|
|
28
|
+
*/
|
|
29
|
+
interface ToolbarGroupProps extends React.ComponentPropsWithoutRef<typeof Toolbar.Group> {}
|
|
30
|
+
/**
|
|
31
|
+
* Props for the Toolbar.Separator component.
|
|
32
|
+
*/
|
|
33
|
+
interface ToolbarSeparatorProps extends React.ComponentPropsWithoutRef<typeof Toolbar.Separator> {}
|
|
34
|
+
/**
|
|
35
|
+
* Props for the Toolbar.Input component.
|
|
36
|
+
*/
|
|
37
|
+
interface ToolbarInputProps extends React.ComponentPropsWithoutRef<typeof Toolbar.Input> {}
|
|
38
|
+
/**
|
|
39
|
+
* Container for grouping toolbar buttons and controls.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* <Toolbar.Root>
|
|
44
|
+
* <Toolbar.Button>Bold</Toolbar.Button>
|
|
45
|
+
* <Toolbar.Button>Italic</Toolbar.Button>
|
|
46
|
+
* <Toolbar.Separator />
|
|
47
|
+
* <Toolbar.Button>Align Left</Toolbar.Button>
|
|
48
|
+
* </Toolbar.Root>
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @see {@link https://base-ui.com/react/components/toolbar | Base UI Toolbar}
|
|
52
|
+
*/
|
|
53
|
+
declare function ToolbarRoot({
|
|
54
|
+
className,
|
|
55
|
+
ref,
|
|
56
|
+
...props
|
|
57
|
+
}: ToolbarRootProps & {
|
|
58
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
|
|
59
|
+
}): React.JSX.Element;
|
|
60
|
+
/**
|
|
61
|
+
* A clickable button within the toolbar.
|
|
62
|
+
*/
|
|
63
|
+
declare function ToolbarButton({
|
|
64
|
+
unstyled,
|
|
65
|
+
className,
|
|
66
|
+
ref,
|
|
67
|
+
...props
|
|
68
|
+
}: ToolbarButtonProps & {
|
|
69
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
70
|
+
}): React.JSX.Element;
|
|
71
|
+
/**
|
|
72
|
+
* A link element within the toolbar.
|
|
73
|
+
*/
|
|
74
|
+
declare function ToolbarLink({
|
|
75
|
+
unstyled,
|
|
76
|
+
className,
|
|
77
|
+
ref,
|
|
78
|
+
...props
|
|
79
|
+
}: ToolbarLinkProps & {
|
|
80
|
+
ref?: React.Ref<HTMLAnchorElement>;
|
|
81
|
+
}): React.JSX.Element;
|
|
82
|
+
/**
|
|
83
|
+
* Groups toolbar items together.
|
|
84
|
+
*/
|
|
85
|
+
declare function ToolbarGroup({
|
|
86
|
+
className,
|
|
87
|
+
ref,
|
|
88
|
+
...props
|
|
89
|
+
}: ToolbarGroupProps & {
|
|
90
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
91
|
+
}): React.JSX.Element;
|
|
92
|
+
/**
|
|
93
|
+
* Visual separator between toolbar sections.
|
|
94
|
+
*/
|
|
95
|
+
declare function ToolbarSeparator({
|
|
96
|
+
className,
|
|
97
|
+
ref,
|
|
98
|
+
...props
|
|
99
|
+
}: ToolbarSeparatorProps & {
|
|
100
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
101
|
+
}): React.JSX.Element;
|
|
102
|
+
/**
|
|
103
|
+
* Input element within the toolbar.
|
|
104
|
+
*/
|
|
105
|
+
declare function ToolbarInput({
|
|
106
|
+
className,
|
|
107
|
+
ref,
|
|
108
|
+
...props
|
|
109
|
+
}: ToolbarInputProps & {
|
|
110
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
111
|
+
}): React.JSX.Element;
|
|
112
|
+
/**
|
|
113
|
+
* A container for grouping buttons and controls.
|
|
114
|
+
* Provides keyboard navigation between items.
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* ```tsx
|
|
118
|
+
* // Text formatting toolbar
|
|
119
|
+
* <Toolbar.Root>
|
|
120
|
+
* <Toolbar.Group>
|
|
121
|
+
* <Toolbar.Button>Bold</Toolbar.Button>
|
|
122
|
+
* <Toolbar.Button>Italic</Toolbar.Button>
|
|
123
|
+
* <Toolbar.Button>Underline</Toolbar.Button>
|
|
124
|
+
* </Toolbar.Group>
|
|
125
|
+
* <Toolbar.Separator />
|
|
126
|
+
* <Toolbar.Group>
|
|
127
|
+
* <Toolbar.Button>Left</Toolbar.Button>
|
|
128
|
+
* <Toolbar.Button>Center</Toolbar.Button>
|
|
129
|
+
* <Toolbar.Button>Right</Toolbar.Button>
|
|
130
|
+
* </Toolbar.Group>
|
|
131
|
+
* </Toolbar.Root>
|
|
132
|
+
* ```
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```tsx
|
|
136
|
+
* // Vertical toolbar
|
|
137
|
+
* <Toolbar.Root orientation="vertical">
|
|
138
|
+
* <Toolbar.Button>Item 1</Toolbar.Button>
|
|
139
|
+
* <Toolbar.Button>Item 2</Toolbar.Button>
|
|
140
|
+
* <Toolbar.Button>Item 3</Toolbar.Button>
|
|
141
|
+
* </Toolbar.Root>
|
|
142
|
+
* ```
|
|
143
|
+
*
|
|
144
|
+
* @see {@link https://base-ui.com/react/components/toolbar | Base UI Toolbar}
|
|
145
|
+
*/
|
|
146
|
+
declare const Toolbar$1: {
|
|
147
|
+
Root: typeof ToolbarRoot;
|
|
148
|
+
Button: typeof ToolbarButton;
|
|
149
|
+
Link: typeof ToolbarLink;
|
|
150
|
+
Group: typeof ToolbarGroup;
|
|
151
|
+
Separator: typeof ToolbarSeparator;
|
|
152
|
+
Input: typeof ToolbarInput;
|
|
153
|
+
};
|
|
154
|
+
//#endregion
|
|
155
|
+
export { ToolbarLinkProps as a, ToolbarInputProps as i, ToolbarButtonProps as n, ToolbarRootProps as o, ToolbarGroupProps as r, ToolbarSeparatorProps as s, Toolbar$1 as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as WorkspaceMediaInfo, i as WorkspaceFileState, r as WorkspaceFileAssetResolver, t as WorkspaceFileAsset } from "./WorkspaceFile-
|
|
2
|
-
import { DataTag, QueryKey, UnusedSkipTokenOptions } from "@tanstack/react-query";
|
|
1
|
+
import { a as WorkspaceMediaInfo, i as WorkspaceFileState, r as WorkspaceFileAssetResolver, t as WorkspaceFileAsset } from "./WorkspaceFile-Bouauobc.js";
|
|
2
|
+
import { DataTag, QueryClient, QueryKey, UnusedSkipTokenOptions } from "@tanstack/react-query";
|
|
3
3
|
import { FileInfo, Workspace, WorkspaceFsLike } from "@cloudflare/shell";
|
|
4
4
|
|
|
5
5
|
//#region src/components/agents-sdk/Workspace.d.ts
|
|
@@ -85,6 +85,7 @@ declare function workspaceDirectoryQueryKey(sourceKey: string, root: string, pat
|
|
|
85
85
|
type WorkspaceDirectoryQueryKey = ReturnType<typeof workspaceDirectoryQueryKey>;
|
|
86
86
|
declare function workspaceFileQueryKey(sourceKey: string, root: string, requestedPath: string): readonly ["workspace", string, string, "file", string];
|
|
87
87
|
type WorkspaceFileQueryKey = ReturnType<typeof workspaceFileQueryKey>;
|
|
88
|
+
declare function workspaceInfoQueryKey(sourceKey: string, root: string): readonly ["workspace", string, string, "info"];
|
|
88
89
|
declare function workspaceFileVersion(target: WorkspaceFileReadTarget): {
|
|
89
90
|
readonly path: string;
|
|
90
91
|
readonly name: string;
|
|
@@ -121,6 +122,16 @@ declare function workspaceFileAssetQueryOptions(sourceKey: string, root: string,
|
|
|
121
122
|
declare function workspaceTextFileQueryOptions(source: WorkspaceSource, sourceKey: string, root: string, target: WorkspaceFileReadTarget): WorkspaceTextFileQueryOptions;
|
|
122
123
|
/** Active-file-only buffered asset options, scoped to the validated stat result. */
|
|
123
124
|
declare function workspaceBinaryFileQueryOptions(source: WorkspaceSource, sourceKey: string, root: string, target: WorkspaceFileReadTarget, maxInlineAssetBytes: number): WorkspaceBinaryFileQueryOptions;
|
|
125
|
+
declare function refreshWorkspaceFileQueries(queryClient: QueryClient, {
|
|
126
|
+
source,
|
|
127
|
+
sourceKey,
|
|
128
|
+
root,
|
|
129
|
+
selectedPath,
|
|
130
|
+
resolveFileAsset,
|
|
131
|
+
maxInlineAssetBytes
|
|
132
|
+
}: Pick<UseWorkspaceOptions, "source" | "sourceKey" | "selectedPath" | "resolveFileAsset" | "maxInlineAssetBytes"> & {
|
|
133
|
+
root: string;
|
|
134
|
+
}): Promise<void>;
|
|
124
135
|
/**
|
|
125
136
|
* Headless state for browsing a Think workspace. TanStack Query owns remote
|
|
126
137
|
* directory, metadata, resolver, text, and byte lifecycles; the route owns
|
|
@@ -136,4 +147,4 @@ declare function useWorkspace({
|
|
|
136
147
|
maxInlineAssetBytes
|
|
137
148
|
}: UseWorkspaceOptions): WorkspaceState;
|
|
138
149
|
//#endregion
|
|
139
|
-
export {
|
|
150
|
+
export { workspaceFileQueryKey as A, refreshWorkspaceFileQueries as C, workspaceDirectoryQueryOptions as D, workspaceDirectoryQueryKey as E, workspaceTextFileQueryOptions as F, workspaceInfoQueryKey as M, workspaceInfoQueryOptions as N, workspaceDirectoryQueryPrefix as O, workspaceQueryKey as P, WorkspaceTextFileQueryOptions as S, workspaceBinaryFileQueryOptions as T, WorkspaceQueryOptions as _, WorkspaceDirectoryQueryOptions as a, WorkspaceState as b, WorkspaceFileQueryKey as c, WorkspaceFileStatQueryOptions as d, WorkspaceFileVersion as f, WorkspaceQueryKey as g, WorkspaceInfoQueryOptions as h, WorkspaceDirectoryQueryKey as i, workspaceFileStatQueryOptions as j, workspaceFileAssetQueryOptions as k, WorkspaceFileReadTarget as l, WorkspaceInfoQueryKey as m, WorkspaceBinaryFileQueryKey as n, WorkspaceFileAssetQueryKey as o, WorkspaceInfo as p, WorkspaceBinaryFileQueryOptions as r, WorkspaceFileAssetQueryOptions as s, UseWorkspaceOptions as t, WorkspaceFileStatQueryKey as u, WorkspaceResolvedAsset as v, useWorkspace as w, WorkspaceTextFileQueryKey as x, WorkspaceSource as y };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { b as EyeIcon, d as CheckIcon, et as WarningIcon, k as MaximizeIcon, m as CodeIcon, r as ArrowLeftIcon, v as DownloadIcon } from "./icons-cuEtsgj9.js";
|
|
2
2
|
import { i as formatClock } from "./format-COCyV98Z.js";
|
|
3
3
|
import { AppTopBar } from "./components/general-purpose/AppTopBar.js";
|
|
4
|
-
import { a as CodeBlockCopyButton, i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "./CodeBlock-
|
|
4
|
+
import { a as CodeBlockCopyButton, i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "./CodeBlock-g8sADidM.js";
|
|
5
5
|
import { inferWorkspaceLanguage, inferWorkspaceMedia, isWorkspaceMarkdownPath, isWorkspaceSkillPath, parseWorkspaceSkill } from "./components/agents-sdk/WorkspaceFile.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { i as useWorkspaceNavigationContext } from "./WorkspaceLink-BYZG-V_I.js";
|
|
7
|
+
import { useWorkspaceNavigationRestoration } from "./components/agents-sdk/WorkspaceNavigationRestoration.js";
|
|
8
|
+
import { n as WorkspaceMessageResponse, r as createWorkspaceRehypePlugins } from "./WorkspaceMessageResponse-CUJk9_P5.js";
|
|
8
9
|
import { WorkspaceHeader } from "./components/agents-sdk/WorkspaceHeader.js";
|
|
9
10
|
import * as React from "react";
|
|
10
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
2
|
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "./navigation-link-kqMa81v5.js";
|
|
3
|
+
import { useWorkspaceNavigationRestoration } from "./components/agents-sdk/WorkspaceNavigationRestoration.js";
|
|
3
4
|
import { n as isWorkspacePathWithinRoot, t as canonicalizeAbsoluteWorkspacePath } from "./workspace-path-L_KmjRjq.js";
|
|
4
5
|
import * as React from "react";
|
|
5
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -9,90 +10,6 @@ function useWorkspaceNavigationContext() {
|
|
|
9
10
|
return React.use(WorkspaceNavigationContext);
|
|
10
11
|
}
|
|
11
12
|
//#endregion
|
|
12
|
-
//#region src/components/_internal/workspace-navigation-restoration.tsx
|
|
13
|
-
const WorkspaceNavigationRestorationContext = React.createContext(null);
|
|
14
|
-
/**
|
|
15
|
-
* Owns entry-keyed presentation state unless an ancestor already provides it.
|
|
16
|
-
* This lets a full application share restoration between chat and files while
|
|
17
|
-
* keeping a standalone WorkspaceExplorer self-contained.
|
|
18
|
-
*/
|
|
19
|
-
function WorkspaceNavigationRestorationBoundary({ children }) {
|
|
20
|
-
const parent = React.use(WorkspaceNavigationRestorationContext);
|
|
21
|
-
const restorationsRef = React.useRef(/* @__PURE__ */ new Map());
|
|
22
|
-
const localValue = React.useMemo(() => ({
|
|
23
|
-
get: (entryKey) => restorationsRef.current.get(entryKey),
|
|
24
|
-
recordFocus: (entryKey, destination, scope) => {
|
|
25
|
-
const current = restorationsRef.current.get(entryKey);
|
|
26
|
-
restorationsRef.current.set(entryKey, {
|
|
27
|
-
...current,
|
|
28
|
-
focusDestination: destination,
|
|
29
|
-
focusScope: scope
|
|
30
|
-
});
|
|
31
|
-
},
|
|
32
|
-
recordScroll: (entryKey, scrollTop) => {
|
|
33
|
-
const current = restorationsRef.current.get(entryKey);
|
|
34
|
-
restorationsRef.current.set(entryKey, {
|
|
35
|
-
...current,
|
|
36
|
-
scrollTop
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}), []);
|
|
40
|
-
if (parent) return children;
|
|
41
|
-
return /* @__PURE__ */ jsx(WorkspaceNavigationRestorationContext, {
|
|
42
|
-
value: localValue,
|
|
43
|
-
children
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
function findDestinationLink(root, destination) {
|
|
47
|
-
if (destination.kind !== "file") return null;
|
|
48
|
-
return [...root.querySelectorAll("[data-workspace-link=\"file\"]")].find((candidate) => candidate.dataset.workspacePath === destination.path && (candidate.dataset.workspaceDestinationFragment || null) === destination.fragment) ?? null;
|
|
49
|
-
}
|
|
50
|
-
/** Restores a link in a named surface, including when that surface renders asynchronously. */
|
|
51
|
-
function WorkspaceNavigationFocusRestorer({ entryKey, rootRef, scope }) {
|
|
52
|
-
const restoration = useWorkspaceNavigationRestoration();
|
|
53
|
-
const handledEntryRef = React.useRef(null);
|
|
54
|
-
React.useEffect(() => {
|
|
55
|
-
if (handledEntryRef.current !== entryKey) handledEntryRef.current = null;
|
|
56
|
-
if (handledEntryRef.current === entryKey) return;
|
|
57
|
-
const saved = restoration?.get(entryKey);
|
|
58
|
-
if (!saved?.focusDestination || saved.focusScope !== scope) return;
|
|
59
|
-
const focusDestination = saved.focusDestination;
|
|
60
|
-
const root = rootRef.current;
|
|
61
|
-
if (!root) return;
|
|
62
|
-
const restore = () => {
|
|
63
|
-
const surface = [...root.matches("[data-workspace-restoration-scope]") ? [root] : [], ...root.querySelectorAll("[data-workspace-restoration-scope]")].find((candidate) => candidate.dataset.workspaceRestorationScope === scope);
|
|
64
|
-
const target = surface ? findDestinationLink(surface, focusDestination) : null;
|
|
65
|
-
if (!target) return false;
|
|
66
|
-
target.focus({ preventScroll: true });
|
|
67
|
-
handledEntryRef.current = entryKey;
|
|
68
|
-
return true;
|
|
69
|
-
};
|
|
70
|
-
if (restore()) return;
|
|
71
|
-
const observer = new MutationObserver(() => {
|
|
72
|
-
if (restore()) observer.disconnect();
|
|
73
|
-
});
|
|
74
|
-
observer.observe(root, {
|
|
75
|
-
childList: true,
|
|
76
|
-
subtree: true
|
|
77
|
-
});
|
|
78
|
-
return () => observer.disconnect();
|
|
79
|
-
}, [
|
|
80
|
-
entryKey,
|
|
81
|
-
restoration,
|
|
82
|
-
rootRef,
|
|
83
|
-
scope
|
|
84
|
-
]);
|
|
85
|
-
return null;
|
|
86
|
-
}
|
|
87
|
-
function useWorkspaceNavigationRestoration() {
|
|
88
|
-
return React.use(WorkspaceNavigationRestorationContext);
|
|
89
|
-
}
|
|
90
|
-
function useRequiredWorkspaceNavigationRestoration() {
|
|
91
|
-
const restoration = useWorkspaceNavigationRestoration();
|
|
92
|
-
if (!restoration) throw new Error("Workspace navigation restoration is unavailable outside its boundary.");
|
|
93
|
-
return restoration;
|
|
94
|
-
}
|
|
95
|
-
//#endregion
|
|
96
13
|
//#region src/components/agents-sdk/WorkspaceLink.tsx
|
|
97
14
|
const EXTERNAL_PROTOCOLS = /* @__PURE__ */ new Set([
|
|
98
15
|
"http:",
|
|
@@ -227,9 +144,9 @@ function UnavailableWorkspaceLink({ children, className }) {
|
|
|
227
144
|
"aria-hidden": "true",
|
|
228
145
|
children: "↛"
|
|
229
146
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
-
className: "
|
|
232
|
-
children:
|
|
147
|
+
/* @__PURE__ */ jsx("span", {
|
|
148
|
+
className: "sigvelo-visually-hidden",
|
|
149
|
+
children: " (link unavailable)"
|
|
233
150
|
})
|
|
234
151
|
]
|
|
235
152
|
});
|
|
@@ -276,9 +193,9 @@ function WorkspaceFileLink({ children, className, download, href = "", node, onC
|
|
|
276
193
|
className: "workspace-link__external-mark",
|
|
277
194
|
"aria-hidden": "true",
|
|
278
195
|
children: "↗"
|
|
279
|
-
}), /* @__PURE__ */
|
|
280
|
-
className: "
|
|
281
|
-
children:
|
|
196
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
197
|
+
className: "sigvelo-visually-hidden",
|
|
198
|
+
children: " (opens in a new tab)"
|
|
282
199
|
})] }) : null]
|
|
283
200
|
});
|
|
284
201
|
}
|
|
@@ -304,4 +221,4 @@ function WorkspaceFileLink({ children, className, download, href = "", node, onC
|
|
|
304
221
|
});
|
|
305
222
|
}
|
|
306
223
|
//#endregion
|
|
307
|
-
export {
|
|
224
|
+
export { useWorkspaceNavigationContext as i, WorkspaceNavigationProvider as n, resolveWorkspaceLink as r, WorkspaceFileLink as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MessageResponse } from "./components/ai-sdk/Message.js";
|
|
2
|
-
import {
|
|
2
|
+
import { i as useWorkspaceNavigationContext, r as resolveWorkspaceLink, t as WorkspaceFileLink } from "./WorkspaceLink-BYZG-V_I.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { defaultRehypePlugins } from "streamdown";
|
|
@@ -86,7 +86,7 @@ const WorkspaceFileRendererContext = React.createContext(null);
|
|
|
86
86
|
* paragraph, not by the response component, so a host handing down a fresh
|
|
87
87
|
* callback every render re-renders only the paragraphs — the memoized Markdown
|
|
88
88
|
* pipeline is untouched and promoted cards keep their state.
|
|
89
|
-
* `ThinkChat.
|
|
89
|
+
* `ThinkChat.MessageContent` provides it from its `renderWorkspaceFile` prop; hosts
|
|
90
90
|
* composing `WorkspaceMessageResponse` directly provide it once at their
|
|
91
91
|
* conversation root.
|
|
92
92
|
*/
|
|
@@ -122,7 +122,10 @@ function WorkspaceFileParagraph({ node, children, ...paragraphProps }) {
|
|
|
122
122
|
const promoted = renderFile({
|
|
123
123
|
label: file.label,
|
|
124
124
|
path: file.path,
|
|
125
|
-
sourceLink: /* @__PURE__ */ jsx(WorkspaceFileLink, {
|
|
125
|
+
sourceLink: /* @__PURE__ */ jsx(WorkspaceFileLink, {
|
|
126
|
+
href: file.path,
|
|
127
|
+
children: file.label
|
|
128
|
+
})
|
|
126
129
|
});
|
|
127
130
|
if (promoted == null) return renderFallbackParagraph(children);
|
|
128
131
|
const remainingChildren = React.Children.toArray(children).filter((_child, index) => index !== file.childIndex);
|