From 38264f9f8946a4896dae69505b8fb769c74be710 Mon Sep 17 00:00:00 2001 From: Patrick Niemeyer Date: Wed, 18 Dec 2024 23:15:31 -0600 Subject: [PATCH] gai: Tweak logging. --- gai-frontend/lib/chat/scripting/chat_scripting.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gai-frontend/lib/chat/scripting/chat_scripting.dart b/gai-frontend/lib/chat/scripting/chat_scripting.dart index 260061991..872dbe275 100644 --- a/gai-frontend/lib/chat/scripting/chat_scripting.dart +++ b/gai-frontend/lib/chat/scripting/chat_scripting.dart @@ -89,7 +89,7 @@ class ChatScripting { final String script; try { script = await instance.loadScriptFromURL(url!); - onScriptLoaded("Script loaded from URL: $url"); + // onScriptLoaded("Script loaded from URL: $url"); setScript(script); } catch (e) { log("Failed to load script from URL: $e"); @@ -143,7 +143,11 @@ class ChatScripting { throw Exception("No script to evaluate."); } evaluateJS(script!); // We could get a result back async here if needed - onScriptLoaded("Script installed."); + if (url != null) { + onScriptLoaded("Script loaded from URL: ${url!.truncate(32)}"); + } else { + onScriptLoaded("Script loaded."); + } } catch (e, stack) { log("Failed to evaluate script: $e"); log(stack.toString());