From b57375b46b391d3f92459a15f85961acf7bf795a Mon Sep 17 00:00:00 2001 From: mic Date: Sun, 29 Sep 2024 23:23:24 +0200 Subject: [PATCH] more logs added. see #143 --- api_webchat/controller.js | 4 ++-- mzta-background.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api_webchat/controller.js b/api_webchat/controller.js index 09bb761d..a2960369 100644 --- a/api_webchat/controller.js +++ b/api_webchat/controller.js @@ -93,7 +93,7 @@ switch (llm) { messageInput.setModel(prefs_api.ollama_model); messagesArea.setLLMName("Ollama Local"); worker.postMessage({ type: 'init', ollama_host: prefs_api.ollama_host, ollama_model: prefs_api.ollama_model, i18nStrings: i18nStrings}); - console.log("(>>>>>> [ThunderAI] Ollama init done."); + console.log(">>>>>> [ThunderAI] Ollama init done."); try{ messagesArea.appendUserMessage(browser.i18n.getMessage("ollama_api_connecting") + " \"" + prefs_api.ollama_host + "\" " +browser.i18n.getMessage("AndModel") + " \"" + prefs_api.ollama_model + "\"...", "info"); }catch(e){ @@ -142,7 +142,7 @@ worker.onmessage = function(event) { // handling commands from the backgound page browser.runtime.onMessage.addListener((message, sender, sendResponse) => { - //console.log(">>>>>>>>>>>>> controller.js onMessage: " + JSON.stringify(message)); + console.log(">>>>>>>>>>>>> controller.js onMessage: " + JSON.stringify(message)); switch (message.command) { case "api_send": //send the received prompt to the llm api diff --git a/mzta-background.js b/mzta-background.js index 14e0bbd3..ef70b65b 100644 --- a/mzta-background.js +++ b/mzta-background.js @@ -386,7 +386,7 @@ async function openChatGPT(promptText, action, curr_tabId, prompt_name = '', do_ await browser.tabs.sendMessage(createdTab3.id, { command: "api_error", error: browser.i18n.getMessage('ollama_empty_model')}); return; } - + console.log(">>>>>> [ThunderAI] Ollama API about to send message to createdTab3.id: " + createdTab3.id); await 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!'); browser.runtime.onMessage.removeListener(listener3);