fix(NewContextButton): Incorrect relation to showInputEstimatedTokens setting
This commit is contained in:
parent
ab8600864e
commit
a04757c0d9
@ -1,5 +1,4 @@
|
||||
import { PicCenterOutlined } from '@ant-design/icons'
|
||||
import { useSettings } from '@renderer/hooks/useSettings'
|
||||
import { useShortcut, useShortcutDisplay } from '@renderer/hooks/useShortcuts'
|
||||
import { Tooltip } from 'antd'
|
||||
import { FC } from 'react'
|
||||
@ -13,14 +12,9 @@ interface Props {
|
||||
const NewContextButton: FC<Props> = ({ onNewContext, ToolbarButton }) => {
|
||||
const newContextShortcut = useShortcutDisplay('toggle_new_context')
|
||||
const { t } = useTranslation()
|
||||
const { showInputEstimatedTokens } = useSettings()
|
||||
|
||||
useShortcut('toggle_new_context', onNewContext)
|
||||
|
||||
if (!showInputEstimatedTokens) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<Tooltip placement="top" title={t('chat.input.new.context', { Command: newContextShortcut })} arrow>
|
||||
<ToolbarButton type="text" onClick={onNewContext}>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user