diff --git a/apps/web/components/connect-ai-modal.tsx b/apps/web/components/connect-ai-modal.tsx index 5f199ead..f0806e5e 100644 --- a/apps/web/components/connect-ai-modal.tsx +++ b/apps/web/components/connect-ai-modal.tsx @@ -160,6 +160,18 @@ export function ConnectAIModal({ staleTime: 30 * 1000, }) + const { data: connectionStatus, isLoading: isCheckingConnection } = useQuery({ + queryKey: ["mcp-connection"], + queryFn: async () => { + const response = await $fetch("@get/mcp/has-login") + if (response.error) { + throw new Error(response.error?.message || "Failed to check connection") + } + return response.data + }, + refetchInterval: 5000, + }) + const mcpMigrationForm = useForm({ defaultValues: { url: "" }, onSubmit: async ({ value, formApi }) => { @@ -733,15 +745,40 @@ export function ConnectAIModal({ - {/* TODO: Show when connection successful or not */} - {/*