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]

Make sure to _write_env CURRENT_LINE

Kilian Lieret87dfe9226210
diff --git a/tools/defaults/lib/utils.sh b/tools/defaults/lib/utils.sh
index d06be3b9..e664c68c 100644
--- a/tools/defaults/lib/utils.sh
+++ b/tools/defaults/lib/utils.sh
@@ -30,4 +30,5 @@ _constrain_line() {
local half_window=$(jq -n "$WINDOW/2" | jq 'floor')
export CURRENT_LINE=$(jq -n "[$CURRENT_LINE, $max_line - $half_window] | min")
export CURRENT_LINE=$(jq -n "[$CURRENT_LINE, $half_window] | max")
+ _write_env "CURRENT_LINE" "$CURRENT_LINE"
}
\ No newline at end of file