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

Function shouldCollapseForParent

cli/src/utils/constants.ts:72–93  ·  view source on GitHub ↗
(
  childAgentType: string,
  parentAgentType: string | undefined,
)

Source from the content-addressed store, hash-verified

70 * Check if a child agent should be collapsed when spawned by a specific parent
71 */
72export const shouldCollapseForParent = (
73 childAgentType: string,
74 parentAgentType: string | undefined,
75): boolean => {
76 if (!parentAgentType) {
77 return false
78 }
79
80 for (const [parentPattern, childPatterns] of Object.entries(
81 PARENT_CHILD_COLLAPSE_RULES,
82 )) {
83 if (parentAgentType.includes(parentPattern)) {
84 for (const childPattern of childPatterns) {
85 if (childAgentType.includes(childPattern)) {
86 return true
87 }
88 }
89 }
90 }
91
92 return false
93}
94
95// Agent IDs that should render as simple text instead of full agent boxes
96export const SIMPLE_TEXT_AGENT_IDS = [

Callers 1

createAgentBlockFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected