better code indentation
This commit is contained in:
parent
19565ec7c5
commit
85dfb36291
1 changed files with 211 additions and 203 deletions
|
|
@ -337,6 +337,7 @@ async function openChatGPT(promptText, action, curr_tabId, prompt_name = '', do_
|
|||
|
||||
switch(prefs.connection_type){
|
||||
case 'chatgpt_web':
|
||||
{
|
||||
// We are using the ChatGPT web interface
|
||||
|
||||
let rand_call_id = '_chatgptweb_' + generateCallID();
|
||||
|
|
@ -435,9 +436,11 @@ async function openChatGPT(promptText, action, curr_tabId, prompt_name = '', do_
|
|||
|
||||
browser.runtime.onMessage.addListener(listener);
|
||||
await browser.windows.create(win_options);
|
||||
}
|
||||
break; // chatgpt_web - END
|
||||
|
||||
case 'chatgpt_api':
|
||||
{
|
||||
// We are using the ChatGPT API
|
||||
|
||||
let rand_call_id2 = '_openai_' + generateCallID();
|
||||
|
|
@ -484,10 +487,11 @@ async function openChatGPT(promptText, action, curr_tabId, prompt_name = '', do_
|
|||
}
|
||||
|
||||
await browser.windows.create(win_options2);
|
||||
|
||||
}
|
||||
break; // chatgpt_api - END
|
||||
|
||||
case 'google_gemini_api':
|
||||
{
|
||||
// We are using the Google Gemini API
|
||||
|
||||
let rand_call_id5 = '_google_gemini_' + generateCallID();
|
||||
|
|
@ -534,10 +538,11 @@ async function openChatGPT(promptText, action, curr_tabId, prompt_name = '', do_
|
|||
}
|
||||
|
||||
await browser.windows.create(win_options5);
|
||||
|
||||
}
|
||||
break; // google_gemini_api - END
|
||||
|
||||
case 'ollama_api':
|
||||
{
|
||||
// We are using the Ollama API
|
||||
|
||||
taLog.log("Ollama API window opening...");
|
||||
|
|
@ -592,9 +597,11 @@ async function openChatGPT(promptText, action, curr_tabId, prompt_name = '', do_
|
|||
|
||||
await browser.windows.create(win_options3);
|
||||
|
||||
}
|
||||
break; // ollama_api - END
|
||||
|
||||
case 'openai_comp_api':
|
||||
{
|
||||
// We are using the OpenAI Comp API
|
||||
|
||||
let rand_call_id4 = '_openai_comp_api_' + generateCallID();
|
||||
|
|
@ -642,8 +649,9 @@ async function openChatGPT(promptText, action, curr_tabId, prompt_name = '', do_
|
|||
}
|
||||
|
||||
await browser.windows.create(win_options4);
|
||||
|
||||
}
|
||||
break; // openai_comp_api - END
|
||||
|
||||
default:
|
||||
taLog.error("Unknown API connection type: " + prefs.connection_type);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue