refactor: add debounce to optimize config updates and provider refresh handling

This commit is contained in:
wonfen
2025-05-25 21:34:48 +08:00
parent d3dbc11b1b
commit af1689ee07
7 changed files with 207 additions and 21 deletions

View File

@@ -198,6 +198,11 @@ export const getProxyProviders = async () => {
const response = await invoke<{
providers: Record<string, IProxyProviderItem>;
}>("get_providers_proxies");
if (!response || !response.providers) {
console.warn("getProxyProviders: Invalid response structure, returning empty object");
return {};
}
const providers = response.providers as Record<string, IProxyProviderItem>;
return Object.fromEntries(