diff --git a/app/commit.json b/app/commit.json
index f6de64509..6b30ae8bf 100644
--- a/app/commit.json
+++ b/app/commit.json
@@ -1 +1 @@
-{ "commit": "43e1f436f57fc4adb43b5481b403967803d4786d" , "version": "0.0.1" }
+{ "commit": "43e1f436f57fc4adb43b5481b403967803d4786d" , "version": "0.0.1" }
\ No newline at end of file
diff --git a/app/components/git/GitUrlImport.client.tsx b/app/components/git/GitUrlImport.client.tsx
index cbdeaa5cd..c2c949ec9 100644
--- a/app/components/git/GitUrlImport.client.tsx
+++ b/app/components/git/GitUrlImport.client.tsx
@@ -8,6 +8,8 @@ import { Chat } from '~/components/chat/Chat.client';
import { useGit } from '~/lib/hooks/useGit';
import { useChatHistory } from '~/lib/persistence';
import { createCommandsMessage, detectProjectCommands } from '~/utils/projectCommands';
+import { LoadingOverlay } from '~/components/ui/LoadingOverlay';
+import { toast } from 'react-toastify';
const IGNORE_PATTERNS = [
'node_modules/**',
@@ -38,6 +40,7 @@ export function GitUrlImport() {
const { ready: historyReady, importChat } = useChatHistory();
const { ready: gitReady, gitClone } = useGit();
const [imported, setImported] = useState(false);
+ const [loading, setLoading] = useState(true);
const importRepo = async (repoUrl?: string) => {
if (!gitReady && !historyReady) {
@@ -109,9 +112,23 @@ ${file.content}
return;
}
- importRepo(url);
+ importRepo(url).catch((error) => {
+ console.error('Error importing repo:', error);
+ toast.error('Failed to import repository');
+ setLoading(false);
+ window.location.href = '/';
+ });
setImported(true);
}, [searchParams, historyReady, gitReady, imported]);
- return
{message}
+