Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -298,6 +298,9 @@ async def handle_user_input(websocket, process):
|
|
298 |
print(f'Received user input: {event}')
|
299 |
try:
|
300 |
if event["command"]["type"]=="shell":
|
|
|
|
|
|
|
301 |
process_input(event["command"]["command"], process)
|
302 |
|
303 |
elif event["command"]["type"]=="write":
|
|
|
298 |
print(f'Received user input: {event}')
|
299 |
try:
|
300 |
if event["command"]["type"]=="shell":
|
301 |
+
await asyncio.sleep(0.1)
|
302 |
+
if process.returncode is not None:
|
303 |
+
break
|
304 |
process_input(event["command"]["command"], process)
|
305 |
|
306 |
elif event["command"]["type"]=="write":
|