mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-26 03:31:24 +08:00
fix: remove infinite token display for max count and simplify context count rendering. (#6103)
Co-authored-by: George Zhao <georgezhao@SKJLAB>
This commit is contained in:
parent
882c62b4ea
commit
d6b5c25d29
@ -22,18 +22,6 @@ const TokenCount: FC<Props> = ({ estimateTokenCount, inputTokenCount, contextCou
|
||||
}
|
||||
|
||||
const formatMaxCount = (max: number) => {
|
||||
if (max == 100) {
|
||||
return (
|
||||
<span
|
||||
style={{
|
||||
fontSize: '16px',
|
||||
position: 'relative',
|
||||
top: '1px'
|
||||
}}>
|
||||
∞
|
||||
</span>
|
||||
)
|
||||
}
|
||||
return max.toString()
|
||||
}
|
||||
|
||||
@ -43,7 +31,7 @@ const TokenCount: FC<Props> = ({ estimateTokenCount, inputTokenCount, contextCou
|
||||
<HStack justifyContent="space-between" w="100%">
|
||||
<Text>{t('chat.input.context_count.tip')}</Text>
|
||||
<Text>
|
||||
{contextCount.current} / {contextCount.max == 20 ? '∞' : contextCount.max}
|
||||
{contextCount.current} / {contextCount.max}
|
||||
</Text>
|
||||
</HStack>
|
||||
<Divider style={{ margin: '5px 0' }} />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user