Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions documentation/IssueFeatures.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
We've added some experimental GitHub issue features.

# Code actions and CodeLens
# Code actions

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

1. **CodeLens**: Clickable actions appear directly above the TODO comment line for quick access
2. **Code actions**: The same actions are available via the lightbulb quick fix menu

Both provide two options:
- **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`.
- **Delegate to coding agent**: Starts a Copilot coding agent session to work on the TODO task (when available)

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

Expand Down
16 changes: 0 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1794,13 +1794,6 @@
"category": "%command.issues.category%",
"icon": "$(sparkle)"
},
{
"command": "issue.assignToCodingAgent",
"title": "%command.issue.assignToCodingAgent.title%",
"category": "%command.issues.category%",
"icon": "$(send-to-remote-agent)",
"enablement": "config.githubPullRequests.codingAgent.enabled"
},
{
"command": "issues.configureIssuesViewlet",
"title": "%command.issues.configureIssuesViewlet.title%",
Expand Down Expand Up @@ -2495,10 +2488,6 @@
"command": "issue.openIssue",
"when": "false"
},
{
"command": "issue.assignToCodingAgent",
"when": "false"
},
{
"command": "issue.copyIssueNumber",
"when": "false"
Expand Down Expand Up @@ -3076,11 +3065,6 @@
"when": "view == issues:github && viewItem =~ /^(link)?(current|continue)?issue/ && github.copilot-chat.activated && config.githubPullRequests.experimental.chat && !config.chat.disableAIFeatures",
"group": "issues_1@1"
},
{
"command": "issue.assignToCodingAgent",
"when": "view == issues:github && viewItem =~ /^(link)?(current|continue)?issue/ && config.githubPullRequests.codingAgent.enabled && !config.chat.disableAIFeatures",
"group": "issues_1@2"
},
{
"command": "issue.copyIssueNumber",
"when": "view == issues:github && viewItem =~ /^(link)?(current|continue)?issue/",
Expand Down
1 change: 0 additions & 1 deletion package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@
"command.issues.configureIssuesViewlet.title": "Configure...",
"command.issue.chatSummarizeIssue.title": "Summarize With Copilot",
"command.issue.chatSuggestFix.title": "Suggest a Fix with Copilot",
"command.issue.assignToCodingAgent.title": "Assign to Coding Agent",
"command.notifications.category": "GitHub Notifications",
"command.notifications.refresh.title": "Refresh",
"command.notifications.pri.title": "Prioritize",
Expand Down
47 changes: 0 additions & 47 deletions src/issues/issueFeatureRegistrar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,6 @@ export class IssueFeatureRegistrar extends Disposable {
this,
),
);
this._register(
vscode.commands.registerCommand(
'issue.assignToCodingAgent',
(issueModel: any) => {
/* __GDPR__
"issue.assignToCodingAgent" : {}
*/
this.telemetry.sendTelemetryEvent('issue.assignToCodingAgent');
return this.assignToCodingAgent(issueModel);
},
this,
),
);
this._register(
vscode.commands.registerCommand(
'issue.copyGithubPermalink',
Expand Down Expand Up @@ -1673,38 +1660,4 @@ ${options?.body ?? ''}\n
return undefined;
}

async assignToCodingAgent(issueModel: any) {
if (!issueModel) {
return;
}

// Check if the issue model is an IssueModel
if (!(issueModel instanceof IssueModel)) {
return;
}

try {
// Get the folder manager for this issue
const folderManager = this.manager.getManagerForIssueModel(issueModel);
if (!folderManager) {
vscode.window.showErrorMessage(vscode.l10n.t('Failed to find repository for issue #{0}', issueModel.number));
return;
}

// Get assignable users and find the copilot user
const assignableUsers = await folderManager.getAssignableUsers();
const copilotUser = assignableUsers[issueModel.remote.remoteName]?.find(user => COPILOT_ACCOUNTS[user.login]);

if (!copilotUser) {
vscode.window.showErrorMessage(vscode.l10n.t('Copilot coding agent is not available for assignment in this repository'));
return;
}

// Assign the issue to the copilot user
await issueModel.replaceAssignees([...(issueModel.assignees ?? []), copilotUser]);
vscode.window.showInformationMessage(vscode.l10n.t('Issue #{0} has been assigned to Copilot coding agent', issueModel.number));
} catch (error) {
vscode.window.showErrorMessage(vscode.l10n.t('Failed to assign issue to coding agent: {0}', error.message));
}
}
}