MCPcopy
hub / github.com/Agenta-AI/agenta / TreeProps

Interface TreeProps

web/oss/src/components/ui/CustomTreeComponent/index.tsx:27–51  ·  view source on GitHub ↗

* CustomTree is a recursive tree view component for rendering a hierarchy of nodes. * * This component is highly customizable and highlights the selected node. * It supports displaying additional metrics like latency, cost, and token usage. * * Example usage: * ```tsx * <CustomTree * data=

Source from the content-addressed store, hash-verified

25 * ```
26 */
27interface TreeProps {
28 /**
29 * Root node of the hierarchical data structure.
30 */
31 data: _AgentaRootsResponse
32
33 /**
34 * Settings for what additional metrics to show in each node.
35 */
36 settings: {
37 latency: boolean
38 cost: boolean
39 tokens: boolean
40 }
41
42 /**
43 * The currently selected node key (ID).
44 */
45 selectedKey: string | null
46
47 /**
48 * Function to handle when a node is selected.
49 */
50 onSelect: (key: string) => void
51}
52
53const TreeNodeComponent: React.FC<{
54 node: _AgentaRootsResponse

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected