Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe the changes you have made:
Support multi-line input by defining the function
cli_input
, which detects special combo (start_marker
) in user's input like```
to await more input until get an another special combo (end_marker
). In this way, users can input multiple lines at one single input, which is very helpful when the users try to chat about pieces of code copied from their text editors. To enable this new feature, you can useinterpreter --multi_line
orinterpreter -ml
to launch OI, or you can simply setmulti_line: True
in your profile.Although this new feature is ready to go for most cases, there's still some improvements can be done:
end_marker
string, it will cause an unexpected ending of the current input, which means you can't have```
contained in your multi-line inputs.Here's an example, the first conversation was launched with this new feature disabled by default, and the second one was launched with this new feature enabled:
Reference any relevant issues (e.g. "Fixes #000"):
#1046
Pre-Submission Checklist (optional but appreciated):
docs/CONTRIBUTING.md
docs/ROADMAP.md
OS Tests (optional but appreciated):