diff --git a/.changeset/last-file-patch.md b/.changeset/last-file-patch.md new file mode 100644 index 0000000000..b9a269fa5e --- /dev/null +++ b/.changeset/last-file-patch.md @@ -0,0 +1,5 @@ +--- +"kilo-code": patch +--- + +Keep the final file visible when expanding multi-file patch results. diff --git a/packages/kilo-ui/src/components/message-part.tsx b/packages/kilo-ui/src/components/message-part.tsx index 0a61e75f6c..4281174d12 100644 --- a/packages/kilo-ui/src/components/message-part.tsx +++ b/packages/kilo-ui/src/components/message-part.tsx @@ -2799,18 +2799,9 @@ ToolRegistry.register({ > {(file) => { - const active = createMemo(() => expanded().includes(file.filePath)) - const [visible, setVisible] = createSignal(false) - createEffect(() => { - if (!active()) { - setVisible(false) - return - } - requestAnimationFrame(() => { - if (!active()) return - setVisible(true) - }) - }) + // Diff defers its own expensive render; mounting the container + // here avoids dropping the last item during batch expansion. + const active = createMemo(() => allExpanded().includes(file.filePath)) return ( @@ -2864,7 +2855,7 @@ ToolRegistry.register({ - + {(diff) => (