@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,149 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
SuperagentConversation,
|
|
3
|
+
SuperagentMessage,
|
|
4
|
+
SuperagentRealtimeClient,
|
|
5
|
+
SuperagentRealtimeHandlers,
|
|
6
|
+
} from './types';
|
|
7
|
+
|
|
8
|
+
type SocketListener = (...args: unknown[]) => void;
|
|
9
|
+
|
|
10
|
+
export type SuperagentSocketLike = {
|
|
11
|
+
connected?: boolean;
|
|
12
|
+
emit(event: string, ...args: unknown[]): void;
|
|
13
|
+
on(event: string, listener: SocketListener): void;
|
|
14
|
+
off?(event: string, listener: SocketListener): void;
|
|
15
|
+
removeListener?(event: string, listener: SocketListener): void;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type SuperagentSocketClientConfig = {
|
|
19
|
+
socket: SuperagentSocketLike;
|
|
20
|
+
roomMetadata?: Record<string, unknown> | ((conversationId: string) => Record<string, unknown> | undefined);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
type RealtimeEnvelope = {
|
|
24
|
+
room: string;
|
|
25
|
+
data?: unknown;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export function createSuperagentSocketClient({
|
|
29
|
+
socket,
|
|
30
|
+
roomMetadata,
|
|
31
|
+
}: SuperagentSocketClientConfig): SuperagentRealtimeClient {
|
|
32
|
+
const roomCounts = new Map<string, number>();
|
|
33
|
+
|
|
34
|
+
return {
|
|
35
|
+
subscribeToConversation(conversationId, handlers) {
|
|
36
|
+
const room = getConversationRoom(conversationId);
|
|
37
|
+
const metadata = typeof roomMetadata === 'function' ? roomMetadata(conversationId) : roomMetadata;
|
|
38
|
+
|
|
39
|
+
addRoom(room, metadata);
|
|
40
|
+
|
|
41
|
+
const onUpdate: SocketListener = (raw) => {
|
|
42
|
+
const envelope = parseEnvelope(raw);
|
|
43
|
+
if (!envelope || envelope.room !== room) return;
|
|
44
|
+
dispatchUpdate(envelope.data, handlers);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const onAgentDone: SocketListener = (raw) => {
|
|
48
|
+
const envelope = parseEnvelope(raw);
|
|
49
|
+
if (!envelope || envelope.room !== room) return;
|
|
50
|
+
handlers.onAgentDone?.();
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const onConnect = () => {
|
|
54
|
+
emitJoin(room, metadata);
|
|
55
|
+
handlers.onReconnect?.();
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const onError: SocketListener = (error) => handlers.onError?.(error);
|
|
59
|
+
|
|
60
|
+
socket.on('update_model', onUpdate);
|
|
61
|
+
socket.on('agent_done', onAgentDone);
|
|
62
|
+
socket.on('connect', onConnect);
|
|
63
|
+
socket.on('error', onError);
|
|
64
|
+
|
|
65
|
+
return () => {
|
|
66
|
+
removeSocketListener(socket, 'update_model', onUpdate);
|
|
67
|
+
removeSocketListener(socket, 'agent_done', onAgentDone);
|
|
68
|
+
removeSocketListener(socket, 'connect', onConnect);
|
|
69
|
+
removeSocketListener(socket, 'error', onError);
|
|
70
|
+
removeRoom(room);
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
function addRoom(room: string, metadata?: Record<string, unknown>) {
|
|
76
|
+
const currentCount = roomCounts.get(room) ?? 0;
|
|
77
|
+
roomCounts.set(room, currentCount + 1);
|
|
78
|
+
if (currentCount === 0) emitJoin(room, metadata);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function removeRoom(room: string) {
|
|
82
|
+
const nextCount = (roomCounts.get(room) ?? 1) - 1;
|
|
83
|
+
if (nextCount > 0) {
|
|
84
|
+
roomCounts.set(room, nextCount);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
roomCounts.delete(room);
|
|
89
|
+
socket.emit('leave', room);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function emitJoin(room: string, metadata?: Record<string, unknown>) {
|
|
93
|
+
if (metadata) socket.emit('join', room, metadata);
|
|
94
|
+
else socket.emit('join', room);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function dispatchUpdate(data: unknown, handlers: SuperagentRealtimeHandlers) {
|
|
99
|
+
if (!data || typeof data !== 'object') return;
|
|
100
|
+
|
|
101
|
+
const payload = data as {
|
|
102
|
+
_message?: SuperagentMessage;
|
|
103
|
+
conversation?: SuperagentConversation;
|
|
104
|
+
id?: unknown;
|
|
105
|
+
messages?: unknown;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
if (payload._message) handlers.onMessage?.(payload._message);
|
|
109
|
+
if (payload.conversation) handlers.onConversation?.(payload.conversation);
|
|
110
|
+
|
|
111
|
+
if (typeof payload.id === 'string' && Array.isArray(payload.messages)) {
|
|
112
|
+
handlers.onConversation?.(payload as SuperagentConversation);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function parseEnvelope(raw: unknown): RealtimeEnvelope | null {
|
|
117
|
+
if (!raw || typeof raw !== 'object') return null;
|
|
118
|
+
const message = raw as { room?: unknown; data?: unknown };
|
|
119
|
+
if (typeof message.room !== 'string') return null;
|
|
120
|
+
|
|
121
|
+
return {
|
|
122
|
+
room: message.room,
|
|
123
|
+
data: parseData(message.data),
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function parseData(data: unknown) {
|
|
128
|
+
if (typeof data !== 'string') return data;
|
|
129
|
+
|
|
130
|
+
try {
|
|
131
|
+
return JSON.parse(data) as unknown;
|
|
132
|
+
} catch {
|
|
133
|
+
return undefined;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function getConversationRoom(conversationId: string) {
|
|
138
|
+
const segment = conversationId.trim();
|
|
139
|
+
if (!/^[A-Za-z0-9._:-]+$/.test(segment)) {
|
|
140
|
+
throw new Error('Invalid conversationId');
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return `/agent-conversations/${segment}`;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function removeSocketListener(socket: SuperagentSocketLike, event: string, listener: SocketListener) {
|
|
147
|
+
if (socket.off) socket.off(event, listener);
|
|
148
|
+
else socket.removeListener?.(event, listener);
|
|
149
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
|
|
3
|
+
export const renameAgentModalStyles = StyleSheet.create({
|
|
4
|
+
actions: {
|
|
5
|
+
flexDirection: 'row',
|
|
6
|
+
gap: 10,
|
|
7
|
+
marginTop: 18,
|
|
8
|
+
},
|
|
9
|
+
backdrop: {
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
backgroundColor: 'rgba(0, 0, 0, 0.58)',
|
|
12
|
+
flex: 1,
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
padding: 22,
|
|
15
|
+
},
|
|
16
|
+
button: {
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
borderRadius: 16,
|
|
19
|
+
flex: 1,
|
|
20
|
+
height: 48,
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
},
|
|
23
|
+
card: {
|
|
24
|
+
backgroundColor: '#171717',
|
|
25
|
+
borderColor: '#2C2C2E',
|
|
26
|
+
borderRadius: 24,
|
|
27
|
+
borderWidth: 1,
|
|
28
|
+
padding: 18,
|
|
29
|
+
width: '100%',
|
|
30
|
+
},
|
|
31
|
+
error: {
|
|
32
|
+
color: '#FF6B6B',
|
|
33
|
+
fontSize: 13,
|
|
34
|
+
lineHeight: 18,
|
|
35
|
+
marginTop: 10,
|
|
36
|
+
},
|
|
37
|
+
input: {
|
|
38
|
+
backgroundColor: '#0B0B0C',
|
|
39
|
+
borderColor: '#3A3A3C',
|
|
40
|
+
borderRadius: 16,
|
|
41
|
+
borderWidth: 1,
|
|
42
|
+
color: '#F7F7F7',
|
|
43
|
+
fontSize: 17,
|
|
44
|
+
fontWeight: '600',
|
|
45
|
+
height: 52,
|
|
46
|
+
marginTop: 16,
|
|
47
|
+
paddingHorizontal: 14,
|
|
48
|
+
},
|
|
49
|
+
pressed: {
|
|
50
|
+
opacity: 0.76,
|
|
51
|
+
},
|
|
52
|
+
primaryButton: {
|
|
53
|
+
backgroundColor: '#F4F4F5',
|
|
54
|
+
},
|
|
55
|
+
primaryButtonText: {
|
|
56
|
+
color: '#0B0B0C',
|
|
57
|
+
fontSize: 16,
|
|
58
|
+
fontWeight: '800',
|
|
59
|
+
},
|
|
60
|
+
primaryPressed: {
|
|
61
|
+
opacity: 0.82,
|
|
62
|
+
},
|
|
63
|
+
secondaryButton: {
|
|
64
|
+
backgroundColor: '#2C2C2E',
|
|
65
|
+
},
|
|
66
|
+
secondaryButtonText: {
|
|
67
|
+
color: '#F7F7F7',
|
|
68
|
+
fontSize: 16,
|
|
69
|
+
fontWeight: '700',
|
|
70
|
+
},
|
|
71
|
+
title: {
|
|
72
|
+
color: '#F7F7F7',
|
|
73
|
+
fontSize: 20,
|
|
74
|
+
fontWeight: '800',
|
|
75
|
+
textAlign: 'center',
|
|
76
|
+
},
|
|
77
|
+
});
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Pressable, SafeAreaView, Text, View } from 'react-native';
|
|
3
|
+
import { ChevronRight, Plus } from 'lucide-react-native';
|
|
4
|
+
|
|
5
|
+
import { AgentSphereIcon } from './AgentSphereIcon';
|
|
6
|
+
import { styles } from './styles';
|
|
7
|
+
import type { SuperagentAgent, SuperagentHomeScreenProps } from './types';
|
|
8
|
+
|
|
9
|
+
export function AgentCard({
|
|
10
|
+
agent,
|
|
11
|
+
automationCount = 0,
|
|
12
|
+
connectorCount = 0,
|
|
13
|
+
latestMessages,
|
|
14
|
+
onPress,
|
|
15
|
+
}: {
|
|
16
|
+
agent: SuperagentAgent;
|
|
17
|
+
automationCount?: number;
|
|
18
|
+
connectorCount?: number;
|
|
19
|
+
latestMessages: SuperagentHomeScreenProps['latestMessages'];
|
|
20
|
+
onPress: () => void;
|
|
21
|
+
}) {
|
|
22
|
+
const preview = getLatestMessagePreview(latestMessages);
|
|
23
|
+
const meta = [
|
|
24
|
+
connectorCount > 0 ? `${connectorCount} connected` : 'Tools ready',
|
|
25
|
+
automationCount > 0 ? `${automationCount} tasks` : 'No tasks yet',
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<Pressable
|
|
30
|
+
accessibilityRole="button"
|
|
31
|
+
onPress={onPress}
|
|
32
|
+
style={({ pressed }) => [styles.heroPanel, pressed && styles.pressed]}
|
|
33
|
+
>
|
|
34
|
+
<View style={styles.heroTopRow}>
|
|
35
|
+
<Text style={styles.heroLabel}>Continue</Text>
|
|
36
|
+
</View>
|
|
37
|
+
<View style={styles.agentCard}>
|
|
38
|
+
<View style={styles.avatar}>
|
|
39
|
+
<AgentSphereIcon agent={agent} size="header" />
|
|
40
|
+
</View>
|
|
41
|
+
<View style={styles.agentCardBody}>
|
|
42
|
+
<Text style={styles.agentName} numberOfLines={1}>{agent.name || 'Untitled Agent'}</Text>
|
|
43
|
+
<Text style={styles.agentDescription} numberOfLines={3}>
|
|
44
|
+
{preview || agent.description || 'Open your latest Superagent conversation.'}
|
|
45
|
+
</Text>
|
|
46
|
+
</View>
|
|
47
|
+
<ChevronRight color="#8E8E93" size={24} strokeWidth={2.5} />
|
|
48
|
+
</View>
|
|
49
|
+
<View style={styles.agentMetaRow}>
|
|
50
|
+
{meta.map((item) => (
|
|
51
|
+
<View key={item} style={styles.agentMetaPill}>
|
|
52
|
+
<Text style={styles.agentMetaText}>{item}</Text>
|
|
53
|
+
</View>
|
|
54
|
+
))}
|
|
55
|
+
</View>
|
|
56
|
+
</Pressable>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function EmptyState({
|
|
61
|
+
onCreateAgent,
|
|
62
|
+
isCreating,
|
|
63
|
+
}: {
|
|
64
|
+
onCreateAgent: () => void;
|
|
65
|
+
isCreating: boolean;
|
|
66
|
+
}) {
|
|
67
|
+
return (
|
|
68
|
+
<View style={styles.emptyPanel}>
|
|
69
|
+
<View style={styles.avatar}>
|
|
70
|
+
<AgentSphereIcon size="header" />
|
|
71
|
+
</View>
|
|
72
|
+
<Text style={styles.emptyTitle}>Start with one task</Text>
|
|
73
|
+
<Text style={styles.emptyBody}>
|
|
74
|
+
Create a Superagent that can remember context, work with tools, and keep moving from your phone.
|
|
75
|
+
</Text>
|
|
76
|
+
<View style={styles.emptyChipRow}>
|
|
77
|
+
{['Research', 'Sales', 'Support', 'Automations'].map((label) => (
|
|
78
|
+
<View key={label} style={styles.emptyChip}>
|
|
79
|
+
<Text style={styles.emptyChipText}>{label}</Text>
|
|
80
|
+
</View>
|
|
81
|
+
))}
|
|
82
|
+
</View>
|
|
83
|
+
<Pressable
|
|
84
|
+
accessibilityRole="button"
|
|
85
|
+
disabled={isCreating}
|
|
86
|
+
onPress={onCreateAgent}
|
|
87
|
+
style={({ pressed }) => [styles.primaryButton, pressed && styles.pressed]}
|
|
88
|
+
>
|
|
89
|
+
<Text style={styles.primaryButtonText}>{isCreating ? 'Creating...' : 'Create Superagent'}</Text>
|
|
90
|
+
</Pressable>
|
|
91
|
+
</View>
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function AgentRow({
|
|
96
|
+
agent,
|
|
97
|
+
latestMessages,
|
|
98
|
+
onPress,
|
|
99
|
+
}: {
|
|
100
|
+
agent: SuperagentAgent;
|
|
101
|
+
latestMessages?: SuperagentHomeScreenProps['latestMessages'];
|
|
102
|
+
onPress: () => void;
|
|
103
|
+
}) {
|
|
104
|
+
const preview = getLatestMessagePreview(latestMessages ?? []);
|
|
105
|
+
|
|
106
|
+
return (
|
|
107
|
+
<Pressable
|
|
108
|
+
accessibilityRole="button"
|
|
109
|
+
onPress={onPress}
|
|
110
|
+
style={({ pressed }) => [styles.agentRow, pressed && styles.pressed]}
|
|
111
|
+
>
|
|
112
|
+
<View style={styles.compactAvatar}>
|
|
113
|
+
<AgentSphereIcon agent={agent} size="sm" />
|
|
114
|
+
</View>
|
|
115
|
+
<View style={styles.agentRowBody}>
|
|
116
|
+
<Text style={styles.agentRowName} numberOfLines={1}>{agent.name || 'Untitled Agent'}</Text>
|
|
117
|
+
<Text style={styles.agentRowDescription} numberOfLines={1}>
|
|
118
|
+
{preview || agent.description || 'Ready for the next instruction.'}
|
|
119
|
+
</Text>
|
|
120
|
+
</View>
|
|
121
|
+
<ChevronRight color="#73737A" size={21} strokeWidth={2.5} />
|
|
122
|
+
</Pressable>
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function HeaderProfile({ userAvatarUrl }: { userAvatarUrl?: string | null }) {
|
|
127
|
+
return (
|
|
128
|
+
<View style={styles.headerAvatar}>
|
|
129
|
+
<AgentSphereIcon isUser size="md" userAvatarUrl={userAvatarUrl} />
|
|
130
|
+
</View>
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function CreateAgentButton({
|
|
135
|
+
isCreating,
|
|
136
|
+
onPress,
|
|
137
|
+
}: {
|
|
138
|
+
isCreating: boolean;
|
|
139
|
+
onPress: () => void;
|
|
140
|
+
}) {
|
|
141
|
+
return (
|
|
142
|
+
<Pressable
|
|
143
|
+
accessibilityRole="button"
|
|
144
|
+
disabled={isCreating}
|
|
145
|
+
onPress={onPress}
|
|
146
|
+
style={({ pressed }) => [styles.secondaryButton, pressed && styles.pressed]}
|
|
147
|
+
>
|
|
148
|
+
<Plus color="#F4F4F5" size={18} strokeWidth={2.6} />
|
|
149
|
+
<Text style={styles.secondaryButtonText}>{isCreating ? 'Creating...' : 'New Superagent'}</Text>
|
|
150
|
+
</Pressable>
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export function PlaceholderPage({
|
|
155
|
+
title,
|
|
156
|
+
body,
|
|
157
|
+
onBack,
|
|
158
|
+
}: {
|
|
159
|
+
title: string;
|
|
160
|
+
body: string;
|
|
161
|
+
onBack: () => void;
|
|
162
|
+
}) {
|
|
163
|
+
return (
|
|
164
|
+
<SafeAreaView style={styles.safeArea}>
|
|
165
|
+
<View style={styles.placeholder}>
|
|
166
|
+
<Pressable accessibilityRole="button" onPress={onBack} style={styles.backButton}>
|
|
167
|
+
<Text style={styles.backButtonText}>Back</Text>
|
|
168
|
+
</Pressable>
|
|
169
|
+
<Text style={styles.title}>{title}</Text>
|
|
170
|
+
<Text style={styles.subtitle}>{body}</Text>
|
|
171
|
+
</View>
|
|
172
|
+
</SafeAreaView>
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function getLatestMessagePreview(messages: SuperagentHomeScreenProps['latestMessages']) {
|
|
177
|
+
if (!messages?.length) return undefined;
|
|
178
|
+
|
|
179
|
+
for (let index = messages.length - 1; index >= 0; index -= 1) {
|
|
180
|
+
const content = messages[index]?.content.trim();
|
|
181
|
+
if (content) return content;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return undefined;
|
|
185
|
+
}
|
package/src/styles.ts
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
|
|
3
|
+
export const styles = StyleSheet.create({
|
|
4
|
+
safeArea: { flex: 1, backgroundColor: '#000000' },
|
|
5
|
+
container: { paddingBottom: 34, paddingHorizontal: 14, paddingTop: 10 },
|
|
6
|
+
homeTopBar: {
|
|
7
|
+
alignItems: 'center',
|
|
8
|
+
borderBottomColor: '#101012',
|
|
9
|
+
borderBottomWidth: 1,
|
|
10
|
+
flexDirection: 'row',
|
|
11
|
+
minHeight: 62,
|
|
12
|
+
paddingHorizontal: 14,
|
|
13
|
+
paddingVertical: 8,
|
|
14
|
+
},
|
|
15
|
+
topBarSide: {
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
justifyContent: 'center',
|
|
18
|
+
minWidth: 52,
|
|
19
|
+
},
|
|
20
|
+
topBarRight: { alignItems: 'flex-end' },
|
|
21
|
+
topBarTitleWrap: {
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
flex: 1,
|
|
24
|
+
justifyContent: 'center',
|
|
25
|
+
minWidth: 0,
|
|
26
|
+
},
|
|
27
|
+
topBarTitle: { color: '#F7F7F7', fontSize: 17, fontWeight: '900', letterSpacing: 0, lineHeight: 21 },
|
|
28
|
+
homeIntro: { marginBottom: 14, paddingTop: 2 },
|
|
29
|
+
header: {
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
flexDirection: 'row',
|
|
32
|
+
justifyContent: 'space-between',
|
|
33
|
+
minHeight: 64,
|
|
34
|
+
paddingBottom: 10,
|
|
35
|
+
paddingTop: 4,
|
|
36
|
+
},
|
|
37
|
+
headerAccessory: { flexShrink: 0, marginLeft: 12 },
|
|
38
|
+
eyebrow: { color: '#8E8E93', fontSize: 12, fontWeight: '800', marginTop: 2 },
|
|
39
|
+
title: { color: '#F7F7F7', fontSize: 24, fontWeight: '900', letterSpacing: 0, lineHeight: 29 },
|
|
40
|
+
subtitle: { color: '#A1A1AA', fontSize: 14, fontWeight: '600', lineHeight: 20, marginTop: 5 },
|
|
41
|
+
headerAvatar: {
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
backgroundColor: '#151515',
|
|
44
|
+
borderColor: '#2A2A2A',
|
|
45
|
+
borderRadius: 22,
|
|
46
|
+
borderWidth: 1,
|
|
47
|
+
height: 44,
|
|
48
|
+
justifyContent: 'center',
|
|
49
|
+
width: 44,
|
|
50
|
+
},
|
|
51
|
+
loadingPanel: {
|
|
52
|
+
alignItems: 'center',
|
|
53
|
+
backgroundColor: '#0B0B0C',
|
|
54
|
+
borderColor: '#242427',
|
|
55
|
+
borderRadius: 18,
|
|
56
|
+
borderWidth: 1,
|
|
57
|
+
padding: 32,
|
|
58
|
+
},
|
|
59
|
+
heroPanel: {
|
|
60
|
+
backgroundColor: '#0B0B0C',
|
|
61
|
+
borderColor: '#242427',
|
|
62
|
+
borderRadius: 22,
|
|
63
|
+
borderWidth: 1,
|
|
64
|
+
overflow: 'hidden',
|
|
65
|
+
padding: 14,
|
|
66
|
+
},
|
|
67
|
+
heroTopRow: {
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
flexDirection: 'row',
|
|
70
|
+
justifyContent: 'space-between',
|
|
71
|
+
marginBottom: 16,
|
|
72
|
+
},
|
|
73
|
+
heroLabel: { color: '#8E8E93', fontSize: 11, fontWeight: '900', textTransform: 'uppercase' },
|
|
74
|
+
agentCard: {
|
|
75
|
+
alignItems: 'flex-start',
|
|
76
|
+
flexDirection: 'row',
|
|
77
|
+
minHeight: 100,
|
|
78
|
+
},
|
|
79
|
+
avatar: {
|
|
80
|
+
alignItems: 'center',
|
|
81
|
+
backgroundColor: '#111111',
|
|
82
|
+
borderColor: '#2A2A2A',
|
|
83
|
+
borderRadius: 24,
|
|
84
|
+
borderWidth: 1,
|
|
85
|
+
height: 52,
|
|
86
|
+
justifyContent: 'center',
|
|
87
|
+
width: 52,
|
|
88
|
+
},
|
|
89
|
+
avatarText: { color: '#F7F7F7', fontSize: 18, fontWeight: '900' },
|
|
90
|
+
agentCardBody: { flex: 1, marginLeft: 13, minWidth: 0 },
|
|
91
|
+
agentName: { color: '#F7F7F7', fontSize: 21, fontWeight: '900', lineHeight: 25 },
|
|
92
|
+
agentDescription: { color: '#BDBDC2', fontSize: 14, fontWeight: '600', lineHeight: 20, marginTop: 7 },
|
|
93
|
+
chevron: { color: '#8E8E93', fontSize: 20, fontWeight: '900' },
|
|
94
|
+
agentMetaRow: { flexDirection: 'row', flexWrap: 'wrap', marginLeft: 65, marginTop: 14 },
|
|
95
|
+
agentMetaPill: {
|
|
96
|
+
backgroundColor: '#151515',
|
|
97
|
+
borderColor: '#2A2A2A',
|
|
98
|
+
borderRadius: 13,
|
|
99
|
+
borderWidth: 1,
|
|
100
|
+
marginRight: 7,
|
|
101
|
+
marginTop: 7,
|
|
102
|
+
paddingHorizontal: 10,
|
|
103
|
+
paddingVertical: 6,
|
|
104
|
+
},
|
|
105
|
+
agentMetaText: { color: '#D4D4D8', fontSize: 12, fontWeight: '800' },
|
|
106
|
+
emptyPanel: {
|
|
107
|
+
backgroundColor: '#0B0B0C',
|
|
108
|
+
borderColor: '#242427',
|
|
109
|
+
borderRadius: 22,
|
|
110
|
+
borderWidth: 1,
|
|
111
|
+
padding: 16,
|
|
112
|
+
},
|
|
113
|
+
emptyTitle: { color: '#F7F7F7', fontSize: 23, fontWeight: '900', lineHeight: 28, marginTop: 15 },
|
|
114
|
+
emptyBody: { color: '#BDBDC2', fontSize: 14, fontWeight: '600', lineHeight: 21, marginTop: 8 },
|
|
115
|
+
emptyChipRow: { flexDirection: 'row', flexWrap: 'wrap', marginTop: 14 },
|
|
116
|
+
emptyChip: {
|
|
117
|
+
backgroundColor: '#151515',
|
|
118
|
+
borderColor: '#2A2A2A',
|
|
119
|
+
borderRadius: 15,
|
|
120
|
+
borderWidth: 1,
|
|
121
|
+
marginRight: 7,
|
|
122
|
+
marginTop: 7,
|
|
123
|
+
paddingHorizontal: 11,
|
|
124
|
+
paddingVertical: 7,
|
|
125
|
+
},
|
|
126
|
+
emptyChipText: { color: '#D4D4D8', fontSize: 12, fontWeight: '800' },
|
|
127
|
+
primaryButton: {
|
|
128
|
+
alignItems: 'center',
|
|
129
|
+
backgroundColor: '#F4F4F5',
|
|
130
|
+
borderRadius: 17,
|
|
131
|
+
justifyContent: 'center',
|
|
132
|
+
marginTop: 20,
|
|
133
|
+
minHeight: 50,
|
|
134
|
+
paddingHorizontal: 18,
|
|
135
|
+
},
|
|
136
|
+
primaryButtonText: { color: '#111111', fontSize: 16, fontWeight: '900' },
|
|
137
|
+
secondaryButton: {
|
|
138
|
+
alignItems: 'center',
|
|
139
|
+
backgroundColor: '#151515',
|
|
140
|
+
borderColor: '#2A2A2A',
|
|
141
|
+
borderRadius: 16,
|
|
142
|
+
borderWidth: 1,
|
|
143
|
+
flexDirection: 'row',
|
|
144
|
+
justifyContent: 'center',
|
|
145
|
+
marginTop: 14,
|
|
146
|
+
minHeight: 46,
|
|
147
|
+
paddingHorizontal: 16,
|
|
148
|
+
},
|
|
149
|
+
secondaryButtonText: { color: '#F4F4F5', fontSize: 14, fontWeight: '900', marginLeft: 7 },
|
|
150
|
+
recentSection: { marginTop: 22 },
|
|
151
|
+
sectionHeader: {
|
|
152
|
+
alignItems: 'center',
|
|
153
|
+
flexDirection: 'row',
|
|
154
|
+
justifyContent: 'space-between',
|
|
155
|
+
marginBottom: 10,
|
|
156
|
+
},
|
|
157
|
+
sectionTitle: { color: '#F4F4F5', fontSize: 17, fontWeight: '900' },
|
|
158
|
+
sectionCount: { color: '#73737A', fontSize: 12, fontWeight: '900' },
|
|
159
|
+
agentRow: {
|
|
160
|
+
alignItems: 'center',
|
|
161
|
+
backgroundColor: '#0B0B0C',
|
|
162
|
+
borderColor: '#242427',
|
|
163
|
+
borderRadius: 17,
|
|
164
|
+
borderWidth: 1,
|
|
165
|
+
flexDirection: 'row',
|
|
166
|
+
justifyContent: 'space-between',
|
|
167
|
+
marginBottom: 9,
|
|
168
|
+
minHeight: 68,
|
|
169
|
+
paddingHorizontal: 12,
|
|
170
|
+
paddingVertical: 10,
|
|
171
|
+
},
|
|
172
|
+
agentRowBody: { flex: 1, marginLeft: 11, minWidth: 0 },
|
|
173
|
+
agentRowName: { color: '#F4F4F5', fontSize: 15, fontWeight: '900' },
|
|
174
|
+
agentRowDescription: { color: '#8E8E93', fontSize: 12, fontWeight: '600', lineHeight: 17, marginTop: 3 },
|
|
175
|
+
compactAvatar: {
|
|
176
|
+
alignItems: 'center',
|
|
177
|
+
backgroundColor: '#111111',
|
|
178
|
+
borderColor: '#2A2A2A',
|
|
179
|
+
borderRadius: 15,
|
|
180
|
+
borderWidth: 1,
|
|
181
|
+
height: 38,
|
|
182
|
+
justifyContent: 'center',
|
|
183
|
+
width: 38,
|
|
184
|
+
},
|
|
185
|
+
placeholder: { flex: 1, padding: 20 },
|
|
186
|
+
backButton: { alignSelf: 'flex-start', marginBottom: 24, paddingVertical: 8 },
|
|
187
|
+
backButtonText: { color: '#FF5A1F', fontSize: 16, fontWeight: '700' },
|
|
188
|
+
helperText: { color: '#73737A', fontSize: 12, fontWeight: '700', lineHeight: 18, marginTop: 12 },
|
|
189
|
+
pressed: { opacity: 0.72 },
|
|
190
|
+
});
|