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:
@@ -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 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(
|
const matchedAgent = callableAgents.find(
|
||||||
(agent) => agent.name.toLowerCase() === agentToUse.toLowerCase()
|
(agent) => agent.name.toLowerCase() === normalizedAgentToUse.toLowerCase()
|
||||||
|| agent.name.toLowerCase() === resolvedDisplayName.toLowerCase()
|
|| agent.name.toLowerCase() === resolvedDisplayName.toLowerCase()
|
||||||
)
|
)
|
||||||
if (!matchedAgent) {
|
if (!matchedAgent) {
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ export async function sendSyncPrompt(
|
|||||||
const promptArgs = {
|
const promptArgs = {
|
||||||
path: { id: input.sessionID },
|
path: { id: input.sessionID },
|
||||||
body: {
|
body: {
|
||||||
agent: input.agentToUse,
|
agent: input.agentToUse.replace(/^\u200B+/, ""),
|
||||||
system: input.systemContent,
|
system: input.systemContent,
|
||||||
tools,
|
tools,
|
||||||
parts: [createInternalAgentTextPart(effectivePrompt)],
|
parts: [createInternalAgentTextPart(effectivePrompt)],
|
||||||
|
|||||||
Reference in New Issue
Block a user