sidekick 0.5.0

Protects your unsaved Neovim work from Claude Code.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Render layer. Isolated behind the `Renderer` trait so we can iterate
//! creatively on the presentation without disturbing the data pipeline.
//!
//! A renderer takes an aggregated `Stats` and writes its output somewhere.
//! Today the only implementation is `terminal::TerminalRenderer` (ANSI text
//! to a writer). Future implementations (PNG, SVG, kitty graphics, scripted
//! reveals) can plug in behind the same trait — or, if they don't fit the
//! "write bytes" model, sit alongside it without forcing breaking changes.

pub mod terminal;

use crate::analytics::aggregate::Stats;

pub trait Renderer {
    fn render(&self, stats: &Stats, out: &mut dyn std::io::Write) -> anyhow::Result<()>;
}