Created
June 19, 2026 14:12
-
-
Save goofansu/4ab224d0eecb10645bffd3588ca6154a to your computer and use it in GitHub Desktop.
Backup of pi-stuff worktrunk extension before removal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Worktrunk status marker extension | |
| * | |
| * Updates the wt list activity marker to reflect Pi's current state: | |
| * π€ β Pi is working | |
| * π¬ β Pi is waiting for input | |
| * | |
| * Requires the worktrunk CLI (https://worktrunk.dev). | |
| * Markers appear in `wt list` alongside the current branch. | |
| */ | |
| import { execFile } from "node:child_process"; | |
| import type { ExtensionAPI } from "@earendil-works/pi-coding-agent"; | |
| function wtMarker(args: string[]): void { | |
| execFile("wt", ["config", "state", "marker", ...args]); | |
| } | |
| export default function (pi: ExtensionAPI) { | |
| pi.on("session_start", async () => { | |
| wtMarker(["set", "π¬"]); | |
| }); | |
| pi.on("agent_start", async () => { | |
| wtMarker(["set", "π€"]); | |
| }); | |
| pi.on("agent_end", async () => { | |
| wtMarker(["set", "π¬"]); | |
| }); | |
| pi.on("session_shutdown", async () => { | |
| wtMarker(["clear"]); | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment