Commit graph

2107 commits

Author SHA1 Message Date
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
Markus Ylisiurunen
00ba005e50
set the prompt cache key to session id (#698) 2026-01-13 18:29:36 +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
Josh Palmer
8936c5d136 fix(coding-agent): resolve api keys by provider
What:
- resolve API keys using provider argument
- add regression test for model-switch key resolution
- update coding-agent changelog
- document provider lookup in SDK

Why:
- prevent model-switch 401s from provider mismatch

Tests:
- npm run check
- npm run test -w @mariozechner/pi-coding-agent -- sdk-api-key.test.ts
2026-01-13 18:07:26 +01:00
Fero
1c58db5e23
feat(question): enhanced question tool with custom UI (#693)
Changes from the original:
- Full custom UI with options list instead of simple ctx.ui.select()
- Option descriptions: support { label, description? } in addition to strings
- Built-in 'Other...' option with inline editor for free-text input
- Better UX: Escape in editor returns to options, Escape in options cancels
- Numbered options display (1. Option, 2. Option, etc.)
- Enhanced result rendering showing selection index
2026-01-13 17:53:39 +01:00
Fero
e8f1322eee
feat(plan-mode): enhanced plan mode with explicit step tracking (#694)
Changes from the original:
- Explicit [DONE:n] tag tracking (more accurate than auto-marking on tool_result)
- Plan: header requirement - only extracts todos from 'Plan:' sections
- Utils extracted to separate file for testability
- Better session resume - only scans messages after plan-mode-execute marker
- Context filtering - properly filters plan-mode-context custom type messages
- Refactored to directory structure (index.ts + utils.ts + README.md)

The original auto-completed steps on every tool_result, which was inaccurate
for multi-tool steps. This version uses explicit [DONE:n] markers that the
agent outputs after completing each step.
2026-01-13 17:53:11 +01:00
Fero
a7a863c792
feat: add questionnaire tool for multi-question input (#695)
New tool for asking users one or more questions with a tab-based interface.

Features:
- Single question: simple options list (similar to question tool)
- Multiple questions: tab bar navigation between questions
- Progress indicators: ■/□ checkboxes show answered state
- Submit tab: review all answers before submitting
- 'Type something' option: free-text input with options visible
- Full keyboard navigation: Tab/←→ between questions, ↑↓ for options

Use cases:
- Clarifying requirements with multiple aspects
- Getting user preferences across categories
- Multi-step confirmation dialogs

Example:
```typescript
{
  questions: [{
    id: "db",
    label: "Database",
    prompt: "Which database?",
    options: [
      { value: "pg", label: "PostgreSQL", description: "Relational" },
      { value: "mongo", label: "MongoDB", description: "Document store" }
    ]
  }, {
    id: "auth",
    label: "Auth",
    prompt: "Authentication method?",
    options: [
      { value: "jwt", label: "JWT" },
      { value: "session", label: "Sessions" }
    ]
  }]
}
```
2026-01-13 17:52:22 +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
Timo Lins
dd263f3c24 Update model list 2026-01-13 16:42:34 +01:00
Timo Lins
65eb738c90 Rename to vercel-ai-gateway for clarity 2026-01-13 16:42:34 +01:00
Timo Lins
9860ee86f3 Change to Anthropic compatible API
It seemed as if the OpenAI message spec tried to send non-compliant messages with { text: "" } instead of { contet: "" }, which the AI Gateway did not accept.
2026-01-13 16:42:34 +01:00
Timo Lins
164a69a601 Add Vercel AI Gateway support 2026-01-13 16:42:34 +01:00
scutifer
907fa937e6
Improve light theme color contrast for WCAG compliance (#682)
Adjust base colors (teal, blue, green, red, yellow, dimGray) to meet
4.5:1 contrast ratio against white backgrounds. Update thinking level
colors to reference theme vars for consistency.

Refactor test-theme-colors.ts into a CLI with contrast, test, and theme
commands for easier color validation.

Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-01-13 13:03:04 +01:00
Markus Ylisiurunen
922b0a4668
add eu cross-region inference model ids for anthropic models (#685) 2026-01-13 13:02:27 +01:00
scutifer
0f4d929a8e
coding-agent: example extension to summarize conversation (#684)
* feat: add summarize extension example

Demonstrates custom UI with markdown rendering and external model
integration for conversation summarization.

* chore: update examples/extensions/README.md with summarize.ts
2026-01-13 13:01:09 +01:00
Nico Bailon
a4ccff382c feat(tui): overlay positioning API with CSS-like values
Add OverlayOptions for configurable positioning (anchor, margins, offsets,
percentages). Add OverlayHandle for programmatic visibility control with
hide/setHidden/isHidden. Add visible callback for responsive overlays.

Extension API: ctx.ui.custom() now accepts overlayOptions and onHandle callback.

Examples: overlay-qa-tests.ts (10 test commands), doom-overlay (DOOM at 35 FPS).
2026-01-12 22:44:58 -08: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
banteg
fe0cf49e3f
feat(coding-agent): emit session header in json print mode (#679)
Also mark sandbox extension ctx param as intentionally unused.
2026-01-13 03:04:02 +01:00