Commit Graph
1829 Commits
Author SHA1 Message Date
Mario Zechner baf6fe4b39 fix(coding-agent): add PR attribution to ctx.shutdown() changelog, fix example comments 2026-01-08 03:31:55 +01:00
Kao FélixandGitHub 6845c4b85e feat(coding-agent): make ctx.shutdown() available for extensions (#542) 2026-01-08 03:30:48 +01:00
Mario Zechner 7f3fa417c4 feat(coding-agent): add --no-extensions flag to disable extension discovery
Adds --no-extensions CLI flag that skips automatic extension discovery
while still allowing explicit -e paths. Three modes now available:

1. Default: auto-discover + any -e additions
2. --no-extensions: no extensions at all
3. --no-extensions -e foo.js: only load explicit extensions

Useful for debugging or running subagent instances without auto-discovered
extensions.

closes #524
2026-01-08 03:22:38 +01:00
Mario Zechner 0b680c67fb docs(coding-agent): add overflow changelog entry 2026-01-08 03:19:00 +01:00
Mario Zechner 6bcce1914a Merge branch 'codex-error-details-clean' 2026-01-08 03:17:33 +01:00
Mario Zechner 946efe4b45 fix(ai): detect context_length_exceeded overflow 2026-01-08 03:16:59 +01:00
Mario Zechner b1f32b9c8d fix(coding-agent): update test expectation for extension loader error message 2026-01-08 03:11:10 +01:00
Mario ZechnerandMelih Mucuk f97dcbf92f Merge branch 'feat/custom-thinking-budgets'
feat: add thinkingBudgets setting to customize token budgets per thinking level

Allows users to override default token budgets for minimal/low/medium/high
thinking levels via settings.json. Useful for token-based providers.

closes #529

Co-authored-by: Melih Mucuk <melih@monkeysteam.com>
2026-01-08 03:02:08 +01:00
Mario Zechner c5a930fbd2 docs(coding-agent): add cross-package changelog entries
- OpenAI Codex model aliases removed (breaking, from @ghoulr #536)
- OpenAI Codex context window fix (from @ghoulr #536)
- SSH input batching fix (#538)
2026-01-08 02:56:55 +01:00
Mario Zechner c8460dec7e docs(coding-agent): restore SDK breaking changes to changelog
ExtensionRunner and LoadExtensionsResult API changes affect SDK users.
2026-01-08 02:55:05 +01:00
Mario Zechner e671f63c5d docs(coding-agent): add missing changelog entries for SDK changes
- LoadedExtension -> Extension type rename (breaking)
- Run mode exports for custom SDK usage
2026-01-08 02:49:14 +01:00
Mario Zechner 8045b3c7ec docs(coding-agent): clean up changelog, add missing contributor entries
- Remove verbose internal type export noise
- Add missing entries for #513 (@austinm911), #535 (@mitsuhiko)
- Add PR links to existing entries #522, #527, #540
2026-01-08 02:38:59 +01:00
Mario Zechner 696e1b51d3 refactor(coding-agent): revert preloadedExtensionsResult back to preloadedExtensions
The rename was unnecessary.
2026-01-08 02:35:37 +01:00
Mario ZechnerandAos Dabbagh 6f726a2178 feat(coding-agent): add PI_SKIP_VERSION_CHECK env variable
Skip new version check at startup when set. Useful for Nix or other
package manager installs where npm install is not used.

Also documents PI_CODING_AGENT_DIR and other environment variables
in the README.

closes #549

Co-authored-by: Aos Dabbagh <25783780+aos@users.noreply.github.com>
2026-01-08 02:29:51 +01:00
Mario Zechner e483521075 feat(coding-agent): export run mode utilities with options interfaces
- Add PrintModeOptions interface, update runPrintMode signature
- Export InteractiveMode, InteractiveModeOptions, runPrintMode, PrintModeOptions, runRpcMode from main package
- Document run modes in docs/sdk.md with usage examples
- Update CHANGELOG
2026-01-08 01:53:24 +01:00
Mario Zechner 5d39074a35 refactor(coding-agent): simplify InteractiveMode API
- Replace 11-param runInteractiveMode with InteractiveModeOptions
- Add InteractiveMode.run() that handles init, warnings, prompts, and loop
- Move version check, changelog loading, fdPath discovery inside InteractiveMode
- Detect resumed sessions via session.state.messages.length
- Export InteractiveModeOptions from modes/index.ts
2026-01-08 01:38:12 +01:00
Mario Zechner cb3ac0ba9e refactor(coding-agent): simplify extension runtime architecture
- Replace per-extension closures with shared ExtensionRuntime
- Split context actions: ExtensionContextActions (required) + ExtensionCommandContextActions (optional)
- Rename LoadedExtension to Extension, remove setter methods
- Change runner.initialize() from options object to positional params
- Derive hasUI from uiContext presence (no separate param)
- Add warning when extensions override built-in tools
- RPC and print modes now provide full command context actions

BREAKING CHANGE: Extension system types and initialization API changed.
See CHANGELOG.md for migration details.
2026-01-07 23:50:18 +01:00
Thomas Mustier 6052453f4f fix(ai): improve codex stream error details 2026-01-07 22:44:22 +00:00
Melih Mucuk d311978dfd Merge branch 'main' into feat/custom-thinking-budgets 2026-01-08 00:39:11 +03:00
Mario Zechner faa26ffbf9 Merge PR #536: align openai-codex models list and context window size to codex defaults
closes #536
2026-01-07 20:39:55 +01:00
Mario Zechner 39fa25eb67 fix(ai): clean up openai-codex models and token limits
- Remove model aliases (gpt-5, gpt-5-mini, gpt-5-nano, codex-mini-latest, gpt-5-codex, gpt-5.1-codex, gpt-5.1-chat-latest)
- Fix context window from 400k to 272k tokens to match Codex CLI defaults
- Keep maxTokens at 128k (original value)
- Simplify reasoning effort clamping

closes #536
2026-01-07 20:39:46 +01:00
Mario Zechner 8bf2b975a5 docs: add changelog citation format check to PR review prompt 2026-01-07 20:20:48 +01:00
FeroandGitHub 7042a5f61d docs: add changelog entry for settings preservation fix (#527) (#541) 2026-01-07 18:15:12 +01:00
FeroandGitHub cbd3a8cb87 fix: use defaultThinkingLevel from settings when enabledModels lacks explicit suffix (#540)
When enabledModels is configured without thinking level suffixes (e.g.,
'claude-opus-4-5' instead of 'claude-opus-4-5:high'), the scoped model's
default 'off' thinking level was overriding defaultThinkingLevel from
settings.

Now thinkingLevel in ScopedModel is optional (undefined means 'not
explicitly specified'). When passing to SDK, undefined values are filled
with defaultThinkingLevel from settings.
2026-01-07 18:11:03 +01:00
Mario Zechner f3b7b0b179 fix(tui): handle batched input over SSH with StdinBuffer
Adds StdinBuffer class (adapted from OpenTUI, MIT license) to split
batched stdin into individual sequences before they reach components.

This fixes key presses being dropped when batched with release events,
which commonly occurs over SSH due to network buffering.

- Each handleInput() call now receives a single event
- matchesKey() and isKeyRelease() work correctly without batching awareness
- Properly buffers incomplete escape sequences across chunks
- Handles bracketed paste mode

Addresses #538
2026-01-07 17:50:06 +01:00
Armin RonacherandGitHub 615ed0ae2e Fix compaction UX oddities when model switching (#535) 2026-01-07 16:50:18 +01:00
Mario Zechner 09471ebc7d feat(coding-agent): add ctx.ui.setEditorComponent() extension API
- Add setEditorComponent() to ctx.ui for custom editor components
- Add CustomEditor base class for extensions (handles app keybindings)
- Add keybindings parameter to ctx.ui.custom() factory (breaking change)
- Add modal-editor.ts example (vim-like modes)
- Add rainbow-editor.ts example (animated text highlighting)
- Update docs: extensions.md, tui.md Pattern 7
- Clean up terminal on TUI render errors
2026-01-07 16:11:49 +01:00
Zhou Rui d893ba7f20 fix(ai): clean up openai-codex models and token limits 2026-01-07 23:09:20 +08:00
Melih Mucuk acec56c6b5 feat: add customizable thinking budgets for token-based providers
Fixes #521
2026-01-07 15:17:18 +03:00
Melih Mucuk 0f27eae77e feat: add thinkingBudgets option to customize token budgets 2026-01-07 15:13:26 +03:00
Carlos Villela 893e00579d Merge remote-tracking branch 'origin/main' into feat/no-extensions-flag 2026-01-07 03:20:09 -08:00
Mario ZechnerandGitHub 10e651f99b Merge pull request #513 from austinm911/fix/async-extension-factories
feat(extensions): support async extension factory functions
2026-01-07 11:48:33 +01:00
Mario ZechnerandGitHub 9dfe5bf895 Merge pull request #527 from ferologics/fix/preserve-settings-on-save
fix: preserve externally-added settings when saving
2026-01-07 11:44:14 +01:00
ferologics e0dbdc56d6 fix: preserve externally-added settings when saving
When a user edits settings.json while pi is running (e.g., adding
enabledModels), those settings would be lost when pi saved other
changes (e.g., changing thinking level via Shift+Tab).

The fix re-reads the file before saving and merges the current file
contents with in-memory changes, so external edits are preserved.

Adds test coverage for SettingsManager.
2026-01-07 11:31:14 +01:00
Carlos Villela 2f16c7f7fc Merge origin/main into feat/no-extensions-flag
# Conflicts:
#	packages/coding-agent/CHANGELOG.md
2026-01-07 02:27:16 -08:00
Carlos Villela 499341cdc1 feat(coding-agent): allow explicit -e flags with --no-extensions
--no-extensions now skips discovery but still loads extensions
specified via -e flags. This gives users three modes:

1. Default: auto-discover + any -e additions
2. --no-extensions: no extensions at all
3. --no-extensions -e foo.js: only load foo.js, skip discovery

fixes #524
2026-01-07 02:27:00 -08:00
Mario ZechnerandGitHub 1f2dbb57f6 Merge pull request #522 from nicobailon/feat/dialog-timeout-countdown
feat(coding-agent): add timeout option to extension dialogs with live countdown
2026-01-07 10:04:21 +01:00
Carlos Villela 48f524c554 Add --no-extensions flag to disable extension discovery
Similar to --no-skills, this flag disables extension discovery and loading.
Useful for debugging or when extensions are causing issues.
2026-01-06 23:53:01 -08:00
Nico Bailon 77477f6166 feat(coding-agent): add timeout option to extension dialogs with live countdown
Extension UI dialogs (select, confirm, input) now support a timeout option
that auto-dismisses with a live countdown display. Simpler alternative to
manually managing AbortSignal for timed dialogs.

Also adds ExtensionUIDialogOptions type export and updates RPC mode to
forward timeout to clients.
2026-01-06 21:49:27 -08:00
Mario Zechner fcb3b4aa72 Add [Unreleased] section for next cycle 2026-01-07 01:33:34 +01:00
Mario Zechner 5514d4ffdb Release v0.37.8 v0.37.8 2026-01-07 01:32:53 +01:00
Mario Zechner 41fe329cdd fix(tui): filter key release events by default
Components must set wantsKeyRelease=true to receive release events.
Fixes double-processing of keys in editors when Kitty protocol flag 2 is enabled.
2026-01-07 01:31:24 +01:00
Mario Zechner 7508a51599 Add [Unreleased] section for next cycle 2026-01-07 01:02:34 +01:00
Mario Zechner a4f2bb5c27 Release v0.37.7 v0.37.7 2026-01-07 01:01:55 +01:00
Mario Zechner 62919fc1d4 docs(tui): add changelog entry for matchesKey fix 2026-01-07 00:57:28 +01:00
Mario Zechner 7a44cf0db0 fix(tui): matchesKey now matches Kitty sequences for unmodified letter keys
Needed for key release events which come as CSI sequences even for plain letters.
2026-01-07 00:57:10 +01:00
AustinandGitHub c2eb8d0f92 Merge branch 'badlogic:main' into fix/async-extension-factories 2026-01-06 15:47:30 -08:00
Mario Zechner 9330f5a10a Add [Unreleased] section for next cycle 2026-01-07 00:43:25 +01:00
Mario Zechner befbeb30e4 Release v0.37.6 v0.37.6 2026-01-07 00:42:45 +01:00
Mario Zechner a2f032a426 feat(tui): add Kitty keyboard protocol flag 2 support for key release events
- Enable flag 2 in Kitty protocol for event type reporting
- Add isKeyRelease() and isKeyRepeat() functions
- Parse event type suffix (:1/:2/:3) in Kitty sequences
- Export KeyEventType type
2026-01-07 00:41:44 +01:00