refactor: redesign status history

This commit is contained in:
cogwheel0
2025-09-28 15:58:46 +05:30
parent 0ff48eeb38
commit cb86ad8cd2
3 changed files with 616 additions and 325 deletions

View File

@@ -790,6 +790,16 @@ ActiveSocketStream attachUnifiedChunkedStreaming({
replaceLastMessageContent('⚠️ $content');
}
} catch (_) {}
// Drop search-only status rows so the error feels cleaner
updateLastMessageWith((message) {
final filtered = message.statusHistory
.where((status) => status.action != 'knowledge_search')
.toList(growable: false);
if (filtered.length == message.statusHistory.length) {
return message;
}
return message.copyWith(statusHistory: filtered);
});
// Ensure UI exits streaming state
finishStreaming();
socketWatchdog?.stop();