-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat(cli): unify local review commands under /review #11084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
46c04f0
fix(cli): redirect deprecated /review to /local-review-uncommitted
maphew 69e5c58
fix(cli): resolve review bot code issues and add changeset
maphew 396845f
fix(cli): handle argument-based /review invocations in deprecated com…
kilo-code-bot[bot] 66e9bbf
Merge branch 'main' into main
maphew 6165acb
Merge branch 'main' into main
maphew 4134243
Merge branch 'main' into main
maphew dfaca49
feat(opencode): unify local review commands under `/review`
maphew 5978bf7
fix(cli): preserve legacy review command aliases
maphew 04c8780
fix(cli): make /review the only review command
alex-alecu 3e7e03d
Merge remote-tracking branch 'origin/main' into maphew/main
alex-alecu 830199b
Merge branch 'main' into main
alex-alecu ef3c23c
fix(review): prefer commit refs
alex-alecu 9818996
Merge branch 'main' into main
alex-alecu 468190f
test(cli): refresh llm fixtures
alex-alecu b5525fd
Merge branch 'main' into main
alex-alecu 8ea9628
fix(review): keep legacy aliases
alex-alecu a013741
fix(review): narrow dead code
alex-alecu c2636fb
fix(review): reject merge commits
alex-alecu 7ddfc19
fix(review): validate base refs
alex-alecu fe3a763
feat(review): skip subagents on small diffs
alex-alecu 496f743
Merge branch 'main' into main
alex-alecu cdd0137
refactor(cli): focus soul on personality
alex-alecu 98ca191
test(cli): update review command expectations
alex-alecu b6d02fd
Merge branch 'main' into main
alex-alecu eb40da5
Merge branch 'main' into main
alex-alecu ac93273
fix(ci): harden visual regression installs
alex-alecu 11c6b79
fix(ci): include setup action filter
alex-alecu 2781d45
fix(cli): restore deprecated review aliases
alex-alecu 8b7b69b
Merge branch 'main' into main
alex-alecu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@kilocode/cli": patch | ||
| --- | ||
|
|
||
| Use `/review` as the single local review command, defaulting to staged, unstaged, and untracked changes while supporting guided uncommitted reviews, branch/base reviews, commits, and pull requests. Show deprecation notices for `/local-review` and `/local-review-uncommitted` that point to the matching `/review` modes. |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,38 +1,52 @@ | ||
| import type { Command } from "@/command" | ||
| import type { ReviewCommand } from "@kilocode/kilo-telemetry" | ||
| import LOCAL_REVIEW from "./local-review.txt" | ||
| import LOCAL_REVIEW_UNCOMMITTED from "./local-review-uncommitted.txt" | ||
| import REVIEW from "./review.txt" | ||
|
|
||
| const legacy = { | ||
| "local-review": { | ||
| description: "deprecated; use /review branch", | ||
| message: "/local-review is deprecated and no longer runs a review. Use /review branch instead.", | ||
| }, | ||
| "local-review-uncommitted": { | ||
| description: "deprecated; use /review uncommitted", | ||
| message: "/local-review-uncommitted is deprecated and no longer runs a review. Use /review uncommitted instead.", | ||
| }, | ||
| } | ||
|
|
||
| export function isReviewCommand(command: string | undefined): command is ReviewCommand { | ||
| return command === "review" || command === "local-review" || command === "local-review-uncommitted" | ||
| return command === "review" | ||
|
alex-alecu marked this conversation as resolved.
|
||
| } | ||
|
|
||
| export function reviewCommandName(command: string | undefined): ReviewCommand | undefined { | ||
| if (isReviewCommand(command)) return command | ||
| } | ||
|
|
||
| export function parseReviewCommand(prompt: string | undefined): ReviewCommand | undefined { | ||
| if (!prompt?.startsWith("/")) return | ||
| const name = prompt.slice(1).split(/\s/, 1)[0] | ||
| if (isReviewCommand(name)) return name | ||
| return reviewCommandName(name) | ||
| } | ||
|
|
||
| /** | ||
| * /local-review-uncommitted - local review (uncommitted changes) | ||
| */ | ||
| export function localReviewUncommittedCommand(): Command.Info { | ||
| export function reviewCommand(): Command.Info { | ||
| return { | ||
| name: "local-review-uncommitted", | ||
| description: "local review (uncommitted changes)", | ||
| template: LOCAL_REVIEW_UNCOMMITTED, | ||
| name: "review", | ||
| description: "review changes [uncommitted|commit|branch|pr]", | ||
| template: REVIEW, | ||
| hints: ["$ARGUMENTS"], | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * /local-review - local review (current branch vs base) | ||
| */ | ||
| export function localReviewCommand(): Command.Info { | ||
| export function legacyReviewMessage(name: string) { | ||
| return legacy[name as keyof typeof legacy]?.message | ||
| } | ||
|
|
||
| export function legacyReviewCommand(name: string): Command.Info | undefined { | ||
| const item = legacy[name as keyof typeof legacy] | ||
| if (!item) return | ||
| return { | ||
| name: "local-review", | ||
| description: "local review (current branch, optional base or instructions)", | ||
| template: LOCAL_REVIEW, | ||
| hints: ["$ARGUMENTS"], | ||
| name, | ||
| description: item.description, | ||
| template: item.message, | ||
| hints: [], | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.