Skip to content

v0.3.18

Choose a tag to compare

@AXEUS5346 AXEUS5346 released this 01 Jul 15:09
· 15 commits to main since this release

v0.3.18 — SSE Streaming, Retry Logic, Formula Split

Backend

  • SSE streaming chat — new POST /{session_id}/chat/stream endpoint with chat_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__() with send(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.toml suppressing 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 boilerplate
  • fallbackToSync() — extracted from handleSend, 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