Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 17, 2025

Fixes #264515

This PR implements the ability to double-click in empty space within the Chat Sessions view to create a new chat session, following the same UX pattern as the Explorer view.

Changes

Added a double-click event handler to the Chat Sessions tree that:

  • Detects when empty space is clicked (e.element === null)
  • Respects the workbench.list.scrollByPage configuration to avoid conflicts with page scrolling
  • Executes the existing workbench.action.chat.open command to create a new chat session

Implementation Details

The implementation follows the exact same pattern as the Explorer view's double-click handler:

this._register(this.tree.onMouseDblClick(e => {
    // If empty space is clicked, and not scrolling by page enabled #173261
    const scrollingByPage = this.configurationService.getValue<boolean>('workbench.list.scrollByPage');
    if (e.element === null && !scrollingByPage) {
        // click in empty area -> create a new chat session #264515
        this.commandService.executeCommand('workbench.action.chat.open');
    }
}));

This ensures consistency across VS Code's interface and provides users with an intuitive way to create new chat sessions without having to locate the "+" button.

Testing

  • ✅ TypeScript compilation passes with no errors
  • ✅ Layer validation checks pass
  • ✅ Security vulnerability scan shows no issues
  • ✅ Code follows established VS Code patterns and conventions

The change is minimal and surgical, adding only 10 lines of code without modifying any existing functionality.

Created from VS Code via the GitHub Pull Request extension.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@Copilot Copilot AI changed the title [WIP] Implementation of Double-Click to Create New Chat Session Feature Implement double-click to create new chat session in Chat Sessions view Sep 17, 2025
@Copilot Copilot AI requested a review from rebornix September 17, 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.

Double click in empty Chat Sessions list should add new session
2 participants