mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-02 10:29:02 +08:00
- Increased the refactored component count to 18 and reduced pending migrations to 184 in the migration status files. - Improved the Ellipsis, ListItem, MaxContextCount, and ThinkingEffect components by simplifying their structure and enhancing styling. - Updated the tsconfig.json to adjust the root directory for better project organization. - Removed unnecessary alias configurations in tsdown.config.ts for cleaner setup. - Added new stories for Ellipsis and ListItem components to improve documentation and showcase their usage.
24 lines
676 B
TypeScript
24 lines
676 B
TypeScript
// Original path: src/renderer/src/components/MaxContextCount.tsx
|
|
import { Infinity as InfinityIcon } from 'lucide-react'
|
|
import { CSSProperties } from 'react'
|
|
|
|
const MAX_CONTEXT_COUNT = 100
|
|
|
|
type Props = {
|
|
maxContext: number
|
|
style?: CSSProperties
|
|
size?: number
|
|
className?: string
|
|
ref?: React.Ref<HTMLSpanElement>
|
|
}
|
|
|
|
export default function MaxContextCount({ maxContext, style, size = 14, className, ref }: Props) {
|
|
return maxContext === MAX_CONTEXT_COUNT ? (
|
|
<InfinityIcon size={size} style={style} className={className} aria-label="infinity" />
|
|
) : (
|
|
<span ref={ref} style={style} className={className}>
|
|
{maxContext.toString()}
|
|
</span>
|
|
)
|
|
}
|