Skip to content

Add documentation link to Copilot coding agent availability error message #7314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
4 changes: 3 additions & 1 deletion src/lm/tools/copilotRemoteAgentTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { ITelemetry } from '../../common/telemetry';
import { CopilotRemoteAgentManager } from '../../github/copilotRemoteAgent';
import { FolderRepositoryManager } from '../../github/folderRepositoryManager';

const CODING_AGENT_DOCS_URL = 'https://docs.github.com/copilot/using-github-copilot/coding-agent';

export interface CopilotRemoteAgentToolParameters {
// The LLM is inconsistent in providing repo information.
// For now, we only support the active repository in the current workspace.
Expand All @@ -32,7 +34,7 @@ export class CopilotRemoteAgentTool implements vscode.LanguageModelTool<CopilotR
// Check if the coding agent is available (enabled and assignable)
const isAvailable = await this.manager.isAvailable();
if (!isAvailable) {
throw new Error(vscode.l10n.t('Copilot coding agent is not available for this repository. Make sure the agent is enabled and assignable to this repository.'));
throw new Error(vscode.l10n.t('Copilot coding agent is not available for this repository. Make sure the agent is enabled and assignable to this repository. [Learn more about coding agent]({0}).', CODING_AGENT_DOCS_URL));
}

const targetRepo = await this.manager.repoInfo();
Expand Down