fix: stop stale chat renders after session switches
Roll back aggressive chat reuse paths that froze message parts, tool state, and completed assistant bodies when sessions were inactive or backgrounded.
This commit is contained in:
@@ -2024,8 +2024,7 @@ const ToolPart: React.FC<ToolPartProps> = ({
|
||||
const childSessionIsActive =
|
||||
childSessionActivity.phase === 'busy'
|
||||
|| childSessionActivity.phase === 'retry'
|
||||
|| childSessionHasInFlightTools
|
||||
|| (!isFinalized && activeLatched);
|
||||
|| childSessionHasInFlightTools;
|
||||
|
||||
if (childSessionIsActive) {
|
||||
if (!taskChildSeenActive) {
|
||||
@@ -2106,7 +2105,7 @@ const ToolPart: React.FC<ToolPartProps> = ({
|
||||
const childSessionActive = childSessionActivity.phase === 'busy' || childSessionActivity.phase === 'retry';
|
||||
const shouldPoll =
|
||||
!taskChildPollingStopped
|
||||
&& (isActive || childSessionHasInFlightTools || childSessionActive || childSessionTaskSummaryEntries.length === 0);
|
||||
&& (childSessionHasInFlightTools || childSessionActive || childSessionTaskSummaryEntries.length === 0);
|
||||
const shouldFetchSnapshot = childSessionTaskSummaryEntries.length === 0 || shouldPoll;
|
||||
if (!shouldFetchSnapshot) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user