fix(delegate-task): apply getAgentConfigKey normalization to isPlanAgent
isPlanFamily was already fixed to normalize display names via getAgentConfigKey, but isPlanAgent still used raw agentName.toLowerCase() without normalization. Apply the same fix to isPlanAgent for consistency. Also fixes test title: 'returns true for planner' was describing the OLD includes-based behavior (the bug), but the assertion already expected false. Add regression tests covering Metis/Momus/Atlas display names for both functions. Fixes #3312
This commit is contained in:
@@ -325,7 +325,7 @@ export const PLAN_AGENT_NAMES = ["plan"]
|
||||
*/
|
||||
export function isPlanAgent(agentName: string | undefined): boolean {
|
||||
if (!agentName) return false
|
||||
const lowerName = agentName.toLowerCase().trim()
|
||||
const lowerName = getAgentConfigKey(agentName).toLowerCase().trim()
|
||||
return PLAN_AGENT_NAMES.some(name => lowerName === name)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user