fix(cli): replace hardcoded keybinding strings with dynamic formatters (#21159)

This commit is contained in:
Tommaso Sciortino
2026-03-05 17:52:01 +00:00
committed by GitHub
parent f20e45175e
commit 1c3c7a343f
7 changed files with 54 additions and 47 deletions

View File

@@ -25,6 +25,7 @@ import {
} from '../../utils/textUtils.js';
import { useKeypress, type Key } from '../../hooks/useKeypress.js';
import { keyMatchers, Command } from '../../keyMatchers.js';
import { formatCommand } from '../../utils/keybindingUtils.js';
/**
* Represents a single item in the settings dialog.
@@ -625,7 +626,7 @@ export function BaseSettingsDialog({
{/* Help text */}
<Box marginX={1}>
<Text color={theme.text.secondary}>
(Use Enter to select, Ctrl+L to reset
(Use Enter to select, {formatCommand(Command.CLEAR_SCREEN)} to reset
{showScopeSelector ? ', Tab to change focus' : ''}, Esc to close)
</Text>
</Box>