mirror of
https://github.com/ollama/ollama.git
synced 2025-11-10 23:17:59 +01:00
fixing thinking not scrolling issue
This commit is contained in:
@@ -73,8 +73,9 @@ export default function Thinking({
|
|||||||
// Calculate max height for smooth animations
|
// Calculate max height for smooth animations
|
||||||
const getMaxHeight = () => {
|
const getMaxHeight = () => {
|
||||||
if (isCollapsed) {
|
if (isCollapsed) {
|
||||||
return finishedThinking ? "0px" : "12rem"; // 8rem = 128px (same as max-h-32)
|
return finishedThinking ? "0px" : "12rem";
|
||||||
}
|
}
|
||||||
|
// When expanded, use the content height or grow naturally
|
||||||
return contentHeight ? `${contentHeight}px` : "none";
|
return contentHeight ? `${contentHeight}px` : "none";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -131,10 +132,11 @@ export default function Thinking({
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
ref={wrapperRef}
|
ref={wrapperRef}
|
||||||
className={`text-xs text-neutral-500 dark:text-neutral-500 rounded-md overflow-hidden
|
className={`text-xs text-neutral-500 dark:text-neutral-500 rounded-md
|
||||||
transition-[max-height,opacity] duration-300 ease-in-out relative ml-6 mt-2`}
|
transition-[max-height,opacity] duration-300 ease-in-out relative ml-6 mt-2
|
||||||
|
${isCollapsed ? "overflow-hidden" : "overflow-y-auto max-h-28"}`}
|
||||||
style={{
|
style={{
|
||||||
maxHeight: getMaxHeight(),
|
maxHeight: isCollapsed ? getMaxHeight() : undefined,
|
||||||
opacity: isCollapsed && finishedThinking ? 0 : 1,
|
opacity: isCollapsed && finishedThinking ? 0 : 1,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user