/** firstLine is a prompt's first line, cut to a title's length. */ export function firstLine(text: string): string { const line = text.trim().split("\n", 1)[0] ?? ""; return line.length > 80 ? `${line.slice(0, 79)}…` : line; }