Skip to content

Commit

Permalink
fix(frontend): fix message verify component state
Browse files Browse the repository at this point in the history
  • Loading branch information
634750802 committed Aug 27, 2024
1 parent 7f844ef commit 6a5e218
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ export function MessageVerify ({ user, assistant }: { user: ChatMessageControlle
const messageFinished = !isNotFinished(messageState);
const canOpen = result ? isVisibleVerifyState(result.status) : false;
const creating = verifying || !!(verifyId && !result && isLoadingResult);
console.log(verifying, verifyId, result, isLoadingResult)
const error: unknown = verifyError ?? pollError;

useEffect(() => {
if (enabled && !verifyId && question && answer && messageFinished && !verifying) {
setVerifying(true);
verify(question, answer)
.then(result => setVerifyId(result.job_id), error => setVerifyError(error))
.finally(() => {
Expand Down

0 comments on commit 6a5e218

Please sign in to comment.