Phase 2 refinements: Firebase config, dev environment fixes, phase 3 requirement draft
- Integrated Firebase SDK in both Flutter apps (google-services, firebase_options) - Fixed auth flow, API client, and pairing/status blocs for dev environment - Added full Flutter project scaffolds (android, ios, web, etc.) - Added phase 3 chat engine requirement document - Added bugreport zip pattern to gitignore Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -77,6 +77,10 @@ class PairingBloc extends Bloc<PairingEvent, PairingState> {
|
||||
}
|
||||
|
||||
Future<void> _onRequestPairing(RequestPairing event, Emitter<PairingState> emit) async {
|
||||
// Reset to initial so BlocListener can detect new errors
|
||||
if (state is! PairingInitial) {
|
||||
emit(PairingInitial());
|
||||
}
|
||||
try {
|
||||
final response = await apiClient.post('/api/client/chat/request');
|
||||
final data = response['data'] as Map<String, dynamic>;
|
||||
@@ -104,12 +108,7 @@ class PairingBloc extends Bloc<PairingEvent, PairingState> {
|
||||
}
|
||||
|
||||
void _listenToSSE(String sessionId) {
|
||||
final dio = Dio(BaseOptions(baseUrl: ApiClient.baseUrl));
|
||||
// SSE endpoint — use responseType stream
|
||||
dio.get(
|
||||
'/api/client/chat/request/$sessionId/status',
|
||||
options: Options(responseType: ResponseType.stream),
|
||||
).then((response) {
|
||||
apiClient.getStream('/api/client/chat/request/$sessionId/status').then((response) {
|
||||
final stream = response.data.stream as Stream<List<int>>;
|
||||
_sseSubscription = stream
|
||||
.transform(utf8.decoder)
|
||||
|
||||
Reference in New Issue
Block a user