Playable Pitris for Pi.
- exposes
/pitris - uses only the pi.dev logo shape as the falling piece
- controls: arrows or
i j k l - rotate:
up,i, orspace - soft drop:
downork(holding the key repeats and accelerates the fall)
| import { spawnSync } from "node:child_process"; | |
| import fs from "node:fs"; | |
| import os from "node:os"; | |
| import path from "node:path"; | |
| import type { ExtensionAPI, SessionEntry } from "@mariozechner/pi-coding-agent"; | |
| import type { AssistantMessage } from "@mariozechner/pi-ai"; | |
| function getLastAssistantText(branch: SessionEntry[]): string | undefined { | |
| for (let i = branch.length - 1; i >= 0; i--) { | |
| const entry = branch[i]; |
| /** | |
| * Template Accelerator - use conversation context to auto-fill prompt template args. | |
| * | |
| * Type `$$ /template` (no args) and the extension will: | |
| * 1. Read the template file | |
| * 2. Ask the current LLM to extract arguments from conversation context | |
| * 3. Put the filled `/template "arg1" "arg2" ...` into the editor for review | |
| * | |
| * Press Enter to execute, or edit first. | |
| * |
| /** | |
| * Diff Extension | |
| * | |
| * /diff command shows modified/deleted/new files from git status and opens | |
| * the selected file in VS Code's diff view. | |
| */ | |
| import type { ExtensionAPI } from "@mariozechner/pi-coding-agent"; | |
| import { DynamicBorder } from "@mariozechner/pi-coding-agent"; | |
| import { Container, Key, matchesKey, type SelectItem, SelectList, Text } from "@mariozechner/pi-tui"; |
| import type { ExtensionAPI } from "@mariozechner/pi-coding-agent"; | |
| /** | |
| * /review command - Create a review branch from root, return with summary | |
| * | |
| * Usage: | |
| * /review - Start review branch from root (null parent) | |
| * /end-review - Return to origin with auto-summary | |
| * /end-review <text> - Return with custom summary text | |
| * |
| import type { ExtensionAPI } from "@mariozechner/pi-coding-agent"; | |
| /** | |
| * /review command - Create a review branch from root, return with summary | |
| * | |
| * Usage: | |
| * /review - Start review branch from root (null parent) | |
| * /end-review - Return to origin with auto-summary | |
| * /end-review <text> - Return with custom summary text | |
| * |
| import type { ExtensionAPI } from "@mariozechner/pi-coding-agent"; | |
| /** | |
| * /review command - Create a review branch from root, return with summary | |
| * | |
| * Usage: | |
| * /review - Start review branch from root | |
| * /end-review - Return to origin with auto-summary | |
| * /end-review <text> - Return with custom summary text | |
| * |
| import type { ExtensionAPI } from "@mariozechner/pi-coding-agent"; | |
| export default function (pi: ExtensionAPI) { | |
| // Store review state | |
| let reviewState: { | |
| originalSessionFile: string; | |
| reviewSessionFile: string; | |
| branchFromId: string; | |
| } | undefined; |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Token Clicker - We don't need your bank account</title> | |
| <style> | |
| * { | |
| margin: 0; | |
| padding: 0; |