feat: support optional query content (#1097)

Co-authored-by: Garfield Dai <dai.hai@foxmail.com>
This commit is contained in:
Joel
2023-09-10 00:12:34 +08:00
committed by GitHub
parent 1ade70aa1e
commit 2d5ad0d208
36 changed files with 547 additions and 289 deletions

View File

@@ -21,7 +21,6 @@ export type IResultProps = {
promptConfig: PromptConfig | null
moreLikeThisEnabled: boolean
inputs: Record<string, any>
query: string
controlSend?: number
controlStopResponding?: number
onShowRes: () => void
@@ -39,7 +38,6 @@ const Result: FC<IResultProps> = ({
promptConfig,
moreLikeThisEnabled,
inputs,
query,
controlSend,
controlStopResponding,
onShowRes,
@@ -109,14 +107,8 @@ const Result: FC<IResultProps> = ({
if (!checkCanSend())
return
if (!query) {
logError(t('appDebug.errorMessage.queryRequired'))
return false
}
const data = {
inputs,
query,
}
setMessageId(null)