{"record":{"id":"8719c610e47e5fb7","repo":"microsoft/vscode","slug":"open-a-file-to-fix-an-issue","errorCode":null,"errorMessage":"Open a file to fix an issue","messagePattern":"Open a file to fix an issue","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"extensions/copilot/src/extension/intents/node/fixIntent.ts","lineNumber":39,"sourceCode":"\nexport class FixIntent implements IIntent {\n\n\tstatic readonly ID = Intent.Fix;\n\treadonly id = Intent.Fix;\n\treadonly locations = [ChatLocation.Editor, ChatLocation.Panel, ChatLocation.Notebook];\n\treadonly description = l10n.t('Propose a fix for the problems in the selected code');\n\n\treadonly commandInfo: IIntentSlashCommandInfo = { toolEquivalent: ContributedToolName.GetErrors };\n\n\tconstructor(\n\t\t@IInstantiationService private readonly instantiationService: IInstantiationService,\n\t\t@IEndpointProvider private readonly endpointProvider: IEndpointProvider,\n\t) { }\n\n\tasync invoke(invocationContext: IIntentInvocationContext): Promise<IIntentInvocation> {\n\t\tconst { location, documentContext, request } = invocationContext;\n\t\tif (!documentContext) {\n\t\t\tthrow new Error('Open a file to fix an issue');\n\t\t}\n\n\t\tif (location === ChatLocation.Panel) {\n\t\t\tconst endpoint = await this.endpointProvider.getChatEndpoint(request);\n\t\t\treturn this.instantiationService.createInstance(GenericPanelIntentInvocation, this, location, endpoint, PanelChatFixPrompt, invocationContext.documentContext);\n\t\t}\n\t\tconst attempt = request.attempt;\n\t\tconst endpoint = await this.endpointProvider.getChatEndpoint(request);\n\n\t\tlet prompt: PromptElementCtor<InlineFixProps, unknown>;\n\t\tif (isNotebookCellOrNotebookChatInput(documentContext.document.uri)) {\n\t\t\tprompt = InlineFixNotebookPrompt;\n\t\t} else {\n\t\t\tprompt = InlineFix3Prompt;\n\t\t}\n\n\t\tconst useWorkspaceChunksOnRetry = attempt > 1;\n\t\tconst features: IInlineFixFeatures = {","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/microsoft/vscode/blob/a94b963a32aa9749d69504576791fa29700ae46d/extensions/copilot/src/extension/intents/node/fixIntent.ts#L21-L57","documentation":"Error \"Open a file to fix an issue\" thrown in microsoft/vscode.","triggerScenarios":"Thrown at extensions/copilot/src/extension/intents/node/fixIntent.ts:39 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"a94b963a32aa9749d69504576791fa29700ae46d","analyzedAt":"2026-08-12T01:08:56.794Z","schemaVersion":2},"datasetVersion":"2026-08-12T06:17:24.410Z"}