@mcp-b/react-components 0.48.0 → 0.49.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AgentChatQueue-v5890eA1.d.ts +48 -0
- package/dist/AgentToolRunsContext-GMe_hSnD.d.ts +35 -0
- package/dist/Avatar-o2NO1fCG.d.ts +124 -0
- package/dist/{Button-CZt3yywF.d.ts → Button-DjONW5UW.d.ts} +1 -1
- package/dist/{CodeBlock-C380GD5t.d.ts → CodeBlock--r6GS8YV.d.ts} +8 -2
- package/dist/{CodeBlock-BSJl682D.js → CodeBlock-g8sADidM.js} +8 -8
- package/dist/{FileTree-DvE0hNZu.js → FileTree-DruTQ-oa.js} +38 -36
- package/dist/{IconButton-BAUFhUk8.d.ts → IconButton-ByiyjkYE.d.ts} +2 -2
- package/dist/{Menu-yb6QXWA3.d.ts → Menu-CgfUZhZd.d.ts} +1 -1
- package/dist/{Message-D_vCVEGB.d.ts → Message-DyaTBiV7.d.ts} +17 -4
- package/dist/MessageScrollerVirtual-D4afYwVB.d.ts +84 -0
- package/dist/{PromptInput-DtJHyp0S.d.ts → PromptInput-4kCz3T9P.d.ts} +45 -32
- package/dist/PromptInputApproval-D2hpn54U.d.ts +44 -0
- package/dist/Separator-CzhtLYE1.d.ts +41 -0
- package/dist/Toolbar-CGY004u0.d.ts +155 -0
- package/dist/{Workspace-LIoU30n7.d.ts → Workspace-HzGrWDX3.d.ts} +1 -1
- package/dist/{WorkspaceFile-Dq-GC0_T.d.ts → WorkspaceFile-Bouauobc.d.ts} +1 -1
- package/dist/{WorkspaceFileView-C_WnYm-a.js → WorkspaceFileView-DYPtRVpM.js} +5 -4
- package/dist/{WorkspaceLink-B1d2GIGl.js → WorkspaceLink-BYZG-V_I.js} +8 -91
- package/dist/{WorkspaceMessageResponse-BqOezptB.js → WorkspaceMessageResponse-CUJk9_P5.js} +2 -2
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentChat.d.ts +198 -2
- package/dist/components/agents-sdk/AgentChat.js +527 -672
- package/dist/components/agents-sdk/AgentChatQueue.d.ts +2 -0
- package/dist/components/agents-sdk/AgentChatQueue.js +206 -0
- package/dist/components/agents-sdk/AgentEvent.js +2 -2
- package/dist/components/agents-sdk/AgentToolRunsContext.d.ts +2 -2
- package/dist/components/agents-sdk/AgentToolRunsContext.js +1 -36
- package/dist/components/agents-sdk/BrowserLiveScreen.js +22 -14
- package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
- package/dist/components/agents-sdk/BrowserReplay.d.ts +1 -1
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.d.ts +3 -0
- package/dist/components/agents-sdk/BrowserRunPanel.js +32 -31
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +212 -0
- package/dist/components/agents-sdk/EmployeeChrome.js +555 -0
- package/dist/components/agents-sdk/ManagerOffice.d.ts +79 -40
- package/dist/components/agents-sdk/ManagerOffice.js +291 -281
- package/dist/components/agents-sdk/McpConnectionRequest.d.ts +4 -4
- package/dist/components/agents-sdk/McpConnectionRequest.js +4 -3
- package/dist/components/agents-sdk/McpConnectorForm.d.ts +38 -1
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +93 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +5 -4
- package/dist/components/agents-sdk/McpServerIcon.d.ts +17 -0
- package/dist/components/agents-sdk/McpServerIcon.js +25 -0
- package/dist/components/agents-sdk/McpServerPicker.d.ts +5 -4
- package/dist/components/agents-sdk/McpServerPicker.js +4 -3
- package/dist/components/agents-sdk/ModelSelector.d.ts +4 -4
- package/dist/components/agents-sdk/ModelSelector.js +4 -4
- package/dist/components/agents-sdk/PromptInputApproval.d.ts +1 -43
- package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +2 -3
- package/dist/components/agents-sdk/SessionCompaction.d.ts +88 -1
- package/dist/components/agents-sdk/SessionCompaction.js +2 -2
- package/dist/components/agents-sdk/SubagentRunDetails.d.ts +30 -1
- package/dist/components/agents-sdk/SubagentRunDetails.js +57 -1
- package/dist/components/agents-sdk/SubagentRunIndicator.d.ts +9 -9
- package/dist/components/agents-sdk/SubagentRunIndicator.js +19 -24
- package/dist/components/agents-sdk/SubagentRunList.d.ts +6 -3
- package/dist/components/agents-sdk/SubagentRunList.js +4 -2
- package/dist/components/agents-sdk/SubagentRunPanel.d.ts +60 -0
- package/dist/components/agents-sdk/SubagentRunPanel.js +255 -0
- package/dist/components/agents-sdk/SubagentRunSelector.d.ts +8 -4
- package/dist/components/agents-sdk/SubagentRunSelector.js +5 -3
- package/dist/components/agents-sdk/ThinkChat.d.ts +102 -2
- package/dist/components/agents-sdk/ThinkChat.js +233 -2
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +76 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +18 -10
- package/dist/components/agents-sdk/ThinkChatContext.d.ts +27 -1
- package/dist/components/agents-sdk/ThinkChatContext.js +1 -1
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +24 -19
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +85 -28
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +159 -102
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +40 -158
- package/dist/components/agents-sdk/ThinkFullApp.js +71 -290
- package/dist/components/agents-sdk/ThinkRecoveryNotice.d.ts +18 -1
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineActions.d.ts +51 -0
- package/dist/components/agents-sdk/ThinkRoutineActions.js +201 -0
- package/dist/components/agents-sdk/ThinkRoutineBrowser.d.ts +4 -1
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +17 -15
- package/dist/components/agents-sdk/ThinkRoutineDetail.js +11 -11
- package/dist/components/agents-sdk/ThinkRoutineForm.d.ts +2 -1
- package/dist/components/agents-sdk/ThinkRoutineForm.js +14 -14
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +7 -7
- package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +90 -1
- package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -3
- package/dist/components/agents-sdk/Workspace.d.ts +1 -1
- package/dist/components/agents-sdk/Workspace.js +7 -13
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +10 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +10 -7
- package/dist/components/agents-sdk/WorkspaceExecution.d.ts +5 -14
- package/dist/components/agents-sdk/WorkspaceExecution.js +24 -38
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +5 -2
- package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -2
- package/dist/components/agents-sdk/WorkspaceFile.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
- package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
- package/dist/components/agents-sdk/WorkspaceLive.d.ts +60 -1
- package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +47 -1
- package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
- package/dist/components/agents-sdk/WorkspaceMountManager.d.ts +3 -2
- package/dist/components/agents-sdk/WorkspaceMountManager.js +6 -9
- package/dist/components/agents-sdk/WorkspaceNavigationRestoration.d.ts +38 -0
- package/dist/components/agents-sdk/WorkspaceNavigationRestoration.js +86 -0
- package/dist/components/agents-sdk/WorkspaceProject.d.ts +5 -14
- package/dist/components/agents-sdk/WorkspaceProject.js +21 -35
- package/dist/components/agents-sdk/WorkspaceUserScript.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceUserScript.js +8 -5
- package/dist/components/ai-sdk/Activity.d.ts +1 -1
- package/dist/components/ai-sdk/Activity.js +1 -1
- package/dist/components/ai-sdk/AgentAttention.d.ts +2 -2
- package/dist/components/ai-sdk/AgentChatMessageEditor.js +5 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +89 -2
- package/dist/components/ai-sdk/AgentChatStartScreen.js +64 -43
- package/dist/components/ai-sdk/AgentMessageParts.d.ts +45 -1
- package/dist/components/ai-sdk/Approval.d.ts +1 -1
- package/dist/components/ai-sdk/Approval.js +2 -2
- package/dist/components/ai-sdk/Artifact.d.ts +2 -2
- package/dist/components/ai-sdk/Artifact.js +1 -1
- package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
- package/dist/components/ai-sdk/ChainOfThought.js +1 -1
- package/dist/components/ai-sdk/Checkpoint.js +1 -1
- package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/ComposerLink.js +2 -3
- package/dist/components/ai-sdk/ConnectedAppCards.d.ts +9 -1
- package/dist/components/ai-sdk/ConnectedAppCards.js +28 -21
- package/dist/components/ai-sdk/Context.d.ts +7 -3
- package/dist/components/ai-sdk/Context.js +7 -17
- package/dist/components/ai-sdk/Conversation.d.ts +2 -2
- package/dist/components/ai-sdk/Conversation.js +1 -1
- package/dist/components/ai-sdk/Goal.d.ts +3 -3
- package/dist/components/ai-sdk/Goal.js +3 -3
- package/dist/components/ai-sdk/InlineCitation.d.ts +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.d.ts +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
- package/dist/components/ai-sdk/Message.d.ts +2 -2
- package/dist/components/ai-sdk/Message.js +12 -3
- package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
- package/dist/components/ai-sdk/MessageScroller.js +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.d.ts +2 -76
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +40 -5
- package/dist/components/ai-sdk/Plan.d.ts +1 -1
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.d.ts +2 -2
- package/dist/components/ai-sdk/PromptInput.js +175 -231
- package/dist/components/ai-sdk/PromptInputComposerEditor.js +32 -9
- package/dist/components/ai-sdk/Queue.d.ts +28 -5
- package/dist/components/ai-sdk/Queue.js +20 -5
- package/dist/components/ai-sdk/Reasoning.d.ts +1 -1
- package/dist/components/ai-sdk/Reasoning.js +5 -5
- package/dist/components/ai-sdk/Sources.d.ts +1 -1
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.d.ts +1 -1
- package/dist/components/ai-sdk/Task.js +1 -1
- package/dist/components/extension/ChatGptSignInScreen.d.ts +1 -1
- package/dist/components/extension/ChatGptSignInScreen.js +1 -1
- package/dist/components/extension/CodexModelSelector.d.ts +6 -1
- package/dist/components/extension/CodexModelSelector.js +3 -3
- package/dist/components/extension/ConversationTabPicker.d.ts +1 -0
- package/dist/components/extension/ConversationTabPicker.js +2 -2
- package/dist/components/foundations/AlertDialog.d.ts +1 -1
- package/dist/components/foundations/AppIcon.d.ts +3 -2
- package/dist/components/foundations/Autocomplete.js +6 -1
- package/dist/components/foundations/Avatar.d.ts +1 -121
- package/dist/components/foundations/Button.d.ts +1 -1
- package/dist/components/foundations/Card.d.ts +22 -27
- package/dist/components/foundations/Card.js +51 -32
- package/dist/components/foundations/Checkbox.js +1 -1
- package/dist/components/foundations/CheckboxGroup.d.ts +1 -1
- package/dist/components/foundations/Collapsible.d.ts +1 -1
- package/dist/components/foundations/Collapsible.js +1 -1
- package/dist/components/foundations/Combobox.js +6 -1
- package/dist/components/foundations/ContextMenu.d.ts +10 -23
- package/dist/components/foundations/ContextMenu.js +3 -2
- package/dist/components/foundations/Dialog.d.ts +106 -1
- package/dist/components/foundations/EmptyState.d.ts +1 -1
- package/dist/components/foundations/Field.d.ts +2 -1
- package/dist/components/foundations/Fieldset.d.ts +1 -1
- package/dist/components/foundations/Form.d.ts +4 -4
- package/dist/components/foundations/IconButton.d.ts +1 -1
- package/dist/components/foundations/Label.d.ts +1 -1
- package/dist/components/foundations/LinkButton.d.ts +2 -2
- package/dist/components/foundations/Menu.d.ts +1 -1
- package/dist/components/foundations/Menubar.d.ts +1 -1
- package/dist/components/foundations/Menubar.js +1 -1
- package/dist/components/foundations/Meter.d.ts +1 -1
- package/dist/components/foundations/NumberField.d.ts +1 -1
- package/dist/components/foundations/PreviewCard.d.ts +1 -1
- package/dist/components/foundations/ScrollArea.d.ts +1 -1
- package/dist/components/foundations/SearchField.d.ts +1 -1
- package/dist/components/foundations/SearchField.js +1 -1
- package/dist/components/foundations/Select.js +7 -2
- package/dist/components/foundations/Separator.d.ts +1 -40
- package/dist/components/foundations/Stepper.d.ts +1 -1
- package/dist/components/foundations/Stepper.js +1 -1
- package/dist/components/foundations/Textarea.d.ts +1 -1
- package/dist/components/foundations/Toast.d.ts +5 -1
- package/dist/components/foundations/Toast.js +1 -1
- package/dist/components/foundations/Toggle.d.ts +70 -1
- package/dist/components/foundations/ToggleGroup.d.ts +4 -3
- package/dist/components/foundations/ToggleGroup.js +1 -1
- package/dist/components/foundations/Toolbar.d.ts +1 -151
- package/dist/components/foundations/Tooltip.d.ts +1 -1
- package/dist/components/foundations/TransitionSurface.d.ts +1 -1
- package/dist/components/foundations/icons.js +1 -1
- package/dist/components/general-purpose/ActionGuide.d.ts +10 -26
- package/dist/components/general-purpose/ActionGuide.js +4 -18
- package/dist/components/general-purpose/AppTopBar.d.ts +4 -2
- package/dist/components/general-purpose/Commit.d.ts +2 -2
- package/dist/components/general-purpose/Commit.js +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.d.ts +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
- package/dist/components/general-purpose/FileTree.d.ts +1 -7
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/PricingPlanCard.d.ts +4 -0
- package/dist/components/general-purpose/PricingPlanCard.js +2 -2
- package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
- package/dist/components/general-purpose/ResizableSidePanel.d.ts +2 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +128 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +120 -102
- package/dist/components/general-purpose/SettingsFormDialog.d.ts +14 -27
- package/dist/components/general-purpose/SettingsFormDialog.js +42 -72
- package/dist/components/general-purpose/SetupChecklist.d.ts +1 -0
- package/dist/components/general-purpose/SetupChecklist.js +76 -1
- package/dist/components/general-purpose/Terminal.d.ts +3 -3
- package/dist/components/general-purpose/Terminal.js +11 -6
- package/dist/components/general-purpose/TestResults.d.ts +23 -11
- package/dist/components/general-purpose/TestResults.js +49 -51
- package/dist/components/general-purpose/ThemeModeControl.d.ts +2 -0
- package/dist/components/general-purpose/ThemeModeControl.js +2 -2
- package/dist/components/general-purpose/WebPreview.d.ts +29 -4
- package/dist/components/general-purpose/WebPreview.js +39 -14
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.d.ts +13 -11
- package/dist/components/nanites/AgentToolDetail.js +21 -42
- package/dist/{copy-button-Dk2vRe9j.js → copy-button-CSDuDfdP.js} +1 -1
- package/dist/{copy-button-C0JyjClr.d.ts → copy-button-OUwOdgEm.d.ts} +1 -1
- package/dist/mcp-server-mAErsxHU.js +27 -0
- package/dist/styles/accessibility.css +20 -0
- package/dist/styles/activity.css +1 -96
- package/dist/styles/agent-chat.css +75 -102
- package/dist/styles/agent-tool-detail.css +0 -16
- package/dist/styles/base.css +1 -9
- package/dist/styles/browser-run-panel.css +1 -15
- package/dist/styles/button.css +7 -1
- package/dist/styles/code-block.css +12 -0
- package/dist/styles/codex-model-selector.css +4 -0
- package/dist/styles/color-contrast.test.ts +212 -0
- package/dist/styles/composition-motion.css +0 -2
- package/dist/styles/employee-chrome.css +43 -0
- package/dist/styles/file-tree.css +10 -1
- package/dist/styles/index.css +4 -2
- package/dist/styles/manager-office.css +5 -5
- package/dist/styles/message.css +2 -10
- package/dist/styles/queue.css +71 -0
- package/dist/styles/responsive-sidebar-shell.css +1 -1
- package/dist/styles/subagent-run.css +122 -6
- package/dist/styles/test-results.css +2 -5
- package/dist/styles/think-chat-activity.css +13 -0
- package/dist/styles/think-chat-tool-panels.css +81 -0
- package/dist/styles/think-execution-workbench.css +2 -8
- package/dist/styles/think-full-app.css +42 -251
- package/dist/styles/{think-routine-library.css → think-routine.css} +64 -80
- package/dist/styles/web-preview.css +15 -1
- package/dist/utils/codex-model-catalog.d.ts +25 -6
- package/dist/utils/codex-model-catalog.js +22 -5
- package/dist/utils/mcp-server-catalog.d.ts +1112 -2
- package/dist/utils/mcp-server-catalog.js +28 -9
- package/dist/utils/structured-code.d.ts +1 -1
- package/dist/{workspace-assets-GqsCYxqT.js → workspace-assets-Bg7XhPsk.js} +2 -2
- package/package.json +8 -4
- package/dist/AgentChat-BLmQghkt.d.ts +0 -327
- package/dist/AgentChatStartScreen-Bkv7Avni.d.ts +0 -84
- package/dist/AgentMessageParts-C7L-Mv9U.d.ts +0 -46
- package/dist/AgentToolRunsContext-jtmveaRE.d.ts +0 -57
- package/dist/Dialog-B_FhRWaz.d.ts +0 -107
- package/dist/McpConnectorForm-CeYNY0MI.d.ts +0 -39
- package/dist/McpPluginCatalog-3qWu8oK1.d.ts +0 -92
- package/dist/ResponsiveSidebarShell-BTVPxLJK.d.ts +0 -123
- package/dist/SessionCompaction-CmTJFpzj.d.ts +0 -89
- package/dist/SetupChecklist-DeTU9YpW.js +0 -77
- package/dist/ThinkChat-CwMdEum8.d.ts +0 -185
- package/dist/ThinkChat-DiI6hhDP.js +0 -332
- package/dist/ThinkChatActivity-B3lGVS-6.d.ts +0 -77
- package/dist/ThinkChatContext-COIgzkYp.d.ts +0 -28
- package/dist/ThinkRecoveryNotice-DGWr94rk.d.ts +0 -19
- package/dist/ThinkThreadPicker-yFz4vvIf.d.ts +0 -91
- package/dist/Toggle-DLrIf5YH.d.ts +0 -69
- package/dist/WorkspaceLive-DfjH1Ypm.d.ts +0 -61
- package/dist/WorkspaceMessageResponse-kJYU8Onj.d.ts +0 -48
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +0 -31
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.js +0 -34
- package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +0 -80
- package/dist/components/agents-sdk/ThinkRoutineLibrary.js +0 -159
- package/dist/components/agents-sdk/ThinkSidepanel.d.ts +0 -200
- package/dist/components/agents-sdk/ThinkSidepanel.js +0 -775
- package/dist/mcp-server-7NR24ASj.js +0 -69
- package/dist/mcp-server-catalog-C_g7C-9o.d.ts +0 -1108
- package/dist/styles/think-sidepanel.css +0 -78
- package/dist/think-agent-Cip5KAPj.d.ts +0 -7
- package/dist/{icons-CeGfXO21.js → icons-cuEtsgj9.js} +1 -1
|
@@ -1,2 +1,91 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/agents-sdk/ThinkThreadPicker.d.ts
|
|
4
|
+
interface ThinkThreadItem {
|
|
5
|
+
/** Stable child-agent/thread id used by the app-authored link's route params. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Human-readable thread title, usually generated by the parent Think agent. */
|
|
8
|
+
title: string;
|
|
9
|
+
/** Optional parent-owned preview for apps that render their own richer sidebar. */
|
|
10
|
+
lastMessagePreview?: string;
|
|
11
|
+
/** Timestamp from the parent registry or metadata row. `updatedAt` wins over `createdAt`. */
|
|
12
|
+
createdAt?: Date | number;
|
|
13
|
+
/** Timestamp from parent-owned thread metadata when available. */
|
|
14
|
+
updatedAt?: Date | number;
|
|
15
|
+
/** Preformatted timestamp label when the app already has one, such as "14m". */
|
|
16
|
+
updatedAtLabel?: string;
|
|
17
|
+
/** Optional upstream/app status string. The picker only displays it; it does not derive it. */
|
|
18
|
+
status?: string;
|
|
19
|
+
/** Human label for `status` when the raw upstream value is not user-facing. */
|
|
20
|
+
statusLabel?: string;
|
|
21
|
+
}
|
|
22
|
+
interface ThinkThreadStatusSummary {
|
|
23
|
+
/** Threads currently processing a turn. */
|
|
24
|
+
running: number;
|
|
25
|
+
/** Completed or interrupted background threads that have not been reviewed. */
|
|
26
|
+
attention: number;
|
|
27
|
+
/** Threads whose latest turn failed. */
|
|
28
|
+
failed: number;
|
|
29
|
+
}
|
|
30
|
+
interface ThinkThreadStatusIndicatorsProps {
|
|
31
|
+
summary: ThinkThreadStatusSummary;
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
interface ThinkThreadPickerProps<Thread extends ThinkThreadItem = ThinkThreadItem> extends Omit<React.HTMLAttributes<HTMLElement>, "onSelect" | "title"> {
|
|
35
|
+
/** Threads from the parent agent, already sorted in the order the app wants to show. */
|
|
36
|
+
threads: readonly Thread[];
|
|
37
|
+
/**
|
|
38
|
+
* Renders the application-owned TanStack Router Link for a thread.
|
|
39
|
+
*
|
|
40
|
+
* Put `to`, `params`, `search`, and active state on this element so they stay
|
|
41
|
+
* inferred from the consuming application's registered route tree.
|
|
42
|
+
*/
|
|
43
|
+
renderThreadLink: (thread: Thread) => React.ReactElement;
|
|
44
|
+
/**
|
|
45
|
+
* App-authored TanStack Router Link to the new-thread screen. A thread
|
|
46
|
+
* created on click is an empty thread until someone writes in it.
|
|
47
|
+
*/
|
|
48
|
+
createThreadLink?: React.ReactElement;
|
|
49
|
+
/**
|
|
50
|
+
* Notified on unmodified primary activation. The link still navigates — the
|
|
51
|
+
* route is the selection — so this is for side effects such as closing a
|
|
52
|
+
* compact drawer, never for performing the selection itself.
|
|
53
|
+
*/
|
|
54
|
+
onSelect?: (thread: Thread) => void;
|
|
55
|
+
/** Optional parent-agent delete action, usually `parent.stub.deleteThread(thread.id)`. */
|
|
56
|
+
onDelete?: (thread: Thread) => void | Promise<void>;
|
|
57
|
+
/** Visible heading for the roster. */
|
|
58
|
+
title?: React.ReactNode;
|
|
59
|
+
/** Accessible label for the list navigation. */
|
|
60
|
+
"aria-label"?: string;
|
|
61
|
+
}
|
|
62
|
+
declare function summarizeThinkThreads(threads: readonly Pick<ThinkThreadItem, "status">[]): ThinkThreadStatusSummary;
|
|
63
|
+
declare function ThinkThreadStatusIndicators({
|
|
64
|
+
summary,
|
|
65
|
+
className
|
|
66
|
+
}: ThinkThreadStatusIndicatorsProps): React.JSX.Element | null;
|
|
67
|
+
/**
|
|
68
|
+
* Thread roster UI for sub-agent chat apps.
|
|
69
|
+
*
|
|
70
|
+
* This component does not call Think or Cloudflare RPC methods directly. Feed
|
|
71
|
+
* it from the parent agent's roster method, then render app-owned route links
|
|
72
|
+
* that select the child `useAgent({ sub: [...] })` name. Keep backend contract
|
|
73
|
+
* notes beside the parent Think agent because
|
|
74
|
+
* `listThreads()`/`createThread()`/`deleteThread()` are app-owned.
|
|
75
|
+
*/
|
|
76
|
+
declare function ThinkThreadPicker<Thread extends ThinkThreadItem>({
|
|
77
|
+
threads,
|
|
78
|
+
renderThreadLink,
|
|
79
|
+
createThreadLink,
|
|
80
|
+
onSelect,
|
|
81
|
+
onDelete,
|
|
82
|
+
className,
|
|
83
|
+
title,
|
|
84
|
+
"aria-label": ariaLabel,
|
|
85
|
+
ref,
|
|
86
|
+
...props
|
|
87
|
+
}: ThinkThreadPickerProps<Thread> & {
|
|
88
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLElement>;
|
|
89
|
+
}): React.JSX.Element;
|
|
90
|
+
//#endregion
|
|
2
91
|
export { ThinkThreadItem, ThinkThreadPicker, ThinkThreadPickerProps, ThinkThreadStatusIndicators, ThinkThreadStatusIndicatorsProps, ThinkThreadStatusSummary, summarizeThinkThreads };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { B as PlusIcon, K as SpinnerIcon, _ as DotIcon, et as WarningIcon, t as ArchiveIcon } from "../../icons-
|
|
2
|
+
import { B as PlusIcon, K as SpinnerIcon, _ as DotIcon, et as WarningIcon, t as ArchiveIcon } from "../../icons-cuEtsgj9.js";
|
|
3
3
|
import { Button, buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
5
|
-
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
6
5
|
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
7
|
-
import { AlertDialog } from "../foundations/AlertDialog.js";
|
|
8
6
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
7
|
+
import { AlertDialog } from "../foundations/AlertDialog.js";
|
|
8
|
+
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
9
9
|
import { LinkButton } from "../foundations/LinkButton.js";
|
|
10
10
|
import { SearchField } from "../foundations/SearchField.js";
|
|
11
11
|
import * as React from "react";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as workspaceFileQueryKey, C as refreshWorkspaceFileQueries, D as workspaceDirectoryQueryOptions, E as workspaceDirectoryQueryKey, F as workspaceTextFileQueryOptions, M as workspaceInfoQueryKey, N as workspaceInfoQueryOptions, O as workspaceDirectoryQueryPrefix, P as workspaceQueryKey, S as WorkspaceTextFileQueryOptions, T as workspaceBinaryFileQueryOptions, _ as WorkspaceQueryOptions, a as WorkspaceDirectoryQueryOptions, b as WorkspaceState, c as WorkspaceFileQueryKey, d as WorkspaceFileStatQueryOptions, f as WorkspaceFileVersion, g as WorkspaceQueryKey, h as WorkspaceInfoQueryOptions, i as WorkspaceDirectoryQueryKey, j as workspaceFileStatQueryOptions, k as workspaceFileAssetQueryOptions, l as WorkspaceFileReadTarget, m as WorkspaceInfoQueryKey, n as WorkspaceBinaryFileQueryKey, o as WorkspaceFileAssetQueryKey, p as WorkspaceInfo, r as WorkspaceBinaryFileQueryOptions, s as WorkspaceFileAssetQueryOptions, t as UseWorkspaceOptions, u as WorkspaceFileStatQueryKey, v as WorkspaceResolvedAsset, w as useWorkspace, x as WorkspaceTextFileQueryKey, y as WorkspaceSource } from "../../Workspace-
|
|
1
|
+
import { A as workspaceFileQueryKey, C as refreshWorkspaceFileQueries, D as workspaceDirectoryQueryOptions, E as workspaceDirectoryQueryKey, F as workspaceTextFileQueryOptions, M as workspaceInfoQueryKey, N as workspaceInfoQueryOptions, O as workspaceDirectoryQueryPrefix, P as workspaceQueryKey, S as WorkspaceTextFileQueryOptions, T as workspaceBinaryFileQueryOptions, _ as WorkspaceQueryOptions, a as WorkspaceDirectoryQueryOptions, b as WorkspaceState, c as WorkspaceFileQueryKey, d as WorkspaceFileStatQueryOptions, f as WorkspaceFileVersion, g as WorkspaceQueryKey, h as WorkspaceInfoQueryOptions, i as WorkspaceDirectoryQueryKey, j as workspaceFileStatQueryOptions, k as workspaceFileAssetQueryOptions, l as WorkspaceFileReadTarget, m as WorkspaceInfoQueryKey, n as WorkspaceBinaryFileQueryKey, o as WorkspaceFileAssetQueryKey, p as WorkspaceInfo, r as WorkspaceBinaryFileQueryOptions, s as WorkspaceFileAssetQueryOptions, t as UseWorkspaceOptions, u as WorkspaceFileStatQueryKey, v as WorkspaceResolvedAsset, w as useWorkspace, x as WorkspaceTextFileQueryKey, y as WorkspaceSource } from "../../Workspace-HzGrWDX3.js";
|
|
2
2
|
export { UseWorkspaceOptions, WorkspaceBinaryFileQueryKey, WorkspaceBinaryFileQueryOptions, WorkspaceDirectoryQueryKey, WorkspaceDirectoryQueryOptions, WorkspaceFileAssetQueryKey, WorkspaceFileAssetQueryOptions, WorkspaceFileQueryKey, WorkspaceFileReadTarget, WorkspaceFileStatQueryKey, WorkspaceFileStatQueryOptions, WorkspaceFileVersion, WorkspaceInfo, WorkspaceInfoQueryKey, WorkspaceInfoQueryOptions, WorkspaceQueryKey, WorkspaceQueryOptions, WorkspaceResolvedAsset, WorkspaceSource, WorkspaceState, WorkspaceTextFileQueryKey, WorkspaceTextFileQueryOptions, refreshWorkspaceFileQueries, useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileQueryKey, workspaceFileStatQueryOptions, workspaceInfoQueryKey, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions };
|
|
@@ -299,19 +299,13 @@ function useWorkspace({ source, sourceKey, root = "/", selectedPath, onSelectedP
|
|
|
299
299
|
...workspaceBinaryFileQueryOptions(source, sourceKey, root, queryTarget, normalizedMaxInlineAssetBytes),
|
|
300
300
|
enabled: statSettled && resolverSettled && !resolvedAsset && Boolean(target.media)
|
|
301
301
|
});
|
|
302
|
-
const entriesByDirectory =
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
}, [directoryPaths, directoryQueries]);
|
|
310
|
-
const entryByPath = React.useMemo(() => {
|
|
311
|
-
const entries = /* @__PURE__ */ new Map();
|
|
312
|
-
for (const directoryEntries of Object.values(entriesByDirectory)) for (const entry of directoryEntries) entries.set(entry.path, entry);
|
|
313
|
-
return entries;
|
|
314
|
-
}, [entriesByDirectory]);
|
|
302
|
+
const entriesByDirectory = {};
|
|
303
|
+
for (const [key, data] of queryClient.getQueriesData({ queryKey: workspaceDirectoryQueryPrefix(sourceKey, root) })) {
|
|
304
|
+
const path = key.at(-1);
|
|
305
|
+
if (typeof path === "string" && data) entriesByDirectory[path] = data;
|
|
306
|
+
}
|
|
307
|
+
const entryByPath = /* @__PURE__ */ new Map();
|
|
308
|
+
for (const directoryEntries of Object.values(entriesByDirectory)) for (const entry of directoryEntries) entryByPath.set(entry.path, entry);
|
|
315
309
|
const setExpandedPaths = React.useCallback((next) => {
|
|
316
310
|
latestExpansionRef.current = {
|
|
317
311
|
scopeKey,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SearchField } from "../foundations/SearchField.js";
|
|
2
|
-
import { i as FileTreeFolder, r as FileTreeFile, t as FileTree } from "../../FileTree-
|
|
2
|
+
import { i as FileTreeFolder, r as FileTreeFile, t as FileTree } from "../../FileTree-DruTQ-oa.js";
|
|
3
3
|
import { WorkspaceHeader } from "./WorkspaceHeader.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as WorkspaceQueryOptions, g as WorkspaceQueryKey } from "../../Workspace-
|
|
1
|
+
import { _ as WorkspaceQueryOptions, g as WorkspaceQueryKey } from "../../Workspace-HzGrWDX3.js";
|
|
2
2
|
import { QueryClient, QueryFunction } from "@tanstack/react-query";
|
|
3
3
|
|
|
4
4
|
//#region src/components/agents-sdk/WorkspaceConcept.d.ts
|
|
@@ -33,18 +33,27 @@ interface WorkspaceCorrespondenceSource {
|
|
|
33
33
|
onDelete?: (path: string) => void | Promise<void>;
|
|
34
34
|
}
|
|
35
35
|
interface WorkspaceCorrespondenceCardProps extends Omit<CardProps, "children" | "hover" | "size" | "title" | "onChange"> {
|
|
36
|
+
/** Correspondence renderer key, such as the message or email kind selected by the host. */
|
|
36
37
|
kind: string;
|
|
38
|
+
/** Workspace-relative file path represented by this card. */
|
|
37
39
|
path: string;
|
|
40
|
+
/** Ordered header fields rendered above the correspondence body. */
|
|
38
41
|
fields: readonly WorkspaceCorrespondenceField[];
|
|
42
|
+
/** Editable or read-only correspondence body. */
|
|
39
43
|
body: string;
|
|
44
|
+
/** Leading icon identifying the correspondence channel. */
|
|
40
45
|
icon?: React.ReactNode;
|
|
41
46
|
/** `sent` renders the read-only snapshot and ignores `onChange`/`onSend`. */
|
|
42
47
|
state?: WorkspaceCorrespondenceState;
|
|
43
48
|
/** Persistence lifecycle of the visible draft. Send is disabled while set. */
|
|
44
49
|
saveState?: ConnectedAppCardSaveState;
|
|
50
|
+
/** Receives the complete draft after an editable field changes. */
|
|
45
51
|
onChange?: (next: WorkspaceCorrespondenceDraft) => void;
|
|
52
|
+
/** Sends the visible draft through the host-owned channel. */
|
|
46
53
|
onSend?: () => void | Promise<void>;
|
|
54
|
+
/** Opens the backing correspondence file or detail route. */
|
|
47
55
|
onOpen?: () => void;
|
|
56
|
+
/** Deletes the backing correspondence through the host. */
|
|
48
57
|
onDelete?: () => void | Promise<void>;
|
|
49
58
|
}
|
|
50
59
|
interface WorkspaceCorrespondenceFileProps extends Omit<WorkspaceCorrespondenceCardProps, "body" | "fields" | "kind" | "onChange" | "onDelete" | "onOpen" | "onSend" | "path" | "saveState" | "state"> {
|
|
@@ -72,7 +81,7 @@ declare function WorkspaceCorrespondenceCard({
|
|
|
72
81
|
ref,
|
|
73
82
|
...props
|
|
74
83
|
}: WorkspaceCorrespondenceCardProps & {
|
|
75
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
84
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
|
|
76
85
|
}): React.JSX.Element;
|
|
77
86
|
/**
|
|
78
87
|
* Query-backed reviewed correspondence. The host supplies normalized reads
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { S as FileIcon, d as CheckIcon } from "../../icons-
|
|
2
|
+
import { S as FileIcon, d as CheckIcon } from "../../icons-cuEtsgj9.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
-
import { Field } from "../foundations/Field.js";
|
|
5
|
-
import { Textarea } from "../foundations/Textarea.js";
|
|
6
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
7
5
|
import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { Field } from "../foundations/Field.js";
|
|
7
|
+
import { Textarea } from "../foundations/Textarea.js";
|
|
10
8
|
import { Input } from "../foundations/Input.js";
|
|
9
|
+
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
10
|
+
import { Card, CardAction, CardContent, CardFooter, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
11
11
|
import { EmailMessageCard, SlackMessageCard } from "../ai-sdk/ConnectedAppCards.js";
|
|
12
|
-
import { i as WorkspaceDeleteControl, r as httpUrl, t as FaviconMark } from "../../workspace-assets-
|
|
12
|
+
import { i as WorkspaceDeleteControl, r as httpUrl, t as FaviconMark } from "../../workspace-assets-Bg7XhPsk.js";
|
|
13
13
|
import * as React from "react";
|
|
14
14
|
import { createElement } from "react";
|
|
15
15
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -108,7 +108,10 @@ function GenericWorkspaceCorrespondenceCard({ className, body, fields, kind, pat
|
|
|
108
108
|
/* @__PURE__ */ jsxs(CardHeader, { children: [/* @__PURE__ */ jsxs(CardTitle, {
|
|
109
109
|
id: titleId,
|
|
110
110
|
className: "connected-app-card__title",
|
|
111
|
-
render: /* @__PURE__ */ jsx("h3", {
|
|
111
|
+
render: (props) => /* @__PURE__ */ jsx("h3", {
|
|
112
|
+
...props,
|
|
113
|
+
children: props.children
|
|
114
|
+
}),
|
|
112
115
|
children: [/* @__PURE__ */ jsx("span", {
|
|
113
116
|
className: "connected-app-card__icon",
|
|
114
117
|
"aria-hidden": "true",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ThinkFullAppPanel } from "./ThinkFullApp.js";
|
|
2
1
|
import { WorkspaceConceptQueryOptions } from "./WorkspaceConcept.js";
|
|
3
2
|
import { CardProps } from "../foundations/Card.js";
|
|
4
3
|
import * as React from "react";
|
|
@@ -71,11 +70,8 @@ interface WorkspaceExecutionFileProps extends Omit<WorkspaceExecutionCardProps,
|
|
|
71
70
|
fallback?: React.ReactNode;
|
|
72
71
|
}
|
|
73
72
|
interface WorkspaceExecutionsPanelProps extends Omit<React.HTMLAttributes<HTMLElement>, "children"> {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/** Query failure to show instead of the empty state. Loaded modules win. */
|
|
77
|
-
error?: string;
|
|
78
|
-
onRetry?: () => void;
|
|
73
|
+
/** Shared workspace query and host actions, also used by inline module cards. */
|
|
74
|
+
source: WorkspaceExecutionSource;
|
|
79
75
|
}
|
|
80
76
|
declare function WorkspaceExecutionCard({
|
|
81
77
|
module,
|
|
@@ -100,16 +96,11 @@ declare function WorkspaceExecutionFile({
|
|
|
100
96
|
*/
|
|
101
97
|
declare function WorkspaceExecutionsPanel({
|
|
102
98
|
className,
|
|
103
|
-
|
|
104
|
-
loading,
|
|
105
|
-
modules,
|
|
106
|
-
onRetry,
|
|
99
|
+
source,
|
|
107
100
|
ref,
|
|
108
101
|
...props
|
|
109
102
|
}: WorkspaceExecutionsPanelProps & {
|
|
110
|
-
ref?: React.Ref<HTMLElement>;
|
|
103
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLElement>;
|
|
111
104
|
}): React.JSX.Element;
|
|
112
|
-
/** Canonical workbench descriptor; hosts supply only the source adapter. */
|
|
113
|
-
declare function workspaceExecutionsPanel(source: WorkspaceExecutionSource): ThinkFullAppPanel;
|
|
114
105
|
//#endregion
|
|
115
|
-
export { WorkspaceExecution, WorkspaceExecutionCard, WorkspaceExecutionCardProps, WorkspaceExecutionFile, WorkspaceExecutionFileProps, WorkspaceExecutionOutcome, WorkspaceExecutionParam, WorkspaceExecutionParamType, WorkspaceExecutionRun, WorkspaceExecutionRunView, WorkspaceExecutionSource, WorkspaceExecutionView, WorkspaceExecutionViewOutcome, WorkspaceExecutionsPanel, WorkspaceExecutionsPanelProps
|
|
106
|
+
export { WorkspaceExecution, WorkspaceExecutionCard, WorkspaceExecutionCardProps, WorkspaceExecutionFile, WorkspaceExecutionFileProps, WorkspaceExecutionOutcome, WorkspaceExecutionParam, WorkspaceExecutionParamType, WorkspaceExecutionRun, WorkspaceExecutionRunView, WorkspaceExecutionSource, WorkspaceExecutionView, WorkspaceExecutionViewOutcome, WorkspaceExecutionsPanel, WorkspaceExecutionsPanelProps };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { K as SpinnerIcon, S as FileIcon, Z as TerminalIcon, d as CheckIcon, z as PlayIcon } from "../../icons-
|
|
2
|
+
import { K as SpinnerIcon, S as FileIcon, Z as TerminalIcon, d as CheckIcon, z as PlayIcon } from "../../icons-cuEtsgj9.js";
|
|
3
3
|
import { Button } from "../foundations/Button.js";
|
|
4
|
-
import { Field } from "../foundations/Field.js";
|
|
5
|
-
import { Form } from "../foundations/Form.js";
|
|
6
4
|
import { IconButton } from "../foundations/IconButton.js";
|
|
7
5
|
import { a as formatErrorMessage, o as formatUnknownValue, r as firstLine } from "../../format-COCyV98Z.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { Field } from "../foundations/Field.js";
|
|
7
|
+
import { Form } from "../foundations/Form.js";
|
|
8
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
10
9
|
import { Input } from "../foundations/Input.js";
|
|
10
|
+
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
11
11
|
import { Checkbox } from "../foundations/Checkbox.js";
|
|
12
|
-
import {
|
|
13
|
-
import { i as WorkspaceDeleteControl, n as WorkspaceComposerLink, r as httpUrl, t as FaviconMark } from "../../workspace-assets-
|
|
12
|
+
import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "../foundations/Card.js";
|
|
13
|
+
import { i as WorkspaceDeleteControl, n as WorkspaceComposerLink, r as httpUrl, t as FaviconMark } from "../../workspace-assets-Bg7XhPsk.js";
|
|
14
14
|
import * as React from "react";
|
|
15
15
|
import { createElement } from "react";
|
|
16
16
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -191,7 +191,10 @@ function WorkspaceExecutionCardSession({ className, module, ref, ...props }) {
|
|
|
191
191
|
/* @__PURE__ */ jsxs(CardTitle, {
|
|
192
192
|
id: titleId,
|
|
193
193
|
className: "connected-app-card__title",
|
|
194
|
-
render: /* @__PURE__ */ jsx("h3", {
|
|
194
|
+
render: (props) => /* @__PURE__ */ jsx("h3", {
|
|
195
|
+
...props,
|
|
196
|
+
children: props.children
|
|
197
|
+
}),
|
|
195
198
|
children: [/* @__PURE__ */ jsx("span", {
|
|
196
199
|
className: "connected-app-card__icon",
|
|
197
200
|
"aria-hidden": "true",
|
|
@@ -251,13 +254,15 @@ function WorkspaceExecutionFile({ fallback = null, path, source, ...props }) {
|
|
|
251
254
|
return /* @__PURE__ */ jsx(WorkspaceExecutionCard, {
|
|
252
255
|
...props,
|
|
253
256
|
module: executionWithSource(module, source)
|
|
254
|
-
});
|
|
257
|
+
}, JSON.stringify(source.queryOptions.queryKey));
|
|
255
258
|
}
|
|
256
259
|
/**
|
|
257
260
|
* Workbench library. Same card as the inline placement. A query failure with
|
|
258
261
|
* nothing loaded renders as a quiet inline error, never as an empty library.
|
|
259
262
|
*/
|
|
260
|
-
function WorkspaceExecutionsPanel({ className,
|
|
263
|
+
function WorkspaceExecutionsPanel({ className, source, ref, ...props }) {
|
|
264
|
+
const query = useQuery(source.queryOptions);
|
|
265
|
+
const modules = query.data ?? [];
|
|
261
266
|
return /* @__PURE__ */ jsx("section", {
|
|
262
267
|
ref,
|
|
263
268
|
"data-slot": "workspace-executions-panel",
|
|
@@ -266,26 +271,26 @@ function WorkspaceExecutionsPanel({ className, error, loading = false, modules,
|
|
|
266
271
|
"aria-label": props["aria-label"] ?? "Executions",
|
|
267
272
|
children: modules.length > 0 ? /* @__PURE__ */ jsx("ul", {
|
|
268
273
|
className: "sigvelo-stack-list sigvelo-stack",
|
|
269
|
-
children: modules.map((module) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceExecutionCard, { module }) }, module.path))
|
|
270
|
-
}) : error
|
|
274
|
+
children: modules.map((module) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WorkspaceExecutionCard, { module: executionWithSource(module, source) }) }, module.path))
|
|
275
|
+
}) : query.error ? /* @__PURE__ */ jsx(EmptyState, {
|
|
271
276
|
icon: /* @__PURE__ */ jsx(TerminalIcon, {}),
|
|
272
277
|
title: "Executions unavailable",
|
|
273
|
-
description: error,
|
|
274
|
-
children:
|
|
278
|
+
description: formatErrorMessage(query.error),
|
|
279
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
275
280
|
size: "sm",
|
|
276
281
|
variant: "outline",
|
|
277
282
|
color: "neutral",
|
|
278
|
-
onClick:
|
|
283
|
+
onClick: () => void query.refetch(),
|
|
279
284
|
children: "Retry"
|
|
280
|
-
})
|
|
281
|
-
}) :
|
|
285
|
+
})
|
|
286
|
+
}) : query.isPending ? /* @__PURE__ */ jsx(EmptyState, {
|
|
282
287
|
icon: /* @__PURE__ */ jsx(SpinnerIcon, {}),
|
|
283
288
|
title: "Loading modules"
|
|
284
289
|
}) : /* @__PURE__ */ jsx(EmptyState, {
|
|
285
290
|
icon: /* @__PURE__ */ jsx(TerminalIcon, {}),
|
|
286
291
|
title: "No modules"
|
|
287
292
|
})
|
|
288
|
-
});
|
|
293
|
+
}, JSON.stringify(source.queryOptions.queryKey));
|
|
289
294
|
}
|
|
290
295
|
function executionWithSource(module, source) {
|
|
291
296
|
const { onDelete, onOpen, onRun } = source;
|
|
@@ -307,24 +312,5 @@ function executionWithSource(module, source) {
|
|
|
307
312
|
onDelete: onDelete ? () => onDelete(module.path) : void 0
|
|
308
313
|
};
|
|
309
314
|
}
|
|
310
|
-
function WorkspaceExecutionSourcePanel({ source }) {
|
|
311
|
-
const query = useQuery(source.queryOptions);
|
|
312
|
-
return /* @__PURE__ */ jsx(WorkspaceExecutionsPanel, {
|
|
313
|
-
modules: (query.data ?? []).map((module) => executionWithSource(module, source)),
|
|
314
|
-
error: query.isError ? formatErrorMessage(query.error) : void 0,
|
|
315
|
-
loading: query.isPending,
|
|
316
|
-
onRetry: query.isError ? () => void query.refetch() : void 0,
|
|
317
|
-
"aria-busy": query.isFetching || void 0
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
/** Canonical workbench descriptor; hosts supply only the source adapter. */
|
|
321
|
-
function workspaceExecutionsPanel(source) {
|
|
322
|
-
return {
|
|
323
|
-
id: "executions",
|
|
324
|
-
label: "Executions",
|
|
325
|
-
icon: /* @__PURE__ */ jsx(TerminalIcon, {}),
|
|
326
|
-
render: () => /* @__PURE__ */ jsx(WorkspaceExecutionSourcePanel, { source })
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
315
|
//#endregion
|
|
330
|
-
export { WorkspaceExecutionCard, WorkspaceExecutionFile, WorkspaceExecutionsPanel
|
|
316
|
+
export { WorkspaceExecutionCard, WorkspaceExecutionFile, WorkspaceExecutionsPanel };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-Bh9-Jo1r.js";
|
|
2
|
-
import { b as WorkspaceState } from "../../Workspace-
|
|
2
|
+
import { b as WorkspaceState } from "../../Workspace-HzGrWDX3.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/agents-sdk/WorkspaceExplorer.d.ts
|
|
6
6
|
interface WorkspaceExplorerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
7
|
+
/** Workspace state that owns the file tree, selection, loading, and refresh behavior. */
|
|
7
8
|
workspace: WorkspaceState;
|
|
8
9
|
/** Host-owned URL/history adapter shared by chat links and the file explorer. */
|
|
9
10
|
navigation: WorkspaceNavigationAdapter;
|
|
@@ -15,7 +16,9 @@ interface WorkspaceExplorerProps extends Omit<React.HTMLAttributes<HTMLDivElemen
|
|
|
15
16
|
actions?: React.ReactNode;
|
|
16
17
|
/** Show the file filter input. Hidden by default to keep the browser compact. */
|
|
17
18
|
showFilter?: boolean;
|
|
19
|
+
/** Placeholder for the optional file filter. */
|
|
18
20
|
filterPlaceholder?: string;
|
|
21
|
+
/** Content shown when the workspace contains no visible files. */
|
|
19
22
|
emptyState?: React.ReactNode;
|
|
20
23
|
}
|
|
21
24
|
/**
|
|
@@ -26,7 +29,7 @@ interface WorkspaceExplorerProps extends Omit<React.HTMLAttributes<HTMLDivElemen
|
|
|
26
29
|
declare function WorkspaceExplorer({
|
|
27
30
|
...props
|
|
28
31
|
}: WorkspaceExplorerProps & {
|
|
29
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
32
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
|
|
30
33
|
}): React.JSX.Element;
|
|
31
34
|
//#endregion
|
|
32
35
|
export { WorkspaceExplorer, WorkspaceExplorerProps };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
|
|
3
|
-
import {
|
|
3
|
+
import { n as WorkspaceNavigationProvider, r as resolveWorkspaceLink } from "../../WorkspaceLink-BYZG-V_I.js";
|
|
4
|
+
import { WorkspaceNavigationRestorationBoundary, useRequiredWorkspaceNavigationRestoration } from "./WorkspaceNavigationRestoration.js";
|
|
4
5
|
import { WorkspaceBrowser } from "./WorkspaceBrowser.js";
|
|
5
|
-
import { t as WorkspaceFileView } from "../../WorkspaceFileView-
|
|
6
|
+
import { t as WorkspaceFileView } from "../../WorkspaceFileView-DYPtRVpM.js";
|
|
6
7
|
import * as React from "react";
|
|
7
8
|
import { jsx } from "react/jsx-runtime";
|
|
8
9
|
//#region src/components/agents-sdk/WorkspaceExplorer.tsx
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as isWorkspaceTextPath, a as WorkspaceMediaInfo, c as WorkspaceMediaTrackKind, d as inferWorkspaceLanguage, f as inferWorkspaceMedia, g as isWorkspaceSkillPath, h as isWorkspaceMediaPath, i as WorkspaceFileState, l as WorkspaceSkillDocument, m as isWorkspaceMarkdownPath, n as WorkspaceFileAssetRequest, o as WorkspaceMediaKind, p as inferWorkspaceMimeType, r as WorkspaceFileAssetResolver, s as WorkspaceMediaTrack, t as WorkspaceFileAsset, u as getWorkspaceBasename, v as parseWorkspaceSkill } from "../../WorkspaceFile-
|
|
1
|
+
import { _ as isWorkspaceTextPath, a as WorkspaceMediaInfo, c as WorkspaceMediaTrackKind, d as inferWorkspaceLanguage, f as inferWorkspaceMedia, g as isWorkspaceSkillPath, h as isWorkspaceMediaPath, i as WorkspaceFileState, l as WorkspaceSkillDocument, m as isWorkspaceMarkdownPath, n as WorkspaceFileAssetRequest, o as WorkspaceMediaKind, p as inferWorkspaceMimeType, r as WorkspaceFileAssetResolver, s as WorkspaceMediaTrack, t as WorkspaceFileAsset, u as getWorkspaceBasename, v as parseWorkspaceSkill } from "../../WorkspaceFile-Bouauobc.js";
|
|
2
2
|
export { WorkspaceFileAsset, WorkspaceFileAssetRequest, WorkspaceFileAssetResolver, WorkspaceFileState, WorkspaceMediaInfo, WorkspaceMediaKind, WorkspaceMediaTrack, WorkspaceMediaTrackKind, WorkspaceSkillDocument, getWorkspaceBasename, inferWorkspaceLanguage, inferWorkspaceMedia, inferWorkspaceMimeType, isWorkspaceMarkdownPath, isWorkspaceMediaPath, isWorkspaceSkillPath, isWorkspaceTextPath, parseWorkspaceSkill };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as WorkspaceFileView } from "../../WorkspaceFileView-
|
|
1
|
+
import { t as WorkspaceFileView } from "../../WorkspaceFileView-DYPtRVpM.js";
|
|
2
2
|
export { WorkspaceFileView };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as WorkspaceNavigationProvider, r as resolveWorkspaceLink, t as WorkspaceFileLink } from "../../WorkspaceLink-
|
|
1
|
+
import { n as WorkspaceNavigationProvider, r as resolveWorkspaceLink, t as WorkspaceFileLink } from "../../WorkspaceLink-BYZG-V_I.js";
|
|
2
2
|
export { WorkspaceFileLink, WorkspaceNavigationProvider, resolveWorkspaceLink };
|
|
@@ -1,2 +1,61 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as WorkspaceFileAssetResolver } from "../../WorkspaceFile-Bouauobc.js";
|
|
2
|
+
import { y as WorkspaceSource } from "../../Workspace-HzGrWDX3.js";
|
|
3
|
+
import { QueryClient } from "@tanstack/react-query";
|
|
4
|
+
|
|
5
|
+
//#region src/components/agents-sdk/WorkspaceLive.d.ts
|
|
6
|
+
type WorkspaceChange = {
|
|
7
|
+
type: "changed";
|
|
8
|
+
path: string;
|
|
9
|
+
movedFrom?: string;
|
|
10
|
+
} | {
|
|
11
|
+
type: "unknown";
|
|
12
|
+
};
|
|
13
|
+
/** Host adapter for a native workspace observer. */
|
|
14
|
+
interface WorkspaceChangeSource {
|
|
15
|
+
start?(): void | Promise<void>;
|
|
16
|
+
subscribe(listener: (change: WorkspaceChange) => void): () => void;
|
|
17
|
+
}
|
|
18
|
+
declare function invalidateWorkspaceDirectories(queryClient: QueryClient, sourceKey: string, directories: Iterable<string>, root: string): void;
|
|
19
|
+
interface UseWorkspaceLiveQueriesOptions {
|
|
20
|
+
/** Native observer adapter. Omit for hosts without workspace observation. */
|
|
21
|
+
changes?: WorkspaceChangeSource;
|
|
22
|
+
sourceKey: string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* The host's workspace boundary. Required, and the same value the concept
|
|
25
|
+
* options were built with: invalidation is prefix-matched on it, so a root
|
|
26
|
+
* that disagrees with the queries silently invalidates nothing.
|
|
27
|
+
*/
|
|
28
|
+
root: string;
|
|
29
|
+
/** Workspace read adapter used to refresh an observed open file in order. */
|
|
30
|
+
source?: WorkspaceSource;
|
|
31
|
+
/** Route-owned open file. Omit or pass null when Files has no selection. */
|
|
32
|
+
selectedPath?: string | null;
|
|
33
|
+
resolveFileAsset?: WorkspaceFileAssetResolver;
|
|
34
|
+
maxInlineAssetBytes?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Disposable freshness tick for hosts without native observation — for
|
|
37
|
+
* example a serialization of settled-turn state. Every change of a defined
|
|
38
|
+
* value invalidates the source's concept queries. It never enters query
|
|
39
|
+
* identity, so data, mutation state, and form drafts survive the refresh.
|
|
40
|
+
*/
|
|
41
|
+
revision?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Synchronize external workspace freshness with the design system's Query
|
|
45
|
+
* resources. This is the one external-system effect: native observer events
|
|
46
|
+
* and host revision ticks both land here as targeted invalidation against
|
|
47
|
+
* stable query keys. Hosts only supply events; neither layer adds another
|
|
48
|
+
* watcher.
|
|
49
|
+
*/
|
|
50
|
+
declare function useWorkspaceLiveQueries({
|
|
51
|
+
changes,
|
|
52
|
+
maxInlineAssetBytes,
|
|
53
|
+
resolveFileAsset,
|
|
54
|
+
selectedPath,
|
|
55
|
+
source,
|
|
56
|
+
sourceKey,
|
|
57
|
+
root,
|
|
58
|
+
revision
|
|
59
|
+
}: UseWorkspaceLiveQueriesOptions): void;
|
|
60
|
+
//#endregion
|
|
2
61
|
export { UseWorkspaceLiveQueriesOptions, WorkspaceChange, WorkspaceChangeSource, invalidateWorkspaceDirectories, useWorkspaceLiveQueries };
|
|
@@ -1,2 +1,48 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { O as MessageResponseProps } from "../../Message-DyaTBiV7.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/agents-sdk/WorkspaceMessageResponse.d.ts
|
|
5
|
+
interface WorkspaceFileRenderInput {
|
|
6
|
+
label: string;
|
|
7
|
+
path: string;
|
|
8
|
+
/** Shared workspace link element; hosts pass it through to the preview unchanged. */
|
|
9
|
+
sourceLink: React.ReactElement;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Host callback for one standalone workspace file link in an assistant
|
|
13
|
+
* paragraph. Return a node to replace the link, or `null` to keep it.
|
|
14
|
+
*/
|
|
15
|
+
type WorkspaceFileRenderer = (file: WorkspaceFileRenderInput) => React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Ambient workspace-file renderer for every `WorkspaceMessageResponse` below,
|
|
18
|
+
* and the only way to supply one. The value is read inside the promoted
|
|
19
|
+
* paragraph, not by the response component, so a host handing down a fresh
|
|
20
|
+
* callback every render re-renders only the paragraphs — the memoized Markdown
|
|
21
|
+
* pipeline is untouched and promoted cards keep their state.
|
|
22
|
+
* `ThinkChat.MessageContent` provides it from its `renderWorkspaceFile` prop; hosts
|
|
23
|
+
* composing `WorkspaceMessageResponse` directly provide it once at their
|
|
24
|
+
* conversation root.
|
|
25
|
+
*/
|
|
26
|
+
declare function WorkspaceFileRendererProvider({
|
|
27
|
+
children,
|
|
28
|
+
renderWorkspaceFile
|
|
29
|
+
}: {
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
renderWorkspaceFile: WorkspaceFileRenderer | undefined;
|
|
32
|
+
}): React.JSX.Element;
|
|
33
|
+
interface WorkspaceMessageResponseProps extends MessageResponseProps {
|
|
34
|
+
/**
|
|
35
|
+
* Whether standalone workspace file links may be promoted. `ThinkChat`
|
|
36
|
+
* passes `false` for user messages: user links remain ordinary navigation.
|
|
37
|
+
*/
|
|
38
|
+
promoteWorkspaceFiles?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/** Adds workspace-aware Markdown links when rendered inside a workspace provider. */
|
|
41
|
+
declare const WorkspaceMessageResponse: React.MemoExoticComponent<({
|
|
42
|
+
components,
|
|
43
|
+
rehypePlugins,
|
|
44
|
+
promoteWorkspaceFiles,
|
|
45
|
+
...props
|
|
46
|
+
}: WorkspaceMessageResponseProps) => React.JSX.Element>;
|
|
47
|
+
//#endregion
|
|
2
48
|
export { WorkspaceFileRenderInput, WorkspaceFileRenderer, WorkspaceFileRendererProvider, WorkspaceMessageResponse, WorkspaceMessageResponseProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as WorkspaceMessageResponse, t as WorkspaceFileRendererProvider } from "../../WorkspaceMessageResponse-
|
|
1
|
+
import { n as WorkspaceMessageResponse, t as WorkspaceFileRendererProvider } from "../../WorkspaceMessageResponse-CUJk9_P5.js";
|
|
2
2
|
export { WorkspaceFileRendererProvider, WorkspaceMessageResponse };
|
|
@@ -15,7 +15,8 @@ interface WorkspaceMountManagerProps {
|
|
|
15
15
|
onAdd: () => void;
|
|
16
16
|
onReconnect: (mount: WorkspaceMountItem) => void;
|
|
17
17
|
onRemove: (mount: WorkspaceMountItem) => void;
|
|
18
|
-
|
|
18
|
+
/** Caller-owned button, including its accessible name and optional toolbar composition. */
|
|
19
|
+
trigger: React.ReactElement;
|
|
19
20
|
}
|
|
20
21
|
/** Controlled local-mount presentation; native handles and persistence stay in the host. */
|
|
21
22
|
declare function WorkspaceMountManager({
|
|
@@ -26,7 +27,7 @@ declare function WorkspaceMountManager({
|
|
|
26
27
|
onAdd,
|
|
27
28
|
onReconnect,
|
|
28
29
|
onRemove,
|
|
29
|
-
|
|
30
|
+
trigger
|
|
30
31
|
}: WorkspaceMountManagerProps): React.JSX.Element;
|
|
31
32
|
//#endregion
|
|
32
33
|
export { WorkspaceMountItem, WorkspaceMountManager, WorkspaceMountManagerProps, WorkspaceMountPermission };
|