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> |
||
|---|---|---|
| .. | ||
| native | ||
| pi-agent-core | ||
| pi-ai | ||
| pi-coding-agent | ||
| pi-tui | ||