"use client"; // The saved-chats library row — the /ask analogue of the search "profiles" row // (WorkspaceSearchBar's ProfilesRow): a select of saved chats + text-link // Save / Save as… / Rename / Delete actions and a warning dirty dot. The live // "working" chat autosaves on its own; these actions manage NAMED copies, so a // research session can be saved and resumed later (even a paused sweep). Uses the // browser prompt/confirm, exactly like ProfilesRow. export function SavedChatsRow({ names, activeName, dirty, busy, onLoad, onSave, onSaveAs, onRename, onDelete, }: { names: string[]; activeName: string | null; dirty: boolean; busy: boolean; onLoad: (name: string) => void; onSave: () => void; onSaveAs: () => void; onRename: () => void; onDelete: () => void; }) { // Nothing saved and nothing loaded → keep the header quiet (Save as… still // reachable via the composer area's New chat flow once there's content). const hasAny = names.length > 0 || activeName != null; if (!hasAny) { return (