Make worktree creation silent in handlePushConfirmationData workflow #2096
+53
−1
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.
Worktree creation was displaying progress messages during the
handlePushConfirmationDataworkflow, creating unnecessary noise for users. The worktree was also being created too late in the process.Changes
CopilotCLIWorktreeManager.createWorktreeSilently(): Creates worktrees without progress/warning messageshandlePushConfirmationData: Creates worktree before executing commands, respecting isolation preferenceworkingDirectoryandisolationEnabledto session creationOriginal prompt
for handlePushConfirmationData workflow, the creation of worktree should be silent.
[Chronological Review: The conversation began with the user expressing concerns about a code path not respecting isolation/worktree settings. The user then questioned whether a feature should be gated by a setting. Following that, the user pointed out that the worktree was being created too early in the process and asked about the delegation of requests. The user continued to refine the workflow by specifying that the worktree creation should be silent during the handlePushConfirmationData workflow. Finally, the user issued a command to delegate to a cloud agent.][Intent Mapping:
await this.commandExecutionService.executeCommand(...), we should create a session worktree" - User specifies the correct order of operations.[Technical Inventory:
[Code Archaeology:
handleRequestandhandlePushConfirmationDataworkflows, particularly around the timing and visibility of worktree creation.][Progress Assessment:
[Context Validation: All critical information regarding the user's requests and the current state of the code has been captured for continuation.]
[Recent Commands Analysis:
1. Conversation Overview: - Primary Objectives: - "this code path doesn't seem to respect isolation / worktree setting" - "shouldn't this feature (reading the preference from global memento) be gated by the setting as well?" - "this is actually wrong, we are creating the worktree too early." - "before we run `await this.commandExecutionService.executeCommand(...)`, we should create a session worktree" - "for handlePushConfirmationData workflow, the creation of worktree should be silent." - "Delegate: 'Delegate to cloud agent'" - Session Context: The user is refining the implementation of chat session handling in the VSCode Copilot extension, focusing on worktree management and command execution order. - User Intent Evolution: The user has progressively clarified their requirements regarding the timing and visibility of worktree creation, culminating in a request to delegate to a cloud agent.- Technical Foundation:
- Command Execution Service: Used to execute commands within the VSCode environment.
- Worktree: A temporary workspace created for handling specific tasks.
- Global Memento: A storage mechanism for user preferences/settings in VSCode.
- Codebase Status:
- File Name: /Users/penlv/Code/Work/vscode-copilot-chat/src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts
- Purpose: Handles chat session contributions in the VSCode Copilot extension.
- Current State: User has identified issues with the timing of worktree creation and has provided specific guidance on how to address them.
- Key Code Segments: Focus on
- Dependencies: Relies on the command execution service for executing commands.
- Problem Resolution:
- Issues Encountered: Timing of worktree creation and visibility during specific workflows.
- Solutions Implemented: User has provided clear directives on how to adjust the workflow.
- Debugging Cont...
handleRequestandhandlePushConfirmationDataworkflows.Created from VS Code.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.