Skip to content

Commit 3169734

Browse files
Add Token Pac-Man canvas extension (#2175)
* Add Token Pac-Man canvas extension Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Address Token Pac-Man review feedback Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 388e0ed commit 3169734

7 files changed

Lines changed: 478 additions & 0 deletions

File tree

extensions/token-pacman/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Token Pac-Man
2+
3+
A GitHub Copilot canvas that visualizes live session AI-credit usage as a Pac-Man board. Pac-Man eats pellets as credits are consumed, ghosts chase him, fruit milestones appear, and the game ends when the configured session credit limit is exceeded.
4+
5+
## Files
6+
7+
- `extension.mjs` - canvas declaration, loopback server, live usage/quota syncing, and agent actions.
8+
- `assets/preview.png` - gallery preview image required by the Awesome Copilot canvas catalog.
9+
- `assets/token-pacman.jpg` - source screenshot included for the gallery.
10+
- `copilot-extension.json` - Copilot extension name/version metadata for gist installs.
11+
- `canvas.json` - Awesome Copilot gallery metadata.
12+
- `package.json` - extension metadata used by the generated website catalog.
13+
14+
## Install
15+
16+
Ask Copilot to install the committed extension URL:
17+
18+
```text
19+
Install this extension: https://github.com/github/awesome-copilot/tree/main/extensions/token-pacman
20+
```
21+
22+
The shared gist version is also available at:
23+
24+
```text
25+
https://gist.github.com/jamesmontemagno/75d701d25f49c94ba332529fb8ec1346
26+
```
27+
28+
## Agent actions
29+
30+
- `sync_usage` - refresh the canvas from the active session's accumulated AI-credit usage and plan entitlement.
31+
- `set_limit { limit }` - set the AI-credit limit that triggers game over and resync the pellet board.
32+
- `reset_run` - clear the visible fruit streak and start a fresh chase without changing the live session credit total.
752 KB
Loading
286 KB
Loading
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"id": "token-pacman",
3+
"name": "Token Pac-Man",
4+
"description": "Visualizes live session AI-credit usage as a Pac-Man board with pellets, ghosts, fruit milestones, and game-over limits.",
5+
"version": "1.0.0",
6+
"author": {
7+
"name": "James Montemagno",
8+
"url": "https://github.com/jamesmontemagno"
9+
},
10+
"keywords": [
11+
"ai-credits",
12+
"copilot-canvas",
13+
"interactive-canvas",
14+
"pac-man",
15+
"quota-tracking",
16+
"session-usage"
17+
],
18+
"screenshots": {
19+
"icon": {
20+
"path": "assets/preview.png",
21+
"type": "image/png"
22+
},
23+
"gallery": {
24+
"path": "assets/preview.png",
25+
"type": "image/png"
26+
}
27+
}
28+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "token-pacman",
3+
"version": 1
4+
}

extensions/token-pacman/extension.mjs

Lines changed: 396 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "token-pacman",
3+
"version": "1.0.0",
4+
"type": "module",
5+
"main": "extension.mjs",
6+
"dependencies": {
7+
"@github/copilot-sdk": "latest"
8+
},
9+
"description": "Visualizes live session AI-credit usage as a Pac-Man board with pellets, ghosts, fruit milestones, and game-over limits.",
10+
"keywords": [
11+
"ai-credits",
12+
"copilot-canvas",
13+
"interactive-canvas",
14+
"pac-man",
15+
"quota-tracking",
16+
"session-usage"
17+
]
18+
}

0 commit comments

Comments
 (0)