fix: text-generation webapp file form (#10578)

This commit is contained in:
zxhlyh
2024-11-12 15:35:12 +08:00
committed by GitHub
parent 40c5e6d67a
commit b77628c458
2 changed files with 16 additions and 7 deletions

View File

@@ -94,6 +94,7 @@ const TextGeneration: FC<IMainProps> = ({
const [isCallBatchAPI, setIsCallBatchAPI] = useState(false)
const isInBatchTab = currentTab === 'batch'
const [inputs, setInputs] = useState<Record<string, any>>({})
const inputsRef = useRef(inputs)
const [appId, setAppId] = useState<string>('')
const [siteInfo, setSiteInfo] = useState<SiteInfo | null>(null)
const [canReplaceLogo, setCanReplaceLogo] = useState<boolean>(false)
@@ -604,6 +605,7 @@ const TextGeneration: FC<IMainProps> = ({
<RunOnce
siteInfo={siteInfo}
inputs={inputs}
inputsRef={inputsRef}
onInputsChange={setInputs}
promptConfig={promptConfig}
onSend={handleSend}