Commit graph

1979 commits

Author SHA1 Message Date
Mario Zechner
3eb91d223f fix(ai): Google thinking detection + remove unsupported id fields (#631) 2026-01-11 19:26:07 +01:00
Mario Zechner
667cf5aa6e docs(ai): add changelog entry for Google thinking fix 2026-01-11 19:26:00 +01:00
theBucky
a315cfe813 fix(ai): complete textSignature round-trip for Google providers
- Store thoughtSignature on text blocks during streaming (all 3 providers)
- Replay textSignature as thoughtSignature in convertMessages
- Remove redundant conditional since retainThoughtSignature handles undefined

Per Google docs, text part signatures are optional but recommended for
high-quality reasoning in multi-turn conversations.
2026-01-11 19:25:38 +01:00
theBucky
4f757fbe23 fix(ai): correct Google thinking detection and remove unsupported id fields
- isThinkingPart now only checks thought === true, not thoughtSignature
- thoughtSignature is for context replay and can appear on any part type
- Store thoughtSignature on text blocks as textSignature for proper replay
- Remove id from functionCall/functionResponse (unsupported by Vertex/Cloud Code Assist)

Refs: https://ai.google.dev/gemini-api/docs/thought-signatures
Co-authored-by: Amp <amp@ampcode.com>
2026-01-11 19:25:38 +01:00
Mario Zechner
f5e97427ce chore: add changelog entry for resume keybindings 2026-01-11 19:23:04 +01:00
Aos Dabbagh
23a4fd1159 fix: load keybindings before --resume session picker
The problem: I wanted to be able to select my session (either from
`/resume` or `--resume`) with different keybindings.

The issue: when running `pi --resume`, custom keybindings from
`~/.pi/agent/keybindings.json` were not being applied to the session
picker. This happened because `KeybindingsManager.create()` was only
called when `InteractiveMode` initialized, but the session picker runs
before that in `main.ts`.

The session picker uses `getEditorKeybindings()` for navigation
(selectUp/selectDown etc.), which returns the global default keybindings
if `setEditorKeybindings()` hasn't been called yet.

Fix: Call `KeybindingsManager.create()` inside the `--resume` block
before showing the session picker. This loads user keybindings and sets
them globally.

The current fix results in double-init of keybindings when entering
interactive mode which _should_ be harmless, since it's the same same
config loaded twice, but is minimal and only affects the `--resume`
path.

I considered passing keybindings from `main()` to `InteractiveMode` -
it's cleaner but requires API changes.

Also documented the `select*` keybindings in README.md.
2026-01-11 19:22:52 +01:00
Mario Zechner
da6a2fb5ea test(tui): cover style reset cases 2026-01-11 19:01:16 +01:00
Mario Zechner
ae134e7e02
Merge pull request #632 from thomasmhr/patch-1
Fix header level for tool usage rules
2026-01-11 18:59:16 +01:00
Mario Zechner
6d495348c5 fix(tui): reset styles per line 2026-01-11 18:36:48 +01:00
Thomas Mahier
709081062c
Fix header level for tool usage rules 2026-01-11 18:15:21 +01:00
Mario Zechner
741262d89d Merge model-select-hook: add model_select extension hook (#628) 2026-01-11 18:12:54 +01:00
Mario Zechner
a20c6efe17 feat(coding-agent): add model_select extension hook
Fires when the model changes via /model command, model cycling (Ctrl+P),
or session restore. Includes source field and previousModel.

Add model-status.ts example extension demonstrating status bar updates.

closes #628
2026-01-11 18:12:46 +01:00
Marc Krenn
a1696e338b docs(coding-agent): add PR link and author to CHANGELOG 2026-01-11 18:12:09 +01:00
Marc Krenn
943654cc93 docs(coding-agent): document model_select hook
Add CHANGELOG entry and extension documentation for the new model_select
event that fires on model changes via /model, Ctrl+P, or session restore.
2026-01-11 18:12:09 +01:00
Marc Krenn
c41714662a feat(coding-agent): add model_select extension hook
Fires when model changes via setModel(), cycleModel(), or session restore.
Includes source field ("set" | "cycle" | "restore") and previous model.
2026-01-11 18:12:09 +01:00
Mario Zechner
5db7cc693b fix: Model selector fuzzy search matches id + provider
Restores original behavior from 3de8e075. Allows multi-token queries
like 'opus anthropic' to match Anthropic models.
2026-01-11 18:04:57 +01:00
Mario Zechner
3592f9b7c9 fix: Model selector fuzzy search matches provider + id
Allows queries like 'anthropic opus' to match Anthropic models.
Previously only matched against model ID, so 'anthropic' token failed.
2026-01-11 18:00:52 +01:00
Mario Zechner
9655907624 feat: Add skill slash commands and fuzzy matching for all commands
- Skills registered as /skill:name commands for quick access
- Toggle via /settings or skills.enableSkillCommands in settings.json
- Fuzzy matching for all slash command autocomplete (type /skbra for /skill:brave-search)
- Moved fuzzy module from coding-agent to tui package for reuse

Closes #630 by @Dwsy (reimplemented with fixes)
2026-01-11 17:56:11 +01:00
Mario Zechner
92486e026c Add session transcript analysis script
- Extracts user/assistant messages from session files for a given cwd
- Splits into ~100k char files to fit in context
- Spawns pi subagents to analyze each file for recurring patterns
- Compares against existing AGENTS.md to mark NEW vs EXISTING patterns
- Final aggregation step creates FINAL-SUMMARY.txt with consolidated findings
- Shows progress with tool call args during analysis
2026-01-11 17:28:39 +01:00
Jian Zhang
b57eafaadb fix(tui): ensure cursor moves to end of content on exit to prevent visual artifacts 2026-01-11 17:25:26 +01:00
mom
9ddbafb03a fix(coding-agent): update test expectations after registerFlag -- prefix removal 2026-01-11 11:44:19 +00:00
mom
08aa7a7dad docs(coding-agent): add attribution for PR #625 2026-01-11 11:38:18 +00:00
Mario Zechner
925ed89af1
Merge pull request #625 from nicobailon/feat/set-working-message
feat: add ctx.ui.setWorkingMessage() extension API
2026-01-11 12:36:50 +01:00
Nico Bailon
271b49da3c feat: add ctx.ui.setWorkingMessage() extension API
Allows extensions to customize the streaming loader message.
Pass undefined to restore default.
2026-01-10 21:11:44 -08:00
Mario Zechner
016a24e9a1 Add [Unreleased] section for next cycle 2026-01-11 04:11:34 +01:00
Mario Zechner
31fe16f2e7 Release v0.42.5 2026-01-11 04:10:49 +01:00
Mario Zechner
fa8076bb3d docs(coding-agent): add tui fixes to changelog 2026-01-11 04:07:03 +01:00
Mario Zechner
178a3a563f fix(tui): handle split Shift+Enter in VS Code 2026-01-11 04:03:42 +01:00
Mario Zechner
f0fd0a7d6a fix(mom): use coding-agent SessionManager instead of custom MomSessionManager
Removes MomSessionManager which was missing methods expected by AgentSession
(appendMessage, getBranch, etc.), causing runtime crashes.

Now uses the standard SessionManager from coding-agent with a fixed context.jsonl
path per channel. The syncLogToSessionManager function handles syncing messages
from log.jsonl using SessionManager's public API.

Ref #595
2026-01-11 04:03:42 +01:00
Mario Zechner
6db2d0770a
Merge pull request #621 from kaofelix/fix-register-flag-docs
fix(coding-agent): remove -- from registerFlag calls
2026-01-11 03:19:29 +01:00
Ogulcan Celik
eb15f326c1 fix(tui): skip key release/repeat check for bracketed paste content
Pasted content containing Kitty key release patterns (e.g., :3F in bluetooth
MAC addresses) was incorrectly detected as a key release event and dropped.

The fix checks for bracketed paste markers before running pattern checks.
Also applied to isKeyRepeat() for consistency.

Closes #623
2026-01-11 03:14:59 +01:00
Ogulcan Celik
df3a220d6b fix(tui): reduce flicker by only re-rendering changed lines (#617) 2026-01-11 03:02:35 +01:00
Mario Zechner
3bb115a39c fix(tui): cursor position tracking when content shrinks with unchanged lines 2026-01-11 03:00:23 +01:00
Mario Zechner
d7394eb109 Fix TUI rendering with wrong dimensions after suspend/resume
- Send SIGWINCH to self on terminal start to refresh stale dimensions (Unix only)
- Change requestRender(true) to set previousWidth = -1 to trigger widthChanged
- Update first render condition to skip when widthChanged is true

Fixes #599
2026-01-11 02:47:28 +01:00
Mario Zechner
019ad0ec11 Fix /changelog adding 'What's New' to footer permanently
fixes #613
2026-01-11 02:23:04 +01:00
Kao Félix
6d60302646 fix(coding-agent): remove -- from registerFlag calls
This was causing the agent sometimes to pick up on the incorrect syntax when
asked to write extensions with flags
2026-01-11 02:21:15 +01:00
Mario Zechner
0d2731cf6b Remove built-in tool override warning, closes #615 2026-01-11 02:20:32 +01:00
Mario Zechner
2787638561 Remove built-in tool override warning, closes #615 2026-01-11 02:20:32 +01:00
Mario Zechner
65b72cc514
Merge pull request #618 from tmustier/fix-codex-stream-originator
fix(ai): update codex stream originator test
2026-01-11 01:58:54 +01:00
Thomas Mustier
d3a457dc95 fix(ai): update codex stream originator test 2026-01-10 21:54:21 +00:00
Mario Zechner
bd82d06de2
Merge pull request #614 from mitsuhiko/auto-complete-model
Add support for /model autocomplete
2026-01-10 22:07:49 +01:00
Armin Ronacher
5cf0490383 Add support for /model autocomplete 2026-01-10 20:32:16 +01:00
Mario Zechner
c95b132fcc Add [Unreleased] section for next cycle 2026-01-10 13:56:55 +01:00
Mario Zechner
345de59833 Release v0.42.4 2026-01-10 13:56:11 +01:00
Mario Zechner
7293d7cb82 fix(coding-agent): UTF-8 corruption in remote bash execution
Applied streaming TextDecoder fix to executeBashWithOperations(), matching
the fix in executeBash() from PR #433. Remote execution (SSH, containers)
was still using Buffer.toString() which corrupts multi-byte UTF-8 sequences
split across chunk boundaries.

fixes #608
2026-01-10 13:55:02 +01:00
Mario Zechner
ec83d91473 fix(ai): resolve OAuth tool names via context 2026-01-10 13:45:08 +01:00
Mario Zechner
79ed50e0db chore(coding-agent): add changelog for bash hint 2026-01-10 13:36:13 +01:00
Mario Zechner
52e2b4e780
Merge pull request #610 from tallshort/fix/expand-hint
fix(coding-agent): show '(ctrl+o to collapse)' hint for bash output when expanded
2026-01-10 13:34:30 +01:00
Mario Zechner
3743ebc03d Add [Unreleased] section for next cycle 2026-01-10 13:28:10 +01:00
Mario Zechner
2a04b0fb28 Release v0.42.3 2026-01-10 13:27:28 +01:00