[PR #11124] feat(issue-11026): Enable file reference autocomplete in question custom answer #13663

Open
opened 2026-02-16 18:18:30 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/11124

State: open
Merged: No


What does this PR do?

Fixes #11026

In the TUI (planning mode), when the question tool shows the “Type your own answer” option, you can now insert file references like @path/to/file using the same autocomplete behavior as the main prompt input.

This fixes the case where the custom answer input couldn’t (or couldn’t easily) reference files during the question flow.

How did you verify your code works?

  • Tests end-to-end
  1. Start the TUI and enter a flow that triggers the question tool (e.g., planning mode).
  2. Select “Type your own answer” to focus the textarea.
  3. Type @ and start writing a path (e.g., @README.md).
  4. Use autocomplete:
    • tab: selects the highlighted autocomplete item
    • esc: closes autocomplete
  5. To submit the custom answer:
    • press enter again (with autocomplete closed) to confirm/advance, as before.

Screenshots:

image image
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11124 **State:** open **Merged:** No --- ### What does this PR do? Fixes #11026 In the TUI (planning mode), when the `question` tool shows the **“Type your own answer”** option, you can now insert file references like `@path/to/file` using the same autocomplete behavior as the main prompt input. This fixes the case where the custom answer input couldn’t (or couldn’t easily) reference files during the question flow. ### How did you verify your code works? - Tests end-to-end 1. Start the TUI and enter a flow that triggers the `question` tool (e.g., planning mode). 2. Select **“Type your own answer”** to focus the textarea. 3. Type `@` and start writing a path (e.g., `@README.md`). 4. Use autocomplete: - `tab`: selects the highlighted autocomplete item - `esc`: closes autocomplete 5. To submit the custom answer: - press `enter` again (with autocomplete closed) to confirm/advance, as before. Screenshots: <img width="1206" height="364" alt="image" src="https://github.com/user-attachments/assets/5f7e36a9-780b-4eb3-91c1-c448856e5289" /> <img width="1206" height="509" alt="image" src="https://github.com/user-attachments/assets/0978a0c3-d65c-487e-b9ae-a8ede34734cc" />
yindo added the pull-request label 2026-02-16 18:18:30 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13663