@@ -22,8 +22,6 @@ declare module 'vscode' {
2222 * Provides a list of chat sessions.
2323 */
2424 provideChatSessionItems ( token : CancellationToken ) : ProviderResult < ChatSessionItem [ ] > ;
25-
26- provideChatSessionContent ( id : string , token : CancellationToken ) : Thenable < ChatSession > ;
2725 }
2826
2927 export interface ChatSessionItem {
@@ -47,7 +45,7 @@ declare module 'vscode' {
4745 /**
4846 * The content that was received from the chat participant. Only the stream parts that represent actual content (not metadata) are represented.
4947 */
50- readonly response : ReadonlyArray < ChatResponseMarkdownPart | ChatResponseFileTreePart | ChatResponseAnchorPart | ChatResponseCommandButtonPart | ExtendedChatResponsePart > ;
48+ readonly response : ReadonlyArray < ChatResponseMarkdownPart | ChatResponseFileTreePart | ChatResponseAnchorPart | ChatResponseCommandButtonPart | ExtendedChatResponsePart | ChatToolInvocationPart > ;
5149
5250 /**
5351 * The result that was received from the chat participant.
@@ -64,9 +62,6 @@ declare module 'vscode' {
6462 */
6563 readonly command ?: string ;
6664
67- /**
68- * @hidden
69- */
7065 constructor ( response : ReadonlyArray < ChatResponseMarkdownPart | ChatResponseFileTreePart | ChatResponseAnchorPart | ChatResponseCommandButtonPart | ExtendedChatResponsePart > , result : ChatResult , participant : string ) ;
7166 }
7267
@@ -101,7 +96,23 @@ declare module 'vscode' {
10196 readonly requestHandler : ChatRequestHandler | undefined ;
10297 }
10398
99+ export interface ChatSessionContentProvider {
100+ /**
101+ * Resolves a chat session into a full `ChatSession` object.
102+ *
103+ * @param uri The URI of the chat session to open. Uris as structured as `vscode-chat-session:<chatSessionType>/id`
104+ * @param token A cancellation token that can be used to cancel the operation.
105+ */
106+ provideChatSessionContent ( id : string , token : CancellationToken ) : Thenable < ChatSession > ;
107+ }
108+
104109 export namespace chat {
105110 export function registerChatSessionItemProvider ( chatSessionType : string , provider : ChatSessionItemProvider ) : Disposable ;
111+
112+ /**
113+ * @param chatSessionType A unique identifier for the chat session type. This is used to differentiate between different chat session providers.
114+ */
115+ export function registerChatSessionContentProvider ( chatSessionType : string , provider : ChatSessionContentProvider ) : Disposable ;
116+
106117 }
107118}
0 commit comments