From c21ef8dd9228d993ccf491306fdba7113b00ed6b Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 23 Jun 2023 14:00:22 -0700 Subject: [PATCH] more flexible multiline invocation --- aider/io.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aider/io.py b/aider/io.py index 870c9a4ff..7658abe48 100644 --- a/aider/io.py +++ b/aider/io.py @@ -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"