25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
fix(mcp): update pnpm-installed MCP server with @latest
zipg49b6347c4ab7
diff --git a/src-tauri/src/commands/mcp.rs b/src-tauri/src/commands/mcp.rsindex 02624a08c9..a71015ed5c 100644--- a/src-tauri/src/commands/mcp.rs+++ b/src-tauri/src/commands/mcp.rs@@ -177,14 +177,20 @@ impl NodeRuntime {fn install_or_update(&self) -> Result<CommandOutput, String> {match self.mcp_installation.as_ref().map(|installation| &installation.package_manager) {+ // `pnpm update -g <pkg>` only moves inside the range recorded in the+ // global manifest, while `pnpm add -g <pkg>@<version>` records an exact+ // version there (`"1.3.0"` / `"0.4.98"`, checked with pnpm 11.22). For+ // those installs every "update" re-resolved the pinned version, so the+ // update badge never went away (#9687). Pin `@latest` here exactly like+ // the npm and bun paths do.Some(McpPackageManager::Pnpm { command_path, pnpm_home, global_dir }) => {let global_dir = global_dir.as_os_str().to_os_string();run_package_manager_command(command_path,&[- OsString::from("update"),+ OsString::from("add"),OsString::from("-g"),- OsString::from(MCP_PACKAGE_NAME),+ OsString::from("@dbx-app/mcp-server@latest"),OsString::from("--global-dir"),global_dir,],@@ -2750,7 +2756,9 @@ mod tests {let update_output = probed.install_or_update().unwrap();assert!(update_output.success);let pnpm_log = std::fs::read_to_string(&pnpm_log_path).unwrap();- assert!(pnpm_log.contains("ARGS=update -g @dbx-app/mcp-server --global-dir"));+ // `add ...@latest` (not `update -g`) so an exact pin in the pnpm global+ // manifest cannot keep re-installing the version that is already there.+ assert!(pnpm_log.contains("ARGS=add -g @dbx-app/mcp-server@latest --global-dir"));assert!(pnpm_log.contains(global_dir.to_string_lossy().as_ref()));assert!(!pnpm_log.contains("--registry"));assert!(pnpm_log.contains(&format!("PNPM_HOME={}", pnpm_home.display())));