-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Background - agent session changes caching #3337
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the chat session worktree changes caching mechanism by moving from a separate in-memory Map (_sessionWorktreeChanges) to storing the changes as part of the persisted ChatSessionWorktreeProperties. This consolidates state management and ensures changes are persisted alongside other worktree metadata.
Changes:
- Introduced
ChatSessionWorktreeFileinterface to represent file changes with a simpler, serializable structure - Modified
ChatSessionWorktreePropertiesto include an optionalchangesfield for caching worktree file changes - Refactored
getWorktreeChangesto store/retrieve cached changes from worktree properties instead of a separate Map - Updated conversion logic in
copilotCLIChatSessionsContribution.tsto transformChatSessionWorktreeFiletovscode.ChatSessionChangedFile2with proper Git URIs
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/extension/chatSessions/common/chatSessionWorktreeService.ts | Added ChatSessionWorktreeFile interface and changes field to ChatSessionWorktreeProperties |
| src/extension/chatSessions/vscode-node/chatSessionWorktreeServiceImpl.ts | Removed _sessionWorktreeChanges Map, refactored caching to use worktree properties, updated cache invalidation logic |
| src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts | Added conversion from ChatSessionWorktreeFile to vscode.ChatSessionChangedFile2 with Git URI mapping |
src/extension/chatSessions/vscode-node/chatSessionWorktreeServiceImpl.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
* Initial implementation * Second iteration * Pull request feedback * Fix opening the changes from the session * Disable the Apply action in the empty window * Hide Apply action in empty window
No description provided.