Commit Graph

438 Commits

Author SHA1 Message Date
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
Mario Zechner
a8a58ff26b fix(coding-agent): disambiguate duplicate slash commands, fixes #1061 2026-03-23 02:33:52 +01:00
Mario Zechner
4e5af01d73 fix(coding-agent): unify source provenance, closes #1734 2026-03-23 02:02:42 +01:00
Mario Zechner
235b247f1f fix(coding-agent): built-in tools work like extension tools
Export readToolDefinition / createReadToolDefinition and the equivalent built-in ToolDefinition APIs from @mariozechner/pi-coding-agent.
2026-03-22 04:20:38 +01:00
Mario Zechner
e3fee7a511 fix(keybindings): migrate to namespaced ids closes #2391 2026-03-20 01:55:30 +01:00
Mario Zechner
74a46fc7ea fix(coding-agent): queue file mutations across edit and write
closes #2327
2026-03-20 01:55:30 +01:00
xu0o0
31d59f8513 fix(ai): support prompt caching for Bedrock application inference profiles (#2346)
Add AWS_BEDROCK_FORCE_CACHE=1 environment variable support. When the
model ID doesn't contain a recognizable Claude model name, users can
set this variable to force cache point injection.
2026-03-18 11:21:10 +01:00
Mario Zechner
8a8e2a8049 docs(agent): update steering docs for deferred tool execution closes #2330 2026-03-18 03:49:30 +01:00
Mario Zechner
9651e4114d feat(coding-agent): expose local bash operations closes #2299 2026-03-18 00:41:57 +01:00
Mario Zechner
7eb55b08cf fix(coding-agent): reload keybindings on /reload closes #2309 2026-03-17 23:59:45 +01:00
Mario Zechner
7817e9b227 fix(coding-agent): make prompt snippets opt in closes #2285 2026-03-17 12:44:16 +01:00
BillionClaw
1ae0833a72 docs: document xfce4-terminal and terminator keyboard protocol limitations (#2166)
Co-authored-by: BillionClaw <267901332+BillionClaw@users.noreply.github.com>
2026-03-15 18:54:18 +01:00
Mario Zechner
0b48e2518f docs: clarify compat flags for openai-compatible local servers closes #2177 2026-03-15 16:11:40 +01:00
Mario Zechner
03ad7ecee7 fix(ai): add qwen-chat-template compat mode closes #2020 2026-03-14 05:20:27 +01:00