From 9e6c2b2a7b7edb3bbaba7fa3b9d06519f4140656 Mon Sep 17 00:00:00 2001 From: mingmxren Date: Wed, 4 Mar 2026 13:05:16 +0800 Subject: [PATCH] refactor(onboard): extract legacy filename to constant Co-Authored-By: Claude Opus 4.6 --- cmd/picoclaw/internal/onboard/helpers.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/picoclaw/internal/onboard/helpers.go b/cmd/picoclaw/internal/onboard/helpers.go index 6acc64eef..e1e443e96 100644 --- a/cmd/picoclaw/internal/onboard/helpers.go +++ b/cmd/picoclaw/internal/onboard/helpers.go @@ -10,6 +10,9 @@ import ( "github.com/sipeed/picoclaw/pkg/config" ) +// legacyAgentFile is the old workspace template filename superseded by AGENTS.md. +const legacyAgentFile = "AGENT.md" + func onboard() { configPath := internal.GetConfigPath() @@ -71,7 +74,7 @@ func copyEmbeddedToTarget(targetDir string) error { } // Skip legacy file superseded by AGENTS.md - if filepath.Base(path) == "AGENT.md" { + if filepath.Base(path) == legacyAgentFile { return nil }