Map unknown finish_reason values (e.g. "end" from Ollama/LM Studio) to
"stop" instead of throwing, since assistant content is already produced.
fixes#2142
0x08 (BS) was treated as plain backspace alongside 0x7f (DEL). On
Windows Terminal, Backspace sends 0x7f and Ctrl+Backspace sends 0x08,
making ctrl+backspace bindings unreachable.
Now 0x08 matches ctrl+backspace (and ctrl+h, same byte) but not plain
backspace. 0x7f remains plain backspace.
fixes#2139
Use pipeline() instead of finished(readable.pipe(writable)) so stream
errors from abort signals are caught as promise rejections. Increase
download timeout from 10s to 120s for multi-MB archives.
closes#2066
* feat(session-manager): allow supplying custom session ID in newSession()
Add optional `id` field to `NewSessionOptions`. When provided, this ID
is used as the session ID instead of generating a random UUID. Existing
callers are unaffected since the field is optional and falls back to
`randomUUID()`.
Closes#2097
* test(session-manager): add tests for custom session ID in newSession()
Verify that newSession() uses the provided id when supplied, falls back
to randomUUID() when omitted, and includes the custom id in the session
header.
The _isRetryableError() regex used literal spaces ("server error",
"internal error") but Codex SSE error events use underscores
("server_error"). Change to .? so both space and underscore (and
direct concatenation) are matched, enabling automatic retry on
transient Codex SSE errors.
fixes#2091
* feat(tui): treat paste markers as atomic segments in editor
Paste markers like `[paste #1 +123 lines]` are now treated as single
atomic units for cursor movement, word navigation, deletion, and
wrapping. Only markers with valid paste IDs (present in the editor's
pastes Map) are treated atomically.
* fix(tui): word-wrap oversized atomic segments in editor
Some OpenAI-compatible providers (e.g., Moonshot/Kimi) return usage
data in chunk.choices[0].usage instead of the standard chunk.usage.
Extract usage parsing into a helper and check choice.usage as fallback.
closes#2017