Skip to content

Commit

Permalink
fix: fixed LLM beep queue for verified method (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellvix authored Dec 5, 2024
1 parent dbdc22f commit 148360f
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/js/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -2255,6 +2260,9 @@ class ChatLLM {
if (constants.LLMOpenAiMulti) {
constants.waitingQueue++;
}
if (constants.LLMClaudeMulti) {
constants.waitingQueue++;
}
}
}
}
Expand Down Expand Up @@ -3256,7 +3264,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 {
Expand All @@ -3275,7 +3283,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);
Expand Down

0 comments on commit 148360f

Please sign in to comment.