更新了部分skill

This commit is contained in:
Myfro9
2026-06-22 16:40:24 +08:00
parent b44c6f6746
commit 237e5d8925
7 changed files with 290 additions and 7 deletions
+10 -5
View File
@@ -76,14 +76,17 @@ def resolve_codex() -> str:
exe = os.environ.get("CODEX_EXE", "")
if exe and Path(exe).exists():
return exe
# 2. PATH lookup
# 2. Known install paths (checked before PATH to avoid picking up wrong codex variant)
for candidate in [
r"C:\Users\bowei\miniconda3\envs\langgraph\codex.cmd",
r"C:\Users\bowei\.conda\envs\langgraph\codex.cmd",
]:
if Path(candidate).exists():
return candidate
# 3. PATH lookup fallback
found = shutil.which("codex") or shutil.which("codex.cmd")
if found:
return found
# 3. Hardcoded fallback for the original developer machine
fallback = r"C:\Users\bowei\.conda\envs\langgraph\codex.cmd"
if Path(fallback).exists():
return fallback
raise FileNotFoundError(
"Cannot find codex executable. Set CODEX_EXE environment variable or add codex to PATH."
)
@@ -128,6 +131,8 @@ def main() -> int:
command_args,
capture_output=True,
text=True,
encoding="utf-8",
errors="replace",
timeout=timeout,
input=prompt,
cwd=work_dir,