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: Add note about successful pitch; real example by default
Kilian Lieret4b4cd351e68b
diff --git a/sweagent/api/hooks.py b/sweagent/api/hooks.pyindex 2ae8b592..0d4a34dd 100644--- a/sweagent/api/hooks.py+++ b/sweagent/api/hooks.py@@ -83,8 +83,13 @@ class MainUpdateHook(MainHook):self._wu.finish_run()def on_instance_completed(self, *, info, trajectory):- self._wu.up_agent(message=f"Instance completed")-+ print(info.get("submission"))+ if info.get("submission") and info["exit_status"] == "submitted":+ msg = (+ "The submission was successful. You can find the patch (diff) in the right panel. "+ "To apply it to your code, run `git apply /path/to/patch/file.patch`. "+ )+ self._wu.up_agent(msg, type_="success")class AgentUpdateHook(AgentHook):def __init__(self, wu: WebUpdate):diff --git a/sweagent/frontend/src/Run.js b/sweagent/frontend/src/Run.jsindex d0c1cd94..06129ba6 100644--- a/sweagent/frontend/src/Run.js+++ b/sweagent/frontend/src/Run.js@@ -15,10 +15,10 @@ function Run() {const [isConnected, setIsConnected] = useState(socket.connected);const [errorBanner, setErrorBanner] = useState('');- const [dataPath, setDataPath] = useState('https://github.com/klieret/swe-agent-test-repo/issues/1');+ const [dataPath, setDataPath] = useState('https://github.com/marshmallow-code/marshmallow/issues/1359');const [repoPath, setRepoPath] = useState("");const [model, setModel] = useState("gpt4");- const [testRun, setTestRun] = useState(true);+ const [testRun, setTestRun] = useState(false);const [agentFeed, setAgentFeed] = useState([]);const [envFeed, setEnvFeed] = useState([]);const [highlightedStep, setHighlightedStep] = useState(null);@@ -89,8 +89,8 @@ function Run() {setIsComputing(true);stillComputingTimeoutRef.current = setTimeout(() => {setIsComputing(false);- console.log("No activity for 20 second, setting isComputing to false");- }, 20000);+ console.log("No activity for 30s, setting isComputing to false");+ }, 30000);}// Handle form submissiondiff --git a/sweagent/frontend/src/components/controls/LRunControl.js b/sweagent/frontend/src/components/controls/LRunControl.jsindex a7bb5e8a..f94f2cb2 100644--- a/sweagent/frontend/src/components/controls/LRunControl.js+++ b/sweagent/frontend/src/components/controls/LRunControl.js@@ -9,7 +9,7 @@ import { Link } from 'react-router-dom';function LRunControl({isComputing, isConnected, handleStop, handleSubmit, setDataPath, setTestRun, testRun, setRepoPath, setModel, tabKey, setTabKey}) {const [psType, setPsType] = useState('gh');- const defaultPS = "https://github.com/klieret/swe-agent-test-repo/issues/1" ;+ const defaultPS = "https://github.com/marshmallow-code/marshmallow/issues/1359" ;const handlePsTypeChange = (event) => {const selectedType = event.target.value;