1
0
mirror of https://github.com/GuDaStudio/codexmcp.git synced 2026-02-04 01:50:40 +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.",
),
] = 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]:
"""Execute a Codex CLI session and return the results."""
# Build command as list to avoid injection
@@ -178,6 +182,9 @@ async def codex(
if model is not None:
cmd.extend(["--model", model])
if profile is not None:
cmd.extend(["--profile", profile])
if yolo:
cmd.append("--yolo")