Special keywords are not excluded as duplicates
Special keywords like AND and BREAK might be written multiple times within the prompt, so I've made changes to ensure they are not excluded even if they appear duplicated.pull/4/head
parent
57a7d7e74f
commit
fdac8b4e76
|
|
@ -53,10 +53,15 @@
|
|||
if (!cleanArray.includes(cleanedTag)) {
|
||||
cleanArray.push(cleanedTag)
|
||||
finalArray.push(tag)
|
||||
} else {
|
||||
finalArray.push(tag.replace(cleanedTag, ''))
|
||||
return
|
||||
}
|
||||
|
||||
if (/^(AND|BREAK)$/.test(cleanedTag)) {
|
||||
finalArray.push(tag)
|
||||
return
|
||||
}
|
||||
|
||||
finalArray.push(tag.replace(cleanedTag, ''))
|
||||
})
|
||||
|
||||
input = finalArray.join(', ')
|
||||
|
|
|
|||
Loading…
Reference in New Issue