fix(updates): sync update center state after manual component changes
This commit is contained in:
13 files changed
+143
-11
No files matched your search
@@ -50,6 +50,7 @@ describe("connectionStore SQL Server legacy compatibility", () => {
|
||||
connectDb,
|
||||
installAgent,
|
||||
isAgentInstalled: vi.fn().mockResolvedValue(false),
|
||||
listInstalledAgents: vi.fn().mockResolvedValue([]),
|
||||
}));
|
||||
|
||||
const { useConnectionStore } = await import("@/stores/connectionStore");
|
||||
@@ -81,6 +82,7 @@ describe("connectionStore SQL Server legacy compatibility", () => {
|
||||
connectDb,
|
||||
installAgent,
|
||||
isAgentInstalled: vi.fn().mockResolvedValue(true),
|
||||
listInstalledAgents: vi.fn().mockResolvedValue([]),
|
||||
}));
|
||||
|
||||
const { useConnectionStore } = await import("@/stores/connectionStore");
|
||||
|
||||
@@ -3,6 +3,7 @@ import { uuid } from "@/lib/common/utils";
|
||||
import { containsHan, orderedSubsequenceSpan, pinyinFirstLetters } from "@/lib/common/pinyin";
|
||||
import { ref, computed, watch, markRaw } from "vue";
|
||||
import { DEFAULT_QUERY_TIMEOUT_SECS } from "@/lib/connection/timeoutLimits";
|
||||
import { notifyComponentUpdatesChanged } from "@/lib/updates/componentUpdateEvents";
|
||||
import type {
|
||||
ColumnInfo,
|
||||
CompletionAssistantCandidate,
|
||||
@@ -3830,6 +3831,7 @@ export const useConnectionStore = defineStore("connection", () => {
|
||||
if (!requiresSqlServerLegacyCompatibilityComponent(config)) return;
|
||||
if (await api.isAgentInstalled(SQLSERVER_LEGACY_COMPATIBILITY_DRIVER_KEY)) return;
|
||||
await api.installAgent(SQLSERVER_LEGACY_COMPATIBILITY_DRIVER_KEY);
|
||||
notifyComponentUpdatesChanged();
|
||||
}
|
||||
|
||||
async function setDefaultDatabase(connectionId: string, database: string) {
|
||||
|
||||
Reference in new issue
Block a user