Commit graph

131 commits

Author SHA1 Message Date
Mario Zechner
52532c7c00 fix(ai): update Antigravity User-Agent to 1.15.8
fixes #1079
2026-01-29 23:10:49 +01:00
Mario Zechner
df667b510a Release v0.50.3 2026-01-29 04:19:02 +01:00
Mario Zechner
9bb627a524 Release v0.50.2 2026-01-29 03:23:41 +01:00
Mario Zechner
29c59d79ba Release v0.50.1 2026-01-27 00:14:58 +01:00
Mario Zechner
453e104d3a Release v0.50.0 2026-01-26 16:54:37 +01:00
Mario Zechner
930207130b docs(coding-agent): improve extensions.md, add missing examples
- Add cross-links to session.md, keybindings.md, themes.md
- Document truncateLine, highlightCode, getLanguageFromPath utilities
- Add examples for previously undocumented APIs:
  - message-renderer.ts: registerMessageRenderer with Box styling
  - session-name.ts: setSessionName/getSessionName
  - event-bus.ts: pi.events for inter-extension communication
  - bookmark.ts: setLabel for entry bookmarking
- Update examples table in extensions.md and README.md
2026-01-26 11:43:01 +01:00
Mario Zechner
353ac792eb chore(gitlab-duo): use pi's own GitLab OAuth client ID 2026-01-25 01:12:50 +01:00
Mario Zechner
0d24ddbb03 fix(ai): use model.api instead of hardcoding api type in streaming functions
- anthropic.ts: use model.api instead of hardcoding 'anthropic-messages'
- openai-responses.ts: use model.api instead of hardcoding 'openai-responses'
- gitlab-duo: simplify to use actual model IDs, export MODELS array
2026-01-25 00:52:34 +01:00
Mario Zechner
7019fdb92b fix(gitlab-duo): use Responses API for all GPT models
Ensures consistent tool call ID format when switching between models.
2026-01-25 00:29:05 +01:00
Mario Zechner
758baa9fec refactor: rename custom provider examples
- custom-provider -> custom-provider-anthropic
- gitlab-duo -> custom-provider-gitlab-duo
- Update READMEs with custom provider section
2026-01-25 00:18:13 +01:00
Mario Zechner
7caa08999e fix: use template literal in test.ts 2026-01-25 00:13:44 +01:00
Mario Zechner
7a5cfdaed0 fix: apply extension provider registrations before model resolution
- Extensions register providers via pendingProviderRegistrations
- These were only applied in bindCore() during AgentSession creation
- But model resolution in main.ts happens before session creation
- Fix: apply pending registrations immediately after loading extensions
- Also fix gitlab-duo to pass Authorization header instead of apiKey
2026-01-25 00:13:20 +01:00
Mario Zechner
dd01d83e64 fix: use opencode's OAuth client ID for localhost redirects 2026-01-24 23:53:56 +01:00
Mario Zechner
639d706156 fix: use correct GitLab OAuth redirect URI with port 8080 2026-01-24 23:52:04 +01:00
Mario Zechner
3e6d8dc72a feat: add GitLab Duo provider extension example
- Delegates to pi-ai's built-in Anthropic/OpenAI streaming
- OAuth support with GitLab's bundled client ID
- Direct access token caching (25 min TTL)
- Models: duo-chat-opus/sonnet/haiku-4-5, duo-chat-gpt-5-1/mini/codex
- No external dependencies beyond pi-ai
2026-01-24 23:51:17 +01:00
Mario Zechner
6aad6e30ce refactor: convert custom-provider example to package with deps
- Move custom-provider.ts to custom-provider/index.ts
- Add package.json with @anthropic-ai/sdk dependency
- Extension now requires npm install before use
2026-01-24 23:21:19 +01:00
Mario Zechner
177c694406 feat: custom provider support with streamSimple
- Add resetApiProviders() to clear and re-register built-in providers
- Add createAssistantMessageEventStream() factory for extensions
- Add streamSimple support in ProviderConfig for custom API implementations
- Call resetApiProviders() on /reload to clean up extension providers
- Add custom-provider.md documentation
- Add custom-provider.ts example with full Anthropic implementation
- Update extensions.md with streamSimple config option
2026-01-24 23:15:11 +01:00
Mario Zechner
c5c515f560 remove chalk-logger example (breaks TUI by using console.log directly)
The with-deps example demonstrates npm dependency resolution properly.
2026-01-23 21:04:15 +01:00
Mario Zechner
7af1919d31 fix: use portable shebang in shell scripts
Change #!/bin/bash to #!/usr/bin/env bash for better portability
on systems like NixOS where /bin/bash doesn't exist.

Fixes #910
2026-01-22 21:44:39 +01:00
Mario Zechner
866d21c252 chore: move pi-dosbox to separate repo
Moved to https://github.com/badlogic/pi-dosbox
2026-01-22 13:19:54 +01:00
Mario Zechner
c083e195ad Revert "fix(pi-dosbox): force image re-render to prevent ghosting during streaming"
This reverts commit 1668a59bff.
2026-01-22 05:36:00 +01:00
Mario Zechner
1668a59bff fix(pi-dosbox): force image re-render to prevent ghosting during streaming
The TUI only re-renders changed lines. During agent streaming, the
conversation lines above DOSBox change but DOSBox lines stay the same.
This caused the image to stay at its old position while text scrolled.

Fix: Add invisible timestamp to image line to force TUI to see it as
changed every render, ensuring the image is always re-rendered at the
correct position.
2026-01-22 05:30:57 +01:00
Mario Zechner
29e6c13c03 fix(pi-dosbox): use post-init FS mounting instead of bundle.extract
bundle.extract() uses XMLHttpRequest which doesn't exist in Node.js.
Reverted to writing files directly to Emscripten FS after DOSBox init.
jsdos mounts C: to /home/web_user by default.
2026-01-22 05:11:57 +01:00
Mario Zechner
935417cff1 fix(pi-dosbox): include QBasic files in jsdos bundle
The previous approach of writing files to Emscripten FS after DOSBox
started didn't work because the C: drive mount was pointing elsewhere.

Now we create a proper zip archive of QBasic files and include it in
the jsdos bundle using the extract() API with a data URL. The bundle
extracts to the C: drive root on startup.
2026-01-22 05:09:32 +01:00
Mario Zechner
4f343f39b9 feat(pi-dosbox): persistent DOSBox with QBasic and agent tool
- DOSBox now starts at session_start and persists in background
- /dosbox command attaches UI to running instance (Ctrl+Q detaches)
- Added dosbox tool with actions: send_keys, screenshot, read_text
- Bundled QuickBASIC 4.5 files, mounted at C:\QB on startup
- Agent can interact with DOSBox programmatically via tool

Use: pi -e ./examples/extensions/pi-dosbox
Then: /dosbox to view, or let agent use the dosbox tool
2026-01-22 05:03:39 +01:00
Mario Zechner
fbd6b7f9ba fix(tui): prevent image ID collisions between modules
- allocateImageId() now returns random IDs instead of sequential
- Static images no longer auto-allocate IDs (transient display)
- Only explicit imageId usage (like DOSBox) gets tracked IDs
- Suppress emulators exit logging in DOSBox dispose

Fixes image replacement bug when extension and main app both
allocated sequential IDs starting at 1.
2026-01-22 04:52:55 +01:00
Mario Zechner
df1d5c40ea fix(tui): proper Kitty image ID management and cleanup
- Add allocateImageId() to generate unique image IDs
- Add deleteKittyImage() and deleteAllKittyImages() functions
- Image component now tracks its ID and has dispose() method
- renderImage() returns imageId for tracking
- DOSBox: reuse single image ID for all frames, delete on dispose

Fixes image accumulation hitting terminal quota and lingering
images after component close.
2026-01-22 04:39:58 +01:00
Mario Zechner
6515b1a3dd feat(coding-agent): add DOSBox terminal extension
- Render DOSBox framebuffer as images in terminal via emulators package
- Support keyboard input with js-dos key codes
- Push Kitty enhanced mode for proper key press/release events
- Standalone app (npm start) and pi extension entry point
- Exit with Ctrl+Q
2026-01-22 04:35:43 +01:00
Mario Zechner
34d28a47b5 Release v0.49.3 2026-01-22 01:42:43 +01:00
Mario Zechner
289d88c284 feat(coding-agent): add Space Invaders example extension
- Classic gameplay with 5x11 alien formation
- 3 alien types, destructible shields, level progression
- Uses Kitty keyboard protocol for smooth movement
- Saves game state on pause, tracks high score
2026-01-22 01:39:51 +01:00
Ben Vargas
f39ec4d772
feat(extensions): add antigravity-image-gen example for image generation (#893)
Adds a new extension that generates images via Google Antigravity's
image models (gemini-3-pro-image, imagen-3). Features:

- Returns images as tool result attachments for inline terminal rendering
- Configurable save modes: none, project, global, custom
- Supports env vars (PI_IMAGE_SAVE_MODE, PI_IMAGE_SAVE_DIR) and config files
- Configurable aspect ratios (1:1, 16:9, etc.)

Requires OAuth login via /login for google-antigravity provider.
2026-01-22 01:34:22 +01:00
scutifer
82cc0fe866
feat(extensions): add inline-bash example for expanding !{command} in prompts (#881)
* feat(extensions): add inline-bash example for expanding !{command} in prompts

Adds an example extension that expands inline bash commands within user
prompts before sending to the agent. Uses the `input` event to transform
patterns like `!{pwd}` or `!{git status}` into their output.

Preserves existing `!command` whole-line bash behavior.

* docs(extensions): add inline-bash to README

* chore: fix stupid bug
2026-01-21 14:08:07 +01:00
Mario Zechner
17a37bd174 Release v0.49.2 2026-01-19 16:14:07 +01:00
Marc Krenn
abb1775ff7
feat(coding-agent): Add widget placement option (#850)
* Add widget placement for extension widgets

* Remove changelog entry for widget placement

* Keep no-op widget signature

* Move widget render before attach
2026-01-19 15:54:24 +01:00
Ted
f711340136
fix question option schema (#846) 2026-01-19 14:57:23 +01:00
Mario Zechner
15a04c585a Release v0.49.1 2026-01-19 00:23:11 +01:00
Mario Zechner
3e6ae39083 Release v0.49.0 2026-01-17 22:02:12 +01:00
Mario Zechner
05ee8e3334 fix(coding-agent): show compaction UI for extensions 2026-01-17 11:48:54 +01:00
Mario Zechner
9d3f8117a4 feat(coding-agent): add extension compaction helpers 2026-01-17 11:40:39 +01:00
Jian Zhang
fc538f6ca1
feat(coding-agent): export VERSION and update custom-header example (#798)
Co-authored-by: Jian Zhang <jzhang@yanhuangdata.com>
2026-01-17 10:54:00 +01:00
Mario Zechner
91be338e39 Release v0.48.0 2026-01-17 00:32:07 +01:00
Mario Zechner
6248d86ff6 Release v0.47.0 2026-01-16 04:41:04 +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
Nico Bailon
3e5d91f287
feat(coding-agent): add input event for extension input interception (#761)
* feat(coding-agent): add input event for extension input interception

Extensions can now intercept, transform, or handle user input before the
agent processes it. Three result types: continue (pass through), transform
(modify text/images), handled (respond without LLM). Handlers chain
transforms and short-circuit on handled. Source field identifies origin.

* fix: make source public, use if/else over ternary

* fix: remove response field, extension handles own UI
2026-01-16 02:41:56 +01:00
Richard Gill
ce7e73b503
Centralize frontmatter parsing + parse frontmatter with yaml library (#728)
* Add frontmatter utility and tidy coding agent prompts

* Add frontmatter parsing utilities and tests

* Parse frontmatter with YAML parser

* Simplify frontmatter parsing utilities

* strip body in 1 place

* Improve frontmatter parsing error handling

* Normalize multiline skill and select-list descriptions
2026-01-16 00:31:53 +01:00
Mario Zechner
0aaa4ef5e4 Release v0.46.0 2026-01-15 17:35:54 +01:00
Fero
39ee5fee92
fix(plan-mode): change shortcut from Shift+P to Ctrl+Alt+P (#746)
Shift+P conflicts with typing capital P. Ctrl+Alt+P is cross-platform
safe and doesn't conflict with common shortcuts like:
- Ctrl+Shift+P (command palette on Windows/VS Code)
- Shift+Alt+P (types π on macOS)
2026-01-15 13:09:16 +01:00
Mario Zechner
d08821cc4a Release v0.45.7 2026-01-14 00:10:52 +01:00