fixed even more stuff...trust me you'll love it

This commit is contained in:
xssdoctor 2024-03-31 21:31:45 -04:00
parent fe74efde71
commit 3121730102
3 changed files with 5 additions and 0 deletions

View File

@ -165,6 +165,8 @@ function saveApiKeys(openAIKey, claudeKey) {
} }
fs.writeFileSync(envFilePath, envContent.trim()); fs.writeFileSync(envFilePath, envContent.trim());
loadApiKeys();
win.webContents.send("reload-app");
} }
function updateOrAddKey(envContent, keyName, keyValue) { function updateOrAddKey(envContent, keyName, keyValue) {

View File

@ -173,6 +173,7 @@ document.addEventListener("DOMContentLoaded", async function () {
() => { () => {
// Reload the app // Reload the app
loadModels(); loadModels();
location.reload();
}; };
// Submit button click handler // Submit button click handler
@ -206,6 +207,8 @@ document.addEventListener("DOMContentLoaded", async function () {
configSection.classList.add("hidden"); configSection.classList.add("hidden");
openaiApiKeyInput.value = ""; openaiApiKeyInput.value = "";
claudeApiKeyInput.value = ""; claudeApiKeyInput.value = "";
// Reload the models
loadModels();
}) })
.catch((err) => { .catch((err) => {
console.error("Error saving API keys:", err); console.error("Error saving API keys:", err);