Commit graph

98 commits

Author SHA1 Message Date
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
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
0feed80b07 Don't force rerender in doom 2026-01-13 22:42:00 +01:00
Mario Zechner
7d45e434de Merge branch 'main' into feat/tui-overlay-options 2026-01-13 22:06:02 +01:00
Mario Zechner
9a08bb0d1e Release v0.45.5 2026-01-13 21:46:57 +01:00
Mario Zechner
bb0ba88b97 Release v0.45.4 2026-01-13 21:36:52 +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
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
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
2090599e4b Release v0.45.3 2026-01-13 04:56:41 +01:00
Mario Zechner
c55082bb66 Release v0.45.2 2026-01-13 03:27:56 +01:00
Mario Zechner
e4a98d8381 Release v0.45.1 2026-01-13 03:06:43 +01:00
Mario Zechner
e22feba494 Release v0.45.0 2026-01-13 02:41:36 +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
Danila Poyarkov
4751ebddbd
feat(extensions): add sandbox extension for OS-level bash sandboxing (#673)
Uses @anthropic-ai/sandbox-runtime to enforce filesystem and network
restrictions on bash commands (sandbox-exec on macOS, bubblewrap on Linux).

Features:
- Per-project config via .pi/sandbox.json
- Global config via ~/.pi/agent/sandbox.json
- Enabled by default with sensible defaults
- --no-sandbox flag to disable
- /sandbox command to view current config
2026-01-12 23:25:31 +01:00
Mario Zechner
477c263838 Release v0.44.0 2026-01-12 19:04:28 +01:00
Nico Bailon
d29f268f46 feat(tui): add pad parameter to truncateToWidth, overlay QA tests 2026-01-12 10:01:53 -08: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
06bf2493a1 docs: add changelog and readme entry for notify.ts extension (#658) 2026-01-12 16:33:42 +01:00
Fero
424597d558
example: add desktop notification extension (OSC 777) (#658) 2026-01-12 16:33:03 +01:00
Mario Zechner
8ac130c729 Release v0.43.0 2026-01-12 00:59:39 +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
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
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
31fe16f2e7 Release v0.42.5 2026-01-11 04:10:49 +01:00
Mario Zechner
345de59833 Release v0.42.4 2026-01-10 13:56:11 +01:00
Mario Zechner
2a04b0fb28 Release v0.42.3 2026-01-10 13:27:28 +01:00
Mario Zechner
0c02f5c053 Release v0.42.2 2026-01-10 01:42:46 +01:00
Mario Zechner
22b2a18952
Merge pull request #600 from nicobailon/feature/footer-data-provider
feat(coding-agent): add FooterDataProvider for git branch and extension statuses
2026-01-09 22:46:23 +01:00
Mario Zechner
d856bb097c Release v0.42.1 2026-01-09 20:24:10 +01:00