demo: add side-by-side terse demo
4d5c4d47ab26c9660cc941206d0ae4a501ef188b
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: a96a36317b0e
bugabingas pi extensions
4d5c4d47ab26c9660cc941206d0ae4a501ef188b
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+104 / −6 text lines · 2 binary (striped old/new sizes in 64-byte units, not churn) · lines and sizes scale separately
+11 / −3 text lines
`<!-- demo:<name>:start -->` … `<!-- demo:<name>:end -->`. `<!-- demo:<readme_id-or-name>:start -->` … `<!-- demo:<readme_id-or-name>:end -->`.- Side-by-side before/after demos use the same user prompt; only loaded extensions/support state may differ.- Side-by-side demos use shared `readme_id` + identical `readme_items = [(caption, gif), ...]` across paired drivers.- With `--capture-input`, `expect(...)` can match typed prompt text; do not expect strings that appear in the prompt.- Modifiers/key overlays: skip unless Pi visibly reacts; asciinema has no native modifier overlay here. `agg --cols 100 --rows 28 --theme asciinema --text-font-family "JetBrains Mono" --font-size 14 --line-height 1.25 --idle-time-limit 4.0 --last-frame-duration 5 --fps-cap 24 <cast> <gif>`- `.txt` may show duplicate lines/artifacts from terminal control sequences; acceptable if GIF looks good.- Extract representative PNG frames for assistant-side visual checks: `convert '<gif>[80]' /tmp/<demo>-80.png` or `magick '<gif>[80]' /tmp/<demo>-80.png`.- Prefer final/mid frames over first frame; first frame is often blank startup.- `understand_image` on animated GIFs is unreliable; it may hallucinate unrelated terminal content.- If using vision, run it on extracted PNG frames, not GIFs.new file mode 100644+30 / −0 text lines
title = "After terse"readme_id = "terse"readme_items = [ ("Same prompt", "terse_before.gif"), ("Same prompt + terse", "terse_after.gif"),]extensions = [ "terse",]targets = [ "terse",]cols = 100rows = 28cwd = "."prompt = """Use only these facts; do not inspect files or run tools.Facts: pi-ext is a Pi extension pack with tools, footers, workflow helpers, prompts, skills, and themes.Explain what pi-ext contains, what each part contributes, and how a new Pi user should think about it according to the active response style.End with marker: same terse demo prompt."""steps = [ ("wait", 1500), ("prompt", prompt, 30000), ("wait", 6000),]new file mode 100644+28 / −0 text lines
title = "Before terse"readme_id = "terse"readme_items = [ ("Same prompt", "terse_before.gif"), ("Same prompt + terse", "terse_after.gif"),]extensions = []targets = [ "terse",]cols = 100rows = 28cwd = "."prompt = """Use only these facts; do not inspect files or run tools.Facts: pi-ext is a Pi extension pack with tools, footers, workflow helpers, prompts, skills, and themes.Explain what pi-ext contains, what each part contributes, and how a new Pi user should think about it according to the active response style.End with marker: same terse demo prompt."""steps = [ ("wait", 1500), ("prompt", prompt, 30000), ("wait", 6000),]+7 / −0 text lines
<!-- demo:terse:start --><table><tr><td align="center"><strong>Same prompt</strong></td><td align="center"><strong>Same prompt + terse</strong></td></tr><tr><td><img src="assets/terse_before.gif" alt="Same prompt" width="100%"></td><td><img src="assets/terse_after.gif" alt="Same prompt + terse" width="100%"></td></tr></table><!-- demo:terse:end -->new file mode 100644Binary size (old → new): 0 → 417710 bytes.
new file mode 100644Binary size (old → new): 0 → 403352 bytes.
+28 / −3 text lines
readme_id = getattr(module, "readme_id", name) if not isinstance(readme_id, str) or not readme_id: raise SystemExit("readme_id must be string") readme_items = getattr(module, "readme_items", None) if readme_items is not None: if not isinstance(readme_items, list) or not readme_items: raise SystemExit("readme_items must be non-empty list") for item in readme_items: if not (isinstance(item, tuple) and len(item) == 2 and all(isinstance(x, str) and x for x in item)): raise SystemExit(f"readme_items entries must be (caption, gif): {item!r}") if driver.readme_items: headers = "".join(f"<td align=\"center\"><strong>{caption}</strong></td>" for caption, _gif in driver.readme_items) images = "".join( f"<td><img src=\"assets/{gif}\" alt=\"{caption}\" width=\"100%\"></td>" for caption, gif in driver.readme_items ) body = f"<table>\n<tr>{headers}</tr>\n<tr>{images}</tr>\n</table>" else: body = f""