refactor(agentic): split review queue handler

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-04-01 18:04:39 +00:00
parent 238be05fa8
commit 87445d9387
2 changed files with 12 additions and 3 deletions

View file

@ -35,7 +35,7 @@ func (s *PrepSubsystem) registerCommands(ctx context.Context) {
c.Command("lang/list", core.Command{Description: "List supported language identifiers", Action: s.cmdLangList})
c.Command("plan-cleanup", core.Command{Description: "Permanently delete archived plans past the retention period", Action: s.cmdPlanCleanup})
c.Command("pr-manage", core.Command{Description: "Manage open PRs (merge, close, review)", Action: s.cmdPRManage})
c.Command("review-queue", core.Command{Description: "Process the CodeRabbit review queue", Action: s.cmdPRManage})
c.Command("review-queue", core.Command{Description: "Process the CodeRabbit review queue", Action: s.cmdReviewQueue})
c.Command("status", core.Command{Description: "List agent workspace statuses", Action: s.cmdStatus})
c.Command("prompt", core.Command{Description: "Build and display an agent prompt for a repo", Action: s.cmdPrompt})
c.Command("extract", core.Command{Description: "Extract a workspace template to a directory", Action: s.cmdExtract})

View file

@ -72,12 +72,12 @@ func reviewQueueReviewers(reviewer string) []string {
}
}
// result := c.Command("pr-manage").Run(ctx, core.NewOptions(
// result := c.Command("review-queue").Run(ctx, core.NewOptions(
//
// core.Option{Key: "limit", Value: 4},
//
// ))
func (s *PrepSubsystem) cmdPRManage(options core.Options) core.Result {
func (s *PrepSubsystem) cmdReviewQueue(options core.Options) core.Result {
ctx := s.commandContext()
input := ReviewQueueInput{
Limit: optionIntValue(options, "limit"),
@ -105,6 +105,15 @@ func (s *PrepSubsystem) cmdPRManage(options core.Options) core.Result {
return core.Result{Value: output, OK: true}
}
// result := c.Command("pr-manage").Run(ctx, core.NewOptions(
//
// core.Option{Key: "limit", Value: 4},
//
// ))
func (s *PrepSubsystem) cmdPRManage(options core.Options) core.Result {
return s.cmdReviewQueue(options)
}
func (s *PrepSubsystem) reviewQueue(ctx context.Context, _ *mcp.CallToolRequest, input ReviewQueueInput) (*mcp.CallToolResult, ReviewQueueOutput, error) {
limit := input.Limit
if limit <= 0 {