(
toolCallId: string,
agents: Array<{ agent_type?: string; prompt?: string }>,
)
| 92 | // ----------------------------------------------------------------------------- |
| 93 | |
| 94 | export const createSpawnAgentBlocks = ( |
| 95 | toolCallId: string, |
| 96 | agents: Array<{ agent_type?: string; prompt?: string }>, |
| 97 | ): ContentBlock[] => |
| 98 | agents |
| 99 | .map((agent, index) => ({ agent, index })) |
| 100 | .filter(({ agent }) => !shouldHideAgent(agent.agent_type || '')) |
| 101 | .map(({ agent, index }) => |
| 102 | createAgentBlock({ |
| 103 | agentId: `${toolCallId}-${index}`, |
| 104 | agentType: agent.agent_type || '', |
| 105 | prompt: agent.prompt, |
| 106 | }), |
| 107 | ) |
| 108 | |
| 109 | export const isSpawnAgentsResult = (outputValue: unknown): boolean => |
| 110 | Array.isArray(outputValue) && |
no test coverage detected