Skip to content

feat: support reviewing uncommitted changes - #26

Open
codewithfourtix wants to merge 1 commit into
gemini-cli-extensions:mainfrom
codewithfourtix:fix/local-code-review-scope
Open

codewithfourtix wants to merge 1 commit into
gemini-cli-extensions:mainfrom
codewithfourtix:fix/local-code-review-scope

Conversation

@codewithfourtix

Copy link
Copy Markdown

Fixes #17.

/code-review always instructed the model to compare against the merge base with origin/HEAD, even when the user asked to review only uncommitted changes.

Pass the user's request into the prompt with {{args}} and use git diff -U5 HEAD for explicit local, uncommitted, or working-tree requests. Keep the existing branch comparison as the default. Add a README example and explain how staged, unstaged, and untracked files are handled.

Validation:

  • Parsed both command definitions with Python 3.12's TOML parser.
  • Checked both Git commands in isolated repositories covering committed-only, unstaged, staged, and mixed changes. The local diff excludes committed branch work; the default comparison still includes it.
  • git diff --check passed.

The Git commands and prompt syntax were checked locally; a live model-driven review was not run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

INSTRUCTION focus on Branch/Remote Changes only

1 participant