Commit Graph
28 Commits
Author SHA1 Message Date
Nico BailonandMario Zechner bac57f81be fix: preserve external settings.json edits on reload (#1046)
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-01-29 02:42:23 +01:00
Nico Bailon c565fa9af8 fix(tui): keep overlays centered across resizes (#950) 2026-01-26 09:43:16 +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
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
Nico Bailon d29f268f46 feat(tui): add pad parameter to truncateToWidth, overlay QA tests 2026-01-12 10:01:53 -08:00
Nico Bailon 0c0aac6599 feat(tui): add OverlayOptions API and fix width overflow crash
Adds positioning/sizing options for overlays and fixes crash when compositing
lines with complex ANSI sequences exceed terminal width.
2026-01-12 10:01:34 -08:00
Nico Bailon 271b49da3c feat: add ctx.ui.setWorkingMessage() extension API
Allows extensions to customize the streaming loader message.
Pass undefined to restore default.
2026-01-10 21:11:44 -08:00
Nico Bailon 7b902612e9 feat(coding-agent): add FooterDataProvider for git branch and extension statuses
Expose data that extensions cannot otherwise access: git branch and
extension statuses from setStatus(). Token stats, model info, etc.
remain computable via ctx.sessionManager and ctx.model.
2026-01-09 07:39:30 -08:00
Nico Bailon 77477f6166 feat(coding-agent): add timeout option to extension dialogs with live countdown
Extension UI dialogs (select, confirm, input) now support a timeout option
that auto-dismisses with a live countdown display. Simpler alternative to
manually managing AbortSignal for timed dialogs.

Also adds ExtensionUIDialogOptions type export and updates RPC mode to
forward timeout to clients.
2026-01-06 21:49:27 -08:00
Nico Bailon 9771fa1e44 Add AbortSignal support to extension UI dialogs
Closes #474
2026-01-06 15:01:15 -08:00
Nico Bailon 9c9e6822e3 feat(coding-agent): add event bus for tool/hook communication (#431)
* feat(coding-agent): add event bus for tool/hook communication

Adds pi.events API enabling custom tools and hooks to communicate via
pub/sub. Tools can emit events, hooks can listen. Shared EventBus instance
created per session in createAgentSession().

- EventBus interface with emit() and on() methods
- on() returns unsubscribe function
- Threaded through hook and tool loaders
- Documented in hooks.md and custom-tools.md

* fix(coding-agent): wrap event handlers to catch errors

* docs: note async handler error handling for event bus

* feat(coding-agent): add sendMessage to tools, nextTurn delivery mode

- Custom tools now have pi.sendMessage() for direct agent notifications
- New deliverAs: 'nextTurn' queues messages for next user prompt
- Fix: hooks and tools now share the same eventBus (was isolated before)

* fix(coding-agent): nextTurn delivery should always queue, even when streaming
2026-01-04 21:36:19 +01:00
Nico Bailon e904b11e7b Fix Ghostty detection inside tmux for inline images (#299) 2025-12-24 12:04:41 +01:00
Nico Bailon 1e1a92ea47 Add before_compact hook event (closes #281) (#285)
* Add before_compact hook event (closes #281)

* Add compact hook event and documentation

- Add compact event that fires after compaction completes
- Update hooks.md with lifecycle diagram, field docs, and example
- Add CHANGELOG entry
- Add comprehensive test coverage (10 tests) for before_compact and compact events
- Tests cover: event emission, cancellation, custom entry, error handling, multiple hooks
2025-12-24 11:26:29 +01:00
Nico Bailon ce8a1c8eb1 Add cwd parameter to subagent example tool (#291) 2025-12-24 00:58:43 +01:00
Nico Bailon 2953a9d8d4 Add skipConversationRestore for before_branch hooks (#286) 2025-12-23 03:26:08 +01:00
Nico Bailon 70440f7591 feat(coding-agent): add configurable skills directories (#269) 2025-12-21 20:48:40 +01:00
Nico Bailon 17cadcc046 fix: send Slack image attachments inline to LLM 2025-12-20 11:13:43 -08:00
Nico Bailon 81e820d01a fix: preserve Gemini thought signatures for tool calls 2025-12-20 07:12:37 -08:00
Nico Bailon 74f7e6c9d5 Wrap custom tools with hooks (#248) 2025-12-19 19:05:20 +01:00
Nico Bailon a54c70bbed Forward onUpdate callback through hook wrapper (#238) 2025-12-19 15:23:41 +01:00
Nico Bailon eb1d08a5fb Add subagent orchestration example (#215) 2025-12-19 01:45:18 +01:00
Nico Bailon 9a7bbb2839 coding-agent: fix macOS screenshot filenames with unicode spaces (#181) 2025-12-13 22:04:01 +01:00
Nico Bailon fcad447f32 add image component docs to readme 2025-12-12 19:38:36 -08:00
Nico Bailon f603a377ae add PI_NO_IMAGES env var to disable inline image rendering 2025-12-12 19:35:54 -08:00
Nico Bailon 9e9d5c94ed add inline image rendering for terminals with graphics support 2025-12-12 19:30:50 -08:00
Nico Bailon 09bca9672f Add skills system with Claude Code compatibility (#171)
* Add skills system with Claude Code compatibility

* consolidate skills into single module, merge loaders, add <available_skills> XML tags

* add Codex CLI skills compatibility, skip hidden/symlinks
2025-12-12 18:24:52 +01:00
Nico Bailon 2e3ff4a15a Fix truncation test assertions to match new message format (#136) 2025-12-07 12:07:15 +01:00
Nico Bailon c550ed2bca feat(tui): add prompt history navigation with Up/Down arrows
Browse previously submitted prompts using Up/Down arrow keys, similar to
shell history and Claude Code's prompt history feature.

- Up arrow when editor is empty: browse to older prompts
- Down arrow when browsing: return to newer prompts or clear editor
- Cursor movement within multi-line history entries supported
- History is session-scoped, stores up to 100 entries
- Consecutive duplicates are not added to history

Includes 15 new tests for history navigation behavior.
2025-12-05 07:57:42 -08:00