Documentation
¶
Overview ¶
Package autotitle generates short, human-readable session titles from a conversation using a cheap LLM call. It is shared by all frontends (TUI, serve) so the auto-titling behavior stays identical across them.
Index ¶
Constants ¶
const DefaultModelSpec = "haiku"
DefaultModelSpec is the cheap, fast model used for title generation when the session's provider has no cheaper same-vendor option (Anthropic).
const MaxTitleLen = 60
MaxTitleLen caps the generated title length (in runes).
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
func Generate(ctx context.Context, factory ProviderFactory, sessionModel core.Model, msgs []core.AgentMessage) (string, error)
Generate makes a one-shot LLM call to produce a session title from the conversation messages. It uses a cheap model (DefaultModelSpec) and returns the cleaned title. Returns an error if the model can't be resolved, the provider can't be built, or the call produces no usable text.