DefaultRenderer
Default fallback renderer. Returns plain text or JSON when no channel-specific renderer is available.
DefaultRenderer::supports()
public function supports(string $channel): boolCheck whether this renderer handles the given channel; always true since it is the last-resort fallback used when no channel-specific renderer claims the channel.
Parameters
| Name | Type | Description |
|---|---|---|
| $channel | string |
DefaultRenderer::render()
public function render(Milpa\ToolRuntime\ToolResult $result, ?Milpa\ToolRuntime\Contracts\ToolContext $ctx = null): stringRender a ToolResult as plain text, appending pagination info or a block suggestion when present in the result's metadata.
Parameters
| Name | Type | Description |
|---|---|---|
| $result | Milpa\ToolRuntime\ToolResult | |
| $ctx | ?Milpa\ToolRuntime\Contracts\ToolContext |