From c9b51604520049b82e0c65384039d349f6844b64 Mon Sep 17 00:00:00 2001 From: Mike Bird Date: Fri, 12 Jan 2024 09:41:06 -0500 Subject: [PATCH 1/3] Add reference to open-interpreter-termux in README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index ba8fafb62f..a63759189b 100644 --- a/README.md +++ b/README.md @@ -350,6 +350,10 @@ pip install fastapi uvicorn uvicorn server:app --reload ``` +## Android + +The step-by-step guide for installing Open Interpreter on your Android device can be found in the [open-interpreter-termux repo](https://github.com/Arrendy/open-interpreter-termux). + ## Safety Notice Since generated code is executed in your local environment, it can interact with your files and system settings, potentially leading to unexpected outcomes like data loss or security risks. From c14c73da0bf445fe694dca660c02c3ee32e009ac Mon Sep 17 00:00:00 2001 From: Mike Bird Date: Mon, 15 Jan 2024 15:37:05 -0500 Subject: [PATCH 2/3] add try except to catch filenotfound error if xdg-open not installed on macOS --- .../terminal_interface/start_terminal_interface.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/interpreter/terminal_interface/start_terminal_interface.py b/interpreter/terminal_interface/start_terminal_interface.py index 58b5674bd1..c6e3f59063 100644 --- a/interpreter/terminal_interface/start_terminal_interface.py +++ b/interpreter/terminal_interface/start_terminal_interface.py @@ -304,21 +304,13 @@ def start_terminal_interface(interpreter): if platform.system() == "Windows": os.startfile(config_directory) - else: - subprocess.call(["xdg-open", config_directory]) - - # Use the default system editor to open the file - if platform.system() == "Windows": - os.startfile( - config_file - ) # This will open the file with the default application, e.g., Notepad else: try: # Try using xdg-open on non-Windows platforms - subprocess.call(["xdg-open", config_file]) + subprocess.call(["xdg-open", config_directory]) except FileNotFoundError: # Fallback to using 'open' on macOS if 'xdg-open' is not available - subprocess.call(["open", config_file]) + subprocess.call(["open", config_directory]) return # This should be pushed into a utility: From 20a032c001018a6f0dcff4d90bb5d96949db8736 Mon Sep 17 00:00:00 2001 From: Mike Bird Date: Mon, 15 Jan 2024 15:52:08 -0500 Subject: [PATCH 3/3] MacOS should open config file directly --- interpreter/terminal_interface/start_terminal_interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interpreter/terminal_interface/start_terminal_interface.py b/interpreter/terminal_interface/start_terminal_interface.py index c6e3f59063..2a24c6c47b 100644 --- a/interpreter/terminal_interface/start_terminal_interface.py +++ b/interpreter/terminal_interface/start_terminal_interface.py @@ -310,7 +310,7 @@ def start_terminal_interface(interpreter): subprocess.call(["xdg-open", config_directory]) except FileNotFoundError: # Fallback to using 'open' on macOS if 'xdg-open' is not available - subprocess.call(["open", config_directory]) + subprocess.call(["open", config_file]) return # This should be pushed into a utility: