Pi.Output (pi_bridge v0.6.22)

Copy Markdown View Source

Eval-friendly structured output helpers for pi renderers.

Summary

Functions

Wraps source code for syntax-highlighted rendering.

Converts a value to structured output when a renderer is available.

Wraps rows as a structured table output.

Wraps plain text output.

Wraps any value as a tree output.

Types

t()

@type t() :: %Pi.Output{
  parts: [Pi.Protocol.Tool.OutputPart.t()],
  text: String.t() | nil
}

Functions

code(source, language \\ :elixir, opts \\ [])

Wraps source code for syntax-highlighted rendering.

output(value, opts \\ [])

Converts a value to structured output when a renderer is available.

table(rows, opts \\ [])

Wraps rows as a structured table output.

text(text, opts \\ [])

Wraps plain text output.

tree(value, opts \\ [])

Wraps any value as a tree output.