MCPcopy Create free account
hub / github.com/LangGraph-GUI/LangGraph-GUI-backend / stream_output

Method stream_output

src/process_handler.py:34–44  ·  view source on GitHub ↗
(stream, prefix)

Source from the content-addressed store, hash-verified

32 self._is_starting = False
33
34 async def stream_output(stream, prefix):
35 while True:
36 line = await stream.readline()
37 if line:
38 message = f"{prefix}{line.decode().strip()}"
39 print(message,flush=True) #flush output immediately
40 if prefix == "STDOUT: ": # only add stdout
41 await self._output_queue.put(message)
42
43 else:
44 break
45
46 # Create tasks and store them to cancel later
47 stdout_task = asyncio.create_task(stream_output(self._process.stdout, "STDOUT: "))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected