fix: file @ autocomplete performance using fd
- Replace slow synchronous directory walking with fd for fuzzy file search - Auto-download fd to ~/.pi/agent/tools/ if not found in PATH - Performance improved from ~900ms to ~10ms per keystroke on large repos - Remove minimatch dependency from tui package - Graceful degradation if fd unavailable (empty results) Fixes #69
This commit is contained in:
@@ -105,6 +105,7 @@ export class TuiRenderer {
|
||||
changelogMarkdown: string | null = null,
|
||||
newVersion: string | null = null,
|
||||
scopedModels: Array<{ model: Model<any>; thinkingLevel: ThinkingLevel }> = [],
|
||||
fdPath: string | null = null,
|
||||
) {
|
||||
this.agent = agent;
|
||||
this.sessionManager = sessionManager;
|
||||
@@ -194,6 +195,7 @@ export class TuiRenderer {
|
||||
clearCommand,
|
||||
],
|
||||
process.cwd(),
|
||||
fdPath,
|
||||
);
|
||||
this.editor.setAutocompleteProvider(autocompleteProvider);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user