autotitle

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package autotitle generates short, human-readable session titles from a conversation using a cheap LLM call. It is shared by all frontends 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