diff --git a/frontend/app/block/block.less b/frontend/app/block/block.less index d005a3ecd..b24be11f3 100644 --- a/frontend/app/block/block.less +++ b/frontend/app/block/block.less @@ -69,7 +69,7 @@ .block-frame-default-header { display: flex; height: 34px; - padding: 4px 0 4px 10px; + padding: 4px 5px 4px 10px; align-items: center; gap: 8px; align-self: stretch; diff --git a/frontend/app/block/block.tsx b/frontend/app/block/block.tsx index d1567052a..d1c350beb 100644 --- a/frontend/app/block/block.tsx +++ b/frontend/app/block/block.tsx @@ -447,7 +447,7 @@ function getViewElemAndModel( } else if (blockView === "web") { viewElem = ; } else if (blockView === "waveai") { - viewElem = ; + viewElem = ; } if (viewModel == null) { viewModel = makeDefaultViewModel(blockId); diff --git a/frontend/app/view/waveai.less b/frontend/app/view/waveai.less index c5ddbe19e..d56e0ce4a 100644 --- a/frontend/app/view/waveai.less +++ b/frontend/app/view/waveai.less @@ -10,7 +10,7 @@ > .scrollable { flex-flow: column nowrap; - flex: 1; + flex-grow: 1; margin-bottom: 0; overflow-y: auto; @@ -77,6 +77,7 @@ .waveai-input-wrapper { padding: 16px 15px 7px; flex: 0 0 auto; + flex-shrink: 0; border-top: 1px solid var(--app-border-color); .waveai-input { diff --git a/frontend/app/view/waveai.tsx b/frontend/app/view/waveai.tsx index 8a3b4a902..288434be4 100644 --- a/frontend/app/view/waveai.tsx +++ b/frontend/app/view/waveai.tsx @@ -3,7 +3,6 @@ import { Markdown } from "@/app/element/markdown"; import { TypingIndicator } from "@/app/element/typingindicator"; -import { useParentHeight } from "@/app/hook/useParentHeight"; import { getApi } from "@/app/store/global"; import { ChatMessageType, useWaveAi } from "@/app/store/waveai"; import type { OverlayScrollbars } from "overlayscrollbars"; @@ -210,11 +209,7 @@ const ChatInput = forwardRef( } ); -interface WaveAiProps { - parentRef: React.MutableRefObject; -} - -const WaveAi = React.memo(({ parentRef }: WaveAiProps) => { +const WaveAi = () => { const { messages, sendMessage } = useWaveAi(); const waveaiRef = useRef(null); const chatWindowRef = useRef(null); @@ -227,8 +222,6 @@ const WaveAi = React.memo(({ parentRef }: WaveAiProps) => { const [isSubmitting, setIsSubmitting] = useState(false); const termFontSize: number = 14; - const parentHeight = useParentHeight(parentRef); - const waveAiHeight = parentHeight - 27; useEffect(() => { return () => { @@ -399,7 +392,7 @@ const WaveAi = React.memo(({ parentRef }: WaveAiProps) => { }; return ( - + { ); -}); +}; export { WaveAi };