feat: Enhance CodexLens with GPU support and semantic status improvements

- Added accelerator and providers fields to SemanticStatus interface.
- Updated checkSemanticStatus function to retrieve ONNX providers and accelerator type.
- Introduced detectGpuSupport function to identify available GPU modes (CUDA, DirectML).
- Modified installSemantic function to support GPU acceleration modes and clean up ONNX Runtime installations.
- Updated package requirements in PKG-INFO for semantic-gpu and semantic-directml extras.
- Added new source files for GPU support and enrichment functionalities.
- Updated tests to cover new features and ensure comprehensive testing.
This commit is contained in:
catlog22
2025-12-22 17:42:26 +08:00
parent 72f24bf535
commit acdfbb4644
9 changed files with 1215 additions and 98 deletions

View File

@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: codex-lens
Version: 0.1.0
Version: 0.2.0
Summary: CodexLens multi-modal code analysis platform
Author: CodexLens contributors
License: MIT
@@ -17,7 +17,18 @@ Requires-Dist: tree-sitter-typescript>=0.23
Requires-Dist: pathspec>=0.11
Provides-Extra: semantic
Requires-Dist: numpy>=1.24; extra == "semantic"
Requires-Dist: fastembed>=0.2; extra == "semantic"
Requires-Dist: fastembed>=0.5; extra == "semantic"
Requires-Dist: hnswlib>=0.8.0; extra == "semantic"
Provides-Extra: semantic-gpu
Requires-Dist: numpy>=1.24; extra == "semantic-gpu"
Requires-Dist: fastembed>=0.5; extra == "semantic-gpu"
Requires-Dist: hnswlib>=0.8.0; extra == "semantic-gpu"
Requires-Dist: onnxruntime-gpu>=1.18.0; extra == "semantic-gpu"
Provides-Extra: semantic-directml
Requires-Dist: numpy>=1.24; extra == "semantic-directml"
Requires-Dist: fastembed>=0.5; extra == "semantic-directml"
Requires-Dist: hnswlib>=0.8.0; extra == "semantic-directml"
Requires-Dist: onnxruntime-directml>=1.18.0; extra == "semantic-directml"
Provides-Extra: encoding
Requires-Dist: chardet>=5.0; extra == "encoding"
Provides-Extra: full

View File

@@ -11,8 +11,11 @@ src/codexlens/entities.py
src/codexlens/errors.py
src/codexlens/cli/__init__.py
src/codexlens/cli/commands.py
src/codexlens/cli/embedding_manager.py
src/codexlens/cli/model_manager.py
src/codexlens/cli/output.py
src/codexlens/indexing/__init__.py
src/codexlens/indexing/symbol_extractor.py
src/codexlens/parsers/__init__.py
src/codexlens/parsers/encoding.py
src/codexlens/parsers/factory.py
@@ -20,15 +23,16 @@ src/codexlens/parsers/tokenizer.py
src/codexlens/parsers/treesitter_parser.py
src/codexlens/search/__init__.py
src/codexlens/search/chain_search.py
src/codexlens/search/enrichment.py
src/codexlens/search/hybrid_search.py
src/codexlens/search/query_parser.py
src/codexlens/search/ranking.py
src/codexlens/semantic/__init__.py
src/codexlens/semantic/ann_index.py
src/codexlens/semantic/chunker.py
src/codexlens/semantic/code_extractor.py
src/codexlens/semantic/embedder.py
src/codexlens/semantic/graph_analyzer.py
src/codexlens/semantic/llm_enhancer.py
src/codexlens/semantic/gpu_support.py
src/codexlens/semantic/vector_store.py
src/codexlens/storage/__init__.py
src/codexlens/storage/dir_index.py
@@ -42,38 +46,38 @@ src/codexlens/storage/sqlite_utils.py
src/codexlens/storage/migrations/__init__.py
src/codexlens/storage/migrations/migration_001_normalize_keywords.py
src/codexlens/storage/migrations/migration_002_add_token_metadata.py
src/codexlens/storage/migrations/migration_003_code_relationships.py
src/codexlens/storage/migrations/migration_004_dual_fts.py
src/codexlens/storage/migrations/migration_005_cleanup_unused_fields.py
tests/test_chain_search_engine.py
tests/test_ann_index.py
tests/test_cli_hybrid_search.py
tests/test_cli_output.py
tests/test_code_extractor.py
tests/test_config.py
tests/test_dual_fts.py
tests/test_encoding.py
tests/test_enrichment.py
tests/test_entities.py
tests/test_errors.py
tests/test_file_cache.py
tests/test_graph_analyzer.py
tests/test_graph_cli.py
tests/test_graph_storage.py
tests/test_hybrid_chunker.py
tests/test_hybrid_search_e2e.py
tests/test_incremental_indexing.py
tests/test_llm_enhancer.py
tests/test_parser_integration.py
tests/test_parsers.py
tests/test_performance_optimizations.py
tests/test_pure_vector_search.py
tests/test_query_parser.py
tests/test_result_grouping.py
tests/test_rrf_fusion.py
tests/test_schema_cleanup_migration.py
tests/test_search_comparison.py
tests/test_search_comprehensive.py
tests/test_search_full_coverage.py
tests/test_search_performance.py
tests/test_semantic.py
tests/test_semantic_search.py
tests/test_storage.py
tests/test_symbol_extractor.py
tests/test_token_chunking.py
tests/test_token_storage.py
tests/test_tokenizer.py

View File

@@ -15,4 +15,17 @@ tiktoken>=0.5.0
[semantic]
numpy>=1.24
fastembed>=0.2
fastembed>=0.5
hnswlib>=0.8.0
[semantic-directml]
numpy>=1.24
fastembed>=0.5
hnswlib>=0.8.0
onnxruntime-directml>=1.18.0
[semantic-gpu]
numpy>=1.24
fastembed>=0.5
hnswlib>=0.8.0
onnxruntime-gpu>=1.18.0