pi-pretty-codeblocks0.1.0
Hide Markdown code fences in the Pi coding-agent TUI while preserving syntax highlighting.
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.
Reports 0
No reports yet.
Readme
pi-pretty-codeblocks
Hide Markdown code fences in the Pi coding-agent TUI using a Claude Code-like terminal presentation: syntax-highlighted code remains, while fence and language rows are hidden by default.
This extension changes display-only rendering. It does not modify the assistant message stored in the session or sent back to the model.
Features
- Hides visible opening and closing triple-backtick or tilde fence lines.
- Preserves OMP/Pi's existing syntax highlighting and code-block styling.
- Handles streamed and finalized assistant messages through the Markdown component's rendered lines.
- Language labels are hidden by default, matching Claude Code's ordinary response output.
- Set
PI_PRETTY_CODEBLOCKS_LANG=1to show language labels. - Other Markdown lines are passed through unchanged.
Install
pi install npm:pi-pretty-codeblocks
Or install directly from GitHub:
pi install git:github.com/Thyguad/pi-pretty-codeblocks
Restart Pi after installation, or run /reload in an existing session.
OMP
OMP users can install the same package with:
omp install npm:pi-pretty-codeblocks
The extension is also compatible with a direct local load:
omp --extension ./extensions/pretty-codeblocks.ts
Configuration
Language labels are hidden by default. To show them:
PI_PRETTY_CODEBLOCKS_LANG=1 pi
The environment variable must be present when Pi starts. To retain Pi's default two-column code indentation:
PI_PRETTY_CODEBLOCKS_INDENT=0 pi
Compatibility
The extension targets the current Pi/OMP TUI Markdown API and uses the @oh-my-pi/* package names. It relies on a small renderer patch because Pi does not currently expose a public hook for replacing ordinary assistant Markdown rendering.
License
MIT