From 5d7661d7491bfce75619203103405005074b921a Mon Sep 17 00:00:00 2001 From: Junjun Zhang Date: Thu, 22 Oct 2026 21:34:39 +0800 Subject: [PATCH] chore: remove confirmed dead code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove adhocEnvTouched (cmd/ggcode/adhoc.go) — unreachable from any main entrypoint and zero references repo-wide incl. tests (verified via deadcode -tags goolm + repo-wide grep dual-check, round 85). --- cmd/ggcode/adhoc.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/cmd/ggcode/adhoc.go b/cmd/ggcode/adhoc.go index b69bb72b7..6d96598c2 100644 --- a/cmd/ggcode/adhoc.go +++ b/cmd/ggcode/adhoc.go @@ -76,17 +76,6 @@ const ( adhocEnvRetryAlways = "GGCODE_LLM_RETRY_ALWAYS" ) -// adhocEnvTouched reports whether any GGCODE_LLM_* provider variable is set -// (used for the partial-pair diagnostic: env half-set deserves a hint). -func adhocEnvTouched() bool { - for _, k := range []string{adhocEnvBaseURL, adhocEnvModel, adhocEnvAPIKey, adhocEnvProtocol, adhocEnvContextWindow, adhocEnvMaxTokens, adhocEnvRetryAlways} { - if strings.TrimSpace(os.Getenv(k)) != "" { - return true - } - } - return false -} - // synthesizeAdhocConfig builds the in-memory Config for ad-hoc mode. It must // never touch the filesystem: no load, no save path is viable later either, // because root.go passes cfgFile="" which disables the hot-reload watcher and