Open skyl opened 1 week ago
# Display the current state of messages
# # c.console.print("\nCurrent Messages:\n", style="dim")
# for i, msg in enumerate(messages, start=1):
# c.console.print(f"[{msg.role}]\n\n{msg.text}")
# Allow the user to edit their next input in a text editor
# user_input = click.edit("")
# no, just use a typer input
# user_input = typer.prompt(
# "Issue summary" if not messages else "How should we change this issue?"
# )
user_input = session.prompt(
(
"Issue summary:\n"
if not messages
else "How should we change this issue?\n"
),
multiline=True,
# enable_history_search=True,
# mode="vi",
vi_mode=True,
)
I kinda' like the vim-style exit once you're used to it. But, for normies, esc :qw enter enter
is quite a lot to submit the text. But the multiline CLI input is not terrible as it is 🤔
Objective
Enhance the terminal's multiline input capabilities to provide an intuitive editing experience similar to IPython, potentially using
prompt_toolkit
or alternative solutions.Tasks
Explore IPython REPL:
Evaluate prompt_toolkit or Alternatives:
prompt_toolkit
for its multiline editing features.Implement Intuitive Exit Strategy:
escape :wq enter
.Testing and Feedback: