Skip to content

Commit abada9d

Browse files
authored
Swap inline chat action (#7700)
1 parent b2de5bd commit abada9d

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3433,7 +3433,7 @@
34333433
],
34343434
"chat/chatSessions": [
34353435
{
3436-
"command": "pr.openDescription",
3436+
"command": "pr.openChanges",
34373437
"when": "chatSessionType == copilot-swe-agent",
34383438
"group": "inline"
34393439
},

src/commands.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ export function registerCommands(
770770
}));
771771

772772
context.subscriptions.push(
773-
vscode.commands.registerCommand('pr.openChanges', async (pr: PRNode | RepositoryChangesNode | PullRequestModel | OverviewContext | undefined) => {
773+
vscode.commands.registerCommand('pr.openChanges', async (pr: PRNode | RepositoryChangesNode | PullRequestModel | OverviewContext | ChatSessionWithPR | undefined) => {
774774
if (pr === undefined) {
775775
// This is unexpected, but has happened a few times.
776776
Logger.error('Unexpectedly received undefined when picking a PR.', logId);
@@ -783,6 +783,8 @@ export function registerCommands(
783783
pullRequestModel = pr.pullRequestModel;
784784
} else if (pr instanceof PullRequestModel) {
785785
pullRequestModel = pr;
786+
} else if (isChatSessionWithPR(pr)) {
787+
pullRequestModel = pr.pullRequest;
786788
} else {
787789
const resolved = await resolvePr(pr as OverviewContext);
788790
pullRequestModel = resolved?.pr;

0 commit comments

Comments
 (0)