Fix: Move fetchModelsFromEndpoints import to top level to prevent initialization error

This commit is contained in:
Russell Ballestrini 2025-06-30 21:12:29 -04:00
parent ebb316fcf1
commit 57e29252cb

View file

@ -7,6 +7,7 @@ import { handleFileUpload, uploadFile, showProgressIndicator, hideProgressIndica
import { readPageWithHermes } from './page-reader.js';
import { handleUserInput, chatHistory } from './chat.js';
import { getPageSpecificKey } from './storage.js';
import { fetchModelsFromEndpoints } from './models.js';
// Configuration flags
const USE_CUSTOM_STYLING = window.UNCLOSEAI_CUSTOM_STYLING !== false;
@ -802,7 +803,6 @@ export async function openHermesModal() {
// Import necessary functions from other modules
const { loadConversationHistory, saveConversationHistory, clearConversationHistory } = await import('./storage.js');
const { fetchModelsFromEndpoints } = await import('./models.js');
const { extractWebpageContent } = await import('./content.js');
const { sendMessage } = await import('./chat.js');