Commit graph

211 commits

Author SHA1 Message Date
Fero
6137de9ce7
fix(coding-agent): sync extension theme changes to session settings (#1483) 2026-02-23 00:57:36 +01:00
Mario Zechner
316c2afe38 fix(coding-agent): fix git-update test using unparseable git source
The test used 'github.com/test/extension' as the git source, but
parseGitUrl() requires a 'git:' prefix for bare hostnames. Changed
to 'git:github.com/test/extension' so the source is correctly
parsed as a git type and update() actually runs.
2026-02-22 14:57:58 +01:00
Mario Zechner
7364696ae6 fix(coding-agent): prefer provider/model split over gateway model id matching
When resolving --model zai/glm-5, the resolver now correctly interprets
'zai' as the provider and 'glm-5' as the model id, rather than matching
a vercel-ai-gateway model whose id is literally 'zai/glm-5'.

If the provider/model split fails to find a match, falls back to raw id
matching to still support OpenRouter-style ids like 'openai/gpt-4o:extended'.
2026-02-22 14:40:36 +01:00
Mario Zechner
39cbf47e42 feat(coding-agent): discover skills in .agents paths by default 2026-02-20 00:15:53 +01:00
Mario Zechner
2977c14917 refactor(coding-agent): move auth storage to backend abstraction 2026-02-17 19:57:21 +01:00
Mario Zechner
de2736bad0 refactor(coding-agent): improve settings storage semantics and error handling 2026-02-17 00:08:32 +01:00
Mario Zechner
0adce69b3b fix(coding-agent): tighten git source parsing and local path normalization (fixes #1426) 2026-02-12 21:28:06 +01:00
Mario Zechner
4793f7c92d fix(coding-agent): make resolveCliModel sync, update docs and changelog 2026-02-12 19:04:51 +01:00
Armin Ronacher
56342258e1 fix(coding-agent): honor --model selection, thinking, and --api-key 2026-02-12 18:58:45 +01:00
Mario Zechner
1caadb2e2a fix(ai): use parametersJsonSchema for Google tool declarations, revert Antigravity opus model
- Use parametersJsonSchema instead of parameters for Gemini tool declarations
  to support full JSON Schema (anyOf, oneOf, const, etc.)
- Keep legacy parameters field for Claude models on Cloud Code Assist, where
  the API translates parameters into Anthropic's input_schema
- Revert claude-opus-4-6-thinking back to claude-opus-4-5-thinking (model
  doesn't exist on the Antigravity endpoint)

fixes #1398
2026-02-08 15:53:17 +01:00
PriNova
08e88f1036
fix(antigravity): fixes the tests for antigravitiy opus (#1369)
* feat(antigravity): update model costs and tokens, migrate compaction tests to Claude 4.6

- Update model costs for various models in `models.generated.ts` to reflect the latest pricing.
- Update maxTokens for certain models.
- Migrate compaction tests from `claude-opus-4-5-thinking` to `claude-opus-4-6-thinking` in `compaction-thinking-model.test.ts`.

* fix: remove unnecessary peer dependencies in package-lock.json

This commit removes the `peer: true` flag from several dependencies in `package-lock.json`. These dependencies (lit, tailwind-merge, tailwindcss, picomatch, @tailwindcss/typescript, vite, picomatch) do not need to be explicitly marked as peer dependencies in this context, as they are already managed as regular dependencies. Removing the `peer: true` flag simplifies the dependency graph and avoids potential conflicts during installation.
2026-02-07 15:49:30 +01:00
Fero
f9161c4d4e
fix(coding-agent): add package subcommand help and friendly errors (#1347)
* fix(coding-agent): add package subcommand help and friendly errors

* refactor(coding-agent): simplify package command parsing and dispatch

* fix(coding-agent): add plain git URL examples to install help
2026-02-07 03:30:28 +01:00
Mario Zechner
310da43042 fix(coding-agent): refresh temporary git extension caches on cache hits 2026-02-06 22:01:49 +01:00
Mario Zechner
76a6a74517 feat(coding-agent): merge custom models with built-ins by id 2026-02-06 19:15:26 +01:00
Mario Zechner
ddd5a65c7e fix(coding-agent): handle compromised auth lock without crashing
closes #1322
2026-02-06 19:15:26 +01:00
Mario Zechner
2f1ab3641f fix(coding-agent): document modelOverrides and harden override merging fixes #1062 2026-02-06 18:54:29 +01:00
Charles Cooper
2cd55b2d35 feat(coding-agent): support per-model overrides in models.json
Add modelOverrides field to provider config that allows customizing
individual built-in models without replacing the entire provider.

Example:
  {
    "providers": {
      "openrouter": {
        "modelOverrides": {
          "anthropic/claude-sonnet-4": {
            "compat": { "openRouterRouting": { "only": ["amazon-bedrock"] } }
          }
        }
      }
    }
  }

Overrides are deep-merged with built-in model definitions. Supports:
- name, reasoning, input, contextWindow, maxTokens
- Partial cost overrides (e.g. only change input cost)
- headers (merged with existing)
- compat settings (merged with existing)

Works alongside baseUrl overrides on the same provider.

closes #1062
2026-02-06 18:54:29 +01:00
Mario Zechner
fe6f4d3a9d fix(coding-agent): respect quietStartup on /reload while keeping diagnostics (fixes #1336) 2026-02-06 18:30:53 +01:00
Mario Zechner
2668326e05 fix(coding-agent): chain tool_result extension patches
fixes #1280
2026-02-06 11:49:08 +01:00
Mario Zechner
b050c582a1 fix(agent,coding-agent): resume queued messages after auto-compaction 2026-02-06 11:36:19 +01:00
Mario Zechner
6b0f1fefdb fix(coding-agent): centralize package source normalization and local path parsing fixes #1304 2026-02-06 00:20:52 +01:00
Mario Zechner
5f5cd080b9 fix(coding-agent): respect package.json pi.extensions manifest in settings extensions paths
collectAutoExtensionEntries now checks if the directory itself has a
package.json with pi.extensions (or index.ts) before scanning children.
This fixes duplicate extension loading when a manifest-aware directory
is specified directly in settings.json extensions array.

Fixes #1274
2026-02-05 22:32:12 +01:00
Mario Zechner
f33844fe37 fix(coding-agent): handle git @ref parsing edge cases and pinned update tests refs #1299 2026-02-05 21:56:57 +01:00
Mario Zechner
61fe132946 fix(coding-agent): stabilize pinned git parsing and model default test 2026-02-05 21:43:27 +01:00
Mario Zechner
5a30e16305 fix(coding-agent): fallback parse git URLs for unknown hosts 2026-02-05 21:40:36 +01:00
Mario Zechner
6c6d937b2d
Merge pull request #1287 from markusn/feature/ssh-git-packages
feat(coding-agent): add SSH URL support for git packages
2026-02-05 17:09:28 +01:00
Markus Ekholm
fba9a8aece
feat(coding-agent): add SSH URL support for git packages
Use hosted-git-info library for robust parsing of SSH URLs (git@host:path
and ssh://) in addition to HTTPS. SSH and HTTPS URLs for the same repo
are now properly deduplicated.
2026-02-05 16:48:10 +01:00
Mario Zechner
9cf5758b68 feat(coding-agent): support shell commands and env vars in auth.json API keys
API keys in auth.json now support the same resolution as models.json:
- Shell command: "\!command" executes and uses stdout (cached)
- Environment variable: uses the value of the named variable
- Literal value: used directly

Extracted shared resolveConfigValue() to new resolve-config-value.ts module.
2026-02-04 23:02:00 +01:00
Mario Zechner
d0679dcfc0 fix(coding-agent): ignore unknown skill frontmatter fields 2026-02-04 14:20:24 +01:00
Mario Zechner
fcfbc82ec2 fix(coding-agent): reload global settings fixes #1241 2026-02-04 14:14:52 +01:00
Mario Zechner
4990981e47 fix(coding-agent): rpc test needs prompt before checking session file
Session files are only written after first assistant message.
The test was checking for a session file without having sent any prompt.
2026-02-04 13:27:54 +01:00
Mario Zechner
13ac63c3cd fix(coding-agent): fork writes to new session file, not parent (fixes #1242)
- Store previousSessionFile before creating branched session
- Update sessionFile after writing new branch file
- Pass parentSession when forking from first message
- Add --local to git config in tests to prevent repo escape
2026-02-04 13:22:43 +01:00
Mario Zechner
b1c2c95f23 fix(coding-agent): normalize local package removal paths (fixes #1243) 2026-02-04 12:56:00 +01:00
haoqixu
29e2997f41 fix(coding-agent): filter out commands conflict with builtins 2026-02-03 01:23:49 +08:00
Mario Zechner
287a0b606d fix(coding-agent): guard clipboard native load 2026-02-02 00:23:12 +01:00
Aliou Diallo
7f78c383c9 test(coding-agent): fix git-update tests to use setPackages
Tests used setExtensionPaths but update() iterates packages, not
extensions. All 5 non-pinned tests were silently passing as no-ops.

Also add regression test for scope-aware update behavior.
2026-02-01 22:42:58 +01:00
Mario Zechner
73839f876e feat(coding-agent): add named-only filter toggle to /resume picker (#1128)
Adds Ctrl+N toggle to filter sessions by named-only vs all in the /resume picker.

- Add NameFilter type and filtering logic to session-selector-search.ts
- Add toggleSessionNamedFilter app keybinding (default: ctrl+n)
- Show Name: All/Named state in header
- Empty state mentions toggle keybinding as escape hatch
- Export hasSessionName() to avoid duplication

Co-authored-by: warren <warren.winter@gmail.com>
2026-02-01 19:03:38 +01:00
Sviatoslav Abakumov
4ca7bbe450
Fix tree selector focus behavior (#1142)
* fix(coding-agent): tree selector focuses nearest visible ancestor

When the selected entry is not visible (filtered out by mode change or a
metadata entry like model_change), walk up the parent chain to find the
nearest visible ancestor instead of jumping to the last item.

Fixes selection behavior for:

- Initial selection when currentLeafId is a metadata entry
- Filter switching, e.g. Ctrl+U for user-only mode

* fix(coding-agent): tree selector preserves selection through empty filters

When switching to a filter with no results, e.g. labeled-only with no
labels and back, the cursor would reset to the first message instead of
the original selection.

Track lastSelectedId as a class member and only update it when
filteredNodes is non-empty, preserving the selection across empty filter
results.

* test(coding-agent): add tree selector filter and selection tests

- Test metadata entry handling (model_change, thinking_level_change)
- Test filter switching with parent traversal (default ↔ user-only)
- Test empty filter preservation (labeled-only with no labels)
2026-02-01 13:23:52 +01:00
Mario Zechner
3b8d0a8921 feat(coding-agent): add resources_discover hook 2026-02-01 02:20:35 +01:00
Mario Zechner
38ed9e86f8 fix(coding-agent): convert clipboard BMP images to PNG on paste
WSL2/WSLg often provides clipboard images as image/bmp only.
Previously this resulted in invalid PNG files being written.

Now readClipboardImage() converts unsupported formats to PNG
via Photon before returning.

Closes #1109

Based on #1112 by @lightningRalf
2026-01-31 23:24:10 +01:00
Mario Zechner
ed80ab2129 fix(coding-agent): multi-file extensions in packages now discovered correctly
Package resolution now uses the same discovery logic as local extensions:
only index.ts (or manifest-declared entries) are loaded from subdirectories,
not helper modules.

fixes #1102
2026-01-31 01:07:33 +01:00
Daniel Nouri
e20583aac8
feat(coding-agent): add set_session_name RPC command (#1075)
- Add set_session_name command with empty name validation
- Expose sessionName in get_state response
- Add setSessionName() to AgentSession and RpcClient
- Document in docs/rpc.md
2026-01-30 01:41:58 +01:00
Mario Zechner
098f396cf3 fix(coding-agent): respect .gitignore/.ignore/.fdignore when scanning package resources
fixes #1072
2026-01-30 01:02:56 +01:00
Mario Zechner
4edb506df8 fix(coding-agent): handle macOS filenames with curly quotes and NFD Unicode
Fixes #1078

- Add tryNFDVariant() to normalize paths to NFD form
- Add tryCurlyQuoteVariant() to convert straight quotes to curly quotes
- Try combined NFD + curly quote variant for French macOS screenshots
- Add comprehensive tests for path-utils
2026-01-29 22:58:22 +01:00
Nico Bailon
bac57f81be
fix: preserve external settings.json edits on reload (#1046)
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-01-29 02:42:23 +01:00
Aliou Diallo
bfb21e31f8 fix(coding-agent): handle force-pushed git extensions in pi update 2026-01-26 22:01:08 +01:00
Mario Zechner
585ce73be1 fix(coding-agent): align auto-discovery with loader rules 2026-01-26 13:49:21 +01:00
Mario Zechner
b270e7b585 fix(coding-agent): apply config overrides to auto-discovery 2026-01-26 13:37:08 +01:00
Mario Zechner
ea93e2f3da fix(coding-agent): add force exclude pattern and fix config toggle persistence
- Add `-path` force-exclude pattern (exact path match, highest precedence)
- Change `+path` force-include to exact path match (no glob)
- Manifest-excluded resources are now hidden from config (not toggleable)
- Config toggle uses `+` to enable and `-` to disable
- Settings paths resolve relative to settings.json location:
  - Global: relative to ~/.pi/agent
  - Project: relative to .pi
- Add baseDir to PathMetadata for proper relative path computation
- Update tests for new base directory and pattern behavior

fixes #951
2026-01-26 12:47:07 +01:00
Sergii Kozak
b5873507c1
Rename session from /resume session list (#863)
* Add session renaming in interactive mode resume picker

Session list now displays last message timestamp as modified time
instead of file mtime. Ctrl+N enters rename mode in the interactive
resume picker, allowing quick session renaming without leaving the
selector. Rename hint is shown only in interactive mode, not in the
CLI --resume picker./

* Add docs entry for renaming in picker

* Update shortcut to ctrl+r for session renaming
2026-01-25 19:42:34 +01:00