@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,32 +1,38 @@
|
|
|
1
1
|
import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-k8bpyXqt.js";
|
|
2
|
+
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
2
3
|
import * as React from "react";
|
|
4
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
5
|
import { DataTag, UnusedSkipTokenOptions } from "@tanstack/react-query";
|
|
4
6
|
import { Think, ThinkSubmissionInspection } from "@cloudflare/think";
|
|
5
7
|
import { AgentStub } from "agents/client";
|
|
6
8
|
import { WorkflowPage } from "agents/workflows";
|
|
7
9
|
|
|
10
|
+
//#region src/components/_internal/navigation-link.d.ts
|
|
11
|
+
interface NavigationLinkProps extends Omit<useRender.ComponentProps<"a">, "render"> {
|
|
12
|
+
/** App-authored TanStack Router Link with its destination already type-checked. */
|
|
13
|
+
render: React.ReactElement;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Merges design-system anchor props into an application-owned router Link.
|
|
17
|
+
*
|
|
18
|
+
* Keeping the Link element at the call site lets the consuming application's
|
|
19
|
+
* registered route tree infer `to`, `params`, and `search` without routing
|
|
20
|
+
* generics leaking through every design-system component.
|
|
21
|
+
*/
|
|
22
|
+
declare function NavigationLink({
|
|
23
|
+
render,
|
|
24
|
+
ref,
|
|
25
|
+
...props
|
|
26
|
+
}: NavigationLinkProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
27
|
+
//#endregion
|
|
8
28
|
//#region src/components/agents-sdk/ThinkExecutionWorkbench.d.ts
|
|
9
|
-
interface
|
|
10
|
-
/** Agents SDK client stub
|
|
29
|
+
interface ThinkExecutionWorkbenchRootProps extends useRender.ComponentProps<"div"> {
|
|
30
|
+
/** Whole Agents SDK client stub; native submission/workflow methods remain unchanged. */
|
|
11
31
|
source: AgentStub<Think>;
|
|
12
|
-
/**
|
|
13
|
-
* Stable, serializable identity for the remote Think agent. It must change
|
|
14
|
-
* when `source` points at a different agent and must not contain credentials.
|
|
15
|
-
*/
|
|
32
|
+
/** Stable, non-secret remote agent identity; change with the backing source. */
|
|
16
33
|
sourceKey: string;
|
|
17
|
-
|
|
18
|
-
backButton?: React.ReactNode;
|
|
34
|
+
/** Maximum submissions and workflows requested per page. */
|
|
19
35
|
pageSize?: number;
|
|
20
|
-
/** Whole native execution selected by the application route. */
|
|
21
|
-
selectedRun: ThinkExecutionRun | null;
|
|
22
|
-
/** Returns an application-authored TanStack Router Link for the run. */
|
|
23
|
-
renderRunLink: (run: ThinkExecutionRun) => React.ReactElement;
|
|
24
|
-
/**
|
|
25
|
-
* Returns an application-authored TanStack Router Link back to the run
|
|
26
|
-
* list. A selected run replaces the list — the workspace drill-in pattern —
|
|
27
|
-
* so this link is the way back out.
|
|
28
|
-
*/
|
|
29
|
-
renderRunsLink: () => React.ReactElement;
|
|
30
36
|
}
|
|
31
37
|
interface ThinkExecutionRunsData {
|
|
32
38
|
submissions: readonly ThinkSubmissionInspection[];
|
|
@@ -48,20 +54,71 @@ declare function thinkExecutionRunsQueryOptions(source: AgentStub<Think>, source
|
|
|
48
54
|
* not normalize execution records or own workflow authoring. Its first
|
|
49
55
|
* uncached list read suspends to the consuming route's Suspense boundary.
|
|
50
56
|
*/
|
|
51
|
-
declare function
|
|
52
|
-
backButton,
|
|
53
|
-
className,
|
|
57
|
+
declare function ThinkExecutionWorkbenchRoot({
|
|
54
58
|
pageSize,
|
|
59
|
+
render,
|
|
55
60
|
ref,
|
|
56
|
-
renderRunLink,
|
|
57
|
-
renderRunsLink,
|
|
58
|
-
selectedRun,
|
|
59
61
|
source,
|
|
60
62
|
sourceKey,
|
|
61
|
-
title,
|
|
62
63
|
...props
|
|
63
|
-
}:
|
|
64
|
-
|
|
64
|
+
}: ThinkExecutionWorkbenchRootProps): React.JSX.Element;
|
|
65
|
+
/** Caller-authored toolbar; no title, navigation, or action is injected. */
|
|
66
|
+
declare function ThinkExecutionWorkbenchHeader({
|
|
67
|
+
className,
|
|
68
|
+
"aria-label": label,
|
|
69
|
+
...props
|
|
70
|
+
}: Omit<React.ComponentProps<typeof AppTopBar.Root>, "aria-label"> & {
|
|
71
|
+
"aria-label"?: string;
|
|
65
72
|
}): React.JSX.Element;
|
|
73
|
+
declare function ThinkExecutionWorkbenchContent({
|
|
74
|
+
render,
|
|
75
|
+
ref,
|
|
76
|
+
...props
|
|
77
|
+
}: useRender.ComponentProps<"div">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
78
|
+
/** Refresh control retaining the complete AppTopBar button render/ref/event contract. */
|
|
79
|
+
declare function ThinkExecutionWorkbenchRefresh({
|
|
80
|
+
label,
|
|
81
|
+
...props
|
|
82
|
+
}: Omit<React.ComponentProps<typeof AppTopBar.Button>, "label"> & {
|
|
83
|
+
label?: string;
|
|
84
|
+
}): React.JSX.Element;
|
|
85
|
+
declare function ThinkExecutionWorkbenchError({
|
|
86
|
+
className,
|
|
87
|
+
...props
|
|
88
|
+
}: React.ComponentPropsWithRef<"div">): React.JSX.Element | null;
|
|
89
|
+
/** Controls for one whole native run; mount in a list row or a selected-run toolbar. */
|
|
90
|
+
declare function ThinkExecutionWorkbenchRunActions({
|
|
91
|
+
run
|
|
92
|
+
}: {
|
|
93
|
+
run: ThinkExecutionRun;
|
|
94
|
+
}): React.JSX.Element;
|
|
95
|
+
interface ThinkExecutionWorkbenchListProps extends Omit<React.ComponentPropsWithRef<"section">, "children"> {
|
|
96
|
+
/** Explicit row content; native execution identity and order come from the query. */
|
|
97
|
+
children: (run: ThinkExecutionRun) => React.ReactNode;
|
|
98
|
+
}
|
|
99
|
+
declare function ThinkExecutionWorkbenchList({
|
|
100
|
+
children,
|
|
101
|
+
className,
|
|
102
|
+
...props
|
|
103
|
+
}: ThinkExecutionWorkbenchListProps): React.JSX.Element;
|
|
104
|
+
interface ThinkExecutionWorkbenchRunLinkProps extends Omit<React.ComponentProps<typeof NavigationLink>, "children"> {
|
|
105
|
+
run: ThinkExecutionRun;
|
|
106
|
+
}
|
|
107
|
+
declare function ThinkExecutionWorkbenchRunLink({
|
|
108
|
+
run,
|
|
109
|
+
className,
|
|
110
|
+
...props
|
|
111
|
+
}: ThinkExecutionWorkbenchRunLinkProps): React.JSX.Element;
|
|
112
|
+
/** Native execution runtime with independently placed controls, rows, and route content. */
|
|
113
|
+
declare const ThinkExecutionWorkbench: {
|
|
114
|
+
Root: typeof ThinkExecutionWorkbenchRoot;
|
|
115
|
+
Header: typeof ThinkExecutionWorkbenchHeader;
|
|
116
|
+
Content: typeof ThinkExecutionWorkbenchContent;
|
|
117
|
+
Refresh: typeof ThinkExecutionWorkbenchRefresh;
|
|
118
|
+
Error: typeof ThinkExecutionWorkbenchError;
|
|
119
|
+
List: typeof ThinkExecutionWorkbenchList;
|
|
120
|
+
RunLink: typeof ThinkExecutionWorkbenchRunLink;
|
|
121
|
+
RunActions: typeof ThinkExecutionWorkbenchRunActions;
|
|
122
|
+
};
|
|
66
123
|
//#endregion
|
|
67
|
-
export { ThinkExecutionRunsData, ThinkExecutionRunsQueryKey, ThinkExecutionRunsQueryOptions, ThinkExecutionWorkbench,
|
|
124
|
+
export { ThinkExecutionRunsData, ThinkExecutionRunsQueryKey, ThinkExecutionRunsQueryOptions, ThinkExecutionWorkbench, ThinkExecutionWorkbenchListProps, ThinkExecutionWorkbenchRootProps, ThinkExecutionWorkbenchRunLinkProps, thinkExecutionRunsQueryOptions };
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { H as RefreshIcon, et as WarningIcon,
|
|
2
|
+
import { H as RefreshIcon, et as WarningIcon, y as EllipsisIcon } from "../../icons-cuEtsgj9.js";
|
|
3
3
|
import { buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
5
5
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
6
|
-
import { EmptyState } from "../foundations/EmptyState.js";
|
|
7
6
|
import { Menu } from "../foundations/Menu.js";
|
|
7
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
8
8
|
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
9
9
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
10
10
|
import { getThinkExecutionRunAccessibleName, getThinkExecutionRunId, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
11
11
|
import { ThinkExecutionRunSummary } from "./ThinkExecutionStatus.js";
|
|
12
|
-
import { ThinkExecutionDetail } from "./ThinkExecutionDetail.js";
|
|
13
12
|
import * as React from "react";
|
|
14
13
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
15
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
15
16
|
import { queryOptions, useMutation, useSuspenseQuery } from "@tanstack/react-query";
|
|
16
17
|
//#region src/components/agents-sdk/ThinkExecutionWorkbench.tsx
|
|
17
18
|
const executionPanelPageSize = 20;
|
|
19
|
+
const workbenchDefaults = {
|
|
20
|
+
className: "think-execution-workbench",
|
|
21
|
+
"data-recipe": "fill-host"
|
|
22
|
+
};
|
|
18
23
|
function isSubmissionCancelable(status) {
|
|
19
24
|
return status === "pending" || status === "running";
|
|
20
25
|
}
|
|
@@ -117,11 +122,8 @@ function thinkExecutionRunsQueryOptions(source, sourceKey, pageSize = executionP
|
|
|
117
122
|
* not normalize execution records or own workflow authoring. Its first
|
|
118
123
|
* uncached list read suspends to the consuming route's Suspense boundary.
|
|
119
124
|
*/
|
|
120
|
-
function
|
|
121
|
-
const
|
|
122
|
-
const runsOptions = thinkExecutionRunsQueryOptions(source, sourceKey, pageSize);
|
|
123
|
-
const runsQueryKey = thinkExecutionRunsScopeQueryKey(sourceKey);
|
|
124
|
-
const runsQuery = useSuspenseQuery(runsOptions);
|
|
125
|
+
function ThinkExecutionWorkbenchRoot({ pageSize = executionPanelPageSize, render, ref, source, sourceKey, ...props }) {
|
|
126
|
+
const runsQuery = useSuspenseQuery(thinkExecutionRunsQueryOptions(source, sourceKey, pageSize));
|
|
125
127
|
const actionMutation = useMutation({
|
|
126
128
|
mutationFn: ({ action }) => action(),
|
|
127
129
|
onSuccess: (_result, action, _onMutateResult, context) => context.client.invalidateQueries({ queryKey: action.runsQueryKey })
|
|
@@ -131,103 +133,158 @@ function ThinkExecutionWorkbench({ backButton, className, pageSize = executionPa
|
|
|
131
133
|
const busyAction = actionIsPending ? currentAction.key : runsQuery.isFetching ? "refresh" : null;
|
|
132
134
|
const error = currentAction && actionMutation.isError ? actionMutation.error : runsQuery.error;
|
|
133
135
|
const runs = React.useMemo(() => [...runsQuery.data.submissions, ...runsQuery.data.workflows.workflows].sort((first, second) => Number(second.createdAt) - Number(first.createdAt)), [runsQuery.data]);
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
const { mutate, reset } = actionMutation;
|
|
137
|
+
const { refetch } = runsQuery;
|
|
138
|
+
const busy = busyAction !== null;
|
|
139
|
+
const value = React.useMemo(() => ({
|
|
140
|
+
runs,
|
|
141
|
+
source,
|
|
142
|
+
actionIsPending,
|
|
143
|
+
busy,
|
|
144
|
+
error,
|
|
145
|
+
runAction: (key, action) => {
|
|
146
|
+
mutate({
|
|
147
|
+
action,
|
|
148
|
+
key,
|
|
149
|
+
runsQueryKey: thinkExecutionRunsScopeQueryKey(sourceKey),
|
|
150
|
+
source
|
|
151
|
+
});
|
|
152
|
+
},
|
|
153
|
+
refresh: () => {
|
|
154
|
+
reset();
|
|
155
|
+
refetch();
|
|
156
|
+
}
|
|
157
|
+
}), [
|
|
158
|
+
runs,
|
|
159
|
+
source,
|
|
160
|
+
sourceKey,
|
|
161
|
+
actionIsPending,
|
|
162
|
+
busy,
|
|
163
|
+
error,
|
|
164
|
+
mutate,
|
|
165
|
+
reset,
|
|
166
|
+
refetch
|
|
167
|
+
]);
|
|
168
|
+
const element = useRender({
|
|
169
|
+
defaultTagName: "div",
|
|
170
|
+
render,
|
|
143
171
|
ref,
|
|
144
|
-
|
|
145
|
-
|
|
172
|
+
props: mergeProps(workbenchDefaults, props)
|
|
173
|
+
});
|
|
174
|
+
return /* @__PURE__ */ jsx(WorkbenchContext.Provider, {
|
|
175
|
+
value,
|
|
176
|
+
children: element
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
const WorkbenchContext = React.createContext(null);
|
|
180
|
+
function useWorkbench() {
|
|
181
|
+
const value = React.useContext(WorkbenchContext);
|
|
182
|
+
if (!value) throw new Error("ThinkExecutionWorkbench parts require ThinkExecutionWorkbench.Root.");
|
|
183
|
+
return value;
|
|
184
|
+
}
|
|
185
|
+
/** Caller-authored toolbar; no title, navigation, or action is injected. */
|
|
186
|
+
function ThinkExecutionWorkbenchHeader({ className, "aria-label": label = "Run controls", ...props }) {
|
|
187
|
+
return /* @__PURE__ */ jsx(AppTopBar.Root, {
|
|
188
|
+
titleAlign: "start",
|
|
189
|
+
"aria-label": label,
|
|
146
190
|
...props,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
render: renderRunLink(run),
|
|
210
|
-
"data-slot": "button",
|
|
211
|
-
className: buttonVariants({
|
|
212
|
-
variant: "ghost",
|
|
213
|
-
color: "neutral",
|
|
214
|
-
size: "sm",
|
|
215
|
-
className: "think-execution-workbench__run"
|
|
216
|
-
}),
|
|
217
|
-
"aria-label": getThinkExecutionRunAccessibleName(run),
|
|
218
|
-
children: /* @__PURE__ */ jsx(ThinkExecutionRunSummary, { run })
|
|
219
|
-
}), /* @__PURE__ */ jsx(RunActions, {
|
|
220
|
-
busy: actionIsPending,
|
|
221
|
-
run,
|
|
222
|
-
source,
|
|
223
|
-
onAction: runAction
|
|
224
|
-
})] }, `${kind}:${id}`);
|
|
225
|
-
})
|
|
226
|
-
})]
|
|
227
|
-
})
|
|
191
|
+
className: cx("think-execution-workbench__header", className)
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
function ThinkExecutionWorkbenchContent({ render, ref, ...props }) {
|
|
195
|
+
const { busy } = useWorkbench();
|
|
196
|
+
return useRender({
|
|
197
|
+
defaultTagName: "div",
|
|
198
|
+
render,
|
|
199
|
+
ref,
|
|
200
|
+
props: mergeProps({
|
|
201
|
+
className: "think-execution-workbench__content",
|
|
202
|
+
"aria-busy": busy
|
|
203
|
+
}, props)
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/** Refresh control retaining the complete AppTopBar button render/ref/event contract. */
|
|
207
|
+
function ThinkExecutionWorkbenchRefresh({ label = "Refresh runs", ...props }) {
|
|
208
|
+
const { busy, refresh } = useWorkbench();
|
|
209
|
+
return /* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
210
|
+
...mergeProps({
|
|
211
|
+
label,
|
|
212
|
+
disabled: busy,
|
|
213
|
+
onClick: refresh,
|
|
214
|
+
children: /* @__PURE__ */ jsx(RefreshIcon, {})
|
|
215
|
+
}, {
|
|
216
|
+
...props,
|
|
217
|
+
label
|
|
218
|
+
}),
|
|
219
|
+
disabled: busy || props.disabled
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
function ThinkExecutionWorkbenchError({ className, ...props }) {
|
|
223
|
+
const { error } = useWorkbench();
|
|
224
|
+
return error ? /* @__PURE__ */ jsxs("div", {
|
|
225
|
+
role: "alert",
|
|
226
|
+
...props,
|
|
227
|
+
className: cx("think-execution-workbench__error", className),
|
|
228
|
+
children: [/* @__PURE__ */ jsx(WarningIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", { children: formatErrorMessage(error) })]
|
|
229
|
+
}) : null;
|
|
230
|
+
}
|
|
231
|
+
/** Controls for one whole native run; mount in a list row or a selected-run toolbar. */
|
|
232
|
+
function ThinkExecutionWorkbenchRunActions({ run }) {
|
|
233
|
+
const { source, actionIsPending, runAction } = useWorkbench();
|
|
234
|
+
return /* @__PURE__ */ jsx(RunActions, {
|
|
235
|
+
run,
|
|
236
|
+
source,
|
|
237
|
+
busy: actionIsPending,
|
|
238
|
+
onAction: runAction
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
function ThinkExecutionWorkbenchList({ children, className, ...props }) {
|
|
242
|
+
const { runs } = useWorkbench();
|
|
243
|
+
const runsId = React.useId();
|
|
244
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
245
|
+
"aria-labelledby": runsId,
|
|
246
|
+
...props,
|
|
247
|
+
className: cx("think-execution-workbench__run-list", className),
|
|
248
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
249
|
+
className: "think-execution-workbench__list-header",
|
|
250
|
+
children: /* @__PURE__ */ jsx("h3", {
|
|
251
|
+
id: runsId,
|
|
252
|
+
children: "Runs"
|
|
228
253
|
})
|
|
229
|
-
|
|
254
|
+
}), runs.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
|
|
255
|
+
className: "think-execution-workbench__empty",
|
|
256
|
+
description: "No runs yet."
|
|
257
|
+
}) : /* @__PURE__ */ jsx("ul", {
|
|
258
|
+
className: "think-execution-workbench__list",
|
|
259
|
+
role: "list",
|
|
260
|
+
children: runs.map((run) => /* @__PURE__ */ jsx("li", { children: children(run) }, `${isThinkSubmissionRun(run) ? "submission" : "workflow"}:${getThinkExecutionRunId(run)}`))
|
|
261
|
+
})]
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
function ThinkExecutionWorkbenchRunLink({ run, className, ...props }) {
|
|
265
|
+
return /* @__PURE__ */ jsx(NavigationLink, {
|
|
266
|
+
"data-slot": "button",
|
|
267
|
+
"aria-label": getThinkExecutionRunAccessibleName(run),
|
|
268
|
+
...props,
|
|
269
|
+
className: buttonVariants({
|
|
270
|
+
variant: "ghost",
|
|
271
|
+
color: "neutral",
|
|
272
|
+
size: "sm",
|
|
273
|
+
className: cx("think-execution-workbench__run", className)
|
|
274
|
+
}),
|
|
275
|
+
children: /* @__PURE__ */ jsx(ThinkExecutionRunSummary, { run })
|
|
230
276
|
});
|
|
231
277
|
}
|
|
278
|
+
/** Native execution runtime with independently placed controls, rows, and route content. */
|
|
279
|
+
const ThinkExecutionWorkbench = {
|
|
280
|
+
Root: ThinkExecutionWorkbenchRoot,
|
|
281
|
+
Header: ThinkExecutionWorkbenchHeader,
|
|
282
|
+
Content: ThinkExecutionWorkbenchContent,
|
|
283
|
+
Refresh: ThinkExecutionWorkbenchRefresh,
|
|
284
|
+
Error: ThinkExecutionWorkbenchError,
|
|
285
|
+
List: ThinkExecutionWorkbenchList,
|
|
286
|
+
RunLink: ThinkExecutionWorkbenchRunLink,
|
|
287
|
+
RunActions: ThinkExecutionWorkbenchRunActions
|
|
288
|
+
};
|
|
232
289
|
//#endregion
|
|
233
290
|
export { ThinkExecutionWorkbench, thinkExecutionRunsQueryOptions };
|
|
@@ -1,168 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-jtmveaRE.js";
|
|
3
|
-
import { n as ResponsiveSidebarShell, t as AppBarSlots } from "../../ResponsiveSidebarShell-BTVPxLJK.js";
|
|
4
|
-
import { n as McpPluginCatalogProps } from "../../McpPluginCatalog-3qWu8oK1.js";
|
|
5
|
-
import { i as ThinkChatMessagesProps } from "../../ThinkChat-CwMdEum8.js";
|
|
6
|
-
import { o as ThinkThreadStatusSummary } from "../../ThinkThreadPicker-yFz4vvIf.js";
|
|
7
|
-
import { r as WorkspaceFileAssetResolver } from "../../WorkspaceFile-Dq-GC0_T.js";
|
|
8
|
-
import { y as WorkspaceSource } from "../../Workspace-C_zHq9KZ.js";
|
|
9
|
-
import { r as WorkspaceChangeSource } from "../../WorkspaceLive-DLGhtIly.js";
|
|
10
|
-
import { t as ThinkAgent } from "../../think-agent-Cip5KAPj.js";
|
|
1
|
+
import { ResizableSidePanelHandleProps } from "../general-purpose/ResizableSidePanel.js";
|
|
11
2
|
import * as React from "react";
|
|
12
|
-
import {
|
|
13
|
-
import { useAgent } from "agents/react";
|
|
14
|
-
import { useAgentChat } from "@cloudflare/think/react";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
15
4
|
|
|
16
5
|
//#region src/components/agents-sdk/ThinkFullApp.d.ts
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
* ThinkFullApp bar: the shared shell slots plus the workbench view switch.
|
|
21
|
-
* `views` omitted uses the built-in Files/Plugins switch. Pass `null` when
|
|
22
|
-
* the host already offers those destinations (an overflow menu). `primary`
|
|
23
|
-
* is always last.
|
|
24
|
-
*/
|
|
25
|
-
interface ThinkFullAppBarSlots extends AppBarSlots {
|
|
26
|
-
/**
|
|
27
|
-
* View-switch slot. Omit for the built-in switch. `null` omits it so the
|
|
28
|
-
* host can own Files/Plugins in `actions` instead of showing a second set
|
|
29
|
-
* of icons.
|
|
30
|
-
*/
|
|
31
|
-
views?: React.ReactNode | null;
|
|
6
|
+
interface ThinkFullAppRootProps extends React.ComponentPropsWithRef<"div"> {
|
|
7
|
+
/** Whether the host-selected workbench is visible. Route identity remains with the host. */
|
|
8
|
+
workbenchOpen: boolean;
|
|
32
9
|
}
|
|
33
10
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* `onViewChange` back into their router.
|
|
11
|
+
* Conversation/workbench layout, independent of routing and SDK connections.
|
|
12
|
+
* Compose navigation outside the root. The conversation remains mounted while
|
|
13
|
+
* compact layouts show the workbench; ResizableSidePanel owns desktop resizing.
|
|
38
14
|
*/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
*/
|
|
58
|
-
revision?: string;
|
|
59
|
-
/** Leading workspace control, such as a host-owned Back to chat button. */
|
|
60
|
-
leading?: React.ReactNode;
|
|
61
|
-
actions?: React.ReactNode;
|
|
62
|
-
}
|
|
63
|
-
interface ThinkFullAppPanel {
|
|
64
|
-
/** Unique panel id used by `view`; custom panels should not reuse built-in ids. */
|
|
65
|
-
id: ThinkFullAppWorkbenchView;
|
|
66
|
-
label: string;
|
|
67
|
-
icon: React.ReactNode;
|
|
68
|
-
/** Panels are app-authored, so anything one needs is already in its scope. */
|
|
69
|
-
render: () => React.ReactNode;
|
|
70
|
-
}
|
|
71
|
-
/** The live conversation the chat lane and approvals belong to. */
|
|
72
|
-
interface ThinkFullAppConversation<AgentT extends ThinkFullAppAgent<State>, State = unknown, MessageT extends UIMessage = UIMessage> {
|
|
73
|
-
/** The `useAgent` value from `agents/react`; its stub drives approvals and execution records. */
|
|
74
|
-
agent: ReturnType<typeof useAgent<AgentT, State>>;
|
|
75
|
-
/** The `useAgentChat` value from `@cloudflare/think/react` used by the chat surface. */
|
|
76
|
-
chat: ReturnType<typeof useAgentChat<State, MessageT>>;
|
|
77
|
-
/**
|
|
78
|
-
* The `useSourceScopedAgentToolEvents(agent)` value for this connection.
|
|
79
|
-
* The app owns the subscription — mounted beside the `useAgent` call, since
|
|
80
|
-
* the server replays retained runs once per socket connect — so a run-detail
|
|
81
|
-
* route can read the same projection. ThinkFullApp never subscribes itself.
|
|
82
|
-
*
|
|
83
|
-
* Omit it for a connection that spawns no runs — a delegated run's own
|
|
84
|
-
* socket carries none — rather than passing an empty stand-in projection.
|
|
85
|
-
*/
|
|
86
|
-
agentTools?: AgentToolEventsValue<MessageT["parts"][number]>;
|
|
87
|
-
}
|
|
88
|
-
interface ThinkFullAppProps<AgentT extends ThinkFullAppAgent<State>, State = unknown, MessageT extends UIMessage = UIMessage> extends React.HTMLAttributes<HTMLDivElement> {
|
|
89
|
-
/**
|
|
90
|
-
* Omit it and supply `messages.draft` for the first turn of a conversation
|
|
91
|
-
* that does not exist yet. The approvals and background-agent surfaces wait
|
|
92
|
-
* for a conversation to belong to; everything else is unchanged.
|
|
93
|
-
*/
|
|
94
|
-
conversation?: ThinkFullAppConversation<AgentT, State, MessageT>;
|
|
95
|
-
/** Atomic workspace source, navigation, media, and header configuration. */
|
|
96
|
-
workspace?: ThinkFullAppWorkspaceConfig;
|
|
97
|
-
/** Plugin directory backed by the host's live Agents MCP state and connection callbacks. */
|
|
98
|
-
plugins?: McpPluginCatalogProps;
|
|
99
|
-
/** Application bar slots: back, leading, title, actions, views, primary. */
|
|
100
|
-
bar?: ThinkFullAppBarSlots;
|
|
101
|
-
/** Aggregate thread activity rendered beside the compact thread-title disclosure. */
|
|
102
|
-
threadStatusSummary?: ThinkThreadStatusSummary;
|
|
103
|
-
/**
|
|
104
|
-
* Stable, non-secret identity for the remote Think agent used by approvals.
|
|
105
|
-
* Include endpoint, account or tenant scope, and
|
|
106
|
-
* agent path so two sources cannot share cached data. The optional workspace
|
|
107
|
-
* has its own source identity.
|
|
108
|
-
*/
|
|
109
|
-
sourceKey: string;
|
|
110
|
-
/** Message rendering labels and approval overrides for ThinkChat. */
|
|
111
|
-
messages?: ThinkChatMessagesProps<MessageT>;
|
|
112
|
-
/** Extra workbench panels appended after the enabled built-in panels. */
|
|
113
|
-
workbenchPanels?: readonly ThinkFullAppPanel[];
|
|
114
|
-
/** Returns an application-authored TanStack Router Link and enables retained Agent Tool runs. */
|
|
115
|
-
renderAgentToolRunLink?: NonNullable<ThinkChatMessagesProps<MessageT>["renderAgentToolRunLink"]>;
|
|
116
|
-
/**
|
|
117
|
-
* Optional parent-owned thread picker/sidebar rendered beside the selected child app.
|
|
118
|
-
* Use the render form to close the compact drawer after selecting a thread.
|
|
119
|
-
*/
|
|
120
|
-
threadSidebar?: React.ComponentProps<typeof ResponsiveSidebarShell>["sidebar"];
|
|
121
|
-
/**
|
|
122
|
-
* Place the wide-layout thread toggle. The thread rail owns it by default;
|
|
123
|
-
* hosts that compose their own rail header may keep the shell fallback in
|
|
124
|
-
* the main bar and render `closeSidebar` themselves.
|
|
125
|
-
*/
|
|
126
|
-
sidebarTogglePlacement?: React.ComponentProps<typeof ResponsiveSidebarShell>["sidebarTogglePlacement"];
|
|
127
|
-
/**
|
|
128
|
-
* Visible surface. Omit for internal state. A controlled `view` naming a
|
|
129
|
-
* panel that does not exist renders the conversation alone — it is never
|
|
130
|
-
* silently substituted with another panel.
|
|
131
|
-
*/
|
|
132
|
-
view?: ThinkFullAppView;
|
|
133
|
-
/**
|
|
134
|
-
* Uncontrolled starting view. Ignored when `view` is set. Omit it to open
|
|
135
|
-
* Files beside the conversation on a wide app when a workspace exists, and
|
|
136
|
-
* to stay on chat at compact (extension) widths.
|
|
137
|
-
*/
|
|
138
|
-
defaultView?: ThinkFullAppView;
|
|
139
|
-
/** Called when the built-in switch (or a collapse) asks for another view. */
|
|
140
|
-
onViewChange?: (view: ThinkFullAppView) => void;
|
|
141
|
-
}
|
|
142
|
-
/** Combines ThinkChat with a resizable workbench. Wide apps with a workspace
|
|
143
|
-
* open Files beside the conversation; compact (extension) widths stay on chat
|
|
144
|
-
* until a view is selected. */
|
|
145
|
-
declare function ThinkFullApp<AgentT extends ThinkFullAppAgent<State>, State = unknown, MessageT extends UIMessage = UIMessage>({
|
|
146
|
-
bar,
|
|
15
|
+
declare function ThinkFullAppRoot({
|
|
16
|
+
workbenchOpen,
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
...props
|
|
20
|
+
}: ThinkFullAppRootProps): React.JSX.Element;
|
|
21
|
+
interface ThinkFullAppConversationProps extends useRender.ComponentProps<"section"> {}
|
|
22
|
+
/** Persistent conversation lane. Its contents and SDK providers belong to the caller. */
|
|
23
|
+
declare function ThinkFullAppConversation({
|
|
24
|
+
render,
|
|
25
|
+
className,
|
|
26
|
+
ref,
|
|
27
|
+
...props
|
|
28
|
+
}: ThinkFullAppConversationProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
29
|
+
interface ThinkFullAppWorkbenchProps extends useRender.ComponentProps<"aside"> {}
|
|
30
|
+
/** The single raised output plane. Unmounts its content when the host closes it. */
|
|
31
|
+
declare function ThinkFullAppWorkbench({
|
|
32
|
+
render,
|
|
147
33
|
className,
|
|
148
|
-
conversation,
|
|
149
|
-
defaultView: defaultViewProp,
|
|
150
|
-
messages,
|
|
151
|
-
onViewChange,
|
|
152
|
-
plugins,
|
|
153
34
|
ref,
|
|
154
|
-
renderAgentToolRunLink,
|
|
155
|
-
sourceKey,
|
|
156
|
-
sidebarTogglePlacement,
|
|
157
|
-
style,
|
|
158
|
-
threadSidebar,
|
|
159
|
-
threadStatusSummary,
|
|
160
|
-
view,
|
|
161
|
-
workbenchPanels,
|
|
162
|
-
workspace,
|
|
163
35
|
...props
|
|
164
|
-
}:
|
|
165
|
-
|
|
166
|
-
|
|
36
|
+
}: ThinkFullAppWorkbenchProps): React.JSX.Element | null;
|
|
37
|
+
interface ThinkFullAppResizeHandleProps extends ResizableSidePanelHandleProps {}
|
|
38
|
+
/** Keyboard and pointer resize control; absent while the workbench is closed. */
|
|
39
|
+
declare function ThinkFullAppResizeHandle({
|
|
40
|
+
className,
|
|
41
|
+
...props
|
|
42
|
+
}: ThinkFullAppResizeHandleProps): React.JSX.Element | null;
|
|
43
|
+
declare const ThinkFullApp: {
|
|
44
|
+
Root: typeof ThinkFullAppRoot;
|
|
45
|
+
Conversation: typeof ThinkFullAppConversation;
|
|
46
|
+
Workbench: typeof ThinkFullAppWorkbench;
|
|
47
|
+
ResizeHandle: typeof ThinkFullAppResizeHandle;
|
|
48
|
+
};
|
|
167
49
|
//#endregion
|
|
168
|
-
export { ThinkFullApp,
|
|
50
|
+
export { ThinkFullApp, ThinkFullAppConversationProps, ThinkFullAppResizeHandleProps, ThinkFullAppRootProps, ThinkFullAppWorkbenchProps };
|