@mcp-b/react-components 0.29.0 → 0.30.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/{AgentActivity-D3OvrC02.d.ts → AgentActivity-SP1WfLDW.d.ts} +2 -2
- package/dist/{AgentChat-Dy3cKCd-.d.ts → AgentChat-CV-GuYA6.d.ts} +21 -11
- package/dist/{AgentChatStartScreen-DXZ0hAX0.d.ts → AgentChatStartScreen-CO49yepa.d.ts} +2 -2
- package/dist/{AgentMessageParts-CyD2UB3V.d.ts → AgentMessageParts-C7L-Mv9U.d.ts} +2 -2
- package/dist/{AgentToolRunsContext-BVe4stgw.d.ts → AgentToolRunsContext-Cgve-Upx.d.ts} +1 -1
- package/dist/{BrowserLiveView-BV5qgFgI.d.ts → BrowserLiveView-tJTWkoyu.d.ts} +1 -1
- package/dist/{BrowserReplay-xWvRjRAC.d.ts → BrowserReplay-B0BQZr-N.d.ts} +1 -1
- package/dist/{Button-SBIz6Lqi.d.ts → Button-CZt3yywF.d.ts} +1 -1
- package/dist/{CodeBlock-BUfEhDia.js → CodeBlock-B5I7wje1.js} +4 -69
- package/dist/{CodeBlock-yMpGqScn.d.ts → CodeBlock-DzGhYyNe.d.ts} +5 -11
- package/dist/{Combobox-DI6xcQjc.d.ts → Combobox-WrrDDaEv.d.ts} +1 -1
- package/dist/{Dialog-BD8NBKaE.d.ts → Dialog-DeOSJ0Oy.d.ts} +1 -1
- package/dist/{FileTree-XOLP3Yvo.js → FileTree-DbQMpvxV.js} +64 -71
- package/dist/{IconButton-CFKhu6OR.d.ts → IconButton-BAUFhUk8.d.ts} +2 -2
- package/dist/{Menu-L6MZm-7N.d.ts → Menu-DVmjBIuM.d.ts} +1 -1
- package/dist/MenuDisclosureGroup-BUOZ42me.js +32 -0
- package/dist/{ModelSelector-CRdvHT_b.js → ModelSelector-DZcpUBgn.js} +32 -30
- package/dist/{PromptInput-B75Np5VB.d.ts → PromptInput-DOyee1kM.d.ts} +28 -90
- package/dist/{Select-B_13gg_J.d.ts → Select-D96d09ww.d.ts} +1 -1
- package/dist/{SessionCompaction-DMa1vv6Y.d.ts → SessionCompaction-CmTJFpzj.d.ts} +32 -2
- package/dist/{Tabs-C49J5m0Q.d.ts → Tabs-Ptrbaynh.d.ts} +1 -1
- package/dist/{ThinkChat-Bp-nAnoW.js → ThinkChat-yid8e_Jb.js} +46 -17
- package/dist/{ThinkChatActivity-Dq0lOAgw.d.ts → ThinkChatActivity-CgqpROz_.d.ts} +5 -5
- package/dist/{ThinkChatActivitySummary-F062wneC.d.ts → ThinkChatActivitySummary-teRjrPxW.d.ts} +3 -3
- package/dist/{ThinkChatContext-B-Nk84Wi.d.ts → ThinkChatContext-COIgzkYp.d.ts} +1 -1
- package/dist/{ThinkChatToolParts-BfroXQ4F.d.ts → ThinkChatToolParts-D4qcnnxt.d.ts} +3 -13
- package/dist/{ThinkExecutionRun-ChhWhOoU.d.ts → ThinkExecutionRun-lYYgyeE1.d.ts} +1 -1
- package/dist/{ThinkRecoveryNotice-D6gYcBbr.d.ts → ThinkRecoveryNotice-DGWr94rk.d.ts} +2 -2
- package/dist/{Toggle-JKZ43D5S.d.ts → Toggle-DLrIf5YH.d.ts} +1 -1
- package/dist/{ToggleGroup-BW1jrhAF.d.ts → ToggleGroup-CSBWfPXo.d.ts} +12 -12
- package/dist/{Workspace-Bn6In4wi.d.ts → Workspace-EhvvlHOB.d.ts} +2 -2
- package/dist/{WorkspaceExplorer-D0aiscG6.d.ts → WorkspaceExplorer-DygQnEyi.d.ts} +3 -3
- package/dist/{WorkspaceFile-DMtRMwVv.d.ts → WorkspaceFile-C8Riev9j.d.ts} +2 -2
- package/dist/{WorkspaceFileView-CKEmUyeT.js → WorkspaceFileView-BeUpr6TU.js} +73 -96
- package/dist/{WorkspaceLink-O-EBKUJ8.d.ts → WorkspaceLink-DQogVe8E.d.ts} +1 -1
- package/dist/{WorkspaceLink-BYYeTQLf.js → WorkspaceLink-DZeLe_jN.js} +3 -4
- package/dist/WorkspaceMessageResponse-BWbkIELl.js +100 -0
- package/dist/{attachment-preview-DIs50Q0h.js → attachment-preview-1CXJvrmb.js} +1 -1
- package/dist/components/{AgentActivity.d.ts → agents-sdk/AgentActivity.d.ts} +1 -1
- package/dist/components/{AgentActivity.js → agents-sdk/AgentActivity.js} +3 -3
- package/dist/components/{AgentActivityPreview.d.ts → agents-sdk/AgentActivityPreview.d.ts} +3 -3
- package/dist/components/{AgentActivityPreview.js → agents-sdk/AgentActivityPreview.js} +12 -10
- package/dist/components/{AgentChat.d.ts → agents-sdk/AgentChat.d.ts} +1 -1
- package/dist/components/{AgentChat.js → agents-sdk/AgentChat.js} +57 -32
- package/dist/components/{AgentToolRunsContext.d.ts → agents-sdk/AgentToolRunsContext.d.ts} +1 -1
- package/dist/components/{AgentToolRunsContext.js → agents-sdk/AgentToolRunsContext.js} +1 -1
- package/dist/components/agents-sdk/BrowserLiveView.d.ts +2 -0
- package/dist/components/{BrowserLiveView.js → agents-sdk/BrowserLiveView.js} +7 -7
- package/dist/components/agents-sdk/BrowserReplay.d.ts +2 -0
- package/dist/components/{BrowserReplay.js → agents-sdk/BrowserReplay.js} +7 -7
- package/dist/components/{BrowserRunPanel.d.ts → agents-sdk/BrowserRunPanel.d.ts} +1 -1
- package/dist/components/{BrowserRunPanel.js → agents-sdk/BrowserRunPanel.js} +6 -6
- package/dist/components/{McpConnectionRequest.d.ts → agents-sdk/McpConnectionRequest.d.ts} +3 -15
- package/dist/components/{McpConnectionRequest.js → agents-sdk/McpConnectionRequest.js} +46 -18
- package/dist/components/agents-sdk/McpConnectorForm.d.ts +39 -0
- package/dist/components/agents-sdk/McpConnectorForm.js +151 -0
- package/dist/components/{McpPluginCatalog.d.ts → agents-sdk/McpPluginCatalog.d.ts} +3 -3
- package/dist/components/{McpPluginCatalog.js → agents-sdk/McpPluginCatalog.js} +23 -47
- package/dist/components/{McpServerPicker.d.ts → agents-sdk/McpServerPicker.d.ts} +14 -6
- package/dist/components/{McpServerPicker.js → agents-sdk/McpServerPicker.js} +35 -45
- package/dist/components/{ModelSelector.d.ts → agents-sdk/ModelSelector.d.ts} +4 -4
- package/dist/components/{ModelSelector.js → agents-sdk/ModelSelector.js} +1 -1
- package/dist/components/agents-sdk/PromptInputApproval.d.ts +44 -0
- package/dist/components/agents-sdk/PromptInputApproval.js +61 -0
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +11 -0
- package/dist/components/agents-sdk/PromptInputCommands.js +33 -0
- package/dist/components/agents-sdk/SessionCompaction.d.ts +2 -0
- package/dist/components/{SessionCompaction.js → agents-sdk/SessionCompaction.js} +32 -11
- package/dist/components/{SubagentRunDetails.d.ts → agents-sdk/SubagentRunDetails.d.ts} +1 -1
- package/dist/components/{SubagentRunDetails.js → agents-sdk/SubagentRunDetails.js} +4 -4
- package/dist/components/{SubagentRunIndicator.d.ts → agents-sdk/SubagentRunIndicator.d.ts} +1 -1
- package/dist/components/{SubagentRunIndicator.js → agents-sdk/SubagentRunIndicator.js} +3 -3
- package/dist/components/{SubagentRunList.d.ts → agents-sdk/SubagentRunList.d.ts} +1 -1
- package/dist/components/{SubagentRunList.js → agents-sdk/SubagentRunList.js} +2 -2
- package/dist/components/{SubagentRunSelector.d.ts → agents-sdk/SubagentRunSelector.d.ts} +1 -1
- package/dist/components/{SubagentRunSelector.js → agents-sdk/SubagentRunSelector.js} +7 -7
- package/dist/components/{ThinkChat.d.ts → agents-sdk/ThinkChat.d.ts} +16 -16
- package/dist/components/{ThinkChat.js → agents-sdk/ThinkChat.js} +3 -3
- package/dist/components/{ThinkChatActivity.d.ts → agents-sdk/ThinkChatActivity.d.ts} +3 -3
- package/dist/components/{ThinkChatActivity.js → agents-sdk/ThinkChatActivity.js} +6 -6
- package/dist/components/{ThinkChatActivitySummary.d.ts → agents-sdk/ThinkChatActivitySummary.d.ts} +1 -1
- package/dist/components/{ThinkChatActivitySummary.js → agents-sdk/ThinkChatActivitySummary.js} +5 -4
- package/dist/components/{ThinkChatContext.d.ts → agents-sdk/ThinkChatContext.d.ts} +1 -1
- package/dist/components/{ThinkChatContext.js → agents-sdk/ThinkChatContext.js} +1 -1
- package/dist/components/{ThinkChatToolPanels.d.ts → agents-sdk/ThinkChatToolPanels.d.ts} +2 -2
- package/dist/components/{ThinkChatToolPanels.js → agents-sdk/ThinkChatToolPanels.js} +5 -5
- package/dist/components/agents-sdk/ThinkChatToolParts.d.ts +2 -0
- package/dist/components/{ThinkChatToolParts.js → agents-sdk/ThinkChatToolParts.js} +3 -33
- package/dist/components/{ThinkExecutionDetail.d.ts → agents-sdk/ThinkExecutionDetail.d.ts} +2 -2
- package/dist/components/{ThinkExecutionDetail.js → agents-sdk/ThinkExecutionDetail.js} +5 -8
- package/dist/components/{ThinkExecutionRun.d.ts → agents-sdk/ThinkExecutionRun.d.ts} +1 -1
- package/dist/components/{ThinkExecutionRun.js → agents-sdk/ThinkExecutionRun.js} +2 -2
- package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +35 -0
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +59 -0
- package/dist/components/{ThinkExecutionWorkbench.d.ts → agents-sdk/ThinkExecutionWorkbench.d.ts} +2 -2
- package/dist/components/{ThinkExecutionWorkbench.js → agents-sdk/ThinkExecutionWorkbench.js} +15 -32
- package/dist/components/{ThinkFullApp.d.ts → agents-sdk/ThinkFullApp.d.ts} +21 -9
- package/dist/components/{ThinkFullApp.js → agents-sdk/ThinkFullApp.js} +46 -29
- package/dist/components/{ThinkFullAppViewSwitch.d.ts → agents-sdk/ThinkFullAppViewSwitch.d.ts} +2 -2
- package/dist/components/{ThinkFullAppViewSwitch.js → agents-sdk/ThinkFullAppViewSwitch.js} +4 -4
- package/dist/components/{ThinkPendingApproval.d.ts → agents-sdk/ThinkPendingApproval.d.ts} +1 -1
- package/dist/components/{ThinkPendingApproval.js → agents-sdk/ThinkPendingApproval.js} +3 -3
- package/dist/components/agents-sdk/ThinkRecoveryNotice.d.ts +2 -0
- package/dist/components/{ThinkRecoveryNotice.js → agents-sdk/ThinkRecoveryNotice.js} +3 -3
- package/dist/components/{ThinkRoutine.d.ts → agents-sdk/ThinkRoutine.d.ts} +2 -2
- package/dist/components/{ThinkRoutine.js → agents-sdk/ThinkRoutine.js} +1 -1
- package/dist/components/{ThinkRoutineBrowser.d.ts → agents-sdk/ThinkRoutineBrowser.d.ts} +1 -1
- package/dist/components/{ThinkRoutineBrowser.js → agents-sdk/ThinkRoutineBrowser.js} +9 -9
- package/dist/components/{ThinkRoutineDetail.d.ts → agents-sdk/ThinkRoutineDetail.d.ts} +1 -1
- package/dist/components/{ThinkRoutineDetail.js → agents-sdk/ThinkRoutineDetail.js} +4 -4
- package/dist/components/{ThinkRoutineForm.d.ts → agents-sdk/ThinkRoutineForm.d.ts} +1 -1
- package/dist/components/{ThinkRoutineForm.js → agents-sdk/ThinkRoutineForm.js} +9 -9
- package/dist/components/{ThinkRoutineLibrary.d.ts → agents-sdk/ThinkRoutineLibrary.d.ts} +5 -2
- package/dist/components/{ThinkRoutineLibrary.js → agents-sdk/ThinkRoutineLibrary.js} +47 -44
- package/dist/components/{ThinkRoutineRuns.d.ts → agents-sdk/ThinkRoutineRuns.d.ts} +2 -2
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +59 -0
- package/dist/components/{ThinkThreadPicker.d.ts → agents-sdk/ThinkThreadPicker.d.ts} +1 -1
- package/dist/components/{ThinkThreadPicker.js → agents-sdk/ThinkThreadPicker.js} +12 -14
- package/dist/components/{ThinkThreadShell.d.ts → agents-sdk/ThinkThreadShell.d.ts} +2 -2
- package/dist/components/{ThinkThreadShell.js → agents-sdk/ThinkThreadShell.js} +3 -3
- package/dist/components/{Workspace.d.ts → agents-sdk/Workspace.d.ts} +1 -1
- package/dist/components/{Workspace.js → agents-sdk/Workspace.js} +5 -7
- package/dist/components/{WorkspaceBrowser.d.ts → agents-sdk/WorkspaceBrowser.d.ts} +2 -2
- package/dist/components/{WorkspaceBrowser.js → agents-sdk/WorkspaceBrowser.js} +3 -3
- package/dist/components/{WorkspaceExplorer.d.ts → agents-sdk/WorkspaceExplorer.d.ts} +4 -4
- package/dist/components/{WorkspaceExplorer.js → agents-sdk/WorkspaceExplorer.js} +5 -7
- package/dist/components/{WorkspaceFile.d.ts → agents-sdk/WorkspaceFile.d.ts} +1 -1
- package/dist/components/{WorkspaceFile.js → agents-sdk/WorkspaceFile.js} +1 -1
- package/dist/components/{WorkspaceFileView.d.ts → agents-sdk/WorkspaceFileView.d.ts} +2 -2
- package/dist/components/agents-sdk/WorkspaceFileView.js +2 -0
- package/dist/components/{WorkspaceHeader.d.ts → agents-sdk/WorkspaceHeader.d.ts} +1 -1
- package/dist/components/{WorkspaceHeader.js → agents-sdk/WorkspaceHeader.js} +3 -3
- package/dist/components/{WorkspaceLink.d.ts → agents-sdk/WorkspaceLink.d.ts} +1 -1
- package/dist/components/{WorkspaceLink.js → agents-sdk/WorkspaceLink.js} +1 -1
- package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +12 -0
- package/dist/components/agents-sdk/WorkspaceMessageResponse.js +2 -0
- package/dist/components/{WorkspaceMountManager.d.ts → agents-sdk/WorkspaceMountManager.d.ts} +1 -1
- package/dist/components/{WorkspaceMountManager.js → agents-sdk/WorkspaceMountManager.js} +9 -9
- package/dist/components/{Activity.d.ts → ai-sdk/Activity.d.ts} +4 -4
- package/dist/components/{Activity.js → ai-sdk/Activity.js} +6 -6
- package/dist/components/{AgentAttention.d.ts → ai-sdk/AgentAttention.d.ts} +2 -2
- package/dist/components/{AgentAttention.js → ai-sdk/AgentAttention.js} +3 -3
- package/dist/components/{AgentChatMessageEditor.d.ts → ai-sdk/AgentChatMessageEditor.d.ts} +1 -1
- package/dist/components/{AgentChatMessageEditor.js → ai-sdk/AgentChatMessageEditor.js} +5 -5
- package/dist/components/{AgentChatStartScreen.d.ts → ai-sdk/AgentChatStartScreen.d.ts} +1 -1
- package/dist/components/{AgentChatStartScreen.js → ai-sdk/AgentChatStartScreen.js} +5 -5
- package/dist/components/{AgentChatTurnError.d.ts → ai-sdk/AgentChatTurnError.d.ts} +1 -1
- package/dist/components/{AgentChatTurnError.js → ai-sdk/AgentChatTurnError.js} +2 -2
- package/dist/components/{AgentMessageParts.d.ts → ai-sdk/AgentMessageParts.d.ts} +1 -1
- package/dist/components/{AgentMessageParts.js → ai-sdk/AgentMessageParts.js} +4 -28
- package/dist/components/{Approval.d.ts → ai-sdk/Approval.d.ts} +1 -1
- package/dist/components/{Approval.js → ai-sdk/Approval.js} +5 -5
- package/dist/components/{Artifact.d.ts → ai-sdk/Artifact.d.ts} +2 -2
- package/dist/components/{Artifact.js → ai-sdk/Artifact.js} +4 -4
- package/dist/components/{ChainOfThought.d.ts → ai-sdk/ChainOfThought.d.ts} +3 -3
- package/dist/components/{ChainOfThought.js → ai-sdk/ChainOfThought.js} +4 -4
- package/dist/components/{Checkpoint.d.ts → ai-sdk/Checkpoint.d.ts} +2 -2
- package/dist/components/{Checkpoint.js → ai-sdk/Checkpoint.js} +4 -4
- package/dist/components/ai-sdk/CodeBlock.d.ts +2 -0
- package/dist/components/{CodeBlock.js → ai-sdk/CodeBlock.js} +2 -2
- package/dist/components/{Context.d.ts → ai-sdk/Context.d.ts} +2 -2
- package/dist/components/{Context.js → ai-sdk/Context.js} +5 -5
- package/dist/components/{Conversation.d.ts → ai-sdk/Conversation.d.ts} +2 -2
- package/dist/components/{Conversation.js → ai-sdk/Conversation.js} +5 -5
- package/dist/components/{ExpansionState.d.ts → ai-sdk/ExpansionState.d.ts} +1 -1
- package/dist/components/{ExpansionState.js → ai-sdk/ExpansionState.js} +1 -1
- package/dist/components/{Goal.d.ts → ai-sdk/Goal.d.ts} +1 -1
- package/dist/components/{Goal.js → ai-sdk/Goal.js} +6 -5
- package/dist/components/{InlineCitation.d.ts → ai-sdk/InlineCitation.d.ts} +1 -1
- package/dist/components/{InlineCitation.js → ai-sdk/InlineCitation.js} +4 -4
- package/dist/components/{MediaPreviewCard.d.ts → ai-sdk/MediaPreviewCard.d.ts} +2 -2
- package/dist/components/{MediaPreviewCard.js → ai-sdk/MediaPreviewCard.js} +5 -5
- package/dist/components/{Message.d.ts → ai-sdk/Message.d.ts} +2 -3
- package/dist/{Message-BF6SiKKL.js → components/ai-sdk/Message.js} +14 -99
- package/dist/components/{MessageScroller.d.ts → ai-sdk/MessageScroller.d.ts} +2 -2
- package/dist/components/{MessageScroller.js → ai-sdk/MessageScroller.js} +4 -4
- package/dist/components/{MessageScrollerVirtual.d.ts → ai-sdk/MessageScrollerVirtual.d.ts} +7 -8
- package/dist/components/{MessageScrollerVirtual.js → ai-sdk/MessageScrollerVirtual.js} +10 -10
- package/dist/components/{Plan.d.ts → ai-sdk/Plan.d.ts} +5 -6
- package/dist/components/{Plan.js → ai-sdk/Plan.js} +6 -6
- package/dist/components/ai-sdk/PromptInput.d.ts +2 -0
- package/dist/components/{PromptInput.js → ai-sdk/PromptInput.js} +32 -130
- package/dist/components/{Queue.d.ts → ai-sdk/Queue.d.ts} +4 -4
- package/dist/components/{Queue.js → ai-sdk/Queue.js} +7 -7
- package/dist/components/{Reasoning.d.ts → ai-sdk/Reasoning.d.ts} +2 -2
- package/dist/components/{Reasoning.js → ai-sdk/Reasoning.js} +5 -5
- package/dist/components/{Sources.d.ts → ai-sdk/Sources.d.ts} +2 -2
- package/dist/components/{Sources.js → ai-sdk/Sources.js} +4 -4
- package/dist/components/{Task.d.ts → ai-sdk/Task.d.ts} +2 -2
- package/dist/components/{Task.js → ai-sdk/Task.js} +4 -4
- package/dist/components/{ToolApproval.d.ts → ai-sdk/ToolApproval.d.ts} +1 -1
- package/dist/components/{ToolApproval.js → ai-sdk/ToolApproval.js} +1 -1
- package/dist/components/{ToolInvocation.d.ts → ai-sdk/ToolInvocation.d.ts} +1 -1
- package/dist/components/{ToolInvocation.js → ai-sdk/ToolInvocation.js} +7 -9
- package/dist/components/ai-sdk/ToolPart.d.ts +11 -0
- package/dist/components/ai-sdk/ToolPart.js +15 -0
- package/dist/components/{ChatGptSignInScreen.d.ts → extension/ChatGptSignInScreen.d.ts} +1 -1
- package/dist/components/{ChatGptSignInScreen.js → extension/ChatGptSignInScreen.js} +5 -5
- package/dist/components/{CodexModelSelector.d.ts → extension/CodexModelSelector.d.ts} +3 -3
- package/dist/components/{CodexModelSelector.js → extension/CodexModelSelector.js} +6 -6
- package/dist/components/{ConversationTabPicker.d.ts → extension/ConversationTabPicker.d.ts} +1 -1
- package/dist/components/{ConversationTabPicker.js → extension/ConversationTabPicker.js} +7 -6
- package/dist/components/{Accordion.d.ts → foundations/Accordion.d.ts} +1 -1
- package/dist/components/{Accordion.js → foundations/Accordion.js} +3 -3
- package/dist/components/{AlertDialog.d.ts → foundations/AlertDialog.d.ts} +2 -2
- package/dist/components/{AlertDialog.js → foundations/AlertDialog.js} +2 -2
- package/dist/components/{AppIcon.d.ts → foundations/AppIcon.d.ts} +1 -1
- package/dist/components/{AppIcon.js → foundations/AppIcon.js} +2 -2
- package/dist/components/{Autocomplete.d.ts → foundations/Autocomplete.d.ts} +1 -1
- package/dist/components/{Autocomplete.js → foundations/Autocomplete.js} +2 -2
- package/dist/components/{Avatar.d.ts → foundations/Avatar.d.ts} +1 -1
- package/dist/components/{Avatar.js → foundations/Avatar.js} +2 -2
- package/dist/components/{Badge.d.ts → foundations/Badge.d.ts} +1 -1
- package/dist/components/{Badge.js → foundations/Badge.js} +1 -1
- package/dist/components/{Button.d.ts → foundations/Button.d.ts} +1 -1
- package/dist/components/{Button.js → foundations/Button.js} +2 -2
- package/dist/components/{Card.d.ts → foundations/Card.d.ts} +1 -1
- package/dist/components/{Card.js → foundations/Card.js} +2 -2
- package/dist/components/{Checkbox.d.ts → foundations/Checkbox.d.ts} +7 -3
- package/dist/components/{Checkbox.js → foundations/Checkbox.js} +9 -5
- package/dist/components/{CheckboxGroup.d.ts → foundations/CheckboxGroup.d.ts} +1 -1
- package/dist/components/{CheckboxGroup.js → foundations/CheckboxGroup.js} +2 -2
- package/dist/{Collapsible-N64ASIQr.d.ts → components/foundations/Collapsible.d.ts} +7 -7
- package/dist/components/{Collapsible.js → foundations/Collapsible.js} +3 -3
- package/dist/components/foundations/Combobox.d.ts +2 -0
- package/dist/components/{Combobox.js → foundations/Combobox.js} +2 -2
- package/dist/components/{ContextMenu.d.ts → foundations/ContextMenu.d.ts} +1 -1
- package/dist/components/{ContextMenu.js → foundations/ContextMenu.js} +3 -3
- package/dist/components/{DescriptionList.d.ts → foundations/DescriptionList.d.ts} +1 -1
- package/dist/components/{DescriptionList.js → foundations/DescriptionList.js} +1 -1
- package/dist/components/{DescriptionListParts.d.ts → foundations/DescriptionListParts.d.ts} +1 -1
- package/dist/components/{DescriptionListParts.js → foundations/DescriptionListParts.js} +2 -2
- package/dist/components/{Dialog.d.ts → foundations/Dialog.d.ts} +1 -1
- package/dist/components/{Dialog.js → foundations/Dialog.js} +2 -2
- package/dist/components/{EmptyState.d.ts → foundations/EmptyState.d.ts} +1 -1
- package/dist/components/{EmptyState.js → foundations/EmptyState.js} +2 -2
- package/dist/components/{Field.d.ts → foundations/Field.d.ts} +1 -1
- package/dist/components/{Field.js → foundations/Field.js} +2 -2
- package/dist/components/{Fieldset.d.ts → foundations/Fieldset.d.ts} +1 -1
- package/dist/components/{Fieldset.js → foundations/Fieldset.js} +2 -2
- package/dist/components/{Form.d.ts → foundations/Form.d.ts} +1 -1
- package/dist/components/{Form.js → foundations/Form.js} +2 -2
- package/dist/components/{FormattedDate.d.ts → foundations/FormattedDate.d.ts} +1 -1
- package/dist/components/{FormattedDate.js → foundations/FormattedDate.js} +1 -1
- package/dist/components/foundations/IconButton.d.ts +2 -0
- package/dist/components/{IconButton.js → foundations/IconButton.js} +1 -1
- package/dist/components/{Input.d.ts → foundations/Input.d.ts} +1 -1
- package/dist/components/{Input.js → foundations/Input.js} +2 -2
- package/dist/components/{Kbd.d.ts → foundations/Kbd.d.ts} +1 -1
- package/dist/components/{Kbd.js → foundations/Kbd.js} +2 -2
- package/dist/components/{Label.d.ts → foundations/Label.d.ts} +1 -1
- package/dist/components/{Label.js → foundations/Label.js} +2 -2
- package/dist/components/{LinkButton.d.ts → foundations/LinkButton.d.ts} +2 -2
- package/dist/components/{LinkButton.js → foundations/LinkButton.js} +1 -1
- package/dist/components/{Marker.d.ts → foundations/Marker.d.ts} +1 -1
- package/dist/components/{Marker.js → foundations/Marker.js} +2 -2
- package/dist/components/{Menu.d.ts → foundations/Menu.d.ts} +1 -1
- package/dist/components/{Menu.js → foundations/Menu.js} +2 -2
- package/dist/components/{Menubar.d.ts → foundations/Menubar.d.ts} +1 -1
- package/dist/components/{Menubar.js → foundations/Menubar.js} +3 -3
- package/dist/components/{Meter.d.ts → foundations/Meter.d.ts} +1 -1
- package/dist/components/{Meter.js → foundations/Meter.js} +2 -2
- package/dist/components/{NavigationMenu.d.ts → foundations/NavigationMenu.d.ts} +1 -1
- package/dist/components/{NavigationMenu.js → foundations/NavigationMenu.js} +2 -2
- package/dist/components/{NumberField.d.ts → foundations/NumberField.d.ts} +1 -1
- package/dist/components/{NumberField.js → foundations/NumberField.js} +2 -2
- package/dist/components/{Popover.d.ts → foundations/Popover.d.ts} +1 -1
- package/dist/components/{Popover.js → foundations/Popover.js} +3 -3
- package/dist/components/{PreviewCard.d.ts → foundations/PreviewCard.d.ts} +1 -1
- package/dist/components/{PreviewCard.js → foundations/PreviewCard.js} +2 -2
- package/dist/components/{Progress.d.ts → foundations/Progress.d.ts} +1 -1
- package/dist/components/{Progress.js → foundations/Progress.js} +2 -2
- package/dist/components/{RadioGroup.d.ts → foundations/RadioGroup.d.ts} +1 -1
- package/dist/components/{RadioGroup.js → foundations/RadioGroup.js} +2 -2
- package/dist/components/{ScrollArea.d.ts → foundations/ScrollArea.d.ts} +1 -1
- package/dist/components/{ScrollArea.js → foundations/ScrollArea.js} +2 -2
- package/dist/components/{SearchField.d.ts → foundations/SearchField.d.ts} +1 -1
- package/dist/components/{SearchField.js → foundations/SearchField.js} +3 -3
- package/dist/components/{Select.d.ts → foundations/Select.d.ts} +1 -1
- package/dist/components/{Select.js → foundations/Select.js} +3 -3
- package/dist/components/{Separator.d.ts → foundations/Separator.d.ts} +1 -1
- package/dist/components/{Separator.js → foundations/Separator.js} +2 -2
- package/dist/components/{Slider.d.ts → foundations/Slider.d.ts} +1 -1
- package/dist/components/{Slider.js → foundations/Slider.js} +2 -2
- package/dist/components/{StatusPill.d.ts → foundations/StatusPill.d.ts} +1 -1
- package/dist/components/{StatusPill.js → foundations/StatusPill.js} +2 -2
- package/dist/components/{Stepper.d.ts → foundations/Stepper.d.ts} +2 -2
- package/dist/components/{Stepper.js → foundations/Stepper.js} +3 -3
- package/dist/components/{Switch.d.ts → foundations/Switch.d.ts} +7 -7
- package/dist/components/{Switch.js → foundations/Switch.js} +8 -8
- package/dist/components/{Tabs.d.ts → foundations/Tabs.d.ts} +1 -1
- package/dist/components/{Tabs.js → foundations/Tabs.js} +2 -2
- package/dist/components/{Textarea.d.ts → foundations/Textarea.d.ts} +1 -1
- package/dist/components/{Textarea.js → foundations/Textarea.js} +2 -2
- package/dist/components/{ThemeProvider.d.ts → foundations/ThemeProvider.d.ts} +2 -2
- package/dist/components/{ThemeProvider.js → foundations/ThemeProvider.js} +2 -2
- package/dist/components/{Toast.d.ts → foundations/Toast.d.ts} +1 -1
- package/dist/components/{Toast.js → foundations/Toast.js} +3 -3
- package/dist/components/{Toggle.d.ts → foundations/Toggle.d.ts} +1 -1
- package/dist/components/{Toggle.js → foundations/Toggle.js} +2 -2
- package/dist/components/foundations/ToggleGroup.d.ts +2 -0
- package/dist/components/{ToggleGroup.js → foundations/ToggleGroup.js} +13 -13
- package/dist/components/{Toolbar.d.ts → foundations/Toolbar.d.ts} +1 -1
- package/dist/components/{Toolbar.js → foundations/Toolbar.js} +2 -2
- package/dist/components/{Tooltip.d.ts → foundations/Tooltip.d.ts} +1 -1
- package/dist/components/{Tooltip.js → foundations/Tooltip.js} +2 -2
- package/dist/components/{TransitionSurface.d.ts → foundations/TransitionSurface.d.ts} +1 -1
- package/dist/components/{TransitionSurface.js → foundations/TransitionSurface.js} +2 -2
- package/dist/components/{icons.d.ts → foundations/icons.d.ts} +1 -1
- package/dist/components/{icons.js → foundations/icons.js} +1 -1
- package/dist/components/{ActionGuide.d.ts → general-purpose/ActionGuide.d.ts} +2 -2
- package/dist/components/{ActionGuide.js → general-purpose/ActionGuide.js} +3 -3
- package/dist/components/general-purpose/AppFrame.d.ts +24 -0
- package/dist/components/general-purpose/AppFrame.js +25 -0
- package/dist/components/{AppTopBar.d.ts → general-purpose/AppTopBar.d.ts} +2 -2
- package/dist/components/{AppTopBar.js → general-purpose/AppTopBar.js} +5 -5
- package/dist/components/{Commit.d.ts → general-purpose/Commit.d.ts} +5 -12
- package/dist/components/{Commit.js → general-purpose/Commit.js} +11 -13
- package/dist/components/{EnvironmentVariables.d.ts → general-purpose/EnvironmentVariables.d.ts} +2 -4
- package/dist/components/{EnvironmentVariables.js → general-purpose/EnvironmentVariables.js} +9 -10
- package/dist/components/{FileTree.d.ts → general-purpose/FileTree.d.ts} +10 -1
- package/dist/components/{FileTree.js → general-purpose/FileTree.js} +1 -1
- package/dist/components/{Pricing.d.ts → general-purpose/Pricing.d.ts} +1 -1
- package/dist/components/{Pricing.js → general-purpose/Pricing.js} +1 -1
- package/dist/components/{PricingBillingToggle.d.ts → general-purpose/PricingBillingToggle.d.ts} +1 -1
- package/dist/components/{PricingBillingToggle.js → general-purpose/PricingBillingToggle.js} +7 -7
- package/dist/components/{PricingConfirmationDialog.d.ts → general-purpose/PricingConfirmationDialog.d.ts} +1 -1
- package/dist/components/{PricingConfirmationDialog.js → general-purpose/PricingConfirmationDialog.js} +3 -3
- package/dist/components/{PricingFAQ.d.ts → general-purpose/PricingFAQ.d.ts} +1 -1
- package/dist/components/{PricingFAQ.js → general-purpose/PricingFAQ.js} +3 -3
- package/dist/components/{PricingPage.d.ts → general-purpose/PricingPage.d.ts} +1 -1
- package/dist/components/{PricingPage.js → general-purpose/PricingPage.js} +2 -2
- package/dist/components/{PricingPlanCard.d.ts → general-purpose/PricingPlanCard.d.ts} +1 -1
- package/dist/components/{PricingPlanCard.js → general-purpose/PricingPlanCard.js} +8 -8
- package/dist/components/{PricingUsageCalculator.d.ts → general-purpose/PricingUsageCalculator.d.ts} +1 -1
- package/dist/components/{PricingUsageCalculator.js → general-purpose/PricingUsageCalculator.js} +6 -6
- package/dist/components/{ResizableSidePanel.d.ts → general-purpose/ResizableSidePanel.d.ts} +8 -2
- package/dist/components/{ResizableSidePanel.js → general-purpose/ResizableSidePanel.js} +14 -6
- package/dist/{ResponsiveSidebarShell-CsAh4NyL.d.ts → components/general-purpose/ResponsiveSidebarShell.d.ts} +2 -2
- package/dist/components/{ResponsiveSidebarShell.js → general-purpose/ResponsiveSidebarShell.js} +6 -6
- package/dist/components/{SettingsFormDialog.d.ts → general-purpose/SettingsFormDialog.d.ts} +1 -1
- package/dist/components/{SettingsFormDialog.js → general-purpose/SettingsFormDialog.js} +8 -7
- package/dist/components/{SetupChecklist.d.ts → general-purpose/SetupChecklist.d.ts} +4 -1
- package/dist/components/{SetupChecklist.js → general-purpose/SetupChecklist.js} +23 -17
- package/dist/components/{Shell.d.ts → general-purpose/Shell.d.ts} +1 -1
- package/dist/components/{Shell.js → general-purpose/Shell.js} +2 -2
- package/dist/components/{Terminal.d.ts → general-purpose/Terminal.d.ts} +3 -3
- package/dist/components/{Terminal.js → general-purpose/Terminal.js} +7 -7
- package/dist/components/{TestResults.d.ts → general-purpose/TestResults.d.ts} +2 -2
- package/dist/components/{TestResults.js → general-purpose/TestResults.js} +6 -6
- package/dist/components/{ThemeModeControl.d.ts → general-purpose/ThemeModeControl.d.ts} +1 -1
- package/dist/components/{ThemeModeControl.js → general-purpose/ThemeModeControl.js} +4 -4
- package/dist/components/{WebPreview.d.ts → general-purpose/WebPreview.d.ts} +4 -4
- package/dist/components/{WebPreview.js → general-purpose/WebPreview.js} +12 -12
- package/dist/components/{AgentConnection.d.ts → nanites/AgentConnection.d.ts} +2 -36
- package/dist/components/{AgentConnection.js → nanites/AgentConnection.js} +7 -149
- package/dist/components/{AgentToolDetail.d.ts → nanites/AgentToolDetail.d.ts} +4 -4
- package/dist/components/{AgentToolDetail.js → nanites/AgentToolDetail.js} +8 -8
- package/dist/components/{GithubMotionMark.d.ts → nanites/GithubMotionMark.d.ts} +1 -1
- package/dist/components/{GithubMotionMark.js → nanites/GithubMotionMark.js} +2 -2
- package/dist/components/{NaniteScene.d.ts → nanites/NaniteScene.d.ts} +1 -1
- package/dist/components/{NaniteScene.js → nanites/NaniteScene.js} +2 -2
- package/dist/{copy-button-7ttJAorN.js → copy-button-4YvddK4e.js} +1 -1
- package/dist/{copy-button-EBv_B9F6.d.ts → copy-button-C0JyjClr.d.ts} +1 -1
- package/dist/{format-S6uWyoSb.js → format-CmopcfqJ.js} +4 -1
- package/dist/mcp-server-U71zhxFF.js +26 -0
- package/dist/{navigation-link-Cob7KBlM.js → navigation-link-kqMa81v5.js} +5 -1
- package/dist/{progress-ring-BjqTZqBk.js → progress-ring-Dz_ztrW2.js} +1 -1
- package/dist/styles/activity-header.css +5 -1
- package/dist/styles/agent-activity-preview-overlay.css +43 -5
- package/dist/styles/app-frame.css +15 -0
- package/dist/styles/file-tree.css +17 -2
- package/dist/styles/index.css +3 -1
- package/dist/styles/mcp-server-picker.css +1 -3
- package/dist/styles/menu-disclosure-group.css +13 -0
- package/dist/styles/message-scroller.css +2 -3
- package/dist/styles/sources.css +8 -0
- package/dist/styles/think-execution-status.css +57 -0
- package/dist/styles/think-execution-workbench.css +1 -50
- package/dist/styles/think-full-app.css +1 -1
- package/dist/styles/think-routine-library.css +0 -27
- package/dist/styles/workspace-explorer.css +0 -9
- package/dist/utils/structured-code.d.ts +1 -1
- package/package.json +2 -2
- package/dist/components/BrowserLiveView.d.ts +0 -2
- package/dist/components/BrowserReplay.d.ts +0 -2
- package/dist/components/CodeBlock.d.ts +0 -2
- package/dist/components/Collapsible.d.ts +0 -2
- package/dist/components/Combobox.d.ts +0 -2
- package/dist/components/IconButton.d.ts +0 -2
- package/dist/components/Message.js +0 -2
- package/dist/components/PromptInput.d.ts +0 -2
- package/dist/components/ResponsiveSidebarShell.d.ts +0 -2
- package/dist/components/SessionCompaction.d.ts +0 -2
- package/dist/components/ThinkChatToolParts.d.ts +0 -2
- package/dist/components/ThinkExecutionStatus.d.ts +0 -22
- package/dist/components/ThinkExecutionStatus.js +0 -36
- package/dist/components/ThinkRecoveryNotice.d.ts +0 -2
- package/dist/components/ThinkRoutineRuns.js +0 -76
- package/dist/components/ToggleGroup.d.ts +0 -2
- package/dist/components/WorkspaceFileView.js +0 -2
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { t as cx } from "
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { c as resolveThinkApprovalProps, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "
|
|
1
|
+
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { $ as TerminalIcon, C as FileIcon, J as SpinnerIcon, c as BoxIcon, f as ChevronDownIcon } from "../../icons-B4mGvCvc.js";
|
|
3
|
+
import { Button } from "../foundations/Button.js";
|
|
4
|
+
import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
|
|
5
|
+
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
6
|
+
import { McpPluginCatalog } from "./McpPluginCatalog.js";
|
|
7
|
+
import { c as resolveThinkApprovalProps, l as useSourceScopedAgentToolEvents, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-yid8e_Jb.js";
|
|
8
|
+
import { a as WorkspaceNavigationRestorationBoundary, i as WorkspaceNavigationFocusRestorer, n as WorkspaceNavigationProvider } from "../../WorkspaceLink-DZeLe_jN.js";
|
|
9
|
+
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
8
10
|
import { useWorkspace } from "./Workspace.js";
|
|
9
11
|
import { WorkspaceExplorer } from "./WorkspaceExplorer.js";
|
|
10
|
-
import { ScrollArea } from "./ScrollArea.js";
|
|
11
|
-
import { McpPluginCatalog } from "./McpPluginCatalog.js";
|
|
12
|
-
import { ResizableSidePanel } from "./ResizableSidePanel.js";
|
|
13
12
|
import { ThinkExecutionWorkbench } from "./ThinkExecutionWorkbench.js";
|
|
13
|
+
import { ResizableSidePanel } from "../general-purpose/ResizableSidePanel.js";
|
|
14
|
+
import { ResponsiveSidebarShell } from "../general-purpose/ResponsiveSidebarShell.js";
|
|
14
15
|
import { ThinkFullAppViewSwitch } from "./ThinkFullAppViewSwitch.js";
|
|
15
16
|
import { ThinkThreadStatusIndicators } from "./ThinkThreadPicker.js";
|
|
16
|
-
import { ThinkThreadShell } from "./ThinkThreadShell.js";
|
|
17
17
|
import * as React from "react";
|
|
18
18
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
-
|
|
20
|
-
//#region src/components/ThinkFullApp.tsx
|
|
19
|
+
//#region src/components/agents-sdk/ThinkFullApp.tsx
|
|
21
20
|
const workbenchPanelDefaultWidth = 340;
|
|
22
21
|
const workbenchPanelMinWidth = 300;
|
|
23
22
|
const workbenchPanelMaxWidth = 600;
|
|
24
23
|
const workbenchPanelKeyboardStep = 24;
|
|
24
|
+
const workbenchPanelCollapseThreshold = 240;
|
|
25
25
|
function WorkspacePanel({ config }) {
|
|
26
26
|
const selectedPath = config.navigation.current.destination.kind === "file" ? config.navigation.current.destination.path : null;
|
|
27
27
|
return /* @__PURE__ */ jsx(WorkspaceExplorer, {
|
|
@@ -46,7 +46,7 @@ function PluginsPanel({ config }) {
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
/** Combines ThinkChat with an optional resizable workbench shell. */
|
|
49
|
-
function ThinkFullApp({ agent, appBarActions, appBarLeading, appBarTitle, chat, className, defaultMobileView, defaultWorkbenchView, defaultThreadSidebarOpen, hideAppBarInWorkbench = false, messages, mobileView, onMobileViewChange, onThreadSidebarOpenChange, onWorkbenchViewChange, plugins, ref, renderAgentToolRunLink, renderExecutionRunLink, selectedExecutionRun = null, showMobileViewSwitch = true, sourceKey, style, threadSidebar, threadSidebarOpen, threadStatusSummary, workbenchPanels, workbenchView, workspace, ...props }) {
|
|
49
|
+
function ThinkFullApp({ agent, appBarActions, appBarLeading, appBarTitle, chat, className, defaultMobileView, defaultWorkbenchOpen, defaultWorkbenchView, defaultThreadSidebarOpen, hideAppBarInWorkbench = false, messages, mobileView, onMobileViewChange, onThreadSidebarOpenChange, onWorkbenchViewChange, onWorkbenchOpenChange, plugins, ref, renderAgentToolRunLink, renderExecutionRunLink, selectedExecutionRun = null, showMobileViewSwitch = true, showWorkbenchViewSwitch = true, sourceKey, style, threadSidebar, threadSidebarOpen, threadStatusSummary, workbenchPanels, workbenchOpen, workbenchView, workspace, ...props }) {
|
|
50
50
|
const appRef = React.useRef(null);
|
|
51
51
|
const workbenchPanelRef = React.useRef(null);
|
|
52
52
|
const pendingPanelFocusRef = React.useRef(null);
|
|
@@ -73,14 +73,11 @@ function ThinkFullApp({ agent, appBarActions, appBarLeading, appBarTitle, chat,
|
|
|
73
73
|
]);
|
|
74
74
|
const [innerMobileView, setInnerMobileView] = React.useState(defaultMobileView ?? "chat");
|
|
75
75
|
const [innerWorkbenchView, setInnerWorkbenchView] = React.useState(defaultWorkbenchView ?? "files");
|
|
76
|
-
const
|
|
77
|
-
const
|
|
76
|
+
const [innerWorkbenchOpen, setInnerWorkbenchOpen] = React.useState(defaultWorkbenchOpen ?? true);
|
|
77
|
+
const agentTools = useSourceScopedAgentToolEvents(agent);
|
|
78
78
|
const requestedMobileView = mobileView ?? innerMobileView;
|
|
79
79
|
const requestedWorkbenchView = workbenchView ?? innerWorkbenchView;
|
|
80
|
-
const
|
|
81
|
-
React.useEffect(() => {
|
|
82
|
-
resetAgentTools();
|
|
83
|
-
}, [agentIdentity]);
|
|
80
|
+
const requestedWorkbenchOpen = workbenchOpen ?? innerWorkbenchOpen;
|
|
84
81
|
const setWorkbenchView = React.useCallback((next) => {
|
|
85
82
|
if (workbenchView === void 0) setInnerWorkbenchView(next);
|
|
86
83
|
onWorkbenchViewChange?.(next);
|
|
@@ -89,6 +86,10 @@ function ThinkFullApp({ agent, appBarActions, appBarLeading, appBarTitle, chat,
|
|
|
89
86
|
if (mobileView === void 0) setInnerMobileView(next);
|
|
90
87
|
onMobileViewChange?.(next);
|
|
91
88
|
}, [mobileView, onMobileViewChange]);
|
|
89
|
+
const setWorkbenchOpen = React.useCallback((next) => {
|
|
90
|
+
if (workbenchOpen === void 0) setInnerWorkbenchOpen(next);
|
|
91
|
+
onWorkbenchOpenChange?.(next);
|
|
92
|
+
}, [onWorkbenchOpenChange, workbenchOpen]);
|
|
92
93
|
const updateAppView = React.useCallback((update) => {
|
|
93
94
|
React.startTransition(update);
|
|
94
95
|
}, []);
|
|
@@ -104,7 +105,7 @@ function ThinkFullApp({ agent, appBarActions, appBarLeading, appBarTitle, chat,
|
|
|
104
105
|
const availableWorkbenchPanels = [];
|
|
105
106
|
if (workspace !== void 0) availableWorkbenchPanels.push({
|
|
106
107
|
id: "files",
|
|
107
|
-
label: "
|
|
108
|
+
label: "Workspace",
|
|
108
109
|
icon: /* @__PURE__ */ jsx(FileIcon, {}),
|
|
109
110
|
render: () => /* @__PURE__ */ jsx(WorkspacePanel, { config: workspace })
|
|
110
111
|
});
|
|
@@ -135,13 +136,15 @@ function ThinkFullApp({ agent, appBarActions, appBarLeading, appBarTitle, chat,
|
|
|
135
136
|
render: () => /* @__PURE__ */ jsx(PluginsPanel, { config: plugins })
|
|
136
137
|
});
|
|
137
138
|
if (workbenchPanels) availableWorkbenchPanels.push(...workbenchPanels);
|
|
138
|
-
const
|
|
139
|
+
const selectedPanel = availableWorkbenchPanels.find((panel) => panel.id === requestedWorkbenchView) ?? availableWorkbenchPanels[0];
|
|
140
|
+
const activePanel = requestedWorkbenchOpen ? selectedPanel : void 0;
|
|
139
141
|
const activeWorkbenchView = activePanel?.id;
|
|
140
142
|
const hasWorkbench = activePanel !== void 0;
|
|
143
|
+
const hasAvailableWorkbench = selectedPanel !== void 0;
|
|
141
144
|
const activeMobileView = hasWorkbench ? requestedMobileView : "chat";
|
|
142
|
-
const
|
|
145
|
+
const shouldShowWorkbenchViewSwitch = showWorkbenchViewSwitch && availableWorkbenchPanels.length > 0;
|
|
143
146
|
const workbenchViews = availableWorkbenchPanels;
|
|
144
|
-
const shouldRenderInlineAppBar = !threadSidebar && (Boolean(appBarActions || appBarLeading || appBarTitle || threadSidebar) ||
|
|
147
|
+
const shouldRenderInlineAppBar = !threadSidebar && (Boolean(appBarActions || appBarLeading || appBarTitle || threadSidebar) || hasAvailableWorkbench);
|
|
145
148
|
const hasAppBarRow = shouldRenderInlineAppBar;
|
|
146
149
|
React.useLayoutEffect(() => {
|
|
147
150
|
const pendingFocus = pendingPanelFocusRef.current;
|
|
@@ -189,19 +192,27 @@ function ThinkFullApp({ agent, appBarActions, appBarLeading, appBarTitle, chat,
|
|
|
189
192
|
}) : null] }) : null,
|
|
190
193
|
/* @__PURE__ */ jsxs(AppTopBar.Trailing, { children: [
|
|
191
194
|
appBarActions,
|
|
192
|
-
|
|
195
|
+
shouldShowWorkbenchViewSwitch && selectedPanel ? /* @__PURE__ */ jsx(ThinkFullAppViewSwitch, {
|
|
193
196
|
className: "think-full-app__workbench-view-switch",
|
|
194
197
|
views: workbenchViews,
|
|
195
198
|
value: activeWorkbenchView,
|
|
199
|
+
allowEmpty: true,
|
|
196
200
|
onValueChange: (next) => {
|
|
197
|
-
|
|
201
|
+
updateAppView(() => {
|
|
202
|
+
if (!next) {
|
|
203
|
+
setWorkbenchOpen(false);
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
updateWorkbenchPanel(next);
|
|
207
|
+
setWorkbenchOpen(true);
|
|
208
|
+
});
|
|
198
209
|
},
|
|
199
210
|
"aria-label": "Workbench views"
|
|
200
211
|
}) : null,
|
|
201
|
-
|
|
212
|
+
selectedPanel && showMobileViewSwitch ? /* @__PURE__ */ jsx(ThinkFullAppViewSwitch, {
|
|
202
213
|
className: "think-full-app__mobile-view-switch",
|
|
203
214
|
views: workbenchViews,
|
|
204
|
-
value: activeMobileView === "workbench" ?
|
|
215
|
+
value: activeMobileView === "workbench" ? activeWorkbenchView : void 0,
|
|
205
216
|
allowEmpty: true,
|
|
206
217
|
onValueChange: (next) => {
|
|
207
218
|
updateAppView(() => {
|
|
@@ -227,6 +238,8 @@ function ThinkFullApp({ agent, appBarActions, appBarLeading, appBarTitle, chat,
|
|
|
227
238
|
minSize: workbenchPanelMinWidth,
|
|
228
239
|
maxSize: workbenchPanelMaxWidth,
|
|
229
240
|
keyboardStep: workbenchPanelKeyboardStep,
|
|
241
|
+
collapseThreshold: workbenchPanelCollapseThreshold,
|
|
242
|
+
onCollapse: () => setWorkbenchOpen(false),
|
|
230
243
|
"data-has-thread-sidebar": threadSidebar ? "true" : "false",
|
|
231
244
|
"data-has-workbench": hasWorkbench ? "true" : "false",
|
|
232
245
|
"data-has-workbench-topbar": hasAppBarRow ? "true" : "false",
|
|
@@ -292,13 +305,17 @@ function ThinkFullApp({ agent, appBarActions, appBarLeading, appBarTitle, chat,
|
|
|
292
305
|
}), appContent] })
|
|
293
306
|
}) : appContent;
|
|
294
307
|
if (!threadSidebar) return app;
|
|
295
|
-
return /* @__PURE__ */ jsx(
|
|
308
|
+
return /* @__PURE__ */ jsx(ResponsiveSidebarShell, {
|
|
309
|
+
className: "think-thread-shell",
|
|
296
310
|
sidebar: threadSidebar,
|
|
311
|
+
sidebarLabel: "threads",
|
|
297
312
|
sidebarOpen: threadSidebarOpen,
|
|
298
313
|
defaultSidebarOpen: defaultThreadSidebarOpen,
|
|
299
314
|
onSidebarOpenChange: onThreadSidebarOpenChange,
|
|
300
315
|
"data-hide-app-bar-in-workbench": hideAppBarInWorkbench ? "" : void 0,
|
|
301
316
|
topBar: (controls) => renderAppTopBar(controls),
|
|
317
|
+
toolbarLabel: "Thread controls",
|
|
318
|
+
showMainLabel: "Show selected thread",
|
|
302
319
|
children: app
|
|
303
320
|
});
|
|
304
321
|
}
|
package/dist/components/{ThinkFullAppViewSwitch.d.ts → agents-sdk/ThinkFullAppViewSwitch.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as ToggleGroupProps } from "
|
|
1
|
+
import { r as ToggleGroupProps } from "../../ToggleGroup-CSBWfPXo.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
|
-
//#region src/components/ThinkFullAppViewSwitch.d.ts
|
|
4
|
+
//#region src/components/agents-sdk/ThinkFullAppViewSwitch.d.ts
|
|
5
5
|
interface ThinkFullAppView {
|
|
6
6
|
id: string;
|
|
7
7
|
label: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as mergeBaseClassName } from "
|
|
2
|
-
import { AppTopBar } from "
|
|
3
|
-
import { ToggleGroup } from "
|
|
1
|
+
import { n as mergeBaseClassName } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
3
|
+
import { ToggleGroup } from "../foundations/ToggleGroup.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
//#region src/components/ThinkFullAppViewSwitch.tsx
|
|
6
|
+
//#region src/components/agents-sdk/ThinkFullAppViewSwitch.tsx
|
|
7
7
|
/**
|
|
8
8
|
* Icon view picker shared by ThinkFullApp's wide workbench and compact app
|
|
9
9
|
* navigation. Base UI owns selection and roving focus; AppTopBar owns the
|
|
@@ -4,7 +4,7 @@ import { PendingApproval, Think } from "@cloudflare/think";
|
|
|
4
4
|
import { AgentStub } from "agents/client";
|
|
5
5
|
import { ProxyToolOutput } from "@cloudflare/codemode";
|
|
6
6
|
|
|
7
|
-
//#region src/components/ThinkPendingApproval.d.ts
|
|
7
|
+
//#region src/components/agents-sdk/ThinkPendingApproval.d.ts
|
|
8
8
|
type PausedExecution = Extract<ProxyToolOutput, {
|
|
9
9
|
status: "paused";
|
|
10
10
|
}>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Approval, ApprovalCount, ApprovalDecision, ApprovalHeader, ApprovalInputPreview, ApprovalPreview, ApprovalPreviewRow, ApprovalQuestion, formatApprovalValue } from "
|
|
1
|
+
import { a as titleCase } from "../../format-CmopcfqJ.js";
|
|
2
|
+
import { Approval, ApprovalCount, ApprovalDecision, ApprovalHeader, ApprovalInputPreview, ApprovalPreview, ApprovalPreviewRow, ApprovalQuestion, formatApprovalValue } from "../ai-sdk/Approval.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { getToolName } from "ai";
|
|
6
6
|
import { getToolOutput } from "@cloudflare/think/react";
|
|
7
|
-
//#region src/components/ThinkPendingApproval.tsx
|
|
7
|
+
//#region src/components/agents-sdk/ThinkPendingApproval.tsx
|
|
8
8
|
/** Structural match for any upstream tool binding of the Codemode execute runtime. */
|
|
9
9
|
function getPausedExecution(part) {
|
|
10
10
|
if (part.state !== "output-available") return void 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AgentChatTurnError } from "../ai-sdk/AgentChatTurnError.js";
|
|
2
|
+
import { TransitionSurface } from "../foundations/TransitionSurface.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/ThinkRecoveryNotice.tsx
|
|
4
|
+
//#region src/components/agents-sdk/ThinkRecoveryNotice.tsx
|
|
5
5
|
function connectionReason(error) {
|
|
6
6
|
return error.reason.trim() || error.message.trim();
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as ThinkExecutionRun } from "
|
|
1
|
+
import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-lYYgyeE1.js";
|
|
2
2
|
import { ThinkScheduledTask } from "@cloudflare/think";
|
|
3
3
|
import { Schedule } from "agents";
|
|
4
4
|
|
|
5
|
-
//#region src/components/ThinkRoutine.d.ts
|
|
5
|
+
//#region src/components/agents-sdk/ThinkRoutine.d.ts
|
|
6
6
|
/** App-owned identity for the Think agent that owns a routine. */
|
|
7
7
|
interface ThinkRoutineOwner {
|
|
8
8
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { formatThinkExecutionShortTimestamp } from "./ThinkExecutionRun.js";
|
|
2
|
-
//#region src/components/ThinkRoutine.ts
|
|
2
|
+
//#region src/components/agents-sdk/ThinkRoutine.ts
|
|
3
3
|
function getThinkRoutineNextRun(routine) {
|
|
4
4
|
if (!routine.schedule) return null;
|
|
5
5
|
if (!routine.enabled) return "Paused";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ThinkRoutine } from "./ThinkRoutine.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
|
-
//#region src/components/ThinkRoutineBrowser.d.ts
|
|
4
|
+
//#region src/components/agents-sdk/ThinkRoutineBrowser.d.ts
|
|
5
5
|
type ThinkRoutineFilter = "all" | "active" | "paused";
|
|
6
6
|
interface ThinkRoutineBrowserProps<TRoutine extends ThinkRoutine = ThinkRoutine> extends Omit<React.HTMLAttributes<HTMLElement>, "onSelect"> {
|
|
7
7
|
routines: readonly TRoutine[];
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { t as cx } from "
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { SearchField } from "
|
|
8
|
-
import { ToggleGroup } from "
|
|
1
|
+
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { H as PlusIcon } from "../../icons-B4mGvCvc.js";
|
|
3
|
+
import { buttonVariants } from "../foundations/Button.js";
|
|
4
|
+
import { Tooltip } from "../foundations/Tooltip.js";
|
|
5
|
+
import { t as capitalize } from "../../format-CmopcfqJ.js";
|
|
6
|
+
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
7
|
+
import { SearchField } from "../foundations/SearchField.js";
|
|
8
|
+
import { ToggleGroup } from "../foundations/ToggleGroup.js";
|
|
9
9
|
import { getThinkRoutineNextRun } from "./ThinkRoutine.js";
|
|
10
10
|
import * as React from "react";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
//#region src/components/ThinkRoutineBrowser.tsx
|
|
12
|
+
//#region src/components/agents-sdk/ThinkRoutineBrowser.tsx
|
|
13
13
|
function filterRoutines(routines, filter, query) {
|
|
14
14
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
15
15
|
return routines.filter((routine) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ThinkRoutine, ThinkRoutineRunOf } from "./ThinkRoutine.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
|
-
//#region src/components/ThinkRoutineDetail.d.ts
|
|
4
|
+
//#region src/components/agents-sdk/ThinkRoutineDetail.d.ts
|
|
5
5
|
interface ThinkRoutineDetailProps<TRoutine extends ThinkRoutine = ThinkRoutine> extends React.HTMLAttributes<HTMLElement> {
|
|
6
6
|
routine: TRoutine;
|
|
7
7
|
busy?: boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as cx } from "
|
|
2
|
-
import { Badge } from "
|
|
3
|
-
import { Switch } from "./Switch.js";
|
|
1
|
+
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { Badge } from "../foundations/Badge.js";
|
|
4
3
|
import { getThinkRoutineNextRun } from "./ThinkRoutine.js";
|
|
4
|
+
import { Switch } from "../foundations/Switch.js";
|
|
5
5
|
import { ThinkRoutineRuns } from "./ThinkRoutineRuns.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
//#region src/components/ThinkRoutineDetail.tsx
|
|
8
|
+
//#region src/components/agents-sdk/ThinkRoutineDetail.tsx
|
|
9
9
|
function taskInstructions(routine) {
|
|
10
10
|
return typeof routine.task.prompt === "string" ? routine.task.prompt : "Runs an app-defined scheduled handler.";
|
|
11
11
|
}
|
|
@@ -2,7 +2,7 @@ import { ThinkRoutineCreateRequest, ThinkRoutineOwner } from "./ThinkRoutine.js"
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { ThinkScheduledTaskSchedule } from "@cloudflare/think";
|
|
4
4
|
|
|
5
|
-
//#region src/components/ThinkRoutineForm.d.ts
|
|
5
|
+
//#region src/components/agents-sdk/ThinkRoutineForm.d.ts
|
|
6
6
|
interface ThinkRoutineFormProps extends React.HTMLAttributes<HTMLElement> {
|
|
7
7
|
busy?: boolean;
|
|
8
8
|
owners: readonly ThinkRoutineOwner[];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { t as cx } from "
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { J as SpinnerIcon } from "../../icons-B4mGvCvc.js";
|
|
3
|
+
import { Button, buttonVariants } from "../foundations/Button.js";
|
|
4
|
+
import { Field } from "../foundations/Field.js";
|
|
5
|
+
import { Form } from "../foundations/Form.js";
|
|
6
|
+
import { Textarea } from "../foundations/Textarea.js";
|
|
7
|
+
import { Select } from "../foundations/Select.js";
|
|
8
|
+
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
9
9
|
import * as React from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
//#region src/components/ThinkRoutineForm.tsx
|
|
11
|
+
//#region src/components/agents-sdk/ThinkRoutineForm.tsx
|
|
12
12
|
function RoutineSelect({ label, onValueChange, options, value }) {
|
|
13
13
|
return /* @__PURE__ */ jsx("div", {
|
|
14
14
|
className: "think-routine-library__select-field",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as ThinkExecutionRun } from "
|
|
1
|
+
import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-lYYgyeE1.js";
|
|
2
2
|
import { ThinkRoutine, ThinkRoutineCreateRequest, ThinkRoutineOwner, ThinkRoutineRunOf } from "./ThinkRoutine.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
|
-
//#region src/components/ThinkRoutineLibrary.d.ts
|
|
5
|
+
//#region src/components/agents-sdk/ThinkRoutineLibrary.d.ts
|
|
6
6
|
interface ThinkRoutineLibraryDetailRenderProps<TRoutine extends ThinkRoutine = ThinkRoutine> {
|
|
7
7
|
/** The selected routine, including any app-owned extension fields. */
|
|
8
8
|
routine: TRoutine;
|
|
@@ -32,6 +32,8 @@ interface ThinkRoutineLibraryProps<TRoutine extends ThinkRoutine = ThinkRoutine>
|
|
|
32
32
|
error?: React.ReactNode;
|
|
33
33
|
/** Product navigation rendered after the built-in schedule navigation control. */
|
|
34
34
|
appBarLeading?: React.ReactNode;
|
|
35
|
+
/** Product navigation rendered before the selected schedule actions. */
|
|
36
|
+
appBarActions?: React.ReactNode;
|
|
35
37
|
/** Starts the selected routine immediately. */
|
|
36
38
|
onRunRoutine?: (routine: TRoutine) => void | Promise<void>;
|
|
37
39
|
/** Activates or pauses the selected app-owned routine. */
|
|
@@ -53,6 +55,7 @@ interface ThinkRoutineLibraryProps<TRoutine extends ThinkRoutine = ThinkRoutine>
|
|
|
53
55
|
* route and may also use these surfaces independently.
|
|
54
56
|
*/
|
|
55
57
|
declare function ThinkRoutineLibrary<TRoutine extends ThinkRoutine = ThinkRoutine>({
|
|
58
|
+
appBarActions,
|
|
56
59
|
appBarLeading,
|
|
57
60
|
className,
|
|
58
61
|
createRoutineLink,
|
|
@@ -1,54 +1,56 @@
|
|
|
1
|
-
import { t as cx } from "
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { ResponsiveSidebarShell } from "
|
|
1
|
+
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { J as SpinnerIcon, V as PlayIcon, b as EllipsisIcon, f as ChevronDownIcon, tt as WarningIcon } from "../../icons-B4mGvCvc.js";
|
|
3
|
+
import { Button, buttonVariants } from "../foundations/Button.js";
|
|
4
|
+
import { Menu } from "../foundations/Menu.js";
|
|
5
|
+
import { i as formatErrorMessage } from "../../format-CmopcfqJ.js";
|
|
6
|
+
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
7
|
+
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
8
|
+
import { ResponsiveSidebarShell } from "../general-purpose/ResponsiveSidebarShell.js";
|
|
9
|
+
import { AlertDialog } from "../foundations/AlertDialog.js";
|
|
9
10
|
import { ThinkRoutineBrowser } from "./ThinkRoutineBrowser.js";
|
|
10
11
|
import { ThinkRoutineDetail } from "./ThinkRoutineDetail.js";
|
|
11
12
|
import * as React from "react";
|
|
12
13
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
//#region src/components/ThinkRoutineLibrary.tsx
|
|
14
|
-
function
|
|
15
|
-
return error instanceof Error ? error.message : String(error);
|
|
16
|
-
}
|
|
17
|
-
function RoutineTopBarActions({ busy, onDelete, editLink, onRun, routineName }) {
|
|
14
|
+
//#region src/components/agents-sdk/ThinkRoutineLibrary.tsx
|
|
15
|
+
function RoutineTopBarActions({ appBarActions, busy, onDelete, editLink, onRun, routineName }) {
|
|
18
16
|
const [deleteOpen, setDeleteOpen] = React.useState(false);
|
|
19
17
|
const moreActionsRef = React.useRef(null);
|
|
20
18
|
const hasMenu = Boolean(editLink || onDelete);
|
|
21
|
-
if (!onRun && !hasMenu) return null;
|
|
19
|
+
if (!appBarActions && !onRun && !hasMenu) return null;
|
|
22
20
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(AppTopBar.Trailing, {
|
|
23
21
|
"aria-label": "Schedule actions",
|
|
24
|
-
children: [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
unstyled: true
|
|
37
|
-
}),
|
|
38
|
-
children: /* @__PURE__ */ jsx(EllipsisIcon, {})
|
|
39
|
-
}), /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
40
|
-
align: "end",
|
|
41
|
-
sideOffset: 4,
|
|
42
|
-
children: /* @__PURE__ */ jsxs(Menu.Popup, { children: [editLink ? /* @__PURE__ */ jsx(Menu.Item, {
|
|
43
|
-
render: editLink,
|
|
44
|
-
children: "Edit schedule"
|
|
45
|
-
}) : null, onDelete ? /* @__PURE__ */ jsx(Menu.Item, {
|
|
46
|
-
variant: "destructive",
|
|
22
|
+
children: [
|
|
23
|
+
appBarActions,
|
|
24
|
+
onRun ? /* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
25
|
+
label: "Run schedule",
|
|
26
|
+
tooltip: "Run now",
|
|
27
|
+
disabled: busy,
|
|
28
|
+
onClick: onRun,
|
|
29
|
+
children: busy ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(PlayIcon, {})
|
|
30
|
+
}) : null,
|
|
31
|
+
hasMenu ? /* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
32
|
+
label: "More schedule actions",
|
|
33
|
+
tooltip: "More actions",
|
|
47
34
|
disabled: busy,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
35
|
+
render: /* @__PURE__ */ jsx(Menu.Trigger, {
|
|
36
|
+
ref: moreActionsRef,
|
|
37
|
+
unstyled: true
|
|
38
|
+
}),
|
|
39
|
+
children: /* @__PURE__ */ jsx(EllipsisIcon, {})
|
|
40
|
+
}), /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
41
|
+
align: "end",
|
|
42
|
+
sideOffset: 4,
|
|
43
|
+
children: /* @__PURE__ */ jsxs(Menu.Popup, { children: [editLink ? /* @__PURE__ */ jsx(Menu.Item, {
|
|
44
|
+
render: editLink,
|
|
45
|
+
children: "Edit schedule"
|
|
46
|
+
}) : null, onDelete ? /* @__PURE__ */ jsx(Menu.Item, {
|
|
47
|
+
variant: "destructive",
|
|
48
|
+
disabled: busy,
|
|
49
|
+
onClick: () => setDeleteOpen(true),
|
|
50
|
+
children: "Delete schedule"
|
|
51
|
+
}) : null] })
|
|
52
|
+
}) })] }) : null
|
|
53
|
+
]
|
|
52
54
|
}), onDelete ? /* @__PURE__ */ jsx(AlertDialog.Root, {
|
|
53
55
|
open: deleteOpen,
|
|
54
56
|
onOpenChange: setDeleteOpen,
|
|
@@ -82,7 +84,7 @@ function RoutineTopBarActions({ busy, onDelete, editLink, onRun, routineName })
|
|
|
82
84
|
* and `ThinkRoutineRuns`; consumers compose `ThinkRoutineForm` in their create
|
|
83
85
|
* route and may also use these surfaces independently.
|
|
84
86
|
*/
|
|
85
|
-
function ThinkRoutineLibrary({ appBarLeading, className, createRoutineLink, error: catalogError, onDeleteRoutine, onRoutineEnabledChange, onRunRoutine, renderEditRoutineLink, renderRoutineLink, renderRoutineDetail, renderRunLink, ref, routines, selectedRoutineId, showOwner = true, ...props }) {
|
|
87
|
+
function ThinkRoutineLibrary({ appBarActions, appBarLeading, className, createRoutineLink, error: catalogError, onDeleteRoutine, onRoutineEnabledChange, onRunRoutine, renderEditRoutineLink, renderRoutineLink, renderRoutineDetail, renderRunLink, ref, routines, selectedRoutineId, showOwner = true, ...props }) {
|
|
86
88
|
const [busy, setBusy] = React.useState(false);
|
|
87
89
|
const [announcement, setAnnouncement] = React.useState("");
|
|
88
90
|
const [actionError, setActionError] = React.useState(null);
|
|
@@ -95,7 +97,7 @@ function ThinkRoutineLibrary({ appBarLeading, className, createRoutineLink, erro
|
|
|
95
97
|
setAnnouncement(message);
|
|
96
98
|
return true;
|
|
97
99
|
} catch (nextError) {
|
|
98
|
-
setActionError(
|
|
100
|
+
setActionError(formatErrorMessage(nextError));
|
|
99
101
|
return false;
|
|
100
102
|
} finally {
|
|
101
103
|
setBusy(false);
|
|
@@ -142,6 +144,7 @@ function ThinkRoutineLibrary({ appBarLeading, className, createRoutineLink, erro
|
|
|
142
144
|
children: [/* @__PURE__ */ jsx("span", { children: selectedRoutine.name }), /* @__PURE__ */ jsx(ChevronDownIcon, { "aria-hidden": "true" })]
|
|
143
145
|
}) : null] }),
|
|
144
146
|
/* @__PURE__ */ jsx(RoutineTopBarActions, {
|
|
147
|
+
appBarActions,
|
|
145
148
|
busy,
|
|
146
149
|
routineName: selectedRoutine?.name ?? "schedule",
|
|
147
150
|
editLink: selectedRoutine && renderEditRoutineLink ? renderEditRoutineLink(selectedRoutine) : void 0,
|
|
@@ -157,7 +160,7 @@ function ThinkRoutineLibrary({ appBarLeading, className, createRoutineLink, erro
|
|
|
157
160
|
renderRoutineLink,
|
|
158
161
|
createRoutineLink,
|
|
159
162
|
onRoutineLinkClick: (event) => {
|
|
160
|
-
if (event
|
|
163
|
+
if (!isPlainPrimaryLinkActivation(event)) return;
|
|
161
164
|
closeSidebarOnCompact();
|
|
162
165
|
}
|
|
163
166
|
}),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as ThinkExecutionRun } from "
|
|
1
|
+
import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-lYYgyeE1.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
|
-
//#region src/components/ThinkRoutineRuns.d.ts
|
|
4
|
+
//#region src/components/agents-sdk/ThinkRoutineRuns.d.ts
|
|
5
5
|
interface ThinkRoutineRunsProps<TRun extends ThinkExecutionRun = ThinkExecutionRun> extends Omit<React.HTMLAttributes<HTMLElement>, "title"> {
|
|
6
6
|
runs: readonly TRun[];
|
|
7
7
|
title?: React.ReactNode;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { buttonVariants } from "../foundations/Button.js";
|
|
3
|
+
import { Badge } from "../foundations/Badge.js";
|
|
4
|
+
import { EmptyState } from "../foundations/EmptyState.js";
|
|
5
|
+
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
6
|
+
import { getThinkExecutionRunAccessibleName, getThinkExecutionRunId, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
7
|
+
import { ThinkExecutionRunSummary } from "./ThinkExecutionStatus.js";
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
//#region src/components/agents-sdk/ThinkRoutineRuns.tsx
|
|
11
|
+
/** Compact execution history shared by routine detail surfaces. */
|
|
12
|
+
function ThinkRoutineRuns({ className, runs, title = "Recent runs", emptyState = "Run this schedule now or wait for its next occurrence.", renderRunLink, ref, ...props }) {
|
|
13
|
+
const titleId = React.useId();
|
|
14
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
15
|
+
ref,
|
|
16
|
+
className: cx("think-routine-runs", "think-routine-library__runs", className),
|
|
17
|
+
"aria-labelledby": titleId,
|
|
18
|
+
...props,
|
|
19
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
20
|
+
className: "think-routine-library__section-heading",
|
|
21
|
+
children: [/* @__PURE__ */ jsx("h2", {
|
|
22
|
+
id: titleId,
|
|
23
|
+
children: title
|
|
24
|
+
}), /* @__PURE__ */ jsx(Badge, {
|
|
25
|
+
variant: "ghost",
|
|
26
|
+
color: "neutral",
|
|
27
|
+
size: "sm",
|
|
28
|
+
"aria-label": `${runs.length} recorded runs`,
|
|
29
|
+
children: runs.length
|
|
30
|
+
})]
|
|
31
|
+
}), runs.length ? /* @__PURE__ */ jsx("ol", {
|
|
32
|
+
className: "think-routine-library__run-list",
|
|
33
|
+
children: runs.map((run) => {
|
|
34
|
+
const kind = isThinkSubmissionRun(run) ? "submission" : "workflow";
|
|
35
|
+
const content = /* @__PURE__ */ jsx(ThinkExecutionRunSummary, { run });
|
|
36
|
+
const runClassName = buttonVariants({
|
|
37
|
+
variant: "ghost",
|
|
38
|
+
color: "neutral",
|
|
39
|
+
size: "sm",
|
|
40
|
+
className: "think-routine-library__run"
|
|
41
|
+
});
|
|
42
|
+
return /* @__PURE__ */ jsx("li", { children: renderRunLink ? /* @__PURE__ */ jsx(NavigationLink, {
|
|
43
|
+
render: renderRunLink(run),
|
|
44
|
+
className: runClassName,
|
|
45
|
+
"aria-label": getThinkExecutionRunAccessibleName(run),
|
|
46
|
+
children: content
|
|
47
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
48
|
+
className: "think-routine-library__run",
|
|
49
|
+
children: content
|
|
50
|
+
}) }, `${kind}:${getThinkExecutionRunId(run)}`);
|
|
51
|
+
})
|
|
52
|
+
}) : /* @__PURE__ */ jsx(EmptyState, {
|
|
53
|
+
className: "think-routine-library__empty-runs",
|
|
54
|
+
description: emptyState
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { ThinkRoutineRuns };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
|
-
//#region src/components/ThinkThreadPicker.d.ts
|
|
3
|
+
//#region src/components/agents-sdk/ThinkThreadPicker.d.ts
|
|
4
4
|
interface ThinkThreadItem {
|
|
5
5
|
/** Stable child-agent/thread id used by the app-authored link's route params. */
|
|
6
6
|
id: string;
|