Fix issue where cache misses occur when translateBeforeHTMLFormatting is disabled.

This commit is contained in:
Bo26fhmC5M
2024-11-30 08:53:55 +09:00
parent 5ebb934d3b
commit daa9ed79c8

View File

@@ -140,11 +140,12 @@
translateText = false translateText = false
try { try {
if(DBState.db.autoTranslate){ if(DBState.db.autoTranslate){
if(DBState.db.autoTranslateCachedOnly && DBState.db.translatorType === "llm"){ if(DBState.db.autoTranslateCachedOnly && DBState.db.translatorType === 'llm'){
const cache = await getLLMCache(data) const cache = DBState.db.translateBeforeHTMLFormatting
if(cache !== null){ ? await getLLMCache(data)
translateText = true : await getLLMCache(await ParseMarkdown(data, charArg, 'pretranslate', chatID, getCbsCondition()))
}
translateText = cache !== null
} }
else{ else{
translateText = true translateText = true