singularity-forge/packages/pi-tui
Tom Boucher f29d54b7e0 fix(tui): prevent freeze when using @ file finder (#1832)
The @ file autocomplete triggered a synchronous native fuzzyFind call
that walks the entire directory tree. On large repos this blocked the
Node.js event loop and froze the TUI.

Three changes fix this:

1. Skip the fuzzy search when the query is empty (bare "@" with nothing
   typed yet) — there is no point walking the full tree with no query.

2. Debounce the initial "@" keystroke instead of firing the search
   synchronously, so rapid typing cancels pending walks and the search
   only runs once the user pauses.

3. Deduplicate consecutive lookups using lastAutocompleteLookupPrefix
   (previously declared but unused) to avoid redundant synchronous
   searches when the prefix hasn't changed.

Fixes #1824

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 12:55:12 -06:00
..
src fix(tui): prevent freeze when using @ file finder (#1832) 2026-03-21 12:55:12 -06:00
package.json fix: add require condition to pi-tui exports for CJS resolution 2026-03-21 10:44:45 -06:00
tsconfig.json feat: vendor Pi source into workspace monorepo 2026-03-12 21:55:17 -06:00