pi-thinking-display

Thinking-block display for pi: keep only the thinking run that is still streaming expanded, plus a fold marker with hover highlight and click-to-toggle, with a settings panel.

Packages

Package details

extension

Install pi-thinking-display from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-thinking-display
Package
pi-thinking-display
Version
0.1.1
Published
Sep 30, 2026
Downloads
364/mo · 18/wk
Author
hayston
License
MIT
Types
extension
Size
40.1 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-thinking-display

English | 简体中文

What it is

An extension that keeps pi's thinking blocks expanded while they stream, and collapses them once they are done.

[!IMPORTANT] Automatic collapsing works in regular mode
Some features, such as hover / click-to-expand, require TUI mode

Features

  • Streaming collapse: while an assistant message is being generated, the thinking block still being output stays expanded. As soon as visible content starts appearing after it, it collapses on its own.
  • Mouse interaction: thinking blocks show a fold marker; the pointer highlights it on hover, and a click expands / collapses it.

[!NOTE] Respects pi's native Ctrl+T behavior for expanding thinking blocks and never overrides it.

Install

pi install npm:pi-thinking-display
pi install -e npm:pi-thinking-display     # one-shot trial

Configuration file

[!TIP] Use /thinking-display-settings to open the visualization settings panel

At ~/.pi/agent/thinking-display.json

Key Type Default Meaning
streaming boolean true Expand only the thinking block that is still streaming
decorate boolean true Enable the fold marker and hover highlight

[!WARNING] A missing field, a wrong type, or broken JSON falls back to the default; a bad config never breaks rendering. Hand edits apply on the next /reload or in a new session.

Development

node test/run.mjs           # all
node test/run.mjs unit      # config, streaming rules, marker/hover/click, settings panel
node test/run.mjs lifecycle # real AgentSession: extension discovery, when config applies, /reload