mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
feat: Support resuming from a paused invocation starting from a sub-agent
PiperOrigin-RevId: 817766247
This commit is contained in:
committed by
Copybara-Service
parent
bddc70b5d0
commit
59670d240e
@@ -274,14 +274,16 @@ class InMemoryRunner:
|
||||
)
|
||||
|
||||
async def run_async(
|
||||
self, new_message: types.ContentUnion, invocation_id: Optional[str] = None
|
||||
self,
|
||||
new_message: Optional[types.ContentUnion] = None,
|
||||
invocation_id: Optional[str] = None,
|
||||
) -> list[Event]:
|
||||
events = []
|
||||
async for event in self.runner.run_async(
|
||||
user_id=self.session.user_id,
|
||||
session_id=self.session.id,
|
||||
invocation_id=invocation_id,
|
||||
new_message=get_user_content(new_message),
|
||||
new_message=get_user_content(new_message) if new_message else None,
|
||||
):
|
||||
events.append(event)
|
||||
return events
|
||||
|
||||
Reference in New Issue
Block a user