"use client"; import { memo, useState, useCallback, useEffect, useRef } from "react"; import { IconBrandVscode, IconLoader2, IconAlertCircle } from "@tabler/icons-react"; import { useTheme } from "next-themes"; import { Button } from "@kandev/ui/button"; import { PanelRoot, PanelBody } from "./panel-primitives"; import { useAppStore } from "@/components/state-provider"; import { startVscode, getVscodeStatus, type VscodeStatus } from "@/lib/api/domains/vscode-api"; import { getBackendConfig } from "@/lib/config"; function VscodeProgress({ status, message, error, onRetry, }: { status: VscodeStatus["status"]; message?: string; error?: string; onRetry: () => void; }) { if (status === "error") { return (

Failed to start VS Code

{error &&

{error}

}
); } return (

Starting VS Code Server

{message &&

{message}

}
); } function VscodeIframe({ url }: { url: string }) { const [loaded, setLoaded] = useState(false); return (