import { ArrowRight, ShieldAlert, X } from "lucide-react"; import { useTranslation } from "react-i18next"; import { Button } from "@/components/ui/button"; import { sandboxLauncherDisplay } from "@/lib/sandbox-display"; import type { SandboxCheck } from "@/lib/types"; export type SandboxIssue = "missing" | "path" | "permissions" | "startup"; /** A command needs attention; the conversation itself is still usable. */ export function SandboxNotice({ issue, backend, onOpenSettings, onDismiss }: { issue: SandboxIssue; backend?: SandboxCheck["supported_backend"]; onOpenSettings: () => void; onDismiss: () => void; }) { const { t } = useTranslation(); const launcher = sandboxLauncherDisplay(backend); const configurePath = launcher && (issue === "missing" || issue === "path"); return

{t("settings.sandbox.notice.title")}

{t(`settings.sandbox.notice.${issue}`, { launcher: launcher?.name ?? t("settings.sandbox.launcher") })}

; }