From 47d2259fe1e2bb2c5e780979c1bec48abbe00665 Mon Sep 17 00:00:00 2001 From: Junjun Zhang Date: Wed, 21 Oct 2026 03:36:00 +0800 Subject: [PATCH] chore: remove confirmed dead code Remove AutoMemory.forgottenLine (deadcode r75, internal/memory scan): zero references repo-wide (grep dual-check, not even tests); its doc comment claims 'used by list views' but no caller exists. Also drops the now-orphaned strings import in forget.go. Verified: go build -tags goolm ./..., go vet ./internal/memory/ ./internal/context/, go test ./internal/memory/ all green. --- internal/memory/forget.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/internal/memory/forget.go b/internal/memory/forget.go index f4308cd93..3f1d49b9a 100644 --- a/internal/memory/forget.go +++ b/internal/memory/forget.go @@ -6,7 +6,6 @@ import ( "os" "path/filepath" "sort" - "strings" "time" "github.com/topcheer/ggcode/internal/debug" @@ -138,14 +137,3 @@ func (am *AutoMemory) ListForgotten() []string { } return out } - -// forgottenLine returns one display line for a forgotten key, or "" when -// the key is not forgotten. Used by list views that annotate entries. -func (am *AutoMemory) forgottenLine(key string) string { - f := am.loadForgotten() - at, ok := f.Entries[key] - if !ok { - return "" - } - return strings.TrimSpace(fmt.Sprintf("%s [forgotten %s ago]", key, time.Since(at).Round(time.Minute))) -}