feat: replace Pencil icon with FileIcon in DiffViewer header

Use devicon-based FileIcon for file type recognition instead of
generic Pencil icon. Shows JS/TS/Python/etc logos in diff headers.
This commit is contained in:
iliya 2026-03-21 12:48:03 +02:00
parent 7daacdc6a5
commit 087a8f4989

View file

@ -22,7 +22,8 @@ import { getBaseName } from '@renderer/utils/pathUtils';
import { highlightLines } from '@renderer/utils/syntaxHighlighter';
import { formatTokens } from '@shared/utils/tokenFormatting';
import { diffLines as semanticDiffLines } from 'diff';
import { Pencil } from 'lucide-react';
import { FileIcon } from '../../team/editor/FileIcon';
// =============================================================================
// Types
@ -394,7 +395,7 @@ export const DiffViewer: React.FC<DiffViewerProps> = ({
borderBottom: `1px solid ${CODE_BORDER}`,
}}
>
<Pencil className="size-4 shrink-0" style={{ color: COLOR_TEXT_MUTED }} />
<FileIcon fileName={fileName} className="size-4 shrink-0" />
<span className="truncate font-mono text-sm" style={{ color: CODE_FILENAME }}>
{displayName}
</span>