import { TextAttributes } from "@opentui/core" import { useTheme } from "../context/theme" import { useDialog } from "./dialog" import { useBindings, useCommandShortcut } from "../keymap" export function DialogHelp() { const dialog = useDialog() const { theme } = useTheme() const commandShortcut = useCommandShortcut("command.palette.show") useBindings(() => ({ bindings: [ { key: "return", desc: "Close help", group: "Dialog", cmd: () => dialog.clear() }, { key: "escape", desc: "Close help", group: "Dialog", cmd: () => dialog.clear() }, ], })) return ( Help dialog.clear()}> esc/enter Press {commandShortcut()} to see all available actions and commands in any context. dialog.clear()}> ok ) }