fix: Do not wait 5s before adding extensions to agent (#785)

This commit is contained in:
Alex Hancock
2025-01-25 23:22:05 -05:00
committed by GitHub
parent 9e3b2d1edb
commit 4404eaf3ed
+3 -8
View File
@@ -78,14 +78,9 @@ export const initializeSystem = async (provider: string, model: string) => {
console.log('initializing agent with provider', provider, 'model', model); console.log('initializing agent with provider', provider, 'model', model);
await addAgent(provider.toLowerCase(), model); await addAgent(provider.toLowerCase(), model);
// TODO - Needs to be replaced with something which can interface loadAndAddStoredExtensions().catch((error) => {
// with the agent to tell when it is ready to add extensions console.error('Failed to load and add stored extension configs:', error);
setTimeout(() => { });
window.electron.logInfo('Loading and adding stored extension configs');
loadAndAddStoredExtensions().catch((error) => {
console.error('Failed to load and add stored extension configs:', error);
});
}, 5000);
} catch (error) { } catch (error) {
console.error('Failed to initialize agent:', error); console.error('Failed to initialize agent:', error);
throw error; throw error;