[FEATURE]: @file should allow the opened list to be sorted automatically based on the currently active document #3612

Open
opened 2026-02-16 17:40:51 -05:00 by yindo · 4 comments
Owner

Originally created by @jackdov9 on GitHub (Dec 16, 2025).

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

The list of files opened by the current @file function seems to be sorted in the default order. It would be better if the list could be sorted based on the active document that is currently open, just like other CLI agent tools do. Thanks!

Originally created by @jackdov9 on GitHub (Dec 16, 2025). Originally assigned to: @fwang 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 The list of files opened by the current `@file` function seems to be sorted in the default order. It would be better if the list could be sorted based on the active document that is currently open, just like other `CLI` agent tools do. Thanks!
yindo added the discussionextension labels 2026-02-16 17:40:51 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 16, 2025):

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

  • #2401: File suggestion ordering - discusses sorting files in the @file list to prioritize exact matches and improve the selection experience
  • #5567: fuzzysort doesn't prioritize results/matches that start with the user input - discusses improving the sorting algorithm to prioritize matches that start with user input

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

@github-actions[bot] commented on GitHub (Dec 16, 2025): This issue might be a duplicate of existing issues. Please check: - #2401: File suggestion ordering - discusses sorting files in the @file list to prioritize exact matches and improve the selection experience - #5567: fuzzysort doesn't prioritize results/matches that start with the user input - discusses improving the sorting algorithm to prioritize matches that start with user input Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Dec 16, 2025):

as in current file being edited / interacted with? or what u have in ur editor

@rekram1-node commented on GitHub (Dec 16, 2025): as in current file being edited / interacted with? or what u have in ur editor
Author
Owner

@jackdov9 commented on GitHub (Dec 17, 2025):

I'm using opencode in vscode and the activated file means the current file I have open. For example, for this file I might need to ask/modify some function, it might be better if in the list opened by @file the file appears at the top of the list, so that I don't have to retrieve the filename to select the file.

@jackdov9 commented on GitHub (Dec 17, 2025): I'm using `opencode` in `vscode` and the activated file means the current file I have open. For example, for this file I might need to ask/modify some function, it might be better if in the list opened by `@file` the file appears at the top of the list, so that I don't have to retrieve the filename to select the file.
Author
Owner

@rekram1-node commented on GitHub (Dec 17, 2025):

Ah okay yeah that makes more sense, didn't realize u meant the vscode extension

@rekram1-node commented on GitHub (Dec 17, 2025): Ah okay yeah that makes more sense, didn't realize u meant the vscode extension
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3612