Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): reuse timeline rows while thinking and plans stream #24121

MergedBatuhan1999(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/24121/headmerged by juliusmarminge View on GitHub

Showing 5 changed files with 219 additions and 1 deletion (loading 4).

x
0 of 5 viewed, 5 left
219 additions and 1 deletionapps/web/src/components/chat/MessagesTimeline.logic.test.tsModified
View file
@@ -18,7 +18,11 @@
workEntryDisplayIndicatesToolFailure,
type TimelineEntry,
} from "../../session-logic";
-import { makeStreamingTimelineFixture } from "../../test-fixtures";
+import {
+ makeStreamingTimelineFixture,
+ makeStreamingWorkTimelineFixture,
+ withStreamedText,
+} from "../../test-fixtures";
import type { TurnDiffSummary } from "../../types";
import { describe, expect, it } from "vite-plus/test";
import { MessageId, RunId } from "@t3tools/contracts";
@@ -3891,6 +3895,220 @@
+​
+ it.each(["reasoning", "proposed_plan"] as const)(
+ "keeps every row not holding streaming %s text when it changes",
+ (kind) => {
+ const source = makeStreamingWorkTimelineFixture(kind);
+ const rowsInput = (timelineEntries: ReadonlyArray<TimelineEntry>) => ({
+ timelineEntries,
+ latestRun: {
+ runId: source.runId,
+ status: "running" as const,
+ startedAt: source.time(5),
+ completedAt: null,