fix(zwsp): strip zero-width chars in delegate-task tools

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-04-08 13:02:05 +09:00
parent 317e2c6465
commit e8d83b5f98
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -89,9 +89,10 @@ Create the work plan directly - that's your job as the planning agent.`,
const callableAgents = agents.filter((agent) => isTaskCallableAgentMode(agent.mode))
const resolvedDisplayName = getAgentDisplayName(agentToUse)
const resolvedDisplayName = getAgentDisplayName(agentToUse).replace(/^\u200B+/, "")
const normalizedAgentToUse = agentToUse.replace(/^\u200B+/, "")
const matchedAgent = callableAgents.find(
(agent) => agent.name.toLowerCase() === agentToUse.toLowerCase()
(agent) => agent.name.toLowerCase() === normalizedAgentToUse.toLowerCase()
|| agent.name.toLowerCase() === resolvedDisplayName.toLowerCase()
)
if (!matchedAgent) {