Files
splinter/include
Konrad 5c07b32478 splinter: streaming, thinking, and three defects the real model exposed
Streaming: the OpenAI transport reads SSE over curl -N and reports deltas as
they arrive. Text goes to the chat pane, a tool-call start to the sidebar, and
a reasoning model's reasoning_content is shown dimmed above the answer instead
of being hidden - which is what made a 143 s turn look like a dead terminal.

Measured against kontron (Qwen3.6-35B, strata-poly): first byte at 11.6 s on a
short question, text growing visibly in the TUI at 7 s and 17 s on a longer one.

test_sse drives the accumulator with recorded lines: plain text, a tool call
split over three chunks, two calls in one turn, a broken data line, keepalives.
Twelve test binaries green.

Defects found while proving it, each fixed or stated:

- typed umlauts were dropped: the input loop accepted ASCII only. Every byte
  above 0x1f is kept now and the line is redrawn from the buffer.
- setlocale() was never called, so curses had no encoding at all.
- the vendored NetBSD curses emits Latin-1 bytes for wide characters (ü ->
  0xFC) while ncurses passes UTF-8 through; proven with a raw pty dump of both.
  The UI therefore transliterates for display (gruen) and the conversation and
  session log keep the exact UTF-8. The library defect is written down, not
  papered over.
- an answer longer than the screen was skipped by the viewport and the chat
  looked empty; draw_history now shows the bottom of the content, including
  entries taller than the window.
2026-11-07 18:55:16 +00:00
..