mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 02:14:49 +00:00
Add ClientSetupHandlerCodexCLI
This commit is contained in:
1 parent
2c4174f3bd
commit
4f7cd88950
1 file changed
+17
-1
@@ -43,4 +43,20 @@ class ClientSetupHandlerClaudeCode(ClientSetupHandler):
|
||||
return result.return_code == 0
|
||||
|
||||
|
||||
client_setup_handlers = [ClientSetupHandlerClaudeCode()]
|
||||
class ClientSetupHandlerCodexCLI(ClientSetupHandler):
|
||||
def __init__(self) -> None:
|
||||
super().__init__("CodexCLI")
|
||||
|
||||
def is_applicable(self) -> bool:
|
||||
result = execute_shell_command("codex --version")
|
||||
return result.return_code == 0 and "codex-cli" in result.stdout
|
||||
|
||||
def get_mcp_server_options(self) -> list[str]:
|
||||
return ["--context=codex", "--project-from-cwd"]
|
||||
|
||||
def apply(self) -> bool:
|
||||
result = execute_shell_command(f"codex mcp add serena -- {self.get_mcp_server_command()}")
|
||||
return result.return_code == 0
|
||||
|
||||
|
||||
client_setup_handlers = [ClientSetupHandlerClaudeCode(), ClientSetupHandlerCodexCLI()]
|
||||
Reference in new issue
Block a user