Notification Center
Aggregates events across the extension — git, MCP, agent, PR review, and more — into one queryable feed. Persisted to SQLite so it survives restarts.
Sources
Section titled “Sources”| Source | Examples |
|---|---|
| System | Activation, updates, config changes |
| Commands | Command execution results, errors |
| Git | Branch switches, merge conflicts, commit results |
| Chat | Model switches, context window warnings |
| MCP | Server connect/disconnect, tool registration |
| Model Manager | Model downloads, Ollama status changes |
| Workspace | File indexing progress, analysis completion |
| GitLab | Pipeline status, merge request updates |
| Jira | Issue status changes, assignments |
| PR Review | Review completion, comments, approval |
| Agent | Task completion, errors, checkpoint creation |
| Type | Icon color | Use case |
|---|---|---|
info | Blue | Operation completed successfully |
warning | Yellow | Attention needed — degraded perf, retries |
error | Red | Failure — intervention needed |
success | Green | Positive result — test passed, deploy succeeded |
30-second window. Same type + title combo within 30 s → the second notification is silently suppressed. Prevents flooding from rapid events (file watcher, retry loops).
Dedup map capped at 200 entries. Cap reached → stale entries (> 30 s old) pruned.
Storage
Section titled “Storage”SQLite via SqliteDatabaseService:
CREATE TABLE notifications ( id INTEGER PRIMARY KEY AUTOINCREMENT, type TEXT NOT NULL, title TEXT NOT NULL, message TEXT NOT NULL, source TEXT, read_status INTEGER DEFAULT 0, timestamp TEXT DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')));Notifications survive restarts, are SQL-queryable (by source, type, read status), and the webview loads the full history on panel open.
Auto-pruning
Section titled “Auto-pruning”Cap: 500 entries. Pruning runs at most once every 5 min:
- Count total.
- If > 500, delete oldest
(count − 500)entries. - Deletion uses subquery
ORDER BY timestamp ASC LIMIT ....
Add:
await notificationService.addNotification( "success", "Tests passed", "All 42 tests passed in 3.2s", NotificationSource.Agent,);Query:
const notifications = await notificationService.getNotifications(50);const unread = await notificationService.getUnreadCount();Mark:
await notificationService.markAsRead(notificationId);await notificationService.markAllAsRead();Events
Section titled “Events”onDidNotificationChange fires on add / read / clear. Webview panel subscribes for real-time updates.
Webview panel
Section titled “Webview panel”Chat UI subscribes to the event stream. Renders a scrollable list with source badges (color-coded), relative timestamps (“2 minutes ago”), read/unread indicators, dismiss, and “mark all as read”.