"use client"; import { memo, useState, useCallback, useEffect, useRef } from "react"; import { IconBrandVscode, IconLoader2, IconAlertCircle } from "@tabler/icons-react"; import { useTheme } from "@/components/theme/app-theme"; 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"; import { useTranslation } from "react-i18next"; function VscodeProgress({ status, message, error, onRetry, }: { status: VscodeStatus["status"]; message?: string; error?: string; onRetry: () => void; }) { const { t } = useTranslation(); if (status === "error") { return (

{t("task:failedToStartVsCode")}

{error &&

{error}

}
); } return (

{t("task:startingVsCodeServer")}

{message &&

{message}

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