Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

Merge branch 'mgx_ops' into dynamic_think

yzlinb3b50b3edfa0
diff --cc metagpt/tools/libs/git.py
index ac9713f01,4c67c306c..aa701e49b
--- a/metagpt/tools/libs/git.py
+++ b/metagpt/tools/libs/git.py
@@@ -9,11 -9,11 +9,11 @@@ from github.Issue import Issu
from github.PullRequest import PullRequest
from metagpt.tools.tool_registry import register_tool
- from metagpt.utils.git_repository import GitRepository
+ from metagpt.utils.git_repository import GitBranch, GitRepository
-@register_tool(tags=["software development", "git", "Clone a git repository to local"])
-async def git_clone(url: Union[str, Path], output_dir: Union[str, Path] = None) -> Path:
+# @register_tool(tags=["git"])
+async def git_clone(url: str, output_dir: str | Path = None) -> Path:
"""
Clones a Git repository from the given URL.
diff --cc metagpt/tools/libs/terminal.py
index 845de8a09,5f5989e1a..4eb6f598b
--- a/metagpt/tools/libs/terminal.py
+++ b/metagpt/tools/libs/terminal.py
@@@ -31,13 -31,8 +31,14 @@@ class Terminal
executable="/bin/bash",
)
self.stdout_queue = Queue()
+ self.observer = TerminalReporter()
+ self._check_state()
+
+ def _check_state(self):
+ """Check the state of the terminal, e.g. the current directory of the terminal process. Useful for agent to understand."""
+ print("The terminal is at:", self.run_command("pwd"))
+
def run_command(self, cmd: str, daemon=False) -> str:
"""
Executes a specified command in the terminal and streams the output back in real time.