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]

Change log icons; remove mention of agent name in logs

Kilian Lieret27e04859bfe5
diff --git a/sweagent/agent/agents.py b/sweagent/agent/agents.py
index ca32c821..ed75050a 100644
--- a/sweagent/agent/agents.py
+++ b/sweagent/agent/agents.py
@@ -406,9 +406,7 @@ class Agent:
"agent": self.name,
},
)
-
- self.logger.info(f"πŸ’­ THOUGHT ({self.name})\n{thought}")
- self.logger.info(f"🎬 ACTION ({self.name})\n{action}")
+ self.logger.info(f"πŸ’­ THOUGHT\n{thought}\n🎬 ACTION\n{action.strip()}")
return thought, action, output
diff --git a/sweagent/environment/config/problem_statement.py b/sweagent/environment/config/problem_statement.py
index 75f9d40d..6a0aeb3b 100644
--- a/sweagent/environment/config/problem_statement.py
+++ b/sweagent/environment/config/problem_statement.py
@@ -9,7 +9,7 @@ from pydantic import BaseModel, ConfigDict, Field
from sweagent.utils.github import _get_problem_statement_from_github_issue, _parse_gh_issue_url
from sweagent.utils.log import get_logger
-logger = get_logger("Config", emoji="βš™οΈ")
+logger = get_logger("Config", emoji="πŸ”§")
class ProblemStatement(Protocol):
diff --git a/sweagent/environment/config/repo.py b/sweagent/environment/config/repo.py
index 0865b475..96eed3ee 100644
--- a/sweagent/environment/config/repo.py
+++ b/sweagent/environment/config/repo.py
@@ -12,7 +12,7 @@ from swerex.runtime.abstract import Command, UploadRequest
from sweagent.utils.log import get_logger
-logger = get_logger("Config", emoji="βš™οΈ")
+logger = get_logger("Config", emoji="πŸ”§")
class Repo(Protocol):
diff --git a/sweagent/run/batch_instances.py b/sweagent/run/batch_instances.py
index e20efad4..ccc2d2ba 100644
--- a/sweagent/run/batch_instances.py
+++ b/sweagent/run/batch_instances.py
@@ -13,7 +13,7 @@ from sweagent.environment.config.repo import PreExistingRepo
from sweagent.environment.swe_env import EnvironmentConfig
from sweagent.utils.log import get_logger
-logger = get_logger("config", emoji="βš™οΈ")
+logger = get_logger("config", emoji="πŸ”§")
class AbstractInstanceSource(ABC):
diff --git a/sweagent/run/common.py b/sweagent/run/common.py
index 809639d0..90cdb761 100644
--- a/sweagent/run/common.py
+++ b/sweagent/run/common.py
@@ -18,7 +18,7 @@ class BasicCLI:
def __init__(self, arg_type: type[BaseSettings], default_settings: bool = True):
self.arg_type = arg_type
self.default_settings = default_settings
- self.logger = get_logger("CLI", emoji="βš™οΈ")
+ self.logger = get_logger("CLI", emoji="πŸ”§")
def get_args(self, args=None) -> BaseSettings:
# The defaults if no config file is provided
diff --git a/sweagent/tools/tools.py b/sweagent/tools/tools.py
index f2c32d81..7f8c5f12 100644
--- a/sweagent/tools/tools.py
+++ b/sweagent/tools/tools.py
@@ -148,7 +148,7 @@ class ToolHandler:
# partially initialized in `install_commands`.
self._reset_commands = []
self._command_patterns = self._get_command_patterns()
- self.logger = get_logger("Tools", emoji="πŸ”§")
+ self.logger = get_logger("Tools", emoji="🧰")
@classmethod
def from_config(cls, config: ToolConfig) -> Self:
diff --git a/sweagent/utils/config.py b/sweagent/utils/config.py
index 8fa5c0c4..4d957f80 100644
--- a/sweagent/utils/config.py
+++ b/sweagent/utils/config.py
@@ -8,7 +8,7 @@ from dotenv import load_dotenv
from sweagent import REPO_ROOT
from sweagent.utils.log import get_logger
-logger = get_logger("config", emoji="βš™οΈ")
+logger = get_logger("config", emoji="πŸ”§")
def _convert_path_to_abspath(path: Path | str) -> Path: