/** * @file SessionToolBadge — names the AI coding CLI that produced a session * when it is not Claude Code (`sessions.tool` = `codex`, `antigravity`, …, by * its AI Tools label). Renders nothing for a Claude session, so the Sessions * list and session header look as before for every Claude row. * @author Nguyễn Ngọc Trí Vĩ */ import { useTranslation } from "react-i18next"; import { useAiTools } from "../hooks/useAiTools"; /** A chip with the tool's name, or nothing for `claude` / an unset tool. */ export function SessionToolBadge({ tool }: { tool?: string | null }) { if (!tool || tool === "claude") return null; return ; } // Split out so the catalog hook only mounts for a non-Claude session. function ToolChip({ tool }: { tool: string }) { const { t } = useTranslation("sessions"); const { label } = useAiTools(); return ( {label(tool)} ); }