From aa8a030892206023e864cbc499a1d55c8f4a5c7f Mon Sep 17 00:00:00 2001 From: Alex Ross <38270282+alexr00@users.noreply.github.com> Date: Mon, 17 Nov 2025 12:16:51 +0100 Subject: [PATCH] Fix dropdown in PR header --- package.json | 4 ++++ src/commands.ts | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 37f7c53366..5df7f84235 100644 --- a/package.json +++ b/package.json @@ -3586,6 +3586,10 @@ "command": "pr.checkoutOnVscodeDevFromDescription", "group": "checkout@1", "when": "webviewId == PullRequestOverview && github:checkoutMenu" + }, + { + "command": "pr.openSessionLogFromDescription", + "when": "webviewId == PullRequestOverview && github:codingAgentMenu" } ], "chat/chatSessions": [ diff --git a/src/commands.ts b/src/commands.ts index 1bd7fdb68d..ddb34e8736 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -14,12 +14,13 @@ import Logger from './common/logger'; import { FILE_LIST_LAYOUT, HIDE_VIEWED_FILES, PR_SETTINGS_NAMESPACE } from './common/settingKeys'; import { editQuery } from './common/settingsUtils'; import { ITelemetry } from './common/telemetry'; +import { SessionLinkInfo } from './common/timelineEvent'; import { asTempStorageURI, fromPRUri, fromReviewUri, Schemes, toPRUri } from './common/uri'; import { formatError } from './common/utils'; import { EXTENSION_ID } from './constants'; import { ICopilotRemoteAgentCommandArgs } from './github/common'; import { ChatSessionWithPR, CrossChatSessionWithPR } from './github/copilotApi'; -import { CopilotRemoteAgentManager } from './github/copilotRemoteAgent'; +import { CopilotRemoteAgentManager, SessionIdForPr } from './github/copilotRemoteAgent'; import { FolderRepositoryManager } from './github/folderRepositoryManager'; import { GitHubRepository } from './github/githubRepository'; import { Issue } from './github/interface'; @@ -724,6 +725,14 @@ export function registerCommands( return vscode.env.openExternal(vscode.Uri.parse(vscodeDevPrLink(resolved.pr))); })); + context.subscriptions.push(vscode.commands.registerCommand('pr.openSessionLogFromDescription', async (context: SessionLinkInfo | undefined) => { + if (!context) { + return vscode.window.showErrorMessage(vscode.l10n.t('No pull request context provided for checkout.')); + } + const resource = SessionIdForPr.getResource(context.pullNumber, context.sessionIndex); + return vscode.commands.executeCommand('vscode.open', resource); + })); + context.subscriptions.push( vscode.commands.registerCommand('pr.exit', async (pr: PRNode | RepositoryChangesNode | PullRequestModel | undefined) => { let pullRequestModel: PullRequestModel | undefined;