using the api_active option
This commit is contained in:
parent
fe2ed3c00c
commit
fda0378d08
1 changed files with 54 additions and 47 deletions
|
|
@ -146,6 +146,9 @@ async function openChatGPT(promptText, action, curr_tabId, prompt_name = '', do_
|
|||
browser.tabs.sendMessage(curr_tabId, { command: "promptTooLong" });
|
||||
return;
|
||||
}
|
||||
|
||||
if(!prefs.api_active){
|
||||
// We are using the ChatGPT web interface
|
||||
let newWindow = await browser.windows.create({
|
||||
url: "https://chatgpt.com",
|
||||
type: "popup",
|
||||
|
|
@ -195,6 +198,10 @@ async function openChatGPT(promptText, action, curr_tabId, prompt_name = '', do_
|
|||
.catch(err => {
|
||||
console.error("[ThunderAI] Error injecting the script: ", err);
|
||||
});
|
||||
}else{
|
||||
// We are using the ChatGPT API
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function checkScreenDimensions(prefs){
|
||||
|
|
|
|||
Loading…
Reference in a new issue