Repository navigation
v0.3.18
v0.3.18 — SSE Streaming, Retry Logic, Formula Split
Backend
- SSE streaming chat — new
POST /{session_id}/chat/streamendpoint withchat_completion_stream()async generator - Retry with backoff — 3 retries with exponential backoff (1s→2s→4s) on 5xx, timeout, connection errors
- httpx streaming fix — replaced
stream().__aenter__()withsend(req, stream=True)(root cause of 'Failed to get response') - Lazy API key —
_get_api_key()reads env lazily, fixing load_dotenv race condition - Tool call refactors — extracted
_safe_int_id(),_parse_note_tool_call(),_parse_canvas_tool_call()(C901 from 25 to below threshold) - Lint clean — ruff passes with new
ruff.tomlsuppressing intentional patterns
System Prompts
- Formula node split — formula nodes now contain ONLY the expression (e.g.,
F = ma), separate note nodes explain variable definitions and usage - Mandatory connections — every formula MUST connect to its explanation note
- Updated Newton's Laws and Photosynthesis examples to show the pattern
Frontend
- Letter-by-letter streaming —
sendMessageStream()SSE reader with character-by-character rendering - Non-streaming fallback — automatic fallback to
sendMessage()on stream errors checkOk()helper — every API error now includes HTTP status (e.g.,send message (500))fetchWithTimeout()— eliminates 3x AbortController boilerplatefallbackToSync()— extracted fromhandleSend, kills 28-line duplication- 16 silent catches now log to console.error across 7 files
- Dead code removed — 5 unused exports deleted (ChainOfThought*, badgeVariants, BaseNodeFooter, generateTTS, listDeletedSessions, restoreSession)
Commits
0ed88af chore: bump version to 0.3.18
9763952 feat: frontend streaming, error handling, and dead code removal
e22c5c2 feat: SSE streaming chat, retry logic, and formula node split
c4f99d8 refactor: backend lint fixes, lazy imports, and ponytail comments