fix(connection): respect oracle driver profile hints

This commit is contained in:
t8y2
2026-05-23 08:35:45 +08:00
parent 5537fa1b3c
commit 370701a82b
4 changed files with 31 additions and 3 deletions
@@ -552,7 +552,7 @@ const canUseProxy = computed(
() => form.value.db_type !== "sqlite" && form.value.db_type !== "duckdb" && form.value.db_type !== "access",
);
const shouldShowAgentDriverInstallHint = computed(() =>
showAgentDriverInstallHint(form.value.db_type, agentDrivers.value),
showAgentDriverInstallHint(form.value.db_type, agentDrivers.value, selectedType.value),
);
const testResultMessage = computed(() => {
if (!testResult.value) return "";
@@ -9,7 +9,9 @@ export interface AgentDriverInstallState {
export function showAgentDriverInstallHint(
dbType: DatabaseType | undefined,
drivers: readonly AgentDriverInstallState[],
driverProfile?: string,
): boolean {
if (!supportsDriverManagement(dbType)) return false;
return drivers.find((driver) => driver.db_type === dbType)?.installed !== true;
const driverKey = dbType === "oracle" && driverProfile === "oracle-10g" ? "oracle-10g" : dbType;
return drivers.find((driver) => driver.db_type === driverKey)?.installed !== true;
}