@mcp-b/react-components 0.29.0 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{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-CM5gfmdq.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-4WP4Uc_m.js} +65 -72
- 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/{ModelSelector-CRdvHT_b.js → ModelSelector-DzdEs2fX.js} +33 -31
- 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-Dsm1xF3a.js} +47 -18
- 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-hd1-cpuz.js} +12 -12
- 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} +56 -31
- 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} +5 -5
- package/dist/components/{McpServerPicker.js → agents-sdk/McpServerPicker.js} +30 -40
- 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} +9 -9
- package/dist/components/{ThinkFullApp.js → agents-sdk/ThinkFullApp.js} +18 -20
- 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} +2 -2
- package/dist/components/{ThinkRoutineLibrary.js → agents-sdk/ThinkRoutineLibrary.js} +12 -14
- 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 -5
- 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} +8 -8
- 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} +2 -2
- 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} +2 -2
- package/dist/components/{ResizableSidePanel.js → general-purpose/ResizableSidePanel.js} +4 -4
- 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} +1 -1
- package/dist/components/{SetupChecklist.js → general-purpose/SetupChecklist.js} +4 -4
- 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-EBv_B9F6.d.ts → copy-button-C0JyjClr.d.ts} +1 -1
- package/dist/{copy-button-7ttJAorN.js → copy-button-CsNSSKYG.js} +2 -2
- 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 +16 -2
- package/dist/styles/index.css +2 -1
- 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-routine-library.css +0 -27
- 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
- package/dist/{icons-B4mGvCvc.js → icons-B1Qw05te.js} +1 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { c as BoxIcon, j as McpIcon } from "../../icons-B1Qw05te.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/agents-sdk/PromptInputCommands.tsx
|
|
4
|
+
/** Project whole upstream Agents MCP state into composer mention commands. */
|
|
5
|
+
function mcpPromptInputCommands(mcp) {
|
|
6
|
+
return Object.entries(mcp.servers).flatMap(([id, server]) => server.state === "ready" ? [{
|
|
7
|
+
id: `mcp:${id}`,
|
|
8
|
+
value: id,
|
|
9
|
+
label: server.name,
|
|
10
|
+
description: server.server_url,
|
|
11
|
+
icon: /* @__PURE__ */ jsx(McpIcon, {}),
|
|
12
|
+
keywords: [id, server.server_url],
|
|
13
|
+
group: "Connected MCP servers",
|
|
14
|
+
meta: "Connected"
|
|
15
|
+
}] : []);
|
|
16
|
+
}
|
|
17
|
+
/** Project whole upstream skill descriptors into composer slash commands. */
|
|
18
|
+
function skillPromptInputCommands(skills) {
|
|
19
|
+
return skills.map((skill) => ({
|
|
20
|
+
id: `skill:${skill.sourceId ?? "built-in"}:${skill.name}`,
|
|
21
|
+
value: skill.name,
|
|
22
|
+
label: skill.name,
|
|
23
|
+
description: skill.description,
|
|
24
|
+
icon: /* @__PURE__ */ jsx(BoxIcon, {}),
|
|
25
|
+
...skill.sourceId ? {
|
|
26
|
+
keywords: [skill.sourceId],
|
|
27
|
+
meta: skill.sourceId
|
|
28
|
+
} : {},
|
|
29
|
+
group: "Skills"
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { mcpPromptInputCommands, skillPromptInputCommands };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as UseSessionCompactionOptions, c as parseSessionStatusFrame, i as SessionStatusPhase, l as useSessionCompaction, n as SessionFrameSource, o as UseSessionCompactionResult, r as SessionStatusFrame, s as parseSessionErrorFrame, t as SessionCompactionSize } from "../../SessionCompaction-CmTJFpzj.js";
|
|
2
|
+
export { SessionCompactionSize, SessionFrameSource, SessionStatusFrame, SessionStatusPhase, UseSessionCompactionOptions, UseSessionCompactionResult, parseSessionErrorFrame, parseSessionStatusFrame, useSessionCompaction };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
//#region src/components/SessionCompaction.ts
|
|
2
|
+
//#region src/components/agents-sdk/SessionCompaction.ts
|
|
3
3
|
/**
|
|
4
4
|
* Client-side session-compaction plumbing for Think conversations.
|
|
5
5
|
*
|
|
@@ -20,17 +20,23 @@ import * as React from "react";
|
|
|
20
20
|
*
|
|
21
21
|
* This module is the "local adapter … documented runtime-only mirror" that
|
|
22
22
|
* docs/think-session-ui.md calls for: upstream exports no payload types or
|
|
23
|
-
* client hook for these frames. The doc records the complete frame shapes
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* `
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
23
|
+
* client hook for these frames. The doc records the complete frame shapes;
|
|
24
|
+
* this adapter consumes `phase`, the presence of `compacted`, the error string
|
|
25
|
+
* of `cf_agent_session_error`, and the two estimates that size a landed
|
|
26
|
+
* compaction (`tokenEstimate` and `compacted.tokensBefore`). Every field but
|
|
27
|
+
* `phase` degrades to null rather than throwing, so an upstream field change
|
|
28
|
+
* costs detail, never the UI. Per that doc, `tokenThreshold` is the
|
|
29
|
+
* auto-compaction threshold, not the model context window — it stays unread
|
|
30
|
+
* here, and neither estimate may drive the `Context` ring, which reads
|
|
31
|
+
* provider-reported `metadata.usage`.
|
|
30
32
|
*
|
|
31
33
|
* @see ../../docs/think-session-ui.md
|
|
32
34
|
* @see https://github.com/cloudflare/agents/blob/main/docs/agents/sessions.md#compaction
|
|
33
35
|
*/
|
|
36
|
+
/** Finite numbers only — an absent or malformed field degrades to null. */
|
|
37
|
+
function finiteNumber(value) {
|
|
38
|
+
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
39
|
+
}
|
|
34
40
|
/**
|
|
35
41
|
* Parse a raw websocket payload as a `cf_agent_session` status frame.
|
|
36
42
|
* Returns null for every other frame on the connection.
|
|
@@ -44,9 +50,12 @@ function parseSessionStatusFrame(data) {
|
|
|
44
50
|
return null;
|
|
45
51
|
}
|
|
46
52
|
if (typeof message !== "object" || message === null || !("type" in message) || message.type !== "cf_agent_session" || !("phase" in message) || message.phase !== "idle" && message.phase !== "compacting") return null;
|
|
53
|
+
const compacted = "compacted" in message && message.compacted != null ? message.compacted : null;
|
|
47
54
|
return {
|
|
48
55
|
phase: message.phase,
|
|
49
|
-
compacted:
|
|
56
|
+
compacted: compacted !== null,
|
|
57
|
+
tokenEstimate: finiteNumber("tokenEstimate" in message ? message.tokenEstimate : void 0),
|
|
58
|
+
tokensBefore: typeof compacted === "object" && compacted !== null && "tokensBefore" in compacted ? finiteNumber(compacted.tokensBefore) : null
|
|
50
59
|
};
|
|
51
60
|
}
|
|
52
61
|
/**
|
|
@@ -69,17 +78,28 @@ function useSessionCompaction({ agent, chat, getMessages }) {
|
|
|
69
78
|
const [refreshPending, setRefreshPending] = React.useState(false);
|
|
70
79
|
const [reloadError, setReloadError] = React.useState(null);
|
|
71
80
|
const [sessionError, setSessionError] = React.useState(null);
|
|
81
|
+
const [lastCompaction, setLastCompaction] = React.useState(null);
|
|
72
82
|
React.useEffect(() => {
|
|
73
83
|
setCompacting(false);
|
|
74
84
|
setSessionError(null);
|
|
75
85
|
setRefreshPending(false);
|
|
76
86
|
setReloadError(null);
|
|
87
|
+
setLastCompaction(null);
|
|
77
88
|
const onMessage = (event) => {
|
|
78
89
|
const frame = parseSessionStatusFrame(event.data);
|
|
79
90
|
if (frame) {
|
|
80
91
|
setCompacting(frame.phase === "compacting");
|
|
81
|
-
if (frame.phase === "compacting")
|
|
82
|
-
|
|
92
|
+
if (frame.phase === "compacting") {
|
|
93
|
+
setSessionError(null);
|
|
94
|
+
setLastCompaction(null);
|
|
95
|
+
}
|
|
96
|
+
if (frame.compacted) {
|
|
97
|
+
setRefreshPending(true);
|
|
98
|
+
setLastCompaction(frame.tokensBefore !== null && frame.tokenEstimate !== null ? {
|
|
99
|
+
tokensAfter: frame.tokenEstimate,
|
|
100
|
+
tokensBefore: frame.tokensBefore
|
|
101
|
+
} : null);
|
|
102
|
+
}
|
|
83
103
|
return;
|
|
84
104
|
}
|
|
85
105
|
const error = parseSessionErrorFrame(event.data);
|
|
@@ -111,6 +131,7 @@ function useSessionCompaction({ agent, chat, getMessages }) {
|
|
|
111
131
|
}, [refreshPending, status]);
|
|
112
132
|
return {
|
|
113
133
|
compacting,
|
|
134
|
+
lastCompaction,
|
|
114
135
|
reloadError,
|
|
115
136
|
sessionError
|
|
116
137
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
|
-
//#region src/components/SubagentRunDetails.d.ts
|
|
3
|
+
//#region src/components/agents-sdk/SubagentRunDetails.d.ts
|
|
4
4
|
interface SubagentRunProgressProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
/** Human-readable current action or phase. */
|
|
6
6
|
label: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as cx } from "
|
|
2
|
-
import { n as clamp } from "
|
|
3
|
-
import { Progress } from "
|
|
1
|
+
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { n as clamp } from "../../format-CmopcfqJ.js";
|
|
3
|
+
import { Progress } from "../foundations/Progress.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
//#region src/components/SubagentRunDetails.tsx
|
|
6
|
+
//#region src/components/agents-sdk/SubagentRunDetails.tsx
|
|
7
7
|
function SubagentRunProgress({ className, label, value, ref, ...props }) {
|
|
8
8
|
const labelId = React.useId();
|
|
9
9
|
const percent = value === void 0 ? null : Math.round(clamp(value, 0, 1) * 100);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { AgentToolRunPart, AgentToolRunState } from "agents/agent-tools";
|
|
3
3
|
|
|
4
|
-
//#region src/components/SubagentRunIndicator.d.ts
|
|
4
|
+
//#region src/components/agents-sdk/SubagentRunIndicator.d.ts
|
|
5
5
|
declare function getSubagentRunName(run: AgentToolRunState): string;
|
|
6
6
|
/** Human-readable detail for a retained run selector's tooltip. */
|
|
7
7
|
declare function getSubagentRunTooltip(run: AgentToolRunState): React.ReactNode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as cx } from "
|
|
2
|
-
import { J as SpinnerIcon, X as StopIcon, d as CheckIcon, tt as WarningIcon } from "
|
|
1
|
+
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { J as SpinnerIcon, X as StopIcon, d as CheckIcon, tt as WarningIcon } from "../../icons-B1Qw05te.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
//#region src/components/SubagentRunIndicator.tsx
|
|
5
|
+
//#region src/components/agents-sdk/SubagentRunIndicator.tsx
|
|
6
6
|
function getSubagentRunName(run) {
|
|
7
7
|
return run.display?.name ?? run.agentType;
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { UIMessage } from "ai";
|
|
3
3
|
import { AgentToolRunPart, AgentToolRunState } from "agents/agent-tools";
|
|
4
4
|
|
|
5
|
-
//#region src/components/SubagentRunList.d.ts
|
|
5
|
+
//#region src/components/agents-sdk/SubagentRunList.d.ts
|
|
6
6
|
interface SubagentRunListProps<Part extends AgentToolRunPart = UIMessage["parts"][number]> extends Omit<React.HTMLAttributes<HTMLUListElement>, "children" | "onSelect"> {
|
|
7
7
|
/** Complete retained runs returned by `useAgentToolEvents()`, in display order. */
|
|
8
8
|
runs: readonly AgentToolRunState<Part>[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as cx } from "
|
|
1
|
+
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { SubagentRunSelector } from "./SubagentRunSelector.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
//#region src/components/SubagentRunList.tsx
|
|
5
|
+
//#region src/components/agents-sdk/SubagentRunList.tsx
|
|
6
6
|
/** Semantic, wrapping list of retained-run selectors. */
|
|
7
7
|
function SubagentRunList({ className, renderRunLink, runs, ref, ...props }) {
|
|
8
8
|
return /* @__PURE__ */ jsx("ul", {
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { UIMessage } from "ai";
|
|
3
3
|
import { AgentToolRunPart, AgentToolRunState } from "agents/agent-tools";
|
|
4
4
|
|
|
5
|
-
//#region src/components/SubagentRunSelector.d.ts
|
|
5
|
+
//#region src/components/agents-sdk/SubagentRunSelector.d.ts
|
|
6
6
|
interface SubagentRunSelectorProps<Part extends AgentToolRunPart = UIMessage["parts"][number]> extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "children"> {
|
|
7
7
|
/** Complete retained-run state returned by `useAgentToolEvents()`. */
|
|
8
8
|
run: AgentToolRunState<Part>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as cx } from "
|
|
2
|
-
import {
|
|
3
|
-
import { t as NavigationLink } from "
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { l as BrainIcon } from "../../icons-B1Qw05te.js";
|
|
3
|
+
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
4
|
+
import { buttonVariants } from "../foundations/Button.js";
|
|
5
|
+
import { Tooltip } from "../foundations/Tooltip.js";
|
|
6
6
|
import { SubagentRunIndicator, getSubagentRunName, getSubagentRunTooltip } from "./SubagentRunIndicator.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
//#region src/components/SubagentRunSelector.tsx
|
|
9
|
+
//#region src/components/agents-sdk/SubagentRunSelector.tsx
|
|
10
10
|
/**
|
|
11
11
|
* Compact selector for a retained Cloudflare Agent Tool run.
|
|
12
12
|
*
|
|
@@ -30,7 +30,7 @@ function SubagentRunSelector({ className, render, run, tooltip, ref, "aria-label
|
|
|
30
30
|
"aria-label": ariaLabel ?? `Open ${name}, ${run.status}`,
|
|
31
31
|
...props,
|
|
32
32
|
children: [
|
|
33
|
-
/* @__PURE__ */ jsx(
|
|
33
|
+
/* @__PURE__ */ jsx(BrainIcon, { "aria-hidden": "true" }),
|
|
34
34
|
/* @__PURE__ */ jsx("span", {
|
|
35
35
|
className: "subagent-run__title sigvelo-truncate",
|
|
36
36
|
children: name
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { i as AgentMessageRenderPartContext } from "
|
|
2
|
-
import { r as AgentChatProps } from "
|
|
3
|
-
import { i as useOptionalAgentToolRuns, n as AgentToolRunsProvider, r as AgentToolRunsProviderProps, t as AgentToolEventsValue } from "
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { a as
|
|
10
|
-
import {
|
|
11
|
-
import { n as
|
|
12
|
-
import { d as inferWorkspaceLanguage, i as WorkspaceFileState } from "
|
|
13
|
-
import { a as WorkspaceSource, c as workspaceBinaryFileQueryOptions, d as workspaceDirectoryQueryPrefix, f as workspaceFileAssetQueryOptions, g as workspaceTextFileQueryOptions, h as workspaceQueryKey, i as WorkspaceQueryKey, l as workspaceDirectoryQueryKey, m as workspaceInfoQueryOptions, n as WorkspaceFileReadTarget, o as WorkspaceState, p as workspaceFileStatQueryOptions, r as WorkspaceInfo, s as useWorkspace, t as UseWorkspaceOptions, u as workspaceDirectoryQueryOptions } from "
|
|
14
|
-
import { n as WorkspaceExplorerProps, t as WorkspaceExplorer } from "
|
|
1
|
+
import { i as AgentMessageRenderPartContext } from "../../AgentMessageParts-C7L-Mv9U.js";
|
|
2
|
+
import { r as AgentChatProps } from "../../AgentChat-CV-GuYA6.js";
|
|
3
|
+
import { i as useOptionalAgentToolRuns, n as AgentToolRunsProvider, r as AgentToolRunsProviderProps, t as AgentToolEventsValue } from "../../AgentToolRunsContext-Cgve-Upx.js";
|
|
4
|
+
import { n as BrowserLiveViewProps, t as BrowserLiveView } from "../../BrowserLiveView-tJTWkoyu.js";
|
|
5
|
+
import { n as BrowserReplayProps, t as BrowserReplay } from "../../BrowserReplay-B0BQZr-N.js";
|
|
6
|
+
import { o as UseSessionCompactionResult } from "../../SessionCompaction-CmTJFpzj.js";
|
|
7
|
+
import { x as isThinkChatActivityPart } from "../../ThinkChatToolParts-D4qcnnxt.js";
|
|
8
|
+
import { u as describeThinkChatActivityPart } from "../../ThinkChatActivitySummary-teRjrPxW.js";
|
|
9
|
+
import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../../ThinkChatActivity-CgqpROz_.js";
|
|
10
|
+
import { i as ThinkChatValue } from "../../ThinkChatContext-COIgzkYp.js";
|
|
11
|
+
import { n as ThinkRecoveryNoticeProps, t as ThinkRecoveryNotice } from "../../ThinkRecoveryNotice-DGWr94rk.js";
|
|
12
|
+
import { d as inferWorkspaceLanguage, i as WorkspaceFileState } from "../../WorkspaceFile-C8Riev9j.js";
|
|
13
|
+
import { a as WorkspaceSource, c as workspaceBinaryFileQueryOptions, d as workspaceDirectoryQueryPrefix, f as workspaceFileAssetQueryOptions, g as workspaceTextFileQueryOptions, h as workspaceQueryKey, i as WorkspaceQueryKey, l as workspaceDirectoryQueryKey, m as workspaceInfoQueryOptions, n as WorkspaceFileReadTarget, o as WorkspaceState, p as workspaceFileStatQueryOptions, r as WorkspaceInfo, s as useWorkspace, t as UseWorkspaceOptions, u as workspaceDirectoryQueryOptions } from "../../Workspace-EhvvlHOB.js";
|
|
14
|
+
import { n as WorkspaceExplorerProps, t as WorkspaceExplorer } from "../../WorkspaceExplorer-DygQnEyi.js";
|
|
15
15
|
import * as React from "react";
|
|
16
16
|
import { UIMessage } from "ai";
|
|
17
|
-
import { UseAgentOptions } from "agents/react";
|
|
18
17
|
import { DataTag, UndefinedInitialDataOptions } from "@tanstack/react-query";
|
|
18
|
+
import { UseAgentOptions } from "agents/react";
|
|
19
19
|
import { PendingApproval, Think } from "@cloudflare/think";
|
|
20
20
|
import { AgentStub } from "agents/client";
|
|
21
21
|
import { UseVoiceInputReturn } from "@cloudflare/voice/react";
|
|
22
22
|
|
|
23
|
-
//#region src/components/ThinkChat.d.ts
|
|
23
|
+
//#region src/components/agents-sdk/ThinkChat.d.ts
|
|
24
24
|
type ThinkPendingExecutionApprovalsQueryKey = readonly ["think", sourceKey: string, "pending-approvals"];
|
|
25
25
|
type ThinkPendingExecutionApprovalsQueryOptions = UndefinedInitialDataOptions<readonly PendingApproval[], Error, readonly PendingApproval[], ThinkPendingExecutionApprovalsQueryKey> & {
|
|
26
26
|
queryKey: DataTag<ThinkPendingExecutionApprovalsQueryKey, readonly PendingApproval[], Error>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { isThinkChatActivityPart } from "./ThinkChatToolParts.js";
|
|
2
1
|
import { AgentToolRunsProvider, useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
|
|
3
2
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
3
|
+
import { BrowserReplay } from "./BrowserReplay.js";
|
|
4
4
|
import { inferWorkspaceLanguage } from "./WorkspaceFile.js";
|
|
5
|
+
import { isThinkChatActivityPart } from "./ThinkChatToolParts.js";
|
|
5
6
|
import { describeThinkChatActivityPart } from "./ThinkChatActivitySummary.js";
|
|
6
7
|
import { ThinkChatActivity, createThinkChatActivityRenderer, renderThinkChatActivityPart } from "./ThinkChatActivity.js";
|
|
7
8
|
import { ThinkRecoveryNotice } from "./ThinkRecoveryNotice.js";
|
|
8
|
-
import { a as thinkPendingExecutionApprovalsQueryOptions, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkChat, r as ThinkChatProvider, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "
|
|
9
|
-
import { BrowserReplay } from "./BrowserReplay.js";
|
|
9
|
+
import { a as thinkPendingExecutionApprovalsQueryOptions, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkChat, r as ThinkChatProvider, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-Dsm1xF3a.js";
|
|
10
10
|
import { useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileStatQueryOptions, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions } from "./Workspace.js";
|
|
11
11
|
import { WorkspaceExplorer } from "./WorkspaceExplorer.js";
|
|
12
12
|
export { AgentToolRunsProvider, BrowserLiveView, BrowserReplay, ThinkChat, ThinkChatActivity, ThinkChatMessages, ThinkChatProvider, ThinkChatRoot, ThinkRecoveryNotice, WorkspaceExplorer, createThinkChatActivityRenderer, describeThinkChatActivityPart, inferWorkspaceLanguage, isThinkChatActivityPart, renderThinkChatActivityPart, thinkPendingExecutionApprovalsQueryOptions, useOptionalAgentToolRuns, useThinkChat, useThinkPendingExecutionApprovals, useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileStatQueryOptions, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as describeThinkChatActivityPart } from "
|
|
3
|
-
import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "
|
|
1
|
+
import { x as isThinkChatActivityPart } from "../../ThinkChatToolParts-D4qcnnxt.js";
|
|
2
|
+
import { u as describeThinkChatActivityPart } from "../../ThinkChatActivitySummary-teRjrPxW.js";
|
|
3
|
+
import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../../ThinkChatActivity-CgqpROz_.js";
|
|
4
4
|
export { ThinkChatActivity, ThinkChatActivityProps, ThinkChatActivityRendererOptions, ThinkChatToolRenderer, ThinkChatToolRenderers, createThinkChatActivityRenderer, describeThinkChatActivityPart, isThinkChatActivityPart, renderThinkChatActivityPart };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Button } from "./Button.js";
|
|
2
|
-
import { useExpansionState } from "./ExpansionState.js";
|
|
3
|
-
import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityText, ActivityTrigger } from "./Activity.js";
|
|
4
1
|
import { AgentActivityFavicon, AgentActivityIcon } from "./AgentActivity.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { useExpansionState } from "../ai-sdk/ExpansionState.js";
|
|
3
|
+
import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityText, ActivityTrigger } from "../ai-sdk/Activity.js";
|
|
4
|
+
import { Button } from "../foundations/Button.js";
|
|
5
|
+
import { MessageResponse } from "../ai-sdk/Message.js";
|
|
7
6
|
import { useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
|
|
8
7
|
import { SubagentRunList } from "./SubagentRunList.js";
|
|
9
8
|
import { useOptionalThinkChatLive } from "./ThinkChatContext.js";
|
|
9
|
+
import { isBrowserToolPart, isExecuteToolPart, isFetchToolPart, isPartWorking, isSessionContextToolPart, isSkillToolPart, isThinkChatActivityPart, isWorkspaceToolPart } from "./ThinkChatToolParts.js";
|
|
10
10
|
import { ThinkChatBrowserPanel, ThinkChatExecutePanel, ThinkChatFetchPanel, ThinkChatSessionContextPanel, ThinkChatSkillPanel, ThinkChatWorkspacePanel } from "./ThinkChatToolPanels.js";
|
|
11
11
|
import { activityPartIconKind, activityPartUrl, deriveThinkChatActivityHeader, describeThinkChatActivityPart } from "./ThinkChatActivitySummary.js";
|
|
12
12
|
import * as React from "react";
|
|
13
13
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { getToolName, isReasoningUIPart, isToolUIPart } from "ai";
|
|
15
|
-
//#region src/components/ThinkChatActivity.tsx
|
|
15
|
+
//#region src/components/agents-sdk/ThinkChatActivity.tsx
|
|
16
16
|
function activityPartIcon(part) {
|
|
17
17
|
const url = activityPartUrl(part);
|
|
18
18
|
return url ? /* @__PURE__ */ jsx(AgentActivityFavicon, { url }) : /* @__PURE__ */ jsx(AgentActivityIcon, { kind: activityPartIconKind(part) });
|
package/dist/components/{ThinkChatActivitySummary.d.ts → agents-sdk/ThinkChatActivitySummary.d.ts}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ThinkChatToolLifecycleSnapshot, c as deriveThinkChatActivityHeader, d as summarizeActivitySteps, i as ThinkChatToolDescribers, l as deriveThinkChatToolLifecycleHeader, n as ThinkChatActivityHeader, o as activityPartIconKind, r as ThinkChatToolDescriber, s as activityPartUrl, t as ThinkChatActivityDescription, u as describeThinkChatActivityPart } from "
|
|
1
|
+
import { a as ThinkChatToolLifecycleSnapshot, c as deriveThinkChatActivityHeader, d as summarizeActivitySteps, i as ThinkChatToolDescribers, l as deriveThinkChatToolLifecycleHeader, n as ThinkChatActivityHeader, o as activityPartIconKind, r as ThinkChatToolDescriber, s as activityPartUrl, t as ThinkChatActivityDescription, u as describeThinkChatActivityPart } from "../../ThinkChatActivitySummary-teRjrPxW.js";
|
|
2
2
|
export { ThinkChatActivityDescription, ThinkChatActivityHeader, ThinkChatToolDescriber, ThinkChatToolDescribers, ThinkChatToolLifecycleSnapshot, activityPartIconKind, activityPartUrl, deriveThinkChatActivityHeader, deriveThinkChatToolLifecycleHeader, describeThinkChatActivityPart, summarizeActivitySteps };
|
package/dist/components/{ThinkChatActivitySummary.js → agents-sdk/ThinkChatActivitySummary.js}
RENAMED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { t as capitalize } from "
|
|
2
|
-
import {
|
|
3
|
-
import { t as summarizeToolInput } from "
|
|
1
|
+
import { t as capitalize } from "../../format-CmopcfqJ.js";
|
|
2
|
+
import { getToolDisplayName } from "../ai-sdk/ToolPart.js";
|
|
3
|
+
import { t as summarizeToolInput } from "../../summarize-tool-input-CqTcGRYy.js";
|
|
4
|
+
import { displayUrl, isBrowserToolPart, isExecuteToolPart, isFetchToolPart, isPartFailed, isPartWorking, isSessionContextToolFailure, isSessionContextToolPart, isSkillToolPart, isWorkspaceToolPart } from "./ThinkChatToolParts.js";
|
|
4
5
|
import { getToolName, isReasoningUIPart, isToolUIPart } from "ai";
|
|
5
|
-
//#region src/components/ThinkChatActivitySummary.ts
|
|
6
|
+
//#region src/components/agents-sdk/ThinkChatActivitySummary.ts
|
|
6
7
|
function described(action, detail) {
|
|
7
8
|
return detail ? {
|
|
8
9
|
action,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as useOptionalThinkChatContext, i as ThinkChatValue, n as ThinkChatLiveContext, o as useOptionalThinkChatLive, r as ThinkChatLiveValue, s as useThinkChatContext, t as ThinkChatContext } from "
|
|
1
|
+
import { a as useOptionalThinkChatContext, i as ThinkChatValue, n as ThinkChatLiveContext, o as useOptionalThinkChatLive, r as ThinkChatLiveValue, s as useThinkChatContext, t as ThinkChatContext } from "../../ThinkChatContext-COIgzkYp.js";
|
|
2
2
|
export { ThinkChatContext, ThinkChatLiveContext, ThinkChatLiveValue, ThinkChatValue, useOptionalThinkChatContext, useOptionalThinkChatLive, useThinkChatContext };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
//#region src/components/ThinkChatContext.ts
|
|
2
|
+
//#region src/components/agents-sdk/ThinkChatContext.ts
|
|
3
3
|
/**
|
|
4
4
|
* React contexts cannot bind provider-specific generics. Keep the stored value
|
|
5
5
|
* opaque and restore the complete upstream hook type through the typed accessors.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as SessionContextToolPart, d as WorkspaceToolPart, n as ExecuteToolPart, o as SkillToolPart, r as FetchToolPart, t as BrowserToolPart } from "
|
|
1
|
+
import { a as SessionContextToolPart, d as WorkspaceToolPart, n as ExecuteToolPart, o as SkillToolPart, r as FetchToolPart, t as BrowserToolPart } from "../../ThinkChatToolParts-D4qcnnxt.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
|
-
//#region src/components/ThinkChatToolPanels.d.ts
|
|
4
|
+
//#region src/components/agents-sdk/ThinkChatToolPanels.d.ts
|
|
5
5
|
/** Default panels for the Think workspace tools, Claude Code-style: read/write
|
|
6
6
|
show the file with line numbers, edit shows a mini diff, list/find/grep
|
|
7
7
|
show their result lists, bash gets the shell panel. Everything is typed by
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ActivityOutput, ActivityPanel } from "
|
|
2
|
-
import {
|
|
3
|
-
import { Tabs } from "./Tabs.js";
|
|
4
|
-
import { t as CodeBlock } from "../CodeBlock-BUfEhDia.js";
|
|
1
|
+
import { ActivityOutput, ActivityPanel } from "../ai-sdk/Activity.js";
|
|
2
|
+
import { Tabs } from "../foundations/Tabs.js";
|
|
5
3
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
4
|
+
import { t as CodeBlock } from "../../CodeBlock-CM5gfmdq.js";
|
|
6
5
|
import { inferWorkspaceLanguage } from "./WorkspaceFile.js";
|
|
6
|
+
import { displayUrl, isSessionContextToolFailure } from "./ThinkChatToolParts.js";
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { getToolName } from "ai";
|
|
10
|
-
//#region src/components/ThinkChatToolPanels.tsx
|
|
10
|
+
//#region src/components/agents-sdk/ThinkChatToolPanels.tsx
|
|
11
11
|
function renderDeniedPanel(label, reason) {
|
|
12
12
|
return /* @__PURE__ */ jsx(ActivityPanel, {
|
|
13
13
|
label,
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { S as isWorkspaceToolPart, _ as isPartWorking, a as SessionContextToolPart, b as isSkillToolPart, c as ThinkBashToolPart, d as WorkspaceToolPart, f as displayUrl, g as isPartFailed, h as isFetchToolPart, i as SessionContextToolName, l as ThinkChatPart, m as isExecuteToolPart, n as ExecuteToolPart, o as SkillToolPart, p as isBrowserToolPart, r as FetchToolPart, s as ThinkBashToolOutput, t as BrowserToolPart, u as ThinkWorkspaceToolName, v as isSessionContextToolFailure, x as isThinkChatActivityPart, y as isSessionContextToolPart } from "../../ThinkChatToolParts-D4qcnnxt.js";
|
|
2
|
+
export { BrowserToolPart, ExecuteToolPart, FetchToolPart, SessionContextToolName, SessionContextToolPart, SkillToolPart, ThinkBashToolOutput, ThinkBashToolPart, ThinkChatPart, ThinkWorkspaceToolName, WorkspaceToolPart, displayUrl, isBrowserToolPart, isExecuteToolPart, isFetchToolPart, isPartFailed, isPartWorking, isSessionContextToolFailure, isSessionContextToolPart, isSkillToolPart, isThinkChatActivityPart, isWorkspaceToolPart };
|
|
@@ -1,36 +1,6 @@
|
|
|
1
|
+
import { isToolPartFailed, isToolPartWorking } from "../ai-sdk/ToolPart.js";
|
|
1
2
|
import { getStaticToolName, getToolName, isReasoningUIPart, isStaticToolUIPart, isToolUIPart } from "ai";
|
|
2
|
-
//#region src/components/ThinkChatToolParts.ts
|
|
3
|
-
/** React-free equivalent of Think's UI-state mapping. Kept local so activity
|
|
4
|
-
* summaries can run in workers and extension background contexts. */
|
|
5
|
-
function getToolPartState(part) {
|
|
6
|
-
if (!("state" in part)) return "loading";
|
|
7
|
-
switch (part.state) {
|
|
8
|
-
case "input-streaming": return "streaming";
|
|
9
|
-
case "approval-requested": return "waiting-approval";
|
|
10
|
-
case "approval-responded": return "approved";
|
|
11
|
-
case "output-available": return "complete";
|
|
12
|
-
case "output-error": return "error";
|
|
13
|
-
case "output-denied": return "denied";
|
|
14
|
-
default: return "loading";
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
/** Prefer AI SDK's provider/tool-authored title over its transport-facing key. */
|
|
18
|
-
function getToolDisplayName(part) {
|
|
19
|
-
return part.title ?? getToolName(part);
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Whole-part supplement to Think's simplified state mapping. Think maps every
|
|
23
|
-
* `output-available` part to complete, while AI SDK preliminary outputs remain
|
|
24
|
-
* in flight until a non-preliminary result arrives.
|
|
25
|
-
*/
|
|
26
|
-
function isToolPartWorking(part) {
|
|
27
|
-
const state = getToolPartState(part);
|
|
28
|
-
return state === "loading" || state === "streaming" || state === "waiting-approval" || state === "approved" || part.state === "output-available" && part.preliminary === true;
|
|
29
|
-
}
|
|
30
|
-
function isToolPartFailed(part) {
|
|
31
|
-
const state = getToolPartState(part);
|
|
32
|
-
return state === "error" || state === "denied";
|
|
33
|
-
}
|
|
3
|
+
//#region src/components/agents-sdk/ThinkChatToolParts.ts
|
|
34
4
|
const WORKSPACE_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
35
5
|
"read",
|
|
36
6
|
"write",
|
|
@@ -105,4 +75,4 @@ function displayUrl(url) {
|
|
|
105
75
|
return url ? url.replace(/^https?:\/\//, "") : "";
|
|
106
76
|
}
|
|
107
77
|
//#endregion
|
|
108
|
-
export { displayUrl,
|
|
78
|
+
export { displayUrl, isBrowserToolPart, isExecuteToolPart, isFetchToolPart, isPartFailed, isPartWorking, isSessionContextToolFailure, isSessionContextToolPart, isSkillToolPart, isThinkChatActivityPart, isWorkspaceToolPart };
|
|
@@ -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/ThinkExecutionDetail.d.ts
|
|
4
|
+
//#region src/components/agents-sdk/ThinkExecutionDetail.d.ts
|
|
5
5
|
interface ThinkExecutionDetailProps extends React.HTMLAttributes<HTMLElement> {
|
|
6
6
|
run: ThinkExecutionRun | null;
|
|
7
7
|
emptyState?: React.ReactNode;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as cx } from "
|
|
2
|
-
import { $ as TerminalIcon, C as FileIcon, O as InfoIcon, W as RefreshIcon, d as CheckIcon, n as ArrowDownIcon, rt as XIcon } from "
|
|
3
|
-
import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityOutput, ActivityPanel, ActivityTrigger } from "
|
|
1
|
+
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
+
import { $ as TerminalIcon, C as FileIcon, O as InfoIcon, W as RefreshIcon, d as CheckIcon, n as ArrowDownIcon, rt as XIcon } from "../../icons-B1Qw05te.js";
|
|
3
|
+
import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityOutput, ActivityPanel, ActivityTrigger } from "../ai-sdk/Activity.js";
|
|
4
4
|
import { formatThinkExecutionRunProgress, formatThinkExecutionStatus, formatThinkExecutionTimestamp, getThinkExecutionRunError, getThinkExecutionRunId, getThinkExecutionRunProgressedAt, getThinkExecutionRunProgressedLabel, getThinkExecutionRunStatus, getThinkExecutionRunTitle, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
5
5
|
import { ThinkExecutionStatus } from "./ThinkExecutionStatus.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
//#region src/components/ThinkExecutionDetail.tsx
|
|
8
|
+
//#region src/components/agents-sdk/ThinkExecutionDetail.tsx
|
|
9
9
|
function formatJson(value) {
|
|
10
10
|
return JSON.stringify(value, null, 2);
|
|
11
11
|
}
|
|
@@ -29,10 +29,7 @@ function ThinkExecutionDetail({ className, emptyState = "Select a run to view it
|
|
|
29
29
|
className: "think-execution-workbench__detail-header",
|
|
30
30
|
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", { children: getThinkExecutionRunTitle(run) }), !isThinkSubmissionRun(run) ? /* @__PURE__ */ jsx("code", { children: id }) : null] }), /* @__PURE__ */ jsxs("div", {
|
|
31
31
|
className: "think-execution-workbench__detail-status",
|
|
32
|
-
children: [/* @__PURE__ */ jsx(ThinkExecutionStatus, {
|
|
33
|
-
run,
|
|
34
|
-
className: "think-execution-workbench__icon"
|
|
35
|
-
}), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("strong", { children: formatThinkExecutionStatus(getThinkExecutionRunStatus(run)) }), /* @__PURE__ */ jsx("span", { children: formatThinkExecutionRunProgress(run) })] })]
|
|
32
|
+
children: [/* @__PURE__ */ jsx(ThinkExecutionStatus, { run }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("strong", { children: formatThinkExecutionStatus(getThinkExecutionRunStatus(run)) }), /* @__PURE__ */ jsx("span", { children: formatThinkExecutionRunProgress(run) })] })]
|
|
36
33
|
})]
|
|
37
34
|
}), /* @__PURE__ */ jsxs(Activity, {
|
|
38
35
|
defaultOpen: true,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as isThinkSubmissionRun, a as formatThinkExecutionStatus, c as getThinkExecutionRunError, d as getThinkExecutionRunProgressedLabel, f as getThinkExecutionRunStatus, g as isSameThinkExecutionRun, h as getThinkExecutionRunTitle, i as formatThinkExecutionShortTimestamp, l as getThinkExecutionRunId, m as getThinkExecutionRunSubtitle, n as ThinkExecutionStatusTone, o as formatThinkExecutionTimestamp, p as getThinkExecutionRunStatusTone, r as formatThinkExecutionRunProgress, s as getThinkExecutionRunAccessibleName, t as ThinkExecutionRun, u as getThinkExecutionRunProgressedAt } from "
|
|
1
|
+
import { _ as isThinkSubmissionRun, a as formatThinkExecutionStatus, c as getThinkExecutionRunError, d as getThinkExecutionRunProgressedLabel, f as getThinkExecutionRunStatus, g as isSameThinkExecutionRun, h as getThinkExecutionRunTitle, i as formatThinkExecutionShortTimestamp, l as getThinkExecutionRunId, m as getThinkExecutionRunSubtitle, n as ThinkExecutionStatusTone, o as formatThinkExecutionTimestamp, p as getThinkExecutionRunStatusTone, r as formatThinkExecutionRunProgress, s as getThinkExecutionRunAccessibleName, t as ThinkExecutionRun, u as getThinkExecutionRunProgressedAt } from "../../ThinkExecutionRun-lYYgyeE1.js";
|
|
2
2
|
export { ThinkExecutionRun, ThinkExecutionStatusTone, formatThinkExecutionRunProgress, formatThinkExecutionShortTimestamp, formatThinkExecutionStatus, formatThinkExecutionTimestamp, getThinkExecutionRunAccessibleName, getThinkExecutionRunError, getThinkExecutionRunId, getThinkExecutionRunProgressedAt, getThinkExecutionRunProgressedLabel, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, getThinkExecutionRunSubtitle, getThinkExecutionRunTitle, isSameThinkExecutionRun, isThinkSubmissionRun };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as capitalize } from "
|
|
2
|
-
//#region src/components/ThinkExecutionRun.ts
|
|
1
|
+
import { t as capitalize } from "../../format-CmopcfqJ.js";
|
|
2
|
+
//#region src/components/agents-sdk/ThinkExecutionRun.ts
|
|
3
3
|
/** Narrows the direct upstream execution union without wrapping either record. */
|
|
4
4
|
function isThinkSubmissionRun(run) {
|
|
5
5
|
return "submissionId" in run;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-lYYgyeE1.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/agents-sdk/ThinkExecutionStatus.d.ts
|
|
5
|
+
interface ThinkExecutionStatusProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
6
|
+
/** Whole upstream Think submission or Agents workflow record. */
|
|
7
|
+
run: ThinkExecutionRun;
|
|
8
|
+
/** Accessible status label; derived from the run when omitted. */
|
|
9
|
+
label?: string;
|
|
10
|
+
}
|
|
11
|
+
interface ThinkExecutionRunSummaryProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
12
|
+
/** Whole upstream Think submission or Agents workflow record. */
|
|
13
|
+
run: ThinkExecutionRun;
|
|
14
|
+
}
|
|
15
|
+
/** Shared status icon for whole upstream Think submission and Agents workflow records. */
|
|
16
|
+
declare function ThinkExecutionStatus({
|
|
17
|
+
className,
|
|
18
|
+
label,
|
|
19
|
+
run,
|
|
20
|
+
ref,
|
|
21
|
+
...props
|
|
22
|
+
}: ThinkExecutionStatusProps & {
|
|
23
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
24
|
+
}): React.JSX.Element;
|
|
25
|
+
/** Shared identity, status, and progress summary for a whole Think execution record. */
|
|
26
|
+
declare function ThinkExecutionRunSummary({
|
|
27
|
+
className,
|
|
28
|
+
run,
|
|
29
|
+
ref,
|
|
30
|
+
...props
|
|
31
|
+
}: ThinkExecutionRunSummaryProps & {
|
|
32
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
33
|
+
}): React.JSX.Element;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { ThinkExecutionRunSummary, ThinkExecutionRunSummaryProps, ThinkExecutionStatus, ThinkExecutionStatusProps };
|