Commit graph

563 commits

Author SHA1 Message Date
Mario Zechner
55ca650a40 Update README to include github-copilot, google-gemini-cli, google-antigravity providers 2025-12-21 20:17:12 +01:00
Aliou Diallo
0f6cb1183e docs(coding-agent): document Ctrl+G external editor shortcut 2025-12-21 14:51:52 +01:00
Aliou Diallo
fe853ed869 feat(coding-agent): add Ctrl+G to open external editor 2025-12-21 12:07:05 +01:00
Mario Zechner
299986f06b Release v0.25.2 2025-12-21 02:59:03 +01:00
Mario Zechner
c97702cf91 Release v0.25.1 2025-12-21 02:43:47 +01:00
Mario Zechner
918750eb9e Fix tab completion for absolute paths
- Fix //tmp issue: distinguish slash commands from file paths by checking if anything precedes the /
- Fix symlinks to directories (like /tmp) not getting trailing slash
2025-12-21 02:41:38 +01:00
Mario Zechner
62e23e2164 Add [Unreleased] section for next release cycle 2025-12-20 22:03:55 +01:00
Mario Zechner
df07a74ad5 Release v0.25.0 2025-12-20 22:02:47 +01:00
Mario Zechner
a81dc5eaca Add configurable OAuth storage backend and respect --models in model selector
- Add setOAuthStorage() and resetOAuthStorage() to pi-ai for custom storage backends
- Configure coding-agent to use its own configurable OAuth path via getOAuthPath()
- Model selector (/model command) now only shows models from --models scope when set
- Rewrite OAuth documentation in pi-ai README with examples

Fixes #255
2025-12-20 22:00:53 +01:00
Mario Zechner
0d13dbb2ee docs(coding-agent): add changelog entry for interruptible tool execution 2025-12-20 21:37:06 +01:00
Mario Zechner
c359023c3f Add Google Gemini CLI and Antigravity OAuth providers
- Add google-gemini-cli provider: free Gemini 2.0/2.5 via Cloud Code Assist
- Add google-antigravity provider: free Gemini 3, Claude, GPT-OSS via sandbox
- Move OAuth infrastructure from coding-agent to ai package
- Fix thinking signature handling for cross-model handoff
- Fix OpenAI message ID length limit (max 64 chars)
- Add GitHub Copilot overflow pattern detection
- Add OAuth provider tests for context overflow and streaming
2025-12-20 21:34:18 +01:00
Mario Zechner
3266cac0f1 Fix coloring in footer when context usage is colored 2025-12-20 21:34:18 +01:00
Mario Zechner
1294239a7a fix(coding-agent): fix Google Cloud project discovery
Use correct API response format (cloudaicompanionProject) and proper
onboarding flow with tierId and metadata. Add retry logic for project
provisioning which may take time.
2025-12-20 10:29:09 +01:00
Mario Zechner
b6fe07b618 feat(coding-agent): add Google Cloud Code Assist OAuth flow
- Add OAuth handler with PKCE flow and local callback server
- Automatic project discovery via loadCodeAssist/onboardUser endpoints
- Store credentials with projectId for API calls
- Encode token+projectId as JSON for provider to decode
- Register as 'google-cloud-code-assist' OAuth provider
2025-12-20 10:27:07 +01:00
Mario Zechner
c1382818cc fix(coding-agent): add connection error to retryable errors
Fixes #252
2025-12-20 09:55:03 +01:00
Mario Zechner
3f307f8786 docs: add changelog entries for #251 and #253 2025-12-20 09:52:57 +01:00
Mario Zechner
b7c3cf9436 fix(coding-agent): clamp thinking level to model capabilities
- setThinkingLevel() now clamps xhigh to high when model doesn't support it
- Model changes automatically re-clamp the current thinking level
- Fixed /model command to use session.setModel() instead of agent.setModel()
- Footer and editor border color update after model/thinking changes

Closes #253
2025-12-20 09:52:57 +01:00
Mario Zechner
085294b764 Release v0.24.5 2025-12-19 22:09:35 +01:00
Mario Zechner
f377c3c9c3 Release v0.24.4 2025-12-19 21:54:36 +01:00
Mario Zechner
8d1229b5ec fix(coding-agent): use key helpers for arrow keys and Enter
Fixed arrow key and Enter detection in selector components to work
with Kitty protocol when Caps Lock or Num Lock is enabled.

Updated: oauth-selector, user-message-selector, hook-selector,
hook-input, model-selector, session-selector
2025-12-19 21:53:04 +01:00
Mario Zechner
ad4eb3afa6 Release v0.24.3 2025-12-19 21:36:16 +01:00
Mario Zechner
ad9d68e488 Fix footer overflow on narrow terminals, add /arminsayshi easter egg 2025-12-19 21:35:09 +01:00
Mario Zechner
5095b4eb02 Release v0.24.2 2025-12-19 21:12:53 +01:00
Mario Zechner
b8e46130b0 Add [Unreleased] section to changelog 2025-12-19 20:52:44 +01:00
Mario Zechner
50b055f3ae Release v0.24.1 2025-12-19 20:51:44 +01:00
Mario Zechner
de1f1cc344 Export OAuth and model config functions for AgentSession scripts
Exports getAvailableModels, getApiKeyForModel, findModel, login, logout,
and getOAuthProviders from @mariozechner/pi-coding-agent so scripts using
AgentSession directly can reuse OAuth token storage and model resolution.

Fixes #245
2025-12-19 20:43:41 +01:00
Mario Zechner
b8dd9be3d0 fix(tui): handle emoji deletion and cursor movement correctly
Backspace, Delete, and arrow keys now use Intl.Segmenter to operate
on grapheme clusters instead of individual UTF-16 code units. This
fixes deletion of emojis and other multi-codepoint characters.

fixes #240
2025-12-19 20:39:45 +01:00
Mario Zechner
28c3ffb914 fix(tui): handle Kitty protocol lock key modifiers
Fixes keyboard input in Ghostty on Linux when Num Lock is enabled.
The Kitty protocol includes Caps Lock (64) and Num Lock (128) bits
in modifier values. Now masks out lock bits when matching shortcuts.

Added helper functions: isArrowUp/Down/Left/Right, isEnter, isTab,
isBackspace, isShiftEnter, isAltEnter, isAltLeft/Right, isCtrlLeft/Right

fixes #243
2025-12-19 20:34:20 +01:00
Mario Zechner
7e38897673 feat: add xhigh thinking level support for gpt-5.2 models
- Add supportsXhigh() function to ai package for checking xhigh support
- Clamp xhigh to high for OpenAI models that don't support it
- Update coding-agent to use centralized supportsXhigh()
- gpt-5.2, gpt-5.2-codex now show xhigh in thinking selector

Closes #236
2025-12-19 20:07:24 +01:00
theBucky
4f981d8ebc feat: add xhigh thinking level support for gpt-5.2 and gpt-5.2-codex
- Add XHIGH_MODELS constant and getAvailableThinkingLevels() to AgentSession
- Update ThinkingSelectorComponent to accept availableLevels parameter
- Both shift+tab cycling and /thinking command now show xhigh for supported models
- Update types.ts documentation to list supported models
2025-12-19 19:59:13 +01:00
Nico Bailon
74f7e6c9d5
Wrap custom tools with hooks (#248) 2025-12-19 19:05:20 +01:00
Aliou Diallo
95dcd04e7c
fix(coding-agent): properly cleanup terminal on Ctrl+C in session selector (#247) 2025-12-19 19:04:00 +01:00
Aliou Diallo
9a7863fc98
fix(coding-agent): handle OpenRouter models with colons in IDs (#242) 2025-12-19 15:26:12 +01:00
Aliou Diallo
a9a1a62b14
fix(coding-agent): prevent global AGENTS.md from being loaded twice (#239)
When cwd is `~/.pi/agent/` or a subdirectory, the global AGENTS.md file
was included twice in the system prompt.

`loadProjectContextFiles()` loads context files in two steps:
1. Explicitly loads from `getAgentDir()` (`~/.pi/agent/`)
2. Walks from cwd up to root, collecting all AGENTS.md/CLAUDE.md files

There was no deduplication. When cwd is at or below `~/.pi/agent/`, the
ancestor walk includes that directory again.

Fix: track seen paths with a Set and skip duplicates.
2025-12-19 15:24:49 +01:00
Nico Bailon
a54c70bbed
Forward onUpdate callback through hook wrapper (#238) 2025-12-19 15:23:41 +01:00
Mario Zechner
16685a36ec Release v0.24.0 2025-12-19 05:21:25 +01:00
Mario Zechner
f92147ffe8 Release v0.23.5 2025-12-19 05:15:34 +01:00
Mario Zechner
13b8af1f36 Update changelog with getMarkdownTheme export and subagent improvements 2025-12-19 04:54:02 +01:00
Mario Zechner
48e792aa52 Update custom tools README for subdirectory/index.ts structure 2025-12-19 04:54:02 +01:00
Mario Zechner
a930eb8489 Convert custom tool examples to subdirectory/index.ts structure
- hello.ts → hello/index.ts
- question.ts → question/index.ts
- todo.ts → todo/index.ts
- subagent/subagent.ts → subagent/index.ts
2025-12-19 04:54:02 +01:00
Mario Zechner
320556dbf5 Subagent: markdown rendering in expanded view, chain streaming shows all steps
- Export getMarkdownTheme() from coding-agent for custom tools
- Chain/parallel modes now use Markdown component in expanded view
- Chain streaming updates include all previous steps (not just current)
- Strip {previous} placeholder from task preview in renderCall
2025-12-19 04:54:02 +01:00
Mario Zechner
4fb3af93fb Refactor subagent tool, fix custom tool discovery, fix JSON mode stdout flush
Breaking changes:
- Custom tools now require index.ts entry point in subdirectory
  (e.g., tools/mytool/index.ts instead of tools/mytool.ts)

Subagent tool improvements:
- Refactored to use Message[] from ai package instead of custom types
- Extracted agent discovery to separate agents.ts module
- Added parallel mode streaming (shows progress from all tasks)
- Added turn count to usage stats footer
- Removed redundant Query section from scout output

Fixes:
- JSON mode stdout flush: Fixed race condition where pi --mode json
  could exit before all output was written, causing consumers to
  miss final events

Also:
- Added signal/timeout support to pi.exec() for custom tools and hooks
- Renamed pi-pods bin to avoid conflict with pi
2025-12-19 04:54:02 +01:00
Mario Zechner
f8b6164ecd Fix Escape key handling for Kitty keyboard protocol
Add isEscape() helper that handles both raw (\x1b) and Kitty protocol
(\x1b[27u) Escape sequences. Update all components that check for
Escape key to use the new helper.
2025-12-19 04:54:02 +01:00
Mario Zechner
bab5cddd4d Add changelog entry and README link for subagent example (#215) 2025-12-19 01:46:33 +01:00
Nico Bailon
eb1d08a5fb
Add subagent orchestration example (#215) 2025-12-19 01:45:18 +01:00
Mario Zechner
774aaadbc0 Simplify getApiKey pass-through, add changelog entry for #223 2025-12-19 01:37:53 +01:00
Mario Zechner
139af12b37 Merge kitty-protocol-support into main 2025-12-19 01:21:47 +01:00
Mario Zechner
b2f29613e8 Add /hotkeys command, Ctrl+D exit, markdown table borders 2025-12-19 01:19:21 +01:00
Mario Zechner
b1be086169 Merge origin/main into kitty-protocol-support 2025-12-19 01:04:34 +01:00
Mario Zechner
c1f2541639
Merge pull request #232 from aliou/fix/symlinked-slash-commands
fix(coding-agent): support symlinked slash commands in discovery
2025-12-19 00:57:11 +01:00