← Back to PRs

#19061: fix(llm-task): correct fallback import path from src/ to dist/

by Operative-001 open 2026-02-17 09:14 View on GitHub →
extensions: llm-task size: XS trusted-contributor
## Summary Fixes #19053 The `loadRunEmbeddedPiAgent()` function in the llm-task extension had a copy-paste error where both the source checkout path AND the bundled fallback path pointed to `../../../src/agents/pi-embedded-runner.js`. In npm-installed packages, `src/` does not exist - only `dist/` contains the compiled JavaScript. This caused the llm-task extension to fail with: ``` Cannot find module '../../../src/agents/pi-embedded-runner.js' ``` ## Fix Changed the fallback path (line 28) from: ```typescript const mod = await import("../../../src/agents/pi-embedded-runner.js"); ``` To: ```typescript const mod = await import("../../../dist/agents/pi-embedded-runner.js"); ``` ## Testing - Verified the fix matches the documented behavior in the code comments ("src-first, dist-fallback") - One-line change, low risk <!-- greptile_comment --> <h3>Greptile Summary</h3> Fixed a copy-paste error in the `loadRunEmbeddedPiAgent()` function where the fallback import path incorrectly pointed to `src/agents/pi-embedded-runner.js` instead of `dist/agents/pi-embedded-runner.js`, causing module resolution failures in npm-installed packages where only the compiled `dist/` directory is available. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with no risk - Single-line fix that corrects an obvious copy-paste error. The change aligns with the documented "src-first, dist-fallback" behavior in the code comments and matches the package.json build configuration. The fix is minimal, correct, and addresses a real runtime bug without introducing any new complexity or side effects. - No files require special attention <sub>Last reviewed commit: b2e6129</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs