Fix Pi extension load errors from settings.json path
Session from pi-extensions-sessions on Hugging Face by thomasmustier · MIT · condensed by Coders Talk
Click a segment to jump to that moment
58ssession
0interventions
by library · 2d
GOAL
Diagnose and fix errors caused by settings.json pointing to a directory of extension source files instead of the compiled entry point, breaking the code-actions extension.
- +0Prompt · +0I'm getting various errors - is it my settings.json pointing to all the files vs. just index.ts? Can we please fix?
- +0mAgent did · +0mListed pi-extensions directory and grepped code-actions for settings.json/extensions references to locate the source of the conflict
- +0mAgent did · +0mRead code-actions README and package.json to understand how the extension is meant to be loaded
- +0mAgent did · +0mRead ~/.pi/agent/settings.json and found it referenced the code-actions folder rather than its index.ts entry file
- +0mAgent did · +0mInspected code-actions directory contents and confirmed src/index.ts re-exports the compiled entry point
- +0mAgent did · +0mChecked other extensions (ralph-wiggum, raw-paste, usage-extension) for comparison on directory structure
- +0mAgent did · +0mEdited settings.json to point at code-actions/index.ts instead of the code-actions folder, resolving the factory-function and command-conflict errors
- +0mOutcome · +0msettings.json updated with 1 line change, pointing directly at code-actions/index.ts; developer asked to restart Pi to confirm errors are gone
VERDICT
Next time I'd just say straight up 'settings.json points to a folder instead of index.ts, fix the path' since that's exactly what the problem was. The agent did the right investigation on its own by comparing to the other extensions' structures, so no correction was needed here — it found and fixed the one-line path issue cleanly.