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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user