- feat(vscode-sync): restore auto-sync logic and enable by default
- refactor(settings): remove the VS Code auto-sync toggle from Settings UI - feat(provider-list): enable auto-sync after "Apply to VS Code"; disable after "Remove" - chore(prettier): run Prettier on changed files - verify: typecheck and renderer build pass - Files - added: src/hooks/useVSCodeAutoSync.ts - modified: src/App.tsx - modified: src/components/ProviderList.tsx - modified: src/components/SettingsModal.tsx - Notes - Auto-sync now defaults to enabled for new users (stored in localStorage; existing saved state is respected). - No settings toggle is shown; manual Apply/Remove in the list still works as before.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user