33 * Licensed under the MIT License. See License.txt in the project root for license information.
44 *--------------------------------------------------------------------------------------------*/
55
6+ // version: 2
7+
68declare module 'vscode' {
79 /**
810 * Represents the status of a chat session.
@@ -34,6 +36,13 @@ declare module 'vscode' {
3436 readonly onDidChangeChatSessionItems : Event < void > ;
3537
3638 /**
39+ * Event that the provider can fire to signal that the current (original) chat session should be replaced with a new (modified) chat session.
40+ * The UI can use this information to gracefully migrate the user to the new session.
41+ */
42+ readonly onDidCommitChatSessionItem : Event < { original : ChatSessionItem /** untitled */ ; modified : ChatSessionItem /** newly created */ } > ;
43+
44+ /**
45+ * DEPRECATED: Will be removed!
3746 * Creates a new chat session.
3847 *
3948 * @param options Options for the new session including an optional initial prompt and history
@@ -46,16 +55,6 @@ declare module 'vscode' {
4655 */
4756 readonly request : ChatRequest ;
4857
49- /**
50- * Initial prompt to initiate the session
51- */
52- readonly prompt ?: string ;
53-
54- /**
55- * History to initialize the session with
56- */
57- readonly history ?: ReadonlyArray < ChatRequestTurn | ChatResponseTurn > ;
58-
5958 /**
6059 * Additional metadata to use for session creation
6160 */
@@ -190,7 +189,16 @@ declare module 'vscode' {
190189 *
191190 * @returns A disposable that unregisters the provider when disposed.
192191 */
193- export function registerChatSessionContentProvider ( chatSessionType : string , provider : ChatSessionContentProvider , capabilities ?: ChatSessionCapabilities ) : Disposable ;
192+ export function registerChatSessionContentProvider ( chatSessionType : string , provider : ChatSessionContentProvider , chatParticipant : ChatParticipant , capabilities ?: ChatSessionCapabilities ) : Disposable ;
193+ }
194+
195+ export interface ChatContext {
196+ readonly chatSessionContext ?: ChatSessionContext ;
197+ }
198+
199+ export interface ChatSessionContext {
200+ readonly chatSessionItem : ChatSessionItem ; // Maps to URI of chat session editor (could be 'untitled-1', etc..)
201+ readonly isUntitled : boolean ;
194202 }
195203
196204 export interface ChatSessionCapabilities {
0 commit comments