@sqlrooms/ai-core / collectHoistableRenderers
Function: collectHoistableRenderers()
collectHoistableRenderers(
toolCalls,agentProgress,toolRenderers,hoistableToolNames):HoistableToolCall[]
Recursively walk an AgentToolCall tree and collect every tool call that has a registered renderer AND is in the explicit hoistable set. Results are returned in depth-first order so they appear in the natural execution sequence.
Agent tool calls (name starts with agent-) are never themselves hoisted — only their leaf tool calls with renderers are collected.
Parameters
| Parameter | Type | Description |
|---|---|---|
toolCalls | AgentToolCall[] | - |
agentProgress | Record<string, AgentToolCall[]> | - |
toolRenderers | ToolRendererRegistry | - |
hoistableToolNames | ReadonlySet<string> | Set of tool names whose renderers should be hoisted. If empty, nothing is hoisted (safe default). This is typically the hoistedRenderers list from the parent context. |
