From c52b505354d50970d78daefdcfb99a5fffbdc28d Mon Sep 17 00:00:00 2001 From: MT-Mint <798521692@qq.com> Date: Mon, 20 Apr 2026 10:22:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BC=95=E7=94=A8=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E5=A4=9A=E5=B1=82=E6=BB=9A=E5=8A=A8=E5=AE=B9?= =?UTF-8?q?=E5=99=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/ui/scroll-area.tsx | 9 ++++++--- frontend/src/components/workspace/input-box.tsx | 9 ++++++--- frontend/src/styles/globals.css | 11 ++++++----- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/ui/scroll-area.tsx b/frontend/src/components/ui/scroll-area.tsx index 5524f1ca..e38d9e57 100644 --- a/frontend/src/components/ui/scroll-area.tsx +++ b/frontend/src/components/ui/scroll-area.tsx @@ -8,8 +8,11 @@ import { cn } from "@/lib/utils"; function ScrollArea({ className, children, + hideScrollbar = true, ...props -}: React.ComponentProps) { +}: React.ComponentProps & { + hideScrollbar?: boolean; +}) { return ( {children} - - + ); } diff --git a/frontend/src/components/workspace/input-box.tsx b/frontend/src/components/workspace/input-box.tsx index 142a80ee..8dff20fc 100644 --- a/frontend/src/components/workspace/input-box.tsx +++ b/frontend/src/components/workspace/input-box.tsx @@ -96,6 +96,7 @@ import { ModeHoverGuide } from "./mode-hover-guide"; import { Tooltip } from "./tooltip"; import { useThread } from "./messages/context"; import type { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime"; +import { ScrollArea } from "../ui/scroll-area"; const MAX_REFERENCES_PER_MESSAGE = 10; @@ -688,7 +689,7 @@ export function InputBox({ align="start" side="top" sideOffset={8} - className="w-[min(32rem,var(--radix-dropdown-menu-trigger-width)+28rem)] max-h-[400px] overflow-y-visible p-[20px]" + className="w-[min(32rem,var(--radix-dropdown-menu-trigger-width)+28rem)] max-h-[400px] overflow-y-hidden p-[20px]" data-testid="mention-candidate-panel" onCloseAutoFocus={(event) => { event.preventDefault(); @@ -699,8 +700,9 @@ export function InputBox({ {t.inputBox.addReference} - - {filteredMentionCandidates.slice(0, 20).map((candidate, index) => { + + + {filteredMentionCandidates.map((candidate, index) => { const detail = [candidate.typeLabel, candidate.pathTail] .filter(Boolean) .join(" ยท "); @@ -744,6 +746,7 @@ export function InputBox({ ); })} + diff --git a/frontend/src/styles/globals.css b/frontend/src/styles/globals.css index f88d1f10..75f71ac3 100644 --- a/frontend/src/styles/globals.css +++ b/frontend/src/styles/globals.css @@ -398,13 +398,14 @@ /* Hide scrollbar but keep scroll behavior */ * { - scrollbar-width: none; /* Firefox */ - -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; + -ms-overflow-style: none; } + /* Chrome, Safari, Opera */ -/* *::-webkit-scrollbar { - display: none; -} */ +*::-webkit-scrollbar { + display: none; +} :root { --container-width-xs: calc(var(--spacing) * 72);