Skip to content

feat: implement notification service for SSE events#329

Draft
markijbema wants to merge 1 commit intodevfrom
mark/implement-notifications
Draft

feat: implement notification service for SSE events#329
markijbema wants to merge 1 commit intodevfrom
mark/implement-notifications

Conversation

@markijbema
Copy link
Contributor

Implements VS Code notifications for agent completion, errors, and permission requests based on user settings.

Changes

New: src/services/notification-service.ts

  • NotificationService class that subscribes to SSE events via KiloConnectionService.onEvent()
  • Reads notification settings from VS Code configuration (kilo-code.new.notifications.*)
  • session.idle → shows info notification when agent completes (skips child sessions)
  • session.error → shows warning notification on session errors (skips child sessions)
  • permission.asked → shows info notification with "Go to Session" action button (5s cooldown per session)
  • Caches SessionInfo from session.created/session.updated events to resolve parentID

Modified: src/services/cli-backend/types.ts

  • Added session.error event type to SSEEvent union

Modified: src/services/cli-backend/connection-service.ts

  • Added session.error to resolveEventSessionId() switch

Modified: src/extension.ts

  • Instantiates NotificationService and adds it to dispose chain

Settings consumed (already defined in package.json)

  • kilo-code.new.notifications.agent — notify on agent completion
  • kilo-code.new.notifications.permissions — notify on permission requests
  • kilo-code.new.notifications.errors — notify on errors

Sound settings (sounds.*) are not consumed — VS Code has no native sound API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant