MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / createSpawnAgentBlocks

Function createSpawnAgentBlocks

cli/src/utils/send-message-helpers.ts:94–107  ·  view source on GitHub ↗
(
  toolCallId: string,
  agents: Array<{ agent_type?: string; prompt?: string }>,
)

Source from the content-addressed store, hash-verified

92// -----------------------------------------------------------------------------
93
94export 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
109export const isSpawnAgentsResult = (outputValue: unknown): boolean =>
110 Array.isArray(outputValue) &&

Callers 1

Calls 2

shouldHideAgentFunction · 0.90
createAgentBlockFunction · 0.90

Tested by

no test coverage detected