mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-11-22 13:02:15 +00:00
* feat(frontend): improve file attachment recovery and artifact presentation * feat(extensions): add Office artifact previews with search and navigation * fix: preserve public viewers and HTTP Office previews * fix: address file preview and upload review findings * fix: use typed upload errors and linear bookmark allocation * fix(office-preview): isolate parsing and bound preview resources * fix(ci): install Office preview fixture dependencies for E2E * fix(ci): provision matching Playwright browsers before E2E tests * fix(ci): isolate Python libraries and include Office documentation * test(frontend): wait for download status to finish rendering
22 lines
593 B
TypeScript
22 lines
593 B
TypeScript
import { cn } from "@/lib/utils";
|
|
|
|
/** Keep the extension visible when space is tight; the full name stays available. */
|
|
export function FileName({
|
|
filename,
|
|
className,
|
|
}: {
|
|
filename: string;
|
|
className?: string;
|
|
}) {
|
|
const dot = filename.lastIndexOf(".");
|
|
const split = dot > 0 && dot < filename.length - 1;
|
|
return (
|
|
<span title={filename} className={cn("flex min-w-0", className)}>
|
|
<span className="truncate">
|
|
{split ? filename.slice(0, dot) : filename}
|
|
</span>
|
|
{split && <span className="shrink-0">{filename.slice(dot)}</span>}
|
|
</span>
|
|
);
|
|
}
|