fix: Do not wait 5s before adding extensions to agent (#785)
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user