From 8ed500adf7b880696639c2eb330aec6aa3745b23 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Fri, 27 Mar 2026 20:17:59 +0100 Subject: [PATCH] Update notification service --- AppImage/components/notification-settings.tsx | 53 ++++++++++++------- AppImage/scripts/health_persistence.py | 2 +- AppImage/scripts/notification_channels.py | 2 +- 3 files changed, 37 insertions(+), 20 deletions(-) diff --git a/AppImage/components/notification-settings.tsx b/AppImage/components/notification-settings.tsx index 4f21a6bb..70425bf5 100644 --- a/AppImage/components/notification-settings.tsx +++ b/AppImage/components/notification-settings.tsx @@ -9,7 +9,6 @@ import { Label } from "./ui/label" import { Badge } from "./ui/badge" import { Button } from "./ui/button" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./ui/select" -import { Switch } from "./ui/switch" import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from "./ui/dialog" import { fetchApi } from "../lib/api-config" import { @@ -324,10 +323,10 @@ export function NotificationSettings() { openai: "", openrouter: "", }, - ai_prompt_mode: data.config.ai_prompt_mode || "default", - ai_custom_prompt: data.config.ai_custom_prompt || "", - ai_allow_suggestions: data.config.ai_allow_suggestions || "false", - } + ai_prompt_mode: data.config.ai_prompt_mode || "default", + ai_custom_prompt: data.config.ai_custom_prompt || "", + ai_allow_suggestions: data.config.ai_allow_suggestions || "false", + } // If ai_model exists but ai_models doesn't have it, save it if (configWithDefaults.ai_model && !configWithDefaults.ai_models[configWithDefaults.ai_provider]) { configWithDefaults.ai_models[configWithDefaults.ai_provider] = configWithDefaults.ai_model @@ -1853,23 +1852,41 @@ export function NotificationSettings() { {/* Experimental: AI Suggestions toggle */} -
+
-
- - - BETA +
+ +
+
+ AI Suggestions + BETA +
+

+ Allow AI to add brief troubleshooting tips based on log context +

+
- updateConfig(p => ({ ...p, ai_allow_suggestions: v ? "true" : "false" }))} +
-

- When enabled, AI may add brief troubleshooting tips based on journal log context. - Tips are factual and based only on what the logs show. -

)} diff --git a/AppImage/scripts/health_persistence.py b/AppImage/scripts/health_persistence.py index 70a81170..64a1fd68 100644 --- a/AppImage/scripts/health_persistence.py +++ b/AppImage/scripts/health_persistence.py @@ -1325,7 +1325,7 @@ class HealthPersistence: print(f"[HealthPersistence] Error recording UNKNOWN persistent: {e}") - # ──────────────────────────────────────────────────────────────── + # ──────��───────────────────────────────────────────────────────── # Disk Observations API # ──────────────────────────────────────────────────────────────── diff --git a/AppImage/scripts/notification_channels.py b/AppImage/scripts/notification_channels.py index e9b8dcf5..53ff059d 100644 --- a/AppImage/scripts/notification_channels.py +++ b/AppImage/scripts/notification_channels.py @@ -251,7 +251,7 @@ class TelegramChannel(NotificationChannel): .replace('>', '>')) -# ─── Gotify ───────────────────────────────────────��────────────── +# ─── Gotify ────────────────────────────────────────────────────── class GotifyChannel(NotificationChannel): """Gotify push notification channel with priority mapping."""