From c19d987894613317c60f97c31f5eed17aa63b2f8 Mon Sep 17 00:00:00 2001 From: Mikael Hugo Date: Sat, 2 May 2026 14:24:23 +0200 Subject: [PATCH] fix(sf): wire /sf rate to manual ops dispatcher MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /sf rate was advertised in commands/catalog.ts and reachable from auto-mode but had no branch in the manual ops handler — typing /sf rate outside auto-mode silently no-op'd because ops.ts had no trimmed.startsWith("rate ") branch. Add the dispatch alongside the existing /sf todo branch using the same lazy-import pattern. handleRate from commands-rate.ts already exists. Resolves: sf-monzctqn-m42nlq (command-dispatch-gap). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../extensions/sf/commands/handlers/ops.ts | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/resources/extensions/sf/commands/handlers/ops.ts b/src/resources/extensions/sf/commands/handlers/ops.ts index 4c5492d0a..970af1eb2 100644 --- a/src/resources/extensions/sf/commands/handlers/ops.ts +++ b/src/resources/extensions/sf/commands/handlers/ops.ts @@ -26,6 +26,7 @@ import { handleSkip, } from "../../commands-maintenance.js"; import { handlePrBranch } from "../../commands-pr-branch.js"; +import { handleRate } from "../../commands-rate.js"; import { handleSessionReport } from "../../commands-session-report.js"; import { handleShip } from "../../commands-ship.js"; import { handleExport } from "../../export.js"; @@ -136,6 +137,14 @@ export async function handleOpsCommand( await handleRecover(ctx, projectRoot()); return true; } + if (trimmed === "rate" || trimmed.startsWith("rate ")) { + await handleRate( + trimmed.replace(/^rate\s*/, "").trim(), + ctx, + projectRoot(), + ); + return true; + } if (trimmed === "export" || trimmed.startsWith("export ")) { await handleExport( trimmed.replace(/^export\s*/, "").trim(), @@ -189,6 +198,15 @@ export async function handleOpsCommand( await handleTodo(trimmed.replace(/^todo\s*/, "").trim(), ctx, pi); return true; } + if (trimmed === "rate" || trimmed.startsWith("rate ")) { + const { handleRate } = await import("../../commands-rate.js"); + await handleRate( + trimmed.replace(/^rate\s*/, "").trim(), + ctx, + process.cwd(), + ); + return true; + } if (trimmed === "config") { await handleConfig(ctx); return true; @@ -377,10 +395,7 @@ Examples: trimmed.startsWith("wt ") ) { const { handleWorktree } = await import("../../commands-worktree.js"); - await handleWorktree( - trimmed.replace(/^(worktree|wt)\s*/, "").trim(), - ctx, - ); + await handleWorktree(trimmed.replace(/^(worktree|wt)\s*/, "").trim(), ctx); return true; } if (trimmed === "eval-review" || trimmed.startsWith("eval-review ")) {