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" });
|
browser.tabs.sendMessage(curr_tabId, { command: "promptTooLong" });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!prefs.api_active){
|
||||||
|
// We are using the ChatGPT web interface
|
||||||
let newWindow = await browser.windows.create({
|
let newWindow = await browser.windows.create({
|
||||||
url: "https://chatgpt.com",
|
url: "https://chatgpt.com",
|
||||||
type: "popup",
|
type: "popup",
|
||||||
|
|
@ -195,6 +198,10 @@ async function openChatGPT(promptText, action, curr_tabId, prompt_name = '', do_
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.error("[ThunderAI] Error injecting the script: ", err);
|
console.error("[ThunderAI] Error injecting the script: ", err);
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
// We are using the ChatGPT API
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkScreenDimensions(prefs){
|
function checkScreenDimensions(prefs){
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue