enable auto-discovery for pi extensions by removing explicit extension list
This commit is contained in:
@@ -49,3 +49,13 @@ sigil unlink ~/.config/wezterm/wezterm.lua
|
|||||||
# Editing dotfiles
|
# Editing dotfiles
|
||||||
|
|
||||||
When editing dotfiles, it is preferred to add/edit the files in this project directly, instead of going to the source. this way we can then use sigil apply --prune, and everything will be synced, even when there are new files.
|
When editing dotfiles, it is preferred to add/edit the files in this project directly, instead of going to the source. this way we can then use sigil apply --prune, and everything will be synced, even when there are new files.
|
||||||
|
|
||||||
|
# pi extensions
|
||||||
|
|
||||||
|
Extensions live in `pi/files/agent/extensions/`.
|
||||||
|
|
||||||
|
**Discovery quirk:** If `package.json` has a `pi.extensions` field, pi **only** loads those listed extensions and skips auto-discovery of `*.ts` files. To enable auto-discovery (load all `.ts` files including symlinks), either:
|
||||||
|
- Remove the `extensions` field entirely: `"pi": {}`
|
||||||
|
- Or delete `package.json` if you don't need npm dependencies
|
||||||
|
|
||||||
|
Multi-file extensions (directories) need an `index.ts` entry point (or `package.json` with `pi.extensions` pointing to the entry file).
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
||||||
|
import lspHookFactory from "./lsp.js";
|
||||||
|
import lspToolFactory from "./lsp-tool.js";
|
||||||
|
|
||||||
|
export default function (pi: ExtensionAPI) {
|
||||||
|
lspHookFactory(pi);
|
||||||
|
lspToolFactory(pi);
|
||||||
|
}
|
||||||
@@ -19,17 +19,6 @@
|
|||||||
"@types/node": "^25.3.3",
|
"@types/node": "^25.3.3",
|
||||||
"typescript": "^5.7.0"
|
"typescript": "^5.7.0"
|
||||||
},
|
},
|
||||||
"pi": {
|
"pi": {},
|
||||||
"extensions": [
|
|
||||||
"./custom-provider-anthropic/index.ts",
|
|
||||||
"./lsp/lsp.ts",
|
|
||||||
"./lsp/lsp-tool.ts",
|
|
||||||
"./matugen-theme-watch/index.ts",
|
|
||||||
"./pi-web-access/index.ts"
|
|
||||||
],
|
|
||||||
"skills": [
|
|
||||||
"./pi-web-access/skills"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"packageManager": "pnpm@10.28.2+sha512.41872f037ad22f7348e3b1debbaf7e867cfd448f2726d9cf74c08f19507c31d2c8e7a11525b983febc2df640b5438dee6023ebb1f84ed43cc2d654d2bc326264"
|
"packageManager": "pnpm@10.28.2+sha512.41872f037ad22f7348e3b1debbaf7e867cfd448f2726d9cf74c08f19507c31d2c8e7a11525b983febc2df640b5438dee6023ebb1f84ed43cc2d654d2bc326264"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user