diff --git a/src/ui.js b/src/ui.js index 82bc921..becf7a3 100644 --- a/src/ui.js +++ b/src/ui.js @@ -1,7 +1,7 @@ // UI creation and management functionality import { marked } from "https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js"; import hljs from "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/es/highlight.min.js"; -import { API_KEY, setSystemMessageAppend, TTS_API_URL } from "./config.js"; +import { API_KEY, setSystemMessageAppend, TTS_API_URL, getAPIConfig } from "./config.js"; import { extractWebpageContent } from "./content.js"; import { detectPageLanguage } from "./language-detection.js"; import { speakText } from "./tts.js"; @@ -114,8 +114,7 @@ function addCodeBlockCopyButtons(element) { // Send message with custom history (for intro generation) async function* sendMessageWithCustomHistory(messageHistory) { - // Dynamically import API configuration to avoid caching issues - const { getAPIConfig } = await import("./config.js"); + // Get API configuration (custom or default) const apiConfig = getAPIConfig(); let apiUrl, headers, model;