1
0
mirror of https://github.com/GuDaStudio/codexmcp.git synced 2026-02-05 02:00:24 +08:00

v0.6.1:增加--profile参数

This commit is contained in:
GuDaStudio
2025-11-13 17:58:38 +08:00
parent 2cc614fea1
commit c84a40e829

View File

@@ -167,6 +167,10 @@ async def codex(
description="Run every command without approvals or sandboxing. Only use when `sandbox` couldn't be applied.", description="Run every command without approvals or sandboxing. Only use when `sandbox` couldn't be applied.",
), ),
] = False, ] = False,
profile: Annotated[
Optional[str],
"Configuration profile name to load from `~/.codex/config.toml`. Default user configuration is applied; this parameter remains inactive unless explicitly specified by the user.",
] = None,
) -> Dict[str, Any]: ) -> Dict[str, Any]:
"""Execute a Codex CLI session and return the results.""" """Execute a Codex CLI session and return the results."""
# Build command as list to avoid injection # Build command as list to avoid injection
@@ -178,6 +182,9 @@ async def codex(
if model is not None: if model is not None:
cmd.extend(["--model", model]) cmd.extend(["--model", model])
if profile is not None:
cmd.extend(["--profile", profile])
if yolo: if yolo:
cmd.append("--yolo") cmd.append("--yolo")