Skip to content

Commit 4cb167c

Browse files
zerone0xclaude
andcommitted
fix(tui): prevent question tool keybindings when dialog is open
The QuestionPrompt component captures H/L keys for tab navigation, which conflicts with typing in the command palette when opened via Ctrl+P. This change adds a guard to skip keyboard event processing when a dialog is open, following the established pattern used in dialog-command.tsx. Fixes anomalyco#8118 Co-Authored-By: Claude <[email protected]>
1 parent afb8a0d commit 4cb167c

File tree

1 file changed

+3
-0
lines changed
  • packages/opencode/src/cli/cmd/tui/routes/session

1 file changed

+3
-0
lines changed

packages/opencode/src/cli/cmd/tui/routes/session/question.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ export function QuestionPrompt(props: { request: QuestionRequest }) {
121121
const dialog = useDialog()
122122

123123
useKeyboard((evt) => {
124+
// Skip processing if a dialog (e.g., command palette) is open
125+
if (dialog.stack.length > 0) return
126+
124127
// When editing "Other" textarea
125128
if (store.editing && !confirm()) {
126129
if (evt.name === "escape") {

0 commit comments

Comments
 (0)