Commit Graph
100 Commits
Author SHA1 Message Date
Mario Zechner 3e68744cae docs(coding-agent): add changelog entry for #838 2026-01-19 15:56:08 +01:00
Mario Zechner 2d27a2c728 fix(ai): skip errored/aborted assistant messages in transform-messages
Fixes OpenAI Responses 400 error 'reasoning without following item' by
skipping errored/aborted assistant messages entirely rather than filtering
at the provider level. This covers openai-responses, openai-codex-responses,
and future providers.

Removes strictResponsesPairing compat option (no longer needed).

Closes #838
2026-01-19 15:55:29 +01:00
Mario Zechner 6327bfd3dc docs(coding-agent): add changelog entry for model scope toggle 2026-01-19 15:02:57 +01:00
Mario Zechner 2217cde74c fix(coding-agent): improve model scope toggle 2026-01-19 15:00:46 +01:00
Mario Zechner 4cc1c96495 fix(coding-agent): exit on resume cancel 2026-01-19 14:01:03 +01:00
Mario Zechner 0e5977ad39 Add [Unreleased] section for next cycle 2026-01-19 00:23:57 +01:00
Mario Zechner 15a04c585a Release v0.49.1 2026-01-19 00:23:11 +01:00
Mario Zechner 83adb15dbb docs: add missing changelog entries for v0.50.0
- ai: tool call ID normalization for cross-provider handoffs (#821)
- coding-agent: photon WASM loading in standalone binaries
- coding-agent: fix attributions for #762 (@cv) and #829 (@terrorobe)
2026-01-19 00:22:15 +01:00
Mario Zechner 037cc9c3f0 docs: add changelog entries for undo feature 2026-01-19 00:19:00 +01:00
Mario Zechner c8db8e613f docs(ai): note handoff coverage for new providers 2026-01-19 00:15:46 +01:00
Mario Zechner 0ce59236dc test(ai): remove handoff test closes #258 2026-01-19 00:14:24 +01:00
Mario Zechner 023f6e2fa4 docs(ai): document onPayload callback 2026-01-19 00:12:43 +01:00
Mario Zechner ea02243a18 chore(ai): remove gemini cli session id test 2026-01-19 00:11:43 +01:00
Mario Zechner 2c7c23b865 fix(ai): normalize tool call ids and handoff tests fixes #821 2026-01-19 00:10:49 +01:00
Mario Zechner 298af5c1c2 style(coding-agent): move border above header, use keyHint for consistency 2026-01-18 20:27:11 +01:00
Mario Zechner d43930c818 feat(ai): add strictResponsesPairing for Azure OpenAI Responses API
Split OpenAICompat into OpenAICompletionsCompat and OpenAIResponsesCompat
for type-safe API-specific compat settings. Added strictResponsesPairing
option to suppress orphaned reasoning/tool calls on incomplete turns,
fixing 400 errors on Azure's Responses API which requires strict pairing.

Closes #768
2026-01-18 20:15:33 +01:00
Mario Zechner a67f6f9916 chore(coding-agent): add changelog entry for shortcuts 2026-01-18 19:37:57 +01:00
Mario Zechner c63f33d83b docs(agent): update steering and options 2026-01-18 19:21:52 +01:00
Mario Zechner ad337e30be docs: document Focusable interface propagation pattern for IME support
Container components with embedded Input/Editor children must implement
Focusable and propagate focus state to enable correct IME candidate
window positioning.

Related to #827
2026-01-18 17:27:16 +01:00
Mario Zechner b4f833c259 fix(coding-agent): fix IME candidate window positioning in menu selectors
Components with search inputs now implement Focusable interface and
propagate focus state to their child Input components. This allows
the hardware cursor to be positioned correctly for IME candidate
window placement.

Affected components:
- ModelSelectorComponent
- ScopedModelsSelectorComponent
- SessionSelectorComponent (and SessionList)
- ExtensionInputComponent
- LoginDialogComponent
- TreeSelectorComponent (and LabelInput)

fixes #827
2026-01-18 17:23:04 +01:00
Mario Zechner 964f17b8d1 fix(coding-agent): load photon wasm in compiled binaries 2026-01-18 17:11:49 +01:00
Mario Zechner 55769e7580 chore: add issue templates for contributions and bugs 2026-01-18 13:20:52 +01:00
Mario Zechner 97673461eb fix: allow additional text after lgtm in approval comments 2026-01-18 13:06:55 +01:00
Mario Zechner 64a8b64b52 fix: remove duplicate core import in approve-contributor workflow
actions/github-script already provides core as a global
2026-01-18 13:05:17 +01:00
Mario Zechner 8b02aff629 fix: fix YAML parsing issues in PR gate workflows
- Wrap if condition in ${{ }} to avoid YAML tag interpretation
- Use array.join for multiline message to avoid block scalar issues
2026-01-18 12:31:25 +01:00
Mario Zechner 3eded2c146 chore: add PR approval gate for new contributors
- Add APPROVED_CONTRIBUTORS file with existing contributors
- Add pr-gate.yml workflow to close PRs from unapproved contributors
- Add approve-contributor.yml workflow to approve via lgtm on issues
- Add CONTRIBUTING.md with guidelines
- Update README.md to point to CONTRIBUTING.md
2026-01-18 12:26:45 +01:00
Mario Zechner 632495338f Add [Unreleased] section for next cycle 2026-01-17 22:02:59 +01:00
Mario Zechner 3e6ae39083 Release v0.49.0 2026-01-17 22:02:12 +01:00
Mario Zechner 55508cca6a docs: audit and update changelog entries for v0.49.0 2026-01-17 22:01:03 +01:00
Mario Zechner 4068bc556a chore: simplify codex prompt handling 2026-01-17 21:53:01 +01:00
Mario Zechner 94bd7f69fd fix(coding-agent): load photon via dynamic import 2026-01-17 21:32:23 +01:00
Mario Zechner 157e4e51bf feat(coding-agent): add ExtensionAPI setLabel 2026-01-17 21:18:59 +01:00
Mario Zechner fde9b089f4 Merge branch 'feat/kill-ring' into merge-810 2026-01-17 21:16:18 +01:00
Mario Zechner 18d9d9d704 fix(tui): document kill ring and reset history 2026-01-17 21:12:48 +01:00
Mario Zechner 6b4b4f4fc3 Merge remote-tracking branch 'origin/main' 2026-01-17 21:04:11 +01:00
Mario Zechner a5f1016da2 fix(ai): normalize tool names case-insensitively against CC tool list
- Replace hardcoded pi->CC tool mappings with single CC tool name list
- Case-insensitive lookup: if tool name matches CC tool, use CC casing
- Remove broken find->Glob mapping (round-trip failed)
- Add test coverage for tool name normalization
2026-01-17 21:03:47 +01:00
Mario Zechner 0f3a0f78bc fix(ai): prevent orphaned tool results after errored assistant messages
When an assistant message has stopReason 'error', its tool calls are now
excluded from pending tool tracking. This prevents synthetic tool results
from being generated for calls that will be dropped by provider-specific
converters (e.g., Codex drops tool calls from errored messages).

Previously, this mismatch caused OpenAI to reject requests with 'No tool
call found for function call output with call_id ...' errors.

fixes #812
2026-01-17 20:20:39 +01:00
Mario Zechner 57fe00ced4 docs(coding-agent): document ctx.compact and ctx.getContextUsage 2026-01-17 11:51:39 +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
Mario Zechner 673916f63c fix(tui): always position cursor for IME
# Conflicts:
#	packages/coding-agent/CHANGELOG.md
2026-01-17 11:40:39 +01:00
Mario Zechner 7f9cf543d5 Add [Unreleased] section for next cycle 2026-01-17 00:32:57 +01:00
Mario Zechner 91be338e39 Release v0.48.0 2026-01-17 00:32:07 +01:00
Mario Zechner 760414b288 docs: add missing changelog entries for v0.48.0 2026-01-17 00:31:03 +01:00
Mario Zechner f371069342 docs(coding-agent): add Windows Terminal Shift+Enter config 2026-01-17 00:15:49 +01:00
Mario Zechner 5c938e08d0 docs: document EditorOptions paddingX and editorPaddingX setting 2026-01-16 23:57:35 +01:00
Mario Zechner fe52ff00d2 feat: add editorPaddingX setting for input editor horizontal padding 2026-01-16 23:50:00 +01:00
Mario Zechner 5d3e7d5aaa fix(ai): preserve unsigned tool call context for Gemini 3 with anti-mimicry note
Instead of skipping unsigned tool calls entirely (which lobotomizes context),
convert them to text with an explicit note telling the model this is historical
context from a different model and not a format to mimic.

This preserves tool call/result context when switching from providers without
thought signatures (e.g. Claude via Antigravity) to Gemini 3.
2026-01-16 23:42:39 +01:00
Mario Zechner 1405e30492 revert: remove editor paddingX from coding-agent 2026-01-16 23:19:58 +01:00
Mario Zechner 20f5fcc79d fix(coding-agent): handle auto-compaction failures gracefully
When auto-compaction fails (e.g., quota exceeded), emit the error via
the auto_compaction_end event instead of throwing. The UI now displays
the error message, allowing users to take action (switch models, wait
for quota reset, etc.) instead of crashing.

fixes #792
2026-01-16 23:13:26 +01:00
Mario Zechner 5c59caee4e docs: add critical git rules for parallel agent work
Multiple agents may work on different files in the same worktree.
Added rules to prevent agents from accidentally committing or
destroying each other's work.
2026-01-16 22:41:29 +01:00
Mario Zechner fbb74bb29e fix(ai): filter empty error assistant messages in transformMessages
When 429/500 errors occur during tool execution, empty assistant messages
with stopReason='error' get persisted. These break the tool_use -> tool_result
chain for Claude/Gemini APIs.

Added centralized filtering in transformMessages to skip assistant messages
with empty content and no tool calls. Provider-level filters remain for
defense-in-depth.
2026-01-16 22:35:50 +01:00
Mario Zechner 3326b8f521 Fix --no-extensions flag not preventing extension discovery
When --no-extensions was used, extensionsResult.extensions was an empty
array. The condition in buildSessionOptions() checked .length > 0,
so preloadedExtensions was not set. This caused createAgentSession()
to fall through to extension discovery.

Remove the .length > 0 condition so the empty result is passed through,
signaling that extension loading was already handled.

Fixes #776
2026-01-16 22:01:23 +01:00
Mario Zechner 81f5a12e81 Merge PR #787: Improve navigateTree API
Adds replaceInstructions and label options to navigateTree() for custom summarization prompts and branch labeling.

closes #787
2026-01-16 21:49:29 +01:00
Mario Zechner 572ec64dbd Fix navigateTree API: add missing type updates, handler passthrough, and docs
- Update ExtensionCommandContext.navigateTree type signature
- Pass new options through in print-mode and rpc-mode handlers
- Update docs/extensions.md, docs/sdk.md, docs/tree.md
- Add changelog entry
2026-01-16 21:47:01 +01:00
Mario Zechner ffdc8d686b docs: add OpenCode Zen to provider lists in coding-agent README 2026-01-16 21:20:52 +01:00
Mario Zechner 75628e0cfd fix(coding-agent): use lazy-loaded photon wrapper for Node.js compatibility
Previous commit broke Node.js/tsx by using the ESM entry point which
doesn't work with Node. This creates a wrapper module that:
- Uses require() for lazy loading (works in both Node and Bun)
- Gracefully handles load failures (returns original image)
- Works in Node.js, tsx, and Bun compiled binaries
2026-01-16 21:18:13 +01:00
Mario Zechner 5aa0689828 fix(coding-agent): fix standalone binary WASM loading on Linux, fixes #784
- Import photon-node from ESM entry point (photon_rs_bg.js) instead of CJS
  entry, allowing Bun to embed WASM in compiled binaries
- Add photon.d.ts for TypeScript support of ESM entry
- Add scripts/build-binaries.sh for local binary builds
- Simplify GitHub workflow to use the build script
- Add binaries/ to gitignore
2026-01-16 21:11:01 +01:00
Mario Zechner 0c33e0dee5 chore: audit changelog entries for v0.47.0, add cl.md prompt template
- Add missing changelog entries for commits since v0.47.0
- Cross-duplicate ai/tui fixes to coding-agent changelog
- Change PI_NO_HARDWARE_CURSOR to PI_HARDWARE_CURSOR (opt-in)
- Fix typo in PI_CODING_AGENT_DIR changelog entry
- Add .pi/prompts/cl.md for pre-release changelog audits
2026-01-16 21:11:01 +01:00
Mario Zechner 4dbf094b65 Add PI_NO_HARDWARE_CURSOR env var for terminals with limited escape sequence support
Fixes cursor visibility issues in JetBrains IDE terminals (IntelliJ, PyCharm) where
the hardware cursor either blinks or becomes invisible depending on settings.

Fixes #771
2026-01-16 12:51:09 +01:00
Mario Zechner 3a475fe165 feat(coding-agent): extension command argument autocomplete (#775) 2026-01-16 12:47:40 +01:00
Mario Zechner f900eb591d Fix provider feature detection to use model.provider, not just URL
Previously, OpenAI-compatible provider settings (like developer role support)
were detected only from the baseUrl. When using custom URLs (e.g., proxies),
detection failed. Now checks model.provider first, then falls back to URL.

Fixes #774
2026-01-16 12:41:23 +01:00
Mario Zechner 0b625b66b7 fix(coding-agent): prevent duplicate rendering of extension messages on startup, closes #765 2026-01-16 12:16:57 +01:00
Mario Zechner 0438decd26 docs: add changelog entry for #765 2026-01-16 12:16:49 +01:00
Mario Zechner 05d78ea2de Fix session picker 'No sessions found' overflow 2026-01-16 12:11:01 +01:00
Mario ZechnerandZeno Jiricek 3f4a6857a5 feat: add bash-style array slicing for $@ in prompt templates
Implements support for ${@:N} and ${@:N:L} syntax to slice argument arrays
in prompt templates, following bash conventions.

Closes #769

Co-authored-by: Zeno Jiricek <airtonix@users.noreply.github.com>
2026-01-16 12:09:45 +01:00
Mario Zechner 43c4a80e2e docs: document prompt template slicing 2026-01-16 12:08:57 +01:00
Mario Zechner 2836d97735 Fix session picker empty state overflow 2026-01-16 12:04:55 +01:00
Mario Zechner 588399594c Fix session picker hint overflow (closes #764) 2026-01-16 12:01:50 +01:00
Mario Zechner 589a2ffcd3 Add [Unreleased] section for next cycle 2026-01-16 04:41:48 +01:00
Mario Zechner 6248d86ff6 Release v0.47.0 2026-01-16 04:41:04 +01:00
Mario Zechner cb369b680b Update changelogs for v0.47.0 release
- Add OpenAI Codex official support entry
- Add pi-internal:// URL scheme
- Add ctx.shutdown() fix (#756)
- Add OpenAI Codex retry logic (#733)
- Add third-party contributions:
  - #702 by @aliou (custom tool HTML export)
  - #728 by @richardgill (frontmatter parsing, SelectList fix)
  - #747 by @kaofelix (tree filter shortcuts)
  - #752 by @richardgill (keymap expansion)
2026-01-16 04:39:48 +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
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 a20662da87 Remove broken git-diff extension 2026-01-16 03:07:55 +01:00
Mario Zechner af7a8b5878 Remove temporary test file 2026-01-16 03:04:28 +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
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 be26d362fa Fix alt+backspace in Kitty mode and clamp Codex effort (refs #752) 2026-01-16 01:30:46 +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
Mario Zechner 3ed0d1bde7 Update package-lock.json 2026-01-16 00:44:38 +01:00
Mario Zechner d9ac0c7b26 docs(prompts): prefer main files for PR diffs 2026-01-15 18:06:39 +01:00
Mario Zechner bfeec88dbe Merge branch 'pr-739' 2026-01-15 18:06:00 +01:00
Mario Zechner f74f48660f Fix prompt-url-widget session name API 2026-01-15 17:50:24 +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
Mario Zechner cc8c51d9ae chore(ai): regenerate models 2026-01-14 22:25:21 +01:00
Mario Zechner 0a7537bf86 Revert "feat(ai): add gpt-5.2-codex to OpenAI provider (#730)"
This reverts commit 5a795b9857.
2026-01-14 22:22:55 +01:00
Mario Zechner 951e9c88b8 Update session naming for prompt URL widget 2026-01-14 13:08:23 +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
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
Mario Zechner d83e1745d8 Add [Unreleased] section for next cycle 2026-01-13 22:48:47 +01:00