Skip to content

Commit 07ee372

Browse files
committed
minor ui changes
1 parent 3598b82 commit 07ee372

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

app/interpreter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def process_command(self, json_command: dict[str, Any]) -> bool:
4040
self.execute_function(function_name, parameters)
4141
return True
4242
except Exception as e:
43-
print(f'We are having a problem executing this step - {type(e)} - {e}')
43+
print(f'\nError:\nWe are having a problem executing this step - {type(e)} - {e}')
4444
print(f'This was the json we received from the LLM: {json.dumps(json_command, indent=2)}')
4545
print(f'This is what we extracted:')
4646
print(f'\t function_name:{function_name}')

app/resources/context.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ Critical guidelines based on your past behavior to help you in your objectives:
4848
5. At the same time send at least 4-5 steps when possible because you don't want to be slow and calls to the GPT API are time-consuming.
4949
6. Try to only send 4-5 steps at a time and then leave done empty, so the app can re-enqueue the request for you with a new screenshot. This is very important! Without new screenshots you generally do not perform well.
5050
7. Break down your response into very simple steps. This is very important.
51-
8. Try not to use pyautogui's mouse commands and instead rely on keyboard functions. You risk doing poorly with mouse navigation.
52-
9. If you don't think you can execute a task or execute it safely, leave steps empty and return done with an explanation.
53-
10. Only accept as request something you can reasonably perform on a computer.
54-
11. Don't overwrite any user data. Always try to open new windows and tabs after you open an application or browser. This is very important.
55-
12. If you ever encounter a login page, return done with an explanation and ask user to give you a new command after logging in manually.
56-
13. pyautogui.press("enter") is not the same as pyautogui.write("\n") - please do not confuse them.
57-
14. Try going to a link directly if you know it instead of searching for it. This is very important.
58-
15. Very importantly, before you start typing make sure you are within the intended text box. Sometimes an application is open in the background and you think it's in the foreground and start typing. You can check if the correct application is active right now by looking at the top left for the application name on MacOS.
59-
16. Try not switching applications with keyboard shortcuts, instead always launch applications with spotlight on MacOS.
60-
17. Do not just rely on thread history to understand state, always look at the latest screenshot being sent with a request. User may perform other actions, navigate in and out of apps between requests. ALWAYS look at state of the system with the screenshot provided.
51+
8. If you don't think you can execute a task or execute it safely, leave steps empty and return done with an explanation.
52+
9. Only accept as request something you can reasonably perform on a computer.
53+
10. Don't overwrite any user data. Always try to open new windows and tabs after you open an application or browser. This is very important.
54+
11. If you ever encounter a login page, return done with an explanation and ask user to give you a new command after logging in manually.
55+
12. pyautogui.press("enter") is not the same as pyautogui.write("\n") - please do not confuse them.
56+
13. Try going to a link directly if you know it instead of searching for it. This is very important.
57+
14. Very importantly, before you start typing make sure you are within the intended text box. Sometimes an application is open in the background and you think it's in the foreground and start typing. You can check if the correct application is active right now by looking at the top left for the application name on MacOS.
58+
15. Try not switching applications with keyboard shortcuts, instead always launch applications with spotlight on MacOS.
59+
16. Do not just rely on thread history to understand state, always look at the latest screenshot being sent with a request. User may perform other actions, navigate in and out of apps between requests. ALWAYS look at state of the system with the screenshot provided.
60+
17. Try not to use pyautogui's mouse commands and instead rely on keyboard functions. You risk doing poorly with mouse navigation.
6161

6262
Lastly, do not ever, ever do anything to hurt the user or the computer system - do not perform risky deletes, or any other similar actions.
6363
And always reply in valid JSON.

app/ui.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ def __init__(self):
235235
super().__init__() # https://github.com/AmberSahdev/Open-Interface/issues/35
236236

237237
self.title('Open Interface')
238-
window_width = 420
239-
window_height = 250
238+
window_width = 460
239+
window_height = 270
240240
self.minsize(window_width, window_height)
241241

242242
# Set the geometry of the window
@@ -279,7 +279,7 @@ def create_widgets(self) -> None:
279279
heading_label.grid(column=0, row=1, columnspan=3, sticky=ttk.W)
280280

281281
# Entry widget
282-
self.entry = ttk.Entry(frame, width=30)
282+
self.entry = ttk.Entry(frame, width=35)
283283
self.entry.grid(column=0, row=2, sticky=(ttk.W, ttk.E))
284284

285285
# Bind the Enter key to the submit function

0 commit comments

Comments
 (0)