fix: title update and followups
This commit is contained in:
@@ -434,9 +434,6 @@ StreamSubscription<String> attachUnifiedChunkedStreaming({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (payload['done'] == true) {
|
if (payload['done'] == true) {
|
||||||
try {
|
|
||||||
socketService?.offChatEvents();
|
|
||||||
} catch (_) {}
|
|
||||||
try {
|
try {
|
||||||
// ignore: unawaited_futures
|
// ignore: unawaited_futures
|
||||||
api?.sendChatCompleted(
|
api?.sendChatCompleted(
|
||||||
@@ -894,13 +891,7 @@ StreamSubscription<String> attachUnifiedChunkedStreaming({
|
|||||||
// Unregister from persistent service
|
// Unregister from persistent service
|
||||||
persistentService.unregisterStream(streamId);
|
persistentService.unregisterStream(streamId);
|
||||||
|
|
||||||
// Stop socket events now that streaming finished only for SSE-driven streams
|
// Allow socket-delivered follow-ups/title updates after SSE completes
|
||||||
if (socketService != null && suppressSocketContent == true) {
|
|
||||||
try {
|
|
||||||
socketService.offChatEvents();
|
|
||||||
} catch (_) {}
|
|
||||||
}
|
|
||||||
// Allow socket content again for future sessions
|
|
||||||
suppressSocketContent = false;
|
suppressSocketContent = false;
|
||||||
|
|
||||||
// If SSE-driven (no dynamic channel/background flow), finish now
|
// If SSE-driven (no dynamic channel/background flow), finish now
|
||||||
@@ -913,12 +904,8 @@ StreamSubscription<String> attachUnifiedChunkedStreaming({
|
|||||||
try {
|
try {
|
||||||
persistentService.unregisterStream(streamId);
|
persistentService.unregisterStream(streamId);
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
|
suppressSocketContent = false;
|
||||||
finishStreaming();
|
finishStreaming();
|
||||||
if (socketService != null && suppressSocketContent == true) {
|
|
||||||
try {
|
|
||||||
socketService.offChatEvents();
|
|
||||||
} catch (_) {}
|
|
||||||
}
|
|
||||||
socketWatchdog?.stop();
|
socketWatchdog?.stop();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user