Files
Genarrative/.codex/config.toml
2026-05-21 20:21:32 +08:00

24 lines
974 B
TOML

# Genarrative 项目级 Codex 配置。
# 这里仅保存可进入仓库的 hook 配置与脚本;个人 token、MCP server、模型路由仍放在个人 ~/.codex/config.toml。
[features]
hooks = true
# Codex 准备执行 git commit 前检查 TypeScript / admin-web / api-server 编译错误。
# 脚本也可手动运行:
# node .codex/hooks/pre-submit-compile-check.mjs
[[hooks.PreToolUse]]
matcher = "Bash|shell_command|functions.shell_command"
command = "node .codex/hooks/pre-submit-compile-check.mjs"
timeout = 180
statusMessage = "提交前检查编译错误"
# Codex 每次工具修改文件后执行:同步 CodeGraph 索引。
# 脚本也可手动运行:
# node .codex/hooks/post-edit-codegraph-sync.mjs
[[hooks.PostToolUse]]
matcher = "Bash|Edit|MultiEdit|Write|apply_patch|shell_command|functions.shell_command|functions.apply_patch"
command = "node .codex/hooks/post-edit-codegraph-sync.mjs"
timeout = 60
statusMessage = "更新 CodeGraph 索引"