Commit Graph

1176 Commits

Author SHA1 Message Date
Mario Zechner
a0396e1f9b fix(coding-agent): silence headless clipboard fallback errors closes #2056 2026-03-14 05:05:07 +01:00
Mario Zechner
bdf2419ac3 fix(coding-agent): honor provider compat in models.json closes #2062 2026-03-14 04:55:03 +01:00
badlogic
671798d67f fix(coding-agent): normalize prompt cwd for bash-safe windows paths closes #2080 2026-03-14 04:48:52 +01:00
Mario Zechner
7ddaf150d6 fix(coding-agent): support configurable npm wrapper command closes #2072 2026-03-14 04:38:01 +01:00
Mario Zechner
a8e3c829fa fix(coding-agent): stop skill recursion at root closes #2075 2026-03-14 04:18:28 +01:00
Mario Zechner
b6181bed92 fix(coding-agent): expand paste markers in ctx.ui.getEditorText(), closes #2084 2026-03-14 04:08:24 +01:00
Mario Zechner
5c9ce47c53 fix(coding-agent): fix startup crash when downloading fd/ripgrep on first run
Use pipeline() instead of finished(readable.pipe(writable)) so stream
errors from abort signals are caught as promise rejections. Increase
download timeout from 10s to 120s for multi-MB archives.

closes #2066
2026-03-14 03:57:59 +01:00
Mario Zechner
63ac2df24d fix(coding-agent): sync tool hooks with agent event processing closes #2113 2026-03-14 03:10:04 +01:00
Haoyu Zha
f04d9bc428 feat(session-manager): allow supplying custom session ID in newSession() (#2130)
* feat(session-manager): allow supplying custom session ID in newSession()

Add optional `id` field to `NewSessionOptions`. When provided, this ID
is used as the session ID instead of generating a random UUID. Existing
callers are unaffected since the field is optional and falls back to
`randomUUID()`.

Closes #2097

* test(session-manager): add tests for custom session ID in newSession()

Verify that newSession() uses the provided id when supplied, falls back
to randomUUID() when omitted, and includes the custom id in the session
header.
2026-03-14 01:34:48 +01:00
Mario Zechner
4b9e6006fa fix(coding-agent): keep only ISO date in system prompt closes #2131 2026-03-13 21:07:03 +01:00
KangYu
2501a053e0 fix(coding-agent): match server_error and internal_error in retry regex (#2117)
The _isRetryableError() regex used literal spaces ("server error",
"internal error") but Codex SSE error events use underscores
("server_error").  Change to .? so both space and underscore (and
direct concatenation) are matched, enabling automatic retry on
transient Codex SSE errors.

fixes #2091
2026-03-13 18:51:04 +01:00
Melih Mucuk
738319e465 fix(coding-agent): Fix EXIF orientation for JPEG and WebP images (#2105)
* fix(coding-agent): apply EXIF orientation correction during image convert and resize

* docs(coding-agent): add PR reference to changelog entry
2026-03-13 17:44:14 +01:00
Mario Zechner
ad11058e37 fix(coding-agent): use shell for external editor on windows closes #1925 2026-03-08 00:48:42 +01:00
Mario Zechner
80d79eefc3 fix(coding-agent): prefer explicit -e extensions closes #1896 2026-03-08 00:34:31 +01:00
Mario Zechner
787f351ab7 feat(coding-agent): refine session_directory hook closes #1729 2026-03-08 00:19:35 +01:00
Helmut Januschka
7df89066d9 feat(coding-agent): add session_directory extension event
Adds a session_directory extension event that fires before session manager
creation, allowing extensions to customize the session directory path based
on cwd, git branch, or other context.

- Extensions can return a custom sessionDir in the event handler
- CLI --session-dir flag takes precedence over extension-provided paths
- If multiple extensions return a sessionDir, the last one wins
- Enables implementing branch-based sessions as an extension instead of core feature

This provides the extension point needed to implement git branch-based
session directories without adding the complexity to core.

Closes #1729
2026-03-08 00:19:35 +01:00
Mario Zechner
d48843ea55 Pr 1724 (#1939)
* feat(coding-agent): add fold/unfold to tree branch navigation

Remap left/right arrow keys in the session tree to jump between branch
segment starts (first child of each branching point). Left on a foldable
node (root or segment start) folds it, hiding its descendants. Right on
a folded node unfolds it. Nested fold state is preserved. Search and
filter changes reset all folds.

Folded branches show ⊞ in the connector (├⊞/└⊞) or as a prefix for
roots. Active path marker • appears after the fold indicator.

Add Page Up/Down support for paging through the tree list, consistent
with session selector and config selector.

* feat(coding-agent): improve tree branch folding closes #1724

---------

Co-authored-by: Sviatoslav Abakumov <dust.harvesting@gmail.com>
2026-03-08 00:15:47 +01:00
Mario Zechner
9a8bc61300 fix(tui,coding-agent): handle tmux xterm extended keys and warn on tmux setup fixes #1872 2026-03-07 23:01:48 +01:00
Aliou Diallo
e77e51e7ba fix(coding-agent): custom tool collapsed/expanded rendering in HTML export (#1934) 2026-03-07 19:01:33 +01:00
Mario Zechner
a3f05423d9 feat(coding-agent): add provider payload hook 2026-03-07 14:34:28 +01:00
Mario Zechner
e3adaf1bd9 fix(coding-agent): use strict JSONL framing fixes #1911 2026-03-07 14:34:27 +01:00
Mario Zechner
e80692bcb6 fix(coding-agent): keep ~/.agents skills user-scoped\n\ncloses #1915 2026-03-07 12:21:54 +01:00
Mario Zechner
d1a17bbae5 fix(coding-agent): guard against stale kept pre-compaction usage in error-path threshold check 2026-03-06 16:57:14 +01:00
Mario Zechner
c950c692a1 fix(coding-agent): truncate tool results in compaction summarization to prevent overflow, fixes #1796 2026-03-06 16:57:14 +01:00
Mario Zechner
15b36cbee1 feat(coding-agent): preserve custom editor onEscape/onCtrlD handlers
Only set app-level handlers on custom editors if they haven't defined
their own. This allows custom editors (e.g. vim mode) to implement
custom escape handling instead of being overwritten.

Closes #1838
2026-03-06 16:41:12 +01:00
Mario Zechner
b8910f13ad fix(coding-agent): allow threshold compaction for error messages using last successful usage, fixes #1834 2026-03-06 16:26:11 +01:00
Joel Hooks
a4f4d91fa5 Prevent stale pre-compaction assistant usage from retriggering auto-compaction after session recovery payloads and prove it with a regression test 2026-03-06 16:17:13 +01:00
Mario Zechner
58f8fcd8f1 fix(coding-agent): retry sync lockfile acquisition to prevent false auth errors during parallel startup
Add manual retry loop (10 attempts, 20ms delay) around lockfile.lockSync()
in FileAuthStorageBackend and FileSettingsStorage. Previously, concurrent
pi processes would fail immediately on ELOCKED, causing auth.json to load
as empty and surfacing misleading 'No API key found' errors.

fixes #1871
2026-03-06 16:04:01 +01:00
Mario Zechner
cb6aef2ffb fix(coding-agent): preserve thinking defaults across model switches closes #1864 2026-03-06 15:14:53 +01:00
Mario Zechner
b13e080113 fix(coding-agent): clear header on /new closes #1880 2026-03-06 12:52:02 +01:00
Mario Zechner
84655e814c fix(coding-agent): prefer workspace dist files for extension aliases 2026-03-06 00:39:13 +01:00
Markus Ylisiurunen
8a6384a925 add support for gpt-5.4 2026-03-05 22:53:08 +01:00
Mario Zechner
daaabbeac5 fix(coding-agent): normalize CRLF in write preview rendering (fixes #1854) 2026-03-05 22:35:26 +01:00
lajarre
1f39cc776a feat(coding-agent): add treeFilterMode setting for /tree default filter (#1852)
Add configurable initial filter mode for the session tree navigator.
Users who always switch to a specific filter (e.g. no-tools via Ctrl+T)
can now set it as default in settings.

Same pattern as doubleEscapeAction (#404). Filter infra from #747.
2026-03-05 22:25:58 +01:00
Mario Zechner
3de8c48692 fix(coding-agent): make footer truncation width-aware
Use visibleWidth/truncateToWidth for footer path and stats truncation so wide Unicode text cannot overflow terminal width.

Add regression tests for wide session/model/provider names and document the fix in changelog.

closes #1833
2026-03-05 20:45:04 +01:00
Sviatoslav Abakumov
1ce870db1b fix(coding-agent): use ESM resolution for extension alias fallback (#1821)
The previous fix (83b57924) replaced require.resolve() with bare
specifier fallbacks to avoid ERR_PACKAGE_PATH_NOT_EXPORTED for ESM-only
packages like pi-ai. However, bare specifiers are not valid jiti alias
targets, breaking extension loading in global npm installs.

Use import.meta.resolve() as the fallback instead. It respects the
"import" exports condition and returns a real file path.
2026-03-05 07:08:30 +01:00
Mario Zechner
83b57924a0 fix(coding-agent): resolve extension aliases without require.resolve 2026-03-04 21:18:45 +01:00
Mario Zechner
0199abfd11 fix(binary): preload Bedrock provider module for Bun bundle
refs #1814
2026-03-04 20:47:41 +01:00
Mario Zechner
c0d706bf32 fix(extensions): alias pi-ai oauth subpath in jiti loader 2026-03-04 20:31:57 +01:00
Mario Zechner
e0754fdbb3 fix(ai,coding-agent): make pi-ai browser-safe and move OAuth runtime exports
- add browser smoke bundling check to root check + pre-commit

- lazy-load Bedrock provider registration to avoid browser graph traversal

- remove top-level OAuth runtime exports from @mariozechner/pi-ai

- add @mariozechner/pi-ai/oauth subpath export and update coding-agent imports

- move proxy dispatcher init to coding-agent CLI (Node-only)

- document Bedrock/OAuth browser limitations

closes #1814
2026-03-04 20:21:25 +01:00
Mario Zechner
e64cd15c25 fix(coding-agent): preserve session thinking for scoped model cycling
closes #1789
2026-03-04 19:51:55 +01:00
Mario Zechner
4cb1a56b53 fix(tui,coding-agent): add OSC 133 user message markers support closes #1805 2026-03-04 18:33:22 +01:00
Cody Bontecou
f710c2705d feat: add branchSummary.skipPrompt setting to skip summarization prompt (#1792)
When enabled, /tree navigation skips the 'Summarize branch?' prompt and
defaults to no summary, reducing friction for users who never want branch
summaries.

Closes #1791
2026-03-04 17:54:36 +01:00
waldner
b4f9986d23 fix(coding-agent): detect GNU screen TERM values and downgrade to 256color (#1809)
GNU screen does not support truecolor escape sequences. When pi emits
truecolor SGR sequences (e.g. \x1b[38;2;102;102;102m for the dim color
#666666), screen misparses the semicolon-separated parameters as
individual SGR codes. The RGB value 102;102;102 maps directly to
SGR 102 (bright green background), which then bleeds into every
subsequent \x1b[2K line-erase, producing a bright green background
on most info/status messages.

detectColorMode() now returns '256color' for any TERM value that is
'screen', starts with 'screen-' (e.g. screen-256color), or starts
with 'screen.' (e.g. screen.xterm-256color). The existing COLORTERM
check at the top of the function already handles the opt-in case for
users who have configured screen's truecolor passthrough.
2026-03-04 17:50:39 +01:00
Sviatoslav Abakumov
5c61d6bc92 fix(coding-agent): queue messages during branch summarization (#1803)
Messages submitted while a branch summary was being generated were
processed immediately instead of being queued. This happened because
isCompacting only checked compaction abort controllers, not the branch
summary abort controller.

Include _branchSummaryAbortController in the isCompacting getter so all
existing guards (message queueing, reload blocking) also apply during
branch summarization.
2026-03-04 08:55:30 +01:00
Matteo Collina
d35935200f fix(coding-agent): avoid compaction reasoning for non-reasoning models (#1793) 2026-03-04 08:53:33 +01:00
Zhou Rui
d4084a7ad6 fix(coding-agent): propagate focus in extension editor for cursor positioning (#1784) 2026-03-03 21:58:45 +01:00
Mario Zechner
6b4b920425 fix(coding-agent): stop overflow auto-compaction cascades
fixes #1319
2026-03-03 17:19:42 +01:00
Mario Zechner
42579dd923 feat(ai,coding-agent): add OpenCode Go provider support closes #1757 2026-03-03 16:02:29 +01:00
Mario Zechner
1912f0336b fix(coding-agent): allow model-level baseUrl override in models.json closes #1777 2026-03-03 15:46:58 +01:00