mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-30 07:39:06 +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
fed855a4ae
commit
2202b82f33
@ -22,18 +22,6 @@ const TokenCount: FC<Props> = ({ estimateTokenCount, inputTokenCount, contextCou
|
|||||||
}
|
}
|
||||||
|
|
||||||
const formatMaxCount = (max: number) => {
|
const formatMaxCount = (max: number) => {
|
||||||
if (max == 100) {
|
|
||||||
return (
|
|
||||||
<span
|
|
||||||
style={{
|
|
||||||
fontSize: '16px',
|
|
||||||
position: 'relative',
|
|
||||||
top: '1px'
|
|
||||||
}}>
|
|
||||||
∞
|
|
||||||
</span>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
return max.toString()
|
return max.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,7 +31,7 @@ const TokenCount: FC<Props> = ({ estimateTokenCount, inputTokenCount, contextCou
|
|||||||
<HStack justifyContent="space-between" w="100%">
|
<HStack justifyContent="space-between" w="100%">
|
||||||
<Text>{t('chat.input.context_count.tip')}</Text>
|
<Text>{t('chat.input.context_count.tip')}</Text>
|
||||||
<Text>
|
<Text>
|
||||||
{contextCount.current} / {contextCount.max == 20 ? '∞' : contextCount.max}
|
{contextCount.current} / {contextCount.max}
|
||||||
</Text>
|
</Text>
|
||||||
</HStack>
|
</HStack>
|
||||||
<Divider style={{ margin: '5px 0' }} />
|
<Divider style={{ margin: '5px 0' }} />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user