[FEATURE]: Question Tool 'type your own answer' doesnt' support file references #7868

Open
opened 2026-02-16 18:08:31 -05:00 by yindo · 4 comments
Owner

Originally created by @AyushWalekar on GitHub (Jan 28, 2026).

Originally assigned to: @rekram1-node on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Type your own answer section in question tool input doesn't support adding file reference.

Image
Originally created by @AyushWalekar on GitHub (Jan 28, 2026). Originally assigned to: @rekram1-node on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request `Type your own answer` section in question tool input doesn't support adding file reference. <img width="626" height="451" alt="Image" src="https://github.com/user-attachments/assets/841c09e4-beef-4599-ac5d-84ff12224fb3" />
yindo added the discussion label 2026-02-16 18:08:31 -05:00
Author
Owner

@bezerraluiz commented on GitHub (Jan 28, 2026):

Hello, I'll see what I can do to help you. After I'll return with documentation of my changes.

@bezerraluiz commented on GitHub (Jan 28, 2026): Hello, I'll see what I can do to help you. After I'll return with documentation of my changes.
Author
Owner

@bezerraluiz commented on GitHub (Jan 28, 2026):

Hello again, I made some changes and here go the screenshots of use and below the documentation. I don't send the pull request, because I wanna read your opinion.

Image Image

Doc:

File references in “Type your own answer” (tool question)

What changed

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 to test / use

  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.

Implementation location

  • question tool UI (TUI): packages/opencode/src/cli/cmd/tui/routes/session/question.tsx
@bezerraluiz commented on GitHub (Jan 28, 2026): Hello again, I made some changes and here go the screenshots of use and below the documentation. I don't send the pull request, because I wanna read your opinion. <img width="1206" height="364" alt="Image" src="https://github.com/user-attachments/assets/94ab88bd-2c55-4733-b4f3-c0c3e71c7771" /> <img width="1206" height="509" alt="Image" src="https://github.com/user-attachments/assets/6b6996d5-42bf-4d72-9e75-7f2ac5fc2d74" /> --- Doc: # File references in “Type your own answer” (tool `question`) ## What changed 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 to test / use 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. ## Implementation location - `question` tool UI (TUI): `packages/opencode/src/cli/cmd/tui/routes/session/question.tsx`
Author
Owner

@AyushWalekar commented on GitHub (Jan 28, 2026):

looks good!

@AyushWalekar commented on GitHub (Jan 28, 2026): looks good!
Author
Owner

@bezerraluiz commented on GitHub (Jan 29, 2026):

I'll open a PR.

And I return.

But if you wanna use, follow my branch and my commit link:

https://github.com/bezerraluiz/opencode/tree/issue-11026

https://github.com/bezerraluiz/opencode/commit/db3e3ce601020f0c17eca44ba1aa12fee38c67dc

@bezerraluiz commented on GitHub (Jan 29, 2026): I'll open a PR. And I return. But if you wanna use, follow my branch and my commit link: https://github.com/bezerraluiz/opencode/tree/issue-11026 https://github.com/bezerraluiz/opencode/commit/db3e3ce601020f0c17eca44ba1aa12fee38c67dc
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7868