agent: simplify AgentConfigPath to plain concatenation, remove dead config.json fallback

This commit is contained in:
Levi Neely 2026-04-21 16:06:07 +02:00
parent 31a6937d46
commit 4710e3239f
1 changed files with 1 additions and 8 deletions

View File

@ -154,14 +154,7 @@ func expandSystemPrompt(content, cwd string) string {
// AgentConfigPath resolves the config file path for a named agent.
func AgentConfigPath(agentsDir, name string) string {
p := agentsDir + "/" + name + ".json"
if _, err := os.Stat(p); err == nil {
return p
}
if name == "default" {
return paths.CfgDir() + "/config.json"
}
return p
return agentsDir + "/" + name + ".json"
}
// NewSessionID generates a unique, lexicographically sortable session identifier.