diff --git a/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/ChatInterface.tsx b/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/ChatInterface.tsx index 3085ef9bd..d730c2826 100644 --- a/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/ChatInterface.tsx +++ b/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/ChatInterface.tsx @@ -283,15 +283,12 @@ const ChatInterfaceContent = ({ centerInputOnEmpty }: ChatInterfaceProps) => { const [bottomPanelHeight, setBottomPanelHeight] = useState(0) const bottomPanelRef = useRef(null) - const rateLimitNoticeRef = useRef(null) useLayoutEffect(() => { - if (!bottomPanelRef.current || !rateLimitNoticeRef.current) { + if (!bottomPanelRef.current) { return } - setBottomPanelHeight( - (bottomPanelRef.current?.offsetHeight ?? 0) + (rateLimitNoticeRef.current?.offsetHeight ?? 0), - ) + setBottomPanelHeight(bottomPanelRef.current.offsetHeight) const resizeObserver = new ResizeObserver(() => { if (!bottomPanelRef.current) { @@ -416,7 +413,7 @@ const ChatInterfaceContent = ({ centerInputOnEmpty }: ChatInterfaceProps) => { "bottom-1/2 translate-y-[calc(100%+1rem)] duration-200", )} > - + { const tempEditor = createEditor({ diff --git a/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/RateLimitNotice.tsx b/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/RateLimitNotice.tsx index 1bba1ffcd..9ecf5f6f0 100644 --- a/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/RateLimitNotice.tsx +++ b/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/RateLimitNotice.tsx @@ -8,7 +8,6 @@ import { useSettingModal } from "~/modules/settings/modal/useSettingModal" import { parseAIError } from "../../utils/error" interface RateLimitNoticeProps { - ref?: React.Ref error?: Error chatConfig?: ConfigResponse className?: string @@ -18,7 +17,7 @@ interface RateLimitNoticeProps { * RateLimitNotice component * Displays rate limit information above the input in a subtle, non-alarming way */ -export const RateLimitNotice = ({ ref, error, chatConfig, className }: RateLimitNoticeProps) => { +export const RateLimitNotice = ({ error, chatConfig, className }: RateLimitNoticeProps) => { const message = React.useMemo(() => { if (error) { return buildErrorMessage(error) @@ -40,7 +39,6 @@ export const RateLimitNotice = ({ ref, error, chatConfig, className }: RateLimit return (