diff --git a/core/config/ConfigHandler.ts b/core/config/ConfigHandler.ts index bd934777b..336c4b40b 100644 --- a/core/config/ConfigHandler.ts +++ b/core/config/ConfigHandler.ts @@ -606,6 +606,7 @@ export class ConfigHandler { } async loadConfig(): Promise> { + await this.isInitialized; if (!this.currentProfile) { return { config: undefined, @@ -613,7 +614,6 @@ export class ConfigHandler { configLoadInterrupted: true, }; } - await this.isInitialized; const config = await this.currentProfile.loadConfig( this.additionalContextProviders, ); diff --git a/gui/src/context/MockIdeMessenger.ts b/gui/src/context/MockIdeMessenger.ts index e7f78252d..58f6cc905 100644 --- a/gui/src/context/MockIdeMessenger.ts +++ b/gui/src/context/MockIdeMessenger.ts @@ -81,7 +81,34 @@ const DEFAULT_MOCK_CORE_RESPONSES: MockResponses = { ], profileId: "local", result: { - config: undefined, + config: { + tools: [], + slashCommands: [], + contextProviders: [], + mcpServerStatuses: [], + usePlatform: true, + modelsByRole: { + chat: [], + apply: [], + edit: [], + summarize: [], + autocomplete: [], + rerank: [], + embed: [], + subagent: [], + }, + selectedModelByRole: { + chat: null, + apply: null, + edit: null, + summarize: null, + autocomplete: null, + rerank: null, + embed: null, + subagent: null, + }, + rules: [], + }, errors: [], configLoadInterrupted: false, }, diff --git a/gui/src/hooks/ParallelListeners.tsx b/gui/src/hooks/ParallelListeners.tsx index e8cb96a95..2d50c702e 100644 --- a/gui/src/hooks/ParallelListeners.tsx +++ b/gui/src/hooks/ParallelListeners.tsx @@ -64,7 +64,7 @@ function ParallelListeners() { if (isInitial && hasDoneInitialConfigLoad.current) { return; } - if (configResult.configLoadInterrupted) { + if (configResult.configLoadInterrupted || !configResult.config) { return; } hasDoneInitialConfigLoad.current = true;