Allow empty prompts; Allow collapsing a results box for an empty prompt

This commit is contained in:
cmdr2 2022-10-18 19:02:34 +05:30
parent ac7a5488ee
commit 2f2bddf020

View File

@ -984,12 +984,19 @@ function createTask(task) {
imagePreview.insertBefore(taskEntry, previewTools.nextSibling)
task.previewPrompt.innerText = task.reqBody.prompt
if (task.previewPrompt.innerText.trim() === '') {
task.previewPrompt.innerHTML = ' ' // allows the results to be collapsed
}
taskQueue.unshift(task)
}
function getPrompts() {
let prompts = promptField.value
if (prompts.trim() === '') {
return ['']
}
prompts = prompts.split('\n')
let promptsToMake = []