refactor: improve agent notification types and fix activity curator

- Convert agent notifications to discriminated union (session/permission/status)
- Fix activity curator to properly handle typed session updates
- Serialize Date objects in AgentInfo for JSON compatibility
- Use activity curator for title generation context
- Reduce console.error to console.warn for non-critical WebSocket errors
- Improve spacing in agent stream views
- Delay title generation until 15+ updates available
```
This commit is contained in:
Mohamed Boudra
2025-10-23 09:01:38 +02:00
parent c6cdc09a0b
commit 0893a9dc33
11 changed files with 319 additions and 229 deletions
+2 -2
View File
@@ -48,7 +48,7 @@ export function useWebSocket(url: string, conversationId?: string | null): UseWe
};
ws.onerror = (error) => {
console.error('[WS] Error:', error);
console.warn('[WS] Error:', error);
};
ws.onmessage = (event) => {
@@ -87,7 +87,7 @@ export function useWebSocket(url: string, conversationId?: string | null): UseWe
wsRef.current = ws;
} catch (err) {
console.error('[WS] Failed to create WebSocket:', err);
console.warn('[WS] Failed to create WebSocket:', err);
}
}, [url, conversationId]);