@mcp-b/react-components 0.28.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-CHEz8ts_.d.ts → AgentChat-CV-GuYA6.d.ts} +29 -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-C2uaL3el.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} +79 -41
- 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} +18 -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/codex-model-catalog.d.ts +4 -4
- 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
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import { r as ButtonProps } from "./Button-
|
|
2
|
-
import { _ as SelectSeparatorProps, a as SelectIconProps, c as SelectItemTextProps, d as SelectPopupProps, g as SelectScrollUpArrowProps, h as SelectScrollDownArrowProps, i as SelectGroupProps, l as SelectLabelProps, m as SelectProps, n as SelectBackdropProps, o as SelectItemIndicatorProps, p as SelectPositionerProps, r as SelectGroupLabelProps, s as SelectItemProps, t as Select, u as SelectListProps, v as SelectTriggerProps, y as SelectValueProps } from "./Select-
|
|
3
|
-
import { a as TabsListProps, n as TabProps, r as Tabs, t as TabPanelProps } from "./Tabs-
|
|
4
|
-
import { t as Combobox } from "./Combobox-
|
|
5
|
-
import { d as MenuProps, s as MenuItemProps, t as Menu } from "./Menu-
|
|
1
|
+
import { r as ButtonProps } from "./Button-CZt3yywF.js";
|
|
2
|
+
import { _ as SelectSeparatorProps, a as SelectIconProps, c as SelectItemTextProps, d as SelectPopupProps, g as SelectScrollUpArrowProps, h as SelectScrollDownArrowProps, i as SelectGroupProps, l as SelectLabelProps, m as SelectProps, n as SelectBackdropProps, o as SelectItemIndicatorProps, p as SelectPositionerProps, r as SelectGroupLabelProps, s as SelectItemProps, t as Select, u as SelectListProps, v as SelectTriggerProps, y as SelectValueProps } from "./Select-D96d09ww.js";
|
|
3
|
+
import { a as TabsListProps, n as TabProps, r as Tabs, t as TabPanelProps } from "./Tabs-Ptrbaynh.js";
|
|
4
|
+
import { t as Combobox } from "./Combobox-WrrDDaEv.js";
|
|
5
|
+
import { d as MenuProps, s as MenuItemProps, t as Menu } from "./Menu-DVmjBIuM.js";
|
|
6
6
|
import * as React from "react";
|
|
7
|
-
import {
|
|
8
|
-
import { PendingApproval, Think } from "@cloudflare/think";
|
|
9
|
-
import { AgentStub } from "agents/client";
|
|
10
|
-
import { UseVoiceInputReturn } from "@cloudflare/voice/react";
|
|
11
|
-
import { MCPServersState } from "agents";
|
|
12
|
-
import { SkillDescriptor } from "agents/skills";
|
|
7
|
+
import { ChatStatus, FileUIPart } from "ai";
|
|
13
8
|
|
|
14
|
-
//#region src/components/PromptInput.d.ts
|
|
9
|
+
//#region src/components/ai-sdk/PromptInput.d.ts
|
|
15
10
|
/** The payload produced when the prompt input is submitted. */
|
|
16
11
|
interface PromptInputMessage {
|
|
17
12
|
text: string;
|
|
@@ -250,8 +245,8 @@ declare function PromptInputButton({
|
|
|
250
245
|
ref?: React.Ref<HTMLButtonElement>;
|
|
251
246
|
}): React.JSX.Element;
|
|
252
247
|
interface PromptInputDictationProps extends Omit<PromptInputButtonProps, "children" | "onClick" | "tooltip"> {
|
|
253
|
-
/**
|
|
254
|
-
voice:
|
|
248
|
+
/** Whole voice-input state; authentication and transport stay in the host. */
|
|
249
|
+
voice: PromptInputVoiceInput;
|
|
255
250
|
/**
|
|
256
251
|
* Runs immediately before the unchanged upstream `voice.start()` call.
|
|
257
252
|
* Use this for host-specific prerequisites, such as opening an extension tab
|
|
@@ -261,7 +256,18 @@ interface PromptInputDictationProps extends Omit<PromptInputButtonProps, "childr
|
|
|
261
256
|
* @see https://github.com/cloudflare/agents/blob/main/examples/voice-input/src/client.tsx
|
|
262
257
|
* @see https://developer.chrome.com/docs/extensions/reference/api/offscreen#type-Reason
|
|
263
258
|
*/
|
|
264
|
-
beforeStart?: (voice:
|
|
259
|
+
beforeStart?: (voice: PromptInputVoiceInput) => void | Promise<void>;
|
|
260
|
+
}
|
|
261
|
+
/** Structural voice interface accepted from any host or voice SDK. */
|
|
262
|
+
interface PromptInputVoiceInput {
|
|
263
|
+
transcript: string;
|
|
264
|
+
interimTranscript: string | null;
|
|
265
|
+
isListening: boolean;
|
|
266
|
+
audioLevel: number;
|
|
267
|
+
error: string | null;
|
|
268
|
+
start: () => void | Promise<void>;
|
|
269
|
+
stop: () => void;
|
|
270
|
+
clear: () => void;
|
|
265
271
|
}
|
|
266
272
|
declare function PromptInputDictation({
|
|
267
273
|
voice,
|
|
@@ -366,76 +372,6 @@ declare function PromptInputSubmit({
|
|
|
366
372
|
}: PromptInputSubmitProps & {
|
|
367
373
|
ref?: React.Ref<HTMLButtonElement>;
|
|
368
374
|
}): React.JSX.Element;
|
|
369
|
-
/**
|
|
370
|
-
* Resolve Think execution approvals that do not use the AI SDK
|
|
371
|
-
* `approval-requested` part: paused codemode executions and durable-pause
|
|
372
|
-
* approvals from `pendingApprovals()`. Pass the whole upstream Think agent
|
|
373
|
-
* stub; the component calls its client-callable RPCs directly:
|
|
374
|
-
*
|
|
375
|
-
* ```tsx
|
|
376
|
-
* <PromptInputApproval part={part} thinkStub={agent.stub} />
|
|
377
|
-
* ```
|
|
378
|
-
*
|
|
379
|
-
* On approve, upstream resumes or runs the parked execution and auto-continues
|
|
380
|
-
* the chat. Both RPCs are idempotent, so a stale click resolves to "already
|
|
381
|
-
* handled".
|
|
382
|
-
*/
|
|
383
|
-
/** The id a response must carry: the approval id, or the paused run's executionId. */
|
|
384
|
-
declare function getApprovalRequestId(part: ToolUIPart | DynamicToolUIPart): string | undefined;
|
|
385
|
-
/** Component-local identity: paused executions can ask for multiple approvals. */
|
|
386
|
-
declare function getApprovalStateKey(part: ToolUIPart | DynamicToolUIPart): string | undefined;
|
|
387
|
-
/** Derives pending tool approvals straight from the messages — no app-owned shapes. */
|
|
388
|
-
declare function getPendingToolApprovals(messages: readonly UIMessage[], {
|
|
389
|
-
pausedExecutions
|
|
390
|
-
}?: {
|
|
391
|
-
pausedExecutions?: boolean;
|
|
392
|
-
}): Array<ToolUIPart | DynamicToolUIPart>;
|
|
393
|
-
interface PromptInputApprovalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "part"> {
|
|
394
|
-
/**
|
|
395
|
-
* The `approval-requested` tool part — or a paused codemode execution —
|
|
396
|
-
* passed whole. Renders nothing for other states.
|
|
397
|
-
*/
|
|
398
|
-
part?: ToolUIPart | DynamicToolUIPart;
|
|
399
|
-
/** A Think `pendingApprovals()` entry for durable parked action approvals. */
|
|
400
|
-
approval?: PendingApproval;
|
|
401
|
-
/** Pass `addToolApprovalResponse` from `useAgentChat`/`useChat` directly. */
|
|
402
|
-
onRespond?: ChatAddToolApproveResponseFunction;
|
|
403
|
-
/** Whole upstream Think stub used to resolve execution approvals instead of `onRespond`. */
|
|
404
|
-
thinkStub?: AgentStub<Think>;
|
|
405
|
-
/** Called after a Think approve/reject RPC settles, including when it rejects. */
|
|
406
|
-
onExecutionSettled?: () => void | Promise<void>;
|
|
407
|
-
/**
|
|
408
|
-
* Renders a Skip action that dismisses the confirmation without responding —
|
|
409
|
-
* the approval stays pending upstream.
|
|
410
|
-
*/
|
|
411
|
-
onSkip?: () => void;
|
|
412
|
-
/** Overrides the default "Do you want to allow…" question. */
|
|
413
|
-
question?: React.ReactNode;
|
|
414
|
-
/** Total pending approvals, for the "1 of N" hint. */
|
|
415
|
-
count?: number;
|
|
416
|
-
}
|
|
417
|
-
/**
|
|
418
|
-
* The composer's approval state: when a tool call awaits human approval the
|
|
419
|
-
* prompt input area becomes the confirmation. "Yes" approves on click; typing
|
|
420
|
-
* in the "No, and tell the agent what to do differently" row selects deny and
|
|
421
|
-
* sends the text as the native approval `reason`. Submit (or Enter) sends the
|
|
422
|
-
* current selection — approve by default.
|
|
423
|
-
*/
|
|
424
|
-
declare function PromptInputApproval({
|
|
425
|
-
part,
|
|
426
|
-
approval: durableApproval,
|
|
427
|
-
onRespond,
|
|
428
|
-
thinkStub,
|
|
429
|
-
onExecutionSettled,
|
|
430
|
-
onSkip,
|
|
431
|
-
question,
|
|
432
|
-
count,
|
|
433
|
-
className,
|
|
434
|
-
ref,
|
|
435
|
-
...props
|
|
436
|
-
}: PromptInputApprovalProps & {
|
|
437
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
438
|
-
}): React.JSX.Element | null;
|
|
439
375
|
type PromptInputSelectProps = React.ComponentProps<typeof Select.Root>;
|
|
440
376
|
declare const PromptInputSelect: {
|
|
441
377
|
Root: <Value>(props: SelectProps<Value>) => React.JSX.Element;
|
|
@@ -573,6 +509,10 @@ interface PromptInputHoverCardTriggerProps extends React.HTMLAttributes<HTMLSpan
|
|
|
573
509
|
declare function PromptInputHoverCardTrigger({
|
|
574
510
|
className,
|
|
575
511
|
ref,
|
|
512
|
+
onFocus,
|
|
513
|
+
onBlur,
|
|
514
|
+
onMouseEnter,
|
|
515
|
+
onMouseLeave,
|
|
576
516
|
...props
|
|
577
517
|
}: PromptInputHoverCardTriggerProps & {
|
|
578
518
|
ref?: React.Ref<HTMLSpanElement>;
|
|
@@ -581,6 +521,8 @@ interface PromptInputHoverCardContentProps extends React.HTMLAttributes<HTMLDivE
|
|
|
581
521
|
declare function PromptInputHoverCardContent({
|
|
582
522
|
className,
|
|
583
523
|
ref,
|
|
524
|
+
onMouseEnter,
|
|
525
|
+
onMouseLeave,
|
|
584
526
|
...props
|
|
585
527
|
}: PromptInputHoverCardContentProps & {
|
|
586
528
|
ref?: React.Ref<HTMLDivElement>;
|
|
@@ -787,10 +729,6 @@ interface PromptInputCommandDefinition {
|
|
|
787
729
|
/** Quiet trailing provenance such as a workspace, server, or installation scope. */
|
|
788
730
|
meta?: React.ReactNode;
|
|
789
731
|
}
|
|
790
|
-
/** Project whole upstream Agents MCP state into composer mention commands. */
|
|
791
|
-
declare function mcpPromptInputCommands(mcp: MCPServersState): PromptInputCommandDefinition[];
|
|
792
|
-
/** Project whole upstream skill descriptors into composer slash commands. */
|
|
793
|
-
declare function skillPromptInputCommands(skills: readonly SkillDescriptor[]): PromptInputCommandDefinition[];
|
|
794
732
|
type PromptInputCommandTrigger = "/" | "@";
|
|
795
733
|
interface PromptInputReference {
|
|
796
734
|
id: string;
|
|
@@ -872,4 +810,4 @@ declare function PromptInputContextSelector({
|
|
|
872
810
|
action
|
|
873
811
|
}: PromptInputContextSelectorProps): React.JSX.Element;
|
|
874
812
|
//#endregion
|
|
875
|
-
export {
|
|
813
|
+
export { PromptInputFooterProps as $, PromptInputCommandEmptyProps as A, PromptInputTabsListProps as At, PromptInputCommandListProps as B, TooltipSide as Bt, PromptInputButtonProps as C, PromptInputTabBodyProps as Ct, PromptInputCommandComposerProps as D, PromptInputTabLabelProps as Dt, PromptInputCommandComposer as E, PromptInputTabLabel as Et, PromptInputCommandInput as F, PromptInputTooltipConfig as Ft, PromptInputContextAction as G, PromptInputCommandSeparator as H, usePromptInputController as Ht, PromptInputCommandInputProps as I, PromptInputTray as It, PromptInputContextSelectorProps as J, PromptInputContextItem as K, PromptInputCommandItem as L, PromptInputTrayProps as Lt, PromptInputCommandGroupLabel as M, PromptInputTextareaProps as Mt, PromptInputCommandGroupLabelProps as N, PromptInputTools as Nt, PromptInputCommandDefinition as O, PromptInputTabProps as Ot, PromptInputCommandGroupProps as P, PromptInputToolsProps as Pt, PromptInputFooter as Q, PromptInputCommandItemProps as R, PromptInputVoiceInput as Rt, PromptInputButton as S, PromptInputTabBody as St, PromptInputCommand as T, PromptInputTabItemProps as Tt, PromptInputCommandSeparatorProps as U, useProviderAttachments as Ut, PromptInputCommandProps as V, usePromptInputAttachments as Vt, PromptInputCommandTrigger as W, PromptInputDictation as X, PromptInputControllerProps as Y, PromptInputDictationProps as Z, PromptInputAttachmentProps as _, PromptInputSelect as _t, PromptInputActionAddAttachmentsProps as a, PromptInputHoverCardProps as at, PromptInputBody as b, PromptInputSubmitProps as bt, PromptInputActionMenu as c, PromptInputMessage as ct, PromptInputActionMenuItem as d, PromptInputProps as dt, PromptInputHeader as et, PromptInputActionMenuItemProps as f, PromptInputProvider as ft, PromptInputAttachment as g, PromptInputReferencesProps as gt, PromptInputActionMenuTriggerProps as h, PromptInputReferences as ht, PromptInputActionAddAttachments as i, PromptInputHoverCardContentProps as it, PromptInputCommandGroup as j, PromptInputTextarea as jt, PromptInputCommandEmpty as k, PromptInputTabsList as kt, PromptInputActionMenuContent as l, PromptInputPermissionSelector as lt, PromptInputActionMenuTrigger as m, PromptInputReference as mt, PermissionMode as n, PromptInputHoverCard as nt, PromptInputActionAddScreenshot as o, PromptInputHoverCardTrigger as ot, PromptInputActionMenuProps as p, PromptInputProviderProps as pt, PromptInputContextSelector as q, PromptInput as r, PromptInputHoverCardContent as rt, PromptInputActionAddScreenshotProps as s, PromptInputHoverCardTriggerProps as st, AttachmentsContext as t, PromptInputHeaderProps as tt, PromptInputActionMenuContentProps as u, PromptInputPermissionSelectorProps as ut, PromptInputAttachments as v, PromptInputSelectProps as vt, PromptInputButtonTooltip as w, PromptInputTabItem as wt, PromptInputBodyProps as x, PromptInputTab as xt, PromptInputAttachmentsProps as y, PromptInputSubmit as yt, PromptInputCommandList as z, TextInputContext as zt };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Select } from "@base-ui/react/select";
|
|
3
3
|
|
|
4
|
-
//#region src/components/Select.d.ts
|
|
4
|
+
//#region src/components/foundations/Select.d.ts
|
|
5
5
|
type SelectProps<Value = unknown> = Select.Root.Props<Value>;
|
|
6
6
|
interface SelectLabelProps extends Select.Label.Props {}
|
|
7
7
|
interface SelectTriggerProps extends Select.Trigger.Props {
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import { ChatStatus, UIMessage } from "ai";
|
|
2
2
|
|
|
3
|
-
//#region src/components/SessionCompaction.d.ts
|
|
3
|
+
//#region src/components/agents-sdk/SessionCompaction.d.ts
|
|
4
4
|
type SessionStatusPhase = "idle" | "compacting";
|
|
5
5
|
interface SessionStatusFrame {
|
|
6
6
|
phase: SessionStatusPhase;
|
|
7
7
|
/** Present on the idle frame that follows a successful compaction. */
|
|
8
8
|
compacted: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Session's own estimate for the history this frame describes, or null when
|
|
11
|
+
* the frame omits it or carries a non-finite value. Not provider-reported
|
|
12
|
+
* usage — never render it as an exact token count, and never feed it to the
|
|
13
|
+
* `Context` ring, which reads `metadata.usage`.
|
|
14
|
+
*/
|
|
15
|
+
tokenEstimate: number | null;
|
|
16
|
+
/**
|
|
17
|
+
* The same estimate taken before the compaction this frame reports, from its
|
|
18
|
+
* `compacted` payload. Null on every other frame. Both numbers come from one
|
|
19
|
+
* estimator over one history, so their difference is a meaningful size even
|
|
20
|
+
* though neither is exact.
|
|
21
|
+
*/
|
|
22
|
+
tokensBefore: number | null;
|
|
9
23
|
}
|
|
10
24
|
/**
|
|
11
25
|
* Parse a raw websocket payload as a `cf_agent_session` status frame.
|
|
@@ -33,8 +47,24 @@ interface UseSessionCompactionOptions<MessageT extends UIMessage> {
|
|
|
33
47
|
/** Server read used to reload the transcript after a compaction lands. */
|
|
34
48
|
getMessages: () => Promise<MessageT[]>;
|
|
35
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* How much a landed compaction shortened the history, per Session's own
|
|
52
|
+
* estimator. A UI may show the difference as an approximate size; it must not
|
|
53
|
+
* present either number as exact usage.
|
|
54
|
+
*/
|
|
55
|
+
interface SessionCompactionSize {
|
|
56
|
+
tokensBefore: number;
|
|
57
|
+
tokensAfter: number;
|
|
58
|
+
}
|
|
36
59
|
interface UseSessionCompactionResult {
|
|
37
60
|
compacting: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Size of the compaction that landed most recently on this connection, or
|
|
63
|
+
* null when none has landed or the frames carried no usable estimates. A new
|
|
64
|
+
* object per compaction, so a consumer can dismiss one acknowledgement by
|
|
65
|
+
* identity and still show the next. Cleared when the next compaction starts.
|
|
66
|
+
*/
|
|
67
|
+
lastCompaction: SessionCompactionSize | null;
|
|
38
68
|
/**
|
|
39
69
|
* Set when the post-compaction transcript reload rejected — the local view
|
|
40
70
|
* is stale relative to the server until a retry succeeds. Surface it
|
|
@@ -56,4 +86,4 @@ declare function useSessionCompaction<MessageT extends UIMessage>({
|
|
|
56
86
|
getMessages
|
|
57
87
|
}: UseSessionCompactionOptions<MessageT>): UseSessionCompactionResult;
|
|
58
88
|
//#endregion
|
|
59
|
-
export {
|
|
89
|
+
export { UseSessionCompactionOptions as a, parseSessionStatusFrame as c, SessionStatusPhase as i, useSessionCompaction as l, SessionFrameSource as n, UseSessionCompactionResult as o, SessionStatusFrame as r, parseSessionErrorFrame as s, SessionCompactionSize as t };
|
|
@@ -1,16 +1,29 @@
|
|
|
1
|
-
import { J as SpinnerIcon } from "./icons-
|
|
2
|
-
import { TransitionSurface } from "./components/TransitionSurface.js";
|
|
3
|
-
import { AgentChat } from "./components/AgentChat.js";
|
|
4
|
-
import { AgentToolRunsProvider, useOptionalAgentToolRuns } from "./components/AgentToolRunsContext.js";
|
|
5
|
-
import { SubagentRunList } from "./components/SubagentRunList.js";
|
|
6
|
-
import { ThinkChatContext, ThinkChatLiveContext, useThinkChatContext } from "./components/ThinkChatContext.js";
|
|
7
|
-
import { ThinkChatActivity, createThinkChatActivityRenderer, renderThinkChatActivityPart } from "./components/ThinkChatActivity.js";
|
|
8
|
-
import { ThinkRecoveryNotice } from "./components/ThinkRecoveryNotice.js";
|
|
1
|
+
import { J as SpinnerIcon } from "./icons-B1Qw05te.js";
|
|
2
|
+
import { TransitionSurface } from "./components/foundations/TransitionSurface.js";
|
|
3
|
+
import { AgentChat } from "./components/agents-sdk/AgentChat.js";
|
|
4
|
+
import { AgentToolRunsProvider, useOptionalAgentToolRuns } from "./components/agents-sdk/AgentToolRunsContext.js";
|
|
5
|
+
import { SubagentRunList } from "./components/agents-sdk/SubagentRunList.js";
|
|
6
|
+
import { ThinkChatContext, ThinkChatLiveContext, useThinkChatContext } from "./components/agents-sdk/ThinkChatContext.js";
|
|
7
|
+
import { ThinkChatActivity, createThinkChatActivityRenderer, renderThinkChatActivityPart } from "./components/agents-sdk/ThinkChatActivity.js";
|
|
8
|
+
import { ThinkRecoveryNotice } from "./components/agents-sdk/ThinkRecoveryNotice.js";
|
|
9
|
+
import { t as WorkspaceMessageResponse } from "./WorkspaceMessageResponse-BWbkIELl.js";
|
|
9
10
|
import * as React from "react";
|
|
10
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { isTextUIPart } from "ai";
|
|
11
13
|
import { useAgentChat } from "@cloudflare/think/react";
|
|
12
|
-
import { useAgent, useAgentToolEvents } from "agents/react";
|
|
13
14
|
import { queryOptions, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
15
|
+
import { useAgent, useAgentToolEvents } from "agents/react";
|
|
16
|
+
//#region src/components/_internal/use-agent-tool-events.ts
|
|
17
|
+
function useSourceScopedAgentToolEvents(agent) {
|
|
18
|
+
const agentTools = useAgentToolEvents({ agent });
|
|
19
|
+
const sourceIdentity = JSON.stringify(agent.path);
|
|
20
|
+
const resetAgentTools = React.useEffectEvent(() => agentTools.resetLocalState());
|
|
21
|
+
React.useEffect(() => {
|
|
22
|
+
resetAgentTools();
|
|
23
|
+
}, [sourceIdentity]);
|
|
24
|
+
return agentTools;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
14
27
|
//#region src/components/_internal/think-approvals.ts
|
|
15
28
|
/**
|
|
16
29
|
* Ambient approvals belong to their stub. An explicit different stub may only
|
|
@@ -25,8 +38,18 @@ function resolveThinkApprovalProps(overrides, ambient) {
|
|
|
25
38
|
};
|
|
26
39
|
}
|
|
27
40
|
//#endregion
|
|
28
|
-
//#region src/components/ThinkChat.tsx
|
|
41
|
+
//#region src/components/agents-sdk/ThinkChat.tsx
|
|
29
42
|
const EMPTY_PENDING_APPROVALS = [];
|
|
43
|
+
/**
|
|
44
|
+
* Acknowledgement copy for a landed compaction. Both numbers are Session's own
|
|
45
|
+
* estimates, so the text is hedged ("about", rounded to thousands) and falls
|
|
46
|
+
* back to the plain sentence when the difference is not a positive size —
|
|
47
|
+
* estimator noise must never render as "0 tokens freed".
|
|
48
|
+
*/
|
|
49
|
+
function compactionSizeText({ tokensAfter, tokensBefore }) {
|
|
50
|
+
const freed = Math.round((tokensBefore - tokensAfter) / 1e3) * 1e3;
|
|
51
|
+
return freed > 0 ? `Context compacted — about ${freed.toLocaleString()} tokens freed.` : "Context compacted.";
|
|
52
|
+
}
|
|
30
53
|
function toAgentChatStatus(chat) {
|
|
31
54
|
if (chat.status === "submitted") return "submitted";
|
|
32
55
|
if (chat.isStreaming || chat.isRecovering) return "streaming";
|
|
@@ -151,13 +174,8 @@ function ThinkChatRoot({ agent: agentOption, approvalsEnabled = true, name, sour
|
|
|
151
174
|
name: name ?? agentOption.name
|
|
152
175
|
});
|
|
153
176
|
const chat = useAgentChat({ agent });
|
|
154
|
-
const agentTools =
|
|
155
|
-
const agentIdentity = JSON.stringify(agent.path);
|
|
177
|
+
const agentTools = useSourceScopedAgentToolEvents(agent);
|
|
156
178
|
const approvals = useThinkPendingExecutionApprovals(agent.stub, sourceKey, `${chat.messages.length}:${chat.status}`, approvalsEnabled);
|
|
157
|
-
const resetAgentTools = React.useEffectEvent(() => agentTools.resetLocalState());
|
|
158
|
-
React.useEffect(() => {
|
|
159
|
-
resetAgentTools();
|
|
160
|
-
}, [agentIdentity]);
|
|
161
179
|
const approvalsContext = React.useMemo(() => ({
|
|
162
180
|
...approvals,
|
|
163
181
|
thinkStub: agent.stub
|
|
@@ -198,7 +216,7 @@ function ThinkChatMessages({ composerHeader, renderPart, excludeTools, renderAge
|
|
|
198
216
|
pendingApprovals: approvals.pendingApprovals,
|
|
199
217
|
onExecutionSettled: approvals.refreshPendingApprovals
|
|
200
218
|
});
|
|
201
|
-
const
|
|
219
|
+
const activityRenderPart = React.useMemo(() => createThinkChatActivityRenderer({
|
|
202
220
|
excludeTools,
|
|
203
221
|
renderAgentToolRunLink,
|
|
204
222
|
toolRenderers
|
|
@@ -207,6 +225,11 @@ function ThinkChatMessages({ composerHeader, renderPart, excludeTools, renderAge
|
|
|
207
225
|
renderAgentToolRunLink,
|
|
208
226
|
toolRenderers
|
|
209
227
|
]);
|
|
228
|
+
const defaultRenderPart = React.useCallback((context) => {
|
|
229
|
+
const activity = activityRenderPart(context);
|
|
230
|
+
if (activity !== void 0) return activity;
|
|
231
|
+
return isTextUIPart(context.part) && context.part.text ? /* @__PURE__ */ jsx(WorkspaceMessageResponse, { children: context.part.text }) : void 0;
|
|
232
|
+
}, [activityRenderPart]);
|
|
210
233
|
const resolvedRenderPart = React.useMemo(() => renderPart ? (context) => {
|
|
211
234
|
const renderBuiltIn = () => {
|
|
212
235
|
const builtIn = defaultRenderPart(context);
|
|
@@ -219,6 +242,8 @@ function ThinkChatMessages({ composerHeader, renderPart, excludeTools, renderAge
|
|
|
219
242
|
return custom === void 0 ? renderBuiltIn() : custom;
|
|
220
243
|
} : defaultRenderPart, [defaultRenderPart, renderPart]);
|
|
221
244
|
const defaultNotice = /* @__PURE__ */ jsx(ThinkRecoveryNotice, { chat });
|
|
245
|
+
const [dismissedCompaction, setDismissedCompaction] = React.useState(null);
|
|
246
|
+
const landedCompaction = sessionCompaction?.lastCompaction && sessionCompaction.lastCompaction !== dismissedCompaction ? sessionCompaction.lastCompaction : null;
|
|
222
247
|
const sessionCompactionNotice = sessionCompaction?.compacting ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerIcon, {}), "Compacting context…"] }) : sessionCompaction?.sessionError ? /* @__PURE__ */ jsxs(TransitionSurface, {
|
|
223
248
|
className: "think-recovery-notice",
|
|
224
249
|
"data-tone": "danger",
|
|
@@ -227,6 +252,9 @@ function ThinkChatMessages({ composerHeader, renderPart, excludeTools, renderAge
|
|
|
227
252
|
className: "think-recovery-notice",
|
|
228
253
|
"data-tone": "danger",
|
|
229
254
|
children: "Transcript may be out of date. The next completed turn will retry the refresh."
|
|
255
|
+
}) : landedCompaction ? /* @__PURE__ */ jsxs(TransitionSurface, {
|
|
256
|
+
className: "think-recovery-notice",
|
|
257
|
+
children: [compactionSizeText(landedCompaction), " Context usage updates after your next message."]
|
|
230
258
|
}) : null;
|
|
231
259
|
const recoveryActive = chat.isRecovering || chat.connectionError || chat.error;
|
|
232
260
|
const backgroundRuns = renderAgentToolRunLink ? agentTools?.unboundRuns : void 0;
|
|
@@ -256,6 +284,7 @@ function ThinkChatMessages({ composerHeader, renderPart, excludeTools, renderAge
|
|
|
256
284
|
composerHeader: resolvedComposerHeader,
|
|
257
285
|
onRegenerate: (messageId) => void chat.regenerate({ messageId }),
|
|
258
286
|
onSubmit: ({ text, files, references }) => {
|
|
287
|
+
setDismissedCompaction(sessionCompaction?.lastCompaction ?? null);
|
|
259
288
|
const prompt = [...references?.map(({ trigger, value }) => trigger ? `${trigger}${value}` : value) ?? [], text.trim()].filter(Boolean).join(" ");
|
|
260
289
|
if (!prompt && !files.length) return;
|
|
261
290
|
return chat.sendMessage({
|
|
@@ -289,4 +318,4 @@ const ThinkChat = {
|
|
|
289
318
|
createActivityRenderer: createThinkChatActivityRenderer
|
|
290
319
|
};
|
|
291
320
|
//#endregion
|
|
292
|
-
export { thinkPendingExecutionApprovalsQueryOptions as a, resolveThinkApprovalProps as c, ThinkChatRoot as i, ThinkChatMessages as n, useThinkChat as o, ThinkChatProvider as r, useThinkPendingExecutionApprovals as s, ThinkChat as t };
|
|
321
|
+
export { thinkPendingExecutionApprovalsQueryOptions as a, resolveThinkApprovalProps as c, ThinkChatRoot as i, useSourceScopedAgentToolEvents as l, ThinkChatMessages as n, useThinkChat as o, ThinkChatProvider as r, useThinkPendingExecutionApprovals as s, ThinkChat as t };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { i as AgentMessageRenderPartContext } from "./AgentMessageParts-
|
|
2
|
-
import { r as AgentChatProps } from "./AgentChat-
|
|
3
|
-
import { l as ThinkChatPart } from "./ThinkChatToolParts-
|
|
4
|
-
import { t as ThinkChatActivityDescription } from "./ThinkChatActivitySummary-
|
|
1
|
+
import { i as AgentMessageRenderPartContext } from "./AgentMessageParts-C7L-Mv9U.js";
|
|
2
|
+
import { r as AgentChatProps } from "./AgentChat-CV-GuYA6.js";
|
|
3
|
+
import { l as ThinkChatPart } from "./ThinkChatToolParts-D4qcnnxt.js";
|
|
4
|
+
import { t as ThinkChatActivityDescription } from "./ThinkChatActivitySummary-teRjrPxW.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { DynamicToolUIPart, ToolUIPart, UIMessage } from "ai";
|
|
7
7
|
import { AgentToolRunState } from "agents/agent-tools";
|
|
8
8
|
|
|
9
|
-
//#region src/components/ThinkChatActivity.d.ts
|
|
9
|
+
//#region src/components/agents-sdk/ThinkChatActivity.d.ts
|
|
10
10
|
/**
|
|
11
11
|
* Bespoke rendering for one tool inside the activity log. Both hooks fall
|
|
12
12
|
* through to the built-in families when they return `undefined`, so an
|
package/dist/{ThinkChatActivitySummary-F062wneC.d.ts → ThinkChatActivitySummary-teRjrPxW.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as AgentActivityIconKind, s as AgentActivitySummary } from "./AgentActivity-
|
|
2
|
-
import { l as ThinkChatPart } from "./ThinkChatToolParts-
|
|
1
|
+
import { i as AgentActivityIconKind, s as AgentActivitySummary } from "./AgentActivity-SP1WfLDW.js";
|
|
2
|
+
import { l as ThinkChatPart } from "./ThinkChatToolParts-D4qcnnxt.js";
|
|
3
3
|
import { DynamicToolUIPart, ToolUIPart } from "ai";
|
|
4
4
|
|
|
5
|
-
//#region src/components/ThinkChatActivitySummary.d.ts
|
|
5
|
+
//#region src/components/agents-sdk/ThinkChatActivitySummary.d.ts
|
|
6
6
|
interface ThinkChatToolDescriber {
|
|
7
7
|
describe?: (part: ToolUIPart | DynamicToolUIPart) => ThinkChatActivityDescription | null | undefined;
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { UIMessage } from "ai";
|
|
3
3
|
import { useAgentChat } from "@cloudflare/think/react";
|
|
4
4
|
|
|
5
|
-
//#region src/components/ThinkChatContext.d.ts
|
|
5
|
+
//#region src/components/agents-sdk/ThinkChatContext.d.ts
|
|
6
6
|
/** The complete upstream Think chat hook value, preserving app state and message extensions. */
|
|
7
7
|
type ThinkChatValue<State = unknown, MessageT extends UIMessage = UIMessage> = ReturnType<typeof useAgentChat<State, MessageT>>;
|
|
8
8
|
/**
|
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InferUITools, ToolUIPart, UIMessage } from "ai";
|
|
2
2
|
import { ProxyToolInput, ProxyToolOutput } from "@cloudflare/codemode";
|
|
3
3
|
import { QuickActionExtractInput, QuickActionPage, QuickActionScrapeInput, QuickActionToolName } from "@cloudflare/think/tools/browser";
|
|
4
4
|
import { FetchResponseMode, FetchResult } from "@cloudflare/think/tools/fetch";
|
|
5
5
|
import { WorkspaceTools } from "@cloudflare/think/tools/workspace";
|
|
6
6
|
|
|
7
|
-
//#region src/components/ThinkChatToolParts.d.ts
|
|
7
|
+
//#region src/components/agents-sdk/ThinkChatToolParts.d.ts
|
|
8
8
|
type ThinkChatPart = UIMessage["parts"][number];
|
|
9
|
-
type AnyToolUIPart = ToolUIPart | DynamicToolUIPart;
|
|
10
|
-
/** Prefer AI SDK's provider/tool-authored title over its transport-facing key. */
|
|
11
|
-
declare function getToolDisplayName(part: AnyToolUIPart): string;
|
|
12
|
-
/**
|
|
13
|
-
* Whole-part supplement to Think's simplified state mapping. Think maps every
|
|
14
|
-
* `output-available` part to complete, while AI SDK preliminary outputs remain
|
|
15
|
-
* in flight until a non-preliminary result arrives.
|
|
16
|
-
*/
|
|
17
|
-
declare function isToolPartWorking(part: AnyToolUIPart): boolean;
|
|
18
|
-
declare function isToolPartFailed(part: AnyToolUIPart): boolean;
|
|
19
9
|
type WorkspaceUITools = InferUITools<Required<WorkspaceTools>>;
|
|
20
10
|
type WorkspaceToolPart = ToolUIPart<WorkspaceUITools>;
|
|
21
11
|
type ThinkWorkspaceToolName = keyof WorkspaceUITools;
|
|
@@ -165,4 +155,4 @@ declare function isPartWorking(part: ThinkChatPart): boolean;
|
|
|
165
155
|
declare function isPartFailed(part: ThinkChatPart): boolean;
|
|
166
156
|
declare function displayUrl(url: string | undefined): string;
|
|
167
157
|
//#endregion
|
|
168
|
-
export {
|
|
158
|
+
export { isWorkspaceToolPart as S, isPartWorking as _, SessionContextToolPart as a, isSkillToolPart as b, ThinkBashToolPart as c, WorkspaceToolPart as d, displayUrl as f, isPartFailed as g, isFetchToolPart as h, SessionContextToolName as i, ThinkChatPart as l, isExecuteToolPart as m, ExecuteToolPart as n, SkillToolPart as o, isBrowserToolPart as p, FetchToolPart as r, ThinkBashToolOutput as s, BrowserToolPart as t, ThinkWorkspaceToolName as u, isSessionContextToolFailure as v, isThinkChatActivityPart as x, isSessionContextToolPart as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ThinkSubmissionInspection } from "@cloudflare/think";
|
|
2
2
|
import { WorkflowInfo } from "agents/workflows";
|
|
3
3
|
|
|
4
|
-
//#region src/components/ThinkExecutionRun.d.ts
|
|
4
|
+
//#region src/components/agents-sdk/ThinkExecutionRun.d.ts
|
|
5
5
|
/** Whole upstream execution records displayed by Think routine and execution surfaces. */
|
|
6
6
|
type ThinkExecutionRun = ThinkSubmissionInspection | WorkflowInfo;
|
|
7
7
|
/** Narrows the direct upstream execution union without wrapping either record. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as ThinkChatValue } from "./ThinkChatContext-
|
|
1
|
+
import { i as ThinkChatValue } from "./ThinkChatContext-COIgzkYp.js";
|
|
2
2
|
import { UIMessage } from "ai";
|
|
3
3
|
|
|
4
|
-
//#region src/components/ThinkRecoveryNotice.d.ts
|
|
4
|
+
//#region src/components/agents-sdk/ThinkRecoveryNotice.d.ts
|
|
5
5
|
interface ThinkRecoveryNoticeProps<State = unknown, MessageT extends UIMessage = UIMessage> {
|
|
6
6
|
/** The complete `useAgentChat` value from `@cloudflare/think/react`. */
|
|
7
7
|
chat: ThinkChatValue<State, MessageT>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Toggle } from "@base-ui/react/toggle";
|
|
3
3
|
|
|
4
|
-
//#region src/components/Toggle.d.ts
|
|
4
|
+
//#region src/components/foundations/Toggle.d.ts
|
|
5
5
|
interface ToggleVariantsOptions {
|
|
6
6
|
variant?: "default" | "outline" | null;
|
|
7
7
|
size?: "sm" | "md" | "lg" | null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as ToggleVariantsOptions } from "./Toggle-
|
|
1
|
+
import { r as ToggleVariantsOptions } from "./Toggle-DLrIf5YH.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { ToggleGroup } from "@base-ui/react/toggle-group";
|
|
4
4
|
import { Toggle } from "@base-ui/react/toggle";
|
|
5
5
|
|
|
6
|
-
//#region src/components/ToggleGroup.d.ts
|
|
6
|
+
//#region src/components/foundations/ToggleGroup.d.ts
|
|
7
7
|
type ToggleGroupSize = ToggleVariantsOptions["size"];
|
|
8
8
|
interface ToggleGroupProps extends React.ComponentPropsWithRef<typeof ToggleGroup> {
|
|
9
9
|
variant?: ToggleVariantsOptions["variant"];
|
|
@@ -30,21 +30,21 @@ interface ToggleGroupItemProps extends React.ComponentPropsWithRef<typeof Toggle
|
|
|
30
30
|
* @example
|
|
31
31
|
* ```tsx
|
|
32
32
|
* // Single selection (defaultValue is an array)
|
|
33
|
-
* <ToggleGroup defaultValue={["center"]}>
|
|
34
|
-
* <
|
|
35
|
-
* <
|
|
36
|
-
* <
|
|
37
|
-
* </ToggleGroup>
|
|
33
|
+
* <ToggleGroup.Root defaultValue={["center"]}>
|
|
34
|
+
* <ToggleGroup.Item value="left">Left</ToggleGroup.Item>
|
|
35
|
+
* <ToggleGroup.Item value="center">Center</ToggleGroup.Item>
|
|
36
|
+
* <ToggleGroup.Item value="right">Right</ToggleGroup.Item>
|
|
37
|
+
* </ToggleGroup.Root>
|
|
38
38
|
* ```
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
41
|
* ```tsx
|
|
42
42
|
* // Multiple selection
|
|
43
|
-
* <ToggleGroup multiple defaultValue={["bold", "italic"]}>
|
|
44
|
-
* <
|
|
45
|
-
* <
|
|
46
|
-
* <
|
|
47
|
-
* </ToggleGroup>
|
|
43
|
+
* <ToggleGroup.Root multiple defaultValue={["bold", "italic"]}>
|
|
44
|
+
* <ToggleGroup.Item value="bold">Bold</ToggleGroup.Item>
|
|
45
|
+
* <ToggleGroup.Item value="italic">Italic</ToggleGroup.Item>
|
|
46
|
+
* <ToggleGroup.Item value="underline">Underline</ToggleGroup.Item>
|
|
47
|
+
* </ToggleGroup.Root>
|
|
48
48
|
* ```
|
|
49
49
|
*
|
|
50
50
|
* @see {@link https://base-ui.com/react/components/toggle-group | Base UI Toggle Group}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as WorkspaceMediaInfo, i as WorkspaceFileState, r as WorkspaceFileAssetResolver, t as WorkspaceFileAsset } from "./WorkspaceFile-
|
|
1
|
+
import { a as WorkspaceMediaInfo, i as WorkspaceFileState, r as WorkspaceFileAssetResolver, t as WorkspaceFileAsset } from "./WorkspaceFile-C8Riev9j.js";
|
|
2
2
|
import { WorkspaceLike } from "@cloudflare/think";
|
|
3
3
|
import { FileInfo, Workspace } from "@cloudflare/shell";
|
|
4
4
|
|
|
5
|
-
//#region src/components/Workspace.d.ts
|
|
5
|
+
//#region src/components/agents-sdk/Workspace.d.ts
|
|
6
6
|
/** Workspace summary, as returned by `Workspace.getWorkspaceInfo()` upstream. */
|
|
7
7
|
type WorkspaceInfo = Awaited<ReturnType<Workspace["getWorkspaceInfo"]>>;
|
|
8
8
|
/** Whole upstream workspace shapes, accepted without narrowing or mirroring. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { l as WorkspaceNavigationAdapter } from "./WorkspaceLink-
|
|
2
|
-
import { o as WorkspaceState } from "./Workspace-
|
|
1
|
+
import { l as WorkspaceNavigationAdapter } from "./WorkspaceLink-DQogVe8E.js";
|
|
2
|
+
import { o as WorkspaceState } from "./Workspace-EhvvlHOB.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
|
-
//#region src/components/WorkspaceExplorer.d.ts
|
|
5
|
+
//#region src/components/agents-sdk/WorkspaceExplorer.d.ts
|
|
6
6
|
interface WorkspaceExplorerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
7
7
|
workspace: WorkspaceState;
|
|
8
8
|
/** Host-owned URL/history adapter shared by chat links and the file explorer. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { O as CodeBlockLanguage } from "./CodeBlock-DzGhYyNe.js";
|
|
2
2
|
import { SkillParseResult } from "agent-skills-ts-sdk";
|
|
3
3
|
import { FileInfo } from "@cloudflare/shell";
|
|
4
4
|
|
|
5
|
-
//#region src/components/WorkspaceFile.d.ts
|
|
5
|
+
//#region src/components/agents-sdk/WorkspaceFile.d.ts
|
|
6
6
|
type WorkspaceMediaKind = "image" | "pdf" | "audio" | "video";
|
|
7
7
|
interface WorkspaceMediaInfo {
|
|
8
8
|
kind: WorkspaceMediaKind;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { r as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { WorkspaceHeader } from "./components/WorkspaceHeader.js";
|
|
1
|
+
import { A as MaximizeIcon, d as CheckIcon, h as CodeIcon, rt as XIcon, tt as WarningIcon, x as EyeIcon, y as DownloadIcon } from "./icons-B1Qw05te.js";
|
|
2
|
+
import { t as NavigationLink } from "./navigation-link-kqMa81v5.js";
|
|
3
|
+
import { buttonVariants } from "./components/foundations/Button.js";
|
|
4
|
+
import { r as formatClock } from "./format-CmopcfqJ.js";
|
|
5
|
+
import { a as CodeBlockCopyButton, i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "./CodeBlock-CM5gfmdq.js";
|
|
6
|
+
import { inferWorkspaceLanguage, inferWorkspaceMedia, isWorkspaceMarkdownPath, isWorkspaceSkillPath, parseWorkspaceSkill } from "./components/agents-sdk/WorkspaceFile.js";
|
|
7
|
+
import { c as useWorkspaceNavigationContext, s as useWorkspaceNavigationRestoration } from "./WorkspaceLink-DZeLe_jN.js";
|
|
8
|
+
import { n as createWorkspaceRehypePlugins, t as WorkspaceMessageResponse } from "./WorkspaceMessageResponse-BWbkIELl.js";
|
|
9
|
+
import { AppTopBar } from "./components/general-purpose/AppTopBar.js";
|
|
10
|
+
import { WorkspaceHeader } from "./components/agents-sdk/WorkspaceHeader.js";
|
|
11
11
|
import * as React from "react";
|
|
12
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { defaultRehypePlugins } from "streamdown";
|
|
@@ -461,7 +461,7 @@ function WorkspaceMediaPreview(props) {
|
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
463
|
//#endregion
|
|
464
|
-
//#region src/components/WorkspaceFileView.tsx
|
|
464
|
+
//#region src/components/agents-sdk/WorkspaceFileView.tsx
|
|
465
465
|
function createFileViewRehypePlugins(workspace) {
|
|
466
466
|
return [...workspace ? createWorkspaceRehypePlugins(workspace.root, workspace.base) : Object.values(defaultRehypePlugins), rehypeSlug];
|
|
467
467
|
}
|
|
@@ -640,7 +640,7 @@ function WorkspaceFileView({ appearance = "contained", file, path, isLoading, is
|
|
|
640
640
|
if (file.content === null) return null;
|
|
641
641
|
if (isMarkdown && markdownView === "preview") {
|
|
642
642
|
const skill = isWorkspaceSkillPath(file.path) ? parseWorkspaceSkill(file.content) : null;
|
|
643
|
-
const response = /* @__PURE__ */ jsx(
|
|
643
|
+
const response = /* @__PURE__ */ jsx(WorkspaceMessageResponse, {
|
|
644
644
|
className: "workspace-explorer__markdown-content",
|
|
645
645
|
components: markdownComponents,
|
|
646
646
|
mode: "static",
|