Commit Graph

451 Commits

Author SHA1 Message Date
Mario Zechner
1cc303d053 fix(coding-agent): add replacement-session callbacks closes #2860 2026-04-22 12:13:54 +02:00
Armin Ronacher
df84e3d22f feat(branding): corporate said we're professionals 2026-04-22 11:04:56 +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
Mario Zechner
759d551527 fix(agent): emit parallel tool completion eagerly\n\ncloses #3503 2026-04-22 00:15:56 +02:00
Aliou Diallo
01ec6e2e7f docs(coding-agent): fix promptGuidelines examples to name tools explicitly (#3489)
promptGuidelines bullets are appended flat to the Guidelines section
with no tool name prefix. Using 'Use this tool when...' is ambiguous
because the LLM cannot tell which tool 'this' refers to. Updated docs
and examples to use explicit tool names instead.
2026-04-21 13:07:42 +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
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
ed89480f20 docs(coding-agent): document async extension factories closes #3469 2026-04-20 22:02:03 +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
74139c3f66 feat(coding-agent): add configurable working indicator closes #3413 2026-04-20 16:28:39 +02:00
Marek Pazik
d4e2e563ae feat(coding-agent): make scoped models and tree filter shortcuts configurable (#3343)
- Add app.models.{save,enableAll,clearAll,toggleProvider,reorderUp,reorderDown}
- Add app.tree.filter.{default,noTools,userOnly,labeledOnly,all,cycleForward,cycleBackward}
- Migrate scoped-models-selector cancel to tui.select.cancel
- Prefer reserved actions on key collision in extension shortcut conflict check
2026-04-20 14:35:30 +02:00
Mario Zechner
d554409b1f fix(coding-agent): split /clone from /fork UX
closes #2962
2026-04-20 14:33:32 +02:00
Mario Zechner
ef1fcfcec2 fix(coding-agent): omit devDependencies when installing packages (fixes #3009) 2026-04-17 01:21:31 +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
d131fcd4ba feat(coding-agent): add after_provider_response hook closes #3128 2026-04-16 20:28:08 +02:00
Armin Ronacher
5b84152b17 revert(tui): temporarily undo Zellij Kitty-query bypass
This reverts 3929e0c181.

The Zellij-specific Kitty-query skip regresses Shift+Enter newline handling in Zellij. Restoring the previous behavior for now while we work on a safer fix that preserves both Alt and modified Enter handling.\n\nContext: https://github.com/badlogic/pi-mono/issues/3259
2026-04-16 20:00:54 +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
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
Armin Ronacher
c623ada3e2 doc: fix another bad code block 2026-04-15 18:44:49 +02:00
Mario Zechner
3929e0c181 fix(tui): skip Kitty query inside Zellij\n\nfixes #3163 2026-04-15 18:43:37 +02:00
Armin Ronacher
9c1e6ef6d3 docs(coding-agent): fix nested code fences in skills docs 2026-04-15 18:40:37 +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
7371c30c0a feat(coding-agent): add install telemetry ping controls 2026-04-14 00:21:13 +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
Aadish Verma
ee2483cd34 fix: update google provider to handle gemma 4 thinking levels and route between MINIMAL and HIGH (#2903)
resolves #2812

Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-04-09 03:08:00 +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
Mario Zechner
d98b563165 docs: add switchSession to ExtensionCommandContext in extensions.md
fixes #2735
2026-04-01 23:51:22 +02:00
Mario Zechner
e2f29b0523 add(coding-agent): add defineTool helper closes #2746 2026-04-01 23:07:14 +02:00
Mario Zechner
d86122cbd3 refactor(coding-agent): add runtime host for session switching closes #2024 2026-03-31 13:49:57 +02:00
warren
0c64c1ce07 docs(coding-agent): clarify /tree active branch ordering (#2695) 2026-03-30 17:07:31 +02:00
warren
84d2b51a2e feat(coding-agent): add label timestamps to the session tree (#2691) 2026-03-30 15:56:37 +02:00
Mario Zechner
cbe1a8b732 fix(agent): simplify state API and update consumers fixes #2633 2026-03-30 12:43:34 +02:00
Mario Zechner
350d17d1f3 Merge branch 'main' of https://github.com/badlogic/pi-mono 2026-03-29 21:09:04 +02:00
Mario Zechner
ef6af5ebbd feat(ai,coding-agent): add faux provider and ModelRegistry factories 2026-03-29 21:08:50 +02:00
Mario Zechner
b5f425ad15 feat(agent,coding-agent): add prepareArguments hook for pre-validation argument preparation
Add AgentTool.prepareArguments and ToolDefinition.prepareArguments hook
that runs before schema validation in the agent loop. This lets tools
silently accept legacy argument shapes from resumed old sessions without
polluting the public schema.

The built-in edit tool uses this to fold legacy top-level oldText/newText
into edits[] when resuming sessions that predate the edits-only schema.

- AgentTool/ToolDefinition: typed prepareArguments returning Static<TParameters>
- agent-loop: prepareToolCallArguments() runs before validateToolArguments()
- edit tool: prepareEditArguments folds legacy fields, validateEditInput is strict
- Documented in extensions.md with edit-tool example
2026-03-29 21:06:22 +02:00
Mario Zechner
7e1dd8880c fix(coding-agent): restore extension input source semantics 2026-03-29 19:28:04 +02:00
warren
e6a302b935 docs(coding-agent): clarify repeated compaction boundary behavior (#2662) 2026-03-29 17:03:56 +02:00
Mario Zechner
7d4faa080d fix: expose abort signal to extensions closes #2660 2026-03-28 22:25:06 +01:00
Mario Zechner
7fe7081745 fix(coding-agent): document mutable tool_call input closes #2611 2026-03-27 04:01:20 +01:00
Mario Zechner
a0734bd162 fix(coding-agent): tighten skill discovery and edit diffs closes #2603 2026-03-27 03:48:28 +01:00
Mario Zechner
7a786d88aa fix(coding-agent): resolve models.json auth per request closes #1835 2026-03-27 00:47:40 +01:00
Mario Zechner
56e27fef1d chore: make pi-test.sh runnable from any directory 2026-03-26 15:43:42 +01:00
Mario Zechner
7e94d36a44 fix(coding-agent): add follow-up docs, changelog, and precedence tests closes #2429 2026-03-26 00:28:30 +01:00
Sam
2b1fc90cd7 feat(coding-agent): Add sessionDir support in settings.json (#2598)
Users can now set sessionDir in global or project settings.json instead
of passing --session-dir on every invocation. CLI flag takes precedence,
then settings.json, then extension hooks.

Closes #2429

Co-authored-by: Sam Collins <81678+smcllns@users.noreply.github.com>
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-03-26 00:03:36 +01:00
Mario Zechner
835296b1d7 fix(coding-agent): expose rpc context usage closes #2550 2026-03-24 03:08:51 +01:00