mirror of
https://github.com/GuDaStudio/codexmcp.git
synced 2026-02-05 02:00:24 +08:00
v0.4.5:修复Windows下长文本无法回答
This commit is contained in:
@@ -119,7 +119,7 @@ async def codex(
|
||||
skip_git_repo_check: Annotated[
|
||||
bool,
|
||||
"Allow codex running outside a Git repository (useful for one-off directories).",
|
||||
] = True,
|
||||
] = False,
|
||||
return_all_messages: Annotated[
|
||||
bool,
|
||||
"Return all messages (e.g. reasoning, tool calls, etc.) from the codex session. Set to `False` by default, only the agent's final reply message is returned.",
|
||||
@@ -127,7 +127,7 @@ async def codex(
|
||||
) -> Dict[str, Any]:
|
||||
"""Execute a Codex CLI session and return the results."""
|
||||
# Build command as list to avoid injection
|
||||
cmd = ["codex", "exec", PROMPT, "--sandbox", sandbox, "--cd", str(cd), "--json"]
|
||||
cmd = ["codex", "exec", "--sandbox", sandbox, "--cd", str(cd), "--json"]
|
||||
|
||||
if skip_git_repo_check:
|
||||
cmd.append("--skip-git-repo-check")
|
||||
@@ -135,6 +135,8 @@ async def codex(
|
||||
if SESSION_ID is not None:
|
||||
cmd.extend(["resume", str(SESSION_ID)])
|
||||
|
||||
cmd += ['--', PROMPT]
|
||||
|
||||
all_messages: list[Dict[str, Any]] = []
|
||||
agent_messages = ""
|
||||
success = True
|
||||
|
||||
Reference in New Issue
Block a user