From a6cd254471b6b0cc3a08782e9026dd14b03773fe Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Sun, 8 Feb 2026 22:56:28 +0100 Subject: [PATCH] fix(coding-agent): ensure rg is downloaded at startup alongside fd rg was only downloaded lazily when the grep tool was invoked, but the LLM often uses rg directly via the bash tool. Ensure both fd and rg are downloaded at startup so they are available in PATH for all tools. fixes #1348 --- .../coding-agent/src/modes/interactive/interactive-mode.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/coding-agent/src/modes/interactive/interactive-mode.ts b/packages/coding-agent/src/modes/interactive/interactive-mode.ts index 4245c78c..f7d9b356 100644 --- a/packages/coding-agent/src/modes/interactive/interactive-mode.ts +++ b/packages/coding-agent/src/modes/interactive/interactive-mode.ts @@ -370,8 +370,10 @@ export class InteractiveMode { // Load changelog (only show new entries, skip for resumed sessions) this.changelogMarkdown = this.getChangelogForDisplay(); - // Setup autocomplete with fd tool for file path completion - this.fdPath = await ensureTool("fd"); + // Ensure fd and rg are available (downloads if missing, adds to PATH via getBinDir) + // Both are needed: fd for autocomplete, rg for grep tool and bash commands + const [fdPath] = await Promise.all([ensureTool("fd"), ensureTool("rg")]); + this.fdPath = fdPath; // Add header container as first child this.ui.addChild(this.headerContainer);