mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-27 12:51:26 +08:00
Fix the bug where topic branching would not copy all message relationships completely.The issue was that askId mapping lookup happened in the same loop as ID generation, causing later messages' askIds to fail mapping when they referenced messages that hadn't been processed yet.
Solution: Split into two passes:
1. First pass: Generate new IDs for all messages and build complete mapping
2. Second pass: Clone messages and blocks using the complete ID mapping
This ensures all message relationships (especially assistant message askId references)are properly maintained in the new topic.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| main | ||
| preload | ||
| renderer | ||