@base44/superagent-native 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +132 -0
- package/lib/commonjs/AgentSettingsPanel.js +1067 -0
- package/lib/commonjs/AgentSettingsPanel.js.map +1 -0
- package/lib/commonjs/AgentSphereIcon.js +243 -0
- package/lib/commonjs/AgentSphereIcon.js.map +1 -0
- package/lib/commonjs/AttachmentPickerStatusModal.js +96 -0
- package/lib/commonjs/AttachmentPickerStatusModal.js.map +1 -0
- package/lib/commonjs/AttachmentPreviewStrip.js +49 -0
- package/lib/commonjs/AttachmentPreviewStrip.js.map +1 -0
- package/lib/commonjs/ChannelsPanel.js +733 -0
- package/lib/commonjs/ChannelsPanel.js.map +1 -0
- package/lib/commonjs/ConversationChat.js +219 -0
- package/lib/commonjs/ConversationChat.js.map +1 -0
- package/lib/commonjs/ConversationComposer.js +323 -0
- package/lib/commonjs/ConversationComposer.js.map +1 -0
- package/lib/commonjs/ConversationMessageList.js +105 -0
- package/lib/commonjs/ConversationMessageList.js.map +1 -0
- package/lib/commonjs/ConversationScreen.js +241 -0
- package/lib/commonjs/ConversationScreen.js.map +1 -0
- package/lib/commonjs/EditorDrawer.js +1127 -0
- package/lib/commonjs/EditorDrawer.js.map +1 -0
- package/lib/commonjs/EditorTabPanel.js +28 -0
- package/lib/commonjs/EditorTabPanel.js.map +1 -0
- package/lib/commonjs/FilesPanel.js +533 -0
- package/lib/commonjs/FilesPanel.js.map +1 -0
- package/lib/commonjs/MarkdownText.js +313 -0
- package/lib/commonjs/MarkdownText.js.map +1 -0
- package/lib/commonjs/MessageActionBar.js +90 -0
- package/lib/commonjs/MessageActionBar.js.map +1 -0
- package/lib/commonjs/RenameAgentModal.js +99 -0
- package/lib/commonjs/RenameAgentModal.js.map +1 -0
- package/lib/commonjs/ShareAgentModal.js +349 -0
- package/lib/commonjs/ShareAgentModal.js.map +1 -0
- package/lib/commonjs/ShareAgentModal.styles.js +236 -0
- package/lib/commonjs/ShareAgentModal.styles.js.map +1 -0
- package/lib/commonjs/SuperagentHomeScreen.js +316 -0
- package/lib/commonjs/SuperagentHomeScreen.js.map +1 -0
- package/lib/commonjs/ToolApprovalCard.js +542 -0
- package/lib/commonjs/ToolApprovalCard.js.map +1 -0
- package/lib/commonjs/ToolCallSummary.js +632 -0
- package/lib/commonjs/ToolCallSummary.js.map +1 -0
- package/lib/commonjs/agentSphereStyles.js +38 -0
- package/lib/commonjs/agentSphereStyles.js.map +1 -0
- package/lib/commonjs/apiClient.js +158 -0
- package/lib/commonjs/apiClient.js.map +1 -0
- package/lib/commonjs/attachmentFileHelpers.js +104 -0
- package/lib/commonjs/attachmentFileHelpers.js.map +1 -0
- package/lib/commonjs/attachmentUpload.js +87 -0
- package/lib/commonjs/attachmentUpload.js.map +1 -0
- package/lib/commonjs/composerStyles.js +248 -0
- package/lib/commonjs/composerStyles.js.map +1 -0
- package/lib/commonjs/connectorBrandIcons.js +82 -0
- package/lib/commonjs/connectorBrandIcons.js.map +1 -0
- package/lib/commonjs/connectorCatalog.js +377 -0
- package/lib/commonjs/connectorCatalog.js.map +1 -0
- package/lib/commonjs/constants.js +15 -0
- package/lib/commonjs/constants.js.map +1 -0
- package/lib/commonjs/conversationParts.js +273 -0
- package/lib/commonjs/conversationParts.js.map +1 -0
- package/lib/commonjs/conversationRuntime.js +144 -0
- package/lib/commonjs/conversationRuntime.js.map +1 -0
- package/lib/commonjs/conversationStyles.js +758 -0
- package/lib/commonjs/conversationStyles.js.map +1 -0
- package/lib/commonjs/editorShellStyles.js +1032 -0
- package/lib/commonjs/editorShellStyles.js.map +1 -0
- package/lib/commonjs/editorTabs.js +42 -0
- package/lib/commonjs/editorTabs.js.map +1 -0
- package/lib/commonjs/fileTreeUtils.js +133 -0
- package/lib/commonjs/fileTreeUtils.js.map +1 -0
- package/lib/commonjs/index.js +110 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/markdownStyles.js +157 -0
- package/lib/commonjs/markdownStyles.js.map +1 -0
- package/lib/commonjs/mediaUtils.js +61 -0
- package/lib/commonjs/mediaUtils.js.map +1 -0
- package/lib/commonjs/messageActionStyles.js +45 -0
- package/lib/commonjs/messageActionStyles.js.map +1 -0
- package/lib/commonjs/messageUtils.js +55 -0
- package/lib/commonjs/messageUtils.js.map +1 -0
- package/lib/commonjs/nativeActionSheet.js +21 -0
- package/lib/commonjs/nativeActionSheet.js.map +1 -0
- package/lib/commonjs/nativeActionSheet.web.js +10 -0
- package/lib/commonjs/nativeActionSheet.web.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/paperTheme.js +59 -0
- package/lib/commonjs/paperTheme.js.map +1 -0
- package/lib/commonjs/realtimeClient.js +99 -0
- package/lib/commonjs/realtimeClient.js.map +1 -0
- package/lib/commonjs/renameAgentModalStyles.js +83 -0
- package/lib/commonjs/renameAgentModalStyles.js.map +1 -0
- package/lib/commonjs/screenParts.js +220 -0
- package/lib/commonjs/screenParts.js.map +1 -0
- package/lib/commonjs/styles.js +343 -0
- package/lib/commonjs/styles.js.map +1 -0
- package/lib/commonjs/superagentApiClient.js +613 -0
- package/lib/commonjs/superagentApiClient.js.map +1 -0
- package/lib/commonjs/types.js +6 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/commonjs/useSuperagentAttachmentPicker.js +80 -0
- package/lib/commonjs/useSuperagentAttachmentPicker.js.map +1 -0
- package/lib/commonjs/useSuperagentConversation.js +216 -0
- package/lib/commonjs/useSuperagentConversation.js.map +1 -0
- package/lib/commonjs/useSuperagentRuntime.js +1207 -0
- package/lib/commonjs/useSuperagentRuntime.js.map +1 -0
- package/lib/module/AgentSettingsPanel.js +1062 -0
- package/lib/module/AgentSettingsPanel.js.map +1 -0
- package/lib/module/AgentSphereIcon.js +237 -0
- package/lib/module/AgentSphereIcon.js.map +1 -0
- package/lib/module/AttachmentPickerStatusModal.js +91 -0
- package/lib/module/AttachmentPickerStatusModal.js.map +1 -0
- package/lib/module/AttachmentPreviewStrip.js +44 -0
- package/lib/module/AttachmentPreviewStrip.js.map +1 -0
- package/lib/module/ChannelsPanel.js +728 -0
- package/lib/module/ChannelsPanel.js.map +1 -0
- package/lib/module/ConversationChat.js +214 -0
- package/lib/module/ConversationChat.js.map +1 -0
- package/lib/module/ConversationComposer.js +318 -0
- package/lib/module/ConversationComposer.js.map +1 -0
- package/lib/module/ConversationMessageList.js +100 -0
- package/lib/module/ConversationMessageList.js.map +1 -0
- package/lib/module/ConversationScreen.js +236 -0
- package/lib/module/ConversationScreen.js.map +1 -0
- package/lib/module/EditorDrawer.js +1122 -0
- package/lib/module/EditorDrawer.js.map +1 -0
- package/lib/module/EditorTabPanel.js +23 -0
- package/lib/module/EditorTabPanel.js.map +1 -0
- package/lib/module/FilesPanel.js +528 -0
- package/lib/module/FilesPanel.js.map +1 -0
- package/lib/module/MarkdownText.js +308 -0
- package/lib/module/MarkdownText.js.map +1 -0
- package/lib/module/MessageActionBar.js +85 -0
- package/lib/module/MessageActionBar.js.map +1 -0
- package/lib/module/RenameAgentModal.js +94 -0
- package/lib/module/RenameAgentModal.js.map +1 -0
- package/lib/module/ShareAgentModal.js +344 -0
- package/lib/module/ShareAgentModal.js.map +1 -0
- package/lib/module/ShareAgentModal.styles.js +232 -0
- package/lib/module/ShareAgentModal.styles.js.map +1 -0
- package/lib/module/SuperagentHomeScreen.js +311 -0
- package/lib/module/SuperagentHomeScreen.js.map +1 -0
- package/lib/module/ToolApprovalCard.js +537 -0
- package/lib/module/ToolApprovalCard.js.map +1 -0
- package/lib/module/ToolCallSummary.js +627 -0
- package/lib/module/ToolCallSummary.js.map +1 -0
- package/lib/module/agentSphereStyles.js +34 -0
- package/lib/module/agentSphereStyles.js.map +1 -0
- package/lib/module/apiClient.js +154 -0
- package/lib/module/apiClient.js.map +1 -0
- package/lib/module/attachmentFileHelpers.js +97 -0
- package/lib/module/attachmentFileHelpers.js.map +1 -0
- package/lib/module/attachmentUpload.js +82 -0
- package/lib/module/attachmentUpload.js.map +1 -0
- package/lib/module/composerStyles.js +244 -0
- package/lib/module/composerStyles.js.map +1 -0
- package/lib/module/connectorBrandIcons.js +76 -0
- package/lib/module/connectorBrandIcons.js.map +1 -0
- package/lib/module/connectorCatalog.js +373 -0
- package/lib/module/connectorCatalog.js.map +1 -0
- package/lib/module/constants.js +10 -0
- package/lib/module/constants.js.map +1 -0
- package/lib/module/conversationParts.js +266 -0
- package/lib/module/conversationParts.js.map +1 -0
- package/lib/module/conversationRuntime.js +129 -0
- package/lib/module/conversationRuntime.js.map +1 -0
- package/lib/module/conversationStyles.js +754 -0
- package/lib/module/conversationStyles.js.map +1 -0
- package/lib/module/editorShellStyles.js +1028 -0
- package/lib/module/editorShellStyles.js.map +1 -0
- package/lib/module/editorTabs.js +37 -0
- package/lib/module/editorTabs.js.map +1 -0
- package/lib/module/fileTreeUtils.js +120 -0
- package/lib/module/fileTreeUtils.js.map +1 -0
- package/lib/module/index.js +17 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/markdownStyles.js +153 -0
- package/lib/module/markdownStyles.js.map +1 -0
- package/lib/module/mediaUtils.js +53 -0
- package/lib/module/mediaUtils.js.map +1 -0
- package/lib/module/messageActionStyles.js +41 -0
- package/lib/module/messageActionStyles.js.map +1 -0
- package/lib/module/messageUtils.js +46 -0
- package/lib/module/messageUtils.js.map +1 -0
- package/lib/module/nativeActionSheet.js +17 -0
- package/lib/module/nativeActionSheet.js.map +1 -0
- package/lib/module/nativeActionSheet.web.js +6 -0
- package/lib/module/nativeActionSheet.web.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/paperTheme.js +55 -0
- package/lib/module/paperTheme.js.map +1 -0
- package/lib/module/realtimeClient.js +95 -0
- package/lib/module/realtimeClient.js.map +1 -0
- package/lib/module/renameAgentModalStyles.js +79 -0
- package/lib/module/renameAgentModalStyles.js.map +1 -0
- package/lib/module/screenParts.js +210 -0
- package/lib/module/screenParts.js.map +1 -0
- package/lib/module/styles.js +339 -0
- package/lib/module/styles.js.map +1 -0
- package/lib/module/superagentApiClient.js +609 -0
- package/lib/module/superagentApiClient.js.map +1 -0
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/useSuperagentAttachmentPicker.js +75 -0
- package/lib/module/useSuperagentAttachmentPicker.js.map +1 -0
- package/lib/module/useSuperagentConversation.js +212 -0
- package/lib/module/useSuperagentConversation.js.map +1 -0
- package/lib/module/useSuperagentRuntime.js +1203 -0
- package/lib/module/useSuperagentRuntime.js.map +1 -0
- package/lib/typescript/commonjs/AgentSettingsPanel.d.ts +19 -0
- package/lib/typescript/commonjs/AgentSettingsPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/AgentSphereIcon.d.ts +15 -0
- package/lib/typescript/commonjs/AgentSphereIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/AttachmentPickerStatusModal.d.ts +8 -0
- package/lib/typescript/commonjs/AttachmentPickerStatusModal.d.ts.map +1 -0
- package/lib/typescript/commonjs/AttachmentPreviewStrip.d.ts +7 -0
- package/lib/typescript/commonjs/AttachmentPreviewStrip.d.ts.map +1 -0
- package/lib/typescript/commonjs/ChannelsPanel.d.ts +21 -0
- package/lib/typescript/commonjs/ChannelsPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/ConversationChat.d.ts +22 -0
- package/lib/typescript/commonjs/ConversationChat.d.ts.map +1 -0
- package/lib/typescript/commonjs/ConversationComposer.d.ts +24 -0
- package/lib/typescript/commonjs/ConversationComposer.d.ts.map +1 -0
- package/lib/typescript/commonjs/ConversationMessageList.d.ts +17 -0
- package/lib/typescript/commonjs/ConversationMessageList.d.ts.map +1 -0
- package/lib/typescript/commonjs/ConversationScreen.d.ts +80 -0
- package/lib/typescript/commonjs/ConversationScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/EditorDrawer.d.ts +67 -0
- package/lib/typescript/commonjs/EditorDrawer.d.ts.map +1 -0
- package/lib/typescript/commonjs/EditorTabPanel.d.ts +6 -0
- package/lib/typescript/commonjs/EditorTabPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/FilesPanel.d.ts +14 -0
- package/lib/typescript/commonjs/FilesPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/MarkdownText.d.ts +10 -0
- package/lib/typescript/commonjs/MarkdownText.d.ts.map +1 -0
- package/lib/typescript/commonjs/MessageActionBar.d.ts +8 -0
- package/lib/typescript/commonjs/MessageActionBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/RenameAgentModal.d.ts +10 -0
- package/lib/typescript/commonjs/RenameAgentModal.d.ts.map +1 -0
- package/lib/typescript/commonjs/ShareAgentModal.d.ts +15 -0
- package/lib/typescript/commonjs/ShareAgentModal.d.ts.map +1 -0
- package/lib/typescript/commonjs/ShareAgentModal.styles.d.ts +229 -0
- package/lib/typescript/commonjs/ShareAgentModal.styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/SuperagentHomeScreen.d.ts +4 -0
- package/lib/typescript/commonjs/SuperagentHomeScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ToolApprovalCard.d.ts +13 -0
- package/lib/typescript/commonjs/ToolApprovalCard.d.ts.map +1 -0
- package/lib/typescript/commonjs/ToolCallSummary.d.ts +16 -0
- package/lib/typescript/commonjs/ToolCallSummary.d.ts.map +1 -0
- package/lib/typescript/commonjs/agentSphereStyles.d.ts +31 -0
- package/lib/typescript/commonjs/agentSphereStyles.d.ts.map +1 -0
- package/lib/typescript/commonjs/apiClient.d.ts +4 -0
- package/lib/typescript/commonjs/apiClient.d.ts.map +1 -0
- package/lib/typescript/commonjs/attachmentFileHelpers.d.ts +6 -0
- package/lib/typescript/commonjs/attachmentFileHelpers.d.ts.map +1 -0
- package/lib/typescript/commonjs/attachmentUpload.d.ts +12 -0
- package/lib/typescript/commonjs/attachmentUpload.d.ts.map +1 -0
- package/lib/typescript/commonjs/composerStyles.d.ts +241 -0
- package/lib/typescript/commonjs/composerStyles.d.ts.map +1 -0
- package/lib/typescript/commonjs/connectorBrandIcons.d.ts +7 -0
- package/lib/typescript/commonjs/connectorBrandIcons.d.ts.map +1 -0
- package/lib/typescript/commonjs/connectorCatalog.d.ts +3 -0
- package/lib/typescript/commonjs/connectorCatalog.d.ts.map +1 -0
- package/lib/typescript/commonjs/constants.d.ts +4 -0
- package/lib/typescript/commonjs/constants.d.ts.map +1 -0
- package/lib/typescript/commonjs/conversationParts.d.ts +29 -0
- package/lib/typescript/commonjs/conversationParts.d.ts.map +1 -0
- package/lib/typescript/commonjs/conversationRuntime.d.ts +67 -0
- package/lib/typescript/commonjs/conversationRuntime.d.ts.map +1 -0
- package/lib/typescript/commonjs/conversationStyles.d.ts +742 -0
- package/lib/typescript/commonjs/conversationStyles.d.ts.map +1 -0
- package/lib/typescript/commonjs/editorShellStyles.d.ts +1025 -0
- package/lib/typescript/commonjs/editorShellStyles.d.ts.map +1 -0
- package/lib/typescript/commonjs/editorTabs.d.ts +11 -0
- package/lib/typescript/commonjs/editorTabs.d.ts.map +1 -0
- package/lib/typescript/commonjs/fileTreeUtils.d.ts +17 -0
- package/lib/typescript/commonjs/fileTreeUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +20 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/markdownStyles.d.ts +150 -0
- package/lib/typescript/commonjs/markdownStyles.d.ts.map +1 -0
- package/lib/typescript/commonjs/mediaUtils.d.ts +9 -0
- package/lib/typescript/commonjs/mediaUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/messageActionStyles.d.ts +38 -0
- package/lib/typescript/commonjs/messageActionStyles.d.ts.map +1 -0
- package/lib/typescript/commonjs/messageUtils.d.ts +8 -0
- package/lib/typescript/commonjs/messageUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/nativeActionSheet.d.ts +6 -0
- package/lib/typescript/commonjs/nativeActionSheet.d.ts.map +1 -0
- package/lib/typescript/commonjs/nativeActionSheet.web.d.ts +3 -0
- package/lib/typescript/commonjs/nativeActionSheet.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/paperTheme.d.ts +3 -0
- package/lib/typescript/commonjs/paperTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/realtimeClient.d.ts +16 -0
- package/lib/typescript/commonjs/realtimeClient.d.ts.map +1 -0
- package/lib/typescript/commonjs/renameAgentModalStyles.d.ts +76 -0
- package/lib/typescript/commonjs/renameAgentModalStyles.d.ts.map +1 -0
- package/lib/typescript/commonjs/screenParts.d.ts +31 -0
- package/lib/typescript/commonjs/screenParts.d.ts.map +1 -0
- package/lib/typescript/commonjs/styles.d.ts +336 -0
- package/lib/typescript/commonjs/styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/superagentApiClient.d.ts +66 -0
- package/lib/typescript/commonjs/superagentApiClient.d.ts.map +1 -0
- package/lib/typescript/commonjs/types.d.ts +437 -0
- package/lib/typescript/commonjs/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/useSuperagentAttachmentPicker.d.ts +30 -0
- package/lib/typescript/commonjs/useSuperagentAttachmentPicker.d.ts.map +1 -0
- package/lib/typescript/commonjs/useSuperagentConversation.d.ts +36 -0
- package/lib/typescript/commonjs/useSuperagentConversation.d.ts.map +1 -0
- package/lib/typescript/commonjs/useSuperagentRuntime.d.ts +163 -0
- package/lib/typescript/commonjs/useSuperagentRuntime.d.ts.map +1 -0
- package/lib/typescript/module/AgentSettingsPanel.d.ts +19 -0
- package/lib/typescript/module/AgentSettingsPanel.d.ts.map +1 -0
- package/lib/typescript/module/AgentSphereIcon.d.ts +15 -0
- package/lib/typescript/module/AgentSphereIcon.d.ts.map +1 -0
- package/lib/typescript/module/AttachmentPickerStatusModal.d.ts +8 -0
- package/lib/typescript/module/AttachmentPickerStatusModal.d.ts.map +1 -0
- package/lib/typescript/module/AttachmentPreviewStrip.d.ts +7 -0
- package/lib/typescript/module/AttachmentPreviewStrip.d.ts.map +1 -0
- package/lib/typescript/module/ChannelsPanel.d.ts +21 -0
- package/lib/typescript/module/ChannelsPanel.d.ts.map +1 -0
- package/lib/typescript/module/ConversationChat.d.ts +22 -0
- package/lib/typescript/module/ConversationChat.d.ts.map +1 -0
- package/lib/typescript/module/ConversationComposer.d.ts +24 -0
- package/lib/typescript/module/ConversationComposer.d.ts.map +1 -0
- package/lib/typescript/module/ConversationMessageList.d.ts +17 -0
- package/lib/typescript/module/ConversationMessageList.d.ts.map +1 -0
- package/lib/typescript/module/ConversationScreen.d.ts +80 -0
- package/lib/typescript/module/ConversationScreen.d.ts.map +1 -0
- package/lib/typescript/module/EditorDrawer.d.ts +67 -0
- package/lib/typescript/module/EditorDrawer.d.ts.map +1 -0
- package/lib/typescript/module/EditorTabPanel.d.ts +6 -0
- package/lib/typescript/module/EditorTabPanel.d.ts.map +1 -0
- package/lib/typescript/module/FilesPanel.d.ts +14 -0
- package/lib/typescript/module/FilesPanel.d.ts.map +1 -0
- package/lib/typescript/module/MarkdownText.d.ts +10 -0
- package/lib/typescript/module/MarkdownText.d.ts.map +1 -0
- package/lib/typescript/module/MessageActionBar.d.ts +8 -0
- package/lib/typescript/module/MessageActionBar.d.ts.map +1 -0
- package/lib/typescript/module/RenameAgentModal.d.ts +10 -0
- package/lib/typescript/module/RenameAgentModal.d.ts.map +1 -0
- package/lib/typescript/module/ShareAgentModal.d.ts +15 -0
- package/lib/typescript/module/ShareAgentModal.d.ts.map +1 -0
- package/lib/typescript/module/ShareAgentModal.styles.d.ts +229 -0
- package/lib/typescript/module/ShareAgentModal.styles.d.ts.map +1 -0
- package/lib/typescript/module/SuperagentHomeScreen.d.ts +4 -0
- package/lib/typescript/module/SuperagentHomeScreen.d.ts.map +1 -0
- package/lib/typescript/module/ToolApprovalCard.d.ts +13 -0
- package/lib/typescript/module/ToolApprovalCard.d.ts.map +1 -0
- package/lib/typescript/module/ToolCallSummary.d.ts +16 -0
- package/lib/typescript/module/ToolCallSummary.d.ts.map +1 -0
- package/lib/typescript/module/agentSphereStyles.d.ts +31 -0
- package/lib/typescript/module/agentSphereStyles.d.ts.map +1 -0
- package/lib/typescript/module/apiClient.d.ts +4 -0
- package/lib/typescript/module/apiClient.d.ts.map +1 -0
- package/lib/typescript/module/attachmentFileHelpers.d.ts +6 -0
- package/lib/typescript/module/attachmentFileHelpers.d.ts.map +1 -0
- package/lib/typescript/module/attachmentUpload.d.ts +12 -0
- package/lib/typescript/module/attachmentUpload.d.ts.map +1 -0
- package/lib/typescript/module/composerStyles.d.ts +241 -0
- package/lib/typescript/module/composerStyles.d.ts.map +1 -0
- package/lib/typescript/module/connectorBrandIcons.d.ts +7 -0
- package/lib/typescript/module/connectorBrandIcons.d.ts.map +1 -0
- package/lib/typescript/module/connectorCatalog.d.ts +3 -0
- package/lib/typescript/module/connectorCatalog.d.ts.map +1 -0
- package/lib/typescript/module/constants.d.ts +4 -0
- package/lib/typescript/module/constants.d.ts.map +1 -0
- package/lib/typescript/module/conversationParts.d.ts +29 -0
- package/lib/typescript/module/conversationParts.d.ts.map +1 -0
- package/lib/typescript/module/conversationRuntime.d.ts +67 -0
- package/lib/typescript/module/conversationRuntime.d.ts.map +1 -0
- package/lib/typescript/module/conversationStyles.d.ts +742 -0
- package/lib/typescript/module/conversationStyles.d.ts.map +1 -0
- package/lib/typescript/module/editorShellStyles.d.ts +1025 -0
- package/lib/typescript/module/editorShellStyles.d.ts.map +1 -0
- package/lib/typescript/module/editorTabs.d.ts +11 -0
- package/lib/typescript/module/editorTabs.d.ts.map +1 -0
- package/lib/typescript/module/fileTreeUtils.d.ts +17 -0
- package/lib/typescript/module/fileTreeUtils.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +20 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/markdownStyles.d.ts +150 -0
- package/lib/typescript/module/markdownStyles.d.ts.map +1 -0
- package/lib/typescript/module/mediaUtils.d.ts +9 -0
- package/lib/typescript/module/mediaUtils.d.ts.map +1 -0
- package/lib/typescript/module/messageActionStyles.d.ts +38 -0
- package/lib/typescript/module/messageActionStyles.d.ts.map +1 -0
- package/lib/typescript/module/messageUtils.d.ts +8 -0
- package/lib/typescript/module/messageUtils.d.ts.map +1 -0
- package/lib/typescript/module/nativeActionSheet.d.ts +6 -0
- package/lib/typescript/module/nativeActionSheet.d.ts.map +1 -0
- package/lib/typescript/module/nativeActionSheet.web.d.ts +3 -0
- package/lib/typescript/module/nativeActionSheet.web.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/paperTheme.d.ts +3 -0
- package/lib/typescript/module/paperTheme.d.ts.map +1 -0
- package/lib/typescript/module/realtimeClient.d.ts +16 -0
- package/lib/typescript/module/realtimeClient.d.ts.map +1 -0
- package/lib/typescript/module/renameAgentModalStyles.d.ts +76 -0
- package/lib/typescript/module/renameAgentModalStyles.d.ts.map +1 -0
- package/lib/typescript/module/screenParts.d.ts +31 -0
- package/lib/typescript/module/screenParts.d.ts.map +1 -0
- package/lib/typescript/module/styles.d.ts +336 -0
- package/lib/typescript/module/styles.d.ts.map +1 -0
- package/lib/typescript/module/superagentApiClient.d.ts +66 -0
- package/lib/typescript/module/superagentApiClient.d.ts.map +1 -0
- package/lib/typescript/module/types.d.ts +437 -0
- package/lib/typescript/module/types.d.ts.map +1 -0
- package/lib/typescript/module/useSuperagentAttachmentPicker.d.ts +30 -0
- package/lib/typescript/module/useSuperagentAttachmentPicker.d.ts.map +1 -0
- package/lib/typescript/module/useSuperagentConversation.d.ts +36 -0
- package/lib/typescript/module/useSuperagentConversation.d.ts.map +1 -0
- package/lib/typescript/module/useSuperagentRuntime.d.ts +163 -0
- package/lib/typescript/module/useSuperagentRuntime.d.ts.map +1 -0
- package/package.json +87 -0
- package/src/AgentSettingsPanel.tsx +1122 -0
- package/src/AgentSphereIcon.tsx +170 -0
- package/src/AttachmentPickerStatusModal.tsx +80 -0
- package/src/AttachmentPreviewStrip.tsx +38 -0
- package/src/ChannelsPanel.tsx +705 -0
- package/src/ConversationChat.tsx +245 -0
- package/src/ConversationComposer.tsx +368 -0
- package/src/ConversationMessageList.tsx +140 -0
- package/src/ConversationScreen.tsx +320 -0
- package/src/EditorDrawer.tsx +1297 -0
- package/src/EditorTabPanel.tsx +19 -0
- package/src/FilesPanel.tsx +577 -0
- package/src/MarkdownText.tsx +317 -0
- package/src/MessageActionBar.tsx +126 -0
- package/src/RenameAgentModal.tsx +107 -0
- package/src/ShareAgentModal.styles.ts +95 -0
- package/src/ShareAgentModal.tsx +320 -0
- package/src/SuperagentHomeScreen.tsx +318 -0
- package/src/ToolApprovalCard.tsx +592 -0
- package/src/ToolCallSummary.tsx +599 -0
- package/src/agentSphereStyles.ts +25 -0
- package/src/apiClient.ts +189 -0
- package/src/attachmentFileHelpers.ts +109 -0
- package/src/attachmentUpload.ts +112 -0
- package/src/composerStyles.ts +167 -0
- package/src/connectorBrandIcons.tsx +69 -0
- package/src/connectorCatalog.ts +414 -0
- package/src/constants.ts +9 -0
- package/src/conversationParts.tsx +307 -0
- package/src/conversationRuntime.ts +171 -0
- package/src/conversationStyles.ts +412 -0
- package/src/editorShellStyles.ts +1023 -0
- package/src/editorTabs.ts +26 -0
- package/src/fileTreeUtils.ts +165 -0
- package/src/index.ts +110 -0
- package/src/markdownStyles.ts +64 -0
- package/src/mediaUtils.ts +75 -0
- package/src/messageActionStyles.ts +26 -0
- package/src/messageUtils.ts +58 -0
- package/src/nativeActionSheet.ts +25 -0
- package/src/nativeActionSheet.web.ts +5 -0
- package/src/paperTheme.ts +52 -0
- package/src/realtimeClient.ts +149 -0
- package/src/renameAgentModalStyles.ts +77 -0
- package/src/screenParts.tsx +185 -0
- package/src/styles.ts +190 -0
- package/src/superagentApiClient.ts +895 -0
- package/src/types.ts +514 -0
- package/src/useSuperagentAttachmentPicker.tsx +117 -0
- package/src/useSuperagentConversation.ts +242 -0
- package/src/useSuperagentRuntime.ts +1371 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useSuperagentAttachmentPicker = useSuperagentAttachmentPicker;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _AttachmentPickerStatusModal = require("./AttachmentPickerStatusModal.js");
|
|
9
|
+
var _attachmentUpload = require("./attachmentUpload.js");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
|
+
function useSuperagentAttachmentPicker({
|
|
13
|
+
baseUrl,
|
|
14
|
+
getAccessToken,
|
|
15
|
+
nativeAdapters
|
|
16
|
+
}) {
|
|
17
|
+
const [pickerStatus, setPickerStatus] = (0, _react.useState)(null);
|
|
18
|
+
const createPicker = (0, _react.useCallback)(mode => {
|
|
19
|
+
return async context => {
|
|
20
|
+
const authToken = await getAccessToken();
|
|
21
|
+
if (!authToken) {
|
|
22
|
+
setPickerStatus({
|
|
23
|
+
isError: true,
|
|
24
|
+
message: 'Sign in again before attaching files.',
|
|
25
|
+
title: 'Attachment unavailable'
|
|
26
|
+
});
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
const attachments = await (0, _attachmentUpload.pickAndUploadAttachments)({
|
|
31
|
+
authToken,
|
|
32
|
+
baseUrl,
|
|
33
|
+
context,
|
|
34
|
+
mode,
|
|
35
|
+
nativeAdapters,
|
|
36
|
+
onUploadStart: count => {
|
|
37
|
+
setPickerStatus({
|
|
38
|
+
message: `Uploading ${count === 1 ? 'attachment' : `${count} attachments`}...`,
|
|
39
|
+
title: 'Attaching files'
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
if (!attachments.length) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
setPickerStatus(null);
|
|
47
|
+
return attachments;
|
|
48
|
+
} catch (error) {
|
|
49
|
+
if (nativeAdapters.isCancel?.(error)) {
|
|
50
|
+
setPickerStatus(null);
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
setPickerStatus({
|
|
54
|
+
isError: true,
|
|
55
|
+
message: (0, _attachmentUpload.getAttachmentPickerErrorMessage)(error),
|
|
56
|
+
title: 'Attachment failed'
|
|
57
|
+
});
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
}, [baseUrl, getAccessToken, nativeAdapters]);
|
|
62
|
+
const attachmentPickerModal = (0, _react.useMemo)(() => {
|
|
63
|
+
if (!pickerStatus) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_AttachmentPickerStatusModal.AttachmentPickerStatusModal, {
|
|
67
|
+
isError: pickerStatus.isError,
|
|
68
|
+
message: pickerStatus.message,
|
|
69
|
+
onClose: () => setPickerStatus(null),
|
|
70
|
+
title: pickerStatus.title
|
|
71
|
+
});
|
|
72
|
+
}, [pickerStatus]);
|
|
73
|
+
return {
|
|
74
|
+
attachmentPickerModal,
|
|
75
|
+
onPickFiles: createPicker('files'),
|
|
76
|
+
onPickPhotos: createPicker('photos'),
|
|
77
|
+
onTakePhoto: createPicker('camera')
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=useSuperagentAttachmentPicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_AttachmentPickerStatusModal","_attachmentUpload","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","useSuperagentAttachmentPicker","baseUrl","getAccessToken","nativeAdapters","pickerStatus","setPickerStatus","useState","createPicker","useCallback","mode","context","authToken","isError","message","title","attachments","pickAndUploadAttachments","onUploadStart","count","length","error","isCancel","getAttachmentPickerErrorMessage","attachmentPickerModal","useMemo","jsx","AttachmentPickerStatusModal","onClose","onPickFiles","onPickPhotos","onTakePhoto"],"sourceRoot":"../../src","sources":["useSuperagentAttachmentPicker.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAIA,IAAAC,4BAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AAG4B,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA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C,IAAI,CAAC;QACrB,OAAOU,WAAW;MACpB,CAAC,CAAC,OAAOK,KAAK,EAAE;QACd,IAAIjB,cAAc,CAACkB,QAAQ,GAAGD,KAAK,CAAC,EAAE;UACpCf,eAAe,CAAC,IAAI,CAAC;UACrB,OAAO,IAAI;QACb;QAEAA,eAAe,CAAC;UACdO,OAAO,EAAE,IAAI;UACbC,OAAO,EAAE,IAAAS,iDAA+B,EAACF,KAAK,CAAC;UAC/CN,KAAK,EAAE;QACT,CAAC,CAAC;QACF,OAAO,IAAI;MACb;IACF,CAAC;EACH,CAAC,EAAE,CAACb,OAAO,EAAEC,cAAc,EAAEC,cAAc,CAAC,CAAC;EAE7C,MAAMoB,qBAAqB,GAAG,IAAAC,cAAO,EAAC,MAAM;IAC1C,IAAI,CAACpB,YAAY,EAAE;MACjB,OAAO,IAAI;IACb;IAEA,oBACE,IAAAxB,WAAA,CAAA6C,GAAA,EAAC/C,4BAAA,CAAAgD,2BAA2B;MAC1Bd,OAAO,EAAER,YAAY,CAACQ,OAAQ;MAC9BC,OAAO,EAAET,YAAY,CAACS,OAAQ;MAC9Bc,OAAO,EAAEA,CAAA,KAAMtB,eAAe,CAAC,IAAI,CAAE;MACrCS,KAAK,EAAEV,YAAY,CAACU;IAAM,CAC3B,CAAC;EAEN,CAAC,EAAE,CAACV,YAAY,CAAC,CAAC;EAElB,OAAO;IACLmB,qBAAqB;IACrBK,WAAW,EAAErB,YAAY,CAAC,OAAO,CAAC;IAClCsB,YAAY,EAAEtB,YAAY,CAAC,QAAQ,CAAC;IACpCuB,WAAW,EAAEvB,YAAY,CAAC,QAAQ;EACpC,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useSuperagentConversation = useSuperagentConversation;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _constants = require("./constants.js");
|
|
9
|
+
var _conversationRuntime = require("./conversationRuntime.js");
|
|
10
|
+
function useSuperagentConversation({
|
|
11
|
+
agentId,
|
|
12
|
+
apiClient,
|
|
13
|
+
realtimeClient,
|
|
14
|
+
fallbackMessages,
|
|
15
|
+
fallbackSending,
|
|
16
|
+
onAgentMessageDone,
|
|
17
|
+
onConversationSettled,
|
|
18
|
+
onSendMessage
|
|
19
|
+
}) {
|
|
20
|
+
const [conversationId, setConversationId] = (0, _react.useState)(null);
|
|
21
|
+
const [messages, setMessages] = (0, _react.useState)(fallbackMessages);
|
|
22
|
+
const [queuedMessages, setQueuedMessages] = (0, _react.useState)([]);
|
|
23
|
+
const [isLoading, setIsLoading] = (0, _react.useState)(false);
|
|
24
|
+
const [isSending, setIsSending] = (0, _react.useState)(false);
|
|
25
|
+
const [initError, setInitError] = (0, _react.useState)(null);
|
|
26
|
+
const [hasMoreMessages, setHasMoreMessages] = (0, _react.useState)(false);
|
|
27
|
+
const sendGenerationRef = (0, _react.useRef)(0);
|
|
28
|
+
(0, _react.useEffect)(() => {
|
|
29
|
+
if (!apiClient) setMessages(fallbackMessages);
|
|
30
|
+
}, [apiClient, fallbackMessages]);
|
|
31
|
+
(0, _react.useEffect)(() => {
|
|
32
|
+
if (!apiClient) return;
|
|
33
|
+
const client = apiClient;
|
|
34
|
+
let cancelled = false;
|
|
35
|
+
async function initConversation() {
|
|
36
|
+
setIsLoading(true);
|
|
37
|
+
setInitError(null);
|
|
38
|
+
try {
|
|
39
|
+
const conversations = await client.getConversations(1);
|
|
40
|
+
let conversation = conversations[0] ?? (await client.createConversation({}));
|
|
41
|
+
const page = await client.getMessages(conversation.id, {
|
|
42
|
+
limit: _constants.MESSAGES_PAGE_SIZE
|
|
43
|
+
});
|
|
44
|
+
if (cancelled) return;
|
|
45
|
+
conversation = {
|
|
46
|
+
...conversation,
|
|
47
|
+
messages: page.messages
|
|
48
|
+
};
|
|
49
|
+
setConversationId(conversation.id);
|
|
50
|
+
setMessages((0, _conversationRuntime.normalizeMessages)(conversation.messages ?? []));
|
|
51
|
+
setHasMoreMessages(Boolean(page.has_more ?? page.hasMore));
|
|
52
|
+
if ((conversation.messages ?? []).length === 0) {
|
|
53
|
+
await client.addMessage(conversation.id, (0, _conversationRuntime.createUserMessage)(_constants.AUTO_GREET_MESSAGE));
|
|
54
|
+
if (cancelled) return;
|
|
55
|
+
await (0, _conversationRuntime.refreshConversation)(client, conversation.id, setMessages);
|
|
56
|
+
}
|
|
57
|
+
} catch (error) {
|
|
58
|
+
if (!cancelled) setInitError(error instanceof Error ? error.message : 'Failed to load conversation');
|
|
59
|
+
} finally {
|
|
60
|
+
if (!cancelled) setIsLoading(false);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
initConversation();
|
|
64
|
+
return () => {
|
|
65
|
+
cancelled = true;
|
|
66
|
+
};
|
|
67
|
+
}, [agentId, apiClient]);
|
|
68
|
+
(0, _react.useEffect)(() => {
|
|
69
|
+
if (!realtimeClient || !conversationId) return undefined;
|
|
70
|
+
return realtimeClient.subscribeToConversation(conversationId, {
|
|
71
|
+
onMessage(message) {
|
|
72
|
+
setMessages(current => (0, _conversationRuntime.mergeMessage)(current, message));
|
|
73
|
+
if (message.role === 'assistant' && (message.content || message.toolCalls?.length || message.tool_calls?.length)) {
|
|
74
|
+
setIsSending(false);
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
onConversation(conversation) {
|
|
78
|
+
if (conversation.id !== conversationId) return;
|
|
79
|
+
setMessages((0, _conversationRuntime.normalizeMessages)(conversation.messages ?? []));
|
|
80
|
+
},
|
|
81
|
+
onAgentDone() {
|
|
82
|
+
setIsSending(false);
|
|
83
|
+
onAgentMessageDone?.();
|
|
84
|
+
if (apiClient) {
|
|
85
|
+
(0, _conversationRuntime.refreshConversation)(apiClient, conversationId, setMessages).then(() => onConversationSettled?.()).catch(() => {});
|
|
86
|
+
} else {
|
|
87
|
+
onConversationSettled?.();
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
onReconnect() {
|
|
91
|
+
if (apiClient) (0, _conversationRuntime.refreshConversation)(apiClient, conversationId, setMessages).catch(() => {});
|
|
92
|
+
},
|
|
93
|
+
onError(error) {
|
|
94
|
+
setInitError(error instanceof Error ? error.message : 'Realtime connection failed');
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}, [apiClient, conversationId, onAgentMessageDone, onConversationSettled, realtimeClient]);
|
|
98
|
+
const visibleMessages = (0, _react.useMemo)(() => messages.filter((message, index) => (0, _conversationRuntime.isVisibleMessage)(message, index)), [messages]);
|
|
99
|
+
const sendMessage = (0, _react.useCallback)(async (content, options = {}) => {
|
|
100
|
+
const trimmedContent = content.trim();
|
|
101
|
+
const fileUrls = options.fileUrls?.filter(Boolean) ?? [];
|
|
102
|
+
if (!trimmedContent && fileUrls.length === 0) return;
|
|
103
|
+
const assistantCountBefore = (0, _conversationRuntime.countAssistantResponses)(messages);
|
|
104
|
+
const userMessage = (0, _conversationRuntime.createUserMessage)(trimmedContent, {
|
|
105
|
+
fileUrls,
|
|
106
|
+
replyTo: options.replyTo
|
|
107
|
+
});
|
|
108
|
+
setMessages(current => [...current, userMessage]);
|
|
109
|
+
if (!apiClient || !conversationId) {
|
|
110
|
+
if (!onSendMessage) return;
|
|
111
|
+
const sendGeneration = sendGenerationRef.current + 1;
|
|
112
|
+
sendGenerationRef.current = sendGeneration;
|
|
113
|
+
const setSendingForCurrentSend = value => {
|
|
114
|
+
if (sendGenerationRef.current === sendGeneration) setIsSending(value);
|
|
115
|
+
};
|
|
116
|
+
setIsSending(true);
|
|
117
|
+
const hasAssistantResponse = await (0, _conversationRuntime.sendWithFallback)(agentId, trimmedContent, fileUrls, options.replyTo, onSendMessage, setMessages, setSendingForCurrentSend);
|
|
118
|
+
if (hasAssistantResponse) onAgentMessageDone?.();
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const sendGeneration = sendGenerationRef.current + 1;
|
|
122
|
+
sendGenerationRef.current = sendGeneration;
|
|
123
|
+
const setSendingForCurrentSend = value => {
|
|
124
|
+
if (sendGenerationRef.current === sendGeneration) setIsSending(value);
|
|
125
|
+
};
|
|
126
|
+
setIsSending(true);
|
|
127
|
+
try {
|
|
128
|
+
const response = await apiClient.addMessage(conversationId, userMessage);
|
|
129
|
+
if ((0, _conversationRuntime.isQueuedResponse)(response)) {
|
|
130
|
+
setQueuedMessages(current => [...current, {
|
|
131
|
+
id: userMessage.id,
|
|
132
|
+
content: userMessage.content,
|
|
133
|
+
position: current.length
|
|
134
|
+
}]);
|
|
135
|
+
} else {
|
|
136
|
+
const refreshedMessages = await (0, _conversationRuntime.refreshConversation)(apiClient, conversationId, setMessages);
|
|
137
|
+
if (!realtimeClient) {
|
|
138
|
+
if ((0, _conversationRuntime.hasNewAssistantResponse)(refreshedMessages, assistantCountBefore)) {
|
|
139
|
+
setSendingForCurrentSend(false);
|
|
140
|
+
onAgentMessageDone?.();
|
|
141
|
+
onConversationSettled?.();
|
|
142
|
+
} else {
|
|
143
|
+
(0, _conversationRuntime.pollConversation)(apiClient, conversationId, setMessages, setSendingForCurrentSend, assistantCountBefore, onConversationSettled, onAgentMessageDone);
|
|
144
|
+
}
|
|
145
|
+
} else {
|
|
146
|
+
setTimeout(() => {
|
|
147
|
+
setSendingForCurrentSend(false);
|
|
148
|
+
onConversationSettled?.();
|
|
149
|
+
}, 5000);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
} catch (error) {
|
|
153
|
+
const errorMessage = (0, _conversationRuntime.createErrorMessage)(error);
|
|
154
|
+
setMessages(current => [...current, errorMessage]);
|
|
155
|
+
setSendingForCurrentSend(false);
|
|
156
|
+
}
|
|
157
|
+
}, [agentId, apiClient, conversationId, messages, onAgentMessageDone, onConversationSettled, onSendMessage, realtimeClient]);
|
|
158
|
+
const deleteMessage = (0, _react.useCallback)(async messageId => {
|
|
159
|
+
if (!messageId || messageId === 'welcome') return false;
|
|
160
|
+
if (!apiClient || !conversationId) {
|
|
161
|
+
setMessages(current => current.filter(message => message.id !== messageId));
|
|
162
|
+
return true;
|
|
163
|
+
}
|
|
164
|
+
try {
|
|
165
|
+
await apiClient.deleteMessage(conversationId, messageId);
|
|
166
|
+
await (0, _conversationRuntime.refreshConversation)(apiClient, conversationId, setMessages);
|
|
167
|
+
return true;
|
|
168
|
+
} catch (error) {
|
|
169
|
+
setInitError(error instanceof Error ? error.message : 'Failed to delete message');
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
}, [apiClient, conversationId]);
|
|
173
|
+
const stop = (0, _react.useCallback)(async () => {
|
|
174
|
+
sendGenerationRef.current += 1;
|
|
175
|
+
if (!apiClient || !conversationId) {
|
|
176
|
+
setIsSending(false);
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
setIsSending(false);
|
|
180
|
+
setQueuedMessages([]);
|
|
181
|
+
await apiClient.stopConversation(conversationId);
|
|
182
|
+
await (0, _conversationRuntime.refreshConversation)(apiClient, conversationId, setMessages);
|
|
183
|
+
}, [apiClient, conversationId]);
|
|
184
|
+
const loadPrevious = (0, _react.useCallback)(async () => {
|
|
185
|
+
const before = (0, _conversationRuntime.getMessageCursor)(messages[0]);
|
|
186
|
+
if (!apiClient || !conversationId || !before) return;
|
|
187
|
+
const page = await apiClient.getMessages(conversationId, {
|
|
188
|
+
limit: _constants.MESSAGES_PAGE_SIZE,
|
|
189
|
+
before
|
|
190
|
+
});
|
|
191
|
+
setMessages(current => [...(0, _conversationRuntime.normalizeMessages)(page.messages), ...current]);
|
|
192
|
+
setHasMoreMessages(Boolean(page.has_more ?? page.hasMore));
|
|
193
|
+
}, [apiClient, conversationId, messages]);
|
|
194
|
+
const submitToolCallInput = (0, _react.useCallback)(async (toolCallId, approve, extraUserInput, originRequestId) => {
|
|
195
|
+
if (!apiClient || !conversationId) return null;
|
|
196
|
+
const updated = await apiClient.submitToolCallInput(conversationId, toolCallId, approve, extraUserInput, originRequestId);
|
|
197
|
+
if (updated.messages) setMessages((0, _conversationRuntime.normalizeMessages)(updated.messages));
|
|
198
|
+
onConversationSettled?.();
|
|
199
|
+
return updated;
|
|
200
|
+
}, [apiClient, conversationId, onConversationSettled]);
|
|
201
|
+
return {
|
|
202
|
+
conversationId,
|
|
203
|
+
deleteMessage,
|
|
204
|
+
hasMoreMessages,
|
|
205
|
+
initError,
|
|
206
|
+
isLoading,
|
|
207
|
+
isSending: isSending || fallbackSending,
|
|
208
|
+
loadPrevious,
|
|
209
|
+
messages: visibleMessages,
|
|
210
|
+
queuedMessages,
|
|
211
|
+
sendMessage,
|
|
212
|
+
submitToolCallInput,
|
|
213
|
+
stop
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
//# sourceMappingURL=useSuperagentConversation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_constants","_conversationRuntime","useSuperagentConversation","agentId","apiClient","realtimeClient","fallbackMessages","fallbackSending","onAgentMessageDone","onConversationSettled","onSendMessage","conversationId","setConversationId","useState","messages","setMessages","queuedMessages","setQueuedMessages","isLoading","setIsLoading","isSending","setIsSending","initError","setInitError","hasMoreMessages","setHasMoreMessages","sendGenerationRef","useRef","useEffect","client","cancelled","initConversation","conversations","getConversations","conversation","createConversation","page","getMessages","id","limit","MESSAGES_PAGE_SIZE","normalizeMessages","Boolean","has_more","hasMore","length","addMessage","createUserMessage","AUTO_GREET_MESSAGE","refreshConversation","error","Error","message","undefined","subscribeToConversation","onMessage","current","mergeMessage","role","content","toolCalls","tool_calls","onConversation","onAgentDone","then","catch","onReconnect","onError","visibleMessages","useMemo","filter","index","isVisibleMessage","sendMessage","useCallback","options","trimmedContent","trim","fileUrls","assistantCountBefore","countAssistantResponses","userMessage","replyTo","sendGeneration","setSendingForCurrentSend","value","hasAssistantResponse","sendWithFallback","response","isQueuedResponse","position","refreshedMessages","hasNewAssistantResponse","pollConversation","setTimeout","errorMessage","createErrorMessage","deleteMessage","messageId","stop","stopConversation","loadPrevious","before","getMessageCursor","submitToolCallInput","toolCallId","approve","extraUserInput","originRequestId","updated"],"sourceRoot":"../../src","sources":["useSuperagentConversation.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AA6BO,SAASG,yBAAyBA,CAAC;EACxCC,OAAO;EACPC,SAAS;EACTC,cAAc;EACdC,gBAAgB;EAChBC,eAAe;EACfC,kBAAkB;EAClBC,qBAAqB;EACrBC;AACqB,CAAC,EAAE;EACxB,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAG,IAAAC,eAAQ,EAAgB,IAAI,CAAC;EACzE,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAG,IAAAF,eAAQ,EAAsBP,gBAAgB,CAAC;EAC/E,MAAM,CAACU,cAAc,EAAEC,iBAAiB,CAAC,GAAG,IAAAJ,eAAQ,EAA4B,EAAE,CAAC;EACnF,MAAM,CAACK,SAAS,EAAEC,YAAY,CAAC,GAAG,IAAAN,eAAQ,EAAC,KAAK,CAAC;EACjD,MAAM,CAACO,SAAS,EAAEC,YAAY,CAAC,GAAG,IAAAR,eAAQ,EAAC,KAAK,CAAC;EACjD,MAAM,CAACS,SAAS,EAAEC,YAAY,CAAC,GAAG,IAAAV,eAAQ,EAAgB,IAAI,CAAC;EAC/D,MAAM,CAACW,eAAe,EAAEC,kBAAkB,CAAC,GAAG,IAAAZ,eAAQ,EAAC,KAAK,CAAC;EAC7D,MAAMa,iBAAiB,GAAG,IAAAC,aAAM,EAAC,CAAC,CAAC;EAEnC,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAI,CAACxB,SAAS,EAAEW,WAAW,CAACT,gBAAgB,CAAC;EAC/C,CAAC,EAAE,CAACF,SAAS,EAAEE,gBAAgB,CAAC,CAAC;EAEjC,IAAAsB,gBAAS,EAAC,MAAM;IACd,IAAI,CAACxB,SAAS,EAAE;IAChB,MAAMyB,MAA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