@siddr/pi-prompt-thinking
v0.1.11
Published
Thinking level controls for pi prompts and sessions
Downloads
597
Readme
Prompt Thinking extension
Type ^level to set the thinking level for one prompt. Use the keyboard shortcuts to cycle or select the session thinking level. The control token is removed before the prompt is sent.
Install
pi install npm:@siddr/pi-prompt-thinkingUsage
- Type
^anywhere in the prompt where whitespace-delimited tokens are allowed. - The thinking-level autocomplete opens automatically. On pi versions without natural autocomplete triggers, press Tab after
^. - Pick a level from autocomplete.
- Send the prompt normally.
- pi temporarily applies that thinking level for the prompt, then restores the previous session level after the response finishes.
Keyboard shortcuts
- Alt+Shift+Tab cycles backward through the thinking levels available for the active model. It wraps from the lowest available level to the highest and skips unsupported levels.
- Ctrl+Shift+T opens a filterable list of available thinking levels with the current level selected, then sets the chosen session level.
Examples
Typing:
^high summarize the tradeoffssubmits as:
summarize the tradeoffsTyping:
Please ^minimal answer brieflysubmits as:
Please answer brieflyAutocomplete behavior
- Typing
^opens the thinking-level picker automatically in pi versions that support natural autocomplete triggers. Press Tab if your pi version requires manual autocomplete or if you need to reopen it. - 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 - max-capable models: also
^max
- non-reasoning models:
Token rules
^levelcan appear anywhere in the prompt as a standalone whitespace-delimited token.- Matching is case-insensitive (
^HIGHworks). - Unknown tokens are left unchanged.
- If multiple recognized tokens appear, the first recognized level wins and all recognized
^leveltokens 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.
