Skip to content

Conversation

@k11kirky
Copy link
Contributor

@k11kirky k11kirky commented Jan 14, 2026

TL;DR

Improved file suggestion search with better matching and increased result limits.

closes #505

What changed?

  • Increased file display limit from 5 to 25 files
  • Added a separate file fetch limit of 100 to retrieve more potential matches
  • Implemented a dedicated fuzzy search for files using Fuse.js with appropriate weighting
  • Added sorting logic to prioritize files that start with the query string
  • Renamed FUSE_OPTIONS to COMMAND_FUSE_OPTIONS for clarity
  • Created a new FileItem interface to better structure file data

How to test?

  1. Open the message editor
  2. Type a file reference (e.g., @file:)
  3. Enter search terms and verify:
    • Up to 25 results are displayed (instead of 5)
    • Results are properly sorted with exact matches first
    • Fuzzy matching works correctly for partial file names

Why make this change?

The previous implementation limited file suggestions to only 5 results and lacked sophisticated search capabilities. This change enhances the user experience by providing more relevant file suggestions through improved search algorithms and displaying a more useful number of results.

Copy link
Contributor Author

k11kirky commented Jan 14, 2026

@k11kirky k11kirky marked this pull request as ready for review January 14, 2026 23:17
@k11kirky k11kirky requested a review from a team as a code owner January 14, 2026 23:17
@charlesvien charlesvien force-pushed the 01-14-feat_remove_sidebar_options_go_for_history_only_and_pin branch from d4414cb to 27b4a58 Compare January 15, 2026 06:02
@charlesvien charlesvien force-pushed the 01-14-feat_use_fuze_for_file_grep_when_using_ branch from d76f923 to 671bd95 Compare January 15, 2026 06:02
Copy link
Contributor Author

k11kirky commented Jan 15, 2026

Merge activity

  • Jan 15, 7:11 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jan 15, 7:14 AM UTC: Graphite rebased this pull request as part of a merge.
  • Jan 15, 7:16 AM UTC: @k11kirky merged this pull request with Graphite.

@k11kirky k11kirky changed the base branch from 01-14-feat_remove_sidebar_options_go_for_history_only_and_pin to graphite-base/507 January 15, 2026 07:12
@k11kirky k11kirky changed the base branch from graphite-base/507 to main January 15, 2026 07:12
@k11kirky k11kirky force-pushed the 01-14-feat_use_fuze_for_file_grep_when_using_ branch from 671bd95 to 5c9c8c2 Compare January 15, 2026 07:13
@k11kirky k11kirky merged commit 489b41f into main Jan 15, 2026
12 checks passed
@k11kirky k11kirky deleted the 01-14-feat_use_fuze_for_file_grep_when_using_ branch January 15, 2026 07:16
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.

@ tagging files limits the number of files it shows.

3 participants