Skip to main content

SessionTitler

Trait SessionTitler 

Source
pub trait SessionTitler {
    // Required methods
    fn title(&self, transcript_preview: &str) -> Result<String>;
    fn model_id(&self) -> &str;
}
Expand description

Injectable session-titling side-call (mirrors crate::reduce::summarize::SpanSummarizer exactly). Err — for any reason, including a caller-modeled timeout or budget exhaustion — means the caller must fall back to no title (or the session’s existing one); this call must never block or fail the surrounding session-save path.

Required Methods§

Source

fn title(&self, transcript_preview: &str) -> Result<String>

Produce a short title from transcript_preview (the rendering render_transcript_preview produces).

Source

fn model_id(&self) -> &str

Identifier of the model behind this titler (e.g. "claude-haiku-4-5"), for callers that want to record provenance alongside the title.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§