Agent Zero AI framework
notifications merge
frdel888f77dabbc2
diff --cc prompts/agent.system.tool.notify_user.mdindex 000000000,17f276e18..17f276e18mode 000000,100644..100644--- a/prompts/agent.system.tool.notify_user.md+++ b/prompts/agent.system.tool.notify_user.mddiff --cc prompts/fw.notify_user.notification_sent.mdindex 000000000,1452e202d..1452e202dmode 000000,100644..100644--- a/prompts/fw.notify_user.notification_sent.md+++ b/prompts/fw.notify_user.notification_sent.mddiff --cc python/api/poll.pyindex 5bab7a130,7c0eca049..f36291d47--- a/python/api/poll.py+++ b/python/api/poll.py@@@ -11,8 -11,9 +10,9 @@@ from python.helpers.dotenv import get_dclass Poll(ApiHandler):async def process(self, input: dict, request: Request) -> dict | Response:- ctxid = input.get("context", None)+ ctxid = input.get("context", "")from_no = input.get("log_from", 0)+ notifications_from = input.get("notifications_from", 0)# Get timezone from input (default to dotenv default or UTC if not provided)timezone = input.get("timezone", get_dotenv_value("DEFAULT_USER_TIMEZONE", "UTC"))diff --cc webui/index.htmlindex 9244b8577,a5d3d4032..0dd1fd49b--- a/webui/index.html+++ b/webui/index.html@@@ -17,9 -17,10 +17,10 @@@<link rel="stylesheet" href="css/history.css"><link rel="stylesheet" href="css/scheduler-datepicker.css"><link rel="stylesheet" href="css/tunnel.css">+ <link rel="stylesheet" href="css/notification.css"><!-- Font Awesome for icons -->- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">+ <link rel="stylesheet" href="vendor/font-awesome/all.min.css"><!-- Flatpickr for datetime picker --><link rel="stylesheet" href="vendor/flatpickr/flatpickr.min.css">@@@ -100,7 -101,9 +101,8 @@@<!-- Load module scripts first --><script type="module" src="js/scheduler.js"></script>- <script type="module" src="js/speech.js"></script><script type="module" src="js/history.js"></script>+<script type="module" src="index.js"></script><!-- Then load Alpine.js -->diff --cc webui/index.jsindex 8bf6ddfba,bee233b89..95b4d0e53--- a/webui/index.js+++ b/webui/index.js@@@ -23,9 -24,7 +23,9 @@@ const timeDate = document.getElementByIlet autoScroll = true;let context = "";+let resetCounter = 0;+let skipOneSpeech = false;- let connectionStatus = false;+ let connectionStatus = undefined; // undefined = not checked yet, true = connected, false = disconnected// Initialize the toggle buttonsetupSidebarToggle();@@@ -330,9 -337,9 +337,10 @@@ async function poll()// Get timezone from navigatorconst timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;+ const log_from = lastLogVersion;const response = await sendJsonData("/poll", {- log_from: lastLogVersion,+ log_from: log_from,+ notifications_from: notificationStore.lastNotificationVersion || 0,context: context || null,timezone: timezone,});diff --cc webui/js/tunnel.jsindex ad487751c,cd06374ec..f41249af0--- a/webui/js/tunnel.js+++ b/webui/js/tunnel.js@@@ -227,11 -202,8 +227,11 @@@ document.addEventListener('alpine:init'this.tunnelLink = data.tunnel_url;this.linkGenerated = true;+ // Generate QR code for the tunnel URL+ this.$nextTick(() => this.generateQRCode());+// Show success message to confirm creation- window.toast("Tunnel created successfully", "success", 3000);+ window.toastFrontendInfo("Tunnel created successfully", "Tunnel Status");} else {// The tunnel might still be starting up, check again after a delaythis.loadingText = 'Tunnel creation taking longer than expected...';@@@ -256,11 -228,7 +256,11 @@@localStorage.setItem('agent_zero_tunnel_url', statusData.tunnel_url);this.tunnelLink = statusData.tunnel_url;this.linkGenerated = true;++ // Generate QR code for the tunnel URL+ this.$nextTick(() => this.generateQRCode());+- window.toast("Tunnel created successfully", "success", 3000);+ window.toastFrontendInfo("Tunnel created successfully", "Tunnel Status");return;}} catch (statusError) {@@@ -369,10 -330,10 +369,10 @@@}).catch(err => {console.error('Failed to copy URL: ', err);- window.toast("Failed to copy tunnel URL", "error", 3000);+ window.toastFrontendError("Failed to copy tunnel URL", "Clipboard Error");// Show error state- copyButton.innerHTML = '<i class="fas fa-times"></i> Failed';+ copyButton.innerHTML = '<span class="icon material-symbols-outlined">close</span> Failed';copyButton.classList.add('copy-error');// Reset button after 2 seconds