[FEATURE]: `@file` should allow the opened list to be sorted automatically based on the currently active document
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!
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.
as in current file being edited / interacted with? or what u have in ur editor
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.
Ah okay yeah that makes more sense, didn't realize u meant the vscode extension