Commit Graph
100 Commits
Author SHA1 Message Date
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
Mario Zechner edc576024f Regenerate package-lock.json with all platform bindings
Reverts CI workarounds - the lockfile now properly includes Linux native
bindings for parcel watcher, rollup, tailwindcss oxide, and lightningcss.
2026-01-13 01:17:08 +01:00
Mario Zechner 5c1228a017 Fix CI: add tailwindcss oxide Linux binding 2026-01-13 01:13:22 +01:00
Mario Zechner 9de970ed24 Fix CI: also install lightningcss Linux binding 2026-01-13 01:11:15 +01:00
Mario Zechner 38546e3e82 Merge PR #676: Feature/scoped models ordering 2026-01-13 01:10:43 +01:00
Mario Zechner ea860751fd Fix CI: install missing parcel watcher Linux binding
package-lock.json was generated on macOS and only includes darwin
bindings. The Linux glibc binding is needed by tailwindcss.
2026-01-13 01:07:48 +01:00
Mario Zechner 9c694e36f8 Add changelog entry for #670 2026-01-13 01:05:26 +01:00
Mario Zechner 259a41c8fd docs: Note prompt caching in Bedrock changelog entry 2026-01-13 00:38:35 +01:00
Mario Zechner d442bbcc19 feat(ai): Add prompt caching for Claude models on Bedrock
Adds cache points to system prompt and last user message for:
- Claude 3.5 Haiku
- Claude 3.7 Sonnet
- Claude 4.x models (Opus, Sonnet, Haiku)

Uses Bedrock's cachePoint blocks with 5-minute TTL.
2026-01-13 00:38:12 +01:00
Mario Zechner d0c1065731 docs: Mark Bedrock as experimental, add coding-agent changelog entry 2026-01-13 00:36:22 +01:00
Mario Zechnerandnickchan2 fd268479a4 feat(ai): Add Amazon Bedrock provider (#494)
Adds support for Amazon Bedrock with Claude models including:
- Full streaming support via Converse API
- Reasoning/thinking support for Claude models
- Cross-region inference model ID handling
- Multiple AWS credential sources (profile, IAM keys, API keys)
- Image support in messages and tool results
- Unicode surrogate sanitization

Also adds 'Adding a New Provider' documentation to AGENTS.md and README.

Co-authored-by: nickchan2 <nickchan2@users.noreply.github.com>
2026-01-13 00:32:59 +01:00
Mario Zechner 8cb9a42067 docs(coding-agent): add changelog entry for sandbox extension (#673) 2026-01-12 23:25:54 +01:00
Mario Zechner 7cad705a15 Add [Unreleased] section for next cycle 2026-01-12 19:05:08 +01:00
Mario Zechner 477c263838 Release v0.44.0 2026-01-12 19:04:28 +01:00
Mario Zechner 842a65f06a Add changelog and docs for settings fuzzy search (#643) 2026-01-12 19:00:33 +01:00
Mario Zechner d91c7a000a Add fuzzy search to settings list (#643) 2026-01-12 18:10:36 +01:00
Mario Zechner 0138eee6f7 Fix tool mapping 2026-01-12 17:56:13 +01:00
Mario Zechner 8e5b0112e7 Add changelog entry for theme fix 2026-01-12 17:52:02 +01:00
Mario Zechner f8e5fe1ed0 Use globalThis for theme to share across module loaders
When running with tsx in dev mode, jiti loads extensions in a separate
module cache. This caused the theme to be undefined in jiti's copy of
theme.ts since initTheme() was only called on tsx's copy.

Using globalThis with Symbol.for() ensures all module instances share
the same theme, regardless of which loader created them.
2026-01-12 17:51:41 +01:00
Mario Zechner 5f380822ea Revert "Fix jiti alias resolution in dev mode with tsx"
This reverts commit c7aa2c97a9.
2026-01-12 17:41:46 +01:00
Mario Zechner c7aa2c97a9 Fix jiti alias resolution in dev mode with tsx
When running from source with tsx, the jiti aliases pointed to .js files
that don't exist (only .ts files exist). This caused jiti to fall back to
different module resolution, loading a separate instance of theme.ts where
initTheme() was never called, resulting in undefined theme.

Now checks if .js exists and falls back to .ts for dev mode compatibility.
2026-01-12 17:38:31 +01:00
Mario Zechner a46c4aab4f Revert "Initialize theme with default value at module load time"
This reverts commit d18e44d378.
2026-01-12 17:29:56 +01:00
Mario Zechner d18e44d378 Initialize theme with default value at module load time
Prevents undefined theme when extensions call ctx.ui.custom() in edge cases
where module resolution could cause the theme variable to be accessed before
initTheme() is called.
2026-01-12 17:27:59 +01:00
Mario Zechner a60cd42d40 Merge PR #648: Change getAllTools() to return ToolInfo[]
Breaking change: pi.getAllTools() now returns ToolInfo[] (with name and description) instead of string[].
Extensions that only need names can use .map(t => t.name).

Closes #648
Fixes #647
2026-01-12 17:18:48 +01:00
Mario Zechner 1367a76ee8 Change getAllTools() to return ToolInfo[] instead of string[]
Breaking change: pi.getAllTools() now returns Array<{ name, description }>
instead of string[]. Extensions needing just names can use .map(t => t.name).

Removes redundant getToolInfo() method added in original PR.

Fixes #647
2026-01-12 17:18:43 +01:00
Mario Zechner 34ecca352e fix(tui): numbered list items showing '1.' when code blocks break list continuity (#660) 2026-01-12 17:10:02 +01:00
Mario Zechner 234f367d0d fix(coding-agent): make /new create a new session file
fixes #649
2026-01-12 17:06:33 +01:00
Mario Zechner 8f95a13e07 feat(coding-agent): add session naming via /name command and extension API
- Add SessionInfoEntry type for session metadata
- Add /name <name> command to set session display name
- Add pi.setSessionName() and pi.getSessionName() extension API
- Session selector shows name (in warning color) instead of first message when set
- Session name included in fuzzy search
- /session command displays name when set

closes #650
2026-01-12 16:56:39 +01:00
Mario Zechner 6f3ba88733 fix(coding-agent): prevent session selector from closing immediately when current folder has no sessions (#661) 2026-01-12 16:38:10 +01:00
Mario Zechner 3433d88648 fix(coding-agent): inline ALT+UP UI hint (#657)
- Add inline hint for queued messages showing the Alt+Up restore shortcut
- Update README.md to document dequeue keybinding
- fixes #657
2026-01-12 16:36:57 +01:00
Mario Zechner 06bf2493a1 docs: add changelog and readme entry for notify.ts extension (#658) 2026-01-12 16:33:42 +01:00
Mario Zechner 175a137d00 Fix missing spacer between assistant message and text editor
Initialize widgetContainer with default spacer during init() instead of
only when extension widgets change.

fixes #655
2026-01-12 14:26:22 +01:00
Mario Zechner 6730b4fa59 Add [Unreleased] section for next cycle 2026-01-12 01:00:23 +01:00
Mario Zechner 8ac130c729 Release v0.43.0 2026-01-12 00:59:39 +01:00
Mario Zechner 50cd054edb Rework /scoped-models command UX
- Renamed from /models to /scoped-models
- Changes are now session-only by default (Ctrl+S to persist to settings)
- Added search with fuzzy filtering
- Hotkeys: Enter toggle, Ctrl+A enable all, Ctrl+X clear all, Ctrl+P toggle provider
- Ctrl+C clears search (or exits if empty), Escape exits
- Enabled models shown at top of list
- No checkmarks when all models enabled (no scope)
- First toggle when unscoped clears all and selects that model
- Uses current session thinking level instead of settings default
- Reads from session state first (preserves session-only changes across /scoped-models invocations)

Builds on #626
2026-01-12 00:53:52 +01:00
Mario Zechner 4755da4bfb Remove minor rendering fix from changelog 2026-01-12 00:18:18 +01:00
Mario Zechner c16e21331a Preserve tree selection when returning from summary selector or abort 2026-01-12 00:15:12 +01:00
Mario Zechner a0311fd5b9 Return to summary selector when cancelling custom instructions editor 2026-01-12 00:12:36 +01:00
Mario Zechner 3caaae0491 Merge PR #642: Hook up custom summarization on branch switch 2026-01-12 00:10:21 +01:00
Mario Zechner 783aa0d6d0 Add changelog, update docs, fix handoff example for PR #642 2026-01-12 00:10:14 +01:00
Mario Zechner 9d49b4d4ed Merge branch 'tmp-2025-01-11' - resume scope toggle with async loading (#620) 2026-01-12 00:00:28 +01:00
Mario ZechnerandThomas Mustier 302404684f feat(coding-agent): add resume scope toggle with async loading
- /resume and --resume now toggle between Current Folder and All sessions with Tab
- SessionManager.list() and listAll() are now async with optional progress callback
- Shows loading progress (e.g. Loading 5/42) while scanning sessions
- SessionInfo.cwd field shows session working directory in All view
- Lazy loading: All sessions only loaded when user presses Tab

closes #619

Co-authored-by: Thomas Mustier <mustierthomas@gmail.com>
2026-01-12 00:00:03 +01:00
Mario Zechner c997305685 fix(coding-agent): footer git branch not updating after external branch switches
Git uses atomic writes (temp file + rename) which changes the inode.
fs.watch on a file stops working after the inode changes.
Now watches the directory containing HEAD and filters for HEAD changes.
2026-01-11 23:27:22 +01:00
Mario Zechner e4f1c0bb4d fix(coding-agent): display extension loading errors to user (#639) 2026-01-11 23:24:10 +01:00
Mario Zechner df3f5f41c0 Rename /branch command to /fork
- RPC: branch -> fork, get_branch_messages -> get_fork_messages
- SDK: branch() -> fork(), getBranchMessages() -> getForkMessages()
- AgentSession: branch() -> fork(), getUserMessagesForBranching() -> getUserMessagesForForking()
- Extension events: session_before_branch -> session_before_fork, session_branch -> session_fork
- Settings: doubleEscapeAction 'branch' -> 'fork'

fixes #641
2026-01-11 23:12:31 +01:00
Mario Zechner e7352a50bf Merge pull request #640 from patrick-kidger/patch-1
Fix install-from-source instructions
2026-01-11 23:03:32 +01:00
Mario Zechner c07126c0fd fix(tui): remove Kitty protocol query timeout
The 100ms timeout was causing Kitty protocol detection to fail when the
terminal response was delayed (e.g., due to event loop blocking during
startup). This resulted in shift+enter not working in some scenarios.

Changes:
- Remove timeout-based Kitty detection, process input immediately
- Detect Kitty response in stdinBuffer output (handles split data)
- Add modifyOtherKeys fallback for terminals without Kitty support
  (matches xterm format \x1b[27;modifier;keycode~)
2026-01-11 22:51:30 +01:00
Mario Zechner f1e225d9e7 Add /models command for enabling/disabling Ctrl+P model cycling (#626)
- New /models command with toggle UI for each available model
- Changes persist to enabledModels in settings.json
- Updates take effect immediately for Ctrl+P cycling
- Added documentation to README.md

closes #626
2026-01-11 19:36:42 +01:00
Mario Zechner 42ed0129ed Merge pull request #634 from ogulcancelik/fix/extension-context-model-getter
fix: custom footer extensions now see model changes
2026-01-11 19:31:09 +01:00
Mario Zechner 3eb91d223f fix(ai): Google thinking detection + remove unsupported id fields (#631) 2026-01-11 19:26:07 +01:00
Mario Zechner 667cf5aa6e docs(ai): add changelog entry for Google thinking fix 2026-01-11 19:26:00 +01:00
Mario Zechner f5e97427ce chore: add changelog entry for resume keybindings 2026-01-11 19:23:04 +01:00
Mario Zechner da6a2fb5ea test(tui): cover style reset cases 2026-01-11 19:01:16 +01:00
Mario Zechner ae134e7e02 Merge pull request #632 from thomasmhr/patch-1
Fix header level for tool usage rules
2026-01-11 18:59:16 +01:00
Mario Zechner 6d495348c5 fix(tui): reset styles per line 2026-01-11 18:36:48 +01:00
Mario Zechner 741262d89d Merge model-select-hook: add model_select extension hook (#628) 2026-01-11 18:12:54 +01:00
Mario Zechner a20c6efe17 feat(coding-agent): add model_select extension hook
Fires when the model changes via /model command, model cycling (Ctrl+P),
or session restore. Includes source field and previousModel.

Add model-status.ts example extension demonstrating status bar updates.

closes #628
2026-01-11 18:12:46 +01:00
Mario Zechner 5db7cc693b fix: Model selector fuzzy search matches id + provider
Restores original behavior from 3de8e075. Allows multi-token queries
like 'opus anthropic' to match Anthropic models.
2026-01-11 18:04:57 +01:00
Mario Zechner 3592f9b7c9 fix: Model selector fuzzy search matches provider + id
Allows queries like 'anthropic opus' to match Anthropic models.
Previously only matched against model ID, so 'anthropic' token failed.
2026-01-11 18:00:52 +01:00
Mario Zechner 9655907624 feat: Add skill slash commands and fuzzy matching for all commands
- Skills registered as /skill:name commands for quick access
- Toggle via /settings or skills.enableSkillCommands in settings.json
- Fuzzy matching for all slash command autocomplete (type /skbra for /skill:brave-search)
- Moved fuzzy module from coding-agent to tui package for reuse

Closes #630 by @Dwsy (reimplemented with fixes)
2026-01-11 17:56:11 +01:00
Mario Zechner 92486e026c Add session transcript analysis script
- Extracts user/assistant messages from session files for a given cwd
- Splits into ~100k char files to fit in context
- Spawns pi subagents to analyze each file for recurring patterns
- Compares against existing AGENTS.md to mark NEW vs EXISTING patterns
- Final aggregation step creates FINAL-SUMMARY.txt with consolidated findings
- Shows progress with tool call args during analysis
2026-01-11 17:28:39 +01:00
Mario Zechner 925ed89af1 Merge pull request #625 from nicobailon/feat/set-working-message
feat: add ctx.ui.setWorkingMessage() extension API
2026-01-11 12:36:50 +01:00
Mario Zechner 016a24e9a1 Add [Unreleased] section for next cycle 2026-01-11 04:11:34 +01:00