Commit Graph
28 Commits
Author SHA1 Message Date
Aliou DialloandMario Zechner ec4d413fc9 fix(coding-agent): custom models for built-in providers and list-models error surfacing (#3072)
* fix(coding-agent): surface models.json load errors on stderr in --list-models

When models.json has validation errors, --list-models silently
discarded custom models and overrides without any user-visible
feedback. Now prints the error to stderr via chalk.yellow warning
before listing available models.

* fix(coding-agent): allow custom models for built-in providers in models.json

Built-in providers (openrouter, anthropic, etc.) already have api and
baseUrl on every model, and auth comes from env vars / auth storage.
Relax validation so custom models under built-in providers don't need
redundant baseUrl, apiKey, or api fields. Inherit them from the first
built-in model for that provider.

fixes #2921

---------

Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-04-14 20:32:18 +02:00
Aliou Diallo 2d3ed0cfa7 fix(coding-agent): use npm view for update checks on non-default registries (#3164)
Previously, getLatestNpmVersion() hardcoded a fetch to
registry.npmjs.org, which 404s for packages on alternate
registries (private, Verdaccio, GitHub Packages, etc.).
The error was silently swallowed, so users never saw update
notifications for these packages.

Replace the direct fetch with
via the existing runCommandCapture helper. This uses the same
registry resolution as npm install (reads .npmrc config chain),
respects the npmCommand setting, and runs with this.cwd for
correct .npmrc lookup.
2026-04-14 20:20:14 +02:00
Aliou Diallo ac37d4d439 feat(coding-agent): support multiple --append-system-prompt flags (#3171) 2026-04-14 20:19:11 +02:00
Aliou Diallo 41377ee8ec fix(tui): sync test awaits with throttled render pipeline (#3076)
Tests assumed renders complete synchronously after requestRender() +
nextTick + flush(), but commit 6f5f37f8 changed requestRender() to
schedule via setTimeout with a 16ms minimum interval. Tests reading
viewport state before doRender() runs saw stale data.

Add VirtualTerminal.waitForRender() helper that waits for the throttled
render to settle (nextTick + 20ms + xterm flush), and replace all
terminal.flush() calls after render-triggering actions with it.

Fixes 8 failing tests across overlay-short-content, tui-render, and
markdown test suites.
2026-04-13 10:57:48 +02:00
Aliou Diallo 127547f2b3 fix(coding-agent): preserve json mode for piped stdin (#2848) 2026-04-05 21:02:18 +02:00
Aliou Diallo 71e4436932 fix(coding-agent): handle git/npm extension paths in CLI resolution (#2845) 2026-04-05 18:42:14 +02:00
Aliou Diallo 18d90b5c48 fix(coding-agent): handle empty session titles and session info metadata (#2304)
* fix(coding-agent): handle empty session titles in tree

* fix(coding-agent): ignore session info in summaries

* docs: update changelog for PR #2304
2026-03-17 16:22:04 +01:00
Aliou Diallo e3decbcdd6 fix(tui): autocomplete highlight follows first prefix match as user types (#1931) 2026-03-07 19:03:42 +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
Aliou Diallo 0b4dea466d fix(coding-agent): ignore SIGINT while process is suspended (#1668)
Add a no-op SIGINT handler before sending SIGTSTP in handleCtrlZ().
Remove it on SIGCONT. Prevents Ctrl+C from killing the backgrounded
process.
2026-02-27 13:51:45 +01:00
Aliou DialloandMario Zechner 0c9304a49b docs(coding-agent): fix RPC mode ctx.hasUI and unsupported methods documentation (#1411)
Update extensions.md and rpc.md to accurately reflect that ctx.hasUI is
true in RPC mode. Document missing unsupported/degraded ExtensionUIContext
methods: pasteToEditor, getAllThemes, getTheme, setTheme.

Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-02-08 23:08:36 +01:00
Aliou Diallo fe1d0ae7f3 fix(coding-agent): preserve editor content during tree navigation summarization (#1169)
Do not overwrite editor text with the rewound user message after
navigateTree completes if the user has already typed something during
the summarization wait. Applies to both the /tree selector and the
extension-driven navigateTree handler.

docs: update changelog for PR #1169
2026-02-01 23:30:50 +01:00
Aliou Diallo 7feae0d5c2 docs(coding-agent): document extension UI protocol in RPC docs, add examples (#1144) 2026-02-01 13:25:18 +01:00
Aliou Diallo 69d02b8a5f fix(coding-agent): use dynamic paths in error messages (#887)
Error messages for missing credentials and shell config now use
getAuthPath() and getSettingsPath() instead of hardcoded ~/.pi/agent/
paths, so they correctly reflect PI_CODING_AGENT_DIR when set.
2026-01-21 23:21:10 +01:00
Aliou Diallo 09d9107d7f fix(coding-agent): expand tilde in PI_CODING_AGENT_DIR env var (#778) 2026-01-16 17:53:58 +01:00
Aliou Diallo 0c6ac46646 feat(coding-agent): Custom tool export rendering in export (#702)
* coding-agent: add ANSI-to-HTML converter for export

* coding-agent: add getToolDefinition method to ExtensionRunner

* coding-agent: add tool HTML renderer factory for custom tools

* coding-agent: add custom tool pre-rendering to HTML export

* coding-agent: render pre-rendered custom tools in HTML export

* coding-agent: integrate tool renderer in exportToHtml
2026-01-16 00:32:31 +01:00
Aliou Diallo 638fbc459b feat(coding-agent): add page-up/down navigation to session selector (#662)
* feat(tui): add pageUp/pageDown key support and selectPageUp/selectPageDown actions

* feat(coding-agent): add page-up/down navigation to session selector
2026-01-12 17:01:46 +01:00
Aliou Diallo cfef1069bb fix(coding-agent): follow symlinked directories in prompt template loading (#601) 2026-01-09 18:41:42 +01:00
Aliou Diallo 042d3fa310 fix(sdk): extensions: [] now disables discovery as documented (#465) 2026-01-05 16:55:51 +01:00
Aliou Diallo 80be0fc901 fix(ci): fix typecheck by adding example to workspace (#467) 2026-01-05 16:54:04 +01:00
Aliou Diallo 5cb7af1ddc feat(hooks): expose setTitle to HookUIContext (#446) 2026-01-04 20:55:52 +01:00
Aliou Diallo 0d477d39f9 fix(tui): expand paste markers when opening external editor (#444)
* fix(tui): expand paste markers when opening external editor

Add getExpandedText() method to Editor that substitutes paste markers
with actual content. Use it in Ctrl-G external editor flow so users
see full pasted content instead of [paste #N ...] placeholders.

* docs: add changelog entries for #444
2026-01-04 18:11:42 +01:00
Aliou Diallo 7470dde1e9 docs: fix outdated custom tools paths and add missing header shortcut (#283)
* docs: fix custom tools example paths to use index.ts structure

* fix: add missing ctrl+g shortcut to startup header

* docs: fix /session -> /resume for session switching references
2025-12-23 03:29:31 +01:00
Aliou Diallo 8868d623fc feat(coding-agent): add Ctrl+Z to suspend process (#267)
* feat(tui): add isCtrlZ key detection and resetRenderState method

* feat(coding-agent): add Ctrl+Z handler to suspend process

* docs(coding-agent): add Ctrl+Z to keyboard shortcuts documentation

* feat(tui): add force parameter to requestRender
2025-12-21 20:19:32 +01:00
Aliou Diallo 95dcd04e7c fix(coding-agent): properly cleanup terminal on Ctrl+C in session selector (#247) 2025-12-19 19:04:00 +01:00
Aliou Diallo 9a7863fc98 fix(coding-agent): handle OpenRouter models with colons in IDs (#242) 2025-12-19 15:26:12 +01:00
Aliou Diallo a9a1a62b14 fix(coding-agent): prevent global AGENTS.md from being loaded twice (#239)
When cwd is `~/.pi/agent/` or a subdirectory, the global AGENTS.md file
was included twice in the system prompt.

`loadProjectContextFiles()` loads context files in two steps:
1. Explicitly loads from `getAgentDir()` (`~/.pi/agent/`)
2. Walks from cwd up to root, collecting all AGENTS.md/CLAUDE.md files

There was no deduplication. When cwd is at or below `~/.pi/agent/`, the
ancestor walk includes that directory again.

Fix: track seen paths with a Set and skip duplicates.
2025-12-19 15:24:49 +01:00
Aliou Diallo de2de851c8 fix(coding-agent): support symlinked tools and hooks in discovery (#219) 2025-12-18 13:07:30 +01:00