DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
fix(boot): skip install screen when runtime files already present
hairyf9774820d63b3
diff --git a/src-tauri/src/bridge/cmd.rs b/src-tauri/src/bridge/cmd.rsindex cdf976e5..1df2d7ae 100644--- a/src-tauri/src/bridge/cmd.rs+++ b/src-tauri/src/bridge/cmd.rs@@ -301,6 +301,19 @@ pub async fn get_runtime_info(app_handle: AppHandle) -> Result<config::RuntimeInOk(config::runtime_info(&app_handle, port))}+/// 运行时文件是否已全部在盘(Node / Dsh / pnpm 三件套,纯本地检查、无网络)。+///+/// 判定条件与 `install_dependencies` 的「启动自愈」捷径完全一致:桌面端自更新+/// (MSI 强杀进程)后 store 可能被复位或损坏显示「未安装」,但运行时文件其实+/// 已就绪——此时前端跳过安装/下载界面,交给 install_dependencies 内部自愈+/// 补记 installed 后直接启动,避免自动重开时闪现误导用户的安装界面。+#[tauri::command]+pub fn runtime_ready(app_handle: AppHandle) -> bool {+ download::Nodejs.check_installed(&app_handle)+ && download::Dsh.check_installed(&app_handle)+ && download::Pnpm.check_installed(&app_handle)+}+/// 当前桌面端配置#[tauri::command]pub async fn get_app_config(app_handle: AppHandle) -> Result<config::Setting, String> {diff --git a/src-tauri/src/desktop/builder.rs b/src-tauri/src/desktop/builder.rsindex 5b8ab7dc..85f5f90a 100644--- a/src-tauri/src/desktop/builder.rs+++ b/src-tauri/src/desktop/builder.rs@@ -189,6 +189,7 @@ pub fn handler() -> impl Fn(Invoke<Wry>) -> bool + Send + Sync + 'static {crate::bridge::cmd::get_dsh_plugins,crate::bridge::cmd::proxy_health_check,crate::bridge::cmd::get_runtime_info,+ crate::bridge::cmd::runtime_ready,crate::bridge::cmd::get_app_config,crate::bridge::cmd::update_app_config,crate::bridge::cmd::get_cli_link_status,diff --git a/src/store/modules/harness/store.ts b/src/store/modules/harness/store.tsindex 1d60a916..3d21f4b0 100644--- a/src/store/modules/harness/store.ts+++ b/src/store/modules/harness/store.ts@@ -279,10 +279,16 @@ export const harness = defineStore({installed: boolean}>('get_app_config')- // 仅首次使用需要检测环境/安装依赖;之后直接进入页面+ // 仅首次使用需要检测环境/安装依赖;之后直接进入页面。+ // 桌面端自更新(MSI 强杀进程)后 store 可能被复位/损坏显示未安装,+ // 但运行时文件已全部在盘——此时跳过安装/下载界面,install_dependencies+ // 内部自愈补记 installed 后直接启动,避免自动重开时闪现误导用户的界面。if (!config.installed) {- this.status = 'installing'- this.installer = { ...initialInstaller, title: i18next.t('status.installing') }+ const ready = await invoke<boolean>('runtime_ready')+ if (!ready) {+ this.status = 'installing'+ this.installer = { ...initialInstaller, title: i18next.t('status.installing') }+ }await invoke('install_dependencies')}