import { Box, Text, useInput } from "ink"; import React from "react"; /** * An overlay that lists the available slash‑commands and their description. * The overlay is purely informational and can be dismissed with the Escape * key. Keeping the implementation extremely small avoids adding any new * dependencies or complex state handling. */ export default function HelpOverlay({ onExit, }: { onExit: () => void; }): JSX.Element { useInput((input, key) => { if (key.escape || input === "q") { onExit(); } }); return ( Available commands Slash‑commands /help – show this help overlay /model – switch the LLM model in‑session /approval – switch auto‑approval mode /history – show command & file history for this session /clear – clear screen & context /clearhistory – clear command history /compact – condense context into a summary Keyboard shortcuts Enter – send message Ctrl+J – insert newline {/* Re-enable once we re-enable new input */} {/* Ctrl+X/Ctrl+E  – open external editor ($EDITOR) */} Up/Down – scroll prompt history Esc(✕2) {" "} – interrupt current action Ctrl+C – quit Codex esc or q to close ); }