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]

Fix: _file_history uninitialized

Kilian Lieretc8100af69b6c
diff --git a/config/function_calling_anthropic_openhands.yaml b/config/function_calling_anthropic_openhands.yaml
index 3ab61a2a..ea8a05e3 100644
--- a/config/function_calling_anthropic_openhands.yaml
+++ b/config/function_calling_anthropic_openhands.yaml
@@ -91,7 +91,6 @@ agent:
WINDOW: 100
OVERLAP: 2
bundles:
- - path: tools/defaults
- path: tools/edit_anthropic
- path: tools/submit
enable_bash_tool: true
diff --git a/tools/edit_anthropic/bin/str_replace_editor b/tools/edit_anthropic/bin/str_replace_editor
index f54e48ff..76b51af5 100644
--- a/tools/edit_anthropic/bin/str_replace_editor
+++ b/tools/edit_anthropic/bin/str_replace_editor
@@ -86,7 +86,7 @@ class EditTool:
@property
def _file_history(self):
- return json.loads(REGISTRY["file_history"])
+ return defaultdict(list, json.loads(REGISTRY["file_history"]))
@_file_history.setter
def _file_history(self, value: dict):