Skip to content

Commit b213a85

Browse files
authored
impelement registerChatSessionContentProvider capabilities (�microsoft/vscode#259967) (#7698)
1 parent 7960240 commit b213a85

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

src/@types/vscode.proposed.chatSessionsProvider.d.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ declare module 'vscode' {
111111
}
112112

113113
export interface ChatSession {
114-
115114
/**
116115
* The full history of the session
117116
*
@@ -171,7 +170,14 @@ declare module 'vscode' {
171170
*
172171
* @returns A disposable that unregisters the provider when disposed.
173172
*/
174-
export function registerChatSessionContentProvider(chatSessionType: string, provider: ChatSessionContentProvider): Disposable;
173+
export function registerChatSessionContentProvider(chatSessionType: string, provider: ChatSessionContentProvider, capabilities?: ChatSessionCapabilities): Disposable;
174+
}
175+
176+
export interface ChatSessionCapabilities {
177+
/**
178+
* Whether sessions can be interrupted and resumed without side-effects.
179+
*/
180+
supportsInterruptions?: boolean;
175181
}
176182

177183
export interface ChatSessionShowOptions {
@@ -189,4 +195,4 @@ declare module 'vscode' {
189195
*/
190196
export function showChatSession(chatSessionType: string, sessionId: string, options: ChatSessionShowOptions): Thenable<void>;
191197
}
192-
}
198+
}

src/extension.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,8 @@ async function deferredActivate(context: vscode.ExtensionContext, showPRControll
445445

446446
context.subscriptions.push(vscode.chat?.registerChatSessionContentProvider(
447447
COPILOT_SWE_AGENT,
448-
provider
448+
provider,
449+
{ supportsInterruptions: true, }
449450
));
450451
}
451452

0 commit comments

Comments
 (0)