Skip to content

feat(tui): add @-triggered file autocomplete suggestions#84

Merged
Marlinski merged 5 commits into
ovh:mainfrom
MyEcoria:dev/pbuchez/@-autocomplete
Oct 8, 2025
Merged

feat(tui): add @-triggered file autocomplete suggestions#84
Marlinski merged 5 commits into
ovh:mainfrom
MyEcoria:dev/pbuchez/@-autocomplete

Conversation

@MyEcoria

@MyEcoria MyEcoria commented Oct 2, 2025

Copy link
Copy Markdown
Contributor
image

@Marlinski

Copy link
Copy Markdown
Collaborator

Nice one! I notice a few quirks:

if I select a file and press enter the @ stays alone (I would expect to at least see the file name). I would not expect enter to actually send the prompt but to behave just like tab (just adding file path into the input).

feedback-1.mp4

Then if I go to a directory with a lot of files (like my home) and try to start inputing some files, it hangs and I can't use my terminal anymore, not even Ctrl^C I have to kill my window:

feedback-2.mp4

@MyEcoria MyEcoria force-pushed the dev/pbuchez/@-autocomplete branch from 17904fc to bf9d76a Compare October 3, 2025 11:21
@MyEcoria

MyEcoria commented Oct 3, 2025

Copy link
Copy Markdown
Contributor Author

It's good now, we can validate with "Enter" instead of "Tab". I used jwalk to simplify the code, and it's much more performant (there might still be some slowdowns, but it no longer blocks) 🙂

@Marlinski

Marlinski commented Oct 3, 2025

Copy link
Copy Markdown
Collaborator

yes it is much faster indeed!
one question though, why it only matches against file?

feedback-3-light.mp4

Also I think it would probably make sense to not search through .* folder and maybe even blacklist some folder that would slow the searcher down like node_modules, or target/, etc.. It is a bit opinionated and less "generic" but I believe it would make it even faster for real world usecase. For instance I was looking for builder and got the target clutter first:

feedback-4-light.mp4

@MyEcoria

MyEcoria commented Oct 3, 2025

Copy link
Copy Markdown
Contributor Author

Yes, I thought about ignoring files starting with .* but that would also ignore useful ones like .gitignore, .github... I think by default I’ll ignore them, unless the search explicitly includes a '.'

@Marlinski

Marlinski commented Oct 6, 2025

Copy link
Copy Markdown
Collaborator

what about ignoring build / libraries files ? do you want to do something or should I merge as is ?

@MyEcoria

MyEcoria commented Oct 6, 2025

Copy link
Copy Markdown
Contributor Author

I'm going to make some more changes. I think I'll ignore the files/folder in .gitignore

@Marlinski

Copy link
Copy Markdown
Collaborator

that's a pretty good idea!

…the suggestion limit to 20, add a scrolling window with a count title.
@Marlinski

Copy link
Copy Markdown
Collaborator

whenever you are ready, I'll merge your branch but then I'll create a new one to clean input.rs that start to be a little bit messy :) but that will be another PR.

@MyEcoria

MyEcoria commented Oct 6, 2025

Copy link
Copy Markdown
Contributor Author

Yes, it's true that it's becoming a bit of a mess ;)

@Marlinski Marlinski merged commit 11d9b98 into ovh:main Oct 8, 2025
3 checks passed
@Marlinski

Copy link
Copy Markdown
Collaborator

nice PR @MyEcoria !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants