Reviewed extension documentation.
UnderstandCreated file watcher extension with start/stop tools.
BuildStarted watching markdown files in target directory.
Setuptehre are md files in plans/, i'm editing them in vs code. i want you to get notified if i change them, with the latest content if a file change is detected on this. can you write an extension that does that? should be something configurable, possibly giving you a tool to start/stop observing.
The user wants a pi extension that watches markdown files in a directory and notifies the agent when changes are detected. Let me first read the extension docs to understand how to build this.
Let me read the extension docs first.
>ls /opt/homebrew/lib/node_modules/@mariozechner/pi-coding-agent/examples/extensions/Good, I have a good understanding of the extension API. Now let me build the extension. The user wants:
Let me create this extension.
Now I have a clear picture. Let me build the extension.
Done. Created .pi/extensions/watch-plans.ts. Here's what it does:
Two tools:
watch_plans_start - starts watching a directory (defaults to plans/). Takes an optional directory parameter.watch_plans_stop - stops watching.Behavior:
.md file changessendMessageUse /reload to pick it up, then ask me to start watching and I'll call watch_plans_start.
oki start watching
Watching plans/ now. Go ahead and edit your markdown files in VS Code, I'll see the changes as they come in.