fix(agents): honor download source for update checks

This commit is contained in:
zipg authored and GitHub committed 2026-08-03 19:18:52 +08:00
1 parent e4d22904ed
commit 35535be419
4 files changed
+31 -37

No files matched your search

+2 -3
View File
@@ -1,7 +1,6 @@
<script setup lang="ts">
import { ref, computed, watch, onMounted, onUnmounted, nextTick, defineAsyncComponent } from "vue";
import { useI18n } from "vue-i18n";
import { invoke } from "@tauri-apps/api/core";
import { ChevronsRight } from "@lucide/vue";
import { TooltipProvider } from "@/components/ui/tooltip";
import AppToolbar from "@/components/layout/AppToolbar.vue";
@@ -86,7 +85,7 @@ import { buildAppendedEditorSql } from "@/lib/ai/aiSqlAppend";
import { assessProductionSql } from "@/lib/database/productionSafety";
import { executeWithProductionSqlGuard } from "@/lib/database/productionExecutionGuard";
import { buildHistoryAiAnalysisPrompt } from "@/lib/history/historyAiAnalysis";
import { countAvailableAgentDriverUpdates, type AgentDriverUpdateBadgeState } from "@/lib/connection/agentDriverUpdateBadge";
import { countAvailableAgentDriverUpdates } from "@/lib/connection/agentDriverUpdateBadge";
import type { DriverStoreFocus } from "@/lib/connection/agentDriverInstallHint";
import { safeLocalStorageGet, safeLocalStorageSet } from "@/lib/backend/safeStorage";
import { apiUrl, webPath } from "@/lib/common/webPath";
@@ -245,7 +244,7 @@ function updateAgentDriverUpdateCount(count: number) {
async function refreshAgentDriverUpdateCount() {
if (!isDesktop || !settingsStore.editorSettings.updateNotificationsEnabled) return;
try {
const drivers = await invoke<AgentDriverUpdateBadgeState[]>("list_installed_agents");
const drivers = await api.listInstalledAgents();
if (!settingsStore.editorSettings.updateNotificationsEnabled) return;
updateAgentDriverUpdateCount(countAvailableAgentDriverUpdates(drivers));
} catch {