fix typo: responsing -> responding (#2718)
Co-authored-by: OSS-MAOLONGDONG\kaihong <maolongdong@kaihong.com>
This commit is contained in:
@@ -46,7 +46,7 @@ const ChatItem: FC<ChatItemProps> = ({
|
||||
const config = useConfigFromDebugContext()
|
||||
const {
|
||||
chatList,
|
||||
isResponsing,
|
||||
isResponding,
|
||||
handleSend,
|
||||
suggestedQuestions,
|
||||
handleRestart,
|
||||
@@ -118,7 +118,7 @@ const ChatItem: FC<ChatItemProps> = ({
|
||||
<Chat
|
||||
config={config}
|
||||
chatList={chatList}
|
||||
isResponsing={isResponsing}
|
||||
isResponding={isResponding}
|
||||
noChatInput
|
||||
noStopResponding
|
||||
chatContainerclassName='p-4'
|
||||
|
||||
@@ -83,7 +83,7 @@ const TextGenerationItem: FC<TextGenerationItemProps> = ({
|
||||
const {
|
||||
completion,
|
||||
handleSend,
|
||||
isResponsing,
|
||||
isResponding,
|
||||
messageId,
|
||||
} = useTextGeneration()
|
||||
|
||||
@@ -143,8 +143,8 @@ const TextGenerationItem: FC<TextGenerationItemProps> = ({
|
||||
innerClassName='grow flex flex-col'
|
||||
contentClassName='grow'
|
||||
content={completion}
|
||||
isLoading={!completion && isResponsing}
|
||||
isResponsing={isResponsing}
|
||||
isLoading={!completion && isResponding}
|
||||
isResponding={isResponding}
|
||||
isInstalledApp={false}
|
||||
messageId={messageId}
|
||||
isError={false}
|
||||
|
||||
@@ -45,7 +45,7 @@ const DebugWithSingleModel = forwardRef<DebugWithSingleModelRefType, DebugWithSi
|
||||
const config = useConfigFromDebugContext()
|
||||
const {
|
||||
chatList,
|
||||
isResponsing,
|
||||
isResponding,
|
||||
handleSend,
|
||||
suggestedQuestions,
|
||||
handleStop,
|
||||
@@ -118,7 +118,7 @@ const DebugWithSingleModel = forwardRef<DebugWithSingleModelRefType, DebugWithSi
|
||||
<Chat
|
||||
config={config}
|
||||
chatList={chatList}
|
||||
isResponsing={isResponsing}
|
||||
isResponding={isResponding}
|
||||
chatContainerclassName='p-6'
|
||||
chatFooterClassName='px-6 pt-10 pb-4'
|
||||
suggestedQuestions={suggestedQuestions}
|
||||
|
||||
@@ -93,7 +93,7 @@ const Debug: FC<IDebug> = ({
|
||||
}
|
||||
}, [])
|
||||
|
||||
const [isResponsing, { setTrue: setResponsingTrue, setFalse: setResponsingFalse }] = useBoolean(false)
|
||||
const [isResponding, { setTrue: setRespondingTrue, setFalse: setRespondingFalse }] = useBoolean(false)
|
||||
const [isShowFormattingChangeConfirm, setIsShowFormattingChangeConfirm] = useState(false)
|
||||
const [isShowCannotQueryDataset, setShowCannotQueryDataset] = useState(false)
|
||||
|
||||
@@ -191,7 +191,7 @@ const Debug: FC<IDebug> = ({
|
||||
const [messageId, setMessageId] = useState<string | null>(null)
|
||||
|
||||
const sendTextCompletion = async () => {
|
||||
if (isResponsing) {
|
||||
if (isResponding) {
|
||||
notify({ type: 'info', message: t('appDebug.errorMessage.waitForResponse') })
|
||||
return false
|
||||
}
|
||||
@@ -277,7 +277,7 @@ const Debug: FC<IDebug> = ({
|
||||
setMessageId('')
|
||||
let res: string[] = []
|
||||
|
||||
setResponsingTrue()
|
||||
setRespondingTrue()
|
||||
sendCompletionMessage(appId, data, {
|
||||
onData: (data: string, _isFirstMessage: boolean, { messageId }) => {
|
||||
res.push(data)
|
||||
@@ -289,10 +289,10 @@ const Debug: FC<IDebug> = ({
|
||||
setCompletionRes(res.join(''))
|
||||
},
|
||||
onCompleted() {
|
||||
setResponsingFalse()
|
||||
setRespondingFalse()
|
||||
},
|
||||
onError() {
|
||||
setResponsingFalse()
|
||||
setRespondingFalse()
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -440,13 +440,13 @@ const Debug: FC<IDebug> = ({
|
||||
{mode === AppType.completion && (
|
||||
<div className="mt-6 px-6 pb-4">
|
||||
<GroupName name={t('appDebug.result')} />
|
||||
{(completionRes || isResponsing) && (
|
||||
{(completionRes || isResponding) && (
|
||||
<TextGeneration
|
||||
className="mt-2"
|
||||
content={completionRes}
|
||||
isLoading={!completionRes && isResponsing}
|
||||
isLoading={!completionRes && isResponding}
|
||||
isShowTextToSpeech={textToSpeechConfig.enabled && !!text2speechDefaultModel}
|
||||
isResponsing={isResponsing}
|
||||
isResponding={isResponding}
|
||||
isInstalledApp={false}
|
||||
messageId={messageId}
|
||||
isError={false}
|
||||
|
||||
Reference in New Issue
Block a user