Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

Web: Fix script_path input (#334)

Kilian Lieretc47553af5d08
diff --git a/sweagent/api/server.py b/sweagent/api/server.py
index 0ee2ec20..d8df6778 100644
--- a/sweagent/api/server.py
+++ b/sweagent/api/server.py
@@ -133,6 +133,8 @@ def run():
environment_setup = str(write_env_yaml(environment))
elif environment["config_type"] == "script_path":
environment_setup = environment["script_path"]
+ if not environment_setup.strip():
+ environment_setup = None
test_run = request.args["test_run"].lower() == "true"
if test_run:
model_name = "instant_empty_submit"
diff --git a/sweagent/frontend/src/components/controls/LRunControl.js b/sweagent/frontend/src/components/controls/LRunControl.js
index d7e66e31..e283c3b5 100644
--- a/sweagent/frontend/src/components/controls/LRunControl.js
+++ b/sweagent/frontend/src/components/controls/LRunControl.js
@@ -112,7 +112,7 @@ function LRunControl({
setEnvConfig({ ...envConfig, script_path: e.target.value })
}
placeholder="/path/to/setup.sh"
- value=""
+ defaultValue=""
/>
</div>
<div className="alert alert-info" role="alert">