Prune redundant tool scroll effect

This commit is contained in:
Shantur Rathore
2025-11-04 23:37:40 +00:00
parent 09f846b064
commit 9f95730357

View File

@@ -178,21 +178,6 @@ export default function ToolCall(props: ToolCallProps) {
setInitializedId(id)
})
// Restore scroll position when content updates
createEffect(() => {
const id = toolCallId()
const element = markdownContainerRef
if (!id || !element) return
const tool = toolName()
if (tool === "todowrite" || tool === "task") return
const content = getMarkdownContent(tool, props.toolCall?.state || {})
if (!content) return
restoreScrollState(id, element)
})
// Cleanup cache entry when component unmounts or toolCallId changes
createEffect(() => {
const id = toolCallId()