feat: add jam review command#10
Merged
Merged
Conversation
- Add `jam review` command to AI-review a branch diff or a PR - Exports: getMergeBase, getBranchDiff, getPrDiff, getCurrentBranch, buildReviewPrompt, runReview - Options: --base <ref> (default: main), --pr <number>, --json - Register command in src/index.ts - Add 16 unit tests in src/commands/review.test.ts Closes #7
String.repeat() throws when given a negative count. The pad helper was computing innerWidth - 2 - s.length on strings that already contained ANSI escape codes, so the invisible bytes inflated s.length past the box width. Strip ANSI codes via a regex before measuring visible length and add Math.max(0, …) as a safety guard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #7 — adds a
jam reviewcommand that uses AI to review a git branch diff or a GitHub PR.Changes
src/commands/review.ts— new command module withgetMergeBase,getBranchDiff,getPrDiff,getCurrentBranch,buildReviewPrompt,runReviewsrc/index.ts— registers thereviewcommand with--baseand--proptionssrc/commands/review.test.ts— 16 unit tests covering all helpers and the fullrunReviewflowUsage
Closes #7