From f767bb51759dcf2f6356cc7e9514f8cdd633cf3e Mon Sep 17 00:00:00 2001 From: Roberto Musso Date: Sat, 28 Feb 2026 22:47:09 +0100 Subject: [PATCH] feat(AIChatPanel): update GradualBlur component to enhance blur effect; adjust ScrollArea scrollbar class handling --- src/renderer/components/ai/AIChatPanel.tsx | 18 ++++++++++-------- src/renderer/components/ui/gradual-blur.tsx | 14 +++++++++++--- src/renderer/components/ui/scroll-area.tsx | 6 ++++-- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/renderer/components/ai/AIChatPanel.tsx b/src/renderer/components/ai/AIChatPanel.tsx index 642a80d..e8e2445 100644 --- a/src/renderer/components/ai/AIChatPanel.tsx +++ b/src/renderer/components/ai/AIChatPanel.tsx @@ -204,19 +204,22 @@ export function AIChatPanel({ {/* Scrollable messages area */}
- {/* Gradual blur at the top of messages */} + {/* Gradual blur at the bottom of messages */} {hasMessages && ( )} div]:!flex [&>div]:!flex-col [&>div]:!min-h-full [&>div]:!justify-center' @@ -382,10 +385,9 @@ export function AIChatPanel({
- {/* Fixed input — pinned to the bottom (hidden on initial state) */} + {/* Fixed input — pinned to the bottom, above the blur */} {hasMessages && ( -
-
+
1 - Math.pow(1 - p, 2) + : (p: number) => p; + for (let i = 1; i <= divCount; i++) { - const progress = i / divCount; + let progress = i / divCount; + progress = curveFunc(progress); let blurValue: number; if (exponential) { blurValue = Math.pow(2, progress * 4) * 0.0625 * strength; } else { - blurValue = 0.0625 * (progress * divCount + 1) * strength; + blurValue = progress * strength; } const p1 = Math.round((increment * i - increment) * 10) / 10; @@ -77,7 +85,7 @@ export function GradualBlur({ } return divs; - }, [position, strength, divCount, exponential, opacity]); + }, [position, strength, divCount, exponential, curve, opacity]); return (
& { viewportRef?: React.Ref; viewportClassName?: string; + scrollbarClassName?: string; }) { return ( {children} - + ) @@ -45,7 +47,7 @@ function ScrollBar({ data-slot="scroll-area-scrollbar" orientation={orientation} className={cn( - "flex touch-none p-px transition-colors select-none", + "flex touch-none p-px transition-colors select-none z-50", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent", orientation === "horizontal" &&