mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
more flexible multiline invocation
This commit is contained in:
parent
55fb2ffe52
commit
c21ef8dd92
1 changed files with 4 additions and 2 deletions
|
@ -168,10 +168,12 @@ class InputOutput:
|
|||
session = PromptSession(**session_kwargs)
|
||||
line = session.prompt()
|
||||
|
||||
if line.strip() == "{" and not multiline_input:
|
||||
if line and line[0] == "{" and not multiline_input:
|
||||
multiline_input = True
|
||||
inp += line[1:] + "\n"
|
||||
continue
|
||||
elif line.strip() == "}" and multiline_input:
|
||||
elif line and line[-1] == "}" and multiline_input:
|
||||
inp += line[:-1] + "\n"
|
||||
break
|
||||
elif multiline_input:
|
||||
inp += line + "\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue