Commit graph

1424 commits

Author SHA1 Message Date
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
Mario Zechner
d30f6460fa Fix ctx.shutdown() not waiting for pending UI renders, fixes #756 2026-01-16 03:35:41 +01:00
Mario Zechner
c50bfec01b Fix piped stdin support, auto-enable print mode
When stdin is piped (not a TTY), read the content and treat it as the
first message. Since interactive mode requires a TTY for keyboard input,
print mode is automatically enabled.

- echo foo | pi -> equivalent to pi -p foo
- echo foo | pi -p -> equivalent to pi -p foo
- RPC mode unaffected (uses stdin for JSON-RPC)

fixes #708
2026-01-16 03:18:56 +01:00
Mario Zechner
c08801e4c5 Add retry logic to OpenAI Codex provider
Fixes #733
2026-01-16 03:15:59 +01:00
Mario Zechner
b4a05cbcab Move skill command handling to AgentSession, update docs
- Skill commands (/skill:name) now expanded in AgentSession instead of
  interactive mode, enabling them in RPC and print modes
- Input event can now intercept /skill:name before expansion
- Updated extensions.md with clearer input event docs and processing order
- Updated rpc.md: hook -> extension terminology, added skill expansion mentions
- Added PR attribution to changelog entries for #761
2026-01-16 03:01:08 +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
Mario Zechner
012319e15a Support pi-internal:// scheme in read tool
Resolves pi-internal:// paths to the coding-agent package directory,
allowing the model to read internal documentation. Appends a hint
showing the filesystem path and instructing to use it for further reads.
2026-01-16 02:31:59 +01:00
Mario Zechner
6484ae279d
Finalize OpenAI Codex compatibility (#737)
- align Codex Responses provider with Pi static instructions
- simplify Codex request/stream handling and cleanup exports
- keep legacy OpenCode Codex prompt for testing until Pi prompt is allowlisted
2026-01-16 00:58:36 +01:00
Aliou Diallo
0c6ac46646
feat(coding-agent): Custom tool export rendering in export (#702)
* coding-agent: add ANSI-to-HTML converter for export

* coding-agent: add getToolDefinition method to ExtensionRunner

* coding-agent: add tool HTML renderer factory for custom tools

* coding-agent: add custom tool pre-rendering to HTML export

* coding-agent: render pre-rendered custom tools in HTML export

* coding-agent: integrate tool renderer in exportToHtml
2026-01-16 00:32:31 +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
Kao Félix
df58d3191e
Add direct filter shortcuts for Tree mode (#747)
* Add direct filter shortcuts for Tree mode

- Add Ctrl+D for default filter
- Add Ctrl+T for no-tools filter (toggles with default)
- Add Ctrl+U for user-only filter (toggles with default)
- Add Ctrl+L for labeled-only filter (toggles with default)
- Add Ctrl+A for all filter (toggles with default)
- Keep existing Ctrl+O / Shift+Ctrl+O cycle shortcuts
- Update help text to show new shortcuts

* simplify tree selector shortcut line
2026-01-16 00:28:53 +01:00
warren
3a89ebbe7c fix(coding-agent): fix tree indentation after filtering 2026-01-15 18:05:52 +01:00
Mario Zechner
e46cc55fe0 Add [Unreleased] section for next cycle 2026-01-15 17:36:40 +01:00
Mario Zechner
0aaa4ef5e4 Release v0.46.0 2026-01-15 17:35:54 +01:00
Mario Zechner
a216cc496f chore: update changelogs 2026-01-15 17:34:59 +01:00
Danila Poyarkov
eacd33602b
feat(coding-agent): export getAgentDir for extensions (#749) 2026-01-15 17:16:56 +01:00
Jian Zhang
12c61b5879
docs(coding-agent): document vscode shift+enter for multi-line input (#740)
Co-authored-by: Jian Zhang <jzhang@yanhuangdata.com>
2026-01-15 13:14:54 +01:00
Richard Gill
5f8d21daf7
Set coding agent CLI process title (#742) 2026-01-15 13:14:14 +01:00
Jian Zhang
6a3633ca53
feat(coding-agent): show loaded prompt templates in init (#743)
Co-authored-by: Jian Zhang <jzhang@yanhuangdata.com>
2026-01-15 13:13:40 +01:00
Can Celik
2c10cc6da9
fix(coding-agent): remember last selected model when using scoped models (#736) 2026-01-15 13:10:15 +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
vsabavat
72e29bce27
Fix compaction turn prefix summarization (#738) 2026-01-15 03:23:34 +01:00
Can Celik
537bdb6972
feat(coding-agent): improve session picker search (#731) 2026-01-14 23:28:23 +01:00
Danila Poyarkov
a497fccd06
refactor: use configurable keybindings for all UI hints (#724)
Follow-up to #717. Replaces all remaining hardcoded keybinding hints with configurable ones.

- Add pasteImage to AppAction so it can be configured in keybindings.json
- Create keybinding-hints.ts with reusable helper functions:
  - editorKey(action) / appKey(keybindings, action) - get key display string
  - keyHint(action, desc) / appKeyHint(kb, action, desc) / rawKeyHint(key, desc) - styled hints
- Export helpers from components/index.ts for extensions
- Update all components to use configured keybindings
- Remove now-unused getDisplayString() from KeybindingsManager and EditorKeybindingsManager
- Use keybindings.matches() instead of matchesKey() for pasteImage in custom-editor.ts
2026-01-14 15:42:03 +01:00
Jian Zhang
558a77b45f
feat(ai): add support for MiniMax China (minimax-cn) provider (#725)
Co-authored-by: Jian Zhang <jzhang@yanhuangdata.com>
2026-01-14 15:41:47 +01:00
Mario Zechner
9712f84ee5 docs(coding-agent): update changelog for recent PRs 2026-01-14 12:03:46 +01:00
Mario Zechner
fb6d464edc Fix auto-retry for fetch failed errors 2026-01-14 12:00:55 +01:00
Danila Poyarkov
7f2d2f106e
fix: use configurable expandTools keybinding instead of hardcoded ctrl+o (#717)
- Add expandTools to EditorAction in pi-tui so components can access it
- Update bash-execution, compaction-summary-message, branch-summary-message,
  and tool-execution to use getEditorKeybindings().getKeys('expandTools')
- Pass expandTools config to setEditorKeybindings in KeybindingsManager.create()
- Style keybinding with 'dim' color, description with 'muted' (matches startup hints)
2026-01-14 10:27:22 +01:00
Jian Zhang
30a126f2bd
feat(coding-agent): add support for APPEND_SYSTEM.md to append instructions to system prompt (#716)
Co-authored-by: Jian Zhang <jzhang@yanhuangdata.com>
2026-01-14 10:25:38 +01:00
Danila Poyarkov
5279bb92da
fix: show bun install instead of npm install in update notification when running under Bun (#714)
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-01-14 10:23:49 +01:00
Danila Poyarkov
0c135d0141
feat(edit): add fuzzy matching for trailing whitespace, quotes, dashes, and spaces (#713) 2026-01-14 10:22:00 +01:00
Justin Williams
c85a5720f2
fix: include skill path in /skill prompts (#711) 2026-01-14 10:15:56 +01:00
Can Bölük
6bf073f130
build(coding-agent): replaced wasm-vips with @silvia-odwyer/photon-node for image processing (#710)
- Replaced wasm-vips dependency with @silvia-odwyer/photon-node for image processing.
2026-01-14 02:46:49 +01:00
Mario Zechner
95859725b7 Add [Unreleased] section for next cycle 2026-01-14 00:11:36 +01:00
Mario Zechner
d08821cc4a Release v0.45.7 2026-01-14 00:10:52 +01:00
Mario Zechner
c16698130c chore: update changelogs 2026-01-14 00:09:51 +01:00
Danila Poyarkov
9137c0c947
feat: export highlightCode and getLanguageFromPath for extensions (#703) 2026-01-14 00:08:16 +01:00
Mario Zechner
d83e1745d8 Add [Unreleased] section for next cycle 2026-01-13 22:48:47 +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
9994ebbedd Add [Unreleased] section for next cycle 2026-01-13 21:47:38 +01:00
Mario Zechner
9a08bb0d1e Release v0.45.5 2026-01-13 21:46:57 +01:00
Mario Zechner
6ab3e7c91f fix: skip changelog display on fresh install
Only show changelog when upgrading from a previous version, not on first run.
2026-01-13 21:45:04 +01:00
Mario Zechner
3a1228c0b5 Add [Unreleased] section for next cycle 2026-01-13 21:37:34 +01:00
Mario Zechner
bb0ba88b97 Release v0.45.4 2026-01-13 21:36:52 +01:00
Mario Zechner
13c4205dbb fix: use wrapper directory in release tarballs for mise compatibility
mise auto-detects single-directory archives and extracts with strip_components=1.
Using a 'pi/' wrapper directory ensures the internal structure is preserved.

Reverts the code workaround (theme dir fallback) in favor of fixing the tarball.
2026-01-13 21:33:32 +01:00