Restore the original prompt if provided

Restore the original prompt if provided... including if it's empty now that empty prompts are allowed if there are modifiers.
This commit is contained in:
patriceac 2022-12-28 18:52:18 -08:00 committed by GitHub
parent 451ab7e84c
commit ae31813239
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -294,9 +294,12 @@ function restoreTaskToUI(task, fieldsToSkip) {
}
}
// restore the original tag
promptField.value = task.reqBody.original_prompt || task.reqBody.prompt
// restore the original prompt if provided (e.g. use settings), fallback to prompt as needed (e.g. copy/paste or d&d)
promptField.value = task.reqBody.original_prompt
if (!('original_prompt' in task.reqBody)) {
promptField.value = task.reqBody.prompt
}
// properly reset checkboxes
if (!('use_face_correction' in task.reqBody)) {
useFaceCorrectionField.checked = false