Skip to content

Integrate chat session monitoring into existing Copilot status bar dashboard with performance optimizations #262221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 18, 2025

This PR integrates in-progress chat session monitoring into the existing Copilot status bar entry's hover dashboard, providing users with a unified view of all Copilot-related information while optimizing performance through intelligent caching.

Problem

Users currently have no visual indication of chat sessions that are actively processing in the background. Additionally, multiple UI components were making separate calls to chat session providers, leading to redundant operations and performance issues.

Solution

Integrated Dashboard Approach: Instead of adding a separate status bar entry, running chat sessions are now displayed within the existing 🤖 Copilot status bar entry's hover tooltip. This provides a cleaner, more unified user experience.

Running Sessions Section: The dashboard now includes a dedicated "Running Sessions" section that shows:

  • Individual sessions with spinning progress icons
  • Session names and "In progress" status
  • Summary count (e.g., "Working on 3 sessions")
  • Quick access to the Chat Sessions view via "View Sessions" button

Performance Optimization: Added intelligent 5-second caching to ChatSessionsService.provideChatSessionItems that:

  • Eliminates redundant provider calls when multiple consumers need session data
  • Automatically invalidates cache when providers fire onDidChangeChatSessionItems events
  • Provides significant performance benefits for extension-contributed providers that may perform expensive operations

Implementation Details

  • Unified UI: Extended ChatStatusDashboard in chatStatus.ts to include running sessions alongside existing quota and settings information
  • Clean Architecture: Removed the separate ChatSessionsStatusBarEntry to avoid UI clutter while preserving all functionality
  • Error Handling: Graceful degradation if individual providers fail, ensuring the dashboard remains functional
  • Responsive Design: Sessions appear automatically when active and disappear when complete

User Experience

Users now get a comprehensive view of all Copilot-related information in a single, well-organized hover tooltip. This makes it easier to monitor chat session progress, manage quotas, and adjust settings all from one central location.

![Chat Status Dashboard Integration](https://github.com/user-attachments/assets/0544b501-b92a-401f-ae73-d78d6990511e)

Files modified:

  • src/vs/workbench/contrib/chat/browser/chatStatus.ts - Extended dashboard with running sessions section
  • src/vs/workbench/contrib/chat/browser/chat.contribution.ts - Removed separate status bar entry registration
  • src/vs/workbench/contrib/chat/browser/chatSessions.contribution.ts - Added caching to ChatSessionsService
  • src/vs/workbench/contrib/chat/browser/media/chatStatus.css - Added styles for session items

Files removed:

  • src/vs/workbench/contrib/chat/browser/chatSessionsStatusBarEntry.ts - No longer needed
  • src/vs/workbench/contrib/chat/test/browser/chatSessionsStatusBarEntry.test.ts - No longer needed

💡 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.

@Copilot Copilot AI changed the title [WIP] Add status bar entry for in-progress chat sessions Add status bar entry for in-progress chat sessions Aug 18, 2025
@Copilot Copilot AI requested a review from osortega August 18, 2025 22:47
Copilot finished work on behalf of osortega August 18, 2025 22:47
@osortega
Copy link
Contributor

@copilot Is there a way to avoid calling the provider again to get the list of all the chat session items? We already call .providechatsessionitems in chatSessions.ts so we could use the returned value there


Copy link
Contributor Author

Copilot AI commented Aug 19, 2025

@copilot Is there a way to avoid calling the provider again to get the list of all the chat session items? We already call .providechatsessionitems in chatSessions.ts so we could use the returned ...

You're absolutely right! Currently both the status bar entry and the tree view make separate calls to provideChatSessionItems, which is inefficient. I'll add caching to the ChatSessionsService.provideChatSessionItems method so that multiple consumers can share the same data without redundant provider calls. The cache will be invalidated when providers fire their onDidChangeChatSessionItems events.

@Copilot Copilot AI changed the title Add status bar entry for in-progress chat sessions Add status bar entry for in-progress chat sessions with performance optimizations Aug 19, 2025
Copilot finished work on behalf of osortega August 19, 2025 00:21
@bpasero
Copy link
Member

bpasero commented Aug 19, 2025

@osortega rather than being a separate status bar entry, can we think about the bigger picture here and marry this with the 🤖 entry we already have? That one allows to add additional UI elements into the rich hover and we can talk about allowing to update its text too.

Copy link
Contributor

@osortega osortega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bpasero that's a great idea. We can add a section there for the coding agent sessions

@copilot extend the ChatStatusDashboard in chatStatus.ts to show the list of running coding agents there instead of adding a new status bar contribution

Copy link
Contributor Author

Copilot AI commented Aug 19, 2025

@bpasero that's a great idea. We can add a section there for the coding agent sessions

@copilot extend the ChatStatusDashboard in chatStatus.ts to show the list of running coding agents there ins...

Done! I've integrated the running chat sessions into the existing ChatStatusDashboard instead of creating a separate status bar entry. The sessions now appear in the Copilot status bar hover tooltip under a "Running Sessions" section with spinning icons and session details. This provides a cleaner UI with all Copilot-related information in one place.

See the change in commit 28dc259.

Screenshot showing the integration

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:

  • electronjs.org
    • Triggering command: node-gyp (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@Copilot Copilot AI changed the title Add status bar entry for in-progress chat sessions with performance optimizations Integrate chat session monitoring into existing Copilot status bar dashboard with performance optimizations Aug 19, 2025
@Copilot Copilot AI requested a review from osortega August 19, 2025 18:27
Copilot finished work on behalf of osortega August 19, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants