mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
fix: Fix out of bounds error in _run_async_impl
PiperOrigin-RevId: 834492696
This commit is contained in:
committed by
Copybara-Service
parent
679d543f8e
commit
8fc6128b62
@@ -469,10 +469,7 @@ class LlmAgent(BaseAgent):
|
||||
|
||||
if ctx.is_resumable:
|
||||
events = ctx._get_events(current_invocation=True, current_branch=True)
|
||||
if events and (
|
||||
ctx.should_pause_invocation(events[-1])
|
||||
or ctx.should_pause_invocation(events[-2])
|
||||
):
|
||||
if any(ctx.should_pause_invocation(e) for e in events[-2:]):
|
||||
return
|
||||
# Only yield an end state if the last event is no longer a long running
|
||||
# tool call.
|
||||
|
||||
Reference in New Issue
Block a user