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
Added comprehensive bug regression test that demonstrates:
1. The bug scenario (old implementation using startsWith() fails)
2. The fix works (new implementation using includes() passes)
Test covers:
- Terminal without image support scenario (bug trigger)
- Both Kitty and iTerm2 image protocols
- Very long lines (300KB+) matching crash scenario
- Integration with tool execution scenarios
- Negative cases (no false positives)
All 347 tests pass including 12 new bug regression tests.
Changed isImageLine() from using startsWith() to includes() to detect
Kitty and iTerm2 image escape sequences anywhere in a line, not just
at the start. This prevents TUI width checks from failing on lines
containing image data, which could cause crashes when rendering tool
results with images (e.g., when reading image files).
Also added comprehensive test coverage for isImageLine() including:
- Both iTerm2 and Kitty protocols
- Regression tests for long lines and terminals without image support
- Negative cases to ensure no false positives
Fixes crash: 'Rendered line exceeds terminal width' when image
escape sequences appear in output.
* fix(tui): blockquote multiline rendering and wrapping
Fix two bugs in blockquote rendering:
1. ANSI codes split incorrectly on newlines - when text tokens contain
newlines, applyDefaultStyle() wrapped the entire string including the
newline in ANSI codes. Any caller splitting by \n would break the codes.
Fixed by splitting text by newlines before styling in renderInlineTokens().
2. Wrapped blockquote lines lost the │ border - long blockquote lines
that wrapped to multiple lines only had the border on the first line.
Fixed by wrapping within the blockquote case and adding border to each line.
* test(tui): add test for inline formatting inside blockquotes
When cursor is on the first visual line and up is pressed, jump to
start of line instead of doing nothing. When cursor is on the last
visual line and down is pressed, jump to end of line instead of doing
nothing. This matches standard behavior in most native text inputs.
- Add isImageLine() to terminal-image.ts with single startsWith check based on detected terminal protocol
- Replace dual includes() checks in tui.ts with imported isImageLine()
- Add image line handling to markdown.ts to skip wrapping and margins for image escapes
- Consolidate Box cache into RenderCache type with childLines/width/bgSample/lines fields
- Use in-place mutation in applyLineResets() to avoid array allocation
* feat(ai): add Vercel AI Gateway routing support
Add vercelGatewayRouting to OpenAICompletionsCompat, parallel to
openRouterRouting. When a model targets ai-gateway.vercel.sh and has
vercelGatewayRouting configured, the openai-completions provider passes
providerOptions.gateway with only/order in the request body.
Changes:
- types.ts: VercelGatewayRouting interface + field on OpenAICompletionsCompat
- openai-completions.ts: buildParams passes providerOptions.gateway,
detectCompat/getCompat include the new field
- model-registry.ts: VercelGatewayRoutingSchema for models.json validation
- test: updated Required<OpenAICompletionsCompat> in test fixture
* docs(coding-agent): add vercelGatewayRouting to custom models documentation
Add Bash/Readline-style character search:
- Ctrl+] enters forward jump mode, awaits next character, jumps to it
- Ctrl+Alt+] does the same but searches backward
- Multi-line search
- Case-sensitive matching
- Pressing the hotkey again cancels; control chars cancel and fall
through
- Add set_session_name command with empty name validation
- Expose sessionName in get_state response
- Add setSessionName() to AgentSession and RpcClient
- Document in docs/rpc.md
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
- 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
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.
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>