From ee712650b81a33da40c423a20e5a845ad59a9a1e Mon Sep 17 00:00:00 2001 From: mic Date: Thu, 12 Sep 2024 22:17:51 +0200 Subject: [PATCH] fixed red highlighting for model field when loading the option page --- options/mzta-options.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/options/mzta-options.js b/options/mzta-options.js index a5097944..f0d5b1df 100644 --- a/options/mzta-options.js +++ b/options/mzta-options.js @@ -206,11 +206,6 @@ document.addEventListener('DOMContentLoaded', async () => { document.querySelectorAll(".option-input").forEach(element => { element.addEventListener("change", saveOptions); }); - - showConnectionOptions(); - warn_ChatGPT_APIKeyEmpty(); - warn_Ollama_HostEmpty(); - warn_OpenAIComp_HostEmpty(); document.getElementById('btnManagePrompts').addEventListener('click', () => { // check if the tab is already there @@ -372,4 +367,10 @@ select_openai_comp_model.addEventListener("change", warn_OpenAIComp_HostEmpty); warn_OpenAIComp_HostEmpty(); }); + + showConnectionOptions(); + warn_ChatGPT_APIKeyEmpty(); + warn_Ollama_HostEmpty(); + warn_OpenAIComp_HostEmpty(); + }, { once: true });