feat(frontend): 对齐工件文件列表 UI 渲染

This commit is contained in:
肖应宇 2026-03-29 00:48:46 +08:00
parent 929260bdb8
commit e8b145bff3
1 changed files with 5 additions and 7 deletions

View File

@ -18,7 +18,7 @@ import {
getFileIcon,
getFileName,
} from "@/core/utils/files";
import { cn, truncateMiddle } from "@/lib/utils";
import { cn } from "@/lib/utils";
import { useArtifacts } from "./context";
@ -80,14 +80,12 @@ export function ArtifactFileList({
onClick={() => handleClick(file)}
>
<CardHeader className="pr-2 pl-1">
<CardTitle className=" relative pl-8 overflow-hidden">
<div className=" text-ellipsis whitespace-nowrap text-sm font-normal" title={getFileName(file)}>
{truncateMiddle(getFileName(file), 50)}
<CardTitle className="relative pl-8">
<div>{getFileName(file)}</div>
<div className="absolute top-2 -left-0.5">
{getFileIcon(file, "size-6")}
</div>
</CardTitle>
<div className="absolute top-5 left-3">
{getFileIcon(file, "size-6 stroke-[1.5px] stroke-[#333333]")}
</div>
<CardDescription className="pl-8 text-xs">
{getFileExtensionDisplayName(file)} file
</CardDescription>