Skip to main content

toAsciiTree()

toAsciiTree(graph): string

Defined in: visualize.ts:88

Render an ExecutionGraph as an ASCII tree showing parent-child hierarchy.

Parameters

ParameterTypeDescription
graphExecutionGraphThe execution graph to render.

Returns

string

A multi-line string showing the tree with status icons, durations, and metadata.

Example

console.log(toAsciiTree(graph));
// ✓ main (agent) 4.2s
// ├─ ✓ search (tool) 1.1s
// └─ ✗ analyze (tool) 0.5s — Error: rate limit