autotitle

package
v0.30.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 6 Imported by: 0

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

View Source
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, model core.Model, msgs []core.AgentMessage) (string, error)

Generate makes a one-shot LLM call to produce a session title from the conversation messages using model. Returns an error if the provider can't be built or the call produces no usable text.

Types

type ProviderFactory

type ProviderFactory func(core.Model) (core.Provider, error)

ProviderFactory builds a provider for a given model. Callers pass the same factory they use elsewhere (it handles auth/OAuth refresh).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL