Skip to content

Commit acad2f3

Browse files
committed
🐛 fix(providers): override abort() in VsCodeLmHandler (#404)
BaseProvider abort() no-op — only _abortController (undefined here). VsCodeLmHandler uses own CancellationTokenSource. Override abort() to cancel current VS Code LM request on Stop.
1 parent 6f0183d commit acad2f3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎src/api/providers/vscode-lm.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
185185
* converts the messages to VS Code LM format, and streams the response chunks.
186186
* Tool calls handling is currently a work in progress.
187187
*/
188+
override abort(): void {
189+
if (this.currentRequestCancellation) {
190+
this.currentRequestCancellation.cancel()
191+
}
192+
}
193+
188194
dispose(): void {
189195
if (this.disposable) {
190196
this.disposable.dispose()

0 commit comments

Comments
 (0)