fix(frontend): use storage_provider_config instead of legacy storage_config

The backend introduced storage_provider_config as the authoritative
field in commit dbab7b0, but the frontend was never updated to use it.
This caused the UI to always display "local" regardless of the actual
storage provider, and saving KB settings could overwrite the correct
storage_provider_config with an incorrect value.

Changes:
- KnowledgeBaseEditorModal.vue: read from storage_provider_config with
  storage_config fallback, dual-write both fields on save
- KnowledgeBaseList.vue: update feature badge logic and add type def
  for storage_provider_config, exclude "local" from badge display
- api/knowledge-base/index.ts: add storage_provider_config to API type
- ko-KR.ts, ru-RU.ts: add missing i18n keys — multimodal section
  (sidebar.multimodal, multimodal.title/description), channel labels
  (channelLabel, channelWeb, channelApi, etc.), and agent.think
This commit is contained in:
ochan.kwon
2026-04-01 16:37:13 +09:00
committed by lyingbug
parent 258a786129
commit 25379f5df5
5 changed files with 46 additions and 6 deletions
@@ -438,7 +438,7 @@ const loadKBData = async () => {
parentChunkSize: kb.chunking_config?.parent_chunk_size || 4096,
childChunkSize: kb.chunking_config?.child_chunk_size || 384
},
storageProvider: (kb.storage_config?.provider || 'local') as string,
storageProvider: (kb.storage_provider_config?.provider || kb.storage_config?.provider || 'local') as string,
multimodalConfig: {
enabled: !!kb.vlm_config?.enabled,
vllmModelId: kb.vlm_config?.model_id || ''
@@ -594,6 +594,10 @@ const buildSubmitData = () => {
}
// 存储引擎:仅传 provider,参数从全局设置读取
// Write to storage_provider_config (authoritative) + storage_config (legacy dual-write)
data.storage_provider_config = {
provider: formData.value.storageProvider || 'local'
}
data.storage_config = {
provider: formData.value.storageProvider || 'local'
}
@@ -713,7 +717,7 @@ const doSubmit = async () => {
multimodal: {
enabled: !!data.vlm_config?.enabled
},
storageProvider: data.storage_config?.provider || 'local',
storageProvider: data.storage_provider_config?.provider || data.storage_config?.provider || 'local',
nodeExtract: {
enabled: data.extract_config?.enabled || false,
text: data.extract_config?.text || '',