From 186b89d1dbe2a18565eb156251e95ecdaacdad7f Mon Sep 17 00:00:00 2001 From: Kilian Lieret Date: Thu, 29 Aug 2024 10:03:57 +0200 Subject: [PATCH] Fix: Submitting ' ' in human mode crashes container Fixes https://github.com/princeton-nlp/SWE-agent/issues/748 --- sweagent/agent/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sweagent/agent/models.py b/sweagent/agent/models.py index 77a323ff5..8b2729f55 100644 --- a/sweagent/agent/models.py +++ b/sweagent/agent/models.py @@ -850,7 +850,7 @@ def query(self, history: list[dict[str, str]], action_prompt: str = "> ") -> str Logic for handling user input to pass to SWEEnv """ action = input(action_prompt) - command_name = action.split()[0] if action else "" + command_name = action.split()[0] if action.strip() else "" # Special handling for multi-line input actions (i.e. edit) if command_name in self.multi_line_command_endings: