1 Star 0 Fork 0

ooeyusea/SWE-agent

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
start_web_ui.sh 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
Kilian Lieret 提交于 2024-06-04 23:17 +08:00 . Enh: Point to documentation (#526)
#!/usr/bin/env bash
set -euo pipefail
this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
function cleanup {
echo "Stopping react server"
npx --prefix "${this_dir}/sweagent/frontend" pm2 delete swe-agent
echo "Stopping Flask server"
kill "$flask_pid" 2>/dev/null
echo "Cleanup complete"
}
function print_log {
echo "Something went wrong. Here's web_api.log:"
echo "----------"
cat web_api.log
echo "----------"
}
trap print_log ERR
python sweagent/api/server.py > web_api.log 2>&1 &
flask_pid=$!
cd "${this_dir}/sweagent/frontend"
npm install
trap cleanup EXIT
npx pm2 start --name swe-agent npm -- start
echo "* If you are running on your own machine, then a browser window "
echo " should have already opened. If not, wait a few more seconds, then "
echo " open your browser at http://localhost:3000"
echo "* If you are running in github codespaces, please click the popup "
echo " that offers to forward port 3000 (not 8000!)."
echo " Missed it? Find more information at "
echo " https://princeton-nlp.github.io/SWE-agent/installation/codespaces#running-the-web-ui"
echo "* Something went wrong? Please check "
echo " web_api.log for error messages!"
echo "* See here for more information: https://princeton-nlp.github.io/SWE-agent/usage/web_ui/"
cd ../../
wait
exit $?
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/ooeyusea/SWE-agent.git
git@gitee.com:ooeyusea/SWE-agent.git
ooeyusea
SWE-agent
SWE-agent
327-copy-patch-button-should-appear-next-to-patch-submission

搜索帮助