Use URIs to identify sessions (#272013)

* Start work on using URIs to identify sessions

This starts switching us from id+types to use uris to identify chat sessions. I already added very basic support for this but in this next step I think we need a breaking change so that we can avoid adding more and more hacks and complexity to support this

* More work

* Add docs

* Fix indent

* Bump api

* Fix quotes

* Fix tests

* fix compile errors for mockChatSessionService

* Fix mockChatSessionService

* Update getChatSessionType

* Make sure resolver also registers any initial schemes

* add ChatSessionService.hasAnySessionOptions()

---------

Co-authored-by: Peng Lyu <penn.lv@gmail.com>
Co-authored-by: Josh Spicer <23246594+joshspicer@users.noreply.github.com>
This commit is contained in:
Matt Bierner
2025-10-23 15:16:46 -07:00
committed by GitHub
parent 5c88b1d51a
commit fb6055cb58
23 changed files with 393 additions and 423 deletions

View File

@@ -969,10 +969,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
checkProposedApiEnabled(extension, 'chatStatusItem');
return extHostChatStatus.createChatStatusItem(extension, id);
},
showChatSession: (chatSessionType: string, sessionId: string, options?: vscode.ChatSessionShowOptions) => {
checkProposedApiEnabled(extension, 'chatSessionsProvider');
return extHostChatSessions.showChatSession(extension, chatSessionType, sessionId, options);
},
};
// namespace: workspace
@@ -1530,9 +1526,9 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
checkProposedApiEnabled(extension, 'chatSessionsProvider');
return extHostChatSessions.registerChatSessionItemProvider(extension, chatSessionType, provider);
},
registerChatSessionContentProvider(chatSessionType: string, provider: vscode.ChatSessionContentProvider, chatParticipant: vscode.ChatParticipant, capabilities?: vscode.ChatSessionCapabilities) {
registerChatSessionContentProvider(scheme: string, provider: vscode.ChatSessionContentProvider, chatParticipant: vscode.ChatParticipant, capabilities?: vscode.ChatSessionCapabilities) {
checkProposedApiEnabled(extension, 'chatSessionsProvider');
return extHostChatSessions.registerChatSessionContentProvider(extension, chatSessionType, chatParticipant, provider, capabilities);
return extHostChatSessions.registerChatSessionContentProvider(extension, scheme, chatParticipant, provider, capabilities);
},
registerChatOutputRenderer: (viewType: string, renderer: vscode.ChatOutputRenderer) => {
checkProposedApiEnabled(extension, 'chatOutputRenderer');