From 7bbe2370d7c775208451ed231454e782aded8389 Mon Sep 17 00:00:00 2001 From: GRayHook Date: Wed, 17 Jun 2026 12:02:48 +0700 Subject: [PATCH] =?UTF-8?q?Phase=208:=20mark=20manual=20compaction=20from?= =?UTF-8?q?=20/compact=20input=20=E2=80=94=20SPEC=20=C2=A78=20input=20hook?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sets pendingCompactionSource before expansion when user text starts with /compact. Co-authored-by: Cursor --- src/compaction.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/compaction.ts b/src/compaction.ts index 6bf2ff4..a49cf72 100644 --- a/src/compaction.ts +++ b/src/compaction.ts @@ -10,3 +10,10 @@ export function createCompactionRuntime(): CompactionRuntime { pendingCompactionSource: null, }; } + +/** Input hook before expansion: user `/compact` marks manual source (SPEC ยง8). */ +export function markManualCompactionFromInput(text: string, runtime: CompactionRuntime): void { + if (text.startsWith("/compact")) { + runtime.pendingCompactionSource = "manual"; + } +}