Skip to content

Move the entry point to start_terminal_interface #960

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 25, 2024
Merged

Move the entry point to start_terminal_interface #960

merged 3 commits into from
Jan 25, 2024

Conversation

Notnaton
Copy link
Collaborator

@Notnaton Notnaton commented Jan 23, 2024

While talking with @Arrendy going through some code made a change to the entry point
This is building further on the comments made in #947

Describe the changes you have made:

Reference any relevant issues (e.g. "Fixes #000"):

Pre-Submission Checklist (optional but appreciated):

  • I have included relevant documentation updates (stored in /docs)
  • I have read docs/CONTRIBUTING.md
  • I have read docs/ROADMAP.md

OS Tests (optional but appreciated):

  • Tested on Windows
  • Tested on MacOS
  • Tested on Linux

Notnaton and others added 2 commits January 23, 2024 17:42
While talking with @Arrendy going through some code made a change to the entry point

Co-Authored-By: Mike Bird <[email protected]>
and move main() to bottom

Co-Authored-By: Mike Bird <[email protected]>
Copy link
Contributor

@MikeBirdTech MikeBirdTech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Definitely more logical having this in start_terminal_interface.py

try:
start_terminal_interface(interpreter)
except KeyboardInterrupt as e:
print(e)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe e will always be an empty string. Do we want to revert to Exited. or some other message to show the user?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does print something, no?
Anyways, I added more Error handling and a finally:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It didn't print anything in my testing and chatGPT says it'll always be empty. I'm no python expert though. Did it print a message in your testing?

@KillianLucas
Copy link
Collaborator

Nice!! Thank you so much @Notnaton. Yes, this is much more logical. Fantastic work, merging now.

(Also: really looking forward to our chat tomorrow!)

@KillianLucas KillianLucas merged commit be4f577 into openinterpreter:main Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants