/** * Auto-generated session titles. * * The default title is the first user message truncated to 60 chars — * which makes `/sessions` and `/recall` read like "help me fix the…", * "can you add a…". This module replaces that with an LLM one-liner * ("OAuth2 migration for auth module") generated once per session, in * the background, after the session has enough content to summarize. * * Design notes: * - Fire-and-forget from saveSession. Never blocks a save. * - One-shot: once `aiTitle` is written to the session file, the * generator early-returns. An in-flight guard prevents concurrent * duplicate calls during the 5s autosave cadence. * - Uses the user's active model via chat() — a 4-8 word completion * is negligible cost, and respecting the active model means it * works for every provider without special-casing. */ import type { Message } from '../config/index.js'; /** * Generate a short title from a session's history, or null if there * isn't enough to summarize (fewer than 3 non-system messages) or the * LLM call fails. The caller persists the result. */ export declare function generateSessionTitle(history: Message[]): Promise;