microsoft/vscode · error · Error

Open a file to fix an issue

Error message

Open a file to fix an issue

What it means

Error "Open a file to fix an issue" thrown in microsoft/vscode.

Source

Thrown at extensions/copilot/src/extension/intents/node/fixIntent.ts:39

export class FixIntent implements IIntent {

	static readonly ID = Intent.Fix;
	readonly id = Intent.Fix;
	readonly locations = [ChatLocation.Editor, ChatLocation.Panel, ChatLocation.Notebook];
	readonly description = l10n.t('Propose a fix for the problems in the selected code');

	readonly commandInfo: IIntentSlashCommandInfo = { toolEquivalent: ContributedToolName.GetErrors };

	constructor(
		@IInstantiationService private readonly instantiationService: IInstantiationService,
		@IEndpointProvider private readonly endpointProvider: IEndpointProvider,
	) { }

	async invoke(invocationContext: IIntentInvocationContext): Promise<IIntentInvocation> {
		const { location, documentContext, request } = invocationContext;
		if (!documentContext) {
			throw new Error('Open a file to fix an issue');
		}

		if (location === ChatLocation.Panel) {
			const endpoint = await this.endpointProvider.getChatEndpoint(request);
			return this.instantiationService.createInstance(GenericPanelIntentInvocation, this, location, endpoint, PanelChatFixPrompt, invocationContext.documentContext);
		}
		const attempt = request.attempt;
		const endpoint = await this.endpointProvider.getChatEndpoint(request);

		let prompt: PromptElementCtor<InlineFixProps, unknown>;
		if (isNotebookCellOrNotebookChatInput(documentContext.document.uri)) {
			prompt = InlineFixNotebookPrompt;
		} else {
			prompt = InlineFix3Prompt;
		}

		const useWorkspaceChunksOnRetry = attempt > 1;
		const features: IInlineFixFeatures = {

View on GitHub (pinned to a94b963a32)

When it happens

Trigger: Thrown at extensions/copilot/src/extension/intents/node/fixIntent.ts:39 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of microsoft/vscode@a94b963a32 (2026-08-12). Data as JSON: /api/errors/8719c610e47e5fb7. Report an issue: GitHub.