mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-30 11:26:23 +02:00
terminal async reporter
This commit is contained in:
parent
a759351292
commit
5a13874991
1 changed files with 2 additions and 2 deletions
|
|
@ -123,12 +123,12 @@ class Terminal:
|
|||
if ix >= 0:
|
||||
line = line[0:ix]
|
||||
if line:
|
||||
observer.report(line, "output")
|
||||
await observer.async_report(line, "output")
|
||||
# report stdout in real-time
|
||||
cmd_output.append(line)
|
||||
return "".join(cmd_output)
|
||||
# log stdout in real-time
|
||||
observer.report(line, "output")
|
||||
await observer.async_report(line, "output")
|
||||
cmd_output.append(line)
|
||||
if daemon:
|
||||
await self.stdout_queue.put(line)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue