Fix Bash commands now do not block and actually respect the timeout (#4058)

This commit is contained in:
tofarr
2024-09-27 18:40:00 -06:00
committed by GitHub
parent 575a829d94
commit 5ccee7c8a7
2 changed files with 11 additions and 2 deletions

View File

@@ -162,6 +162,9 @@ class Session:
'Model does not support image upload, change to a different model or try without an image.'
)
return
asyncio.run_coroutine_threadsafe(self._add_event(event, EventSource.USER), self.agent_session.loop) # type: ignore
async def _add_event(self, event, event_source):
self.agent_session.event_stream.add_event(event, EventSource.USER)
async def send(self, data: dict[str, object]) -> bool: