Skip to main content

codelens_engine/
lib.rs

1pub mod auto_import;
2pub mod call_graph;
3pub mod circular;
4pub mod community;
5pub mod coupling;
6pub mod db;
7#[cfg(feature = "semantic")]
8pub mod embedding;
9pub mod embedding_store;
10pub mod file_ops;
11pub mod git;
12pub mod import_graph;
13pub(crate) mod lang_config;
14pub mod lang_registry;
15pub mod lsp;
16pub mod memory;
17pub mod project;
18pub mod rename;
19pub mod scope_analysis;
20pub mod search;
21pub mod symbols;
22pub mod type_hierarchy;
23pub mod vfs;
24pub mod watcher;
25
26pub use auto_import::{
27    ImportSuggestion, MissingImportAnalysis, add_import, analyze_missing_imports,
28};
29pub use call_graph::{CallEdge, CalleeEntry, CallerEntry, extract_calls, get_callees, get_callers};
30pub use circular::{CircularDependency, find_circular_dependencies};
31pub use coupling::{CouplingEntry, get_change_coupling};
32pub use db::{
33    DirStats, IndexDb, NewCall, NewImport, NewSymbol, SymbolWithFile, content_hash, index_db_path,
34};
35pub use file_ops::{
36    DirectoryEntry, EnclosingSymbol, FileMatch, FileReadResult, PatternMatch, SmartPatternMatch,
37    TextReference, create_text_file, delete_lines, extract_word_at_position, find_files,
38    find_referencing_symbols_via_text, insert_after_symbol, insert_at_line, insert_before_symbol,
39    list_dir, read_file, replace_content, replace_lines, replace_symbol_body, search_for_pattern,
40    search_for_pattern_smart,
41};
42pub use git::{ChangedFile, DiffSymbol, DiffSymbolEntry, get_changed_files, get_diff_symbols};
43pub use import_graph::{
44    BlastRadiusEntry, DeadCodeEntry, DeadCodeEntryV2, GraphCache, ImportanceEntry, ImporterEntry,
45    extract_imports_for_file, find_dead_code, find_dead_code_v2, get_blast_radius, get_importance,
46    get_importers, resolve_module_for_file, supports_import_graph,
47};
48pub use lsp::{
49    LSP_RECIPES, LspDiagnostic, LspDiagnosticRequest, LspRecipe, LspReference, LspRenamePlan,
50    LspRenamePlanRequest, LspRequest, LspSessionPool, LspStatus, LspTypeHierarchyRequest,
51    LspWorkspaceSymbol, LspWorkspaceSymbolRequest, check_lsp_status, default_lsp_args_for_command,
52    default_lsp_command_for_extension, default_lsp_command_for_path,
53    find_referencing_symbols_via_lsp, get_diagnostics_via_lsp, get_lsp_recipe,
54    get_rename_plan_via_lsp, get_type_hierarchy_via_lsp, lsp_binary_exists,
55    search_workspace_symbols_via_lsp,
56};
57pub use project::{
58    ProjectRoot, WorkspacePackage, compute_dominant_language, detect_frameworks,
59    detect_workspace_packages,
60};
61pub use rename::{
62    RenameEdit, RenameResult, RenameScope, apply_edits, find_all_word_matches, rename_symbol,
63};
64pub mod change_signature;
65pub mod inline;
66pub mod ir;
67pub mod move_symbol;
68pub mod oxc_analysis;
69#[cfg(feature = "semantic")]
70pub use embedding::{
71    EmbeddingEngine, EmbeddingIndexInfo, EmbeddingRuntimeInfo, SemanticMatch,
72    configured_embedding_model_name, configured_embedding_runtime_info,
73    configured_embedding_runtime_preference, configured_embedding_threads,
74    embedding_model_assets_available,
75};
76pub use scope_analysis::{
77    ReferenceKind, ScopedReference, find_scoped_references, find_scoped_references_in_file,
78};
79pub use search::{SearchResult, search_symbols_hybrid, search_symbols_hybrid_with_semantic};
80pub use symbols::{
81    IndexStats, RankedContextEntry, RankedContextResult, SymbolIndex, SymbolInfo, SymbolKind,
82    find_symbol, find_symbol_range, get_symbols_overview, make_symbol_id, parse_symbol_id,
83    sparse_coverage_bonus_from_fields, sparse_max_bonus, sparse_threshold,
84    sparse_weighting_enabled,
85};
86pub use type_hierarchy::{TypeHierarchyResult, TypeNode, get_type_hierarchy_native};
87pub use watcher::{FileWatcher, WatcherStats};
88// Semantic IR — new types only; existing types are already re-exported above.
89pub use ir::{
90    EditAction, EditActionKind, EditPlan, ImpactKind, ImpactNode, IrCallEdge, Relation,
91    RelationKind, RetrievalConfig, RetrievalStage, RetrievalWeights,
92};