- Notifications
You must be signed in to change notification settings - Fork911
chore: sort agent/list-directory
output#17218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR refines the output of the /list-directory agent command by sorting the contents list alphabetically with directories prioritized for an improved UX on the Coder Desktop interface.
- Updated the sorting logic in agent/ls.go to ensure directories appear first, followed by files in alphabetical order.
- Modified the test in agent/ls_internal_test.go to validate the new order using require.Equal.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
agent/ls_internal_test.go | Updated test expectations to check explicit sorted output. |
agent/ls.go | Introduced a sorting function with directories prioritized. |
998724d
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This sorts the
contents
list alphabetically, but with directories before everything else.This is purely for UX on the Coder Desktop side, where the user only really cares about directories, and files are just for providing context in the file picker.