Commit graph

196 commits

Author SHA1 Message Date
kiliman
958d265112 fix: pass attachments to agent prompt from RPC interface
This PR updates the call to `agent.prompt` with the `attachments` prop provided in the JSON input.
2025-11-25 21:56:32 -05:00
Mario Zechner
a484330cd1 v0.9.4: Mom Slack bot with Docker sandbox 2025-11-26 01:50:28 +01:00
Mario Zechner
b42df6848c Add $ prefix to cost in footer
Fixes #53
2025-11-25 21:32:52 +01:00
Mario Zechner
0148f0ac3d v0.9.3: Added Anthropic Claude Opus 4.5 support 2025-11-24 21:03:32 +01:00
Mario Zechner
52325adb97 Release v0.9.2 2025-11-24 19:32:55 +01:00
Mario Zechner
e1856daf57 fix: rename pi-agent to pi-agent-core (npm deprecation issue) 2025-11-21 22:20:43 +01:00
Mario Zechner
56450a4f19 fix(coding-agent): suppress informational output in non-interactive modes
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.
2025-11-21 22:07:17 +01:00
Mario Zechner
b49a017c55 Release v0.9.0 2025-11-21 21:58:12 +01:00
Mario Zechner
e89e657045 feat(coding-agent): allow starting CLI with prompt in interactive mode (#46)
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
2025-11-21 21:57:35 +01:00
Mario Zechner
3018b01460 Fix slash command autocomplete Enter behavior
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
2025-11-21 21:50:19 +01:00
Mario Zechner
ba8c073ed2 feat: enhance model cycling with thinking levels and --thinking flag
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
2025-11-21 21:32:30 +01:00
Mario Zechner
df3af27288 Merge remote-tracking branch 'origin/main' into feat/model-cycling-enhancements 2025-11-21 21:16:05 +01:00
Mario Zechner
1b6a70ccb1 feat: add /clear command to reset context and start fresh session 2025-11-21 20:59:00 +01:00
Mario Zechner
59af0fd53a fix: markdown link rendering for links with identical text and href 2025-11-21 20:14:32 +01:00
Mario Zechner
38524ea900 Release v0.8.5 2025-11-21 12:48:18 +01:00
Mario Zechner
1d8bc9d6eb Fix path completion hanging and autocomplete arrow key behavior
- 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
2025-11-21 12:47:23 +01:00
Tino Ehrich
ea4e234f66 feat: enhance model cycling with thinking level support
- 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
2025-11-21 12:02:56 +01:00
Mario Zechner
e7a5ca144c Release v0.8.4 2025-11-21 05:09:58 +01:00
Mario Zechner
aa46dfecd4 Release v0.8.3 2025-11-21 04:57:24 +01:00
Mario Zechner
85adcf22bf Release v0.8.0 2025-11-21 03:12:42 +01:00
Mario Zechner
cc88095140 WIP: Add theming system with /theme command
- 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
2025-11-20 23:16:59 +01:00
Mario Zechner
93a60b7969 Downgrade Biome to 2.3.5 to fix false positive noUnusedPrivateClassMembers warnings 2025-11-20 22:32:45 +01:00
Mario Zechner
c7d00e6ba4 Updated README.md 2025-11-20 21:17:32 +01:00
Mario Zechner
ba5bf54af4 Release v0.7.29
- 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
2025-11-20 20:48:25 +01:00
Mario Zechner
d44073b140 Release v0.7.28
- Add message queuing with configurable modes (one-at-a-time/all) (#15)
- Add /queue command to select queue mode
- Add TruncatedText component for proper viewport-aware text truncation
- Queue mode setting persists in ~/.pi/agent/settings.json
- Visual feedback for queued messages with proper ANSI handling
- Press Escape to abort and restore queued messages to editor
2025-11-20 20:39:43 +01:00
Mario Zechner
e694d435fd Release v0.7.27
- Fix slash command submission requiring two Enter presses (#30)
- Fix slash command autocomplete not re-triggering after typos (#29)
2025-11-20 18:56:27 +01:00
Mario Zechner
11aa39c5e4 Release v0.7.26 2025-11-20 17:29:24 +01:00
Mario Zechner
de39f1f493 Add custom headers support for models.json
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)
2025-11-20 17:05:31 +01:00
Mario Zechner
4ccc7d47e0 Release v0.7.25 2025-11-20 13:41:38 +01:00
Mario Zechner
9555b75674 Add PR and contributor credits to CHANGELOG 2025-11-20 13:41:19 +01:00
Mario Zechner
a1215fc32c Add table of contents to README 2025-11-20 13:20:48 +01:00
Mario Zechner
ee5228becf Fix help text to use 'pi' instead of 'coding-agent' 2025-11-20 13:00:38 +01:00
Mario Zechner
95247a3e5e Add documentation for model cycling feature 2025-11-20 12:58:31 +01:00
Mario Zechner
fecf9734b0 Add --models parameter for quick model cycling with Ctrl+P
- 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>
2025-11-20 12:57:20 +01:00
Mario Zechner
097ff25ed4 Release v0.7.24 2025-11-20 12:41:00 +01:00
Mario Zechner
c7e4c84731 Simplify thinking level display in footer (remove 'Thinking:' prefix) 2025-11-20 12:38:55 +01:00
Mario Zechner
23d6746bb9 Don't show 'Thinking: off' in footer when thinking is disabled 2025-11-20 12:37:17 +01:00
Mario Zechner
cfcdcf055d Add CHANGELOG and README docs for thinking level cycling feature 2025-11-20 12:35:54 +01:00
Mario Zechner
973a129407 Merge PR #36: Add Shift+Tab thinking level cycling with visual border feedback 2025-11-20 12:34:12 +01:00
Mario Zechner
d771475f98 Fix superfluous newline in update notification 2025-11-20 12:28:18 +01:00
Mario Zechner
e3c4dd22ae Fix TypeScript error in version check 2025-11-20 12:00:51 +01:00
Mario Zechner
b3d4478b61 Release v0.7.23 2025-11-20 11:59:17 +01:00
Mario Zechner
ddb5a4497f Remove the garbage the agent left behind and commited 2025-11-20 11:03:01 +01:00
Tino Ehrich
ac34a810dd fix: change thinking level cycling from Ctrl+T to Shift+Tab 2025-11-19 18:07:53 +01:00
Tino Ehrich
5336843de8 fix: change thinking level cycling from Tab to Ctrl+T
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
2025-11-19 12:12:23 +01:00
Tino Ehrich
b367f5bec6 refactor: improve thinking level display in footer
Change from 'off (tab to cycle)' to 'Thinking: off' for better clarity.
Format: 'model-id • Thinking: [level]'
2025-11-19 12:12:10 +01:00
Tino Ehrich
0df48f6b33 feat: add visual thinking level indicator via border colors
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
2025-11-19 12:12:10 +01:00
Tino Ehrich
9e8373b86a feat: add Tab key to cycle through thinking levels
- 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
2025-11-19 12:12:10 +01:00
Mario Zechner
1f68d6eb40 Release v0.7.22 2025-11-19 01:50:45 +01:00
Mario Zechner
1b28780155 Release v0.7.21 2025-11-19 00:56:16 +01:00