跪拜 Guibai
← All articles
Vue.js

A Local-First Windows Assistant: Full-Text File Search, Clipboard Capture, and One-Key Bug Filing

By 潇小墨 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Local-first desktop tools remain viable where cloud-synced utilities are rejected for privacy, and the performance tricks for scanning 269k files without a full-text index show what's possible in Electron with careful scope pruning and lazy loading.

Summary

The assistant lives in the Windows system tray and exposes five hotkey-driven features. Ctrl+Shift+C captures clipboard content, cleans formatting, deduplicates by hash, and summarizes it with a large model (or a local rule engine when no API is configured). Ctrl+Alt+F opens a Spotlight-like panel that searches both file names and document contents, with type filters, multi-word combinations, regex, and full keyboard navigation. The same flow powers screenshot annotation and one-key bug filing to Feishu, plus screenshot OCR.

Takeaways
— 269,000 files are indexed; measured latency: filename keyword search ~55–150ms, content keyword search ~210–350ms, regex filter ~235–330ms, empty-state recent list ~100–200ms.
— Search supports filename plus body text, type filters like ext:pdf, multi-word inclusion/exclusion, regex in /.../, three categories, recent-file empty state, and keyboard-only operation.
— sql.js lacks the SQLite FTS5 module, so full-text search falls back to LIKE scans over 400M characters; the workaround is pruning directories, skipping compiled/assets, and placeholder for files over 2MB.
— The single 1.07GB database was split into a 45KB business DB and a 1.07GB index DB that lazy-loads on first search; migration avoids VACUUM to prevent memory spikes.
— Windows Acrylic ignores window clipping, so rounded corners and transparency fail; the fix is a pure transparent window with gradient and dual inner shadows.
— Screenshot capture must happen before the annotation window appears, otherwise the window captures itself.
— Feishu image uploads require the docx_image type and a three-step block creation process; links can't be assembled from the public domain.
— Credential vault uses PBKDF2-SHA256 (600k iterations, random salt) and AES-256-GCM, with a 1-minute lockout after 5 wrong password attempts.
— Reasoning model output may contain a thinking block; filter by type and raise max_tokens to 4096, or the quota gets consumed.
— pdf-parse must be pinned to 1.1.1 (pure JS); v2 is ESM with native deps and throws 'pdfParse is not a function'.
— .lnk icons require resolving the target exe first; concurrent searches need a version counter to avoid stale results overwriting new ones.
— electron-vite hot-reloads only the renderer; main-process changes demand a manual restart.
Conclusions

Pruning the index scope (skipping node_modules, .git, dist, assets) proved more effective than adding a full-text index engine; on a personal dataset, targeted LIKE scans can stay sub-second.

The author's refusal to open-source is honest: a tool shaped around one person's daily routines may not transfer to others, which is a common reality of personal automation.

The stated win isn't a percentage-time gain but the removal of mental load, like no longer remembering file paths or where a note was saved.

The decision to keep data fully local and offline-capable reflects a deliberate trade-off against cloud convenience that many Western developers face with productivity tools.

Concepts & terms
sql.js
An Emscripten-compiled SQLite database engine running in JavaScript/WASM; it loads the entire database into memory, which simplifies usage but makes large databases expensive.
FTS5
The full-text search extension in SQLite that enables fast tokenized search; it's not compiled into the sql.js build, so the author fell back to LIKE scans.
PBKDF2-SHA256
A password-based key derivation function that stretches a master password through many iterations plus a random salt to strengthen it against brute force.
AES-256-GCM
An authenticated encryption algorithm (256-bit key, Galois/Counter Mode) that provides both confidentiality and integrity, used here for the credential vault.
electron-vite
A build tool for Electron apps based on Vite; it hot-reloads the renderer layer but does not hot-reload main-process code, requiring a manual restart.
From the discussion

The search speed over 269k files earns genuine amazement, yet that praise is pitted against a flat dismissal of the tool as having little practical value and a reminder that the same functionality already exists in utools. The exchange thus puts novelty and raw performance on one side, and redundancy and perceived utility on the other. Overall, the thread questions whether a local-first assistant is worth building when established tools already cover the ground.

— A few hundred milliseconds to search 269k files is a remarkable technical feat.
— The tool appears redundant because utools already provides similar capabilities.
— One view holds the tool has no real use case worth adopting.
Featured comments
会爬树的金鱼

You should be looking for utools.

干掉熊猫_

269k files and it can still search them in a few hundred milliseconds — that speed is absolutely insane.

放风喽

Seems not very useful.

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗