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

This commit is contained in:
zxhlyh 2024-11-12 15:35:12 +08:00 • committed by GitHub
commit b77628c458
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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}