Skip to content

refactor(tarko): simplify chat state management and fix streaming thinking flickering#1293

Closed
ulivz wants to merge 1 commit into
mainfrom
feat/refactor-chat-state-management
Closed

refactor(tarko): simplify chat state management and fix streaming thinking flickering#1293
ulivz wants to merge 1 commit into
mainfrom
feat/refactor-chat-state-management

Conversation

@ulivz
Copy link
Copy Markdown
Member

@ulivz ulivz commented Aug 28, 2025

Summary

Refactored Chat state management to fix AssistantStreamingThinkingMessage flickering issue while simplifying the overall architecture.

Key Changes:

  • Unified message handlers with BaseMessageHandler class for consistent update logic
  • Simplified message grouping algorithm to prevent flickering
  • Added sortedMessagesAtom for basic time-sorted messages
  • Improved ThinkingMessageHandler with stable messageId-based logic
  • Maintained all existing functionality while reducing complexity

Problem Solved:
The previous refactor in commit 5968a43e caused AssistantStreamingThinkingMessage to flicker during streaming, which was reverted in 8bb3236. This PR provides a stable solution that prevents flickering while maintaining simplified state management.

Checklist

  • Added or updated necessary tests (Optional).
  • Updated documentation to align with changes (Optional).
  • Verified no breaking changes, or prepared solutions for any occurring breaking changes (Optional).
  • My change does not involve the above items.

@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 28, 2025

Deploy Preview for agent-tars-docs ready!

Name Link
🔨 Latest commit 433eb12
🔍 Latest deploy log https://app.netlify.com/projects/agent-tars-docs/deploys/68b0ddc6a01d7c000814b2ce
😎 Deploy Preview https://deploy-preview-1293--agent-tars-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ulivz
Copy link
Copy Markdown
Member Author

ulivz commented Aug 28, 2025

Duplicate of #1293

@ulivz ulivz marked this as a duplicate of #1293 Aug 28, 2025
@ulivz ulivz closed this Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant