Skip to content

Commit 23acd93

Browse files
Updated help dialog to use dynamic keybind
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
1 parent a1214ff commit 23acd93

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/opencode/src/cli/cmd/tui/ui/dialog-help.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ import { TextAttributes } from "@opentui/core"
22
import { useTheme } from "@tui/context/theme"
33
import { useDialog } from "./dialog"
44
import { useKeyboard } from "@opentui/solid"
5+
import { useKeybind } from "@tui/context/keybind"
56

67
export function DialogHelp() {
78
const dialog = useDialog()
89
const { theme } = useTheme()
10+
const keybind = useKeybind()
911

1012
useKeyboard((evt) => {
1113
if (evt.name === "return" || evt.name === "escape") {
@@ -20,7 +22,9 @@ export function DialogHelp() {
2022
<text fg={theme.textMuted}>esc/enter</text>
2123
</box>
2224
<box paddingBottom={1}>
23-
<text fg={theme.textMuted}>Press Ctrl+P to see all available actions and commands in any context.</text>
25+
<text fg={theme.textMuted}>
26+
Press {keybind.print("command_list")} to see all available actions and commands in any context.
27+
</text>
2428
</box>
2529
<box flexDirection="row" justifyContent="flex-end" paddingBottom={1}>
2630
<box paddingLeft={3} paddingRight={3} backgroundColor={theme.primary} onMouseUp={() => dialog.clear()}>

0 commit comments

Comments
 (0)