Skip to main content

Module output_adapters

Module output_adapters 

Source
Expand description

output_adapters — Pluggable output renderers for draft review (v0.2.3).

Output adapters transform DraftPackage data into different formats for review:

  • Terminal: Colored inline diff with tiered display (default)
  • Markdown: GitHub-ready markdown with collapsible sections
  • JSON: Machine-readable structured output for CI/CD
  • HTML: Standalone review page with progressive disclosure

Modules§

html
html.rs — HTML output adapter with JavaScript-free progressive disclosure.
json
json.rs — JSON output adapter for machine-readable output.
markdown
markdown.rs — Markdown output adapter for GitHub PR bodies.
terminal
terminal.rs — Terminal output adapter with configurable color support.

Structs§

RenderContext
Context for rendering a PR package.

Enums§

DetailLevel
Detail level for rendering.
OutputFormat
Output format for PR rendering.
SectionFilter
Section filter for ta draft view --section (v0.14.7).

Traits§

DiffProvider
Trait for fetching diff content.
OutputAdapter
Output adapter trait — renders draft packages in different formats.

Functions§

default_summary
Generate a sensible default summary when no explanation or rationale is provided.
get_adapter
Get an adapter instance for the given format.
matches_file_filters
Check whether a resource URI matches any of the given file filter patterns.