Isolate the Folder Option stuff to be replaced with the bigger worktree/folder/branch picker that copilot cli uses#311098
Draft
TylerLeonhardt wants to merge 1 commit intomainfrom
Draft
Isolate the Folder Option stuff to be replaced with the bigger worktree/folder/branch picker that copilot cli uses#311098TylerLeonhardt wants to merge 1 commit intomainfrom
TylerLeonhardt wants to merge 1 commit intomainfrom
Conversation
…ee/folder/branch picker that copilot cli uses Functionally no change, just refactoring.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors Claude chat-session “folder option” group logic into a dedicated builder to better align with the larger worktree/folder/branch picker pattern used by the Copilot CLI, while keeping behavior the same.
Changes:
- Extract folder option-group building/mutation into a new
ClaudeFolderOptionBuilder, and updateClaudeSessionOptionBuilderto orchestrate permission mode + delegated folder groups via a proxy input-state pattern. - Move folder-related unit tests out of
claudeSessionOptionBuilder.spec.tsinto a newclaudeFolderOptionBuilder.spec.ts. - Extend fork-handler tests to assert session state (permission mode + folder info) is copied to the forked session.
Show a summary per file
| File | Description |
|---|---|
| extensions/copilot/src/extension/chatSessions/vscode-node/test/claudeSessionOptionBuilder.spec.ts | Removes folder-related tests now covered by the new folder builder test suite. |
| extensions/copilot/src/extension/chatSessions/vscode-node/test/claudeFolderOptionBuilder.spec.ts | New test suite covering folder option group building, input-state rebuild/lock, and default folder resolution. |
| extensions/copilot/src/extension/chatSessions/vscode-node/test/claudeChatSessionContentProvider.spec.ts | Strengthens fork tests to verify session state is propagated to the forked session. |
| extensions/copilot/src/extension/chatSessions/vscode-node/claudeSessionOptionBuilder.ts | Refactors to delegate folder groups to ClaudeFolderOptionBuilder and manages permission mode group directly. |
| extensions/copilot/src/extension/chatSessions/vscode-node/claudeFolderOptionBuilder.ts | New extracted implementation for folder option group construction and state mutation helpers. |
| extensions/copilot/src/extension/chatSessions/vscode-node/claudeChatSessionContentProvider.ts | Updates imports to reference FOLDER_OPTION_ID from the new folder builder module. |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Functionally no change, just refactoring.