[FEATURE]: Prioritize the last attached file(s) in the file sorter options #4483

Open
opened 2026-02-16 17:44:20 -05:00 by yindo · 1 comment
Owner

Originally created by @koichincom on GitHub (Jan 8, 2026).

Originally assigned to: @thdxr 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

I'm eager to make a PR on this if this idea sounds good. So I would be grateful if anyone could let me know if I can go for this!

What

To attach files, we type @ and some files show up as the options. I want the last file(s) attached to the prior conversation prioritized and shown below the recent special options (@ general and @explore). Also, this might need to be in a separate issue, but to enhance this feature, I think the already attached file/path should not be shown in the option.

Why

Reattaching file(s) is pretty common, I think, because after updating a file ourselves, we need to attach it again so the Agent can read it. And making it possible to do that without knowing the exact file name would be a great time saver. I often scroll back the conversation or back to my editor to check the file name.

Consideration

  • Does it need to be prioritized more than @ general and @explore?
  • Should the prioritized files be
    A. The last file (only one, even if multiple files are mentioned in the last message that attached files)
    B. The last files (the files mentioned in the last message that attached file(s))
    C. Anything else
  • If multiple files are allowed to be prioritized, do we bundle them to make it possible to attach in one go?
Originally created by @koichincom on GitHub (Jan 8, 2026). Originally assigned to: @thdxr 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 I'm eager to make a PR on this if this idea sounds good. So I would be grateful if anyone could let me know if I can go for this! ## What To attach files, we type `@` and some files show up as the options. I want the last file(s) attached to the prior conversation prioritized and shown below the recent special options (@ general and @explore). Also, this might need to be in a separate issue, but to enhance this feature, I think the already attached file/path should not be shown in the option. ## Why Reattaching file(s) is pretty common, I think, because after updating a file ourselves, we need to attach it again so the Agent can read it. And making it possible to do that without knowing the exact file name would be a great time saver. I often scroll back the conversation or back to my editor to check the file name. ## Consideration - Does it need to be prioritized more than @ general and @explore? - Should the prioritized files be A. The last file (only one, even if multiple files are mentioned in the last message that attached files) B. The last files (the files mentioned in the last message that attached file(s)) C. Anything else - If multiple files are allowed to be prioritized, do we bundle them to make it possible to attach in one go?
yindo added the discussion label 2026-02-16 17:44:20 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 8, 2026):

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

  • #6187: Sort order of file picker is inconistent - Related to file picker ordering and suggestions

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 8, 2026): This issue might be a duplicate of existing issues. Please check: - #6187: Sort order of file picker is inconistent - Related to file picker ordering and suggestions Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4483