Skip to content

[BUG] 「V2 (next-17639)」TUI: Questions tool "Type your own answer" field cannot paste #43516

Closed

Description

@Sn0wo2

Description

In the interactive TUI, the free-text "Type your own answer" field of a question tool prompt does not accept Ctrl+V paste, while Ctrl+V works normally everywhere else (chat composer, editor).

Root cause

In the TUI, Ctrl+V is a keybinding (input_paste → prompt.paste in packages/tui/src/config/keybind.ts), not automatic. The command (packages/tui/src/component/prompt/index.tsx:370–391) reads the clipboard and inserts text, but is only bound to the chat composer's textarea target (index.tsx:800–806). The question field's textarea (packages/tui/src/routes/session/question.tsx:425–447) registers no Ctrl+V binding and no onPaste handler; the only QUESTION_MODE bindings are escape/return/prompt.clear/navigation (question.tsx:133–286). A raw ctrl+v keystroke therefore has no active binding and nothing happens. The renderable's default handlePaste only fires on a bracketed paste StdinEvent, which is not generated for a plain Ctrl+V.

The CLI footer variant (packages/opencode/src/cli/cmd/run/footer.question.tsx) has the same defect.

Suggested fix

Add a ctrl+v binding targeting the question textarea in packages/tui/src/routes/session/question.tsx (mirror prompt/index.tsx:800–806), reading clipboard.read?.() and calling textarea.insertText(...).

Plugins

No response

OpenCode version

0.0.0-beta-17639

Steps to reproduce

  1. Run opencode in interactive TUI mode (beta).
  2. Trigger a question tool call that includes a "Type your own answer" custom option.
  3. Select that option and press Enter to open the free-text textarea.
  4. Copy some text, then press Ctrl+V inside the field.
  5. Observe: nothing is pasted (typing works; Ctrl+V works in the chat composer).

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

Activity

  1. github-actions commented on Aug 19, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    These issues describe the exact same symptom (paste not working in the question dialog's free-text field while working in the main chat input). Consider following or commenting on one of those instead.

  2. opencode-agent commented on Aug 19, 2026

    @opencode-agent
    Contributor

    Fixed by #43526.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions