Skip to content

fix(agent): optimize file mention search#1283

Open
ErlichLiu wants to merge 1 commit into
mainfrom
fix-file-mention-search
Open

fix(agent): optimize file mention search#1283
ErlichLiu wants to merge 1 commit into
mainfrom
fix-file-mention-search

Conversation

@ErlichLiu

Copy link
Copy Markdown
Collaborator

Summary

  • Replace synchronous recursive file scans with an async, bounded, watcher-invalidated file index.
  • Rank matches by filename and relative path while excluding absolute path prefixes from matching.
  • Preserve matching ancestors for the @file tree, normalize Windows separators, and select the highest-ranked visible match by default.
  • Avoid an initial full scan on empty @ input and cap result sets.

Validation

  • bun test apps/electron/src/main/lib/workspace-file-search.test.ts apps/electron/src/renderer/components/file-browser/FileMentionList.test.ts
  • bun run --filter='@proma/electron' typecheck
  • bun run --filter='@proma/electron' build:main
  • bun run --filter='@proma/electron' build:renderer

Notes

  • Full bun test still has two pre-existing Electron runtime mock failures in agent-session-manager.test.ts and channel-runtime-api-key.test.ts; the focused tests pass.

Made with Proma · GitHub

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.

1 participant