diff --git a/android/src/screens/ChatScreen.tsx b/android/src/screens/ChatScreen.tsx index ea9035e..c0933ca 100644 --- a/android/src/screens/ChatScreen.tsx +++ b/android/src/screens/ChatScreen.tsx @@ -95,6 +95,9 @@ interface ChatMessage { category?: string; pinned: boolean; preview?: string; + /** Was passiert ist: angelegt / geaendert / geloescht. Default created + * fuer Rueckwaerts-Kompatibilitaet mit aelteren Events. */ + action?: 'created' | 'updated' | 'deleted'; attachments?: Array<{ name: string; mime?: string; @@ -560,6 +563,7 @@ const ChatScreen: React.FC = () => { category: p.category ? String(p.category) : undefined, pinned: !!p.pinned, preview: p.content_preview ? String(p.content_preview) : undefined, + action: (p.action === 'updated' || p.action === 'deleted') ? p.action : 'created', attachments: atts.length ? atts : undefined, }, }; @@ -1326,10 +1330,17 @@ const ChatScreen: React.FC = () => { const m = item.memorySaved; const catPart = m.category ? ` · [${m.category}]` : ''; const atts = m.attachments || []; + const action = m.action || 'created'; + const headline = + action === 'updated' ? '🧠 ARIA hat eine Notiz geändert' : + action === 'deleted' ? '🧠 ARIA hat eine Notiz gelöscht' : + '🧠 ARIA hat etwas gemerkt'; + const headlineColor = action === 'deleted' ? '#FF6B6B' : '#FFD60A'; + const borderColor = action === 'deleted' ? '#FF6B6B' : '#FFD60A'; return ( - - - {'🧠 ARIA hat etwas gemerkt'} + + + {headline} {m.title} diff --git a/aria-brain/agent.py b/aria-brain/agent.py index 08ca8eb..2aa0f86 100644 --- a/aria-brain/agent.py +++ b/aria-brain/agent.py @@ -672,6 +672,7 @@ class Agent: saved = self.store.get(pid) self._pending_events.append({ "type": "memory_saved", + "action": "updated", "memory": { "id": saved.id, "type": saved.type, "title": saved.title, "content_preview": (saved.content or "")[:140], @@ -734,6 +735,7 @@ class Agent: saved = self.store.get(pid) self._pending_events.append({ "type": "memory_saved", + "action": "created", "memory": { "id": saved.id, "type": saved.type, "title": saved.title, "content_preview": (saved.content or "")[:140], diff --git a/bridge/aria_bridge.py b/bridge/aria_bridge.py index 0e464e9..f24556d 100644 --- a/bridge/aria_bridge.py +++ b/bridge/aria_bridge.py @@ -2647,9 +2647,12 @@ class ARIABridge: "timestamp": int(asyncio.get_event_loop().time() * 1000), }) elif etype == "memory_saved": + mem = event.get("memory", {}) + if event.get("action"): + mem = {**mem, "action": event.get("action")} await self._send_to_rvs({ "type": "memory_saved", - "payload": event.get("memory", {}), + "payload": mem, "timestamp": int(asyncio.get_event_loop().time() * 1000), }) except Exception: