From 9238f0cfa0e76da87eda890ce7309532f3565e1f Mon Sep 17 00:00:00 2001 From: ellvix Date: Wed, 4 Dec 2024 23:18:10 -0700 Subject: [PATCH] fix: fixed LLM beep queue for verified method --- src/js/constants.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/js/constants.js b/src/js/constants.js index 35604908d..e74b47e6a 100644 --- a/src/js/constants.js +++ b/src/js/constants.js @@ -1222,7 +1222,7 @@ class Menu { document .getElementById('gemini_multi_container') .classList.add('hidden'); - document.getElementById('openai_multi').checked = true; + document.getElementById('openai_multi').checked = true; // refactor note: this hidden checkbox stuff is stupid and should be removed. We're sorta replacing with the visible checkboxes. document.getElementById('gemini_multi').checked = false; } else if (e.target.value == 'gemini') { document @@ -1566,8 +1566,12 @@ class Menu { }); constants.LLMPreferences = document.getElementById('LLM_preferences').value; - constants.LLMOpenAiMulti = document.getElementById('openai_multi').checked; - constants.LLMGeminiMulti = document.getElementById('gemini_multi').checked; + constants.LLMOpenAiMulti = + document.getElementById('LLM_model_openai').checked; + constants.LLMGeminiMulti = + document.getElementById('LLM_model_gemini').checked; + constants.LLMClaudeMulti = + document.getElementById('LLM_model_claude').checked; constants.autoInitLLM = document.getElementById('init_llm_on_load').checked; // aria @@ -1797,6 +1801,7 @@ class ChatLLM { this.firstMulti = true; this.firstOpen = true; this.shown = false; + this.awaitingNumChats = 0; this.CreateComponent(); this.SetEvents(); if (constants.autoInitLLM) { @@ -2204,7 +2209,7 @@ class ChatLLM { let inprogressFreq = freq * 2; if (onoff) { - // if turning on, clear old intervals and timeouts + // if turning on clear old intervals and timeouts if (constants.waitingInterval) { // destroy old waiting sound clearInterval(constants.waitingInterval); @@ -2255,8 +2260,12 @@ class ChatLLM { if (constants.LLMOpenAiMulti) { constants.waitingQueue++; } + if (constants.LLMClaudeMulti) { + constants.waitingQueue++; + } } } + console.log('waiting queue: ' + constants.waitingQueue); } /** * Overrides and kills all waiting sounds for LLM @@ -3256,7 +3265,7 @@ class Tracker { * @param {Object} data - The data to be saved. */ async SaveTrackerData(data) { - console.log('about to save data', data); + //console.log('about to save data', data); if (this.isLocal) { localStorage.setItem(constants.project_id, JSON.stringify(data)); } else { @@ -3275,7 +3284,7 @@ class Tracker { } const result = await response.json(); - console.log('Data saved successfully:', result); + //console.log('Data saved successfully:', result); return result; } catch (error) { console.error('Error saving data:', error);