refactor(onboard): extract legacy filename to constant

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
mingmxren 2026-03-04 13:05:16 +08:00
parent ba7ec072cd
commit 9e6c2b2a7b

View file

@ -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
}