Skip to content

Commit 4dd8398

Browse files
Copilotjoshspicer
andcommitted
Implement follow-up detection for active coding agent PRs
Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>
1 parent a8d7673 commit 4dd8398

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/github/copilotRemoteAgent.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import vscode from 'vscode';
77
import { Repository } from '../api/api';
88
import { AuthProvider } from '../common/authentication';
9-
import { COPILOT_LOGINS } from '../common/copilot';
9+
import { COPILOT_LOGINS, CopilotPRStatus } from '../common/copilot';
1010
import { commands } from '../common/executeCommands';
1111
import { Disposable } from '../common/lifecycle';
1212
import Logger from '../common/logger';
@@ -280,6 +280,15 @@ export class CopilotRemoteAgentManager extends Disposable {
280280
// Group 2 is this, url-encoded:
281281
// {"owner":"monalisa","repo":"app","pullRequestNumber":18}
282282
let followUpPR: number | undefined = this.parseFollowup(followup, repoInfo);
283+
284+
// Check if the currently active PR is a coding agent PR
285+
if (!followUpPR) {
286+
const activePR = repoInfo.fm.activePullRequest;
287+
if (activePR && this._stateModel.get(owner, repo, activePR.number) !== CopilotPRStatus.None) {
288+
followUpPR = activePR.number;
289+
}
290+
}
291+
283292
if (followUpPR) {
284293
return this.addFollowUpToExistingPR(followUpPR, userPrompt, summary);
285294
}

0 commit comments

Comments
 (0)