@@ -22,7 +22,7 @@ import { ChatSessionWithPR, CrossChatSessionWithPR } from './github/copilotApi';
2222import { CopilotRemoteAgentManager } from './github/copilotRemoteAgent' ;
2323import { FolderRepositoryManager } from './github/folderRepositoryManager' ;
2424import { GitHubRepository } from './github/githubRepository' ;
25- import { Issue } from './github/interface' ;
25+ import { Issue , MergeMethod } from './github/interface' ;
2626import { IssueModel } from './github/issueModel' ;
2727import { IssueOverviewPanel } from './github/issueOverview' ;
2828import { GHPRComment , GHPRCommentThread , TemporaryComment } from './github/prComment' ;
@@ -815,6 +815,14 @@ export function registerCommands(
815815
816816 context . subscriptions . push (
817817 vscode . commands . registerCommand ( 'pr.readyForReview' , async ( pr ?: PRNode ) => {
818+ // When called from webview context menu (no PRNode), trigger the webview action
819+ if ( ! pr && PullRequestOverviewPanel . currentPanel ) {
820+ PullRequestOverviewPanel . currentPanel [ '_postMessage' ] ( {
821+ command : 'pr.readyForReview-trigger'
822+ } ) ;
823+ return ;
824+ }
825+
818826 const folderManager = reposManager . getManagerForIssueModel ( pr ?. pullRequestModel ) ;
819827 if ( ! folderManager ) {
820828 return ;
@@ -844,6 +852,17 @@ export function registerCommands(
844852 } ) ,
845853 ) ;
846854
855+ context . subscriptions . push (
856+ vscode . commands . registerCommand ( 'pr.readyForReviewAndMerge' , async ( _context ?: { mergeMethod : MergeMethod } ) => {
857+ // This command is only called from webview context menu
858+ if ( PullRequestOverviewPanel . currentPanel ) {
859+ PullRequestOverviewPanel . currentPanel [ '_postMessage' ] ( {
860+ command : 'pr.readyForReviewAndMerge-trigger'
861+ } ) ;
862+ }
863+ } ) ,
864+ ) ;
865+
847866 context . subscriptions . push (
848867 vscode . commands . registerCommand ( 'pr.dismissNotification' , node => {
849868 if ( node instanceof PRNode ) {
0 commit comments