Skip to content

Commit

Permalink
Return to the user prompt when an error occurs
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmurdza committed Jan 19, 2025
1 parent 7407c20 commit dc846cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from os_computer_use.streaming import Sandbox, DisplayClient
from os_computer_use.sandbox_agent import SandboxAgent
from os_computer_use.utils import print_colored
import asyncio
import argparse

Expand Down Expand Up @@ -43,6 +44,9 @@ async def start(user_input=None, output_dir=None):
user_input = None
except KeyboardInterrupt:
user_input = None
except Exception as e:
print_colored(f"An error occurred: {e}", "red")
user_input = None

finally:
if client:
Expand Down

0 comments on commit dc846cf

Please sign in to comment.