Skip to content

Add streaming network layer (SSE) for AI/chat features (fixes #14) - #21

Merged
valorengels merged 1 commit into
mainfrom
session/streaming
Aug 21, 2026
Merged

valorengels merged 1 commit into
mainfrom
session/streaming

Conversation

@valorengels

Copy link
Copy Markdown
Contributor

Implements docs/plans/streaming_network_layer.md

Implements docs/plans/streaming_network_layer.md.

- core/network/sse_parser.dart: SSE framing (data:/[DONE]/event:/id:/comments,
  multi-line data, CRLF, UTF-8 across chunk boundaries) into typed SseEvent.
- core/network/streaming_client.dart: StreamingClient over the existing DioClient
  emitting Stream<Result<String>>. Per-request override of the global 30s
  receiveTimeout (Duration.zero) and Accept: text/event-stream (BLOCKER B-1);
  connectivity gate -> terminal failure, never queued (C-4); pinned emission
  contract (loading-first, [DONE] not a token, terminal failure) (C-1).
- features/chat/: reference streaming feature mirroring features/home
  (repository, ChatBloc with kMaxMessageChars guard + CancelToken stop, page).
- docs/implemented.md: document the streaming pattern.
- Tests: sse_parser, streaming_client (mock Dio adapter), chat_bloc. 55 -> 82.
@valorengels
valorengels merged commit a382045 into main Aug 21, 2026
3 checks passed
@valorengels
valorengels deleted the session/streaming branch August 21, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant