Commit Graph
100 Commits
Author SHA1 Message Date
Mario Zechner 7f9cf543d5 Add [Unreleased] section for next cycle 2026-01-17 00:32:57 +01:00
Mario Zechner 91be338e39 Release v0.48.0 2026-01-17 00:32:07 +01:00
Mario Zechner 760414b288 docs: add missing changelog entries for v0.48.0 2026-01-17 00:31:03 +01:00
Mario Zechner f371069342 docs(coding-agent): add Windows Terminal Shift+Enter config 2026-01-17 00:15:49 +01:00
Mario Zechner 5c938e08d0 docs: document EditorOptions paddingX and editorPaddingX setting 2026-01-16 23:57:35 +01:00
Mario Zechner fe52ff00d2 feat: add editorPaddingX setting for input editor horizontal padding 2026-01-16 23:50:00 +01:00
Mario Zechner 5d3e7d5aaa fix(ai): preserve unsigned tool call context for Gemini 3 with anti-mimicry note
Instead of skipping unsigned tool calls entirely (which lobotomizes context),
convert them to text with an explicit note telling the model this is historical
context from a different model and not a format to mimic.

This preserves tool call/result context when switching from providers without
thought signatures (e.g. Claude via Antigravity) to Gemini 3.
2026-01-16 23:42:39 +01:00
Mario Zechner 1405e30492 revert: remove editor paddingX from coding-agent 2026-01-16 23:19:58 +01:00
Mario Zechner 20f5fcc79d fix(coding-agent): handle auto-compaction failures gracefully
When auto-compaction fails (e.g., quota exceeded), emit the error via
the auto_compaction_end event instead of throwing. The UI now displays
the error message, allowing users to take action (switch models, wait
for quota reset, etc.) instead of crashing.

fixes #792
2026-01-16 23:13:26 +01:00
Mario Zechner 5c59caee4e docs: add critical git rules for parallel agent work
Multiple agents may work on different files in the same worktree.
Added rules to prevent agents from accidentally committing or
destroying each other's work.
2026-01-16 22:41:29 +01:00
Mario Zechner fbb74bb29e fix(ai): filter empty error assistant messages in transformMessages
When 429/500 errors occur during tool execution, empty assistant messages
with stopReason='error' get persisted. These break the tool_use -> tool_result
chain for Claude/Gemini APIs.

Added centralized filtering in transformMessages to skip assistant messages
with empty content and no tool calls. Provider-level filters remain for
defense-in-depth.
2026-01-16 22:35:50 +01:00
Mario Zechner 3326b8f521 Fix --no-extensions flag not preventing extension discovery
When --no-extensions was used, extensionsResult.extensions was an empty
array. The condition in buildSessionOptions() checked .length > 0,
so preloadedExtensions was not set. This caused createAgentSession()
to fall through to extension discovery.

Remove the .length > 0 condition so the empty result is passed through,
signaling that extension loading was already handled.

Fixes #776
2026-01-16 22:01:23 +01:00
Mario Zechner 81f5a12e81 Merge PR #787: Improve navigateTree API
Adds replaceInstructions and label options to navigateTree() for custom summarization prompts and branch labeling.

closes #787
2026-01-16 21:49:29 +01:00
Mario Zechner 572ec64dbd Fix navigateTree API: add missing type updates, handler passthrough, and docs
- Update ExtensionCommandContext.navigateTree type signature
- Pass new options through in print-mode and rpc-mode handlers
- Update docs/extensions.md, docs/sdk.md, docs/tree.md
- Add changelog entry
2026-01-16 21:47:01 +01:00
Mario Zechner ffdc8d686b docs: add OpenCode Zen to provider lists in coding-agent README 2026-01-16 21:20:52 +01:00
Mario Zechner 75628e0cfd fix(coding-agent): use lazy-loaded photon wrapper for Node.js compatibility
Previous commit broke Node.js/tsx by using the ESM entry point which
doesn't work with Node. This creates a wrapper module that:
- Uses require() for lazy loading (works in both Node and Bun)
- Gracefully handles load failures (returns original image)
- Works in Node.js, tsx, and Bun compiled binaries
2026-01-16 21:18:13 +01:00
Mario Zechner 5aa0689828 fix(coding-agent): fix standalone binary WASM loading on Linux, fixes #784
- Import photon-node from ESM entry point (photon_rs_bg.js) instead of CJS
  entry, allowing Bun to embed WASM in compiled binaries
- Add photon.d.ts for TypeScript support of ESM entry
- Add scripts/build-binaries.sh for local binary builds
- Simplify GitHub workflow to use the build script
- Add binaries/ to gitignore
2026-01-16 21:11:01 +01:00
Mario Zechner 0c33e0dee5 chore: audit changelog entries for v0.47.0, add cl.md prompt template
- Add missing changelog entries for commits since v0.47.0
- Cross-duplicate ai/tui fixes to coding-agent changelog
- Change PI_NO_HARDWARE_CURSOR to PI_HARDWARE_CURSOR (opt-in)
- Fix typo in PI_CODING_AGENT_DIR changelog entry
- Add .pi/prompts/cl.md for pre-release changelog audits
2026-01-16 21:11:01 +01:00
Mario Zechner 4dbf094b65 Add PI_NO_HARDWARE_CURSOR env var for terminals with limited escape sequence support
Fixes cursor visibility issues in JetBrains IDE terminals (IntelliJ, PyCharm) where
the hardware cursor either blinks or becomes invisible depending on settings.

Fixes #771
2026-01-16 12:51:09 +01:00
Mario Zechner 3a475fe165 feat(coding-agent): extension command argument autocomplete (#775) 2026-01-16 12:47:40 +01:00
Mario Zechner f900eb591d Fix provider feature detection to use model.provider, not just URL
Previously, OpenAI-compatible provider settings (like developer role support)
were detected only from the baseUrl. When using custom URLs (e.g., proxies),
detection failed. Now checks model.provider first, then falls back to URL.

Fixes #774
2026-01-16 12:41:23 +01:00
Mario Zechner 0b625b66b7 fix(coding-agent): prevent duplicate rendering of extension messages on startup, closes #765 2026-01-16 12:16:57 +01:00
Mario Zechner 0438decd26 docs: add changelog entry for #765 2026-01-16 12:16:49 +01:00
Mario Zechner 05d78ea2de Fix session picker 'No sessions found' overflow 2026-01-16 12:11:01 +01:00
Mario ZechnerandZeno Jiricek 3f4a6857a5 feat: add bash-style array slicing for $@ in prompt templates
Implements support for ${@:N} and ${@:N:L} syntax to slice argument arrays
in prompt templates, following bash conventions.

Closes #769

Co-authored-by: Zeno Jiricek <airtonix@users.noreply.github.com>
2026-01-16 12:09:45 +01:00
Mario Zechner 43c4a80e2e docs: document prompt template slicing 2026-01-16 12:08:57 +01:00
Mario Zechner 2836d97735 Fix session picker empty state overflow 2026-01-16 12:04:55 +01:00
Mario Zechner 588399594c Fix session picker hint overflow (closes #764) 2026-01-16 12:01:50 +01:00
Mario Zechner 589a2ffcd3 Add [Unreleased] section for next cycle 2026-01-16 04:41:48 +01:00
Mario Zechner 6248d86ff6 Release v0.47.0 2026-01-16 04:41:04 +01:00
Mario Zechner cb369b680b Update changelogs for v0.47.0 release
- Add OpenAI Codex official support entry
- Add pi-internal:// URL scheme
- Add ctx.shutdown() fix (#756)
- Add OpenAI Codex retry logic (#733)
- Add third-party contributions:
  - #702 by @aliou (custom tool HTML export)
  - #728 by @richardgill (frontmatter parsing, SelectList fix)
  - #747 by @kaofelix (tree filter shortcuts)
  - #752 by @richardgill (keymap expansion)
2026-01-16 04:39:48 +01:00
Mario Zechner 07fad1362c feat(tui): hardware cursor positioning for IME support
- Add Focusable interface for components that need hardware cursor positioning
- Add CURSOR_MARKER (APC escape sequence) for marking cursor position in render output
- Editor and Input components implement Focusable and emit marker when focused
- TUI extracts cursor position from rendered output and positions hardware cursor
- Track hardwareCursorRow separately from cursorRow for differential rendering
- visibleWidth() and extractAnsiCode() now handle APC sequences
- Update overlay-test.ts example to demonstrate Focusable usage
- Add documentation for Focusable interface in docs/tui.md

Closes #719, closes #525
2026-01-16 04:30:07 +01:00
Mario Zechner d9464383ec chore: remove test extension load-file.ts 2026-01-16 04:14:26 +01:00
Mario Zechner 356a482527 fix(tui): add vertical scrolling to Editor when content exceeds terminal height
The Editor component now accepts TUI as the first constructor parameter,
enabling it to query terminal dimensions. When content exceeds available
height, the editor scrolls vertically keeping the cursor visible.

Features:
- Max editor height is 30% of terminal rows (minimum 5 lines)
- Page Up/Down keys scroll by page size
- Scroll indicators show lines above/below: ─── ↑ 5 more ───

Breaking change: Editor constructor signature changed from
  new Editor(theme)
to
  new Editor(tui, theme)

fixes #732
2026-01-16 04:12:21 +01:00
Mario Zechner d30f6460fa Fix ctx.shutdown() not waiting for pending UI renders, fixes #756 2026-01-16 03:35:41 +01:00
Mario Zechner c50bfec01b Fix piped stdin support, auto-enable print mode
When stdin is piped (not a TTY), read the content and treat it as the
first message. Since interactive mode requires a TTY for keyboard input,
print mode is automatically enabled.

- echo foo | pi -> equivalent to pi -p foo
- echo foo | pi -p -> equivalent to pi -p foo
- RPC mode unaffected (uses stdin for JSON-RPC)

fixes #708
2026-01-16 03:18:56 +01:00
Mario Zechner c08801e4c5 Add retry logic to OpenAI Codex provider
Fixes #733
2026-01-16 03:15:59 +01:00
Mario Zechner a20662da87 Remove broken git-diff extension 2026-01-16 03:07:55 +01:00
Mario Zechner af7a8b5878 Remove temporary test file 2026-01-16 03:04:28 +01:00
Mario Zechner b4a05cbcab Move skill command handling to AgentSession, update docs
- Skill commands (/skill:name) now expanded in AgentSession instead of
  interactive mode, enabling them in RPC and print modes
- Input event can now intercept /skill:name before expansion
- Updated extensions.md with clearer input event docs and processing order
- Updated rpc.md: hook -> extension terminology, added skill expansion mentions
- Added PR attribution to changelog entries for #761
2026-01-16 03:01:08 +01:00
Mario Zechner 012319e15a Support pi-internal:// scheme in read tool
Resolves pi-internal:// paths to the coding-agent package directory,
allowing the model to read internal documentation. Appends a hint
showing the filesystem path and instructing to use it for further reads.
2026-01-16 02:31:59 +01:00
Mario Zechner be26d362fa Fix alt+backspace in Kitty mode and clamp Codex effort (refs #752) 2026-01-16 01:30:46 +01:00
Mario Zechner 6484ae279d Finalize OpenAI Codex compatibility (#737)
- align Codex Responses provider with Pi static instructions
- simplify Codex request/stream handling and cleanup exports
- keep legacy OpenCode Codex prompt for testing until Pi prompt is allowlisted
2026-01-16 00:58:36 +01:00
Mario Zechner 3ed0d1bde7 Update package-lock.json 2026-01-16 00:44:38 +01:00
Mario Zechner d9ac0c7b26 docs(prompts): prefer main files for PR diffs 2026-01-15 18:06:39 +01:00
Mario Zechner bfeec88dbe Merge branch 'pr-739' 2026-01-15 18:06:00 +01:00
Mario Zechner f74f48660f Fix prompt-url-widget session name API 2026-01-15 17:50:24 +01:00
Mario Zechner e46cc55fe0 Add [Unreleased] section for next cycle 2026-01-15 17:36:40 +01:00
Mario Zechner 0aaa4ef5e4 Release v0.46.0 2026-01-15 17:35:54 +01:00
Mario Zechner a216cc496f chore: update changelogs 2026-01-15 17:34:59 +01:00
Mario Zechner cc8c51d9ae chore(ai): regenerate models 2026-01-14 22:25:21 +01:00
Mario Zechner 0a7537bf86 Revert "feat(ai): add gpt-5.2-codex to OpenAI provider (#730)"
This reverts commit 5a795b9857.
2026-01-14 22:22:55 +01:00
Mario Zechner 951e9c88b8 Update session naming for prompt URL widget 2026-01-14 13:08:23 +01:00
Mario Zechner 9712f84ee5 docs(coding-agent): update changelog for recent PRs 2026-01-14 12:03:46 +01:00
Mario Zechner fb6d464edc Fix auto-retry for fetch failed errors 2026-01-14 12:00:55 +01:00
Mario Zechner 95859725b7 Add [Unreleased] section for next cycle 2026-01-14 00:11:36 +01:00
Mario Zechner d08821cc4a Release v0.45.7 2026-01-14 00:10:52 +01:00
Mario Zechner c16698130c chore: update changelogs 2026-01-14 00:09:51 +01:00
Mario Zechner d83e1745d8 Add [Unreleased] section for next cycle 2026-01-13 22:48:47 +01:00
Mario Zechner f8dc72d24f Release v0.45.6 2026-01-13 22:48:05 +01:00
Mario Zechner 6c1d226210 docs: move PR #667 overlay entries to unreleased section 2026-01-13 22:47:38 +01:00
Mario Zechner 3fe73ecd04 docs(ai): add parseStreamingJson export fix to changelog 2026-01-13 22:42:45 +01:00
Mario Zechner 0feed80b07 Don't force rerender in doom 2026-01-13 22:42:00 +01:00
Mario Zechner 2b75948c2e fix(ai): export parseStreamingJson from main package for tsx compatibility 2026-01-13 22:08:19 +01:00
Mario Zechner 7d45e434de Merge branch 'main' into feat/tui-overlay-options 2026-01-13 22:06:02 +01:00
Mario Zechner 9994ebbedd Add [Unreleased] section for next cycle 2026-01-13 21:47:38 +01:00
Mario Zechner 9a08bb0d1e Release v0.45.5 2026-01-13 21:46:57 +01:00
Mario Zechner 6ab3e7c91f fix: skip changelog display on fresh install
Only show changelog when upgrading from a previous version, not on first run.
2026-01-13 21:45:04 +01:00
Mario Zechner 3a1228c0b5 Add [Unreleased] section for next cycle 2026-01-13 21:37:34 +01:00
Mario Zechner bb0ba88b97 Release v0.45.4 2026-01-13 21:36:52 +01:00
Mario Zechner 13c4205dbb fix: use wrapper directory in release tarballs for mise compatibility
mise auto-detects single-directory archives and extracts with strip_components=1.
Using a 'pi/' wrapper directory ensures the internal structure is preserved.

Reverts the code workaround (theme dir fallback) in favor of fixing the tarball.
2026-01-13 21:33:32 +01:00
Mario Zechner d2f15f9ebb fix: theme loading when installed via mise (fixes #681)
mise flattens tarball structure, placing theme files at root instead of theme/.
Fall back to root directory if theme/ subdirectory doesn't exist.
2026-01-13 21:23:40 +01:00
Mario Zechner 843f235251 fix: extension loading in Bun binary (#681)
- Remove loader exports from index.ts to break circular dependency
- Static import of index.js in loader.ts for virtualModules
- Add @mariozechner/pi-agent-core to virtualModules
- Update @mariozechner/jiti to 2.6.5 (bundles babel for Bun binary)
- Update SDK docs to use correct extension terminology
2026-01-13 21:19:41 +01:00
Mario Zechner 53d9e61bac docs: add changelog entries for contributed extension examples
- summarize.ts (#684 by @scutifer)
- question.ts enhanced (#693 by @ferologics)
- plan-mode/ enhanced (#694 by @ferologics)
- questionnaire.ts (#695 by @ferologics)
2026-01-13 18:36:01 +01:00
Mario Zechner 36bb1d3865 docs: update extension examples READMEs and fix plan-mode references
- Add missing extensions to examples/extensions/README.md:
  questionnaire.ts, truncated-tool.ts, model-status.ts, rainbow-editor.ts,
  custom-footer.ts, custom-header.ts, overlay-test.ts, shutdown-command.ts,
  interactive-shell.ts, claude-rules.ts, mac-system-theme.ts
- Update plan-mode.ts -> plan-mode/ (now a directory)
- Add new System Integration section
- Update docs/extensions.md plan-mode.ts -> plan-mode/index.ts (17 refs)
- Add questionnaire.ts to registerTool and ctx.ui.select() examples
- Expand examples/README.md description
2026-01-13 18:34:08 +01:00
Mario Zechner e45fc5f91b Replace sharp with wasm-vips for image processing
Fixes #696

- Replaced sharp dependency with wasm-vips (WebAssembly build of libvips)
- Eliminates native build requirements that caused installation failures
- Added vips.ts singleton wrapper for async initialization
- Updated image-resize.ts and image-convert.ts to use wasm-vips API
- Added unit tests for image processing functionality
2026-01-13 18:34:07 +01:00
Mario Zechner 09d409cc92 Fix z.ai thinking/reasoning params, fixes #688
Z.ai uses thinking: { type: "enabled" | "disabled" } instead of
OpenAI's reasoning_effort. Added thinkingFormat compat flag to handle
this. Thinking is now explicitly enabled/disabled based on user setting.
2026-01-13 18:34:07 +01:00
Mario Zechner 7534802752 refactor: add ModelRegistry.getApiKeyForProvider() for cleaner abstraction 2026-01-13 18:12:09 +01:00
Mario Zechner 3272040873 remove useless test from #691 2026-01-13 18:08:52 +01:00
Mario Zechner 28072cb31f Add more models to stream.test.ts for Vercel, set infinite timeout on OpenAI responses, closes #690 2026-01-13 17:08:56 +01:00
Mario Zechner 1d8d5d3d88 Add handleImage and multiTurn tests for vercel-ai-gateway in stream.test.ts 2026-01-13 16:56:48 +01:00
Mario Zechner 19f3c23f6d Fix PR #689: Add changelog attribution, coding-agent changelog, fix test types, add provider to test suites
- Fix ai/CHANGELOG.md: add PR link and author attribution
- Add coding-agent/CHANGELOG.md entry for vercel-ai-gateway provider
- Fix model-resolver.test.ts: use anthropic-messages API type to match generated models
- Add vercel-ai-gateway to test suites: tokens, abort, empty, context-overflow, unicode-surrogate, tool-call-without-result, image-tool-result, total-tokens, image-limits
2026-01-13 16:46:00 +01:00
Mario Zechner bde59e6c0d Merge PR #689: Add Vercel AI Gateway provider 2026-01-13 16:42:38 +01:00
Mario Zechner 75146a2b96 Add [Unreleased] section for next cycle 2026-01-13 04:57:25 +01:00
Mario Zechner 2090599e4b Release v0.45.3 2026-01-13 04:56:41 +01:00
Mario Zechner 1919fd7c9c Use @mariozechner/jiti fork with virtualModules for extension loading in Bun binary
- Switch from jiti to @mariozechner/jiti fork
- Use virtualModules option for bundled packages in compiled binary
- Disable tryNative so jiti handles all nested imports
- Lazy-load pi-coding-agent to avoid circular dependency
2026-01-13 04:55:11 +01:00
Mario Zechner cedd8fe306 Clean-up 2026-01-13 04:33:43 +01:00
Mario Zechner 3c60ffa677 Fix tool call ID normalization for cross-provider switches to Anthropic/GitHub Copilot 2026-01-13 04:07:10 +01:00
Mario Zechner 3690137ecc Fix binary build: use Bun 1.2.20 (1.3.4 has cross-compile issues) 2026-01-13 03:37:34 +01:00
Mario Zechner 6c2167a0fe Add [Unreleased] section for next cycle 2026-01-13 03:28:40 +01:00
Mario Zechner c55082bb66 Release v0.45.2 2026-01-13 03:27:56 +01:00
Mario Zechner b8df988144 Fix extension loading in Bun binary by using jiti with aliases 2026-01-13 03:26:42 +01:00
Mario Zechner 71ee79f31a Add [Unreleased] section for next cycle 2026-01-13 03:07:28 +01:00
Mario Zechner e4a98d8381 Release v0.45.1 2026-01-13 03:06:43 +01:00
Mario Zechner d01d3df81f Update /share URL to buildwithpi.ai 2026-01-13 03:04:31 +01:00
Mario Zechner 3efe58a62c Add [Unreleased] section for next cycle 2026-01-13 02:42:20 +01:00
Mario Zechner e22feba494 Release v0.45.0 2026-01-13 02:41:36 +01:00
Mario Zechner b8354ff90e docs(coding-agent): add MiniMax provider to changelog 2026-01-13 02:37:25 +01:00
Mario Zechner 7706140497 Merge feat/minimax-provider-656: Add MiniMax provider support (closes #656) 2026-01-13 02:32:34 +01:00
Mario Zechner 8af8d0d672 Add MiniMax provider support (#656 by @dannote)
- Add minimax to KnownProvider and Api types
- Add MINIMAX_API_KEY to getEnvApiKey()
- Generate MiniMax-M2 and MiniMax-M2.1 models
- Add context overflow detection pattern
- Add tests to all required test files
- Update README and CHANGELOG with attribution

Also fixes:
- Bedrock duplicate toolResult ID when content has multiple blocks
- Sandbox extension unused parameter lint warning
2026-01-13 02:27:09 +01:00