🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
'use client';
import type { FileSearchResult } from '@lobechat/types';
import { Center, Flexbox, MaterialFileTypeIcon, Tooltip } from '@lobehub/ui';
import { Text } from '@lobehub/ui';
import { cx } from '@lobehub/ui';
import { useTheme } from 'next-themes';
import { memo } from 'react';
import { styles } from './style';
export interface FileItemProps extends FileSearchResult {
index: number;
}
const FileItem = memo<FileItemProps>(({ fileId, fileName, relevanceScore }) => {
const { resolvedTheme } = useTheme();
const isDarkMode = resolvedTheme === 'dark';
return (
<Flexbox
horizontal
align={'center'}
className={cx(styles.container, isDarkMode ? styles.containerDark : styles.containerLight)}
gap={4}
key={fileId}
>
<MaterialFileTypeIcon filename={fileName} size={20} type={'file'} variant={'raw'} />
<Flexbox horizontal gap={12} justify={'space-between'} style={{ maxWidth: 200 }}>
<Text ellipsis>{fileName}</Text>
<Tooltip title={`Relevance: ${(relevanceScore * 100).toFixed(1)}%`}>
<Center className={styles.badge}>{relevanceScore.toFixed(2)}</Center>
</Tooltip>
</Flexbox>
</Flexbox>
);
});
export default FileItem;