omp packages

@giladbarnea/pi-custom-footer0.1.3

Context, cache, cost, and loaded skills at a glance in Pi.

GitHub Actions Published 13 days ago MIT ~244 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

Custom Footer

Know how much context remains. See what each turn costs.

pi extension npm license

A Pi footer that puts your session’s context, cache usage, cost, and loaded skills around the editor.

pi install npm:@giladbarnea/pi-custom-footer

Above the editor, see your model, thinking level, session name and ID. Loaded skills get their own row, with token ages.

Below the editor, see:

  • Context remaining at a glance: a color-graded gauge and used/window tokens.
  • Cost across the conversation: cumulative cost and average cost per assistant turn.
  • Cache behavior: session hit rate, latest hit or estimated miss, and reused/new token totals.
  • Where you are: Git branch, dirty marker, directory, and other extensions’ status messages.

The layout follows your Pi theme. The header and the footer each take the fewest lines they can. To fit, they first drop labels, round readings, remove whitespace, and drop the branch icon. Only then does the footer hide facts: the reused/new split, the session hit rate, the token counts, and last the cost per turn.

On terminals with 40 rows or fewer, skills get at most four rows. To fit, the row first drops token ages, then separators, then shortens long names in the middle (caut…ctor). Only then does it show three rows plus a hidden-skill count.

Resize without rescanning the conversation. The header and footer share cached values. Session changes refresh them, including forks and compaction.

Skill age measures context-token growth since the first response after a skill load. A cache miss compares consecutive prompt sizes with reported reuse. Costs use the model’s reported pricing, including when you use a subscription.

Development

npm ci
npm test
npm run check

Tests cover rendered values, skill tracking, cache reuse, session changes, and forks. They make no model calls.