diff --git a/src/App.tsx b/src/App.tsx index 9025499..3fd7737 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -114,7 +114,7 @@ function App() { unlisten(); } }; - }, [activeApp, isAutoSyncEnabled]); // 依赖自动同步状态,确保拿到最新开关 + }, [activeApp, isAutoSyncEnabled]); const loadProviders = async () => { const loadedProviders = await window.api.getProviders(activeApp); @@ -183,7 +183,7 @@ function App() { }); }; - // 同步Codex供应商到VS Code设置 + // 同步Codex供应商到VS Code设置(静默覆盖) const syncCodexToVSCode = async (providerId: string, silent = false) => { try { const status = await window.api.getVSCodeSettingsStatus(); diff --git a/src/components/SettingsModal.tsx b/src/components/SettingsModal.tsx index e183e29..e4f5b42 100644 --- a/src/components/SettingsModal.tsx +++ b/src/components/SettingsModal.tsx @@ -11,7 +11,6 @@ import { getVersion } from "@tauri-apps/api/app"; import "../lib/tauri-api"; import { relaunchApp } from "../lib/updater"; import { useUpdate } from "../contexts/UpdateContext"; -import { useVSCodeAutoSync } from "../hooks/useVSCodeAutoSync"; import type { Settings } from "../types"; interface SettingsModalProps { @@ -29,7 +28,6 @@ export default function SettingsModal({ onClose }: SettingsModalProps) { const [showUpToDate, setShowUpToDate] = useState(false); const { hasUpdate, updateInfo, updateHandle, checkUpdate, resetDismiss } = useUpdate(); - const { isAutoSyncEnabled, toggleAutoSync } = useVSCodeAutoSync(); useEffect(() => { loadSettings(); @@ -203,28 +201,7 @@ export default function SettingsModal({ onClose }: SettingsModalProps) { */} - {/* VS Code 自动同步设置 */} -