Commit graph

136 commits

Author SHA1 Message Date
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
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
Mario Zechner
0752995424 Release v0.42.0 2026-01-09 06:59:26 +01:00
Mario Zechner
ec9def84ef Release v0.41.0 2026-01-09 06:06:54 +01:00
Mario Zechner
19b5663340 Revert "Remove Anthropic OAuth support"
This reverts commit f5e6bcac1b.
2026-01-09 06:00:20 +01:00
Mario Zechner
ebd661fe13 Release v0.40.1 2026-01-09 05:11:49 +01:00
Mario Zechner
f5e6bcac1b Remove Anthropic OAuth support 2026-01-09 05:10:33 +01:00
Mario Zechner
2e362fbfd2 Make mac-system-theme extension async to avoid blocking keyboard input 2026-01-09 00:49:31 +01:00
Mario Zechner
070ef9c771 Release v0.40.0 2026-01-09 00:43:32 +01:00
Mario Zechner
39bfbb125c Release v0.39.1 2026-01-09 00:33:39 +01:00
Mario Zechner
37378fb346 Fix setTheme not triggering rerender, improve mac-system-theme example 2026-01-09 00:32:41 +01:00
Mario Zechner
e5e944475d Poll macOS system theme every 2 seconds in mac-system-theme extension 2026-01-09 00:18:59 +01:00
Mario Zechner
c25f1eab64 Release v0.39.0 2026-01-09 00:10:00 +01:00