-
Notifications
You must be signed in to change notification settings - Fork 202
Expand file tree
/
Copy pathopencode-plugin.ts
More file actions
28 lines (26 loc) · 897 Bytes
/
Copy pathopencode-plugin.ts
File metadata and controls
28 lines (26 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Worktrunk activity tracking plugin for OpenCode.
//
// Tracks OpenCode session activity per branch, showing status markers in `wt list`:
// 🤖 — agent is working
// 💬 — agent is waiting for input
//
// Installed globally via: wt config plugins opencode install
// Or manually: copy to ~/.config/opencode/plugins/worktrunk.ts
import type { Plugin } from "@opencode-ai/plugin";
export default (async ({ $ }) => {
return {
event: async ({ event }) => {
switch (event.type) {
case "session.status":
await $`wt config state marker set ${'🤖'} || true`.quiet();
break;
case "session.idle":
await $`wt config state marker set ${'💬'} || true`.quiet();
break;
case "session.deleted":
await $`wt config state marker clear || true`.quiet();
break;
}
},
};
}) satisfies Plugin;