log messages fixed
This commit is contained in:
parent
66ba79833a
commit
e833911867
1 changed files with 2 additions and 3 deletions
|
|
@ -357,11 +357,11 @@ async function openChatGPT(promptText, action, curr_tabId, prompt_name = '', do_
|
||||||
function handleOllamaApi(createdTab3) {
|
function handleOllamaApi(createdTab3) {
|
||||||
taLog.log("Ollama API window ready.");
|
taLog.log("Ollama API window ready.");
|
||||||
taLog.log("message.window_id: " + message.window_id)
|
taLog.log("message.window_id: " + message.window_id)
|
||||||
taLog.log(">>>>>> createdTab3.id: " + createdTab3.id)
|
taLog.log("createdTab3.id: " + createdTab3.id)
|
||||||
// let mailMessage3 = await browser.messageDisplay.getDisplayedMessage(curr_tabId);
|
// let mailMessage3 = await browser.messageDisplay.getDisplayedMessage(curr_tabId);
|
||||||
let mailMessageId3 = -1;
|
let mailMessageId3 = -1;
|
||||||
if(mailMessage) mailMessageId3 = mailMessage.id;
|
if(mailMessage) mailMessageId3 = mailMessage.id;
|
||||||
taLog.log(">>>>>> mailMessageId3: " + mailMessageId3)
|
taLog.log("mailMessageId3: " + mailMessageId3)
|
||||||
|
|
||||||
// check if the config is present, or give a message error
|
// check if the config is present, or give a message error
|
||||||
if (prefs.ollama_host == '') {
|
if (prefs.ollama_host == '') {
|
||||||
|
|
@ -372,7 +372,6 @@ async function openChatGPT(promptText, action, curr_tabId, prompt_name = '', do_
|
||||||
browser.tabs.sendMessage(createdTab3.id, { command: "api_error", error: browser.i18n.getMessage('ollama_empty_model')});
|
browser.tabs.sendMessage(createdTab3.id, { command: "api_error", error: browser.i18n.getMessage('ollama_empty_model')});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(">>>>>> [ThunderAI] Ollama API about to send message to createdTab3.id: " + createdTab3.id);
|
|
||||||
browser.tabs.sendMessage(createdTab3.id, { command: "api_send", prompt: promptText, action: action, tabId: curr_tabId, mailMessageId: mailMessageId3, do_custom_text: do_custom_text});
|
browser.tabs.sendMessage(createdTab3.id, { command: "api_send", prompt: promptText, action: action, tabId: curr_tabId, mailMessageId: mailMessageId3, do_custom_text: do_custom_text});
|
||||||
taLog.log('[Ollama API] Connection succeded!');
|
taLog.log('[Ollama API] Connection succeded!');
|
||||||
browser.runtime.onMessage.removeListener(listener3);
|
browser.runtime.onMessage.removeListener(listener3);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue