Removed confusing parenthetical that suggested context files aren't loaded when continuing/resuming sessions. They are always freshly loaded from disk at startup - the parenthetical only applied to console logging behavior.
In -p, --mode json, and --mode rpc modes, don't print informational
messages like 'Loaded project context from:' or model restore messages.
Only the actual output should be printed.
BREAKING CHANGE: Passing a prompt on the command line now starts interactive
mode with the prompt pre-submitted, instead of exiting after completion.
Use --print or -p to get the previous non-interactive behavior.
- Add --print / -p flag for non-interactive mode
- Update runInteractiveMode to accept initial messages
- Update README documentation
- Fix Model Selection Priority docs to include --models scope
When pressing Enter on a highlighted slash command suggestion (e.g., typing
`/mod` with `/model` highlighted), the completion is now applied before
submitting. Previously, the partial text was submitted instead of the
selected command.
Fixes#49
PR #47 enhancements:
- Add thinking level syntax to --models (e.g., --models sonnet:high,haiku:low)
- First model in scope used as initial model when starting new session
- Auto-apply thinking level when cycling models with Ctrl+P
- Save both model and thinking to session AND settings for persistence
- Simplify UX by removing autoThinkingDisabled flag
- Fix model matching to prioritize exact matches over partial
- Support provider/modelId format (e.g., openrouter/openai/gpt-5.1-codex)
Issue #45:
- Add --thinking CLI flag to set thinking level directly
- Takes highest priority over all other thinking level sources
Closes#45
- Fixed catastrophic regex backtracking in extractPathPrefix that caused
terminal to hang when text contained many / characters (e.g., URLs).
Replaced complex regex with simple lastIndexOf approach. (#18)
- Fixed arrow keys moving both autocomplete selection and editor cursor
by adding missing return statement after handling arrow keys in
autocomplete mode.
Closes#18
- 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
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