Skip to main content

spool/output/
mod.rs

1pub mod json;
2pub mod markdown;
3pub mod prompt;
4pub mod wakeup;
5
6use crate::domain::{ContextBundle, OutputFormat};
7
8pub fn render(bundle: &ContextBundle, max_chars: usize, format: OutputFormat) -> String {
9    match format {
10        OutputFormat::Prompt => prompt::render(bundle, max_chars),
11        OutputFormat::Markdown => markdown::render(bundle, max_chars),
12        OutputFormat::Json => json::render(bundle),
13    }
14}
15
16pub fn explain(bundle: &ContextBundle) -> String {
17    markdown::render_explain(bundle)
18}