Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 2, 2025

The rename action was only available for current chat sessions but not for history items in the Chat Sessions tree view, despite being available in the legacy "Show Chats" picker. This created an inconsistent user experience.

Changes Made

Enable Rename for History Items

  • Removed the ChatContextKeys.isHistoryItem.isEqualTo(false) condition from the rename action's menu registration, allowing it to appear for both current and history chat sessions
  • Added proper session ID handling in RenameChatSessionAction to strip the history- prefix before calling setChatSessionTitle(), consistent with how other actions handle history items
  • Updated the comment to reflect that history items are now supported

Add Delete Action for History Items

  • Implemented DeleteChatSessionAction with complete context handling following the same patterns as the rename action
  • Added menu registration for the delete action, but only for history items (ChatContextKeys.isHistoryItem.isEqualTo(true)) to prevent accidental deletion of active sessions
  • Uses the existing chatService.removeHistoryEntry() method with proper session ID processing

Before and After

Before: Users could only rename the current chat session. History items under the "History" node had limited context menu options.

After: Users can now rename both current and history chat sessions, and delete history items directly from the Chat Sessions tree context menu, providing a consistent experience with the legacy picker.

The implementation follows existing VS Code patterns and includes proper error handling and logging.

Fixes #264784.

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:


✨ 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] Why can I only Rename the current chat session? Enable rename and delete actions for chat history items 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
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.

Why can I only Rename the current chat session?
2 participants