Implement chat session notification badges using new VS Code badge API #7644
+167
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements notification badges for GitHub Copilot coding agent chat sessions to alert users when sessions are completed and need attention. The implementation assumes the VS Code core badge API has been implemented (badge and badgeTooltip properties on ChatSessionItem).
Overview
When coding agent sessions complete, users now see a visual badge indicator (●) next to the session in the chat sessions list. This helps users quickly identify which sessions have finished and need their review, improving the overall workflow experience.
Key Features
1. Badge Visual Indicators
2. Persistent State Management
globalState
API with keycopilot.viewedSessions
3. Real-time Updates
onDidChangeSessionBadges
event fires when badge state changesrefreshChatSessions()
flow4. Backward Compatibility
Implementation Details
API Extensions
Extended the
ChatSessionItem
interface invscode.proposed.chatSessionsProvider.d.ts
:Core Logic
The badge logic in
provideChatSessions()
method:State Management Methods
markSessionAsViewed(sessionId)
: Marks a session as viewed and removes badgehasUnviewedCompletion(sessionId)
: Checks if session has unviewed completiongetUnviewedSessionCount()
: Returns total count of unviewed sessionsTesting
Added focused unit tests covering:
Files Modified
src/@types/vscode.proposed.chatSessionsProvider.d.ts
: Extended interface with badge propertiessrc/github/copilotRemoteAgent.ts
: Core implementation with state managementsrc/test/github/copilotRemoteAgent.test.ts
: Unit tests for badge functionalityThis implementation provides a seamless user experience for tracking completed coding agent sessions while maintaining backward compatibility and clean integration with the existing codebase.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
update.code.visualstudio.com
node ./out/src/test/runTests.js
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.