refactor: update socket connection state and add conversation delta stream provider

- Changed the initial state of the socket connection from `disconnected` to `connecting` to better reflect the connection process.
- Updated the service change handling to emit the `connecting` state when the service is null.
- Introduced a new `stream()` method in the `ConversationDeltaStream` class for direct access to the underlying stream, improving usability.
- Added a `conversationDeltaEventsProvider` to provide a stream of conversation delta events based on requests, enhancing the application's real-time capabilities.
This commit is contained in:
cogwheel0
2025-10-01 18:44:54 +05:30
parent 8a8ba76298
commit f896c4543f
2 changed files with 19 additions and 3 deletions

View File

@@ -246,7 +246,7 @@ final isOnlineProvider = Provider<bool>((ref) {
if (reviewerMode) return true;
final status = ref.watch(connectivityStatusProvider);
return status.when(
data: (status) => status == ConnectivityStatus.online,
data: (status) => status != ConnectivityStatus.offline,
loading: () => true, // Assume online while checking
error: (_, _) =>
true, // Assume online on error to avoid false offline states