Skip to content

DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.

fix(frontend): skip install screen when dependencies already installed

hairyf0d7566e3a1e2
diff --git a/src/App.tsx b/src/App.tsx
index 38f51a11..d89e9658 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -28,7 +28,7 @@ const btnPrimary =
export default function App() {
const { t } = useI18n();
- const [status, setStatus] = useState<SetupStatus>("installing");
+ const [status, setStatus] = useState<SetupStatus>("checking");
const [installer, setInstaller] = useState<InstallerState>(initialInstaller);
const [errorMsg, setErrorMsg] = useState("");
const [serviceUrl, setServiceUrl] = useState("http://127.0.0.1:3080");
@@ -119,13 +119,19 @@ export default function App() {
const runtimeInfo = await invoke<{ service_url: string }>("get_runtime_info");
setServiceUrl(runtimeInfo.service_url);
+ // 已安装过则跳过安装界面,避免每次启动都闪现“正在安装依赖...”
+ const config = await invoke<{ installed: boolean }>("get_app_config");
+
// 1. Install dependencies (Node runtime + harness package).
- setStatus("installing");
- setInstaller({ ...initialInstaller, title: t("status.installing") });
+ if (!config.installed) {
+ setStatus("installing");
+ setInstaller({ ...initialInstaller, title: t("status.installing") });
+ }
await invoke("install_dependencies");
// 2. Launch + health check.
setStatus("starting");
+ setInstaller((prev) => ({ ...prev, title: t("status.starting") }));
await invoke("launch_harness");
setServiceRunning(true);
diff --git a/src/components/SetupScreen.tsx b/src/components/SetupScreen.tsx
index 1110fe70..9b229724 100644
--- a/src/components/SetupScreen.tsx
+++ b/src/components/SetupScreen.tsx
@@ -1,6 +1,6 @@
import { useI18n } from "../i18n/context";
-export type SetupStatus = "installing" | "starting" | "ready" | "error";
+export type SetupStatus = "checking" | "installing" | "starting" | "ready" | "error";
export interface InstallProgress {
title: string;
@@ -39,10 +39,16 @@ export default function SetupScreen({
onRetry,
}: SetupScreenProps) {
const { t } = useI18n();
- const loading = status === "starting";
+ const loading = status === "checking" || status === "starting";
const error = status === "error";
- const heading = error ? t("status.error") : title;
- const description = error ? "" : detail || t("status.installing");
+ const defaultText =
+ status === "checking"
+ ? t("status.checking")
+ : status === "starting"
+ ? t("status.starting")
+ : t("status.installing");
+ const heading = error ? t("status.error") : title || defaultText;
+ const description = error ? "" : detail || defaultText;
const visibleLogs = logs.length ? logs : [t("ui.waiting_logs")];
return (