feat: 增强解决方案管理功能,支持按解决方案 ID 过滤和简要输出,优化嵌入模型配置读取

This commit is contained in:
catlog22
2026-01-07 09:31:52 +08:00
parent 05f762117a
commit 86d3e36722
5 changed files with 267 additions and 97 deletions

View File

@@ -605,13 +605,20 @@ class HybridSearchEngine:
index_root = hnsw_path.parent
model_config = None
# Try to get model config from the provided index_path first
# Try to get model config from the centralized index root first
# (not the sub-directory index_path, which may have outdated config)
try:
from codexlens.semantic.vector_store import VectorStore
with VectorStore(index_path) as vs:
model_config = vs.get_model_config()
except Exception:
pass
central_index_path = index_root / "_index.db"
if central_index_path.exists():
with VectorStore(central_index_path) as vs:
model_config = vs.get_model_config()
self.logger.debug(
"Loaded model config from centralized index: %s",
model_config
)
except Exception as e:
self.logger.debug("Failed to load model config from centralized index: %s", e)
# Detect dimension from HNSW file if model config not found
if model_config is None: