_setup_default_env.sh 625 B

123456789101112131415161718
  1. # Default Mode from SWE-Bench
  2. # https://github.com/princeton-nlp/SWE-agent/blob/ca54d5556b9db4f4f2be21f09530ce69a72c0305/config/configs/default_sys-env_window100-detailed_cmd_format-last_5_history-1_demos.yaml
  3. export WINDOW=100;
  4. export OVERLAP=2;
  5. export CURRENT_LINE=0;
  6. export CURRENT_FILE='';
  7. export SEARCH_RESULTS=();
  8. export SEARCH_FILES=();
  9. export SEARCH_INDEX=0;
  10. state() {
  11. local working_dir="$PWD";
  12. if [ -z $CURRENT_FILE ]; then
  13. echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';
  14. else
  15. echo '{"open_file": "'$(realpath $CURRENT_FILE)'", "working_dir": "'$working_dir'"}';
  16. fi
  17. };