Skip to content

Commit 34d6cce

Browse files
committed
fixed a bug where cancel is not handled in context-scope stream
1 parent 82686b9 commit 34d6cce

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/agents-core/src/result.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,9 @@ export class StreamedRunResult<
287287
this.#contextScopeStreamOwner = true;
288288
this.state._context._copyToContextScopeStream = true;
289289
},
290-
cancel: () => {},
290+
cancel: () => {
291+
this.#cancelled = true;
292+
},
291293
});
292294
}
293295
}

0 commit comments

Comments
 (0)