From 76d9afd43bfd0b312c0b106a8031adde66570c25 Mon Sep 17 00:00:00 2001 From: Momentry Studio Date: Fri, 23 Oct 2026 04:56:56 +0800 Subject: [PATCH] fix: use vlm_description_localized field name from Core API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Changed vlm_description_lang to vlm_description_localized - Core API outputs vlm_description (EN) + vlm_description_localized (JA) - Frontend shows localized first: 【JA】...【English】... --- src/views/SearchView.vue | 60 ++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/views/SearchView.vue b/src/views/SearchView.vue index b3ef850..b5c2467 100644 --- a/src/views/SearchView.vue +++ b/src/views/SearchView.vue @@ -1127,7 +1127,7 @@ async function sendMessage() { return { ...sEn, vlm_description_en: sEn.vlm_description || '', - vlm_description_lang: sLang?.vlm_description || '', + vlm_description_localized: sLang?.vlm_description || '', vlm_description: sEn.vlm_description || '' } }) @@ -1138,7 +1138,7 @@ async function sendMessage() { return { ...tEn, vlm_description_en: tEn.vlm_description || '', - vlm_description_lang: tLang?.vlm_description || '', + vlm_description_localized: tLang?.vlm_description || '', vlm_description: tEn.vlm_description || '' } }) @@ -1182,14 +1182,14 @@ async function sendMessage() { let vlmDesc = s.vlm_description || '' let textContent = vlmDesc - if (bilingual && s.vlm_description_en && s.vlm_description_lang) { + if (bilingual && s.vlm_description_en && s.vlm_description_localized) { // Show localized language first, then English - textContent = `【${outputLang.toUpperCase()}】\n${s.vlm_description_lang}\n\n【English】\n${s.vlm_description_en}` - vlmDesc = s.vlm_description_lang - } else if (bilingual && s.vlm_description_lang) { + textContent = `【${outputLang.toUpperCase()}】\n${s.vlm_description_localized}\n\n【English】\n${s.vlm_description_en}` + vlmDesc = s.vlm_description_localized + } else if (bilingual && s.vlm_description_localized) { // Only localized language available - textContent = `【${outputLang.toUpperCase()}】\n${s.vlm_description_lang}` - vlmDesc = s.vlm_description_lang + textContent = `【${outputLang.toUpperCase()}】\n${s.vlm_description_localized}` + vlmDesc = s.vlm_description_localized } else if (bilingual && s.vlm_description_en) { // Only English available textContent = `【English】\n${s.vlm_description_en}` @@ -1210,7 +1210,7 @@ async function sendMessage() { thumbnail_url: `${base}/api/v1/file/${s.file_uuid}/scenes/scene_${String(sceneIndex).padStart(3, '0')}.jpg`, bilingual, vlm_description_en: s.vlm_description_en, - vlm_description_lang: s.vlm_description_lang + vlm_description_localized: s.vlm_description_localized } }) @@ -1225,14 +1225,14 @@ async function sendMessage() { let vlmDesc = t.vlm_description || '' let textContent = vlmDesc - if (bilingual && t.vlm_description_en && t.vlm_description_lang) { + if (bilingual && t.vlm_description_en && t.vlm_description_localized) { // Show localized language first, then English - textContent = `【${outputLang.toUpperCase()}】\n${t.vlm_description_lang}\n\n【English】\n${t.vlm_description_en}` - vlmDesc = t.vlm_description_lang - } else if (bilingual && t.vlm_description_lang) { + textContent = `【${outputLang.toUpperCase()}】\n${t.vlm_description_localized}\n\n【English】\n${t.vlm_description_en}` + vlmDesc = t.vlm_description_localized + } else if (bilingual && t.vlm_description_localized) { // Only localized language available - textContent = `【${outputLang.toUpperCase()}】\n${t.vlm_description_lang}` - vlmDesc = t.vlm_description_lang + textContent = `【${outputLang.toUpperCase()}】\n${t.vlm_description_localized}` + vlmDesc = t.vlm_description_localized } else if (bilingual && t.vlm_description_en) { // Only English available textContent = `【English】\n${t.vlm_description_en}` @@ -1252,7 +1252,7 @@ async function sendMessage() { similarity: t.score ?? null, bilingual, vlm_description_en: t.vlm_description_en, - vlm_description_lang: t.vlm_description_lang + vlm_description_localized: t.vlm_description_localized } }) @@ -1354,12 +1354,12 @@ async function loadMore() { let vlmDesc = s.vlm_description || '' let textContent = vlmDesc - if (bilingual && s.vlm_description_en && s.vlm_description_lang) { - textContent = `【${outputLang.toUpperCase()}】\n${s.vlm_description_lang}\n\n【English】\n${s.vlm_description_en}` - vlmDesc = s.vlm_description_lang - } else if (bilingual && s.vlm_description_lang) { - textContent = `【${outputLang.toUpperCase()}】\n${s.vlm_description_lang}` - vlmDesc = s.vlm_description_lang + if (bilingual && s.vlm_description_en && s.vlm_description_localized) { + textContent = `【${outputLang.toUpperCase()}】\n${s.vlm_description_localized}\n\n【English】\n${s.vlm_description_en}` + vlmDesc = s.vlm_description_localized + } else if (bilingual && s.vlm_description_localized) { + textContent = `【${outputLang.toUpperCase()}】\n${s.vlm_description_localized}` + vlmDesc = s.vlm_description_localized } else if (bilingual && s.vlm_description_en) { textContent = `【English】\n${s.vlm_description_en}` vlmDesc = s.vlm_description_en @@ -1380,7 +1380,7 @@ async function loadMore() { vlm_tags: s.vlm_tags || [], bilingual, vlm_description_en: s.vlm_description_en, - vlm_description_lang: s.vlm_description_lang, + vlm_description_localized: s.vlm_description_localized, search_query: q } }) @@ -1389,12 +1389,12 @@ async function loadMore() { let vlmDesc = t.vlm_description || '' let textContent = vlmDesc - if (bilingual && t.vlm_description_en && t.vlm_description_lang) { - textContent = `【${outputLang.toUpperCase()}】\n${t.vlm_description_lang}\n\n【English】\n${t.vlm_description_en}` - vlmDesc = t.vlm_description_lang - } else if (bilingual && t.vlm_description_lang) { - textContent = `【${outputLang.toUpperCase()}】\n${t.vlm_description_lang}` - vlmDesc = t.vlm_description_lang + if (bilingual && t.vlm_description_en && t.vlm_description_localized) { + textContent = `【${outputLang.toUpperCase()}】\n${t.vlm_description_localized}\n\n【English】\n${t.vlm_description_en}` + vlmDesc = t.vlm_description_localized + } else if (bilingual && t.vlm_description_localized) { + textContent = `【${outputLang.toUpperCase()}】\n${t.vlm_description_localized}` + vlmDesc = t.vlm_description_localized } else if (bilingual && t.vlm_description_en) { textContent = `【English】\n${t.vlm_description_en}` vlmDesc = t.vlm_description_en @@ -1412,7 +1412,7 @@ async function loadMore() { trace_id: t.trace_id, bilingual, vlm_description_en: t.vlm_description_en, - vlm_description_lang: t.vlm_description_lang, + vlm_description_localized: t.vlm_description_localized, search_query: q } })