Commit Graph
59 Commits
Author SHA1 Message Date
Cristina Poncela Cubeiro 457ae8c79c feat(tui): alt mode scrollbar but prettier (#8801) 2026-09-04 00:05:47 +02:00
Vegard Stikbakke e44d75c20a fix(coding-agent): raise branch summary output cap
closes #8845
2026-09-03 15:14:51 +02:00
David Brailovsky 8c08d0645a Merge remote-tracking branch 'origin/main' into dev 2026-09-03 07:58:51 +00:00
Mario Zechner 4e69b0c280 feat(ai): preserve Anthropic per-turn thinking effort
Route eligible OpenRouter Claude models through the native Messages API and surface provider thinking-drop diagnostics.
2026-09-02 21:39:29 +02:00
Cristina Poncela Cubeiro 758a0ee9b7 Merge branch 'main' into dev
# Conflicts:
#	packages/agent/CHANGELOG.md
#	packages/ai/scripts/generate-models.ts
#	packages/ai/src/providers/cloudflare-ai-gateway.ts
#	packages/ai/test/zai-coding-plan-models.test.ts
#	packages/coding-agent/src/modes/interactive/interactive-mode.ts
#	packages/tui/src/tui-alt-screen.ts
2026-08-28 13:19:43 +02:00
Cristina Poncela Cubeiro 4e49492999 feat(tui): allow disable copy on fullscreen, ctrl + x copies selection (#8731) 2026-08-27 18:07:54 +02:00
Mario Zechner 5976a2f8b9 docs(agent): audit post-WP05 roadmap 2026-08-26 22:41:05 +02:00
Armin Ronacher e86823096c feat(tui): add terminal capability overrides closes #8665 2026-08-26 17:40:36 +02:00
Cristina Poncela Cubeiro 42f7f29ad1 docs(settings): default model and thinking 2026-08-26 16:25:30 +02:00
Armin Ronacher 80e62761f7 feat(coding-agent): add optional PowerShell tool (#8512) 2026-08-24 12:27:03 +02:00
b237412699 feat(ai): generalize openai-completions thinking token budget fields (#8275)
#7638 hardcoded vLLM's thinking_token_budget. Map thinkingBudgets through
thinkingTokenBudgetField, keep the boolean as a vLLM alias, clamp so the
answer keeps 1024 tokens, and document it.

fixes #8274

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-08-18 16:35:35 +02:00
Vegard Stikbakke 836aee6d38 feat(coding-agent): show compaction usage notices 2026-08-18 13:27:00 +02:00
Vegard Stikbakke 46bb9a2c3b docs(coding-agent): clarify Windows paths in settings 2026-08-13 09:54:58 +02:00
Armin Ronacher 541045ae0e fix(coding-agent): preserve extension tools with defaults 2026-08-12 15:42:55 +02:00
Armin Ronacher 4d9aa837c2 feat(coding-agent): add configurable default tools 2026-08-12 15:27:01 +02:00
Armin Ronacher ac4ac9eaf6 feat(coding-agent): configure fullscreen exit output 2026-08-07 18:30:28 +02:00
Armin Ronacher 5446cd7545 feat(coding-agent): rename UI mode to TUI mode 2026-08-05 22:56:58 +02:00
Alexey Zaytsev 66534fbdc7 feat(coding-agent): render Mermaid diagrams (#7624) 2026-08-05 09:43:24 +02:00
Armin Ronacher b103937d3c feat(coding-agent): switch UI modes at runtime (#7555) 2026-08-03 17:32:48 +02:00
Jeremy Gayed b0e05b4423 fix(coding-agent): resize images returned by tools (#7330)
Images produced by tools (extensions, MCP bridges, screenshot tools) went into
session history at full resolution because processImage was only wired to the
read tool and @file CLI attachments. Providers validate every image in the
request, so one oversized image poisons the whole conversation: Anthropic drops
its per-image cap from 8000px to 2000px once a request carries many images, and
every later turn re-sends the same payload. Switching models does not help.

Normalize tool result images in AgentSession.afterToolCall, after the extension
tool_result hook so extension-injected images are covered too. Honors
images.autoResize, and keeps the original block when processing fails so an
unavailable image backend does not delete tool output.

Refs #5369

Assisted-By: devx/86bf3b09-9aba-4d03-8154-50fca3ffc9b5
2026-08-03 14:02:03 +02:00
Mario Zechner b70c0f5b4e Revert "feat(tui): add switchable terminal renderers (#7440)" (#7473)
This reverts commit 1fdf21621d.
2026-08-02 09:21:45 +02:00
Armin Ronacher 1fdf21621d feat(tui): add switchable terminal renderers (#7440)
Allow coding-agent UI modes to switch at runtime while preserving terminal, focus, input, and renderer state.
2026-08-02 09:21:17 +02:00
Armin Ronacher 6129a353b1 feat(tui): add configurable fullscreen scrollbars 2026-07-31 17:17:02 +02:00
Vegard Stikbakke f074efd921 feat(coding-agent): add ui mode setting 2026-07-31 15:33:52 +02:00
Petr Houška 7af8533c6f fix(ai): make provider retries abortable (#6980)
Replace OpenAI and Anthropic SDK retries with local request retries that
preserve configured retry counts, enforce maxRetryDelayMs, and make retry
backoff interruptible through AbortSignal.

Alternatives considered: Racing SDK requests against AbortSignal would make
cancellation observable but would not let Pi enforce maxRetryDelayMs before
the SDK enters its retry sleep. Patching private SDK internals would be brittle,
while disabling provider retries entirely would ignore explicitly configured
maxRetries.

Also, align the custom OpenAI Codex retry loop with the documented
maxRetryDelayMs behavior. Oversized server-requested delays now fail immediately
instead of being clamped, allowing the visible, abortable agent-level retry
policy to handle the failure.

Fixes #6911
2026-07-23 12:25:37 +02:00
Aaron Ky-Riesenbach 1a2542b11b feat(coding-agent): expand ~ in shellPath setting (#6470)
getShellPath() now runs the configured shellPath through the existing
normalizePath() helper, mirroring getSessionDir(). This lets shellPath
point at a home-directory-relative shell wrapper (e.g.
~/.local/bin/agent-shell-sandbox) and resolves consistently across
machines and OSes with different home directories.

refs #6458
2026-07-09 23:23:06 +02:00
Mario Zechner fbdd46389c feat(ai): add max thinking level 2026-07-09 22:30:53 +02:00
Armin Ronacher 3f9aa5d10b feat(coding-agent): add prompt cache miss tracking (#6427)
Detect prompt cache misses per turn by comparing each assistant message's
cache reads against the previous request's prompt tokens (core/cache-stats.ts).
Significant misses emit a warning-colored transcript notice at the turn they
occur, noting idle gaps past the cache TTL and model switches when relevant.

/session gained cache statistics: a compact token/cache breakdown with hit
rate, a $-prefixed cost section with per-model cost breakdown, and the
cumulative cost re-billed due to cache misses.
2026-07-09 14:12:57 +02:00
Mario Zechner 9be55bc773 fix(coding-agent): apply output padding to user messages
closes #6168
2026-06-30 11:55:40 +02:00
Alexey Zaytsev 6564d94717 feat(coding-agent): add configurable assistant output padding
Closes #6168
2026-06-30 11:44:34 +02:00
Armin Ronacher 5a073885b5 feat(coding-agent): add external editor setting
Closes #6122
2026-06-27 23:57:46 +02:00
Armin Ronacher 910508595a feat(coding-agent): add settings http proxy
closes #5790
2026-06-16 18:53:19 +02:00
Armin Ronacher b4bff7f0d0 fix(coding-agent): avoid project trust prompt for update (#5674) 2026-06-12 23:37:16 +02:00
Vegard Stikbakke 0ab2aa86af feat(coding-agent): add experimental first-time setup flow (#5587)
Behind PI_EXPERIMENTAL=1, show a first-time setup dialog on interactive startup when the default agent directory is used and settings.json does not exist. The dialog preselects the detected terminal appearance with an explicit dark/light choice (live preview) and asks for opt-in analytics data sharing. Submitting writes settings.json, which serves as the completion marker; opting in stores a generated trackingId. Escape at any point skips out of setup.
2026-06-10 12:11:49 +02:00
Armin Ronacher 5cb4f597f7 feat(ui): Improved project approval settings 2026-06-09 13:25:54 +02:00
Mario Zechner 89a92207f1 feat(coding-agent): add project trust gating 2026-06-05 10:51:43 +02:00
Mario Zechner c1633e609d Clarify hardware cursor docs
closes #5200
2026-05-30 01:20:14 +02:00
Armin Ronacher 493efd422d fix(codex): timeouts for websockets (#4979) 2026-05-27 12:11:29 +02:00
Armin Ronacher 8fb1e877cd fix(ai): disable hidden provider 429 retries (#4991) 2026-05-26 23:41:58 +02:00
Armin Ronacher 6f931797ca fix(coding-agent): install npm packages in managed root closes #4587 2026-05-17 20:48:00 +02:00
Mario Zechner 8191d59c17 feat(coding-agent): support session dir env
closes #4027
2026-04-30 21:37:53 +02:00
George Hilliard 0dd11898ad fix(coding-agent): redo Bun package manager node_modules handling (#3998)
* Revert "fix(coding-agent): use alternate logic to find Bun's node_modules (#3861)"

This reverts commit c241c6d6d0.  The logic
is faulty: the original strategy of looking for node_modules by asking
the package manager is not incorrect even on bun. Instead, it should
learn a different method of asking the package manager for node_modules
when the *package manager* is bun, not the *runtime*.

* feat(coding-agent): detect bun as package manager and use alternate root query

When `"npmCommand": ["bun"]` is configured in settings.json, pi fails to
start because it invokes `bun root -g`, which doesn't exist:

    error: Failed to run bun root -g: error: Script not found "root"

Add a (simple) check for Bun being used as package manager, and instead
build the relative path starting from Bun's bin directory.
2026-04-30 12:27:50 +02:00
Armin Ronacher 904b843fee docs(coding-agent): clarify telemetry update checks 2026-04-30 11:04:20 +02:00
Mario Zechner aefb0fedfe feat(coding-agent): add warnings.anthropicExtraUsage opt-out
closes #3808
2026-04-27 20:36:00 +02:00
Mario Zechner c06750410a fix(ai,coding-agent): expose provider timeout/retry controls closes #3627 2026-04-24 13:33:00 +02:00
Mario Zechner 8700ac1f0e fix(coding-agent): support custom npmCommand for git deps
closes #3604
2026-04-23 22:32:32 +02:00
Mario Zechner 97a38bf652 fix(coding-agent): configure inline tool image width
closes #3508
2026-04-22 00:56:01 +02:00
Mario Zechner 60290b0d75 fix(coding-agent): expand ~ in sessionDir
closes #3514
2026-04-22 00:21:57 +02:00
Mario Zechner 7371c30c0a feat(coding-agent): add install telemetry ping controls 2026-04-14 00:21:13 +02:00
Mario Zechner 9f9277ccdd refactor(coding-agent): replace AgentSessionRuntimeHost with closure-based AgentSessionRuntime
- Replace AgentSessionRuntimeHost and bootstrap abstractions with AgentSessionRuntime
- Runtime creation is now closure-based via CreateAgentSessionRuntimeFactory
- Factory closes over process-global fixed inputs, recreates cwd-bound services per effective cwd
- Session config (model, thinking, tools, scoped models) re-resolved per target cwd
- CLI resource paths resolved once at startup as absolute paths
- Swap lifecycle: teardown old, create next, apply next (hard fail on creation error)
- Unified diagnostics model (info/warning/error) for args, services, session resolution, resources
- No logging or process exits inside creation/parsing logic
- Removed session_directory support
- Removed session_switch and session_fork extension events (use session_start with reason)
- Moved package/config CLI to package-manager-cli.ts
- Fixed theme init for --resume session picker
- Fixed flaky reftable footer test (content-based polling)
- Fixed silent drop of unknown single-dash CLI flags
- Added error diagnostics for missing explicit CLI resource paths
- Updated SDK docs, examples, plans, exports, tests, changelog

fixes #2753
2026-04-03 20:14:12 +02:00