omp packages

@pi9/context0.3.0

Pi extension to show a breakdown of your current context usage.

GitHub Actions Published 3 days ago MIT ~0 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

@pi9/context

Pi extension that registers /context — a scrollable breakdown of how your current context window is being used (model, responsive usage graph, compaction reserve, conversation stats, memory files, tools, and skills).

The context report showing a token-usage graph and detailed breakdown

Usage

In an interactive pi session:

/context

The report opens as an inline custom view in the main UI flow. Scroll with ↑/↓ or j/k, page with PgUp/PgDn or u/d, jump with Home/End, and close with q or Esc (Enter also closes).

In modes without extension UI support, the command shows a short warning only.

Install

pi install npm:@pi9/context

For local development, load packages/context/src/index.ts as an extension.

Development

npm run typecheck
npm test

Manual verification

To verify the TUI end-to-end:

  1. Start pi with this extension in a terminal at least 80 columns wide.
  2. Run /context on a session with several messages so the report exceeds the viewport.
  3. Confirm keyboard scrolling, help text, the responsive graph and displayed per-block token scale, section token totals, and Esc closes the inline view without injecting report text into the chat.