豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit 61d72d5

Browse files
committed
Sessions - delete the open pull request command
1 parent 9e668cb commit 61d72d5

File tree

4 files changed

+0
-73
lines changed

4 files changed

+0
-73
lines changed

package.json

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2821,13 +2821,6 @@
28212821
"icon": "$(git-pull-request-draft)",
28222822
"category": "GitHub Copilot"
28232823
},
2824-
{
2825-
"command": "github.copilot.chat.openPullRequestCopilotCLIAgentSession.openPR",
2826-
"title": "%github.copilot.chat.openPullRequestCopilotCLIAgentSession.openPR%",
2827-
"enablement": "!chatSessionRequestInProgress",
2828-
"icon": "$(git-pull-request)",
2829-
"category": "GitHub Copilot"
2830-
},
28312824
{
28322825
"command": "github.copilot.chat.copilotCLI.addFileReference",
28332826
"title": "%github.copilot.command.chat.copilotCLI.addFileReference%",
@@ -4850,11 +4843,6 @@
48504843
"command": "github.copilot.chat.checkoutPullRequestReroute",
48514844
"when": "chatSessionType == copilot-cloud-agent && !github.vscode-pull-request-github.activated && gitOpenRepositoryCount != 0",
48524845
"group": "navigation@0"
4853-
},
4854-
{
4855-
"command": "github.copilot.chat.openPullRequestCopilotCLIAgentSession.openPR",
4856-
"when": "chatSessionType == copilotcli && isSessionsWindow && sessions.hasPullRequest",
4857-
"group": "navigation@9"
48584846
}
48594847
],
48604848
"chat/input/editing/sessionApplyActions": [
@@ -5218,10 +5206,6 @@
52185206
"command": "github.copilot.chat.createDraftPullRequestCopilotCLIAgentSession.createDraftPR",
52195207
"when": "false"
52205208
},
5221-
{
5222-
"command": "github.copilot.chat.openPullRequestCopilotCLIAgentSession.openPR",
5223-
"when": "false"
5224-
},
52255209
{
52265210
"command": "github.copilot.chat.checkoutPullRequestReroute",
52275211
"when": "false"

package.nls.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,6 @@
460460
"github.copilot.chat.createPullRequestCopilotCLIAgentSession.createPR": "Create Pull Request",
461461
"github.copilot.chat.createPullRequestCopilotCLIAgentSession.updatePR": "Sync Pull Request",
462462
"github.copilot.chat.createDraftPullRequestCopilotCLIAgentSession.createDraftPR": "Create Draft Pull Request",
463-
"github.copilot.chat.openPullRequestCopilotCLIAgentSession.openPR": "Open Pull Request",
464463
"github.copilot.command.checkoutPullRequestReroute.title": "Checkout",
465464
"github.copilot.command.cloudSessions.openRepository.title": "Browse repositories...",
466465
"github.copilot.command.cloudSessions.clearCaches.title": "Clear Cloud Agent Caches",

src/extension/chatSessions/vscode-node/copilotCLIChatSessions.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2306,34 +2306,6 @@ export function registerCLIChatCommands(
23062306
});
23072307
}));
23082308

2309-
disposableStore.add(vscode.commands.registerCommand('github.copilot.chat.openPullRequestCopilotCLIAgentSession.openPR', async (sessionItemOrResource?: vscode.ChatSessionItem | vscode.Uri) => {
2310-
const resource = sessionItemOrResource instanceof vscode.Uri
2311-
? sessionItemOrResource
2312-
: sessionItemOrResource?.resource;
2313-
2314-
if (!resource) {
2315-
return;
2316-
}
2317-
2318-
try {
2319-
const sessionId = SessionIdForCLI.parse(resource);
2320-
const worktreeProperties = await copilotCLIWorktreeManagerService.getWorktreeProperties(sessionId);
2321-
if (!worktreeProperties || worktreeProperties.version !== 2) {
2322-
throw new Error('Open pull request is only supported for v2 worktree sessions');
2323-
}
2324-
2325-
if (!worktreeProperties.pullRequestUrl) {
2326-
vscode.window.showInformationMessage(l10n.t('No pull request has been created for this session yet. Use "Create Pull Request" first.'));
2327-
return;
2328-
}
2329-
2330-
await vscode.env.openExternal(vscode.Uri.parse(worktreeProperties.pullRequestUrl));
2331-
} catch (error) {
2332-
logService.error(`Failed to open pull request: ${error instanceof Error ? error.message : String(error)}`);
2333-
vscode.window.showErrorMessage(l10n.t('Failed to open pull request: {0}', error instanceof Error ? error.message : String(error)), { modal: true });
2334-
}
2335-
}));
2336-
23372309
disposableStore.add(vscode.commands.registerCommand('github.copilot.cli.sessions.commitToWorktree', async (args?: { worktreeUri?: vscode.Uri; fileUri?: vscode.Uri }) => {
23382310
logService.trace(`[commitToWorktree] Command invoked, args: ${JSON.stringify(args, null, 2)}`);
23392311
if (!args?.worktreeUri || !args?.fileUri) {

src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2567,34 +2567,6 @@ export function registerCLIChatCommands(
25672567
});
25682568
}));
25692569

2570-
disposableStore.add(vscode.commands.registerCommand('github.copilot.chat.openPullRequestCopilotCLIAgentSession.openPR', async (sessionItemOrResource?: vscode.ChatSessionItem | vscode.Uri) => {
2571-
const resource = sessionItemOrResource instanceof vscode.Uri
2572-
? sessionItemOrResource
2573-
: sessionItemOrResource?.resource;
2574-
2575-
if (!resource) {
2576-
return;
2577-
}
2578-
2579-
try {
2580-
const sessionId = SessionIdForCLI.parse(resource);
2581-
const worktreeProperties = await copilotCLIWorktreeManagerService.getWorktreeProperties(sessionId);
2582-
if (!worktreeProperties || worktreeProperties.version !== 2) {
2583-
throw new Error('Open pull request is only supported for v2 worktree sessions');
2584-
}
2585-
2586-
if (!worktreeProperties.pullRequestUrl) {
2587-
vscode.window.showInformationMessage(l10n.t('No pull request has been created for this session yet. Use "Create Pull Request" first.'));
2588-
return;
2589-
}
2590-
2591-
await vscode.env.openExternal(vscode.Uri.parse(worktreeProperties.pullRequestUrl));
2592-
} catch (error) {
2593-
logService.error(`Failed to open pull request: ${error instanceof Error ? error.message : String(error)}`);
2594-
vscode.window.showErrorMessage(l10n.t('Failed to open pull request: {0}', error instanceof Error ? error.message : String(error)), { modal: true });
2595-
}
2596-
}));
2597-
25982570
disposableStore.add(vscode.commands.registerCommand('github.copilot.cli.sessions.commitToWorktree', async (args?: { worktreeUri?: vscode.Uri; fileUri?: vscode.Uri }) => {
25992571
logService.trace(`[commitToWorktree] Command invoked, args: ${JSON.stringify(args, null, 2)}`);
26002572
if (!args?.worktreeUri || !args?.fileUri) {

0 commit comments

Comments
 (0)