Commit Graph
100 Commits
Author SHA1 Message Date
Mario Zechner 469fb5d27c fix(ai): OAuth login/refresh now respects HTTP proxy env vars
Extracted HTTP proxy setup to shared module and imported it from both
stream.ts and oauth/index.ts. This ensures fetch() calls during OAuth
flows (token exchange, refresh, project discovery) go through the proxy.

fixes #1132
2026-02-01 19:08:13 +01:00
Mario Zechnerandwarren 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
Mario Zechner 47308d3f4f Update @mariozechner/clipboard to 0.3.2 (adds linux-arm64-musl support) 2026-02-01 18:23:23 +01:00
Mario Zechner 3c687b427e fix(skills): add path resolution guidance to skills preamble
Models were resolving relative paths in skill files from cwd instead of
the skill directory. Added explicit instruction that relative paths are
resolved from the skill directory (parent of the location path).

Fixes #1136
2026-02-01 18:06:13 +01:00
Mario Zechner 67dbe7c6b7 docs(coding-agent): add PI_PACKAGE_DIR to changelog and documentation
Adds changelog entry, README env var table entry, and CLI help text for
the PI_PACKAGE_DIR environment variable added in #1153.
2026-02-01 18:03:42 +01:00
Mario Zechner 8306b3bc20 docs(coding-agent): improve models.md with minimal example and defaults
- Add minimal example showing only required fields for local models
- Rename 'Basic Example' to 'Full Example' showing all fields
- Add 'Default' column to model configuration table
- Clarify that apiKey is required but ignored by Ollama
2026-02-01 17:51:24 +01:00
Mario Zechner c8b8f043a7 fix(coding-agent): make models.json model fields optional with defaults
Model definitions now only require 'id'. All other fields have sensible
defaults for local models (Ollama, LM Studio, etc.):
- name: defaults to id
- reasoning: defaults to false
- input: defaults to ["text"]
- cost: defaults to {input: 0, output: 0, cacheRead: 0, cacheWrite: 0}
- contextWindow: defaults to 128000
- maxTokens: defaults to 16384

Existing configs that specify all fields continue to work unchanged.

Fixes #1146
2026-02-01 17:49:19 +01:00
Mario Zechner 3830d74d22 fix(coding-agent): export discoverAndLoadExtensions from package
closes #1148
2026-02-01 17:47:01 +01:00
Mario Zechner bd00d2fbca fix(coding-agent): pi update not updating packages without args
fixes #1151
2026-02-01 17:41:36 +01:00
Mario Zechner 8f7ef85833 fix(ai): pass through cacheRetention in buildBaseOptions
fixes #1154
2026-02-01 17:37:45 +01:00
Mario Zechner b86fae351a Update Discord link 2026-02-01 17:04:02 +01:00
Mario Zechner 43be54c237 Add [Unreleased] section for next cycle 2026-02-01 09:36:24 +01:00
Mario Zechner 7678b075fb Release v0.50.9 2026-02-01 09:35:42 +01:00
Mario Zechner 55ce7e84ef chore: Fix import order 2026-02-01 09:34:44 +01:00
Mario Zechner b0e1672da2 docs(coding-agent): add cacheRetention changelog 2026-02-01 09:33:43 +01:00
Mario Zechner abfd04b5c5 feat(ai): add cacheRetention stream option 2026-02-01 09:32:10 +01:00
Mario Zechner e9ca0be769 feat(ai): add PI_AI_ANTIGRAVITY_VERSION env var override
Allows users to override the Antigravity User-Agent version when Google
updates their version requirements, avoiding the need to wait for a
package release.

Fixes #1129
2026-02-01 09:32:10 +01:00
Mario Zechner aa83170e0f Add [Unreleased] section for next cycle 2026-02-01 02:34:06 +01:00
Mario Zechner 4baa42cb6d Release v0.50.8 2026-02-01 02:33:23 +01:00
Mario Zechner 025b7bec7a fix(coding-agent): add spacer before context output 2026-02-01 02:24:51 +01:00
Mario Zechner 3b8d0a8921 feat(coding-agent): add resources_discover hook 2026-02-01 02:20:35 +01:00
Mario Zechner 6b6030d549 chore: audit changelog entries 2026-02-01 02:20:35 +01:00
Mario Zechner 39d69f42fd Merge branch 'merge/pr-940' 2026-02-01 01:53:26 +01:00
Mario Zechner 7d632ba1c3 chore: update changelog and docs for qwen extension 2026-02-01 01:52:53 +01:00
Mario Zechner c27168840c test(tui): cover non-qwerty kitty base layout fallback 2026-02-01 01:33:28 +01:00
Mario Zechner 6e4508f129 feat(coding-agent): threaded sort mode and compact format for /resume (#1124)
Adds 'Threaded' as a new sort mode (now default) that displays sessions
in a tree structure based on parent-child relationships. Compact one-line
format with message count and age right-aligned for clean title alignment.

Closes #1108
2026-02-01 01:10:58 +01:00
Mario Zechner 2a631a2488 feat(coding-agent): threaded sort mode and compact format for /resume
Adds 'Threaded' as a new sort mode (now default) that displays sessions
in a tree structure based on parent-child relationships. Compact one-line
format with message count and age right-aligned for clean title alignment.

Closes #1108
2026-02-01 01:10:36 +01:00
Mario Zechner 030a61d88c feat: add maxDelayMs setting to cap server-requested retry delays
When a provider (e.g., Google Gemini CLI) requests a retry delay longer
than maxDelayMs (default: 60s), the request fails immediately with an
informative error instead of waiting silently for hours.

The error is then handled by agent-level auto-retry, which shows the
delay to the user and allows aborting with Escape.

- Add maxRetryDelayMs to StreamOptions (packages/ai)
- Add maxRetryDelayMs to AgentOptions (packages/agent)
- Add retry.maxDelayMs to settings (packages/coding-agent)
- Update _isRetryableError to match 'retry delay' errors

fixes #1123
2026-02-01 00:50:41 +01:00
Mario Zechner 1bd68327f3 fix: make pre-commit hook fail on lint warnings, fix template literal warnings
- Add --error-on-warnings to biome check in root and web-ui package.json
- Convert string concatenation to template literals in daxnuts.ts
- Convert string concatenation to template literals in test file

Fixes #1103
2026-02-01 00:25:57 +01:00
Mario Zechner 7eae0a7d30 fix(coding-agent): make setThinkingLevel idempotent
switchSession() was appending spurious thinking_level_change entries
to session log on resume because setThinkingLevel() unconditionally
persisted. Now only persists if the level actually changes.

fixes #1118
2026-02-01 00:14:49 +01:00
Mario Zechner c9fa28e626 fix: override fast-xml-parser to 5.3.4 to resolve CVE 2026-01-31 23:48:22 +01:00
Mario Zechner 0ece01b51e chore(coding-agent): add dev script for watch mode 2026-01-31 23:24:18 +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 f0eda2dfda Add [Unreleased] section for next cycle 2026-01-31 01:09:12 +01:00
Mario Zechner c50a0b8b6d Release v0.50.7 2026-01-31 01:08:29 +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
Mario Zechner 022b20f364 Add [Unreleased] section for next cycle 2026-01-30 22:03:55 +01:00
Mario Zechner f8d43ce02c Release v0.50.6 2026-01-30 22:03:14 +01:00
Mario Zechner d91cdc5f0c docs: add missing changelog entries for v0.50.5..HEAD
- tui: add #1095 content shrink fix (by @marckrenn)
- tui: add isImageLine perf optimization
- coding-agent: cross-package duplication for #1095, #1099
2026-01-30 22:02:17 +01:00
Mario Zechner 836e852af1 Fixes #1099 2026-01-30 18:19:16 +01:00
Mario Zechner 99281e5913 feat(coding-agent): add ctx.getSystemPrompt() to extension context
Adds a method to access the effective system prompt (after any per-turn
extension modifications) from the extension context.

Implementation:
- Add systemPrompt getter to AgentSession reading from agent.state.systemPrompt
- Wire getSystemPrompt through ExtensionContextActions to ExtensionRunner
- Add getSystemPrompt to interactive-mode's shortcut context
- Update docs with ctx.getSystemPrompt() section
- Add system-prompt-header.ts example
- Add example to docs reference table

Closes #1098
2026-01-30 17:44:25 +01:00
Mario Zechner abd0c47b03 perf(tui): use startsWith short-circuit in isImageLine 2026-01-30 17:07:43 +01:00
Mario Zechner 0091857f8b Add [Unreleased] section for next cycle 2026-01-30 11:48:16 +01:00
Mario Zechner 01d521c625 Release v0.50.5 2026-01-30 11:47:35 +01:00
Mario Zechner 012d5b488c style: format test file 2026-01-30 11:46:53 +01:00
Mario Zechner 283ad4d370 fix(tui): isImageLine should detect image escape sequences anywhere in line (#1091) 2026-01-30 11:46:35 +01:00
Mario Zechner 2cee7e17de Add [Unreleased] section for next cycle 2026-01-30 03:27:09 +01:00
Mario Zechner 3f5fe42d37 Release v0.50.4 2026-01-30 03:26:23 +01:00
Mario Zechner 0e2f90b734 feat(coding-agent): add daxnuts easter egg 2026-01-30 03:25:00 +01:00
Mario Zechner 355bc5adc3 docs: add missing changelog entries for commits since v0.50.3
- ai: Vercel AI Gateway routing support (#1051)
- tui: Ctrl+B/Ctrl+F keybindings (#1053), character jump navigation (#1074),
  line boundary navigation (#1050), performance optimizations (#1084)
- coding-agent: set_session_name RPC (#1075), config selector folder names (#1064)
- Cross-package duplication of tui/ai changes to coding-agent
- Add New Features section to coding-agent changelog
2026-01-30 03:25:00 +01:00
Mario Zechner 9ee58fdea9 feat(coding-agent): add OSC 52 clipboard support for SSH/mosh sessions
Fixes #1069
2026-01-30 03:25:00 +01:00
Mario Zechner cb08758696 feat(coding-agent): add "none" option to doubleEscapeAction setting
Allows disabling double-escape behavior entirely for users who
accidentally trigger the tree/fork selector.

Fixes #973
2026-01-30 01:20:14 +01:00
Mario Zechner 0587f045d9 docs(coding-agent): add changelog for tool arg defaults 2026-01-30 01:16:24 +01:00
Mario Zechner 8f7cdc24fd docs(ai): add changelog for tool arg defaults 2026-01-30 01:15:36 +01:00
Mario Zechner af813f9048 fix(ai): default tool call arguments
fixes #1065
2026-01-30 01:13:16 +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 c6557b93be docs(tui): note quoted autocomplete fix 2026-01-30 00:29:33 +01:00
Mario Zechner f181385859 fix(tui): avoid duplicating quotes during autocomplete 2026-01-30 00:26:24 +01:00
Mario Zechner 1665636fbe fix(tui): close quoted directory paths during autocomplete 2026-01-30 00:20:14 +01:00
Mario Zechner dc8539a001 fix(tui): support quoted paths with spaces in autocomplete
Fixes #1077
2026-01-30 00:11:12 +01:00
Mario Zechner 52532c7c00 fix(ai): update Antigravity User-Agent to 1.15.8
fixes #1079
2026-01-29 23:10:49 +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
Mario Zechner df667b510a Release v0.50.3 2026-01-29 04:19:02 +01:00
Mario Zechner b78b21c588 docs(coding-agent): update changelog with missing fix entry and new features section
- Add New Features section for Kimi For Coding provider
- Add fix entry for resource ordering when resuming sessions
2026-01-29 04:16:55 +01:00
Mario Zechner 87ab5c5c3b feat(ai): add Kimi For Coding provider support
- Add kimi-coding provider using Anthropic Messages API
- API endpoint: https://api.kimi.com/coding/v1
- Environment variable: KIMI_API_KEY
- Models: kimi-k2-thinking (text), k2p5 (text + image)
- Add context overflow detection pattern for Kimi errors
- Add tests for all standard test suites
2026-01-29 04:12:28 +01:00
Mario Zechner d1e33599f6 fix(coding-agent): show resources before messages when resuming session
Swapped order of initExtensions() and renderInitialMessages() in init()
so loaded resources (Context, Skills, Prompts, Extensions) appear at the
top of the chat instead of at the bottom when resuming a session.
2026-01-29 03:55:44 +01:00
Mario Zechner ded2d6399e Add [Unreleased] section for next cycle 2026-01-29 03:24:32 +01:00
Mario Zechner 9bb627a524 Release v0.50.2 2026-01-29 03:23:41 +01:00
Mario Zechner 58aa7096dd docs: add missing changelog entries for v0.50.1..HEAD commits 2026-01-29 03:22:00 +01:00
Mario Zechner 2ad4825653 fix: autocompleteMaxVisible setting not persisting
Missing markModified() call caused the setting to be lost on reload.
2026-01-29 03:20:28 +01:00
Mario ZechnerandColin Mason bea3ab637f feat: add autocompleteMaxVisible setting for configurable dropdown height (#972)
Fixes #916

Adds an autocompleteMaxVisible setting (range 3-20, default 5) to control how many items are visible in the editor's autocomplete dropdown.

Co-authored-by: Colin Mason <masonc789@gmail.com>
2026-01-29 03:17:11 +01:00
Mario Zechner 06a7fedda5 docs(coding-agent): add changelog entry for #1039 2026-01-29 02:52:43 +01:00
Mario Zechner c808de605a feat(ai): add Hugging Face provider support
- Add huggingface to KnownProvider type
- Add HF_TOKEN env var mapping
- Process huggingface models from models.dev (14 models)
- Use openai-completions API with compat settings
- Add tests for all provider test suites
- Update documentation

fixes #994
2026-01-29 02:40:14 +01:00
Mario Zechner f3cfb7e1ae feat: add /files command to list session file operations 2026-01-29 02:25:59 +01:00
Mario Zechner 1b6a147579 feat(ai): add PI_CACHE_RETENTION env var for extended prompt caching
Adds support for extended cache retention via PI_CACHE_RETENTION=long:
- Anthropic: 5m -> 1h TTL
- OpenAI: in-memory -> 24h retention

Only applies to direct API calls (api.anthropic.com, api.openai.com).
Proxies and other providers are unaffected.

fixes #967
2026-01-29 02:22:06 +01:00
Mario Zechner 605f6f494b fix(ai): normalize pipe-separated tool call IDs for cross-provider handoff
- Handle pipe-separated IDs from OpenAI Responses API in openai-completions provider
- Strip trailing underscores after truncation in openai-responses-shared (OpenAI Codex rejects them)
- Add regression tests for tool call ID normalization

fixes #1022
2026-01-29 01:28:12 +01:00
Mario Zechner 4f004adefa fix(coding-agent): reset retry counter after each successful LLM response
Previously, within a single tool-use turn, rate limit retries would
accumulate across separate LLM calls. For example, if each of 3 tool
calls hit a 429 and retried once, the counter would show '3/3' and fail
even though each individual retry succeeded.

Now the counter resets immediately when a successful (non-error)
assistant message arrives, so each LLM call gets a fresh set of retries.

Fixes #1019
2026-01-29 01:12:29 +01:00
Mario Zechner 25707f9ad4 fix(ai): 429 rate limit errors no longer trigger auto-compaction
429 (Too Many Requests) was incorrectly classified as context overflow,
triggering compaction instead of retry with backoff. The original logic
assumed token-based rate limiting correlates with context overflow, but
these are different concepts:

- Rate limiting (429): requests/tokens per time period (throughput)
- Context overflow: single request exceeds context window (size)

Now 429 errors are handled by the existing retry logic with exponential
backoff, while 400/413 remain as potential context overflow indicators.

fixes #1038
2026-01-29 00:43:38 +01:00
Mario Zechner a373dce747 fix(coding-agent): improve thinking defaults in footer 2026-01-29 00:33:45 +01:00
Mario ZechnerandJason Ish 81be81328c feat(tui,coding-agent): add shell-style keybindings alt+b, alt+f, ctrl+d
- Add alt+b/alt+f as alternative bindings for cursorWordLeft/cursorWordRight
- Add ctrl+d as alternative binding for deleteCharForward
- Fix ctrl+d in custom editor to perform delete when text is present
  (previously it was always consumed, even with non-empty input)

Closes #1043

Co-authored-by: Jason Ish <ish@unx.ca>
2026-01-29 00:21:39 +01:00
Mario Zechner 5ef79459dc Closes #1041, incorrect .md file name in warning messages. 2026-01-29 00:16:50 +01:00
Mario Zechner d21cbde87f fix(coding-agent): empty array in package filter now disables all resources
fixes #1044
2026-01-29 00:12:42 +01:00
Mario Zechner 8b5c81f21f fix(ai): preserve input token counts from message_start in Anthropic provider
Proxies like Portkey omit input_tokens in message_delta events (it's nullable
per the SDK). The previous code unconditionally overwrote usage fields, causing
input token counts to reset to 0.

Now only updates usage fields when they are present (not null), preserving
the correct input_tokens value captured from message_start.

Fixes #1045
2026-01-29 00:06:51 +01:00
Mario Zechner 4f9deddd47 fix(ai): detect DeepSeek URLs and disable unsupported developer role
fixes #1048
2026-01-28 23:55:54 +01:00
Mario Zechner 2cc2544809 Add [Unreleased] section for next cycle 2026-01-27 00:15:42 +01:00
Mario Zechner 29c59d79ba Release v0.50.1 2026-01-27 00:14:58 +01:00
Mario Zechner bec72c428c docs(coding-agent): clarify dependency categories 2026-01-27 00:13:54 +01:00
Mario Zechner 484b605ca0 docs(coding-agent): clarify pi package dependency bundling 2026-01-27 00:10:58 +01:00
Mario Zechner 6159eb4be8 chore: update changelogs 2026-01-27 00:08:06 +01:00
Mario Zechner ee7d03cf52 fix(coding-agent): prune empty git dirs on remove 2026-01-26 23:58:14 +01:00
Mario Zechner a5f603d704 fix(diff): keep picker open after selection 2026-01-26 23:04:32 +01:00
Mario Zechner 5dbeadae05 fix(coding-agent): bind extension UI context on startup 2026-01-26 23:00:48 +01:00
Mario Zechner f86e3c3103 fix(coding-agent): sync agent state after newSession setup callback
Move setup callback handling from interactive/rpc modes into AgentSession.newSession().
After setup() runs, sync agent state via replaceMessages() so the LLM has context
and the UI renders the messages properly.

fixes #968
2026-01-26 22:25:09 +01:00
Mario Zechner 0134a2a73d fix(coding-agent): handle force-pushed git extensions in pi update
Simplified to use @{upstream} instead of branch detection.
Moved changelog entry to [Unreleased].

Closes #961
2026-01-26 22:02:17 +01:00
Mario Zechner 3c252d50f5 docs(coding-agent): add placement note for extension hot-reload 2026-01-26 21:55:57 +01:00
Mario Zechner 2bbc1a7659 Add [Unreleased] section for next cycle 2026-01-26 16:55:24 +01:00
Mario Zechner 453e104d3a Release v0.50.0 2026-01-26 16:54:37 +01:00
Mario Zechner 1c7c5e10e0 add redraws helper extension for TUI development 2026-01-26 16:53:49 +01:00
Mario Zechner d2de6d0830 docs(coding-agent): expand pi documentation references in system prompt
- Add instruction to read pi .md files completely and follow cross-references
- Add more doc references: prompt-templates, keybindings, sdk, custom-provider, models, packages
- Reorder entries (custom providers last, prompt templates after skills)
2026-01-26 16:52:32 +01:00
Mario Zechner a6f9c3cf0d fix(tui): fix scrollback overwrite when appending lines past viewport
Appended lines were not committed to terminal scrollback because the
renderer used cursor movement (CSI B) and carriage return without
linefeed. This caused earlier content to be overwritten when the
viewport filled up.

Changes:
- For appended lines, emit \r\n to create real scrollback lines
- When target row is below viewport, scroll with \r\n before positioning
- Add PI_TUI_WRITE_LOG env var for debugging raw ANSI output
- Add fullRedraws readonly property to TUI class
- Add viewport-overwrite-repro.ts test script

fixes #954
2026-01-26 16:51:28 +01:00