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

Đang mở Phù hợp với người mới
#63,080 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu với ô nhập câu trả lời tùy chỉnh trong hộp thoại câu hỏi của TUI và phần xử lý bàn phím của danh sách tùy chọn; issue không nêu tệp hay bài kiểm thử cụ thể. Tái hiện bằng cách nhập h, j, k và l vào “Type your own answer”, rồi kiểm tra xem từng ký tự có xuất hiện trong khi ô nhập vẫn hiển thị hay không. Hoàn tất khi các chữ cái đó được nhập bình thường và ô nhập vẫn hiển thị cho đến khi nhấn Enter hoặc Esc.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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).
Ngôn ngữ chính
TypeScript
Star
225k
Fork
30.4k
Merge trung bình
4 giờ 7 phút
Pull request đã merge (30 ngày)
554

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của anomalyco/opencode

Tất cả issue của anomalyco/opencode

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.