File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -936,15 +936,20 @@ export function registerCommands(
936936 }
937937 ) ;
938938
939- // Ask user if they want to open the worktree (after progress is finished)
940- const openAction = vscode . l10n . t ( 'Open in New Window' ) ;
939+ // Ask user how they want to open the worktree (modal dialog)
940+ const openInNewWindow = vscode . l10n . t ( 'New Window' ) ;
941+ const openInCurrentWindow = vscode . l10n . t ( 'Current Window' ) ;
941942 const result = await vscode . window . showInformationMessage (
942- vscode . l10n . t ( 'Worktree created for Pull Request #{0}' , pullRequestModel . number ) ,
943- openAction
943+ vscode . l10n . t ( 'Worktree created for Pull Request #{0}. How would you like to open it?' , pullRequestModel . number ) ,
944+ { modal : true } ,
945+ openInNewWindow ,
946+ openInCurrentWindow
944947 ) ;
945948
946- if ( result === openAction ) {
949+ if ( result === openInNewWindow ) {
947950 await commands . openFolder ( worktreeUri , { forceNewWindow : true } ) ;
951+ } else if ( result === openInCurrentWindow ) {
952+ await commands . openFolder ( worktreeUri , { forceNewWindow : false } ) ;
948953 }
949954 } catch ( e ) {
950955 const errorMessage = e instanceof Error ? e . message : String ( e ) ;
You can’t perform that action at this time.
0 commit comments