feat: add --mode review support for codex CLI

- Add 'review' to mode enum in ParamsSchema and schema
- Implement codex review subcommand in buildCommand (uses --uncommitted by default)
- Other tools (gemini/qwen/claude) accept review mode but no operation change
- Update cli-tools-usage.md with review mode documentation
This commit is contained in:
catlog22
2026-01-16 13:01:02 +08:00
parent d81dfaf143
commit d515090097
4 changed files with 50 additions and 11 deletions

View File

@@ -223,7 +223,21 @@ export function buildCommand(params: {
case 'codex':
useStdin = true;
if (nativeResume?.enabled) {
if (mode === 'review') {
// codex review mode: non-interactive code review
// Format: codex review [OPTIONS] [PROMPT]
args.push('review');
// Default to --uncommitted if no specific review target in prompt
args.push('--uncommitted');
if (model) {
args.push('-m', model);
}
// codex review uses positional prompt argument, not stdin
useStdin = false;
if (prompt) {
args.push(prompt);
}
} else if (nativeResume?.enabled) {
args.push('resume');
if (nativeResume.isLatest) {
args.push('--last');