e || 'focused_iteration'
            };
            displayConfig(config);
        }
    } catch (error) {
        console.error('Error loading config:', error);
        // Use fallback display
        displayConfig({
            provider: 'Loading...',
            model: 'Loading...',
            search_tool: 'Loading...',
            iterations: '-'
        });
    }
}

function displayConfig(config) {
    const configDisplay = document.getElementById('config-display');
    configDisplay.innerHTML = `
   