Re-derive only the live turn's transcript rows per streamed delta
ChatTranscriptRows keeps each message run's rows while the run holds the identical message objects; applyChatEvent and the controller keep untouched messages' identity. Shown-item filtering, task-notice groups and row-key ids are held per row object, and the view reads message ids once per list. Tests check the incremental path equals a full derivation across streaming, appends, shown items, cards, turn diffs and prepended pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -414,10 +414,7 @@ class ChatThreadController extends ChangeNotifier {
|
||||
// A frame for a cached message is fresh state the next read must not drop.
|
||||
final changed = body['message_id'];
|
||||
if (changed != null) _untouchedCached?.remove(changed);
|
||||
_messages = (next['messages'] as List? ?? const [])
|
||||
.whereType<Map>()
|
||||
.map((message) => Map<String, dynamic>.from(message))
|
||||
.toList();
|
||||
_messages = chatMessageList(next['messages']);
|
||||
_running = next['running'] == true;
|
||||
if (!_running) {
|
||||
_liveAssistantMessageId = null;
|
||||
|
||||
Reference in New Issue
Block a user