Skip to content

agent-playground / Exports / IBlockDataCollector

Interface: IBlockDataCollector

Block data collector interface for capturing tool executions

Hierarchy

Table of contents

Methods

Methods

collectBlock

collectBlock(message): void

Collect a new block message

Parameters

NameType
messageIBlockMessage

Returns

void

Defined in

agent-playground/src/lib/playground/block-tracking/types.ts:175


updateBlock

updateBlock(blockId, updates): void

Update an existing block

Parameters

NameType
blockIdstring
updatesPartial<IBlockMetadata>

Returns

void

Defined in

agent-playground/src/lib/playground/block-tracking/types.ts:178


getBlocks

getBlocks(): IBlockMessage[]

Get all collected blocks

Returns

IBlockMessage[]

Defined in

agent-playground/src/lib/playground/block-tracking/types.ts:181


getBlocksByParent

getBlocksByParent(parentId?): IBlockMessage[]

Get blocks by parent ID for hierarchical rendering

Parameters

NameType
parentId?string

Returns

IBlockMessage[]

Defined in

agent-playground/src/lib/playground/block-tracking/types.ts:184


clearBlocks

clearBlocks(): void

Clear all blocks

Returns

void

Defined in

agent-playground/src/lib/playground/block-tracking/types.ts:187


generateBlockId

generateBlockId(): string

Generate unique block ID

Returns

string

Defined in

agent-playground/src/lib/playground/block-tracking/types.ts:190


createGroupBlock

createGroupBlock(type, content, parentId?, level?): IBlockMessage

Create a group block that can contain other blocks

Parameters

NameType
type"user" | "assistant" | "tool_call" | "group"
contentstring
parentId?string
level?number

Returns

IBlockMessage

Defined in

agent-playground/src/lib/playground/block-tracking/types.ts:193


getStats

getStats(): Object

Get statistics about collected blocks

Returns

Object

NameType
totalnumber
byTypeRecord<string, number>
byStateRecord<string, number>
rootBlocksnumber

Defined in

agent-playground/src/lib/playground/block-tracking/types.ts:201


addListener

addListener(listener): void

Add event listener

Parameters

NameType
listenerTBlockCollectionListener

Returns

void

Defined in

agent-playground/src/lib/playground/block-tracking/types.ts:209


removeListener

removeListener(listener): void

Remove event listener

Parameters

NameType
listenerTBlockCollectionListener

Returns

void

Defined in

agent-playground/src/lib/playground/block-tracking/types.ts:212

Released under the MIT License.