revert dynamic import: put getAPIConfig back to static import

This commit is contained in:
Russell Ballestrini 2025-07-11 00:03:57 -04:00
parent be508bcfb1
commit 35157b052b

View file

@ -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;