Implement chat session notification badges using new VS Code badge API#7644
Closed
Implement chat session notification badges using new VS Code badge API#7644
Conversation
Co-authored-by: osortega <48293249+osortega@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement chat session notification badges using new VS Code badge API
Implement chat session notification badges using new VS Code badge API
Aug 22, 2025
Member
|
@osortega I haven't looked at the code, but I expect this needs to be done in core. From an extension, you need to be the one to create the tree-view in order to put a badge on it. |
Contributor
|
@copilot Add more test |
Copilot stopped work on behalf of
osortega due to an error
August 26, 2025 01:49
Member
|
Closing as part of debt week. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
globalStateAPI with keycopilot.viewedSessions3. Real-time Updates
onDidChangeSessionBadgesevent fires when badge state changesrefreshChatSessions()flow4. Backward Compatibility
Implementation Details
API Extensions
Extended the
ChatSessionIteminterface 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.comnode ./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.