Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 2, 2025

Previously, the "new chat" actions (Open New Chat in New Window, Open New Chat Editor to the Side, New Chat Editor button, and Ctrl+N) were only available when viewing local chat sessions. Users couldn't access these quick actions when viewing Claude sessions, coding agent sessions, or other external provider sessions.

Additionally, when these actions were triggered from external provider views, they always created new chat sessions with the default copilot provider instead of the provider associated with the current view.

This change:

  1. Makes actions available on all provider views by updating the when conditions from exact view matching to regex pattern matching that matches any view starting with workbench.view.chat.sessions.

  2. Ensures new chats are scoped to the correct provider by extracting the provider type from the current view context and passing it as chatSessionType when creating new editors

How it works

The actions now:

  • Use regex pattern ^workbench\.view\.chat\.sessions\. to match all provider views
  • Extract provider type from current view ID using contextKeyService.getContextKeyValue('view')
  • Pass the provider type as chatSessionType in editor options
  • The chat editor automatically locks to the appropriate provider using the existing lockToCodingAgent() mechanism

Result

Users can now access "new chat" actions from any provider view (local, Claude, coding agent, etc.) and the new chat sessions will interact with the same provider as the view they were triggered from, providing a seamless experience across different AI assistants.

Fixes #264787.


💡 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] Have "open to side, new window, etc" actions on all chat session views Make chat session "new chat" actions available on all provider views Sep 2, 2025
@Copilot Copilot AI requested a review from osortega September 2, 2025 23:33
Copilot finished work on behalf of osortega September 2, 2025 23:33
@osortega
Copy link
Contributor

osortega commented Sep 3, 2025

@copilot This is allowing creating new chat editors but they are not scoped to the right provider, make sure that the chat editor we are creating will interact with the right provider


Copy link
Contributor Author

Copilot AI commented Sep 3, 2025

@copilot This is allowing creating new chat editors but they are not scoped to the right provider, make sure that the chat editor we are creating will interact with the right provider

--- ...

Fixed in commit 6e9ef2f. The chat editor creation actions now extract the provider type from the current view context and pass it as chatSessionType when creating new editors. This ensures new chat editors are scoped to the same provider as the view they were triggered from (Claude, coding agent, etc.), not always defaulting to copilot.

@Copilot Copilot AI changed the title Make chat session "new chat" actions available on all provider views Make chat session "new chat" actions available on all provider views and scope to correct provider Sep 3, 2025
Copilot finished work on behalf of osortega September 3, 2025 00:19
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.

Have "open to side, new window, etc" actions on all chat session views
2 participants