Better align chat output renders api with existing apis

Change to register with a `viewType` that is mapped to mime types by the contributions. This better matches other apis such as custom documents and also would enable having multiple possible renderers for a given output item
This commit is contained in:
Matt Bierner
2025-07-25 12:49:53 -07:00
parent 03925aa0b9
commit f82ba78af1
8 changed files with 117 additions and 52 deletions

View File

@@ -1519,9 +1519,9 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
checkProposedApiEnabled(extension, 'chatSessionsProvider');
return extHostChatSessions.registerChatSessionContentProvider(extension, chatSessionType, provider);
},
registerChatOutputRenderer: (mime: string, renderer: vscode.ChatOutputRenderer) => {
registerChatOutputRenderer: (viewType: string, renderer: vscode.ChatOutputRenderer) => {
checkProposedApiEnabled(extension, 'chatOutputRenderer');
return extHostChatOutputRenderer.registerChatOutputRenderer(extension, mime, renderer);
return extHostChatOutputRenderer.registerChatOutputRenderer(extension, viewType, renderer);
},
};