Repository navigation
feat: add bettersearch extension - #428
selfxplanatorium wants to merge 2 commits into
Conversation
|
Thanks for contributing an extension to Vicinae! 👋 Before publication, this pull request receives two reviews:
✅ Ready for human review. The automated reviewer approved the latest commit and a maintainer has been notified. No blocking findings remain on the latest commit. The automated reviewer examines only the current commit. New commits invalidate its previous decision and start another review. |
clankus-aurelius
left a comment
There was a problem hiding this comment.
Two cross-platform and manifest accuracy issues should be addressed.
Automated extension review passed. A maintainer review is still required.
This is an AI-generated first pass and may be mistaken. If a finding is unclear or incorrect, reply in the relevant thread and mention @aurelleb.
| { | ||
| "name": "roots", | ||
| "title": "Indexed Directories", | ||
| "description": "Comma-separated directories to index. Hidden folders and gitignored files are skipped outside git repositories.", |
There was a problem hiding this comment.
🟠 Warning — Indexing preference describes .gitignore behavior incorrectly
Rule: MANIFEST-001
The preference says gitignored files are skipped outside Git repositories, while the supplied implementation documentation states that .gitignore rules are respected inside repositories and hidden files are skipped outside them.
Suggested resolution: Describe the inside- and outside-repository behavior separately.
| "description": "Comma-separated directories to index. Hidden folders and gitignored files are skipped outside git repositories.", | |
| "description": "Comma-separated directories to index. Hidden folders are skipped outside Git repositories; .gitignore rules are respected inside them.", |
| /> | ||
| <Action.CopyToClipboard | ||
| title="Copy Name" | ||
| content={path.split("/").pop() ?? path} |
There was a problem hiding this comment.
🟠 Warning — Copy Name returns the full path on Windows
Rule: CORRECTNESS-001
Splitting only on / does not separate Windows paths, which use \, so Copy Name copies the entire path on supported Windows installations.
Suggested resolution: Import basename from node:path and use basename(path) for the copied name.
|
@aurelleb automated review passed for |
clankus-aurelius
left a comment
There was a problem hiding this comment.
Both previous findings are resolved by the incremental changes. No new actionable issues were introduced.
Automated extension review passed. A maintainer review is still required.
This is an AI-generated first pass and may be mistaken. If a finding is unclear or incorrect, reply in the relevant thread and mention @aurelleb.
What it does
BetterSearch adds search inside files to Vicinae, backed by fff, an indexed, typo-tolerant search engine.
.gitignore-aware indexing, and ranking that learns from the files you open for each query.name:42opens the editor at line 42.How it differs from built-in functionality
Vicinae's built-in file search covers file names, and does it well, including typos. BetterSearch does not try to replace it:
.gitignoreand skips hidden and dependency folders, while the built-in index includes them (300,000+ files against 5,300 on the test machine). It adds git status, editor line jumps and per-query ranking.Measurements and an honest list of limitations: https://github.com/selfxplanatorium/bettersearch-vicinae/blob/main/docs/comparison.md
Notes for review
Native code. The index comes from
@ff-labs/fff-node, the official npm package published by fff's author, with prebuilt binaries for each platform from fff's npm packages. Nothing is downloaded at runtime. Binaries are installed at build time byscripts/install-daemon.mjsand verified against the integrity hashes inassets/daemon/package-lock.json. WhenCI=true, the binaries for all 8 supported platforms are included, so the single store bundle runs on Linux (x64/arm64, glibc/musl), macOS (x64/arm64) and Windows (x64/arm64). The bundle is about 73 MB.Background process. Vicinae runs commands in short-lived workers, so the index lives in one small Node process (
assets/daemon/daemon.mjs), started on first use with Vicinae's own Node runtime. It never outlives Vicinae:It listens only on a per-user Unix socket (a named pipe on Windows) and makes no network connections. Architecture: https://github.com/selfxplanatorium/bettersearch-vicinae/blob/main/docs/architecture.md
Spawned programs. Only the user-configured editor command (for "Open in Editor at Line") and the daemon itself. Terminal editors run through
runInTerminal. Opening, revealing and copying files use@vicinae/api.Testing
vici lintandscripts/validate-extension.tspass.npm ci --legacy-peer-depsandbunx vici buildwithCI=trueproduce a bundle containing all 16 native packages..cmdeditor shims, musl detection by fff) are implemented but untested.Screenshots