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

Function createAgentBlock

cli/src/utils/__tests__/collapse-helpers.test.ts:48–63  ·  view source on GitHub ↗
(
  agentId: string,
  isCollapsed?: boolean,
  userOpened?: boolean,
  nestedBlocks?: ContentBlock[],
)

Source from the content-addressed store, hash-verified

46
47// Helper to create agent blocks
48const createAgentBlock = (
49 agentId: string,
50 isCollapsed?: boolean,
51 userOpened?: boolean,
52 nestedBlocks?: ContentBlock[],
53): ContentBlock => ({
54 type: 'agent',
55 agentId,
56 agentName: 'Test Agent',
57 agentType: 'test-agent',
58 content: '',
59 status: 'complete',
60 isCollapsed,
61 userOpened,
62 blocks: nestedBlocks,
63})
64
65// Helper to create thinking/text blocks with thinkingId
66const createThinkingBlock = (

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected