Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(web): format minimap previews only when opened #11181

Mergedjuliusmarmingemerged 3 commits intomain fromrefs/pull/11181/headmerged by juliusmarminge View on GitHub

Showing 3 changed files with 159 additions and 53 deletions.

x
0 of 3 viewed, 3 left
12 additions and 53 deletionsapps/web/src/components/chat/MessagesTimeline.tsxModified
View file
@@ -4,6 +4,11 @@
getQuestionAnswerText,
hasQuestionAnswer,
} from "@t3tools/client-runtime/work-log/user-input";
+import {
+ deriveTimelineMinimapItems,
+ resolveTimelineMinimapPreview,
+ type TimelineMinimapItem,
+} from "./timelineMinimapItems";
import {
type AssistantCitation,
type EnvironmentId,
@@ -918,13 +923,6 @@
return item.kind === "message" ? `message:${item.message.role}` : item.kind;
​
-interface TimelineMinimapItem {
- readonly id: string;
- readonly rowIndex: number;
- readonly userText: string | null;
- readonly assistantText: string | null;
-}
-​
interface TimelinePositionState {
readonly contentLength?: number;
readonly scroll?: number;
@@ -933,51 +931,6 @@
readonly sizeAtIndex?: (index: number) => number | undefined;