- Add exact match support with '/' prefix (/gpt-5.1-codex or /provider/model)
- Prefer exact ID matches over partial matches in fuzzy search
- Parse thinking levels from --models flag (pattern:level format)
- Use first scoped model as initial model with its thinking level
- Auto-apply thinking when cycling with Ctrl+P
- Track manual thinking changes to disable auto-switching
- Clear model scope when using /model command
- Support mixed configs: --models sonnet:high,haiku,opus:low
- Silently ignore thinking for models that don't support it
- Only allow Ctrl+P cycling when --models is explicitly provided
- Update help text with examples
- Improve code organization by resolving scope early
- Consolidated theme system into single src/theme/ directory
- Created Theme class with fg(), bg(), bold(), italic(), underline()
- Added dark and light built-in themes with 36 color tokens
- Support for custom themes in ~/.pi/agent/themes/*.json
- JSON schema for theme validation
- Theme selector UI with /theme command
- Save theme preference to settings
- Uses chalk for text formatting to preserve colors
TODO:
- Replace hardcoded colors throughout TUI components
- Apply markdown theming to Markdown components
- Add theme support to all TUI elements
- Show offset/limit in read tool display (e.g., read src/main.ts:100-200)
- Fix PI_CODING_AGENT_DIR env var name in help and code
- Add all API key env vars to help text
The prepublish hook was running during npm install, before optional platform-specific dependencies were installed. This caused build failures on Linux for packages like @typescript/native-preview-linux-x64 and @parcel/watcher-linux-x64-glibc.
prepublishOnly only runs before npm publish, not during install.
Fixes#41
Fixes#39
- Added headers field to Model type (provider and model level)
- Model headers override provider headers when merged
- Supported in all APIs:
- Anthropic: defaultHeaders
- OpenAI (completions/responses): defaultHeaders
- Google: httpOptions.headers
- Enables bypassing Cloudflare bot detection for proxied endpoints
- Updated documentation with examples
Also fixed:
- Mistral/Chutes syntax error (iif -> if)
- process.env.ANTHROPIC_API_KEY bug (use delete instead of = undefined)
- Add --models CLI arg accepting comma-separated patterns
- Implement smart matching: prefers aliases over dated versions
- Add Ctrl+P to cycle through scoped models (or all if no scope)
- Show model scope hint at startup
- Update help text with examples
Co-authored-by: Tino Ehrich <tino.ehrich@hey.com>
Tab key was preventing file path autocomplete from working.
Changed to Ctrl+T to avoid conflict with Tab completion.
- Tab now works normally for file/path autocomplete
- Ctrl+T cycles through thinking levels
- Shows message if model doesn't support thinking
The horizontal borders around the input editor now change color based on
the current thinking level, providing immediate visual feedback:
- off: gray (default)
- minimal: dim blue
- low: blue
- medium: cyan
- high: magenta
The more thinking, the brighter/more vibrant the color.
Changes:
- Add public borderColor property to Editor component (packages/tui)
- Use borderColor instead of hardcoded chalk.gray for borders
- Add getThinkingBorderColor() helper in TuiRenderer
- Add updateEditorBorderColor() to apply color changes
- Update border color when:
- Cycling with Tab key
- Selecting via /thinking command
- Restoring session with thinking level set
- Add onTab callback to CustomEditor
- Implement cycleThinkingLevel() in TuiRenderer
- Only works when model supports reasoning
- Cycles through: off → minimal → low → medium → high → off
- Update footer to show current thinking level with '(tab to cycle)' hint
- Update header instructions to mention tab for thinking
- Show notification when thinking level changes
- Created shared wrapTextWithAnsi() function in utils.ts
- Handles word-based wrapping while preserving ANSI escape codes
- Properly tracks active ANSI codes across wrapped lines
- Supports multi-byte characters (emoji, surrogate pairs)
- Updated Markdown and Text components to use shared wrapping
- Removed duplicate wrapping logic (158 lines total)
- Convert thinking blocks with missing/empty signatures to text blocks
- Prevents 400 error: 'Invalid signature in thinking block'
- Occurs when stream is aborted mid-thinking and message is resubmitted