Skip to content

Commit ccdbe08

Browse files
authored
Fix dropdown in PR header (#8156)
1 parent 357fac1 commit ccdbe08

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3586,6 +3586,10 @@
35863586
"command": "pr.checkoutOnVscodeDevFromDescription",
35873587
"group": "checkout@1",
35883588
"when": "webviewId == PullRequestOverview && github:checkoutMenu"
3589+
},
3590+
{
3591+
"command": "pr.openSessionLogFromDescription",
3592+
"when": "webviewId == PullRequestOverview && github:codingAgentMenu"
35893593
}
35903594
],
35913595
"chat/chatSessions": [

src/commands.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ import Logger from './common/logger';
1414
import { FILE_LIST_LAYOUT, HIDE_VIEWED_FILES, PR_SETTINGS_NAMESPACE } from './common/settingKeys';
1515
import { editQuery } from './common/settingsUtils';
1616
import { ITelemetry } from './common/telemetry';
17+
import { SessionLinkInfo } from './common/timelineEvent';
1718
import { asTempStorageURI, fromPRUri, fromReviewUri, Schemes, toPRUri } from './common/uri';
1819
import { formatError } from './common/utils';
1920
import { EXTENSION_ID } from './constants';
2021
import { ICopilotRemoteAgentCommandArgs } from './github/common';
2122
import { ChatSessionWithPR, CrossChatSessionWithPR } from './github/copilotApi';
22-
import { CopilotRemoteAgentManager } from './github/copilotRemoteAgent';
23+
import { CopilotRemoteAgentManager, SessionIdForPr } from './github/copilotRemoteAgent';
2324
import { FolderRepositoryManager } from './github/folderRepositoryManager';
2425
import { GitHubRepository } from './github/githubRepository';
2526
import { Issue } from './github/interface';
@@ -724,6 +725,14 @@ export function registerCommands(
724725
return vscode.env.openExternal(vscode.Uri.parse(vscodeDevPrLink(resolved.pr)));
725726
}));
726727

728+
context.subscriptions.push(vscode.commands.registerCommand('pr.openSessionLogFromDescription', async (context: SessionLinkInfo | undefined) => {
729+
if (!context) {
730+
return vscode.window.showErrorMessage(vscode.l10n.t('No pull request context provided for checkout.'));
731+
}
732+
const resource = SessionIdForPr.getResource(context.pullNumber, context.sessionIndex);
733+
return vscode.commands.executeCommand('vscode.open', resource);
734+
}));
735+
727736
context.subscriptions.push(
728737
vscode.commands.registerCommand('pr.exit', async (pr: PRNode | RepositoryChangesNode | PullRequestModel | undefined) => {
729738
let pullRequestModel: PullRequestModel | undefined;

0 commit comments

Comments
 (0)