Enable rename and delete actions for chat history items #264800
Draft
+88
−3
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.
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
ChatContextKeys.isHistoryItem.isEqualTo(false)
condition from the rename action's menu registration, allowing it to appear for both current and history chat sessionsRenameChatSessionAction
to strip thehistory-
prefix before callingsetChatSessionTitle()
, consistent with how other actions handle history itemsAdd Delete Action for History Items
DeleteChatSessionAction
with complete context handling following the same patterns as the rename actionChatContextKeys.isHistoryItem.isEqualTo(true)
) to prevent accidental deletion of active sessionschatService.removeHistoryEntry()
method with proper session ID processingBefore 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
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.