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]

Enh: ensure variables work in special command docstring (#628)

Feng Ye94208b4bc0b6
diff --git a/sweagent/agent/commands.py b/sweagent/agent/commands.py
index 3b47d671..e16f79d7 100644
--- a/sweagent/agent/commands.py
+++ b/sweagent/agent/commands.py
@@ -243,7 +243,7 @@ class ParseCommandDetailed(ParseCommandBash):
for cmd in commands + subroutine_types:
docs += f"{cmd.name}:\n"
if cmd.docstring is not None:
- docs += f" docstring: {cmd.docstring}\n"
+ docs += f" docstring: {cmd.docstring.format(**kwargs)}\n"
if cmd.signature is not None:
docs += f" signature: {cmd.signature}\n"
else: