Przeglądaj źródła

fix(ui): stabilize shell rolling output transitions

Kit Langton 1 miesiąc temu
rodzic
commit
3704dbcee1

+ 1 - 0
packages/ui/src/components/shell-rolling-results.tsx

@@ -276,6 +276,7 @@ export function ShellRollingResults(props: { part: ToolPart; animate?: boolean }
       >
         <RollingResults
           class="shell-rolling-output"
+          noFadeOnCollapse
           items={rows()}
           fixed={fixed()}
           fixedHeight={22}

+ 4 - 1
packages/ui/src/components/tool-utils.ts

@@ -248,7 +248,10 @@ export function useRowWipe(opts: {
     })
 
     onCleanup(() => {
-      if (frame !== undefined) cancelAnimationFrame(frame)
+      if (frame !== undefined) {
+        cancelAnimationFrame(frame)
+        clear()
+      }
     })
   })
 }