upedated error messages
This commit is contained in:
parent
fda0378d08
commit
c22e6d4b5e
1 changed files with 3 additions and 3 deletions
|
|
@ -156,7 +156,7 @@ async function openChatGPT(promptText, action, curr_tabId, prompt_name = '', do_
|
||||||
height: prefs.chatgpt_win_height
|
height: prefs.chatgpt_win_height
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("[ThunderAI] Script started...");
|
console.log("[ThunderAI] ChatGPT web interface script started...");
|
||||||
createdWindowID = newWindow.id;
|
createdWindowID = newWindow.id;
|
||||||
const createdTab = newWindow.tabs[0];
|
const createdTab = newWindow.tabs[0];
|
||||||
|
|
||||||
|
|
@ -189,14 +189,14 @@ async function openChatGPT(promptText, action, curr_tabId, prompt_name = '', do_
|
||||||
|
|
||||||
browser.tabs.executeScript(createdTab.id, { code: pre_script + mzta_script, matchAboutBlank: false })
|
browser.tabs.executeScript(createdTab.id, { code: pre_script + mzta_script, matchAboutBlank: false })
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
console.log("[ThunderAI] Script injected successfully");
|
console.log("[ThunderAI] ChatGPT web interface script injected successfully");
|
||||||
let mailMessage = await browser.messageDisplay.getDisplayedMessage(curr_tabId);
|
let mailMessage = await browser.messageDisplay.getDisplayedMessage(curr_tabId);
|
||||||
let mailMessageId = -1;
|
let mailMessageId = -1;
|
||||||
if(mailMessage) mailMessageId = mailMessage.id;
|
if(mailMessage) mailMessageId = mailMessage.id;
|
||||||
browser.tabs.sendMessage(createdTab.id, { command: "chatgpt_send", prompt: promptText, action: action, tabId: curr_tabId, mailMessageId: mailMessageId});
|
browser.tabs.sendMessage(createdTab.id, { command: "chatgpt_send", prompt: promptText, action: action, tabId: curr_tabId, mailMessageId: mailMessageId});
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.error("[ThunderAI] Error injecting the script: ", err);
|
console.error("[ThunderAI] ChatGPT web interface error injecting the script: ", err);
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
// We are using the ChatGPT API
|
// We are using the ChatGPT API
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue