agent-playground / Exports / IBlockDataCollector
Interface: IBlockDataCollector
Block data collector interface for capturing tool executions
Hierarchy
IBlockDataCollector
Table of contents
Methods
- collectBlock
- updateBlock
- getBlocks
- getBlocksByParent
- clearBlocks
- generateBlockId
- createGroupBlock
- getStats
- addListener
- removeListener
Methods
collectBlock
▸ collectBlock(message): void
Collect a new block message
Parameters
| Name | Type |
|---|---|
message | IBlockMessage |
Returns
void
Defined in
agent-playground/src/lib/playground/block-tracking/types.ts:175
updateBlock
▸ updateBlock(blockId, updates): void
Update an existing block
Parameters
| Name | Type |
|---|---|
blockId | string |
updates | Partial<IBlockMetadata> |
Returns
void
Defined in
agent-playground/src/lib/playground/block-tracking/types.ts:178
getBlocks
▸ getBlocks(): IBlockMessage[]
Get all collected blocks
Returns
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
| Name | Type |
|---|---|
parentId? | string |
Returns
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
| Name | Type |
|---|---|
type | "user" | "assistant" | "tool_call" | "group" |
content | string |
parentId? | string |
level? | number |
Returns
Defined in
agent-playground/src/lib/playground/block-tracking/types.ts:193
getStats
▸ getStats(): Object
Get statistics about collected blocks
Returns
Object
| Name | Type |
|---|---|
total | number |
byType | Record<string, number> |
byState | Record<string, number> |
rootBlocks | number |
Defined in
agent-playground/src/lib/playground/block-tracking/types.ts:201
addListener
▸ addListener(listener): void
Add event listener
Parameters
| Name | Type |
|---|---|
listener | TBlockCollectionListener |
Returns
void
Defined in
agent-playground/src/lib/playground/block-tracking/types.ts:209
removeListener
▸ removeListener(listener): void
Remove event listener
Parameters
| Name | Type |
|---|---|
listener | TBlockCollectionListener |
Returns
void
Defined in
agent-playground/src/lib/playground/block-tracking/types.ts:212