mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-06 16:31:12 +08:00
codex-lens: harden CLI embedding errors and flags
This commit is contained in:
@@ -55,6 +55,11 @@ except ImportError:
|
||||
def is_embedding_backend_available(_backend: str): # type: ignore[no-redef]
|
||||
return False, "codexlens.semantic not available"
|
||||
|
||||
try:
|
||||
from codexlens.semantic.vector_store import VectorStore
|
||||
except ImportError: # pragma: no cover
|
||||
VectorStore = None # type: ignore[assignment]
|
||||
|
||||
try:
|
||||
from codexlens.config import VECTORS_META_DB_NAME
|
||||
except ImportError:
|
||||
@@ -720,6 +725,11 @@ def generate_embeddings(
|
||||
# effective_batch_size is calculated above (dynamic or EMBEDDING_BATCH_SIZE fallback)
|
||||
|
||||
try:
|
||||
if VectorStore is None:
|
||||
return {
|
||||
"success": False,
|
||||
"error": "Semantic search not available (VectorStore import failed). Install with: pip install codexlens[semantic]",
|
||||
}
|
||||
with VectorStore(index_path) as vector_store:
|
||||
# Check model compatibility with existing embeddings
|
||||
if not force:
|
||||
|
||||
Reference in New Issue
Block a user