Summary
Complex prompts are difficult to enter in the single-line REPL. Support multi-line input for longer prompts.
Proposed Options
Option A: Triple-quote delimiters
> """
Write a function that:
1. Parses JSON
2. Validates the schema
3. Returns typed objects
"""
Option B: Backslash continuation
> Write a function that \
parses JSON and \
validates the schema
Option C: Heredoc-style
> <<EOF
Write a function that:
1. Parses JSON
2. Validates the schema
EOF
Option D: Editor integration
> /edit
# Opens $EDITOR with temp file, submits contents on save
Recommendation
Start with Option A (triple quotes) as it's intuitive and doesn't conflict with shell escapes. Option D is a nice addition for very long prompts.
Implementation Notes
- rustyline supports custom key bindings and multi-line mode
- Could detect opening
""" and switch to multi-line mode until closing """
Summary
Complex prompts are difficult to enter in the single-line REPL. Support multi-line input for longer prompts.
Proposed Options
Option A: Triple-quote delimiters
Option B: Backslash continuation
Option C: Heredoc-style
Option D: Editor integration
Recommendation
Start with Option A (triple quotes) as it's intuitive and doesn't conflict with shell escapes. Option D is a nice addition for very long prompts.
Implementation Notes
"""and switch to multi-line mode until closing"""