fix(agent): stop tool preflight after extension abort

closes #4276
This commit is contained in:
Mario Zechner
2026-05-19 13:09:39 +02:00
parent f4f0ac7ada
commit b944827623
5 changed files with 44 additions and 2 deletions

View File

@@ -1478,6 +1478,9 @@ export class InteractiveMode {
const uiContext = this.createExtensionUIContext();
await this.session.bindExtensions({
uiContext,
abortHandler: () => {
this.restoreQueuedMessagesToEditor({ abort: true });
},
commandContextActions: {
waitForIdle: () => this.session.agent.waitForIdle(),
newSession: async (options) => {
@@ -1627,7 +1630,9 @@ export class InteractiveMode {
model: this.session.model,
isIdle: () => !this.session.isStreaming,
signal: this.session.agent.signal,
abort: () => this.session.abort(),
abort: () => {
this.restoreQueuedMessagesToEditor({ abort: true });
},
hasPendingMessages: () => this.session.pendingMessageCount > 0,
shutdown: () => {
this.shutdownRequested = true;