@ -27,11 +27,13 @@ export class ShowViewCommand extends Command {
] ) ;
}
protected override preExecute ( context : CommandContext ) {
return this . execute ( context . command as Command s) ;
protected override preExecute ( context : CommandContext , . . . args : any [ ] ) {
return this . execute ( context , . . . arg s) ;
}
async execute ( command : Commands ) {
async execute ( context : CommandContext , . . . args : any [ ] ) {
const command = context . command as Commands ;
let commandArgs = args ;
switch ( command ) {
case Commands . ShowBranchesView :
return this . container . branchesView . show ( ) ;
@ -48,7 +50,11 @@ export class ShowViewCommand extends Command {
case Commands . ShowAccountView :
return this . container . accountView . show ( ) ;
case Commands . ShowGraphView :
return this . container . graphView . show ( ) ;
if ( context . type === 'scm' && context . scm ? . rootUri != null ) {
const repo = this . container . git . getRepository ( context . scm . rootUri ) ;
commandArgs = repo != null ? [ repo , . . . args ] : args ;
}
return this . container . graphView . show ( undefined , . . . commandArgs ) ;
case Commands . ShowLineHistoryView :
return this . container . lineHistoryView . show ( ) ;
case Commands . ShowRemotesView :