Commit Graph

1324 Commits

Author SHA1 Message Date
Aliou Diallo
bfa11a50e4 feat(agent,coding-agent): per-tool executionMode override for sequential tool execution (#3345)
* feat(agent,coding-agent): add per-tool executionMode field to AgentTool and ToolDefinition

Add optional executionMode?: ToolExecutionMode to AgentTool and
ToolDefinition interfaces. Propagate through wrapToolDefinition and
createToolDefinitionFromAgentTool. No behavioral change yet — agent
loop will read this field in a follow-up.

* feat(agent): support per-tool executionMode override for sequential execution

When a tool defines executionMode='sequential', the agent loop
forces sequential execution of all tool calls in that batch,
even if the global config is parallel.

* feat(coding-agent): re-export ToolExecutionMode from @mariozechner/pi-agent-core

Makes the type available to extensions that want to set
executionMode on tool definitions.

* feat(coding-agent): add tic-tac-toe extension example with executionMode: sequential

Demonstrates per-tool executionMode: the agent plays via move/play
tool calls that share a cursor. Without sequential execution, play
can resolve before earlier moves finish, landing on the wrong cell.
2026-04-18 00:45:57 +02:00
xu0o0
e6f473f432 fix(coding-agent): prevent text selection from triggering click toggles in exported HTML (#3332) 2026-04-17 19:23:47 +02:00
Mario Zechner
0bb4ccf11f fix(coding-agent): keep scoped-model reorder inert in implicit all-enabled state closes #3331 2026-04-17 16:58:49 +02:00
Mario Zechner
3cea63cf29 fix(coding-agent): resolve captured commands on close closes #3027 2026-04-17 16:45:05 +02:00
Mario Zechner
c15e4d4913 fix(coding-agent): retry connection lost errors
closes #3317
2026-04-17 16:45:05 +02:00
Armin Ronacher
32a305cb9b fix(coding-agent): disambiguate compact extension labels
closes #3308
2026-04-17 09:46:47 +02:00
Mario Zechner
e9808b5854 fix(coding-agent): restore afterToolCall error overrides closes #3051 2026-04-17 01:49:34 +02:00
Mario Zechner
f81acc6679 fix(coding-agent): use stable date format in system prompt 2026-04-17 01:21:38 +02:00
Mario Zechner
ef1fcfcec2 fix(coding-agent): omit devDependencies when installing packages (fixes #3009) 2026-04-17 01:21:31 +02:00
Mario Zechner
36bffc1d13 fix(coding-agent): restore /import error flow and document throws 2026-04-17 00:59:53 +02:00
Mario Zechner
3ba0d85fa2 fix(coding-agent): restore assistant/user turn spacing 2026-04-17 00:52:14 +02:00
Mario Zechner
e5f86f25f2 fix(coding-agent): honor PI_PACKAGE_DIR for bun asset paths closes #3074 2026-04-17 00:38:34 +02:00
Mario Zechner
b2ed851e84 Merge branch 'main' of https://github.com/badlogic/pi-mono
# Conflicts:
#	packages/coding-agent/CHANGELOG.md
2026-04-17 00:28:14 +02:00
Mario Zechner
b0490310c3 fix(coding-agent): stabilize user message OSC 133 padding closes #3090 2026-04-17 00:22:39 +02:00
Armin Ronacher
165603189b fix(coding-agent): parse quoted import paths and missing files 2026-04-17 00:02:14 +02:00
Mario Zechner
9078230b1a fix(coding-agent): export rpc client from root entrypoint
closes #3275
2026-04-16 23:56:59 +02:00
Mario Zechner
1d4fdbad26 fix(coding-agent): scope nested .gitignore rules to their subtree in find
The find tool previously collected every .gitignore under the search
path and passed them to fd via --ignore-file. fd treats --ignore-file
entries as a single global ignore source, so rules from a/.gitignore
also filtered files under sibling b/.

Drop the manual collection and pass --no-require-git instead, which
makes fd apply hierarchical .gitignore semantics whether or not a git
repo is present.

closes #3303
2026-04-16 23:03:41 +02:00
Andrés Vinueza
aa25726ebf feat(coding-agent,tui): support argument-hint frontmatter in prompt templates (#2780)
* feat(coding-agent,tui): support argument-hint frontmatter in prompt templates

Parse argument-hint from prompt template frontmatter and display it
in the autocomplete dropdown description, matching Claude Code's
convention for custom commands.

Frontmatter format:
  ---
  description: Code review
  argument-hint: "[file | #PR | PR-URL]"
  ---

The hint renders in the description column of the autocomplete list:
  review   [file | #PR | PR-URL] — Code review

Closes #2761

* docs(coding-agent,tui): add argument-hint documentation, tests, and built-in hints

- Document argument-hint frontmatter in prompt-templates.md with <required>/[optional] convention
- Add argument-hint to built-in prompts: pr, is, wr
- Expand tests: required/optional hints, missing hints, empty hints, special characters
- Add changelog entries for coding-agent and tui
2026-04-16 23:02:35 +02:00
Mario Zechner
c5451af749 fix(coding-agent): make find tool match path-based glob patterns
fd --glob matches against the basename unless --full-path is set, so
patterns containing '/' (e.g. 'src/**/*.spec.ts') silently returned no
results. When the pattern contains '/', switch fd into --full-path mode
and prepend '**/' unless the pattern already starts with '/', '**/', or
is '**'. Basename patterns keep the default matcher.

closes #3302
2026-04-16 22:53:45 +02:00
Mario Zechner
7b45c52807 fix(coding-agent): restore verbose startup expansion
closes #3147
2026-04-16 21:42:57 +02:00
Armin Ronacher
f822408c77 fix(coding-agent): compact startup header and resource listings (#3267)
Use ctrl+o expansion for startup help and loaded resources, with compact comma-separated collapsed lists and full expanded context paths.

fixes #3147
2026-04-16 21:37:20 +02:00
Mario Zechner
d131fcd4ba feat(coding-agent): add after_provider_response hook closes #3128 2026-04-16 20:28:08 +02:00
Mario Zechner
e9ba9e2ebc fix(coding-agent): harden find cancellation and grep match formatting closes #3148 2026-04-16 13:15:58 +02:00
Mario Zechner
1d6de01c96 feat(coding-agent): export loadProjectContextFiles() standalone utility
closes #3142
2026-04-16 12:44:01 +02:00
Armin Ronacher
db5274b48c fix(markdown): require double-tilde strikethrough delimiters 2026-04-16 12:37:13 +02:00
Mario Zechner
624a7f794f fix(coding-agent): handle ctrl+z on windows closes #3191 2026-04-16 12:33:47 +02:00
Mario Zechner
eb1cf80b10 fix(ai,coding-agent): replace deprecated kimi k2p5 model closes #3242 2026-04-16 12:06:24 +02:00
Mario Zechner
e189b23964 feat(coding-agent): add --no-context-files flag
closes #3253
2026-04-16 10:59:32 +02:00
Armin Ronacher
9b7948c4c8 fix(coding-agent): kill tracked detached bash children on shutdown 2026-04-16 00:12:14 +02:00
Mario Zechner
20ff469605 fix(coding-agent): use static reload box without spinner 2026-04-15 23:25:45 +02:00
Mario Zechner
f7cd613ee4 fix(coding-agent): stabilize edit diff previews closes #3134 2026-04-15 23:11:50 +02:00
Mario Zechner
441c12956a fix(coding-agent): emit rpc prompt response after preflight closes #3049 2026-04-15 22:09:17 +02:00
Mario Zechner
17585b7f0b fix(coding-agent): preserve scoped model order closes #3217 2026-04-15 17:13:06 +02:00
Mario Zechner
5d440b055c fix(coding-agent): fire session shutdown on TERM and HUP closes #3212 2026-04-15 16:37:19 +02:00
Mario Zechner
a8f51764c8 fix(coding-agent): add live retry countdown\n\ncloses #3187 2026-04-15 14:07:46 +02:00
Jack Rose
d22c120b82 handle lower case am/pm in macos screenshot names (#3194) 2026-04-15 12:00:46 +02:00
Mario Zechner
018b40c30c fix: align OpenAI cache affinity and use uuidv7 session ids 2026-04-14 23:20:13 +02:00
Aliou Diallo
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
Mat
dcb1f422c4 feat(coding-agent): accept inline extension factories in main() (#3099) 2026-04-14 20:26:07 +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
Armin Ronacher
64a0a74d37 fix(coding-agent): stop bordered loader on dispose
fixes #3093
2026-04-14 16:48:54 +02:00
Mario Zechner
7371c30c0a feat(coding-agent): add install telemetry ping controls 2026-04-14 00:21:13 +02:00
Sviatoslav Abakumov
3166dae728 fix(coding-agent): flush queued messages after tree navigation (#3091)
Messages sent during branch summarization are added to the compaction
queue but never flushed when summarization ends. The user sees the
message in the steering queue and has to manually dequeue and resend it.

The fix is to flush the compaction queue after successful tree
navigation, matching the existing behavior of auto-compaction and
`/compact`. If the user jumps to a user message, the queued message is
sent as a prompt, and the jumped-to text is placed in the editor.
2026-04-13 11:03:01 +02:00
Zeremonienmeister Berber Aab
f05f4e8a5f Add all OpenRouter provider routing fields to OpenRouterRouting (#2904)
The OpenRouterRouting interface only had only and order, but the runtime
passes the entire object as-is to the OpenRouter API's provider field.
This means all other fields worked at runtime but had no TypeScript
type-checking, no autocomplete, and no config validation.

This adds all fields from the OpenRouter provider selection API
(https://openrouter.ai/docs/guides/routing/provider-selection):
allow_fallbacks, require_parameters, data_collection, zdr,
enforce_distillable_text, ignore, quantizations, sort, max_price,
preferred_min_throughput, preferred_max_latency.

Also fixes the models.md documentation which had an invalid fallbacks
field in the example (not part of the OpenRouter API), replaces it with
a comprehensive example showing all available fields, and clarifies that
openRouterRouting is sent as-is in the provider field.
2026-04-09 03:08:45 +02:00
Mario Zechner
61015830ed feat(coding-agent): set PI_CODING_AGENT=true env var at startup
closes #2868
2026-04-09 03:03:19 +02:00
Mario Zechner
cca5a3a1a4 fix(coding-agent): hide Earendil startup notice 2026-04-09 00:53:19 +02:00
Mario Zechner
96916f2cad fix(coding-agent): warn on Anthropic subscription auth 2026-04-08 18:46:40 +02:00
Mario Zechner
6d2d03dcc9 fix(coding-agent): add earendil startup announcement 2026-04-08 11:13:40 +02:00
Mario Zechner
f10cce9435 fix(coding-agent): retry ended-without stream errors closes #2892 2026-04-08 02:06:59 +02:00