Commit Graph

1388 Commits

Author SHA1 Message Date
Mario Zechner
1e33492525 fix(coding-agent): harden clipboard copy
closes #3639
2026-04-24 12:55:58 +02:00
Mario Zechner
f2f03616ab fix(coding-agent): update provider auth guidance and defaults 2026-04-24 00:55:27 +02:00
Mario Zechner
bffb760f4f fix(coding-agent): improve auth setup warnings 2026-04-24 00:55:27 +02:00
Armin Ronacher
27c05b7faa feat(ui): Lower /scoped-models height to same as /models 2026-04-24 00:53:11 +02:00
Armin Ronacher
d4d3c2fd39 feat(login): More consistent styling 2026-04-24 00:30:31 +02:00
Armin Ronacher
40edf7ee06 fix: /model cancellation 2026-04-24 00:16:10 +02:00
Mario Zechner
6bb4a55524 fix(coding-agent): preserve final TUI frame on quit 2026-04-24 00:11:09 +02:00
Mario Zechner
86ba08a2e3 fix(coding-agent): preserve in-memory settings on reload
closes #3616
2026-04-23 23:47:49 +02:00
Mario Zechner
4cd4cfd98e fix(ai): support long cache retention compat
closes #3543
2026-04-23 23:43:34 +02:00
Mario Zechner
19f2478599 fix(coding-agent): show shortcut conflict diagnostics on startup
closes #3617
2026-04-23 23:31:52 +02:00
Mario Zechner
ffa0f31239 fix(ai): support Anthropic eager tool streaming compat
closes #3575
2026-04-23 23:12:45 +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
c091aa732f fix(coding-agent): space first user message after notices
closes #3613
2026-04-23 22:16:40 +02:00
Armin Ronacher
00cb947166 fix(ai): preserve env api key contract 2026-04-23 22:11:46 +02:00
Mario Zechner
f0cf8a59d2 fix(coding-agent): handle stale extension contexts
fixes #3606
2026-04-23 22:07:13 +02:00
Armin Ronacher
0cb8ff3843 fix(ai): Restore original api contract for getEnvApiKey 2026-04-23 22:04:42 +02:00
Mario Zechner
2394f3a987 fix(coding-agent): retry Bedrock http2 no-response errors closes #3594 2026-04-23 21:36:51 +02:00
Mario Zechner
3fb2d11ce5 fix(coding-agent): honor no-tools in service sessions
fixes #3592
2026-04-23 21:36:16 +02:00
Mario Zechner
e38647f376 fix(coding-agent): restore builtin-only tool disabling
closes #3592
2026-04-23 21:36:16 +02:00
Armin Ronacher
e97051313d fix(coding-agent,ai): show env auth source in /login 2026-04-23 21:19:53 +02:00
Aliou Diallo
05e2e9d170 fix(coding-agent): strip trailing index.js|ts from extension labels in startup banner (#3596)
Strip `index.ts` and `index.js` from extension display paths in both
compact and expanded views of the startup banner. This makes the list more
readable by removing redundant filename noise.

Changes:
- Add `formatExtensionDisplayPath()` helper to centralize path formatting
- Update `getCompactExtensionLabels()` to strip index files from segments
- Update expanded view formatting to use the new helper
- Add comprehensive tests for both views

Fixes #3549
Fixes #3559
2026-04-23 21:03:26 +02:00
Vegard Stikbakke
ff220fa41d fix(coding-agent): tear down extension UI before runner invalidation on shutdown (#3597)
Custom footers registered via ctx.ui.setFooter(...) whose render()
closure touched ctx would crash pi on /quit: runtimeHost.dispose()
invalidates the extension runner before the TUI stops rendering, so
any still-attached footer render tick hit assertActive() and threw.

Call resetExtensionUI() before runtimeHost.dispose() in the interactive
shutdown path, matching the rebindCurrentSession() pattern. This
disposes the custom footer (clearing its interval) and detaches it
from the TUI tree before the runner goes stale.

closes #3595

Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-04-23 21:02:15 +02:00
Mario Zechner
8cc046f86e fix(coding-agent): make terminal progress escape sequences configurable, disabled by default
Adds terminal.showTerminalProgress setting (default false) and wires it
to /settings. Guards all OSC 9;4 setProgress calls in interactive-mode.

closes #3588
2026-04-23 15:08:00 +02:00
Armin Ronacher
010e9acfe9 feat(coding-agent): add searchable auth provider login flow (#3572) 2026-04-23 13:42:09 +02:00
Julian LaNeve
de8c947556 fix(coding-agent): route remaining hardcoded pi branding through APP_NAME (#3583)
Swaps hardcoded "pi" / ".pi" / "π" for the existing APP_NAME and
CONFIG_DIR_NAME extension points at four sites the original APP_NAME
rollout missed:

- /quit slash-command description
- process.title (cli.ts and bun/cli.ts)
- project-local extensions dir in loader.ts

For the terminal title, adds an APP_TITLE export in config.ts that
keeps pi's "π" glyph when piConfig.name is unset and falls back to
APP_NAME otherwise. Presence of piConfig.name acts as the "has been
rebranded" signal, so pi's own package.json drops the redundant
"name": "pi" (the existing `|| "pi"` fallback in config.ts makes this
a no-op for APP_NAME).

No behavior change for pi itself: process.title, /quit description,
terminal title prefix, and project-local extensions dir all resolve
to the same values as before.

closes #3476
2026-04-23 12:27:00 +02:00
Mario Zechner
f3a2c9d05e fix(coding-agent,mom): retry fs watchers on async errors closes #3564 2026-04-22 23:03:19 +02:00
Mario Zechner
cc76e73c05 fix(coding-agent): persist custom working message across loader recreation
Replace transient pendingWorkingMessage with a persistent workingMessage
field on InteractiveMode, matching the workingIndicatorOptions pattern.
New loaders now use this.workingMessage || this.defaultWorkingMessage
instead of always falling back to the default.

Also add working-message-test.ts extension example.

closes #3566
2026-04-22 22:24:32 +02:00
Mario Zechner
3dacaa8ed9 fix(coding-agent,tui): drop typebox compiler shim and fix progress 2026-04-22 21:12:20 +02:00
Armin Ronacher
35ff2689ee fix(typebox): migrate to v1 with extension compat (#3474)
* fix(typebox): migrate to v1 with extension compat

Replace AJV-based validation with TypeBox-native validation, keep legacy extension imports working (including @sinclair/typebox/compiler), and restore coercion for serialized/plain JSON schemas.

This change closes #3112.

* fix(typebox): use canonical imports and harden coercion

Switch first-party code to canonical typebox imports while retaining legacy extension aliases in the loader.

Remove obsolete runtime codegen guards, expand serialized JSON-schema coercion coverage, and update related tests and fixtures.

Fixes #3112.

---------

Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-04-22 19:59:33 +02:00
Mario Zechner
8234ebf9ee feat(coding-agent,tui): add stacked autocomplete providers closes #2983 2026-04-22 15:44:08 +02:00
Mario Zechner
4e919868f6 fix(coding-agent): chain system prompt in before_agent_start closes #3539 2026-04-22 14:58:17 +02:00
Mario Zechner
b4f9b618d3 fix(coding-agent): allow headers-only model overrides closes #3538 2026-04-22 13:26:01 +02:00
Mario Zechner
1cc303d053 fix(coding-agent): add replacement-session callbacks closes #2860 2026-04-22 12:13:54 +02:00
Mario Zechner
a900d25119 feat(tui,coding-agent): add OSC 9;4 terminal progress indicators
Emit OSC 9;4 progress start/end sequences during agent streaming and
compaction so terminals (iTerm2, WezTerm, Windows Terminal, Kitty, etc.)
show activity in their tab bar.

Made with love for @lucasmeijer
2026-04-22 11:55:52 +02:00
Samuel Painter
ee462dd70d fix(coding-agent): sanitize markdown links in exported session HTML (#3532)
marked v15 does not filter dangerous URL protocols. The default link
renderer passes href values through verbatim, so markdown like
`[click](javascript:alert(1))` renders as a clickable XSS link in
shared/exported session HTML.

Add custom link and image renderers that:
- Block javascript:, vbscript:, and data: protocol URLs
- Escape href/title/alt attributes via escapeHtml()

Also escape img.mimeType in session image rendering to prevent
attribute breakout from crafted session JSONL.

Fixes #3531
2026-04-22 10:53:03 +02:00
Mario Zechner
0bb0a58466 feat(ai): add Fireworks provider support closes #3519 2026-04-22 01:09:11 +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
Aliou Diallo
b2a1997ea0 fix(coding-agent): fix grep/find/ls HTML export rendering (#3491)
Rename BUILTIN_TOOLS to TEMPLATE_RENDERED_TOOLS to match what the set
actually represents: tools rendered directly by the HTML template instead of
pre-rendered through the TUI→ANSI→HTML pipeline.

Move grep and find off the template-rendered exclusion path so they use their
existing TUI renderCall/renderResult output in HTML export.

Add a dedicated HTML renderer for ls and keep it in the template-rendered set.
Unlike grep and find, rendering ls through the terminal-oriented Text component
introduced spacing artifacts in exported HTML due to full-width line padding,
so ls is rendered natively in the export template instead.
2026-04-21 13:06:49 +02:00
Mario Zechner
c6cef7c806 fix(coding-agent): render HTML-like message content verbatim in exports
closes #3484
2026-04-21 09:24:44 +02:00
Mario Zechner
14ad636fb5 fix(coding-agent): initialize system prompt options lazily 2026-04-20 23:22:21 +02:00
Mario Zechner
12d7161884 fix(coding-agent): add session_shutdown reasons closes #2863 2026-04-20 23:11:08 +02:00
Douglas Stephen
1891b9ac01 feat: Expose BuildSystemPromptOptions on before-agent-start event. (#3473)
Resolves: #3463
2026-04-20 23:06:47 +02:00
Mario Zechner
e4f7fe7bb7 feat(coding-agent): batch package updates
closes #2980
2026-04-20 22:56:26 +02:00
Mario Zechner
c40efa9bab fix(coding-agent): resolve shell config from session settings
Stop shell resolution from consulting ambient process.cwd() during bash execution and use the active session's shellPath setting instead.

closes #3452
2026-04-20 22:32:11 +02:00
Mario Zechner
5a4e22ea44 fix(coding-agent): remove process-cwd tool singletons and use tool-name allowlists
- switch SDK/CLI tool selection to name-based allowlists
- apply allowlists across built-in, extension, and SDK tools
- remove ambient process.cwd defaults from core tooling and resource helpers
- update tests, examples, and TUI callers for explicit cwd plumbing
- add regression coverage for extension tool filtering

closes #3452
closes #2835
2026-04-20 22:05:28 +02:00
Mario Zechner
27c1544839 fix(coding-agent): use tool-name allowlists and remove cwd-bound singletons
- treat tools as a global allowlist across built-in, extension, and SDK tools
- remove process-cwd singleton tool usage from SDK and CLI paths
- add regression coverage for extension tool filtering

closes #3452
closes #2835
2026-04-20 22:05:28 +02:00
Mario Zechner
b73212616d fix(coding-agent): skip redundant npm package updates
closes #3000
2026-04-20 19:12:52 +02:00
Mario Zechner
3054fd7a3b fix(ai,coding-agent): support anthropic-style cache control for openai compatibles closes #3392 2026-04-20 17:12:05 +02:00
Mario Zechner
2f4f283cc2 fix(ai,coding-agent): preserve non-vision image placeholders closes #3429 2026-04-20 16:52:27 +02:00