Skip to content
This repository was archived by the owner on Mar 21, 2026. It is now read-only.

feat: SSE streaming responses with Chat UI - #49

Merged
limaronaldo merged 2 commits into
mainfrom
feat/streaming-responses
Dec 7, 2025
Merged

feat: SSE streaming responses with Chat UI#49
limaronaldo merged 2 commits into
mainfrom
feat/streaming-responses

Conversation

@limaronaldo

Copy link
Copy Markdown
Owner

Summary

Implements Server-Sent Events (SSE) streaming for real-time LLM responses, completing Linear issue RML-19.

Changes

Dashboard Backend (streaming feature)

  • SSE endpoint /api/inference/stream for streaming LLM responses
  • StreamInferenceRequest and StreamEventOutput types
  • streaming_routes() helper for router integration
  • 3 unit tests for message/event conversion

Agent Studio (Chat Page)

  • New /chat route with streaming UI
  • Real-time message display using ReadableStream API
  • Message bubbles for user/assistant
  • Streaming state indicator
  • Error handling and display
  • Enter key support for sending

Technical Details

  • Uses async_stream and tokio_stream for SSE generation
  • Browser consumes SSE via fetch + ReadableStreamDefaultReader
  • Added web-sys features: TextDecoder, ReadableStream, ReadableStreamDefaultReader

Testing

  • Dashboard streaming tests: 3 passed
  • Studio compiles successfully
  • Clippy clean (only minor existing warnings)

Linear

Closes RML-19

- Add streaming module with SSE support for real-time LLM responses
- StreamInferenceRequest for accepting messages, tools, temperature
- StreamEventOutput enum matching provider StreamEvent types
- POST /api/inference/stream - SSE endpoint for streaming
- POST /api/inference/chat - non-streaming completion endpoint
- streaming_routes() helper to add routes to Router
- StreamingState to hold LLMBackend and dashboard state
- 3 unit tests for message conversion and serialization
- Optional 'streaming' feature flag
- Add chat.rs page component with real-time streaming UI
- Integrate with dashboard SSE endpoint /api/inference/stream
- Use ReadableStream API for SSE consumption in browser
- Add web-sys features for TextDecoder, ReadableStream
- Add Chat nav link in sidebar
- Add /chat route in router
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@limaronaldo
limaronaldo merged commit 88cc70f into main Dec 7, 2025
2 checks passed
@limaronaldo
limaronaldo deleted the feat/streaming-responses branch December 7, 2025 17:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant