{"record":{"id":"a26e996c5a907044","repo":"microsoft/vscode","slug":"open-a-file-to-add-code-a26e99","errorCode":null,"errorMessage":"Open a file to add code.","messagePattern":"Open a file to add code\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"extensions/copilot/src/extension/intents/node/unknownIntent.ts","lineNumber":36,"sourceCode":"\n\tstatic readonly ID = Intent.Unknown;\n\n\treadonly id = UnknownIntent.ID;\n\treadonly locations = [ChatLocation.Editor, ChatLocation.Panel];\n\treadonly description = l10n.t('Intent of this command is unclear or is not related to information technologies');\n\treadonly commandInfo: IIntentSlashCommandInfo = { hiddenFromUser: true };\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\tconst endpoint = await this.endpointProvider.getChatEndpoint(request);\n\t\tif (location === ChatLocation.Editor) {\n\t\t\tif (!documentContext) {\n\t\t\t\tthrow new Error('Open a file to add code.');\n\t\t\t}\n\t\t\treturn this.instantiationService.createInstance(GenericInlineIntentInvocation, this, location, endpoint, documentContext, EditStrategy.FallbackToReplaceRange);\n\t\t}\n\t\treturn this.instantiationService.createInstance(GenericPanelIntentInvocation, this, location, endpoint, undefined, documentContext);\n\t}\n}\n","sourceCodeStart":18,"sourceCodeEnd":43,"githubUrl":"https://github.com/microsoft/vscode/blob/a94b963a32aa9749d69504576791fa29700ae46d/extensions/copilot/src/extension/intents/node/unknownIntent.ts#L18-L43","documentation":"Error \"Open a file to add code.\" thrown in microsoft/vscode.","triggerScenarios":"Thrown at extensions/copilot/src/extension/intents/node/unknownIntent.ts:36 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"}