Skip to content

Commit c34d8a5

Browse files
Copilotjoshspicer
andcommitted
Remove 'delegate to agent' / 'assign to coding agent' command and related code
Remove the issue.assignToCodingAgent command, its registration, implementation, package.json entries, localization string, and update documentation to remove references to "Delegate to coding agent" and outdated CodeLens mentions. This functionality is moving to the Copilot Chat extension. Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>
1 parent a60001a commit c34d8a5

4 files changed

Lines changed: 2 additions & 71 deletions

File tree

documentation/IssueFeatures.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
We've added some experimental GitHub issue features.
22

3-
# Code actions and CodeLens
3+
# Code actions
44

5-
Wherever there is a `TODO` comment in your code, two actions are available:
5+
Wherever there is a `TODO` comment in your code, a code action is available via the lightbulb quick fix menu:
66

7-
1. **CodeLens**: Clickable actions appear directly above the TODO comment line for quick access
8-
2. **Code actions**: The same actions are available via the lightbulb quick fix menu
9-
10-
Both provide two options:
117
- **Create Issue from Comment**: Takes your text selection and creates a GitHub issue with the selection as a permalink in the issue body. It also inserts the issue number after the `TODO`.
12-
- **Delegate to coding agent**: Starts a Copilot coding agent session to work on the TODO task (when available)
138

149
![Create Issue from Comment](images/createIssueFromComment.gif)
1510

package.json

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1794,13 +1794,6 @@
17941794
"category": "%command.issues.category%",
17951795
"icon": "$(sparkle)"
17961796
},
1797-
{
1798-
"command": "issue.assignToCodingAgent",
1799-
"title": "%command.issue.assignToCodingAgent.title%",
1800-
"category": "%command.issues.category%",
1801-
"icon": "$(send-to-remote-agent)",
1802-
"enablement": "config.githubPullRequests.codingAgent.enabled"
1803-
},
18041797
{
18051798
"command": "issues.configureIssuesViewlet",
18061799
"title": "%command.issues.configureIssuesViewlet.title%",
@@ -2495,10 +2488,6 @@
24952488
"command": "issue.openIssue",
24962489
"when": "false"
24972490
},
2498-
{
2499-
"command": "issue.assignToCodingAgent",
2500-
"when": "false"
2501-
},
25022491
{
25032492
"command": "issue.copyIssueNumber",
25042493
"when": "false"
@@ -3076,11 +3065,6 @@
30763065
"when": "view == issues:github && viewItem =~ /^(link)?(current|continue)?issue/ && github.copilot-chat.activated && config.githubPullRequests.experimental.chat && !config.chat.disableAIFeatures",
30773066
"group": "issues_1@1"
30783067
},
3079-
{
3080-
"command": "issue.assignToCodingAgent",
3081-
"when": "view == issues:github && viewItem =~ /^(link)?(current|continue)?issue/ && config.githubPullRequests.codingAgent.enabled && !config.chat.disableAIFeatures",
3082-
"group": "issues_1@2"
3083-
},
30843068
{
30853069
"command": "issue.copyIssueNumber",
30863070
"when": "view == issues:github && viewItem =~ /^(link)?(current|continue)?issue/",

package.nls.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@
342342
"command.issues.configureIssuesViewlet.title": "Configure...",
343343
"command.issue.chatSummarizeIssue.title": "Summarize With Copilot",
344344
"command.issue.chatSuggestFix.title": "Suggest a Fix with Copilot",
345-
"command.issue.assignToCodingAgent.title": "Assign to Coding Agent",
346345
"command.notifications.category": "GitHub Notifications",
347346
"command.notifications.refresh.title": "Refresh",
348347
"command.notifications.pri.title": "Prioritize",

src/issues/issueFeatureRegistrar.ts

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,6 @@ export class IssueFeatureRegistrar extends Disposable {
141141
this,
142142
),
143143
);
144-
this._register(
145-
vscode.commands.registerCommand(
146-
'issue.assignToCodingAgent',
147-
(issueModel: any) => {
148-
/* __GDPR__
149-
"issue.assignToCodingAgent" : {}
150-
*/
151-
this.telemetry.sendTelemetryEvent('issue.assignToCodingAgent');
152-
return this.assignToCodingAgent(issueModel);
153-
},
154-
this,
155-
),
156-
);
157144
this._register(
158145
vscode.commands.registerCommand(
159146
'issue.copyGithubPermalink',
@@ -1673,38 +1660,4 @@ ${options?.body ?? ''}\n
16731660
return undefined;
16741661
}
16751662

1676-
async assignToCodingAgent(issueModel: any) {
1677-
if (!issueModel) {
1678-
return;
1679-
}
1680-
1681-
// Check if the issue model is an IssueModel
1682-
if (!(issueModel instanceof IssueModel)) {
1683-
return;
1684-
}
1685-
1686-
try {
1687-
// Get the folder manager for this issue
1688-
const folderManager = this.manager.getManagerForIssueModel(issueModel);
1689-
if (!folderManager) {
1690-
vscode.window.showErrorMessage(vscode.l10n.t('Failed to find repository for issue #{0}', issueModel.number));
1691-
return;
1692-
}
1693-
1694-
// Get assignable users and find the copilot user
1695-
const assignableUsers = await folderManager.getAssignableUsers();
1696-
const copilotUser = assignableUsers[issueModel.remote.remoteName]?.find(user => COPILOT_ACCOUNTS[user.login]);
1697-
1698-
if (!copilotUser) {
1699-
vscode.window.showErrorMessage(vscode.l10n.t('Copilot coding agent is not available for assignment in this repository'));
1700-
return;
1701-
}
1702-
1703-
// Assign the issue to the copilot user
1704-
await issueModel.replaceAssignees([...(issueModel.assignees ?? []), copilotUser]);
1705-
vscode.window.showInformationMessage(vscode.l10n.t('Issue #{0} has been assigned to Copilot coding agent', issueModel.number));
1706-
} catch (error) {
1707-
vscode.window.showErrorMessage(vscode.l10n.t('Failed to assign issue to coding agent: {0}', error.message));
1708-
}
1709-
}
17101663
}

0 commit comments

Comments
 (0)