diff --git a/chat-core.js b/chat-core.js index 5bea25a..d0547ce 100644 --- a/chat-core.js +++ b/chat-core.js @@ -15,11 +15,11 @@ async function apiFetch(url, options = {}, { timeoutMs = 45000 } = {}) { } window.apiFetch = apiFetch; -// Load global AI instructions from external text file -window.aiInstructions = ""; -window.aiInstructionPromise = fetch("ai-instruct.txt") - .then(res => res.text()) - .then(text => { window.aiInstructions = text; }) +// Load global AI instructions from external markdown file +window.aiInstructions = ""; +window.aiInstructionPromise = fetch("ai-instruct.md") + .then(res => res.text()) + .then(text => { window.aiInstructions = text; }) .catch(err => { console.error("Failed to load AI instructions", err); window.aiInstructions = ""; @@ -464,13 +464,13 @@ document.addEventListener("DOMContentLoaded", () => { chatBox.scrollTop = chatBox.scrollHeight; if (!window.aiInstructions) { - try { - const res = await fetch("ai-instruct.txt", { cache: "no-store" }); - window.aiInstructions = await res.text(); - } catch (e) { - window.aiInstructions = ""; - } - } + try { + const res = await fetch("ai-instruct.md", { cache: "no-store" }); + window.aiInstructions = await res.text(); + } catch (e) { + window.aiInstructions = ""; + } + } const messages = []; if (window.aiInstructions) {