feat: allow extensions to attach chat context (#213172)

* feat: allow extensions to attach chat context

* fix: allow attaching different ranges from same file

* fix: restore accepting files from picker
This commit is contained in:
Joyce Er
2024-05-21 12:34:09 -07:00
committed by GitHub
parent 6743fa305c
commit f2f4adc806
12 changed files with 83 additions and 1 deletions

View File

@@ -1425,6 +1425,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
createDynamicChatParticipant(id: string, dynamicProps: vscode.DynamicChatParticipantProps, handler: vscode.ChatExtendedRequestHandler): vscode.ChatParticipant {
checkProposedApiEnabled(extension, 'chatParticipantAdditions');
return extHostChatAgents2.createDynamicChatAgent(extension, id, dynamicProps, handler);
},
attachContext(name: string, value: string | vscode.Uri | vscode.Location | unknown, location: vscode.ChatLocation.Panel) {
checkProposedApiEnabled(extension, 'chatVariableResolver');
return extHostChatVariables.attachContext(name, value, location);
}
};