From 8bc73a2bfd2a5fcaaff586a23e6f5f9bf7a7f722 Mon Sep 17 00:00:00 2001 From: dedrisian-oai Date: Mon, 22 Sep 2025 12:34:08 -0700 Subject: [PATCH] Fix branch mode prompt for /review (#4061) Updates `/review` branch mode to review against a branch's upstream. --- codex-rs/tui/src/chatwidget.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rs index 32375a86..e06aeb29 100644 --- a/codex-rs/tui/src/chatwidget.rs +++ b/codex-rs/tui/src/chatwidget.rs @@ -1666,7 +1666,7 @@ impl ChatWidget { tx3.send(AppEvent::CodexOp(Op::Review { review_request: ReviewRequest { prompt: format!( - "Review the code changes against the base branch '{branch}'. Start by finding the merge diff between the current branch and {branch} e.g. (git merge-base HEAD {branch}), then run `git diff` against that SHA to see what changes we would merge into the {branch} branch. Provide prioritized, actionable findings." + "Review the code changes against the base branch '{branch}'. Start by finding the merge diff between the current branch and {branch}'s upstream e.g. (`git merge-base HEAD \"$(git rev-parse --abbrev-ref \"{branch}@{{upstream}}\")\"`), then run `git diff` against that SHA to see what changes we would merge into the {branch} branch. Provide prioritized, actionable findings." ), user_facing_hint: format!("changes against '{branch}'"), },