Commit graph

401 commits

Author SHA1 Message Date
Mario Zechner
dc2f5d43cc Release v0.34.0 2026-01-04 20:29:50 +01:00
Mario Zechner
7302fe5063 docs: remove dev-only changelog entry 2026-01-04 20:26:29 +01:00
Mario Zechner
5318b42bd2 docs: update CHANGELOG and hooks.md with missing items
- tools.ts example hook
- Multiple messages from before_agent_start
- getSettingsListTheme/getSelectListTheme optional theme param
- Hook error stack traces
2026-01-04 19:01:35 +01:00
Mario Zechner
e4dd21a3b2 feat(hooks): add systemPromptAppend to before_agent_start, full tool registry
- before_agent_start handlers can return systemPromptAppend to dynamically
  append text to the system prompt for that turn
- Multiple hooks' systemPromptAppend strings are concatenated
- Multiple hooks' messages are now all injected (not just first)
- Tool registry now contains ALL built-in tools (read, bash, edit, write,
  grep, find, ls) regardless of --tools flag
- --tools only sets initially active tools, hooks can enable any via
  setActiveTools()
- System prompt automatically rebuilds when tools change, updating tool
  descriptions and guidelines
- Add pirate.ts example hook demonstrating systemPromptAppend
- Update hooks.md with systemPromptAppend documentation
2026-01-04 18:21:26 +01:00
Helmut Januschka
8ecb1d6c0b refactor: address PR feedback - merge setWidget, use KeyId for shortcuts
1. Merge setWidget and setWidgetComponent into single overloaded method
   - Accepts either string[] or component factory function
   - Uses single Map<string, Component> internally
   - String arrays wrapped in Container with Text components

2. Use KeyId type for registerShortcut instead of plain string
   - Import Key from @mariozechner/pi-tui
   - Update plan-mode example to use Key.shift('p')
   - Type-safe shortcut registration

3. Fix tool API docs
   - Both built-in and custom tools can be enabled/disabled
   - Removed incorrect 'custom tools always active' statement

4. Use matchesKey instead of matchShortcut (already done in rebase)
2026-01-04 18:13:30 +01:00
Helmut Januschka
ce88ebcd68 feat(hooks): add setWidgetComponent for custom TUI components
- New ctx.ui.setWidgetComponent(key, factory) method
- Allows custom Component to render as widget without taking focus
- Unlike custom(), widget components render inline above editor
- Components are disposed when cleared or replaced
- Falls back to no-op in RPC/print modes
2026-01-04 18:13:29 +01:00
Helmut Januschka
4ecf3f9422 refactor(hooks): address PR feedback
- Rename getTools/setTools to getActiveTools/setActiveTools
- Add getAllTools to enumerate all configured tools
- Remove text_delta event (use turn_end/agent_end instead)
- Add shortcut conflict detection:
  - Skip shortcuts that conflict with built-in shortcuts (with warning)
  - Log warnings when hooks register same shortcut (last wins)
- Add note about prompt cache invalidation in setActiveTools
- Update plan-mode hook to use agent_end for [DONE:id] parsing
2026-01-04 18:13:29 +01:00
Helmut Januschka
d1eea3ac4e feat(hooks): add text_delta event for streaming text monitoring
- New text_delta hook event fires for each chunk of streaming text
- Enables real-time monitoring of agent output
- Plan-mode hook now updates todo progress as [DONE:id] tags stream in
- Each todo item has unique ID for reliable tracking
2026-01-04 18:13:28 +01:00
Helmut Januschka
dc44816051 feat(hooks): add setWidget API for multi-line status displays
- ctx.ui.setWidget(key, lines) for multi-line displays above editor
- Widgets appear below 'Working...' indicator, above editor
- Supports ANSI styling including strikethrough
- Added theme.strikethrough() method
- Plan-mode hook now shows todo list with checkboxes
- Completed items show checked box and strikethrough text
2026-01-04 18:13:28 +01:00
Helmut Januschka
537d672f17 feat(plan-mode): add todo list extraction and progress tracking
- Extract numbered steps from agent's plan response
- Track progress during execution with footer indicator (📋 2/5)
- /todos command to view current plan progress
- State persists across sessions including todo progress
- Agent prompted to format plans as numbered lists for tracking
2026-01-04 18:13:28 +01:00
Helmut Januschka
09048681b8 docs: update changelog with full hook API additions 2026-01-04 18:13:28 +01:00
Helmut Januschka
c956a726ed feat(coding-agent): add hook API for CLI flags, shortcuts, and tool control
Hook API additions:
- pi.getTools() / pi.setTools(toolNames) - dynamically enable/disable tools
- pi.registerFlag(name, options) / pi.getFlag(name) - register custom CLI flags
- pi.registerShortcut(shortcut, options) - register keyboard shortcuts

Plan mode hook (examples/hooks/plan-mode.ts):
- /plan command or Shift+P shortcut to toggle
- --plan CLI flag to start in plan mode
- Read-only tools: read, bash, grep, find, ls
- Bash restricted to non-destructive commands (blocks rm, mv, git commit, etc.)
- Interactive prompt after each response: execute, stay, or refine
- Shows plan indicator in footer when active
- State persists across sessions
2026-01-04 18:13:28 +01:00
Helmut Januschka
059292ead1 WIP: Add hook API for dynamic tool control with plan-mode hook example
- Add pi.getTools() and pi.setTools(toolNames) to HookAPI
- Hooks can now enable/disable tools dynamically
- Changes take effect on next agent turn

New example hook: plan-mode.ts
- Claude Code-style read-only exploration mode
- /plan command toggles plan mode on/off
- Plan mode tools: read, bash, grep, find, ls
- Edit/write tools disabled in plan mode
- Injects context telling agent about restrictions
- After each response, prompts to execute/stay/refine
- State persists across sessions
2026-01-04 18:13:28 +01:00
Aliou Diallo
0d477d39f9
fix(tui): expand paste markers when opening external editor (#444)
* fix(tui): expand paste markers when opening external editor

Add getExpandedText() method to Editor that substitutes paste markers
with actual content. Use it in Ctrl-G external editor flow so users
see full pasted content instead of [paste #N ...] placeholders.

* docs: add changelog entries for #444
2026-01-04 18:11:42 +01:00
Can Bölük
6ddfd1be13
fix(coding-agent): resolved UTF-8 corruption in bash executor output (#433)
- Fixed UTF-8 text corruption in bash executor by replacing Buffer.toString() with streaming TextDecoder.
2026-01-04 03:15:50 +01:00
Mario Zechner
7e2a99b485 Add [Unreleased] section for next cycle 2026-01-04 01:08:11 +01:00
Mario Zechner
faa10b9a7e Release v0.33.0 2026-01-04 01:07:24 +01:00
Mario Zechner
5c5084481b feat(coding-agent): clipboard image paste support via Ctrl+V (fixes #419) 2026-01-04 01:05:22 +01:00
Mario Zechner
1079cd404e Add breaking change note for key detection functions (#405) 2026-01-03 22:52:38 +01:00
Mario Zechner
242291e290 Add changelog entries for PRs #426 and #427 2026-01-03 22:51:44 +01:00
Mario Zechner
f2b89d5ec5 Merge branch 'feat/ctrl-n-external-editor' - configurable keybindings (#405) 2026-01-03 22:51:12 +01:00
Mario Zechner
b8814372af Add changelog and README docs for keybindings feature (#405) 2026-01-03 22:49:58 +01:00
Mario Zechner
7aba5883f2 Add [Unreleased] section for next cycle 2026-01-03 17:09:58 +01:00
Mario Zechner
db829e73f9 Release v0.32.3 2026-01-03 17:09:22 +01:00
Mario Zechner
c9a85342ea Fix google-vertex models showing without auth configured 2026-01-03 17:09:02 +01:00
Mario Zechner
2348a485cb Add changelog entries for PRs #423 and #424 2026-01-03 17:00:16 +01:00
Mario Zechner
79c56475e0 Fix non-PNG images not displaying in Kitty protocol terminals
JPEG/GIF/WebP images were not rendering in terminals using the Kitty
graphics protocol (Kitty, Ghostty, WezTerm) because it requires PNG
format (f=100). Non-PNG images are now converted to PNG using sharp
before being sent to the terminal.
2026-01-03 16:58:57 +01:00
Mario Zechner
aea2ced2b8 Add [Unreleased] section for next cycle 2026-01-03 16:08:48 +01:00
Mario Zechner
113713d380 Release v0.32.2 2026-01-03 16:08:14 +01:00
Mario Zechner
e9cf3c1835 Fix slash commands and hook commands during streaming
- Hook commands now execute immediately during streaming (they manage their own LLM interaction via pi.sendMessage())
- File-based slash commands are expanded and queued via steer/followUp during streaming
- prompt() accepts new streamingBehavior option ('steer' or 'followUp') for explicit queueing during streaming
- steer() and followUp() now expand file-based slash commands and error on hook commands
- RPC prompt command accepts optional streamingBehavior field
- Updated docs: rpc.md, sdk.md, CHANGELOG.md

fixes #420
2026-01-03 15:36:54 +01:00
mom
308c0e0ec0 docs(coding-agent): fix attribution format for PR #418 2026-01-03 13:15:20 +00:00
mom
463cc0713b docs(coding-agent): add CHANGELOG entry for PR #418 2026-01-03 13:10:51 +00:00
Evgeniy Skuridin
8917a1f853
feat(coding-agent): add $ARGUMENTS syntax for slash commands (#418)
* feat(coding-agent): add $ARGUMENTS syntax for slash commands

* test(coding-agent): add tests for slash command argument substitution
2026-01-03 14:08:39 +01:00
Mario Zechner
5f91baa29e Add [Unreleased] section for next cycle 2026-01-03 04:26:33 +01:00
Mario Zechner
b783a3f50f Release v0.32.1 2026-01-03 04:25:57 +01:00
Mario Zechner
a4653d48c8 Add changelog entry for edit tool diff fix 2026-01-03 04:24:57 +01:00
Mario Zechner
746ec9eb01 Add shell commands without context contribution (!! prefix)
Use !!command to execute bash commands that are shown in the TUI and
saved to session history but excluded from LLM context, compaction
summaries, and branch summaries.

- Add excludeFromContext field to BashExecutionMessage
- Filter excluded messages in convertToLlm()
- Parse !! prefix in interactive mode
- Use dim border color for excluded commands

fixes #414
2026-01-03 04:14:35 +01:00
Mario Zechner
bc52509a42 Add [Unreleased] section for next cycle 2026-01-03 02:49:00 +01:00
Mario Zechner
42a19ea81d Release v0.32.0 2026-01-03 02:48:23 +01:00
Mario Zechner
42b1e06ad1 feat(coding-agent): configurable double-escape action (tree vs branch)
Add doubleEscapeAction setting to choose whether double-escape with an
empty editor opens /tree (default) or /branch.

- Add setting to Settings interface and SettingsManager
- Add to /settings UI for easy toggling
- Update interactive-mode to respect the setting
- Document in README.md settings table

fixes #404
2026-01-03 01:59:08 +01:00
Mario Zechner
17b3a14bfa Fix slow /model selector by deferring OAuth token refresh
getAvailable() now uses hasAuth() which checks if auth is configured
without triggering OAuth token refresh. Refresh happens later when
the model is actually used.
2026-01-03 01:20:11 +01:00
Mario Zechner
1007dca564 Fix changelog entries for Vertex AI provider 2026-01-03 01:12:16 +01:00
Mario Zechner
d747ec6e23 Enhance provider override to support baseUrl-only mode
Builds on #406 to support simpler proxy use case:
- Override just baseUrl to route built-in provider through proxy
- All built-in models preserved, no need to redefine them
- Full replacement still works when models array is provided
2026-01-03 01:06:08 +01:00
Mario Zechner
6186e497c5 Add word wrapping changelog entry to coding-agent 2026-01-03 00:49:46 +01:00
Mario Zechner
28fb502719 Add image auto-resize toggle to settings, changelog for #402 2026-01-03 00:42:02 +01:00
Mario Zechner
3b2d3baed2 Add changelog entries for #411 2026-01-03 00:31:03 +01:00
Mario Zechner
eb3d70c749 Add changelog entries for #411 2026-01-03 00:29:24 +01:00
Mario Zechner
9f2e6ac5eb docs: update README.md, hooks.md, and CHANGELOG for steer()/followUp() API
- Fix settings-selector descriptions to explain one-at-a-time vs all
- Update README.md message queuing section, settings example, and table
- Update hooks.md: hasPendingMessages, sendMessage options, triggerTurn example
- Add Theme/ThemeColor export and hasPendingMessages rename to CHANGELOG
2026-01-03 00:19:07 +01:00
Mario Zechner
9d8230dfc6 feat(coding-agent): expose deliverAs option in hook sendMessage() API
- pi.sendMessage(msg, options?) now accepts { triggerTurn?, deliverAs? }
- deliverAs: 'steer' (default) or 'followUp' controls delivery timing
- Update all mode handlers to pass options through
- Update file-trigger example to use new API
- Update CHANGELOG
2026-01-03 00:13:26 +01:00
Mario Zechner
d404f8fcfa docs: update CHANGELOGs for steer()/followUp() API changes
Refs #403
2026-01-03 00:13:26 +01:00