fix(connection): hide installed driver hint

This commit is contained in:
t8y2
2026-05-14 01:10:01 +08:00
parent 05effc8edf
commit 433297e549
3 changed files with 54 additions and 2 deletions
+15
View File
@@ -0,0 +1,15 @@
import type { DatabaseType } from "@/types/database";
import { supportsDriverManagement } from "./databaseCapabilities";
export interface AgentDriverInstallState {
db_type: string;
installed: boolean;
}
export function showAgentDriverInstallHint(
dbType: DatabaseType | undefined,
drivers: readonly AgentDriverInstallState[],
): boolean {
if (!supportsDriverManagement(dbType)) return false;
return drivers.find((driver) => driver.db_type === dbType)?.installed !== true;
}