@siddr/pi-prompt-thinking

Per-prompt thinking level override extension for pi

Package details

extension

Install @siddr/pi-prompt-thinking from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@siddr/pi-prompt-thinking
Package
@siddr/pi-prompt-thinking
Version
0.1.6
Published
Apr 24, 2026
Downloads
319/mo · 142/wk
Author
siddr
License
MIT
Types
extension
Size
31.8 KB
Dependencies
0 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

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

README

Prompt Thinking extension

Type ^level in the editor to pick a thinking level for a single prompt. The control token is removed before the prompt is sent.

Install

pi install npm:@siddr/pi-prompt-thinking

Usage

  1. Type ^ anywhere in the prompt where whitespace-delimited tokens are allowed.
  2. Press Tab to open the thinking-level autocomplete.
  3. Pick a level from autocomplete.
  4. Send the prompt normally.
  5. pi temporarily applies that thinking level for the prompt, then restores the previous session level after the response finishes.

Examples

Typing:

^high summarize the tradeoffs

submits as:

summarize the tradeoffs

Typing:

Please ^minimal answer briefly

submits as:

Please answer briefly

Autocomplete behavior

  • After typing ^, press Tab to open the thinking-level picker in the interactive TUI.
  • The current thinking level is read when the picker opens and preselected when it is available for the active model.
  • Up/down arrows move through lower/higher thinking levels because suggestions stay in natural order.
  • Available levels depend on the current model:
    • non-reasoning models: ^off
    • reasoning models: ^off, ^minimal, ^low, ^medium, ^high
    • xhigh-capable models: also ^xhigh

Token rules

  • ^level can appear anywhere in the prompt as a standalone whitespace-delimited token.
  • Matching is case-insensitive (^HIGH works).
  • Unknown tokens are left unchanged.
  • If multiple recognized tokens appear, the first recognized level wins and all recognized ^level tokens are removed before submission.

Notes

  • The one-prompt behavior is implemented by temporarily changing pi's session thinking level before the prompt runs and restoring the previous level afterward.
  • Because pi does not currently expose a true per-turn thinking override API to extensions, this may still append thinking-level-change entries to the session history and briefly update the default thinking setting before it is restored.
  • Submit-time stripping works even when custom editor UI is unavailable; autocomplete itself is interactive-TUI only.