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    TextRefsReport, TextReference, create_text_file, delete_lines, extract_word_at_position,
38    find_files,
39    find_referencing_symbols_via_text, insert_after_symbol, insert_at_line, insert_before_symbol,
40    list_dir, read_file, replace_content, replace_lines, replace_symbol_body, search_for_pattern,
41    search_for_pattern_smart,
42};
43pub use git::{ChangedFile, DiffSymbol, DiffSymbolEntry, get_changed_files, get_diff_symbols};
44pub use import_graph::{
45    BlastRadiusEntry, DeadCodeEntry, DeadCodeEntryV2, GraphCache, ImportanceEntry, ImporterEntry,
46    extract_imports_for_file, find_dead_code, find_dead_code_v2, get_blast_radius, get_importance,
47    get_importers, resolve_module_for_file, supports_import_graph,
48};
49pub use lsp::{
50    LSP_RECIPES, LspDiagnostic, LspDiagnosticRequest, LspRecipe, LspReference, LspRenamePlan,
51    LspRenamePlanRequest, LspRequest, LspSessionPool, LspStatus, LspTypeHierarchyRequest,
52    LspWorkspaceSymbol, LspWorkspaceSymbolRequest, check_lsp_status, default_lsp_args_for_command,
53    default_lsp_command_for_extension, default_lsp_command_for_path,
54    find_referencing_symbols_via_lsp, get_diagnostics_via_lsp, get_lsp_recipe,
55    get_rename_plan_via_lsp, get_type_hierarchy_via_lsp, lsp_binary_exists,
56    search_workspace_symbols_via_lsp,
57};
58pub use project::{
59    ProjectRoot, WorkspacePackage, compute_dominant_language, detect_frameworks,
60    detect_workspace_packages,
61};
62pub use rename::{
63    RenameEdit, RenameResult, RenameScope, apply_edits, find_all_word_matches, rename_symbol,
64};
65pub mod change_signature;
66pub mod inline;
67pub mod ir;
68pub mod move_symbol;
69pub mod oxc_analysis;
70#[cfg(feature = "scip-backend")]
71pub mod scip_backend;
72#[cfg(feature = "semantic")]
73pub use embedding::{
74    EmbeddingEngine, EmbeddingIndexInfo, EmbeddingRuntimeInfo, SemanticMatch,
75    configured_embedding_model_name, configured_embedding_runtime_info,
76    configured_embedding_runtime_preference, configured_embedding_threads,
77    embedding_model_assets_available,
78};
79#[cfg(feature = "scip-backend")]
80pub use scip_backend::ScipBackend;
81pub use scope_analysis::{
82    ReferenceKind, ScopedReference, find_scoped_references, find_scoped_references_in_file,
83};
84pub use search::{SearchResult, search_symbols_hybrid, search_symbols_hybrid_with_semantic};
85pub use symbols::{
86    IndexStats, RankedContextEntry, RankedContextResult, SymbolIndex, SymbolInfo, SymbolKind,
87    SymbolProvenance, find_symbol, find_symbol_range, get_symbols_overview, make_symbol_id,
88    parse_symbol_id, sparse_coverage_bonus_from_fields, sparse_max_bonus, sparse_threshold,
89    sparse_weighting_enabled,
90};
91pub use type_hierarchy::{TypeHierarchyResult, TypeNode, get_type_hierarchy_native};
92pub use watcher::{FileWatcher, WatcherStats};
93// Semantic IR — new types only; existing types are already re-exported above.
94pub use ir::{
95    CodeDiagnostic, DiagnosticSeverity, EditAction, EditActionKind, EditPlan, ImpactKind,
96    ImpactNode, IntelligenceSource, IrCallEdge, PreciseBackend, Relation, RelationKind,
97    RetrievalConfig, RetrievalStage, RetrievalWeights, SearchCandidate,
98};