fix: expose abort signal to extensions closes #2660

This commit is contained in:
Mario Zechner
2026-03-28 22:25:06 +01:00
parent e773527b3a
commit 7d4faa080d
10 changed files with 76 additions and 0 deletions

View File

@@ -371,6 +371,11 @@ export class Agent {
this._state.messages = [];
}
/** The current abort signal, or undefined when the agent is not streaming. */
get signal(): AbortSignal | undefined {
return this.abortController?.signal;
}
abort() {
this.abortController?.abort();
}