tui: question dialog drops h/j/k/l keystrokes in custom answer field

未关闭 适合新手
#63,080 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
cli

调研方向

从 TUI 问题对话框中的自定义答案输入框,以及选项列表的键盘处理逻辑开始;issue 没有指定具体文件或测试。通过在“Type your own answer”中输入 h、j、k 和 l 来复现,并检查输入框保持显示时每个字符是否都能出现。完成标准是这些字母可以正常输入,并且输入框会一直显示到按下 Enter 或 Esc。

由索引模型根据 Issue 内容生成。

描述

Summary

In the question tool dialog, typing a custom answer ("Type your own answer") silently drops some letters, and the input prompt sometimes disappears entirely.

Environment

  • opencode version: v2.2.6
  • OS: Darwin 25.6.0 (darwin arm64)
  • Terminal: iTerm.app (TERM=xterm-256color, COLORTERM=truecolor)
  • Shell: /bin/zsh
  • Install/channel: latest (release)
  • Active plugins: none found in opencode.jsonc / .opencode

Reproduction

  1. Have the agent call the question tool with several options.
  2. Select the automatic "Type your own answer" option.
  3. Type a sentence containing h, j, k or l, e.g. "go ahead the parallel work".
  4. Keep typing; the input field sometimes vanishes.

Expected Behavior

Every typed character is inserted into the answer field, and the field stays visible until Enter or Esc.

Actual Behavior

Typed "go ahead the parallel work" and got "go aead te parae wor". Every h, l and k was dropped. These are the vim-style navigation keys, so the dialog's list navigation looks like it consumes them while the text field has focus. The text field also sometimes disappears, possibly because j/k moved the selection off the custom option.

Additional Context

  • Happens consistently with those letters; the disappearing field is intermittent.
  • Custom keybinds in cli.json only use <leader>-prefixed bindings (session.tab.next/previous/close), so none bind a bare letter.
  • The keybind docs list no setting for the question dialog's keys.
  • Workaround: avoid h/j/k/l, or press Esc and answer in the normal prompt.
  • Screenshot to be attached in a comment (gh CLI cannot upload images).
主要语言
TypeScript
星标
225k
派生
30.4k
平均合并
4 小时 7 分钟
30 天内合并 PR
554

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

anomalyco/opencode 的其他 Issue

查看 anomalyco/opencode 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。