From e104f17ad209666400f1f7251251bc991e2e93e6 Mon Sep 17 00:00:00 2001 From: Mikael Hugo Date: Sat, 2 May 2026 23:15:20 +0200 Subject: [PATCH] feat(sf): /sf escalate list distinguishes auto-accepted from user-resolved MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Auto-mode resolutions stamp the artifact with userRationale prefix "auto-mode: ..." (set by auto-dispatch.ts when it auto-resolves an escalation). The list view now shows "auto-accepted (accept)" for those entries vs "resolved (option-id)" for user-resolved ones, so an operator scanning `/sf escalate list --all` can tell at a glance which decisions were autonomous and which had explicit human input. The artifact JSON is unchanged — this is purely a list-formatter refinement that surfaces information already recorded. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/resources/extensions/sf/commands-escalate.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/resources/extensions/sf/commands-escalate.ts b/src/resources/extensions/sf/commands-escalate.ts index 72feedcc0..b40bae30b 100644 --- a/src/resources/extensions/sf/commands-escalate.ts +++ b/src/resources/extensions/sf/commands-escalate.ts @@ -73,12 +73,16 @@ export async function handleEscalate( const art = readEscalationArtifact(task.escalation_artifact_path); if (!art) continue; count++; + const isAutoResolved = + art.respondedAt && art.userRationale?.startsWith("auto-mode:"); const status = task.escalation_pending === 1 ? "PENDING" : task.escalation_awaiting_review === 1 ? "awaiting-review" : art.respondedAt - ? `resolved (${art.userChoice})` + ? isAutoResolved + ? `auto-accepted (${art.userChoice})` + : `resolved (${art.userChoice})` : "(unknown)"; lines.push(` ${task.slice_id}/${task.id} [${status}]: ${art.question}`); if (status === "PENDING") {