fix: reset schema and view on error in JSON schema generation

This commit is contained in:
twwu 2025-03-27 16:06:10 +08:00
parent 01d462d0f6
commit 0319e35b4d

View File

@ -106,6 +106,8 @@ export const JsonSchemaGenerator: FC<JsonSchemaGeneratorProps> = ({
type: 'error',
message: error,
})
setSchema(null)
setView(GeneratorView.promptEditor)
return
}
return output