Skip to content

[FEATURE]: Allow specifying base branch for /local-review command #8724

@DK-Stern

Description

@DK-Stern

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem

The /local-review command currently auto-detects the base branch using a fixed priority (main > master > dev > develop). There is no way to explicitly specify a different base branch (e.g. /local-review origin/develop).

Current Behavior

buildReviewPromptBranch() in packages/opencode/src/kilocode/review/review.ts always calls getBaseBranch() internally and does not accept any parameters. While the lower-level getBranchChanges(baseBranch?) already supports an optional base branch argument, it is never exposed to the user.

The argument-parsing logic in SessionPrompt.command() (packages/opencode/src/session/prompt.ts) would append user-provided arguments to the end of the template, but at that point the base branch is already baked into the generated prompt.

Desired Behavior

Users should be able to specify the base branch as an argument:

/local-review origin/develop

If no argument is provided, the current auto-detection logic should remain as the default.

Affected Files

  • packages/opencode/src/kilocode/review/review.tsbuildReviewPromptBranch() needs an optional parameter
  • packages/opencode/src/kilocode/review/command.tslocalReviewCommand() needs to pass arguments through to the review builder

Use Case

Projects that use a branch other than main/master/dev/develop as their integration branch (or need to review against a specific remote branch like origin/develop) currently have no way to do so with /local-review.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions