mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-31 08:29:07 +08:00
fix(Inputbar): 修正拼写错误,将expend改为expand
This commit is contained in:
parent
f2b7b07e51
commit
fc174ba4ac
@ -90,7 +90,7 @@ const Inputbar: FC<Props> = ({ assistant: _assistant, setActiveTopic, topic }) =
|
||||
enableBackspaceDeleteModel,
|
||||
enableSpellCheck
|
||||
} = useSettings()
|
||||
const [expended, setExpend] = useState(false)
|
||||
const [expanded, setExpend] = useState(false)
|
||||
const [estimateTokenCount, setEstimateTokenCount] = useState(0)
|
||||
const [contextCount, setContextCount] = useState({ current: 0, max: 0 })
|
||||
const textareaRef = useRef<TextAreaRef>(null)
|
||||
@ -398,9 +398,9 @@ const Inputbar: FC<Props> = ({ assistant: _assistant, setActiveTopic, topic }) =
|
||||
}
|
||||
}
|
||||
|
||||
if (expended) {
|
||||
if (expanded) {
|
||||
if (event.key === 'Escape') {
|
||||
return onToggleExpended()
|
||||
return onToggleExpanded()
|
||||
}
|
||||
}
|
||||
|
||||
@ -500,7 +500,7 @@ const Inputbar: FC<Props> = ({ assistant: _assistant, setActiveTopic, topic }) =
|
||||
EventEmitter.emit(EVENT_NAMES.NEW_CONTEXT)
|
||||
}
|
||||
|
||||
const onInput = () => !expended && resizeTextArea()
|
||||
const onInput = () => !expanded && resizeTextArea()
|
||||
|
||||
const onChange = useCallback(
|
||||
(e: React.ChangeEvent<HTMLTextAreaElement>) => {
|
||||
@ -809,8 +809,8 @@ const Inputbar: FC<Props> = ({ assistant: _assistant, setActiveTopic, topic }) =
|
||||
[couldMentionNotVisionModel]
|
||||
)
|
||||
|
||||
const onToggleExpended = () => {
|
||||
const currentlyExpanded = expended || !!textareaHeight
|
||||
const onToggleExpanded = () => {
|
||||
const currentlyExpanded = expanded || !!textareaHeight
|
||||
const shouldExpand = !currentlyExpanded
|
||||
setExpend(shouldExpand)
|
||||
const textArea = textareaRef.current?.resizableTextArea?.textArea
|
||||
@ -832,7 +832,7 @@ const Inputbar: FC<Props> = ({ assistant: _assistant, setActiveTopic, topic }) =
|
||||
focusTextarea()
|
||||
}
|
||||
|
||||
const isExpended = expended || !!textareaHeight
|
||||
const isExpended = expanded || !!textareaHeight
|
||||
const showThinkingButton = isSupportedThinkingTokenModel(model) || isSupportedReasoningEffortModel(model)
|
||||
|
||||
if (isMultiSelectMode) {
|
||||
@ -922,7 +922,7 @@ const Inputbar: FC<Props> = ({ assistant: _assistant, setActiveTopic, topic }) =
|
||||
couldAddImageFile={couldAddImageFile}
|
||||
onEnableGenerateImage={onEnableGenerateImage}
|
||||
isExpended={isExpended}
|
||||
onToggleExpended={onToggleExpended}
|
||||
onToggleExpended={onToggleExpanded}
|
||||
addNewTopic={addNewTopic}
|
||||
clearTopic={clearTopic}
|
||||
onNewContext={onNewContext}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user