diff --git a/packages/app/src/session/timeline/message-timeline.tsx b/packages/app/src/session/timeline/message-timeline.tsx index 85a29e67bc..d6a66d6448 100644 --- a/packages/app/src/session/timeline/message-timeline.tsx +++ b/packages/app/src/session/timeline/message-timeline.tsx @@ -66,37 +66,6 @@ export function BackgroundMoveHint(props: { keybind?: string[] }) { ) } -function BackgroundMoveHintRow(props: { show: boolean; centered: boolean; padding: string }) { - const [ref, setRef] = createSignal() - const visibility = createMemo<{ show: boolean; animate: boolean }>( - (previous) => ({ show: props.show, animate: previous.animate || previous.show !== props.show }), - { show: props.show, animate: false }, - ) - const presence = createPresence({ show: () => visibility().show, element: () => ref() ?? null }) - return ( - -
-
- -
-
-
- ) -} - export function BackgroundWorkSummary(props: { tasks: BackgroundTask[] }) { const language = useLanguage() const [open, setOpen] = createSignal(false) @@ -487,23 +456,51 @@ function MessageTimelineView( if (row?._tag !== "AssistantPart" || row.group.type !== "part") return return row.group.ref.partID }) - const backgroundHint = (row: TimelineRow.TimelineRow) => - row._tag === "AssistantPart" && row.group.type === "part" && row.group.ref.partID === backgroundHintPartID() - + const [backgroundHintRef, setBackgroundHintRef] = createSignal() + const backgroundHintVisibility = createMemo<{ show: boolean; animate: boolean }>( + (previous) => { + const show = backgroundHintPartID() !== undefined + return { show, animate: previous.animate || previous.show !== show } + }, + { show: backgroundHintPartID() !== undefined, animate: false }, + ) + const backgroundHintPresence = createPresence({ + show: () => backgroundHintVisibility().show, + element: () => backgroundHintRef() ?? null, + }) return ( +
+
+ +
+
+ + } deferred={(row) => { if (row._tag !== "AssistantPart" || row.group.type !== "part") return false const content = Timeline.resolveContent(messageByID().get(row.group.ref.messageID), row.group.ref.partID) return content?.type === "tool" && ["edit", "write"].includes(content.name) }} - renderRow={(row, onSizeChange) => ( - <> - - - - )} + renderRow={(row, onSizeChange) => } header={
deferred: (row: TimelineRow.TimelineRow) => boolean renderRow: (row: Accessor, onSizeChange?: () => void) => JSX.Element @@ -372,10 +373,11 @@ export function createTimelineVirtualizer(input: Input) { 0}>