Skip to content

feat: add local review mode to cli#285

Open
Sureshkumars wants to merge 1 commit intodevfrom
feat/local-code-review-mode
Open

feat: add local review mode to cli#285
Sureshkumars wants to merge 1 commit intodevfrom
feat/local-code-review-mode

Conversation

@Sureshkumars
Copy link
Member

Summary

  • Adds a dedicated review agent with its own prompt and read-only-oriented permissions, replacing the previous /review command template approach
  • Splits Command state into static (builtin + user config) and dynamic (MCP prompts + Skills) to avoid blocking the command list API on slow MCP/Skill loading
  • Adds agent-switching for commands: when a command specifies an agent field (e.g., /review → review agent), the UI switches to that agent before sending the command, with rollback on error
  • Marks local-review and local-review-uncommitted commands as hidden so they don't appear in the command list UI
  • Enhances the review prompt with detailed instructions for determining review scope, gathering context, and structured output guidelines
kilo-local-code-review.mp4

@kiloconnect
Copy link
Contributor

kiloconnect bot commented Feb 12, 2026

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/command/index.ts 110 Module-scoped resolved flag can block listReady() across instances / worktrees
packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx 588 Non-null assertion on command lookup can crash on racey command list updates
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
Files Reviewed (7 files)

---

## Tools

Use these to inform your review:

- **Explore agent** - Find how existing code handles similar problems. Check patterns, conventions, and prior art before claiming something doesn't fit.
- **Exa Code Context** - Verify correct usage of libraries/APIs before flagging something as wrong.
- **Exa Web Search** - Research best practices if you're unsure about a pattern.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exa makes sense to keep or not?

const restOfInput = firstLineEnd === -1 ? "" : inputText.slice(firstLineEnd + 1)
const args = firstLineArgs.join(" ") + (restOfInput ? "\n" + restOfInput : "")
const commandName = raw.slice(1)
const matched = sync.data.command.find((x) => x.name === commandName)! // kilocode_change
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change markers are not consistent in this file

})),
})
.catch((err) => {
if (customCommand.agent) local.agent.set(previous) // kilocode_change - restore agent on error
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if if the user switches manually meanwhile?

// subtask: true,
// hints: hints(PROMPT_REVIEW),
// },
[Default.REVIEW]: {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this bloat the context window of the active agent for the user? Since the new CLI has subagents, could we not start this exact agent as subagent for the review purpose? Or is that something we don't want todo or build later?

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.

2 participants