Add shortcuts hint and panel for discoverability (#18035)

This commit is contained in:
Dmitry Lyalin
2026-02-06 11:33:39 -08:00
committed by GitHub
parent ec5836c4d6
commit 1f1cf756c8
25 changed files with 639 additions and 54 deletions
@@ -0,0 +1,25 @@
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type React from 'react';
import { Text } from 'ink';
import { useTerminalSize } from '../../hooks/useTerminalSize.js';
import { theme } from '../../semantic-colors.js';
interface HorizontalLineProps {
width?: number;
color?: string;
}
export const HorizontalLine: React.FC<HorizontalLineProps> = ({
width,
color = theme.border.default,
}) => {
const { columns } = useTerminalSize();
const resolvedWidth = Math.max(1, width ?? columns);
return <Text color={color}>{'─'.repeat(resolvedWidth)}</Text>;
};