index.ts 457 B

123456789101112131415
  1. import { dirname, join } from "node:path";
  2. import { fileURLToPath } from "node:url";
  3. import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
  4. const baseDir = dirname(fileURLToPath(import.meta.url));
  5. export default function (pi: ExtensionAPI) {
  6. pi.on("resources_discover", () => {
  7. return {
  8. skillPaths: [join(baseDir, "SKILL.md")],
  9. promptPaths: [join(baseDir, "dynamic.md")],
  10. themePaths: [join(baseDir, "dynamic.json")],
  11. };
  12. });
  13. }