feat: send only ui-chat-log msgs that need re-rendering

What does this merge request do and why?

This MR optimizes checkpoint updates by sending only the UI chat log messages that have been added or updated since the last checkpoint, rather than sending the entire chat log every time.

Implementation:

  • Tracks the last sent message ID using last_sent_ui_message_id
  • Returns a slice of the chat log starting from the last sent message (inclusive) to allow re-rendering if needed
  • Reduces payload size for checkpoint updates by avoiding redundant message transmission

Benefits:

  • Improves performance by reducing the amount of data sent in each checkpoint
  • Maintains the ability to re-render the last sent message if needed
  • Preserves full chat history on the client side while optimizing network traffic
Edited by Igor Drozdov

Merge request reports

Loading