#
tokens: 49322/50000 57/422 files (page 2/17)
lines: off (toggle) GitHub
raw markdown copy
This is page 2 of 17. Use http://codebase.md/shashankss1205/codegraphcontext?page={x} to view the full context.

# Directory Structure

```
├── .cgcignore
├── .github
│   ├── FUNDING.yml
│   └── workflows
│       ├── e2e-tests.yml
│       ├── post_discord_invite.yml
│       ├── test.yml
│       └── update-contributors.yml
├── .gitignore
├── CLI_Commands.md
├── CONTRIBUTING.md
├── contributors.md
├── docs
│   ├── docs
│   │   ├── architecture.md
│   │   ├── cli.md
│   │   ├── contributing_languages.md
│   │   ├── contributing.md
│   │   ├── cookbook.md
│   │   ├── core.md
│   │   ├── future_work.md
│   │   ├── images
│   │   │   ├── 1.png
│   │   │   ├── 11.png
│   │   │   ├── 12.png
│   │   │   ├── 13.png
│   │   │   ├── 14.png
│   │   │   ├── 16.png
│   │   │   ├── 19.png
│   │   │   ├── 2.png
│   │   │   ├── 20.png
│   │   │   ├── 21.png
│   │   │   ├── 22.png
│   │   │   ├── 23.png
│   │   │   ├── 24.png
│   │   │   ├── 26.png
│   │   │   ├── 28.png
│   │   │   ├── 29.png
│   │   │   ├── 3.png
│   │   │   ├── 30.png
│   │   │   ├── 31.png
│   │   │   ├── 32.png
│   │   │   ├── 33.png
│   │   │   ├── 34.png
│   │   │   ├── 35.png
│   │   │   ├── 36.png
│   │   │   ├── 38.png
│   │   │   ├── 39.png
│   │   │   ├── 4.png
│   │   │   ├── 40.png
│   │   │   ├── 41.png
│   │   │   ├── 42.png
│   │   │   ├── 43.png
│   │   │   ├── 44.png
│   │   │   ├── 5.png
│   │   │   ├── 6.png
│   │   │   ├── 7.png
│   │   │   ├── 8.png
│   │   │   ├── 9.png
│   │   │   ├── Indexing.gif
│   │   │   ├── tool_images
│   │   │   │   ├── 1.png
│   │   │   │   ├── 2.png
│   │   │   │   └── 3.png
│   │   │   └── Usecase.gif
│   │   ├── index.md
│   │   ├── installation.md
│   │   ├── license.md
│   │   ├── server.md
│   │   ├── tools.md
│   │   ├── troubleshooting.md
│   │   ├── use_cases.md
│   │   └── watching.md
│   ├── mkdocs.yml
│   └── site
│       ├── 404.html
│       ├── architecture
│       │   └── index.html
│       ├── assets
│       │   ├── images
│       │   │   └── favicon.png
│       │   ├── javascripts
│       │   │   ├── bundle.79ae519e.min.js
│       │   │   ├── bundle.79ae519e.min.js.map
│       │   │   ├── lunr
│       │   │   │   ├── min
│       │   │   │   │   ├── lunr.ar.min.js
│       │   │   │   │   ├── lunr.da.min.js
│       │   │   │   │   ├── lunr.de.min.js
│       │   │   │   │   ├── lunr.du.min.js
│       │   │   │   │   ├── lunr.el.min.js
│       │   │   │   │   ├── lunr.es.min.js
│       │   │   │   │   ├── lunr.fi.min.js
│       │   │   │   │   ├── lunr.fr.min.js
│       │   │   │   │   ├── lunr.he.min.js
│       │   │   │   │   ├── lunr.hi.min.js
│       │   │   │   │   ├── lunr.hu.min.js
│       │   │   │   │   ├── lunr.hy.min.js
│       │   │   │   │   ├── lunr.it.min.js
│       │   │   │   │   ├── lunr.ja.min.js
│       │   │   │   │   ├── lunr.jp.min.js
│       │   │   │   │   ├── lunr.kn.min.js
│       │   │   │   │   ├── lunr.ko.min.js
│       │   │   │   │   ├── lunr.multi.min.js
│       │   │   │   │   ├── lunr.nl.min.js
│       │   │   │   │   ├── lunr.no.min.js
│       │   │   │   │   ├── lunr.pt.min.js
│       │   │   │   │   ├── lunr.ro.min.js
│       │   │   │   │   ├── lunr.ru.min.js
│       │   │   │   │   ├── lunr.sa.min.js
│       │   │   │   │   ├── lunr.stemmer.support.min.js
│       │   │   │   │   ├── lunr.sv.min.js
│       │   │   │   │   ├── lunr.ta.min.js
│       │   │   │   │   ├── lunr.te.min.js
│       │   │   │   │   ├── lunr.th.min.js
│       │   │   │   │   ├── lunr.tr.min.js
│       │   │   │   │   ├── lunr.vi.min.js
│       │   │   │   │   └── lunr.zh.min.js
│       │   │   │   ├── tinyseg.js
│       │   │   │   └── wordcut.js
│       │   │   └── workers
│       │   │       ├── search.2c215733.min.js
│       │   │       └── search.2c215733.min.js.map
│       │   └── stylesheets
│       │       ├── main.484c7ddc.min.css
│       │       ├── main.484c7ddc.min.css.map
│       │       ├── palette.ab4e12ef.min.css
│       │       └── palette.ab4e12ef.min.css.map
│       ├── cli
│       │   └── index.html
│       ├── contributing
│       │   └── index.html
│       ├── contributing_languages
│       │   └── index.html
│       ├── cookbook
│       │   └── index.html
│       ├── core
│       │   └── index.html
│       ├── future_work
│       │   └── index.html
│       ├── images
│       │   ├── 1.png
│       │   ├── 11.png
│       │   ├── 12.png
│       │   ├── 13.png
│       │   ├── 14.png
│       │   ├── 16.png
│       │   ├── 19.png
│       │   ├── 2.png
│       │   ├── 20.png
│       │   ├── 21.png
│       │   ├── 22.png
│       │   ├── 23.png
│       │   ├── 24.png
│       │   ├── 26.png
│       │   ├── 28.png
│       │   ├── 29.png
│       │   ├── 3.png
│       │   ├── 30.png
│       │   ├── 31.png
│       │   ├── 32.png
│       │   ├── 33.png
│       │   ├── 34.png
│       │   ├── 35.png
│       │   ├── 36.png
│       │   ├── 38.png
│       │   ├── 39.png
│       │   ├── 4.png
│       │   ├── 40.png
│       │   ├── 41.png
│       │   ├── 42.png
│       │   ├── 43.png
│       │   ├── 44.png
│       │   ├── 5.png
│       │   ├── 6.png
│       │   ├── 7.png
│       │   ├── 8.png
│       │   ├── 9.png
│       │   ├── Indexing.gif
│       │   ├── tool_images
│       │   │   ├── 1.png
│       │   │   ├── 2.png
│       │   │   └── 3.png
│       │   └── Usecase.gif
│       ├── index.html
│       ├── installation
│       │   └── index.html
│       ├── license
│       │   └── index.html
│       ├── search
│       │   └── search_index.json
│       ├── server
│       │   └── index.html
│       ├── sitemap.xml
│       ├── sitemap.xml.gz
│       ├── tools
│       │   └── index.html
│       ├── troubleshooting
│       │   └── index.html
│       ├── use_cases
│       │   └── index.html
│       └── watching
│           └── index.html
├── funding.json
├── images
│   ├── 1.png
│   ├── 11.png
│   ├── 12.png
│   ├── 13.png
│   ├── 14.png
│   ├── 16.png
│   ├── 19.png
│   ├── 2.png
│   ├── 20.png
│   ├── 21.png
│   ├── 22.png
│   ├── 23.png
│   ├── 24.png
│   ├── 26.png
│   ├── 28.png
│   ├── 29.png
│   ├── 3.png
│   ├── 30.png
│   ├── 31.png
│   ├── 32.png
│   ├── 33.png
│   ├── 34.png
│   ├── 35.png
│   ├── 36.png
│   ├── 38.png
│   ├── 39.png
│   ├── 4.png
│   ├── 40.png
│   ├── 41.png
│   ├── 42.png
│   ├── 43.png
│   ├── 44.png
│   ├── 5.png
│   ├── 6.png
│   ├── 7.png
│   ├── 8.png
│   ├── 9.png
│   ├── Indexing.gif
│   ├── tool_images
│   │   ├── 1.png
│   │   ├── 2.png
│   │   └── 3.png
│   └── Usecase.gif
├── LICENSE
├── MANIFEST.in
├── organizer
│   ├── CONTRIBUTING_LANGUAGES.md
│   ├── cookbook.md
│   ├── docs.md
│   ├── language_specific_nodes.md
│   ├── Tools_Exploration.md
│   └── troubleshoot.md
├── pyproject.toml
├── README.md
├── scripts
│   ├── generate_lang_contributors.py
│   ├── post_install_fix.sh
│   ├── test_all_parsers.py
│   └── update_language_parsers.py
├── SECURITY.md
├── src
│   └── codegraphcontext
│       ├── __init__.py
│       ├── __main__.py
│       ├── cli
│       │   ├── __init__.py
│       │   ├── cli_helpers.py
│       │   ├── config_manager.py
│       │   ├── main.py
│       │   ├── setup_macos.py
│       │   └── setup_wizard.py
│       ├── core
│       │   ├── __init__.py
│       │   ├── database_falkordb.py
│       │   ├── database.py
│       │   ├── falkor_worker.py
│       │   ├── jobs.py
│       │   └── watcher.py
│       ├── prompts.py
│       ├── server.py
│       ├── tools
│       │   ├── __init__.py
│       │   ├── advanced_language_query_tool.py
│       │   ├── code_finder.py
│       │   ├── graph_builder.py
│       │   ├── languages
│       │   │   ├── c.py
│       │   │   ├── cpp.py
│       │   │   ├── csharp.py
│       │   │   ├── go.py
│       │   │   ├── java.py
│       │   │   ├── javascript.py
│       │   │   ├── kotlin.py
│       │   │   ├── php.py
│       │   │   ├── python.py
│       │   │   ├── ruby.py
│       │   │   ├── rust.py
│       │   │   ├── scala.py
│       │   │   ├── swift.py
│       │   │   ├── typescript.py
│       │   │   └── typescriptjsx.py
│       │   ├── package_resolver.py
│       │   ├── query_tool_languages
│       │   │   ├── c_toolkit.py
│       │   │   ├── cpp_toolkit.py
│       │   │   ├── csharp_toolkit.py
│       │   │   ├── go_toolkit.py
│       │   │   ├── java_toolkit.py
│       │   │   ├── javascript_toolkit.py
│       │   │   ├── python_toolkit.py
│       │   │   ├── ruby_toolkit.py
│       │   │   ├── rust_toolkit.py
│       │   │   ├── scala_toolkit.py
│       │   │   ├── swift_toolkit.py
│       │   │   └── typescript_toolkit.py
│       │   └── system.py
│       └── utils
│           ├── debug_log.py
│           └── tree_sitter_manager.py
├── tests
│   ├── __init__.py
│   ├── conftest.py
│   ├── sample_project
│   │   ├── advanced_calls.py
│   │   ├── advanced_classes.py
│   │   ├── advanced_classes2.py
│   │   ├── advanced_functions.py
│   │   ├── advanced_imports.py
│   │   ├── async_features.py
│   │   ├── callbacks_decorators.py
│   │   ├── circular1.py
│   │   ├── circular2.py
│   │   ├── class_instantiation.py
│   │   ├── cli_and_dunder.py
│   │   ├── complex_classes.py
│   │   ├── comprehensions_generators.py
│   │   ├── context_managers.py
│   │   ├── control_flow.py
│   │   ├── datatypes.py
│   │   ├── dynamic_dispatch.py
│   │   ├── dynamic_imports.py
│   │   ├── edge_cases
│   │   │   ├── comments_only.py
│   │   │   ├── docstring_only.py
│   │   │   ├── empty.py
│   │   │   ├── hardcoded_secrets.py
│   │   │   ├── long_functions.py
│   │   │   └── syntax_error.py
│   │   ├── function_chains.py
│   │   ├── generators.py
│   │   ├── import_reexports.py
│   │   ├── mapping_calls.py
│   │   ├── module_a.py
│   │   ├── module_b.py
│   │   ├── module_c
│   │   │   ├── __init__.py
│   │   │   ├── submodule1.py
│   │   │   └── submodule2.py
│   │   ├── namespace_pkg
│   │   │   └── ns_module.py
│   │   ├── pattern_matching.py
│   │   └── typing_examples.py
│   ├── sample_project_c
│   │   ├── cgc_sample
│   │   ├── include
│   │   │   ├── config.h
│   │   │   ├── math
│   │   │   │   └── vec.h
│   │   │   ├── module.h
│   │   │   ├── platform.h
│   │   │   └── util.h
│   │   ├── Makefile
│   │   ├── README.md
│   │   └── src
│   │       ├── main.c
│   │       ├── math
│   │       │   └── vec.c
│   │       ├── module.c
│   │       └── util.c
│   ├── sample_project_cpp
│   │   ├── class_features.cpp
│   │   ├── classes.cpp
│   │   ├── control_flow.cpp
│   │   ├── edge_cases.cpp
│   │   ├── enum_struct_union.cpp
│   │   ├── exceptions.cpp
│   │   ├── file_io.cpp
│   │   ├── function_chain.cpp
│   │   ├── function_chain.h
│   │   ├── function_types.cpp
│   │   ├── main.cpp
│   │   ├── main.exe
│   │   ├── namespaces.cpp
│   │   ├── raii_example.cpp
│   │   ├── README.md
│   │   ├── sample_project.exe
│   │   ├── stl_usage.cpp
│   │   ├── templates.cpp
│   │   └── types_variable_assignments.cpp
│   ├── sample_project_csharp
│   │   ├── README.md
│   │   └── src
│   │       └── Example.App
│   │           ├── Attributes
│   │           │   └── CustomAttributes.cs
│   │           ├── Example.App.csproj
│   │           ├── Models
│   │           │   ├── Person.cs
│   │           │   ├── Point.cs
│   │           │   ├── Role.cs
│   │           │   └── User.cs
│   │           ├── OuterClass.cs
│   │           ├── Program.cs
│   │           ├── Services
│   │           │   ├── GreetingService.cs
│   │           │   ├── IGreetingService.cs
│   │           │   └── LegacyService.cs
│   │           └── Utils
│   │               ├── CollectionHelper.cs
│   │               └── FileHelper.cs
│   ├── sample_project_go
│   │   ├── advanced_types.go
│   │   ├── basic_functions.go
│   │   ├── embedded_composition.go
│   │   ├── error_handling.go
│   │   ├── generics.go
│   │   ├── go.mod
│   │   ├── goroutines_channels.go
│   │   ├── interfaces.go
│   │   ├── packages_imports.go
│   │   ├── README.md
│   │   ├── structs_methods.go
│   │   └── util
│   │       └── helpers.go
│   ├── sample_project_java
│   │   ├── out
│   │   │   └── com
│   │   │       └── example
│   │   │           └── app
│   │   │               ├── annotations
│   │   │               │   └── Logged.class
│   │   │               ├── Main.class
│   │   │               ├── misc
│   │   │               │   ├── Outer.class
│   │   │               │   └── Outer$Inner.class
│   │   │               ├── model
│   │   │               │   ├── Role.class
│   │   │               │   └── User.class
│   │   │               ├── service
│   │   │               │   ├── AbstractGreeter.class
│   │   │               │   ├── GreetingService.class
│   │   │               │   └── impl
│   │   │               │       └── GreetingServiceImpl.class
│   │   │               └── util
│   │   │                   ├── CollectionUtils.class
│   │   │                   └── IOHelper.class
│   │   ├── README.md
│   │   ├── sources.txt
│   │   └── src
│   │       └── com
│   │           └── example
│   │               └── app
│   │                   ├── annotations
│   │                   │   └── Logged.java
│   │                   ├── Main.java
│   │                   ├── misc
│   │                   │   └── Outer.java
│   │                   ├── model
│   │                   │   ├── Role.java
│   │                   │   └── User.java
│   │                   ├── service
│   │                   │   ├── AbstractGreeter.java
│   │                   │   ├── GreetingService.java
│   │                   │   └── impl
│   │                   │       └── GreetingServiceImpl.java
│   │                   └── util
│   │                       ├── CollectionUtils.java
│   │                       └── IOHelper.java
│   ├── sample_project_javascript
│   │   ├── arrays.js
│   │   ├── asyncAwait.js
│   │   ├── classes.js
│   │   ├── dom.js
│   │   ├── errorHandling.js
│   │   ├── events.js
│   │   ├── exporter.js
│   │   ├── fetchAPI.js
│   │   ├── fixtures
│   │   │   └── js
│   │   │       └── accessors.js
│   │   ├── functions.js
│   │   ├── importer.js
│   │   ├── objects.js
│   │   ├── promises.js
│   │   ├── README.md
│   │   └── variables.js
│   ├── sample_project_kotlin
│   │   ├── AdvancedClasses.kt
│   │   ├── Annotations.kt
│   │   ├── Coroutines.kt
│   │   ├── EdgeCases.kt
│   │   ├── Functions.kt
│   │   ├── Main.kt
│   │   ├── Properties.kt
│   │   └── User.kt
│   ├── sample_project_misc
│   │   ├── index.html
│   │   ├── README.md
│   │   ├── styles.css
│   │   ├── tables.css
│   │   └── tables.html
│   ├── sample_project_php
│   │   ├── classes_objects.php
│   │   ├── database.php
│   │   ├── edgecases.php
│   │   ├── error_handling.php
│   │   ├── file_handling.php
│   │   ├── functions.php
│   │   ├── generators_iterators.php
│   │   ├── globals_superglobals.php
│   │   ├── Inheritance.php
│   │   ├── interface_traits.php
│   │   └── README.md
│   ├── sample_project_ruby
│   │   ├── class_example.rb
│   │   ├── enumerables.rb
│   │   ├── error_handling.rb
│   │   ├── file_io.rb
│   │   ├── inheritance_example.rb
│   │   ├── main.rb
│   │   ├── metaprogramming.rb
│   │   ├── mixins_example.rb
│   │   ├── module_example.rb
│   │   └── tests
│   │       ├── test_mixins.py
│   │       └── test_sample.rb
│   ├── sample_project_rust
│   │   ├── Cargo.toml
│   │   ├── README.md
│   │   └── src
│   │       ├── basic_functions.rs
│   │       ├── concurrency.rs
│   │       ├── error_handling.rs
│   │       ├── generics.rs
│   │       ├── iterators_closures.rs
│   │       ├── lib.rs
│   │       ├── lifetimes_references.rs
│   │       ├── modules.rs
│   │       ├── smart_pointers.rs
│   │       ├── structs_enums.rs
│   │       └── traits.rs
│   ├── sample_project_scala
│   │   ├── Animals.scala
│   │   ├── Complex.scala
│   │   ├── Functional.scala
│   │   ├── Geometry.scala
│   │   ├── Main.scala
│   │   ├── PackageObject.scala
│   │   ├── Script.sc
│   │   ├── Services.scala
│   │   ├── Shapes.scala
│   │   ├── Utils.scala
│   │   └── Variables.scala
│   ├── sample_project_swift
│   │   ├── Generics.swift
│   │   ├── Main.swift
│   │   ├── README.md
│   │   ├── Shapes.swift
│   │   ├── User.swift
│   │   └── Vehicles.swift
│   ├── sample_project_typescript
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── sample_tsx.tsx
│   │   ├── src
│   │   │   ├── advanced-types.ts
│   │   │   ├── async-promises.ts
│   │   │   ├── classes-inheritance.ts
│   │   │   ├── decorators-metadata.ts
│   │   │   ├── error-validation.ts
│   │   │   ├── functions-generics.ts
│   │   │   ├── index.ts
│   │   │   ├── modules-namespaces.ts
│   │   │   ├── types-interfaces.ts
│   │   │   └── utilities-helpers.ts
│   │   └── tsconfig.json
│   ├── test_cpp_parser.py
│   ├── test_database_validation.py
│   ├── test_end_to_end.py
│   ├── test_graph_indexing_js.py
│   ├── test_graph_indexing.py
│   ├── test_kotlin_parser.py
│   ├── test_swift_parser.py
│   ├── test_tree_sitter
│   │   ├── __init__.py
│   │   ├── class_instantiation.py
│   │   ├── complex_classes.py
│   │   └── test_file.py
│   ├── test_tree_sitter_manager.py
│   └── test_typescript_parser.py
├── visualize_graph.py
├── website
│   ├── .example.env
│   ├── .gitignore
│   ├── api
│   │   └── pypi.ts
│   ├── bun.lockb
│   ├── components.json
│   ├── eslint.config.js
│   ├── index.html
│   ├── package-lock.json
│   ├── package.json
│   ├── postcss.config.js
│   ├── public
│   │   ├── favicon.ico
│   │   ├── placeholder.svg
│   │   └── robots.txt
│   ├── README.md
│   ├── src
│   │   ├── App.css
│   │   ├── App.tsx
│   │   ├── assets
│   │   │   ├── function-calls.png
│   │   │   ├── graph-total.png
│   │   │   ├── hero-graph.jpg
│   │   │   └── hierarchy.png
│   │   ├── components
│   │   │   ├── ComparisonTable.tsx
│   │   │   ├── CookbookSection.tsx
│   │   │   ├── DemoSection.tsx
│   │   │   ├── ExamplesSection.tsx
│   │   │   ├── FeaturesSection.tsx
│   │   │   ├── Footer.tsx
│   │   │   ├── HeroSection.tsx
│   │   │   ├── InstallationSection.tsx
│   │   │   ├── MoveToTop.tsx
│   │   │   ├── ShowDownloads.tsx
│   │   │   ├── ShowStarGraph.tsx
│   │   │   ├── SocialMentionsTimeline.tsx
│   │   │   ├── TestimonialSection.tsx
│   │   │   ├── ThemeProvider.tsx
│   │   │   ├── ThemeToggle.tsx
│   │   │   └── ui
│   │   │       ├── accordion.tsx
│   │   │       ├── alert-dialog.tsx
│   │   │       ├── alert.tsx
│   │   │       ├── aspect-ratio.tsx
│   │   │       ├── avatar.tsx
│   │   │       ├── badge.tsx
│   │   │       ├── breadcrumb.tsx
│   │   │       ├── button.tsx
│   │   │       ├── calendar.tsx
│   │   │       ├── card.tsx
│   │   │       ├── carousel.tsx
│   │   │       ├── chart.tsx
│   │   │       ├── checkbox.tsx
│   │   │       ├── collapsible.tsx
│   │   │       ├── command.tsx
│   │   │       ├── context-menu.tsx
│   │   │       ├── dialog.tsx
│   │   │       ├── drawer.tsx
│   │   │       ├── dropdown-menu.tsx
│   │   │       ├── form.tsx
│   │   │       ├── hover-card.tsx
│   │   │       ├── input-otp.tsx
│   │   │       ├── input.tsx
│   │   │       ├── label.tsx
│   │   │       ├── menubar.tsx
│   │   │       ├── navigation-menu.tsx
│   │   │       ├── orbiting-circles.tsx
│   │   │       ├── pagination.tsx
│   │   │       ├── popover.tsx
│   │   │       ├── progress.tsx
│   │   │       ├── radio-group.tsx
│   │   │       ├── resizable.tsx
│   │   │       ├── scroll-area.tsx
│   │   │       ├── select.tsx
│   │   │       ├── separator.tsx
│   │   │       ├── sheet.tsx
│   │   │       ├── sidebar.tsx
│   │   │       ├── skeleton.tsx
│   │   │       ├── slider.tsx
│   │   │       ├── sonner.tsx
│   │   │       ├── switch.tsx
│   │   │       ├── table.tsx
│   │   │       ├── tabs.tsx
│   │   │       ├── textarea.tsx
│   │   │       ├── toast.tsx
│   │   │       ├── toaster.tsx
│   │   │       ├── toggle-group.tsx
│   │   │       ├── toggle.tsx
│   │   │       ├── tooltip.tsx
│   │   │       └── use-toast.ts
│   │   ├── hooks
│   │   │   ├── use-mobile.tsx
│   │   │   └── use-toast.ts
│   │   ├── index.css
│   │   ├── lib
│   │   │   └── utils.ts
│   │   ├── main.tsx
│   │   ├── pages
│   │   │   ├── Index.tsx
│   │   │   └── NotFound.tsx
│   │   └── vite-env.d.ts
│   ├── tailwind.config.ts
│   ├── tsconfig.app.json
│   ├── tsconfig.json
│   ├── tsconfig.node.json
│   ├── vercel.json
│   └── vite.config.ts
└── windows_setup_guide.md
```

# Files

--------------------------------------------------------------------------------
/website/src/App.tsx:
--------------------------------------------------------------------------------

```typescript
import { useEffect } from "react";
import { Toaster } from "@/components/ui/toaster";
import { Toaster as Sonner } from "@/components/ui/sonner";
import { TooltipProvider } from "@/components/ui/tooltip";
import { ThemeProvider } from "@/components/ThemeProvider";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import Index from "./pages/Index";
import NotFound from "./pages/NotFound";
import MoveToTop from "./components/MoveToTop";

// ✅ Import AOS library and CSS
import AOS from "aos";
import "aos/dist/aos.css";

const queryClient = new QueryClient();

const App: React.FC = () => {
  // ✅ Initialize AOS once on mount
  useEffect(() => {
    AOS.init({
      duration: 800, // Animation duration (ms)
      easing: "ease-in-out", // Smooth transition
      once: true, // Run animation only once
      mirror: false, // Do not animate when scrolling back up
    });
  }, []);

  return (
    <QueryClientProvider client={queryClient}>
      <ThemeProvider
        attribute="class"
        defaultTheme="dark"
        enableSystem
        disableTransitionOnChange
      >
        <TooltipProvider>
          <Toaster />
          <Sonner />
          <BrowserRouter>
            <Routes>
              <Route path="/" element={<Index />} />
              {/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}
              <Route path="*" element={<NotFound />} />
            </Routes>
          </BrowserRouter>

          {/* Move to Top button */}
          <MoveToTop />
        </TooltipProvider>
      </ThemeProvider>
    </QueryClientProvider>
  );
};

export default App;

```

--------------------------------------------------------------------------------
/website/src/components/ui/resizable.tsx:
--------------------------------------------------------------------------------

```typescript
import { GripVertical } from "lucide-react";
import * as ResizablePrimitive from "react-resizable-panels";

import { cn } from "@/lib/utils";

const ResizablePanelGroup = ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => (
  <ResizablePrimitive.PanelGroup
    className={cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className)}
    {...props}
  />
);

const ResizablePanel = ResizablePrimitive.Panel;

const ResizableHandle = ({
  withHandle,
  className,
  ...props
}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
  withHandle?: boolean;
}) => (
  <ResizablePrimitive.PanelResizeHandle
    className={cn(
      "relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 [&[data-panel-group-direction=vertical]>div]:rotate-90",
      className,
    )}
    {...props}
  >
    {withHandle && (
      <div className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border">
        <GripVertical className="h-2.5 w-2.5" />
      </div>
    )}
  </ResizablePrimitive.PanelResizeHandle>
);

export { ResizablePanelGroup, ResizablePanel, ResizableHandle };

```

--------------------------------------------------------------------------------
/website/src/components/ShowDownloads.tsx:
--------------------------------------------------------------------------------

```typescript
import { useEffect, useState } from "react";

const LAST_MONTH_KEY = "cgc_last_month_downloads";
type PypiStats = {
  data: {
    last_day: number;
    last_month: number;
    last_week: number;
  };
  package: string;
  type: string;
};

export default function ShowDownloads() {
  const [stats, setStats] = useState<PypiStats | null>(null);
  const [error, setError] = useState<string | null>(null);

  useEffect(() => {
   async function fetchStats() {
  try {
    const res = await fetch("/api/pypi/packages/codegraphcontext/recent");

    if (!res.ok) {
      throw new Error(`API error: ${res.status}`);
    }

    const data = await res.json();

    //  Save last successful monthly downloads
    if (data?.data?.last_month) {
      localStorage.setItem(
        LAST_MONTH_KEY,
        data.data.last_month.toString()
      );
    }

    setStats(data);
  } catch (err: unknown) {
    //  Trying to use last saved value
    const savedLastMonth = localStorage.getItem(LAST_MONTH_KEY);

    if (savedLastMonth) {
      setStats({
        data: {
          last_day: 0,
          last_week: 0,
          last_month: Number(savedLastMonth),
        },
        package: "codegraphcontext",
        type: "fallback",
      });
    } else {
      setError((err as Error).message);
    }
  }
}

    fetchStats();
  }, []);

  if (error) return <p className="text-red-500">Error: {error}</p>;
  if (!stats) return <p>Loading stats...</p>;

  return (
    <div data-aos="fade-in">
      {stats?.data ? (
        <>
          <p>Last month downloads: {stats.data.last_month.toLocaleString()}+</p>
        </>
      ) : (
        <p>No data available yet for this package</p>
      )}
    </div>
  );
}
```

--------------------------------------------------------------------------------
/website/src/components/ui/toggle-group.tsx:
--------------------------------------------------------------------------------

```typescript
import * as React from "react";
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
import { type VariantProps } from "class-variance-authority";

import { cn } from "@/lib/utils";
import { toggleVariants } from "@/components/ui/toggle";

const ToggleGroupContext = React.createContext<VariantProps<typeof toggleVariants>>({
  size: "default",
  variant: "default",
});

const ToggleGroup = React.forwardRef<
  React.ElementRef<typeof ToggleGroupPrimitive.Root>,
  React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants>
>(({ className, variant, size, children, ...props }, ref) => (
  <ToggleGroupPrimitive.Root ref={ref} className={cn("flex items-center justify-center gap-1", className)} {...props}>
    <ToggleGroupContext.Provider value={{ variant, size }}>{children}</ToggleGroupContext.Provider>
  </ToggleGroupPrimitive.Root>
));

ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;

const ToggleGroupItem = React.forwardRef<
  React.ElementRef<typeof ToggleGroupPrimitive.Item>,
  React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>
>(({ className, children, variant, size, ...props }, ref) => {
  const context = React.useContext(ToggleGroupContext);

  return (
    <ToggleGroupPrimitive.Item
      ref={ref}
      className={cn(
        toggleVariants({
          variant: context.variant || variant,
          size: context.size || size,
        }),
        className,
      )}
      {...props}
    >
      {children}
    </ToggleGroupPrimitive.Item>
  );
});

ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;

export { ToggleGroup, ToggleGroupItem };

```

--------------------------------------------------------------------------------
/website/src/components/ui/orbiting-circles.tsx:
--------------------------------------------------------------------------------

```typescript
import React from "react"

import { cn } from "@/lib/utils"

export interface OrbitingCirclesProps
  extends React.HTMLAttributes<HTMLDivElement> {
  className?: string
  children?: React.ReactNode
  reverse?: boolean
  duration?: number
  delay?: number
  radius?: number
  path?: boolean
  iconSize?: number
  speed?: number
}

export function OrbitingCircles({
  className,
  children,
  reverse,
  duration = 20,
  radius = 160,
  path = true,
  iconSize = 30,
  speed = 1,
  ...props
}: OrbitingCirclesProps) {
  const calculatedDuration = duration / speed
  return (
    <>
      {path && (
        <svg
          xmlns="http://www.w3.org/2000/svg"
          version="1.1"
          className="pointer-events-none absolute inset-0 size-full"
        >
          <circle
            className="stroke-black/10 stroke-1 dark:stroke-white/10"
            cx="50%"
            cy="50%"
            r={radius}
            fill="none"
          />
        </svg>
      )}
      {React.Children.map(children, (child, index) => {
        const angle = (360 / React.Children.count(children)) * index
        return (
          <div
            style={
              {
                "--duration": calculatedDuration,
                "--radius": radius,
                "--angle": angle,
                "--icon-size": `${iconSize}px`,
              } as React.CSSProperties
            }
            className={cn(
              `animate-orbit absolute flex size-[var(--icon-size)] transform-gpu items-center justify-center rounded-full`,
              { "[animation-direction:reverse]": reverse },
              className
            )}
            {...props}
          >
            {child}
          </div>
        )
      })}
    </>
  )
}

```

--------------------------------------------------------------------------------
/tests/sample_project/edge_cases/long_functions.py:
--------------------------------------------------------------------------------

```python
def long_loop_example(n):
    result = []
    for i in range(n):
        if i % 2 == 0:
            result.append(i * 2)
        else:
            result.append(i + 3)
        if i % 5 == 0:
            result.append(i - 1)
        if i % 7 == 0:
            result.append(i * i)
        if i % 3 == 0:
            result.append(i // 2)
        if i % 4 == 0:
            result.append(i + 10)
        if i % 6 == 0:
            result.append(i - 5)
        if i % 8 == 0:
            result.append(i * 3)
        if i % 9 == 0:
            result.append(i + 7)
        if i % 10 == 0:
            result.append(i - 2)
    return result

def verbose_conditions(x, y):
    if x > 0:
        a = x + y
    else:
        a = x - y
    if y > 0:
        b = y * 2
    else:
        b = y // 2
    if x == y:
        c = x * y
    else:
        c = x + y
    if x % 2 == 0:
        d = x // 2
    else:
        d = x * 2
    if y % 3 == 0:
        e = y // 3
    else:
        e = y * 3
    if x > 10:
        f = x - 10
    else:
        f = x + 10
    return a + b + c + d + e + f

def extended_try_except(val):
    try:
        if val < 0:
            raise ValueError("Negative value")
        elif val == 0:
            raise ZeroDivisionError("Zero value")
        elif val > 100:
            raise OverflowError("Too large")
        result = val * 2
        for i in range(5):
            result += i
        if result % 2 == 0:
            result //= 2
        else:
            result += 1
        return result
    except ValueError as ve:
        return str(ve)
    except ZeroDivisionError as zde:
        return str(zde)
    except OverflowError as oe:
        return str(oe)
    except Exception as e:
        return "Unknown error: " + str(e)
    finally:
        _ = "done"
```

--------------------------------------------------------------------------------
/website/src/components/ui/card.tsx:
--------------------------------------------------------------------------------

```typescript
import * as React from "react";

import { cn } from "@/lib/utils";

const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (
  <div ref={ref} className={cn("rounded-lg border bg-card text-card-foreground shadow-sm", className)} {...props} />
));
Card.displayName = "Card";

const CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
  ({ className, ...props }, ref) => (
    <div ref={ref} className={cn("flex flex-col space-y-1.5 p-6", className)} {...props} />
  ),
);
CardHeader.displayName = "CardHeader";

const CardTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(
  ({ className, ...props }, ref) => (
    <h3 ref={ref} className={cn("text-2xl font-semibold leading-none tracking-tight", className)} {...props} />
  ),
);
CardTitle.displayName = "CardTitle";

const CardDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
  ({ className, ...props }, ref) => (
    <p ref={ref} className={cn("text-sm text-muted-foreground", className)} {...props} />
  ),
);
CardDescription.displayName = "CardDescription";

const CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
  ({ className, ...props }, ref) => <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />,
);
CardContent.displayName = "CardContent";

const CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
  ({ className, ...props }, ref) => (
    <div ref={ref} className={cn("flex items-center p-6 pt-0", className)} {...props} />
  ),
);
CardFooter.displayName = "CardFooter";

export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };

```

--------------------------------------------------------------------------------
/website/src/components/ui/button.tsx:
--------------------------------------------------------------------------------

```typescript
import * as React from "react";
import { Slot } from "@radix-ui/react-slot";
import { cva, type VariantProps } from "class-variance-authority";

import { cn } from "@/lib/utils";

const buttonVariants = cva(
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
  {
    variants: {
      variant: {
        default: "bg-primary text-primary-foreground hover:bg-primary/90",
        destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
        outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
        secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
        ghost: "hover:bg-accent hover:text-accent-foreground",
        link: "text-primary underline-offset-4 hover:underline",
      },
      size: {
        default: "h-10 px-4 py-2",
        sm: "h-9 rounded-md px-3",
        lg: "h-11 rounded-md px-8",
        icon: "h-10 w-10",
      },
    },
    defaultVariants: {
      variant: "default",
      size: "default",
    },
  },
);

export interface ButtonProps
  extends React.ButtonHTMLAttributes<HTMLButtonElement>,
    VariantProps<typeof buttonVariants> {
  asChild?: boolean;
}

const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
  ({ className, variant, size, asChild = false, ...props }, ref) => {
    const Comp = asChild ? Slot : "button";
    return <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />;
  },
);
Button.displayName = "Button";

export { Button, buttonVariants };

```

--------------------------------------------------------------------------------
/website/src/components/ui/tabs.tsx:
--------------------------------------------------------------------------------

```typescript
import * as React from "react";
import * as TabsPrimitive from "@radix-ui/react-tabs";

import { cn } from "@/lib/utils";

const Tabs = TabsPrimitive.Root;

const TabsList = React.forwardRef<
  React.ElementRef<typeof TabsPrimitive.List>,
  React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
>(({ className, ...props }, ref) => (
  <TabsPrimitive.List
    ref={ref}
    className={cn(
      "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
      className,
    )}
    {...props}
  />
));
TabsList.displayName = TabsPrimitive.List.displayName;

const TabsTrigger = React.forwardRef<
  React.ElementRef<typeof TabsPrimitive.Trigger>,
  React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
>(({ className, ...props }, ref) => (
  <TabsPrimitive.Trigger
    ref={ref}
    className={cn(
      "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
      className,
    )}
    {...props}
  />
));
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;

const TabsContent = React.forwardRef<
  React.ElementRef<typeof TabsPrimitive.Content>,
  React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
>(({ className, ...props }, ref) => (
  <TabsPrimitive.Content
    ref={ref}
    className={cn(
      "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
      className,
    )}
    {...props}
  />
));
TabsContent.displayName = TabsPrimitive.Content.displayName;

export { Tabs, TabsList, TabsTrigger, TabsContent };

```

--------------------------------------------------------------------------------
/tests/sample_project_misc/tables.html:
--------------------------------------------------------------------------------

```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Hacktoberfest Contributors</title>
    <link rel="stylesheet" href="tables.css">
</head>
<body>
    <h1>Hacktoberfest 2025 Contributors</h1>
    
    <table>
        <caption>Open Source Contributors</caption>
        <thead>
            <tr>
                <th>Contributor</th>
                <th>Project</th>
                <th>Pull Requests</th>
                <th>Contribution Type</th>
                <th>Status</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Nureni Jamiu</td>
                <td>CodeGraphContext</td>
                <td>2</td>
                <td>Indexing Pipeline</td>
                <td>Completed</td>
            </tr>
            <tr>
                <td>Alex Chen</td>
                <td>PyViz</td>
                <td>3</td>
                <td>Bug Fixes</td>
                <td>In Progress</td>
            </tr>
            <tr>
                <td>Maria Garcia</td>
                <td>WebTools</td>
                <td>5</td>
                <td>Feature</td>
                <td>Completed</td>
            </tr>
            <tr>
                <td>James Wilson</td>
                <td>DataFlow</td>
                <td>2</td>
                <td>Testing</td>
                <td>In Progress</td>
            </tr>
            <tr>
                <td>Aisha Patel</td>
                <td>UIKit</td>
                <td>4</td>
                <td>Enhancement</td>
                <td>Completed</td>
            </tr>
        </tbody>
        <tfoot>
            <tr>
                <th colspan="2">Total Contributions:</th>
                <td>18</td>
                <td colspan="2">80% Complete</td>
            </tr>
        </tfoot>
    </table>
</body>
</html>
```

--------------------------------------------------------------------------------
/website/src/components/ui/accordion.tsx:
--------------------------------------------------------------------------------

```typescript
import * as React from "react";
import * as AccordionPrimitive from "@radix-ui/react-accordion";
import { ChevronDown } from "lucide-react";

import { cn } from "@/lib/utils";

const Accordion = AccordionPrimitive.Root;

const AccordionItem = React.forwardRef<
  React.ElementRef<typeof AccordionPrimitive.Item>,
  React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
>(({ className, ...props }, ref) => (
  <AccordionPrimitive.Item ref={ref} className={cn("border-b", className)} {...props} />
));
AccordionItem.displayName = "AccordionItem";

const AccordionTrigger = React.forwardRef<
  React.ElementRef<typeof AccordionPrimitive.Trigger>,
  React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
>(({ className, children, ...props }, ref) => (
  <AccordionPrimitive.Header className="flex">
    <AccordionPrimitive.Trigger
      ref={ref}
      className={cn(
        "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
        className,
      )}
      {...props}
    >
      {children}
      <ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
    </AccordionPrimitive.Trigger>
  </AccordionPrimitive.Header>
));
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;

const AccordionContent = React.forwardRef<
  React.ElementRef<typeof AccordionPrimitive.Content>,
  React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
>(({ className, children, ...props }, ref) => (
  <AccordionPrimitive.Content
    ref={ref}
    className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
    {...props}
  >
    <div className={cn("pb-4 pt-0", className)}>{children}</div>
  </AccordionPrimitive.Content>
));

AccordionContent.displayName = AccordionPrimitive.Content.displayName;

export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };

```

--------------------------------------------------------------------------------
/tests/sample_project_cpp/types_variable_assignments.cpp:
--------------------------------------------------------------------------------

```cpp
#include <iostream>
#include <string>
#include <vector>

// --- Demo class ---
class Demo {
public:
    int member;                  // non-static member
    static int static_member;     // static member
    const char* name = "Demo";

    void setMember(int value) { member = value; }
};

int Demo::static_member = 100;

// --- Point struct for structured bindings ---
struct Point {
    int x;
    int y;
};

// --- Global variable declarations ---
int global_int = 10;
double global_double(3.14);
std::string global_str = "Hello";
const int CONST_VAL = 42;
int *global_ptr = &global_int;
int global_arr[5] = {1, 2, 3, 4, 5};

// --- Function demonstrating variable declarations ---
void testVariables() {
    // Basic declarations
    int a = 5;
    float b = 2.5f;
    double c(9.81);
    bool flag = true;
    char ch = 'A';
    std::string s = "Tree-sitter";

    // Pointer and reference
    int x = 10;
    int *p = &x;
    int &ref = x;
    const int *const_ptr = &x;

    // Arrays
    int nums[3] = {1, 2, 3};
    char letters[] = {'a', 'b', 'c'};
    std::string words[2] = {"hello", "world"};

    // Vector and auto type
    std::vector<int> vec = {1, 2, 3, 4};
    auto val = vec[2];

    // Structured bindings (C++17)
    Point pt = {10, 20};
    auto [px, py] = pt;

    // Assignments and compound ops
    a = 10;
    a += 5;
    b *= 3.0f;
    c /= 2;
    flag = !flag;
    s += " test";
    x = a + b - c;

    // Expressions and function calls
    std::cout << "Sum: " << (a + b + c) << std::endl;

    // Dynamic allocation
    int *dyn = new int(99);
    delete dyn;

    // Static and const local variables
    static int counter = 0;
    const double PI = 3.14159;

    // Lambda with captured variable
    auto lambda = [=]() { return PI * a; };
    double result = lambda();

    // Object and member assignments
    Demo d;
    d.member = 50;
    d.setMember(25);
    Demo::static_member = 200;
}

int main() {
    testVariables();
    return 0;
}

```

--------------------------------------------------------------------------------
/website/src/components/MoveToTop.tsx:
--------------------------------------------------------------------------------

```typescript
import React, { useState, useEffect } from "react";

const MoveToTop: React.FC = () => {
    const [showButton, setShowButton] = useState<boolean>(false);

    useEffect(() => {
        const handleScroll = () => {
            if (window.scrollY > window.innerHeight * 0.05) {
                setShowButton(true);
            } else {
                setShowButton(false);
            }
        };

        window.addEventListener("scroll", handleScroll);
        return () => window.removeEventListener("scroll", handleScroll);
    }, []);

    const scrollToTop = () => {
        window.scrollTo({ top: 0, behavior: "smooth" });
    };

    return (
        <>
            {showButton && (
                <button
                    onClick={scrollToTop}
                    data-aos="fade-in"
                    data-aos-duration="300"
                    style={{
                        position: "fixed",
                        bottom: "40px",
                        right: "40px",
                        width: "40px",
                        height: "40px",
                        borderRadius: "50%",
                        border: "none",
                        background: "linear-gradient(135deg, hsl(263 70% 65%), hsl(180 100% 70%))",
                        color: "#fff",
                        cursor: "pointer",
                        zIndex: 99,
                        display: "flex",
                        alignItems: "center",
                        justifyContent: "center",
                        padding: 0,
                    }}
                >
                    <div
                        style={{
                            width: "14px",
                            height: "14px",
                            borderTop: "1.5px solid black",
                            borderLeft: "1.5px solid black",
                            transform: "rotate(45deg) translateY(3px) translateX(2px)",
                        }}
                    ></div>
                </button>
            )}
        </>
    );
};

export default MoveToTop;

```

--------------------------------------------------------------------------------
/tests/sample_project_kotlin/EdgeCases.kt:
--------------------------------------------------------------------------------

```kotlin
package com.example.project.edgecases

// 1. Destructuring Declarations
data class Point(val x: Int, val y: Int)
fun destructuring() {
    val (x, y) = Point(1, 2)
}

// 2. Type Aliases
typealias NodeSet = Set<String>
typealias FileTable<K> = MutableMap<K, MutableList<File>>

fun processNodes(nodes: NodeSet) {}

// 3. Anonymous Objects (Object Expressions)
fun createListener() {
    val listener = object : MouseAdapter() {
        override fun mouseClicked(e: MouseEvent) { 
            println("Clicked") 
        }
    }
}

// 4. Functional (SAM) Interfaces
fun interface IntPredicate {
    fun accept(i: Int): Boolean
}
val isEven = IntPredicate { it % 2 == 0 }

// 5. Generic Constraints
fun <T> copyWhenGreater(list: List<T>, threshold: T): List<String>
    where T : CharSequence,
          T : Comparable<T> {
    return list.filter { it > threshold }.map { it.toString() }
}

// 6. Contracts (Experimental)
import kotlin.contracts.*
fun require(condition: Boolean) {
    contract {
        returns() implies condition
    }
    if (!condition) throw IllegalArgumentException()
}

// 7. Value Classes (Inline Classes)
@JvmInline
value class Password(private val s: String)

// 8. Expect/Actual (Multiplatform) - purely syntax check if parser handles keywords
// expect fun format(str: String): String

// 9. Delegated Properties (Custom)
import kotlin.reflect.KProperty
class Delegate {
    operator fun getValue(thisRef: Any?, property: KProperty<*>): String {
        return "$thisRef, thank you for delegating '${property.name}' to me!"
    }
}
class Example {
    val p: String by Delegate()
}

// 10. Secondary Constructors
class Person {
    var children: MutableList<Person> = mutableListOf()
    constructor(parent: Person) {
        parent.children.add(this)
    }
}

// 11. Property in Constructor
class User(val name: String, var age: Int) 

// 12. Enum Classes with methods
enum class ProtocolState {
    WAITING {
        override fun signal() = TALKING
    },
    TALKING {
        override fun signal() = WAITING
    };
    abstract fun signal(): ProtocolState
}

```

--------------------------------------------------------------------------------
/tests/sample_project_go/basic_functions.go:
--------------------------------------------------------------------------------

```go
// basic_functions.go - Demonstrates basic Go function patterns
package main

import (
	"fmt"
	"math"
)

// SimpleFunction is a basic function with single return
func SimpleFunction(x int) int {
	return x * 2
}

// MultipleReturns demonstrates multiple return values
func MultipleReturns(a, b int) (int, int, error) {
	if b == 0 {
		return 0, 0, fmt.Errorf("division by zero")
	}
	return a + b, a - b, nil
}

// NamedReturns uses named return values
func NamedReturns(x, y int) (sum int, product int) {
	sum = x + y
	product = x * y
	return // naked return
}

// VariadicFunction accepts variable number of arguments
func VariadicFunction(prefix string, numbers ...int) string {
	result := prefix
	for _, num := range numbers {
		result += fmt.Sprintf(" %d", num)
	}
	return result
}

// HigherOrderFunction takes a function as parameter
func HigherOrderFunction(fn func(int) int, value int) int {
	return fn(value) + 10
}

// FunctionReturningFunction returns a closure
func FunctionReturningFunction(multiplier int) func(int) int {
	return func(x int) int {
		return x * multiplier
	}
}

// RecursiveFunction demonstrates recursion
func RecursiveFunction(n int) int {
	if n <= 1 {
		return 1
	}
	return n * RecursiveFunction(n-1)
}

// DeferExample shows defer usage
func DeferExample() string {
	defer fmt.Println("This runs last")
	fmt.Println("This runs first")
	return "Function complete"
}

// PanicRecoverExample demonstrates panic and recover
func PanicRecoverExample(shouldPanic bool) (result string) {
	defer func() {
		if r := recover(); r != nil {
			result = fmt.Sprintf("Recovered from: %v", r)
		}
	}()
	
	if shouldPanic {
		panic("something went wrong")
	}
	
	result = "No panic occurred"
	return
}

// MathHelper calls external package function
func MathHelper(x float64) float64 {
	return math.Sqrt(x)
}

// init function runs before main
func init() {
	fmt.Println("Initializing basic_functions package")
}

func main() {
	fmt.Println(SimpleFunction(5))
	sum, diff, _ := MultipleReturns(10, 3)
	fmt.Println(sum, diff)
	
	doubler := FunctionReturningFunction(2)
	fmt.Println(doubler(5))
}


```

--------------------------------------------------------------------------------
/website/src/components/ui/input-otp.tsx:
--------------------------------------------------------------------------------

```typescript
import * as React from "react";
import { OTPInput, OTPInputContext } from "input-otp";
import { Dot } from "lucide-react";

import { cn } from "@/lib/utils";

const InputOTP = React.forwardRef<React.ElementRef<typeof OTPInput>, React.ComponentPropsWithoutRef<typeof OTPInput>>(
  ({ className, containerClassName, ...props }, ref) => (
    <OTPInput
      ref={ref}
      containerClassName={cn("flex items-center gap-2 has-[:disabled]:opacity-50", containerClassName)}
      className={cn("disabled:cursor-not-allowed", className)}
      {...props}
    />
  ),
);
InputOTP.displayName = "InputOTP";

const InputOTPGroup = React.forwardRef<React.ElementRef<"div">, React.ComponentPropsWithoutRef<"div">>(
  ({ className, ...props }, ref) => <div ref={ref} className={cn("flex items-center", className)} {...props} />,
);
InputOTPGroup.displayName = "InputOTPGroup";

const InputOTPSlot = React.forwardRef<
  React.ElementRef<"div">,
  React.ComponentPropsWithoutRef<"div"> & { index: number }
>(({ index, className, ...props }, ref) => {
  const inputOTPContext = React.useContext(OTPInputContext);
  const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];

  return (
    <div
      ref={ref}
      className={cn(
        "relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
        isActive && "z-10 ring-2 ring-ring ring-offset-background",
        className,
      )}
      {...props}
    >
      {char}
      {hasFakeCaret && (
        <div className="pointer-events-none absolute inset-0 flex items-center justify-center">
          <div className="animate-caret-blink h-4 w-px bg-foreground duration-1000" />
        </div>
      )}
    </div>
  );
});
InputOTPSlot.displayName = "InputOTPSlot";

const InputOTPSeparator = React.forwardRef<React.ElementRef<"div">, React.ComponentPropsWithoutRef<"div">>(
  ({ ...props }, ref) => (
    <div ref={ref} role="separator" {...props}>
      <Dot />
    </div>
  ),
);
InputOTPSeparator.displayName = "InputOTPSeparator";

export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };

```

--------------------------------------------------------------------------------
/src/codegraphcontext/core/falkor_worker.py:
--------------------------------------------------------------------------------

```python
import sys
import os
import time
import signal
from pathlib import Path
import logging

# Configure logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger("falkor_worker")

# Global to handle shutdown
db_instance = None

def handle_signal(signum, frame):
    logger.info(f"Received signal {signum}. Stopping FalkorDB worker...")
    sys.exit(0)

def run_worker():
    global db_instance
    
    # Get configuration from env
    db_path = os.getenv('FALKORDB_PATH')
    socket_path = os.getenv('FALKORDB_SOCKET_PATH')
    
    if not db_path or not socket_path:
        logger.error("Missing configuration. FALKORDB_PATH and FALKORDB_SOCKET_PATH must be set.")
        sys.exit(1)
        
    # Ensure dir exists
    Path(db_path).parent.mkdir(parents=True, exist_ok=True)
    
    logger.info(f"Starting FalkorDB Lite worker...")
    logger.info(f"DB Path: {db_path}")
    logger.info(f"Socket: {socket_path}")
    
    try:
        import platform
        
        if platform.system() == "Windows":
            raise RuntimeError(
                "CodeGraphContext uses redislite/FalkorDB, which does not support Windows.\n"
                "Please run the project using WSL or Docker."
            )
        
        from redislite.falkordb_client import FalkorDB
        
        # Start Embedded DB
        # Note: redislite might raise error if socket is in use/locked.
        # Ideally we clean up stale socket if check fails.
        if os.path.exists(socket_path):
            try:
                os.remove(socket_path)
            except OSError:
                pass

        db_instance = FalkorDB(db_path, unix_socket_path=socket_path)
        logger.info("FalkorDB Lite is running.")
        
        # Keep alive loop
        while True:
            time.sleep(1)
            
    except ImportError:
        logger.error("Failed to import redislite.falkordb_client. Is falkordblite installed?")
        sys.exit(1)
    except Exception as e:
        logger.error(f"FalkorDB Worker Critical Failure: {e}")
        import traceback
        traceback.print_exc()
        sys.exit(1)

if __name__ == '__main__':
    signal.signal(signal.SIGTERM, handle_signal)
    signal.signal(signal.SIGINT, handle_signal)
    run_worker()

```

--------------------------------------------------------------------------------
/docs/docs/core.md:
--------------------------------------------------------------------------------

```markdown
# Core Concepts

The core of CodeGraphContext is built upon a few key components that manage the database connection, handle background tasks, and watch for file system changes.

## `DatabaseManager`

The `DatabaseManager` class in `database.py` is a thread-safe singleton responsible for managing the connection to the Neo4j database. This ensures that only one connection pool is created and shared across the application, which is crucial for performance and resource management.

### Key Methods

-   `get_driver()`: Returns the active Neo4j Driver instance, creating it if it doesn't exist.
-   `close_driver()`: Closes the Neo4j driver connection.
-   `is_connected()`: Checks if the database connection is currently active.

## `JobManager`

The `JobManager` class in `jobs.py` handles long-running, background jobs, such as code indexing. It stores job information in memory and provides a thread-safe way to create, update, and retrieve information about these jobs.

### `JobStatus`

An enumeration for the possible statuses of a background job:
- `PENDING`
- `RUNNING`
- `COMPLETED`
- `FAILED`
- `CANCELLED`

### `JobInfo`

A data class that holds all information about a single background job, including its ID, status, start/end times, progress, and any errors.

### Key Methods

-   `create_job()`: Creates a new job with a unique ID.
-   `update_job()`: Updates the information for a specific job.
-   `get_job()`: Retrieves the information for a single job.
-   `list_jobs()`: Returns a list of all jobs.
-   `cleanup_old_jobs()`: Removes old, completed jobs from memory.

## `CodeWatcher`

The `CodeWatcher` class in `watcher.py` implements the live file-watching functionality using the `watchdog` library. It observes directories for changes and triggers updates to the code graph.

### `RepositoryEventHandler`

A dedicated event handler for a single repository. It performs an initial scan and then uses a debouncing mechanism to efficiently handle file changes, creations, or deletions.

### Key Methods

-   `watch_directory()`: Schedules a directory to be watched for changes.
-   `unwatch_directory()`: Stops watching a directory.
-   `list_watched_paths()`: Returns a list of all currently watched directory paths.
-   `start()`: Starts the observer thread.
-   `stop()`: Stops the observer thread gracefully.
```

--------------------------------------------------------------------------------
/organizer/Tools_Exploration.md:
--------------------------------------------------------------------------------

```markdown
# Tools Exploration
There are a total of 14 tools available to the users, and here we have attached illustrative demos for each one of them.

## find_code Tool

The `find_code` tool allows users to search for code snippets, functions, classes, and variables within the codebase using natural language queries. This tool helps developers understand and navigate large codebases efficiently.

Below is an embedded link to a demo video showcasing the usage of the `find_code` tool in action.
[![Watch the demo video](./images/tool_images/1.png)](https://drive.google.com/file/d/1ojCDIIAwcir9e3jgHHIVC5weZ9nuIQcs/view?usp=drive_link)

---

## watch_directory Tool

The `watch_directory` tool allows users to monitor a specified directory for file changes, additions, or deletions in real-time. It helps developers automate workflows such as triggering scripts, updating indexes, or syncing files whenever changes occur in the directory.

Below is an embedded link to a demo video showcasing the usage of the `watch_directory` tool in a development environment.
[![Watch the demo](./images/tool_images/2.png)](https://drive.google.com/file/d/1OEjcS2iwwymss99zLidbeBjcblferKBX/view?usp=drive_link) 

---

## analyze_code_relationships Tool

The `analyze_code_relationships` tool in CodeGraphContext is designed to let users query and explore the various relationships between code elements in a codebase, represented as a graph in Neo4j. 

### Relationship Types That Can Be Analyzed

- **CALLS:** Finds which functions call or are called by a function.
- **CALLED_BY:** Finds all functions that directly or indirectly call a target function (inverse of CALLS).
- **INHERITS_FROM:** Finds class inheritance relationships; which classes inherit from which.
- **CONTAINS:** Shows containment (which classes/functions are inside which modules or files).
- **IMPLEMENTS:** Shows which classes implement an interface.
- **IMPORTS:** Identifies which files or modules import a specific module.
- **DEFINED_IN:** Locates where an entity (function/class) is defined.
- **HAS_ARGUMENT:** Shows relationships from functions to their arguments.
- **DECLARES:** Finds variables declared in functions or classes.

Below is an embedded link to a demo video showcasing the usage of the `analyse_code_relationships` tool.
[![Watch the demo](./images/tool_images/3.png)](https://drive.google.com/file/d/154M_lTPbg9_Gj9bd2ErnAVbJArSbcb2M/view?usp=drive_link) 

---

```

--------------------------------------------------------------------------------
/website/src/components/ui/calendar.tsx:
--------------------------------------------------------------------------------

```typescript
import * as React from "react";
import { ChevronLeft, ChevronRight } from "lucide-react";
import { DayPicker } from "react-day-picker";

import { cn } from "@/lib/utils";
import { buttonVariants } from "@/components/ui/button";

export type CalendarProps = React.ComponentProps<typeof DayPicker>;

function Calendar({ className, classNames, showOutsideDays = true, ...props }: CalendarProps) {
  return (
    <DayPicker
      showOutsideDays={showOutsideDays}
      className={cn("p-3", className)}
      classNames={{
        months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
        month: "space-y-4",
        caption: "flex justify-center pt-1 relative items-center",
        caption_label: "text-sm font-medium",
        nav: "space-x-1 flex items-center",
        nav_button: cn(
          buttonVariants({ variant: "outline" }),
          "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",
        ),
        nav_button_previous: "absolute left-1",
        nav_button_next: "absolute right-1",
        table: "w-full border-collapse space-y-1",
        head_row: "flex",
        head_cell: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
        row: "flex w-full mt-2",
        cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
        day: cn(buttonVariants({ variant: "ghost" }), "h-9 w-9 p-0 font-normal aria-selected:opacity-100"),
        day_range_end: "day-range-end",
        day_selected:
          "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
        day_today: "bg-accent text-accent-foreground",
        day_outside:
          "day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
        day_disabled: "text-muted-foreground opacity-50",
        day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
        day_hidden: "invisible",
        ...classNames,
      }}
      components={{
        IconLeft: ({ ..._props }) => <ChevronLeft className="h-4 w-4" />,
        IconRight: ({ ..._props }) => <ChevronRight className="h-4 w-4" />,
      }}
      {...props}
    />
  );
}
Calendar.displayName = "Calendar";

export { Calendar };

```

--------------------------------------------------------------------------------
/tests/sample_project_rust/src/modules.rs:
--------------------------------------------------------------------------------

```rust
// modules.rs - Demonstrates Rust module system and organization

// Nested modules
pub mod geometry {
    pub mod shapes {
        pub struct Circle {
            pub radius: f64,
        }

        pub struct Rectangle {
            pub width: f64,
            pub height: f64,
        }

        impl Circle {
            pub fn new(radius: f64) -> Self {
                Self { radius }
            }

            pub fn area(&self) -> f64 {
                std::f64::consts::PI * self.radius * self.radius
            }
        }

        impl Rectangle {
            pub fn new(width: f64, height: f64) -> Self {
                Self { width, height }
            }

            pub fn area(&self) -> f64 {
                self.width * self.height
            }
        }
    }

    pub mod calculations {
        use super::shapes::{Circle, Rectangle};

        pub fn total_area(circle: &Circle, rectangle: &Rectangle) -> f64 {
            circle.area() + rectangle.area()
        }
    }
}

// Module with private items
pub mod data {
    pub struct PublicStruct {
        pub public_field: i32,
        private_field: i32,
    }

    impl PublicStruct {
        pub fn new(public_field: i32, private_field: i32) -> Self {
            Self {
                public_field,
                private_field,
            }
        }

        pub fn get_private(&self) -> i32 {
            self.private_field
        }
    }

    pub fn public_function() -> i32 {
        private_function() + 10
    }

    fn private_function() -> i32 {
        42
    }
}

// Re-exports
pub mod utils {
    pub use super::geometry::shapes::Circle;
    pub use super::geometry::shapes::Rectangle;

    pub fn create_default_circle() -> Circle {
        Circle::new(1.0)
    }
}

// Module with use statements
pub mod operations {
    use std::collections::HashMap;

    pub fn create_map() -> HashMap<String, i32> {
        let mut map = HashMap::new();
        map.insert("one".to_string(), 1);
        map.insert("two".to_string(), 2);
        map
    }
}

// Glob imports (use with caution)
pub mod prelude {
    pub use super::geometry::shapes::*;
    pub use super::data::*;
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_circle_area() {
        let circle = geometry::shapes::Circle::new(5.0);
        let area = circle.area();
        assert!((area - 78.54).abs() < 0.01);
    }

    #[test]
    fn test_public_struct() {
        let s = data::PublicStruct::new(10, 20);
        assert_eq!(s.public_field, 10);
        assert_eq!(s.get_private(), 20);
    }
}


```

--------------------------------------------------------------------------------
/scripts/test_all_parsers.py:
--------------------------------------------------------------------------------

```python
#!/usr/bin/env python3
"""Test all language parsers and identify any query issues."""

from codegraphcontext.tools.graph_builder import TreeSitterParser
from pathlib import Path

test_cases = {
    'python': '''
def hello():
    print('world')

class MyClass:
    pass
''',
    'javascript': '''
function hello() {
    console.log('world');
}

class MyClass {
    constructor() {}
}
''',
    'typescript': '''
function hello(): void {
    console.log('world');
}

interface MyInterface {
    name: string;
}
''',
    'go': '''
package main

func hello() {
    println("world")
}

type MyStruct struct {
    Name string
}
''',
    'rust': '''
fn hello() {
    println!("world");
}

struct MyStruct {
    name: String,
}
''',
    'c': '''
#include <stdio.h>

void hello() {
    printf("world");
}

struct MyStruct {
    int value;
};
''',
    'cpp': '''
#include <iostream>

void hello() {
    std::cout << "world";
}

class MyClass {
public:
    int value;
};
''',
    'java': '''
public class Test {
    public void hello() {
        System.out.println("world");
    }
}
''',
    'ruby': '''
def hello
    puts "world"
end

class MyClass
end
''',
    'c_sharp': '''
using System;

class Test {
    void Hello() {
        Console.WriteLine("world");
    }
}
'''
}

extensions = {
    'python': '.py',
    'javascript': '.js',
    'typescript': '.ts',
    'go': '.go',
    'rust': '.rs',
    'c': '.c',
    'cpp': '.cpp',
    'java': '.java',
    'ruby': '.rb',
    'c_sharp': '.cs'
}

results = {}

for lang, code in test_cases.items():
    print(f'Testing {lang}...')
    try:
        parser = TreeSitterParser(lang)
        ext = extensions[lang]
        file = Path(f'/tmp/test{ext}')
        file.write_text(code)
        result = parser.parse(file, is_dependency=False)
        
        funcs = len(result.get('functions', []))
        classes = len(result.get('classes', []))
        results[lang] = {'status': 'OK', 'functions': funcs, 'classes': classes}
        print(f'  ✓ {lang}: {funcs} functions, {classes} classes')
    except Exception as e:
        error_msg = str(e)
        results[lang] = {'status': 'ERROR', 'error': error_msg}
        print(f'  ✗ {lang}: {error_msg[:150]}')

print('\n' + '='*60)
print('SUMMARY')
print('='*60)

ok_count = sum(1 for r in results.values() if r['status'] == 'OK')
error_count = sum(1 for r in results.values() if r['status'] == 'ERROR')

print(f'✓ Working: {ok_count}/{len(results)}')
print(f'✗ Errors: {error_count}/{len(results)}')

if error_count > 0:
    print('\nLanguages with errors:')
    for lang, result in results.items():
        if result['status'] == 'ERROR':
            print(f'  - {lang}')

```

--------------------------------------------------------------------------------
/website/src/components/ui/pagination.tsx:
--------------------------------------------------------------------------------

```typescript
import * as React from "react";
import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";

import { cn } from "@/lib/utils";
import { ButtonProps, buttonVariants } from "@/components/ui/button";

const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
  <nav
    role="navigation"
    aria-label="pagination"
    className={cn("mx-auto flex w-full justify-center", className)}
    {...props}
  />
);
Pagination.displayName = "Pagination";

const PaginationContent = React.forwardRef<HTMLUListElement, React.ComponentProps<"ul">>(
  ({ className, ...props }, ref) => (
    <ul ref={ref} className={cn("flex flex-row items-center gap-1", className)} {...props} />
  ),
);
PaginationContent.displayName = "PaginationContent";

const PaginationItem = React.forwardRef<HTMLLIElement, React.ComponentProps<"li">>(({ className, ...props }, ref) => (
  <li ref={ref} className={cn("", className)} {...props} />
));
PaginationItem.displayName = "PaginationItem";

type PaginationLinkProps = {
  isActive?: boolean;
} & Pick<ButtonProps, "size"> &
  React.ComponentProps<"a">;

const PaginationLink = ({ className, isActive, size = "icon", ...props }: PaginationLinkProps) => (
  <a
    aria-current={isActive ? "page" : undefined}
    className={cn(
      buttonVariants({
        variant: isActive ? "outline" : "ghost",
        size,
      }),
      className,
    )}
    {...props}
  />
);
PaginationLink.displayName = "PaginationLink";

const PaginationPrevious = ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => (
  <PaginationLink aria-label="Go to previous page" size="default" className={cn("gap-1 pl-2.5", className)} {...props}>
    <ChevronLeft className="h-4 w-4" />
    <span>Previous</span>
  </PaginationLink>
);
PaginationPrevious.displayName = "PaginationPrevious";

const PaginationNext = ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => (
  <PaginationLink aria-label="Go to next page" size="default" className={cn("gap-1 pr-2.5", className)} {...props}>
    <span>Next</span>
    <ChevronRight className="h-4 w-4" />
  </PaginationLink>
);
PaginationNext.displayName = "PaginationNext";

const PaginationEllipsis = ({ className, ...props }: React.ComponentProps<"span">) => (
  <span aria-hidden className={cn("flex h-9 w-9 items-center justify-center", className)} {...props}>
    <MoreHorizontal className="h-4 w-4" />
    <span className="sr-only">More pages</span>
  </span>
);
PaginationEllipsis.displayName = "PaginationEllipsis";

export {
  Pagination,
  PaginationContent,
  PaginationEllipsis,
  PaginationItem,
  PaginationLink,
  PaginationNext,
  PaginationPrevious,
};

```

--------------------------------------------------------------------------------
/website/src/components/ui/breadcrumb.tsx:
--------------------------------------------------------------------------------

```typescript
import * as React from "react";
import { Slot } from "@radix-ui/react-slot";
import { ChevronRight, MoreHorizontal } from "lucide-react";

import { cn } from "@/lib/utils";

const Breadcrumb = React.forwardRef<
  HTMLElement,
  React.ComponentPropsWithoutRef<"nav"> & {
    separator?: React.ReactNode;
  }
>(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />);
Breadcrumb.displayName = "Breadcrumb";

const BreadcrumbList = React.forwardRef<HTMLOListElement, React.ComponentPropsWithoutRef<"ol">>(
  ({ className, ...props }, ref) => (
    <ol
      ref={ref}
      className={cn(
        "flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
        className,
      )}
      {...props}
    />
  ),
);
BreadcrumbList.displayName = "BreadcrumbList";

const BreadcrumbItem = React.forwardRef<HTMLLIElement, React.ComponentPropsWithoutRef<"li">>(
  ({ className, ...props }, ref) => (
    <li ref={ref} className={cn("inline-flex items-center gap-1.5", className)} {...props} />
  ),
);
BreadcrumbItem.displayName = "BreadcrumbItem";

const BreadcrumbLink = React.forwardRef<
  HTMLAnchorElement,
  React.ComponentPropsWithoutRef<"a"> & {
    asChild?: boolean;
  }
>(({ asChild, className, ...props }, ref) => {
  const Comp = asChild ? Slot : "a";

  return <Comp ref={ref} className={cn("transition-colors hover:text-foreground", className)} {...props} />;
});
BreadcrumbLink.displayName = "BreadcrumbLink";

const BreadcrumbPage = React.forwardRef<HTMLSpanElement, React.ComponentPropsWithoutRef<"span">>(
  ({ className, ...props }, ref) => (
    <span
      ref={ref}
      role="link"
      aria-disabled="true"
      aria-current="page"
      className={cn("font-normal text-foreground", className)}
      {...props}
    />
  ),
);
BreadcrumbPage.displayName = "BreadcrumbPage";

const BreadcrumbSeparator = ({ children, className, ...props }: React.ComponentProps<"li">) => (
  <li role="presentation" aria-hidden="true" className={cn("[&>svg]:size-3.5", className)} {...props}>
    {children ?? <ChevronRight />}
  </li>
);
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";

const BreadcrumbEllipsis = ({ className, ...props }: React.ComponentProps<"span">) => (
  <span
    role="presentation"
    aria-hidden="true"
    className={cn("flex h-9 w-9 items-center justify-center", className)}
    {...props}
  >
    <MoreHorizontal className="h-4 w-4" />
    <span className="sr-only">More</span>
  </span>
);
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";

export {
  Breadcrumb,
  BreadcrumbList,
  BreadcrumbItem,
  BreadcrumbLink,
  BreadcrumbPage,
  BreadcrumbSeparator,
  BreadcrumbEllipsis,
};

```

--------------------------------------------------------------------------------
/website/src/components/ui/table.tsx:
--------------------------------------------------------------------------------

```typescript
import * as React from "react";

import { cn } from "@/lib/utils";

const Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(
  ({ className, ...props }, ref) => (
    <div className="relative w-full overflow-auto">
      <table ref={ref} className={cn("w-full caption-bottom text-sm", className)} {...props} />
    </div>
  ),
);
Table.displayName = "Table";

const TableHeader = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(
  ({ className, ...props }, ref) => <thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />,
);
TableHeader.displayName = "TableHeader";

const TableBody = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(
  ({ className, ...props }, ref) => (
    <tbody ref={ref} className={cn("[&_tr:last-child]:border-0", className)} {...props} />
  ),
);
TableBody.displayName = "TableBody";

const TableFooter = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(
  ({ className, ...props }, ref) => (
    <tfoot ref={ref} className={cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className)} {...props} />
  ),
);
TableFooter.displayName = "TableFooter";

const TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTMLTableRowElement>>(
  ({ className, ...props }, ref) => (
    <tr
      ref={ref}
      className={cn("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50", className)}
      {...props}
    />
  ),
);
TableRow.displayName = "TableRow";

const TableHead = React.forwardRef<HTMLTableCellElement, React.ThHTMLAttributes<HTMLTableCellElement>>(
  ({ className, ...props }, ref) => (
    <th
      ref={ref}
      className={cn(
        "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
        className,
      )}
      {...props}
    />
  ),
);
TableHead.displayName = "TableHead";

const TableCell = React.forwardRef<HTMLTableCellElement, React.TdHTMLAttributes<HTMLTableCellElement>>(
  ({ className, ...props }, ref) => (
    <td ref={ref} className={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)} {...props} />
  ),
);
TableCell.displayName = "TableCell";

const TableCaption = React.forwardRef<HTMLTableCaptionElement, React.HTMLAttributes<HTMLTableCaptionElement>>(
  ({ className, ...props }, ref) => (
    <caption ref={ref} className={cn("mt-4 text-sm text-muted-foreground", className)} {...props} />
  ),
);
TableCaption.displayName = "TableCaption";

export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };

```

--------------------------------------------------------------------------------
/tests/test_typescript_parser.py:
--------------------------------------------------------------------------------

```python
import pytest
from pathlib import Path
import time

# Import the helper function from the conftest.py file
from .conftest import call_tool

# Define the path to the TypeScript sample project
TS_SAMPLE_PROJECT_PATH = str(Path(__file__).parent / "sample_project_typescript")

def wait_for_job_completion(server, job_id, timeout=60):
    """Helper function to wait for an indexing job to complete."""
    start_time = time.time()
    while True:
        if time.time() - start_time > timeout:
            pytest.fail(f"Job {job_id} timed out after {timeout} seconds.")
        
        status_result = call_tool(server, "check_job_status", {"job_id": job_id})
        job_status = status_result.get("job", {}).get("status")
        
        if job_status == "completed":
            break
        elif job_status in ["failed", "cancelled"]:
            pytest.fail(f"Indexing job failed with status: {job_status}")
            
        time.sleep(1)

# This test uses the 'server' fixture from conftest.py
# Pytest automatically starts the cgc server and passes in a communication function.
def test_typescript_interfaces_and_types_are_indexed(server):
    """
    This is an integration test. It indexes the TypeScript sample project 
    and then queries the live database to verify the results.
    """
    # ARRANGE: First, delete any previous data for this project to ensure a clean slate.
    call_tool(server, "delete_repository", {"repo_path": TS_SAMPLE_PROJECT_PATH})

    # ACT (Part 1): Index the entire TypeScript sample project.
    add_result = call_tool(server, "add_code_to_graph", {"path": TS_SAMPLE_PROJECT_PATH})
    assert add_result.get("success") is True, "Failed to start indexing job"
    job_id = add_result.get("job_id")
    
    # Wait for the indexing to finish.
    wait_for_job_completion(server, job_id)

    # ACT (Part 2): Query the database for the interfaces and types we expect to find.
    interface_query = "MATCH (i:Interface {name: 'User'}) RETURN i.name AS name"
    type_alias_query = "MATCH (t:TypeAlias {name: 'UserID'}) RETURN t.name AS name"

    interface_result = call_tool(server, "execute_cypher_query", {"cypher_query": interface_query})
    type_alias_result = call_tool(server, "execute_cypher_query", {"cypher_query": type_alias_query})

    # ASSERT: Check that the queries returned the expected results from the database.
    assert interface_result.get("success") is True
    assert len(interface_result.get("results", [])) == 1, "Should find exactly one 'User' interface"
    assert interface_result["results"][0]["name"] == "User"

    assert type_alias_result.get("success") is True
    assert len(type_alias_result.get("results", [])) == 1, "Should find exactly one 'UserID' type alias"
    assert type_alias_result["results"][0]["name"] == "UserID"
```

--------------------------------------------------------------------------------
/tests/sample_project_javascript/functions.js:
--------------------------------------------------------------------------------

```javascript
/**
 * Sample JavaScript file demonstrating various function definitions
 * This file tests function declarations, arrow functions, and method definitions
 */

// Regular function declaration
function regularFunction(param1, param2) {
    console.log('Regular function called with:', param1, param2);
    return param1 + param2;
}

/**
 * Function with JSDoc documentation
 * @param {string} name - The name to greet
 * @param {number} age - The age of the person
 * @returns {string} A greeting message
 */
function greetPerson(name, age = 25) {
    return `Hello ${name}, you are ${age} years old!`;
}

// Function expression assigned to variable
const functionExpression = function(x, y) {
    return x * y;
};

// Arrow function with multiple parameters
const arrowFunction = (a, b, c) => {
    const result = a + b + c;
    return result;
};

// Arrow function with single parameter (no parentheses)
const singleParamArrow = x => x * 2;

// Arrow function with no parameters
const noParamsArrow = () => {
    console.log('No parameters arrow function');
    return 42;
};

// Arrow function with rest parameters
const restParamsFunction = (...args) => {
    return args.reduce((sum, val) => sum + val, 0);
};

// Arrow function with destructuring parameters
const destructuringParams = ({name, age}) => {
    return `${name} is ${age} years old`;
};

// Higher-order function
const higherOrderFunction = (callback) => {
    return function(value) {
        return callback(value * 2);
    };
};

// Immediately Invoked Function Expression (IIFE)
const iife = (function() {
    const privateVar = 'secret';
    return function() {
        return privateVar;
    };
})();

// Function with complex parameters
function complexParams(required, optional = 'default', ...rest) {
    console.log('Required:', required);
    console.log('Optional:', optional);
    console.log('Rest:', rest);
}

// Async function
async function asyncFunction(url) {
    try {
        const response = await fetch(url);
        return await response.json();
    } catch (error) {
        console.error('Error:', error);
        throw error;
    }
}

// Async arrow function
const asyncArrowFunction = async (data) => {
    const processed = await processData(data);
    return processed;
};

// Generator function
function* generatorFunction(start, end) {
    for (let i = start; i <= end; i++) {
        yield i;
    }
}

// Function that calls other functions
function orchestrator() {
    const result1 = regularFunction(5, 3);
    const result2 = functionExpression(4, 6);
    const result3 = arrowFunction(1, 2, 3);
    
    return {
        sum: result1,
        product: result2,
        total: result3
    };
}

// Export functions for module usage
export { regularFunction, greetPerson, arrowFunction };
export default orchestrator;
```

--------------------------------------------------------------------------------
/tests/test_tree_sitter/test_file.py:
--------------------------------------------------------------------------------

```python
import os
from pathlib import Path
from src.codegraphcontext.tools.languages.python import PythonTreeSitterParser
class MockParser:
    def parse(self, source_bytes):
        class MockTree:
            @property
            def root_node(self):
                return None  # You can mock this deeper if needed
        return MockTree()

class MockQuery:
    def captures(self, node):
        return []  # Simulate no matches for now

class MockLanguage:
    def query(self, query_str):
        return MockQuery()

class MockGenericParserWrapper:
    def __init__(self):
        self.language_name = "python"
        self.language = MockLanguage()
        self.parser = MockParser()


def test_super_resolution():
    # Simulated parsed output from two files
    parsed = [
        {
            "type": "function_call",
            "full_name": "super().greet",
            "class_context": "B",
            "name": "greet"
        },
        {
            "type": "class",
            "name": "B",
            "bases": ["A"]
        },
        {
            "type": "class",
            "name": "A",
            "bases": []
        },
        {
            "type": "function",
            "name": "greet",
            "class_context": "A",
            "file_path": "class_instantiation.py"
        },
        {
            "type": "function",
            "name": "greet",
            "class_context": "Z",
            "file_path": "complex_classes.py"
        }
    ]

    # Find the super().greet() call
    target_call = next(
        (item for item in parsed if item.get("type") == "function_call" and item.get("full_name") == "super().greet"),
        None
    )

    assert target_call is not None, "super().greet() call not found"

    # Simulated resolution logic
    current_class = target_call.get("class_context")
    method_name = target_call.get("name")

    class_map = {
        cls["name"]: cls
        for cls in parsed
        if cls.get("type") == "class"
    }

    resolved = None
    if current_class and current_class in class_map:
        bases = class_map[current_class].get("bases", [])
        for base in bases:
            base_class = class_map.get(base)
            if base_class:
                for item in parsed:
                    if (
                        item.get("type") == "function"
                        and item.get("name") == method_name
                        and item.get("class_context") == base
                    ):
                        resolved = f"{item.get('file_path')}:{base}.{method_name}"
                        break
            if resolved:
                break

    assert resolved is not None, "Resolution failed: no matching method found in base classes"
    assert not resolved.endswith("Z.greet"), f"Bug: super().greet() incorrectly resolved to {resolved}"

```

--------------------------------------------------------------------------------
/src/codegraphcontext/utils/debug_log.py:
--------------------------------------------------------------------------------

```python
import os
from datetime import datetime
import logging
from pathlib import Path
logger = logging.getLogger(__name__)

# Log level mapping
LOG_LEVELS = {
    'DEBUG': logging.DEBUG,
    'INFO': logging.INFO,
    'WARNING': logging.WARNING,
    'ERROR': logging.ERROR,
    'CRITICAL': logging.CRITICAL,
    'DISABLED': logging.CRITICAL + 10  # Higher than CRITICAL to disable all
}

def _get_config_value(key, default):
    """Helper to get config value with fallback"""
    try:
        from codegraphcontext.cli.config_manager import get_config_value
        value = get_config_value(key)
        if value is None:
            return default
        # Convert string boolean to actual boolean
        if isinstance(value, str):
            if value.lower() in ('true', 'false'):
                return value.lower() == 'true'
        return value
    except Exception:
        return default

def _should_log(level_name):
    """Check if a message at the given level should be logged"""
    configured_level = _get_config_value('ENABLE_APP_LOGS', 'INFO')
    
    # Handle legacy boolean values
    if isinstance(configured_level, bool):
        return configured_level
    
    # Convert to uppercase for comparison
    configured_level = str(configured_level).upper()
    
    # If disabled, don't log anything
    if configured_level == 'DISABLED':
        return False
    
    # Get numeric levels
    configured_numeric = LOG_LEVELS.get(configured_level, logging.INFO)
    message_numeric = LOG_LEVELS.get(level_name.upper(), logging.INFO)
    
    # Log if message level >= configured level
    return message_numeric >= configured_numeric

def debug_log(message):
    """Write debug message to a file if DEBUG_LOGS is enabled"""
    # Check if debug logging is enabled via config
    debug_mode = _get_config_value('DEBUG_LOGS', False)
    if not debug_mode:
        return
    
    # Get debug log path from config
    debug_file = _get_config_value('DEBUG_LOG_PATH', os.path.expanduser("~/mcp_debug.log"))
    
    # Ensure parent directory exists
    Path(debug_file).parent.mkdir(parents=True, exist_ok=True)
    
    timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
    with open(debug_file, "a") as f:
        f.write(f"[{timestamp}] {message}\n")
        f.flush()

def info_logger(msg):
    """Log info message if log level allows"""
    if _should_log('INFO'):
        return logger.info(msg)

def error_logger(msg):
    """Log error message if log level allows"""
    if _should_log('ERROR'):
        return logger.error(msg)
    
def warning_logger(msg):
    """Log warning message if log level allows"""
    if _should_log('WARNING'):
        return logger.warning(msg)
    
def debug_logger(msg):
    """Log debug message if log level allows"""
    if _should_log('DEBUG'):
        return logger.debug(msg)

```

--------------------------------------------------------------------------------
/tests/sample_project_go/structs_methods.go:
--------------------------------------------------------------------------------

```go
// structs_methods.go - Demonstrates Go structs and methods
package main

import "fmt"

// Person represents a basic struct
type Person struct {
	Name string
	Age  int
}

// Employee extends Person concept with additional fields
type Employee struct {
	Person
	ID       int
	Position string
	Salary   float64
}

// AnonymousFieldStruct uses anonymous fields
type AnonymousFieldStruct struct {
	string
	int
	bool
}

// PrivateFieldStruct demonstrates private fields
type PrivateFieldStruct struct {
	PublicField  string
	privateField int // unexported field
}

// NewPerson is a constructor function
func NewPerson(name string, age int) *Person {
	return &Person{
		Name: name,
		Age:  age,
	}
}

// Greet is a value receiver method
func (p Person) Greet() string {
	return fmt.Sprintf("Hello, my name is %s", p.Name)
}

// HaveBirthday is a pointer receiver method (modifies struct)
func (p *Person) HaveBirthday() {
	p.Age++
}

// IsAdult demonstrates method with return value
func (p Person) IsAdult() bool {
	return p.Age >= 18
}

// NewEmployee creates a new employee
func NewEmployee(name string, age, id int, position string) *Employee {
	return &Employee{
		Person: Person{
			Name: name,
			Age:  age,
		},
		ID:       id,
		Position: position,
	}
}

// GetDetails is a method on embedded struct
func (e Employee) GetDetails() string {
	return fmt.Sprintf("%s (%d) - %s [ID: %d]", e.Name, e.Age, e.Position, e.ID)
}

// Promote modifies employee position
func (e *Employee) Promote(newPosition string, newSalary float64) {
	e.Position = newPosition
	e.Salary = newSalary
}

// GivesRaise calculates new salary
func (e *Employee) GiveRaise(percentage float64) {
	e.Salary = e.Salary * (1 + percentage/100)
}

// SetPrivateField demonstrates accessing private fields through methods
func (p *PrivateFieldStruct) SetPrivateField(val int) {
	p.privateField = val
}

// GetPrivateField gets the private field value
func (p *PrivateFieldStruct) GetPrivateField() int {
	return p.privateField
}

// MethodCallingMethod demonstrates internal method calls
func (p Person) FullIntroduction() string {
	greeting := p.Greet()
	ageStatus := "minor"
	if p.IsAdult() {
		ageStatus = "adult"
	}
	return fmt.Sprintf("%s and I am a %s", greeting, ageStatus)
}

// CompareAge compares two persons
func (p Person) CompareAge(other Person) string {
	if p.Age > other.Age {
		return fmt.Sprintf("%s is older than %s", p.Name, other.Name)
	} else if p.Age < other.Age {
		return fmt.Sprintf("%s is younger than %s", p.Name, other.Name)
	}
	return fmt.Sprintf("%s and %s are the same age", p.Name, other.Name)
}

func demonstrateStructs() {
	person := NewPerson("Alice", 30)
	fmt.Println(person.Greet())
	person.HaveBirthday()
	
	employee := NewEmployee("Bob", 25, 1001, "Developer")
	employee.Promote("Senior Developer", 90000)
	fmt.Println(employee.GetDetails())
}


```

--------------------------------------------------------------------------------
/website/package.json:
--------------------------------------------------------------------------------

```json
{
  "name": "vite_react_shadcn_ts",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "build:dev": "vite build --mode development",
    "lint": "eslint .",
    "preview": "vite preview"
  },
  "dependencies": {
    "@hookform/resolvers": "^3.10.0",
    "@radix-ui/react-accordion": "^1.2.11",
    "@radix-ui/react-alert-dialog": "^1.1.14",
    "@radix-ui/react-aspect-ratio": "^1.1.7",
    "@radix-ui/react-avatar": "^1.1.10",
    "@radix-ui/react-checkbox": "^1.3.2",
    "@radix-ui/react-collapsible": "^1.1.11",
    "@radix-ui/react-context-menu": "^2.2.15",
    "@radix-ui/react-dialog": "^1.1.14",
    "@radix-ui/react-dropdown-menu": "^2.1.15",
    "@radix-ui/react-hover-card": "^1.1.14",
    "@radix-ui/react-label": "^2.1.7",
    "@radix-ui/react-menubar": "^1.1.15",
    "@radix-ui/react-navigation-menu": "^1.2.13",
    "@radix-ui/react-popover": "^1.1.14",
    "@radix-ui/react-progress": "^1.1.7",
    "@radix-ui/react-radio-group": "^1.3.7",
    "@radix-ui/react-scroll-area": "^1.2.9",
    "@radix-ui/react-select": "^2.2.5",
    "@radix-ui/react-separator": "^1.1.7",
    "@radix-ui/react-slider": "^1.3.5",
    "@radix-ui/react-slot": "^1.2.3",
    "@radix-ui/react-switch": "^1.2.5",
    "@radix-ui/react-tabs": "^1.1.12",
    "@radix-ui/react-toast": "^1.2.14",
    "@radix-ui/react-toggle": "^1.1.9",
    "@radix-ui/react-toggle-group": "^1.1.10",
    "@radix-ui/react-tooltip": "^1.2.7",
    "@supabase/supabase-js": "^2.75.0",
    "@tanstack/react-query": "^5.83.0",
    "@types/aos": "^3.0.7",
    "aos": "^2.3.4",
    "class-variance-authority": "^0.7.1",
    "clsx": "^2.1.1",
    "cmdk": "^1.1.1",
    "date-fns": "^3.6.0",
    "embla-carousel-react": "^8.6.0",
    "framer-motion": "^12.23.22",
    "input-otp": "^1.4.2",
    "lucide-react": "^0.462.0",
    "next-themes": "^0.3.0",
    "react": "^18.3.1",
    "react-day-picker": "^8.10.1",
    "react-dom": "^18.3.1",
    "react-hook-form": "^7.61.1",
    "react-icons": "^5.5.0",
    "react-intersection-observer": "^9.16.0",
    "react-resizable-panels": "^2.1.9",
    "react-router-dom": "^6.30.1",
    "recharts": "^2.15.4",
    "sonner": "^1.7.4",
    "tailwind-merge": "^2.6.0",
    "tailwindcss-animate": "^1.0.7",
    "vaul": "^0.9.9",
    "zod": "^3.25.76"
  },
  "devDependencies": {
    "@eslint/js": "^9.32.0",
    "@tailwindcss/typography": "^0.5.16",
    "@types/node": "^22.16.5",
    "@types/react": "^18.3.23",
    "@types/react-dom": "^18.3.7",
    "@vitejs/plugin-react-swc": "^3.11.0",
    "autoprefixer": "^10.4.21",
    "eslint": "^9.32.0",
    "eslint-plugin-react-hooks": "^5.2.0",
    "eslint-plugin-react-refresh": "^0.4.20",
    "globals": "^15.15.0",
    "postcss": "^8.5.6",
    "tailwindcss": "^3.4.17",
    "typescript": "^5.8.3",
    "typescript-eslint": "^8.38.0",
    "vite": "^5.4.19"
  }
}

```

--------------------------------------------------------------------------------
/src/codegraphcontext/tools/query_tool_languages/cpp_toolkit.py:
--------------------------------------------------------------------------------

```python
class CppToolkit:
    """Handles Neo4j queries for C++ file graph."""
    def get_cypher_query(query: str) -> str:
        """
        Returns a Cypher query string based on the query type requested.

        Supported query types:
        - functions
        - classes
        - imports
        - structs
        - enums
        - unions
        - macros
        - variables
        """


        query = query.strip().lower()

        if query == "functions":
            return """
                MATCH (f:Function)
                RETURN f.name AS name, f.file_path AS file_path, 
                    f.line_number AS line_number, f.docstring AS docstring
                ORDER BY f.file_path, f.line_number
            """

        elif query == "classes":
            return """
                MATCH (c:Class)
                RETURN c.name AS name, c.file_path AS file_path, 
                    c.line_number AS line_number, c.docstring AS docstring
                ORDER BY c.file_path, c.line_number
            """

        elif query == "imports":
            return """
                MATCH (f:File)-[i:IMPORTS]->(m:Module)
                RETURN f.name AS file_name, m.name AS module_name, 
                    m.full_import_name AS full_import_name, m.alias AS alias
                ORDER BY f.name
            """

        elif query == "structs":
            return """
                MATCH (s:Struct)
                RETURN s.name AS name, s.file_path AS file_path, 
                    s.line_number AS line_number, s.fields AS fields
                ORDER BY s.file_path, s.line_number
            """

        elif query == "enums":
            return """
                MATCH (e:Enum)
                RETURN e.name AS name, e.file_path AS file_path, 
                    e.line_number AS line_number, e.values AS values
                ORDER BY e.file_path, e.line_number
            """

        elif query == "unions":
            return """
                MATCH (u:Union)
                RETURN u.name AS name, u.file_path AS file_path, 
                    u.line_number AS line_number, u.members AS members
                ORDER BY u.file_path, u.line_number
            """

        elif query == "macros":
            return """
                MATCH (m:Macro)
                RETURN m.name AS name, m.file_path AS file_path, 
                    m.line_number AS line_number, m.value AS value
                ORDER BY m.file_path, m.line_number
            """

        elif query == "variables":
            return """
                MATCH (v:Variable)
                RETURN v.name AS name, v.file_path AS file_path, 
                    v.line_number AS line_number, v.value AS value, 
                    v.context AS context
                ORDER BY v.file_path, v.line_number
            """

        else:
            raise ValueError(f"Unsupported query type: {query}")

```

--------------------------------------------------------------------------------
/website/src/components/ui/drawer.tsx:
--------------------------------------------------------------------------------

```typescript
import * as React from "react";
import { Drawer as DrawerPrimitive } from "vaul";

import { cn } from "@/lib/utils";

const Drawer = ({ shouldScaleBackground = true, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) => (
  <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />
);
Drawer.displayName = "Drawer";

const DrawerTrigger = DrawerPrimitive.Trigger;

const DrawerPortal = DrawerPrimitive.Portal;

const DrawerClose = DrawerPrimitive.Close;

const DrawerOverlay = React.forwardRef<
  React.ElementRef<typeof DrawerPrimitive.Overlay>,
  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>
>(({ className, ...props }, ref) => (
  <DrawerPrimitive.Overlay ref={ref} className={cn("fixed inset-0 z-50 bg-black/80", className)} {...props} />
));
DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;

const DrawerContent = React.forwardRef<
  React.ElementRef<typeof DrawerPrimitive.Content>,
  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>
>(({ className, children, ...props }, ref) => (
  <DrawerPortal>
    <DrawerOverlay />
    <DrawerPrimitive.Content
      ref={ref}
      className={cn(
        "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
        className,
      )}
      {...props}
    >
      <div className="mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" />
      {children}
    </DrawerPrimitive.Content>
  </DrawerPortal>
));
DrawerContent.displayName = "DrawerContent";

const DrawerHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
  <div className={cn("grid gap-1.5 p-4 text-center sm:text-left", className)} {...props} />
);
DrawerHeader.displayName = "DrawerHeader";

const DrawerFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
  <div className={cn("mt-auto flex flex-col gap-2 p-4", className)} {...props} />
);
DrawerFooter.displayName = "DrawerFooter";

const DrawerTitle = React.forwardRef<
  React.ElementRef<typeof DrawerPrimitive.Title>,
  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>
>(({ className, ...props }, ref) => (
  <DrawerPrimitive.Title
    ref={ref}
    className={cn("text-lg font-semibold leading-none tracking-tight", className)}
    {...props}
  />
));
DrawerTitle.displayName = DrawerPrimitive.Title.displayName;

const DrawerDescription = React.forwardRef<
  React.ElementRef<typeof DrawerPrimitive.Description>,
  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>
>(({ className, ...props }, ref) => (
  <DrawerPrimitive.Description ref={ref} className={cn("text-sm text-muted-foreground", className)} {...props} />
));
DrawerDescription.displayName = DrawerPrimitive.Description.displayName;

export {
  Drawer,
  DrawerPortal,
  DrawerOverlay,
  DrawerTrigger,
  DrawerClose,
  DrawerContent,
  DrawerHeader,
  DrawerFooter,
  DrawerTitle,
  DrawerDescription,
};

```

--------------------------------------------------------------------------------
/website/src/components/FeaturesSection.tsx:
--------------------------------------------------------------------------------

```typescript
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
import { GitBranch, Eye, Zap, Terminal } from "lucide-react";

const features = [
  {
    icon: GitBranch,
    title: "Code Indexing",
    description: "Analyzes code and builds a comprehensive knowledge graph of its components, relationships, and dependencies.",
    color: "graph-node-1"
  },
  {
    icon: Eye,
    title: "Relationship Analysis",
    description: "Query for callers, callees, class hierarchies, and complex code relationships through natural language.",
    color: "graph-node-2"
  },
  {
    icon: Zap,
    title: "Live Updates",
    description: "Watches local files for changes and automatically updates the graph in real-time as you code.",
    color: "graph-node-3"
  },
  {
    icon: Terminal,
    title: "Interactive Setup",
    description: "User-friendly command-line wizard for easy setup. FalkorDB Lite is default (Unix and WSL), with Neo4j available via Docker or native installation.",
    color: "graph-node-1"
  }
];

const FeaturesSection = () => {
  return (
    <section className="py-24 px-4">
      <div className="container mx-auto max-w-6xl">
        <div className="text-center mb-16" data-aos="fade-down">
          <h2 className="text-4xl md:text-5xl font-bold mb-6 bg-gradient-to-r from-primary via-primary to-accent bg-clip-text text-transparent">
            Powerful Features
          </h2>
          <p className="text-xl text-muted-foreground max-w-3xl mx-auto">
            Transform your codebase into an intelligent knowledge graph that AI assistants can understand and navigate
          </p>
        </div>

        <div className="grid md:grid-cols-2 gap-8">
          {features.map((feature, index) => (
            <div key={index} data-aos="fade-up" data-aos-delay={index * 100}>
              <Card
                className="border-border/50 hover:border-primary/30 transition-smooth group hover:shadow-glow animate-float-up dark:bg-gradient-card dark:bg-card/50 dark:border-border/30 dark:hover:border-primary/40 bg-white/95 border-gray-200/50 hover:border-primary/50 shadow-sm h-full"
                style={{ animationDelay: `${index * 0.1}s` }}
              >
                <CardHeader>
                  <div className="flex items-center gap-4 mb-4">
                    <div className={`p-3 rounded-xl bg-${feature.color}/10 border border-${feature.color}/20 group-hover:bg-${feature.color}/20 transition-smooth dark:bg-${feature.color}/20 dark:border-${feature.color}/30 bg-${feature.color}/5 border-${feature.color}/15`}>
                      <feature.icon className={`h-6 w-6 text-${feature.color}`} />
                    </div>
                    <CardTitle className="text-xl font-semibold dark:text-foreground text-gray-900">{feature.title}</CardTitle>
                  </div>
                  <CardDescription className="text-base text-muted-foreground leading-relaxed dark:text-muted-foreground text-gray-600">
                    {feature.description}
                  </CardDescription>
                </CardHeader>
              </Card>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
};

export default FeaturesSection;


```

--------------------------------------------------------------------------------
/website/public/placeholder.svg:
--------------------------------------------------------------------------------

```
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="1200" fill="none"><rect width="1200" height="1200" fill="#EAEAEA" rx="3"/><g opacity=".5"><g opacity=".5"><path fill="#FAFAFA" d="M600.709 736.5c-75.454 0-136.621-61.167-136.621-136.62 0-75.454 61.167-136.621 136.621-136.621 75.453 0 136.62 61.167 136.62 136.621 0 75.453-61.167 136.62-136.62 136.62Z"/><path stroke="#C9C9C9" stroke-width="2.418" d="M600.709 736.5c-75.454 0-136.621-61.167-136.621-136.62 0-75.454 61.167-136.621 136.621-136.621 75.453 0 136.62 61.167 136.62 136.621 0 75.453-61.167 136.62-136.62 136.62Z"/></g><path stroke="url(#a)" stroke-width="2.418" d="M0-1.209h553.581" transform="scale(1 -1) rotate(45 1163.11 91.165)"/><path stroke="url(#b)" stroke-width="2.418" d="M404.846 598.671h391.726"/><path stroke="url(#c)" stroke-width="2.418" d="M599.5 795.742V404.017"/><path stroke="url(#d)" stroke-width="2.418" d="m795.717 796.597-391.441-391.44"/><path fill="#fff" d="M600.709 656.704c-31.384 0-56.825-25.441-56.825-56.824 0-31.384 25.441-56.825 56.825-56.825 31.383 0 56.824 25.441 56.824 56.825 0 31.383-25.441 56.824-56.824 56.824Z"/><g clip-path="url(#e)"><path fill="#666" fill-rule="evenodd" d="M616.426 586.58h-31.434v16.176l3.553-3.554.531-.531h9.068l.074-.074 8.463-8.463h2.565l7.18 7.181V586.58Zm-15.715 14.654 3.698 3.699 1.283 1.282-2.565 2.565-1.282-1.283-5.2-5.199h-6.066l-5.514 5.514-.073.073v2.876a2.418 2.418 0 0 0 2.418 2.418h26.598a2.418 2.418 0 0 0 2.418-2.418v-8.317l-8.463-8.463-7.181 7.181-.071.072Zm-19.347 5.442v4.085a6.045 6.045 0 0 0 6.046 6.045h26.598a6.044 6.044 0 0 0 6.045-6.045v-7.108l1.356-1.355-1.282-1.283-.074-.073v-17.989h-38.689v23.43l-.146.146.146.147Z" clip-rule="evenodd"/></g><path stroke="#C9C9C9" stroke-width="2.418" d="M600.709 656.704c-31.384 0-56.825-25.441-56.825-56.824 0-31.384 25.441-56.825 56.825-56.825 31.383 0 56.824 25.441 56.824 56.825 0 31.383-25.441 56.824-56.824 56.824Z"/></g><defs><linearGradient id="a" x1="554.061" x2="-.48" y1=".083" y2=".087" gradientUnits="userSpaceOnUse"><stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/></linearGradient><linearGradient id="b" x1="796.912" x2="404.507" y1="599.963" y2="599.965" gradientUnits="userSpaceOnUse"><stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/></linearGradient><linearGradient id="c" x1="600.792" x2="600.794" y1="403.677" y2="796.082" gradientUnits="userSpaceOnUse"><stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/></linearGradient><linearGradient id="d" x1="404.85" x2="796.972" y1="403.903" y2="796.02" gradientUnits="userSpaceOnUse"><stop stop-color="#C9C9C9" stop-opacity="0"/><stop offset=".208" stop-color="#C9C9C9"/><stop offset=".792" stop-color="#C9C9C9"/><stop offset="1" stop-color="#C9C9C9" stop-opacity="0"/></linearGradient><clipPath id="e"><path fill="#fff" d="M581.364 580.535h38.689v38.689h-38.689z"/></clipPath></defs></svg>
```

--------------------------------------------------------------------------------
/docs/docs/architecture.md:
--------------------------------------------------------------------------------

```markdown
# Architecture Documentation

This document provides a detailed overview of the architecture of the CodeGraphContext project.

## High-Level Overview

The project is a client-server application designed to analyze and visualize codebases. It consists of:

*   **A Python backend:** This is the core of the application, responsible for parsing and analyzing code, building a graph representation of the codebase, and exposing this data through an API.
*   **A web-based frontend:** A user interface for interacting with the backend, visualizing the code graph, and exploring the codebase.
*   **A command-line interface (CLI):** For managing the backend and performing analysis from the terminal.

## Backend Architecture

The backend is a Python application located in the `src/codegraphcontext` directory.

### Core Components

The `src/codegraphcontext/core` directory contains the fundamental building blocks of the backend:

*   **Database:** A graph database is used to store the code graph. This allows for efficient querying of relationships between code elements (e.g., function calls, class inheritance).
*   **Jobs:** Asynchronous jobs are used for long-running tasks like indexing a new codebase. This prevents the application from becoming unresponsive.
*   **Watcher:** A file system watcher monitors the codebase for changes and triggers re-indexing, keeping the code graph up-to-date.

### Tools

The `src/codegraphcontext/tools` directory contains the logic for code analysis:

*   **Graph Builder:** This component is responsible for parsing the code and building the graph representation that is stored in the database.
*   **Code Finder:** Provides functionality to search for specific code elements within the indexed codebase.
*   **Import Extractor:** This tool analyzes the import statements in the code to understand dependencies between modules.

### Server

The `src/codegraphcontext/server.py` file implements the API server. It exposes the functionality of the backend to the frontend through a JSON-RPC API.

### CLI

The `src/codegraphcontext/cli` directory contains the implementation of the command-line interface. It allows users to:

*   Start and stop the backend server.
*   Index new projects.
*   Run analysis tools from the command line.

## Frontend Architecture

The frontend is a modern web application located in the `website/` directory.

*   **Framework:** It is built using React and TypeScript.
*   **Build Tool:** Vite is used for fast development and building the application.
*   **Component-Based:** The UI is organized into reusable components, located in `website/src/components`. This includes UI elements like buttons and dialogs, as well as higher-level components for different sections of the application.
*   **Styling:** Tailwind CSS is used for styling the application.

## Testing

The `tests/` directory contains the test suite for the project.

*   **Integration Tests:** `test_cgc_integration.py` contains tests that verify the interaction between different components of the backend.
*   **Unit Tests:** Other files in this directory contain unit tests for specific modules and functions.
*   **Sample Project:** The `tests/sample_project` directory contains a variety of Python files used as input for testing the code analysis tools.

```

--------------------------------------------------------------------------------
/organizer/docs.md:
--------------------------------------------------------------------------------

```markdown
# Architecture Documentation

This document provides a detailed overview of the architecture of the CodeGraphContext project.

## High-Level Overview

The project is a client-server application designed to analyze and visualize codebases. It consists of:

*   **A Python backend:** This is the core of the application, responsible for parsing and analyzing code, building a graph representation of the codebase, and exposing this data through an API.
*   **A web-based frontend:** A user interface for interacting with the backend, visualizing the code graph, and exploring the codebase.
*   **A command-line interface (CLI):** For managing the backend and performing analysis from the terminal.

## Backend Architecture

The backend is a Python application located in the `src/codegraphcontext` directory.

### Core Components

The `src/codegraphcontext/core` directory contains the fundamental building blocks of the backend:

*   **Database:** A graph database is used to store the code graph. This allows for efficient querying of relationships between code elements (e.g., function calls, class inheritance).
*   **Jobs:** Asynchronous jobs are used for long-running tasks like indexing a new codebase. This prevents the application from becoming unresponsive.
*   **Watcher:** A file system watcher monitors the codebase for changes and triggers re-indexing, keeping the code graph up-to-date.

### Tools

The `src/codegraphcontext/tools` directory contains the logic for code analysis:

*   **Graph Builder:** This component is responsible for parsing the code and building the graph representation that is stored in the database.
*   **Code Finder:** Provides functionality to search for specific code elements within the indexed codebase.
*   **Import Extractor:** This tool analyzes the import statements in the code to understand dependencies between modules.

### Server

The `src/codegraphcontext/server.py` file implements the API server. It exposes the functionality of the backend to the frontend through a JSON-RPC API.

### CLI

The `src/codegraphcontext/cli` directory contains the implementation of the command-line interface. It allows users to:

*   Start and stop the backend server.
*   Index new projects.
*   Run analysis tools from the command line.

## Frontend Architecture

The frontend is a modern web application located in the `website/` directory.

*   **Framework:** It is built using React and TypeScript.
*   **Build Tool:** Vite is used for fast development and building the application.
*   **Component-Based:** The UI is organized into reusable components, located in `website/src/components`. This includes UI elements like buttons and dialogs, as well as higher-level components for different sections of the application.
*   **Styling:** Tailwind CSS is used for styling the application.

## Testing

The `tests/` directory contains the test suite for the project.

*   **Integration Tests:** `test_cgc_integration.py` contains tests that verify the interaction between different components of the backend.
*   **Unit Tests:** Other files in this directory contain unit tests for specific modules and functions.
*   **Sample Project:** The `tests/sample_project` directory contains a variety of Python files used as input for testing the code analysis tools.

```

--------------------------------------------------------------------------------
/website/tailwind.config.ts:
--------------------------------------------------------------------------------

```typescript
import type { Config } from "tailwindcss";

export default {
  darkMode: ["class"],
  content: ["./pages/**/*.{ts,tsx}", "./components/**/*.{ts,tsx}", "./app/**/*.{ts,tsx}", "./src/**/*.{ts,tsx}"],
  prefix: "",
  theme: {
    container: {
      center: true,
      padding: "2rem",
      screens: {
        "2xl": "1400px",
      },
    },
    extend: {
      colors: {
        border: "hsl(var(--border))",
        input: "hsl(var(--input))",
        ring: "hsl(var(--ring))",
        background: "hsl(var(--background))",
        foreground: "hsl(var(--foreground))",
        primary: {
          DEFAULT: "hsl(var(--primary))",
          foreground: "hsl(var(--primary-foreground))",
        },
        secondary: {
          DEFAULT: "hsl(var(--secondary))",
          foreground: "hsl(var(--secondary-foreground))",
        },
        destructive: {
          DEFAULT: "hsl(var(--destructive))",
          foreground: "hsl(var(--destructive-foreground))",
        },
        muted: {
          DEFAULT: "hsl(var(--muted))",
          foreground: "hsl(var(--muted-foreground))",
        },
        accent: {
          DEFAULT: "hsl(var(--accent))",
          foreground: "hsl(var(--accent-foreground))",
        },
        popover: {
          DEFAULT: "hsl(var(--popover))",
          foreground: "hsl(var(--popover-foreground))",
        },
        card: {
          DEFAULT: "hsl(var(--card))",
          foreground: "hsl(var(--card-foreground))",
        },
        sidebar: {
          DEFAULT: "hsl(var(--sidebar-background))",
          foreground: "hsl(var(--sidebar-foreground))",
          primary: "hsl(var(--sidebar-primary))",
          "primary-foreground": "hsl(var(--sidebar-primary-foreground))",
          accent: "hsl(var(--sidebar-accent))",
          "accent-foreground": "hsl(var(--sidebar-accent-foreground))",
          border: "hsl(var(--sidebar-border))",
          ring: "hsl(var(--sidebar-ring))",
        },
        // Graph-specific colors
        "graph-node-1": "hsl(var(--graph-node-1))",
        "graph-node-2": "hsl(var(--graph-node-2))",
        "graph-node-3": "hsl(var(--graph-node-3))",
        "graph-edge": "hsl(var(--graph-edge))",
      },
      backgroundImage: {
        "gradient-primary": "var(--gradient-primary)",
        "gradient-hero": "var(--gradient-hero)",
        "gradient-card": "var(--gradient-card)",
      },
      boxShadow: {
        "glow": "var(--shadow-glow)",
        "card": "var(--shadow-card)",
      },
      transitionTimingFunction: {
        "smooth": "var(--transition-smooth)",
        "bounce": "var(--transition-bounce)",
      },
      borderRadius: {
        lg: "var(--radius)",
        md: "calc(var(--radius) - 2px)",
        sm: "calc(var(--radius) - 4px)",
      },
      keyframes: {
        "accordion-down": {
          from: {
            height: "0",
          },
          to: {
            height: "var(--radix-accordion-content-height)",
          },
        },
        "accordion-up": {
          from: {
            height: "var(--radix-accordion-content-height)",
          },
          to: {
            height: "0",
          },
        },
      },
      animation: {
        "accordion-down": "accordion-down 0.2s ease-out",
        "accordion-up": "accordion-up 0.2s ease-out",
      },
    },
  },
  plugins: [require("tailwindcss-animate")],
} satisfies Config;

```

--------------------------------------------------------------------------------
/src/codegraphcontext/tools/advanced_language_query_tool.py:
--------------------------------------------------------------------------------

```python
import re
import logging
#importing all the language toolkits
from ..tools.query_tool_languages.c_toolkit import CToolkit
from ..tools.query_tool_languages.cpp_toolkit import CppToolkit
from ..tools.query_tool_languages.go_toolkit import GoToolkit
from ..tools.query_tool_languages.java_toolkit import JavaToolkit
from ..tools.query_tool_languages.javascript_toolkit import JavascriptToolkit
from ..tools.query_tool_languages.python_toolkit import PythonToolkit
from ..tools.query_tool_languages.ruby_toolkit import RubyToolkit
from ..tools.query_tool_languages.rust_toolkit import RustToolkit
from ..tools.query_tool_languages.typescript_toolkit import TypescriptToolkit
from ..tools.query_tool_languages.csharp_toolkit import CSharpToolkit

from ..core.database import DatabaseManager
from ..utils.debug_log import debug_log

logger = logging.getLogger(__name__)

class Advanced_language_query:
    """
    Tool implementation for executing a read-only language specific Cypher query.
    
    Important: Includes a safety check to prevent any database modification
    by disallowing keywords like CREATE, MERGE, DELETE, etc.
    """

    TOOLKITS = {
        "c": CToolkit,
        "cpp": CppToolkit,
        "go": GoToolkit,
        "java": JavaToolkit,
        "javascript": JavascriptToolkit,
        "python": PythonToolkit,
        "ruby": RubyToolkit,
        "rust": RustToolkit,
        "typescript": TypescriptToolkit,
        "c_sharp": CSharpToolkit
    }
    Supported_queries = {
        "repository": "Repository",
        "directory": "Directory",
        "file": "File",
        "module": "Module",
        "function": "Function",
        "class": "Class",
        "struct": "Struct",
        "enum": "Enum",
        "union": "Union",
        "macro": "Macro",
        "variable": "Variable"
    }


    def __init__(self, db_manager: DatabaseManager):
        self.db_manager = db_manager

    def advanced_language_query(self, language: str, query: str):
        # Validating whether query is valid or not
        query = query.strip().lower()
        if query not in self.Supported_queries:
            raise ValueError(
                f"Unsupported query type '{query}'"
                f"Supported: {', '.join(self.Supported_queries.keys())}"
            )
        label = self.Supported_queries[query]

        # Set toolkit for the specified language
        language = language.lower()

        if language not in self.TOOLKITS:
            raise ValueError(f"Unsupported language: {language}")
        self.toolkit = self.TOOLKITS[language]()

        # Getting the language query
        cypher_query = self.toolkit.get_cypher_query(label)
        try:
            debug_log(f"Executing Cypher query: {cypher_query}")
            with self.db_manager.get_driver().session() as session:
                result = session.run(cypher_query)
                # Convert results to a list of dictionaries for clean JSON serialization
                records = [record.data() for record in result]

                return {
                    "success": True, 
                    "language": language,
                    "query": cypher_query,
                    "results": records 
                }
        except Exception as e:
            debug_log(f"Error executing Cypher query: {str(e)}")
            return {
                "error": "An unexpected error occurred while executing the query.",
                "details": str(e)
            }





```

--------------------------------------------------------------------------------
/docs/docs/use_cases.md:
--------------------------------------------------------------------------------

```markdown
# Real World Use Cases

CodeGraphContext can be a powerful ally in your daily coding journey. Here are some real-world scenarios where it can significantly boost your productivity and understanding of a codebase:

1.  **Onboarding New Developers:** A new team member can quickly get up to speed by asking questions like:
    -   "Where is the authentication logic handled?"
    -   "Show me the main entry point of the application."

2.  **Impact Analysis:** Before making a change, assess the potential ripple effects:
    -   "What other parts of the code will be affected if I change the `calculate_total` function?"

3.  **Code Review:** Gain context on pull requests faster:
    -   "Show me the callers of this new function."
    -   "Does this change introduce any new dependencies?"

4.  **Debugging:** Trace execution flows to pinpoint the source of a bug:
    -   "Show me the call chain from `handle_request` to `process_payment`."

5.  **Refactoring:** Identify and plan large-scale code changes:
    -   "Find all instances of the deprecated `OldApiClass`."
    -   "List all functions that use the `urllib` library so I can replace them with `requests`."

6.  **Identifying Code Smells:** Proactively find areas that need improvement:
    -   "Find the 10 most complex functions in the codebase."
    -   "Show me functions with more than 5 arguments."

7.  **Security Audits:** Search for potentially vulnerable code patterns:
    -   "Find all functions that use the `eval` function."
    -   "Show me where raw SQL queries are being executed."

8.  **Automated Documentation:** Use the tool's understanding of the code to generate documentation. (This is what this agent is doing!)

9.  **Dependency Management:** Understand how your project uses its dependencies:
    -   "Which files import the `requests` library?"
    -   "Are there any circular dependencies between modules?"

10. **Cleaning Up Unused Code:** Keep your codebase lean and maintainable:
    -   "Is there any dead or unused code in this project?"

11. **Exploring a Large Codebase:** Navigate large, unfamiliar projects with ease:
    -   "List all the classes in the `core` module."
    -   "What are the top-level functions in the `utils` directory?"

12. **Enforcing Coding Standards:** Check for adherence to team conventions:
    -   "Find all functions that are not decorated with `@log_execution`."
    -   "Show me all public methods that don't have a docstring."

13. **Discovering API Usage:** Find examples of how to use internal or external APIs:
    -   "Show me how other parts of the code use the `UserService`."

14. **Improving Test Coverage:** Identify areas that may lack test coverage:
    -   "Find all functions that are not called by any test files."

15. **Visualizing Code Structure:** Get a bird's-eye view of your project's architecture:
    -   "Generate a graph visualization of the `auth` module and its dependencies."

16. **Learning a New Framework:** Understand how a new framework operates by exploring its source code.

17. **Code Archeology:** Investigate legacy code to understand its history and purpose.

18. **Planning a Migration:** Identify all points of contact when migrating a library or framework:
    -   "Find all the places where the `old_payment_gateway` is used."

19. **Knowledge Sharing:** Use the code graph as a centralized, always-up-to-date knowledge base for your team.

20. **Automated Code Reviews:** Integrate CodeGraphContext into your CI/CD pipeline to automatically flag potential issues in pull requests.

```

--------------------------------------------------------------------------------
/tests/test_kotlin_parser.py:
--------------------------------------------------------------------------------

```python
import pytest
from pathlib import Path
import sys
import os

# Ensure src is in path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))

from codegraphcontext.tools.languages.kotlin import KotlinTreeSitterParser
from codegraphcontext.tools.graph_builder import TreeSitterParser
from codegraphcontext.utils.tree_sitter_manager import get_tree_sitter_manager

@pytest.fixture
def parser():
    """Returns an instance of the Kotlin parser via generic wrapper."""
    return TreeSitterParser('kotlin')

@pytest.fixture
def sample_project_path():
    """Returns the path to the sample Kotlin project."""
    return Path(__file__).parent / "sample_project_kotlin"

def test_parse_main_kt(parser, sample_project_path):
    """Test parsing of Main.kt."""
    file_path = sample_project_path / "Main.kt"
    result = parser.parse(file_path, is_dependency=False)

    assert result["file_path"] == str(file_path)
    
    # Check Classes
    classes = {c["name"] for c in result["classes"]}
    assert "Main" in classes
    assert "Calculator" in classes

    # Check Functions in Main
    # Functions are returned in a flat list with 'class_context'
    main_functions = [f for f in result["functions"] if f.get("class_context") == "Main"]
    method_names = {m["name"] for m in main_functions}
    assert "main" in method_names
    
    # Check Call to User.greet
    # Calls are in result["function_calls"]
    greet_call = next((c for c in result["function_calls"] if c["name"] == "greet"), None)
    assert greet_call is not None, "Should detect call to greet()"
    
    # Verify type inference for the call (user.greet())
    # The variable 'user' is initialized with 'User(...)', so inferred_obj_type should be 'User'
    assert greet_call.get("inferred_obj_type") == "User"

def test_parse_user_kt(parser, sample_project_path):
    """Test parsing of User.kt (Data Class and Interface)."""
    file_path = sample_project_path / "User.kt"
    result = parser.parse(file_path, is_dependency=False)

    # Check Interface
    classes = {c["name"]: c for c in result["classes"]}
    assert "Greeter" in classes

    # Check Data Class
    assert "User" in classes
    user_class = classes["User"]
    
    # Verify inheritance
    assert "Greeter" in user_class.get("bases", [])

    # Check method override
    user_methods = [f for f in result["functions"] if f.get("class_context") == "User"]
    method_names = {m["name"] for m in user_methods}
    assert "greet" in method_names

def test_type_inference_calculator(parser, sample_project_path):
    """Test type inference for a simple local class usage."""
    file_path = sample_project_path / "Main.kt"
    result = parser.parse(file_path, is_dependency=False)
    
    # val calculator = Calculator()
    # println(calculator.add(5, 10))
    
    add_call = next((c for c in result["function_calls"] if c["name"] == "add"), None)
    assert add_call is not None
    assert add_call.get("inferred_obj_type") == "Calculator"

def test_import_resolution_support(parser, sample_project_path):
    """Test that imports are correctly extracted."""
    file_path = sample_project_path / "Main.kt"
    result = parser.parse(file_path, is_dependency=False)
    
    imports = result.get("imports", [])
    assert len(imports) > 0
    
    # Imports have "name" (path) and "full_import_name"
    found = False
    for imp in imports:
        if "com.example.project.User" in imp.get("name", ""):
            found = True
            break
    assert found, "Should find import for User"

```

--------------------------------------------------------------------------------
/docs/site/assets/javascripts/lunr/min/lunr.stemmer.support.min.js:
--------------------------------------------------------------------------------

```javascript
!function(r,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(r.lunr)}(this,function(){return function(r){r.stemmerSupport={Among:function(r,t,i,s){if(this.toCharArray=function(r){for(var t=r.length,i=new Array(t),s=0;s<t;s++)i[s]=r.charCodeAt(s);return i},!r&&""!=r||!t&&0!=t||!i)throw"Bad Among initialisation: s:"+r+", substring_i: "+t+", result: "+i;this.s_size=r.length,this.s=this.toCharArray(r),this.substring_i=t,this.result=i,this.method=s},SnowballProgram:function(){var r;return{bra:0,ket:0,limit:0,cursor:0,limit_backward:0,setCurrent:function(t){r=t,this.cursor=0,this.limit=t.length,this.limit_backward=0,this.bra=this.cursor,this.ket=this.limit},getCurrent:function(){var t=r;return r=null,t},in_grouping:function(t,i,s){if(this.cursor<this.limit){var e=r.charCodeAt(this.cursor);if(e<=s&&e>=i&&(e-=i,t[e>>3]&1<<(7&e)))return this.cursor++,!0}return!1},in_grouping_b:function(t,i,s){if(this.cursor>this.limit_backward){var e=r.charCodeAt(this.cursor-1);if(e<=s&&e>=i&&(e-=i,t[e>>3]&1<<(7&e)))return this.cursor--,!0}return!1},out_grouping:function(t,i,s){if(this.cursor<this.limit){var e=r.charCodeAt(this.cursor);if(e>s||e<i)return this.cursor++,!0;if(e-=i,!(t[e>>3]&1<<(7&e)))return this.cursor++,!0}return!1},out_grouping_b:function(t,i,s){if(this.cursor>this.limit_backward){var e=r.charCodeAt(this.cursor-1);if(e>s||e<i)return this.cursor--,!0;if(e-=i,!(t[e>>3]&1<<(7&e)))return this.cursor--,!0}return!1},eq_s:function(t,i){if(this.limit-this.cursor<t)return!1;for(var s=0;s<t;s++)if(r.charCodeAt(this.cursor+s)!=i.charCodeAt(s))return!1;return this.cursor+=t,!0},eq_s_b:function(t,i){if(this.cursor-this.limit_backward<t)return!1;for(var s=0;s<t;s++)if(r.charCodeAt(this.cursor-t+s)!=i.charCodeAt(s))return!1;return this.cursor-=t,!0},find_among:function(t,i){for(var s=0,e=i,n=this.cursor,u=this.limit,o=0,h=0,c=!1;;){for(var a=s+(e-s>>1),f=0,l=o<h?o:h,_=t[a],m=l;m<_.s_size;m++){if(n+l==u){f=-1;break}if(f=r.charCodeAt(n+l)-_.s[m])break;l++}if(f<0?(e=a,h=l):(s=a,o=l),e-s<=1){if(s>0||e==s||c)break;c=!0}}for(;;){var _=t[s];if(o>=_.s_size){if(this.cursor=n+_.s_size,!_.method)return _.result;var b=_.method();if(this.cursor=n+_.s_size,b)return _.result}if((s=_.substring_i)<0)return 0}},find_among_b:function(t,i){for(var s=0,e=i,n=this.cursor,u=this.limit_backward,o=0,h=0,c=!1;;){for(var a=s+(e-s>>1),f=0,l=o<h?o:h,_=t[a],m=_.s_size-1-l;m>=0;m--){if(n-l==u){f=-1;break}if(f=r.charCodeAt(n-1-l)-_.s[m])break;l++}if(f<0?(e=a,h=l):(s=a,o=l),e-s<=1){if(s>0||e==s||c)break;c=!0}}for(;;){var _=t[s];if(o>=_.s_size){if(this.cursor=n-_.s_size,!_.method)return _.result;var b=_.method();if(this.cursor=n-_.s_size,b)return _.result}if((s=_.substring_i)<0)return 0}},replace_s:function(t,i,s){var e=s.length-(i-t),n=r.substring(0,t),u=r.substring(i);return r=n+s+u,this.limit+=e,this.cursor>=i?this.cursor+=e:this.cursor>t&&(this.cursor=t),e},slice_check:function(){if(this.bra<0||this.bra>this.ket||this.ket>this.limit||this.limit>r.length)throw"faulty slice operation"},slice_from:function(r){this.slice_check(),this.replace_s(this.bra,this.ket,r)},slice_del:function(){this.slice_from("")},insert:function(r,t,i){var s=this.replace_s(r,t,i);r<=this.bra&&(this.bra+=s),r<=this.ket&&(this.ket+=s)},slice_to:function(){return this.slice_check(),r.substring(this.bra,this.ket)},eq_v_b:function(r){return this.eq_s_b(r.length,r)}}}},r.trimmerSupport={generateTrimmer:function(r){var t=new RegExp("^[^"+r+"]+"),i=new RegExp("[^"+r+"]+$");return function(r){return"function"==typeof r.update?r.update(function(r){return r.replace(t,"").replace(i,"")}):r.replace(t,"").replace(i,"")}}}}});
```

--------------------------------------------------------------------------------
/src/codegraphcontext/cli/setup_macos.py:
--------------------------------------------------------------------------------

```python
# src/codegraphcontext/cli/setup_macos.py
import platform
import time
from pathlib import Path

def _has_brew(run_command, console) -> bool:
    return run_command(["which", "brew"], console, check=False) is not None

def _brew_install_neo4j(run_command, console) -> str:
    if run_command(["brew", "install", "neo4j@5"], console, check=False):
        return "neo4j@5"
    if run_command(["brew", "install", "neo4j"], console, check=False):
        return "neo4j"
    return ""

def _brew_start(service: str, run_command, console) -> bool:
    return run_command(["brew", "services", "start", service], console, check=False) is not None

def _set_initial_password(new_pw: str, run_command, console) -> bool:
    cmd = [
        "cypher-shell",
        "-u", "neo4j",
        "-p", "neo4j",
        f"ALTER CURRENT USER SET PASSWORD FROM 'neo4j' TO '{new_pw}'",
    ]
    return run_command(cmd, console, check=False) is not None

def setup_macos_binary(console, prompt, run_command, _generate_mcp_json):
    """Automates Neo4j install & config on macOS via Homebrew."""
    os_name = platform.system()
    console.print(f"Detected Operating System: [bold yellow]{os_name}[/bold yellow]")

    if os_name != "Darwin":
        console.print("[yellow]This installer is for macOS only.[/yellow]")
        return

    console.print("[bold]Starting automated Neo4j installation for macOS.[/bold]")

    if not prompt([{
        "type": "confirm",
        "message": "Proceed with Homebrew-based install of Neo4j?",
        "name": "proceed",
        "default": True
    }]).get("proceed"):
        return

    console.print("\n[bold]Step: Checking for Homebrew...[/bold]")
    if not _has_brew(run_command, console):
        console.print(
            "[bold red]Homebrew not found.[/bold red] "
            "Install from [bold blue]https://brew.sh[/bold blue] and re-run this setup."
        )
        return

    console.print("\n[bold]Step: Installing Neo4j via Homebrew...[/bold]")
    service = _brew_install_neo4j(run_command, console)
    if not service:
        console.print("[bold red]Failed to install Neo4j via Homebrew.[/bold red]")
        return

    console.print(f"\n[bold]Step: Starting Neo4j service ({service})...[/bold]")
    if not _brew_start(service, run_command, console):
        console.print("[bold red]Failed to start Neo4j with brew services.[/bold red]")
        return

    while True:
        answers = prompt([
            {"type": "password", "message": "Enter a new password for Neo4j:", "name": "pw"},
            {"type": "password", "message": "Confirm the new password:", "name": "pw2"},
        ]) or {}
        if not answers:
            return
        pw, pw2 = answers.get("pw"), answers.get("pw2")
        if pw and pw == pw2:
            new_password = pw
            break
        console.print("[red]Passwords do not match or are empty. Please try again.[/red]")

    console.print("\n[yellow]Waiting 10 seconds for Neo4j to finish starting...[/yellow]")
    time.sleep(10)

    console.print("\n[bold]Step: Setting initial password with cypher-shell...[/bold]")
    if not _set_initial_password(new_password, run_command, console):
        console.print(
            "[bold red]Failed to set the initial password.[/bold red]\n"
            "Try manually:\n"
            "  cypher-shell -u neo4j -p neo4j \"ALTER CURRENT USER SET PASSWORD FROM 'neo4j' TO '<your_pw>'\""
        )
        return

    creds = {"uri": "neo4j://localhost:7687", "username": "neo4j", "password": new_password}
    _generate_mcp_json(creds)

    env_path = Path.home() / ".codegraphcontext" / ".env"
    console.print(f"\n[bold green]All done![/bold green] Neo4j running. Credentials saved to: [bold]{env_path}[/bold]")

```

--------------------------------------------------------------------------------
/windows_setup_guide.md:
--------------------------------------------------------------------------------

```markdown
# CodeGraphContext – Windows Setup Guide

This guide explains how to set up **CodeGraphContext on Windows**.

⚠️ **Important Note for Windows Users**
- **FalkorDB Lite (redislite) is not supported natively on Windows**
- Recommended approach: **Use WSL (Windows Subsystem for Linux)**
- Alternative: Use **Neo4j** as the database backend

---

## Option 1 (Recommended): Setup Using WSL

WSL allows you to run CodeGraphContext in a Linux environment on Windows, enabling **FalkorDB Lite** and ensuring the smoothest setup experience.

---

### Step 1: Install WSL

Open **PowerShell as Administrator** and run:

```powershell
wsl --install
````

Restart your system if prompted.

Verify WSL installation:

```powershell
wsl --version
```

---

### Step 2: Open Ubuntu (WSL Terminal)

After restart:

* Open the Start Menu
* Search for **Ubuntu**
* Open it

Update packages:

```bash
sudo apt update
sudo apt upgrade -y
```

---

### Step 3: Install Python (3.12+ Recommended)

Inside the WSL terminal:

```bash
sudo apt install python3.12 python3-pip -y
```

Verify installation:

```bash
python3 --version
pip3 --version
```

> CodeGraphContext supports **Python 3.10 – 3.14**.
> **FalkorDB Lite works best with Python 3.12+**.

---

### Step 4: Install CodeGraphContext

```bash
pip install codegraphcontext
```

Verify installation:

```bash
cgc --help
```

---

### Step 5: Index a Project

Navigate to your project directory.

Example (accessing Windows files from WSL):

```bash
cd /mnt/c/Users/<yourname>/Desktop/<your-project-folder>
```

Index the codebase:

```bash
cgc index .
```

---

### Step 6 (Optional): Live Watch Mode

To automatically update the graph when files change:

```bash
cgc watch .
```

---

### Step 7 (Optional): MCP Setup (AI Integration)

To use CodeGraphContext as an MCP server for AI assistants/IDEs:

```bash
cgc mcp setup
```

Start the MCP server:

```bash
cgc mcp start
```

---

## Option 2: Native Windows Setup Using Neo4j

If you do not want WSL, CodeGraphContext can be configured to use **Neo4j** as its database backend.

---

### Step 1: Install Python (Windows)

Download Python from:
[https://www.python.org/downloads/](https://www.python.org/downloads/)

During installation, ensure:
✅ **Add Python to PATH**

Verify:

```powershell
python --version
pip --version
```

---

### Step 2: Install CodeGraphContext

```powershell
pip install codegraphcontext
```

Verify:

```powershell
cgc --help
```

---

### Step 3: Install & Run Neo4j

Neo4j can be installed using one of the following:

* Neo4j Desktop (GUI)
* Neo4j via Docker (recommended)
* Neo4j AuraDB (cloud)

Ensure Neo4j is running and note:

* URI (example: `bolt://localhost:7687`)
* Username
* Password

---

### Step 4: Configure Neo4j in CodeGraphContext

Run:

```bash
cgc neo4j setup
```

Follow the prompts to enter your Neo4j credentials.

---

### Step 5: Index a Project

Navigate to your project:

```powershell
cd path\to\your\project
```

Index the codebase:

```powershell
cgc index .
```

---

## Ignoring Files (`.cgcignore`)

To ignore files and folders while indexing, create a `.cgcignore` file in your project root.

Example `.cgcignore`:

```txt
/build/
/dist/
/node_modules/
/vendor/
*.log
```

---

## Common Windows Issues

### `'cgc' command not found`

* Restart your terminal after installation
* Ensure Python Scripts directory is in PATH
* Try: `python -m pip install codegraphcontext`

### WSL path confusion

Windows drives can be accessed from WSL using:

```bash
cd /mnt/c/
```

### Neo4j connection issues

* Ensure Neo4j is running
* Check URI format: `bolt://localhost:7687`
* Double-check username/password

---

## Verify Installation

Run:

```bash
cgc list
```
If no errors are shown, setup is complete 


```

--------------------------------------------------------------------------------
/website/src/components/ui/dialog.tsx:
--------------------------------------------------------------------------------

```typescript
import * as React from "react";
import * as DialogPrimitive from "@radix-ui/react-dialog";
import { X } from "lucide-react";

import { cn } from "@/lib/utils";

const Dialog = DialogPrimitive.Root;

const DialogTrigger = DialogPrimitive.Trigger;

const DialogPortal = DialogPrimitive.Portal;

const DialogClose = DialogPrimitive.Close;

const DialogOverlay = React.forwardRef<
  React.ElementRef<typeof DialogPrimitive.Overlay>,
  React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
>(({ className, ...props }, ref) => (
  <DialogPrimitive.Overlay
    ref={ref}
    className={cn(
      "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
      className,
    )}
    {...props}
  />
));
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;

const DialogContent = React.forwardRef<
  React.ElementRef<typeof DialogPrimitive.Content>,
  React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
>(({ className, children, ...props }, ref) => (
  <DialogPortal>
    <DialogOverlay />
    <DialogPrimitive.Content
      ref={ref}
      className={cn(
        "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
        className,
      )}
      {...props}
    >
      {children}
      <DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none">
        <X className="h-4 w-4" />
        <span className="sr-only">Close</span>
      </DialogPrimitive.Close>
    </DialogPrimitive.Content>
  </DialogPortal>
));
DialogContent.displayName = DialogPrimitive.Content.displayName;

const DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
  <div className={cn("flex flex-col space-y-1.5 text-center sm:text-left", className)} {...props} />
);
DialogHeader.displayName = "DialogHeader";

const DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
  <div className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)} {...props} />
);
DialogFooter.displayName = "DialogFooter";

const DialogTitle = React.forwardRef<
  React.ElementRef<typeof DialogPrimitive.Title>,
  React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
>(({ className, ...props }, ref) => (
  <DialogPrimitive.Title
    ref={ref}
    className={cn("text-lg font-semibold leading-none tracking-tight", className)}
    {...props}
  />
));
DialogTitle.displayName = DialogPrimitive.Title.displayName;

const DialogDescription = React.forwardRef<
  React.ElementRef<typeof DialogPrimitive.Description>,
  React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
>(({ className, ...props }, ref) => (
  <DialogPrimitive.Description ref={ref} className={cn("text-sm text-muted-foreground", className)} {...props} />
));
DialogDescription.displayName = DialogPrimitive.Description.displayName;

export {
  Dialog,
  DialogPortal,
  DialogOverlay,
  DialogClose,
  DialogTrigger,
  DialogContent,
  DialogHeader,
  DialogFooter,
  DialogTitle,
  DialogDescription,
};

```

--------------------------------------------------------------------------------
/funding.json:
--------------------------------------------------------------------------------

```json
{
    "$schema": "https://fundingjson.org/schema/v1.1.0.json",
    "version": "v1.1.0",
    "entity": {
        "type": "individual",
        "role": "maintainer",
        "name": "Shashank Shekhar Singh",
        "email": "[email protected]",
        "phone": "",
        "description": "Maintainer of CodeGraphContext, an open-source developer tooling project focused on graph-based code understanding for AI and large-scale software systems.",
        "webpageUrl": {
            "url": "https://www.linkedin.com/in/shashank-shekhar-singh-121128254"
        }
    },
    "projects": [
        {
            "guid": "codegraphcontext",
            "name": "CodeGraphContext",
            "description": "CodeGraphContext is an open-source developer infrastructure tool that indexes source code into a continuously updated graph, enabling AI assistants and engineering teams to understand real-world codebases with accuracy and context.",
            "webpageUrl": {
                "url": "https://codegraphcontext.vercel.app/"
            },
            "repositoryUrl": {
                "url": "https://github.com/Shashankss1205/CodeGraphContext"
            },
            "licenses": [
                "spdx:MIT"
            ],
            "tags": [
                "developer-tools",
                "industry-tooling",
                "ai-infrastructure",
                "code-analysis",
                "knowledge-graph",
                "mcp",
                "open-source"
            ]
        }
    ],
    "funding": {
        "channels": [
            {
                "guid": "bank-transfer",
                "type": "bank",
                "address": "[email protected]",
                "description": "Will accept direct bank transfers. Please e-mail me for details."
            },
            {
                "guid": "github-sponsors",
                "type": "payment-provider",
                "address": "https://github.com/sponsors/Shashankss1205",
                "description": "Project maintainer will accept payments through GitHub Sponsors."
            }
        ],
        "plans": [
            {
                "guid": "hosting",
                "status": "active",
                "name": "Open Source Infrastructure & Industry Tooling Deployment",
                "description": "This will cover the monthly server hosting costs for the projects.",
                "amount": 10000,
                "currency": "INR",
                "frequency": "monthly",
                "channels": [
                    "bank-transfer",
                    "github-sponsors"
                ]
            },
            {
                "guid": "development",
                "status": "active",
                "name": "Open Source Infrastructure & Industry Tooling Development",
                "description": "Funding to improve usability, reliability, performance, and ecosystem readiness of CodeGraphContext as an industry-grade open-source developer tool.",
                "amount": 50000,
                "currency": "INR",
                "frequency": "one-time",
                "channels": [
                    "bank-transfer",
                    "github-sponsors"
                ]
            },
            {
                "guid": "developer-time",
                "status": "active",
                "name": "Developer compensation",
                "description": "This will cover the cost of one developer working part-time on the projects.",
                "amount": 40000,
                "currency": "INR",
                "frequency": "monthly",
                "channels": [
                    "bank-transfer",
                    "github-sponsors"
                ]
            }
        ],
        "history": null
    }
}
```

--------------------------------------------------------------------------------
/tests/sample_project_rust/src/basic_functions.rs:
--------------------------------------------------------------------------------

```rust
// basic_functions.rs - Demonstrates basic Rust function patterns and ownership
use std::fmt;

/// Simple function with single return value
pub fn simple_function(x: i32) -> i32 {
    x * 2
}

/// Multiple return values using tuple
pub fn multiple_returns(a: i32, b: i32) -> (i32, i32, i32) {
    (a + b, a - b, a * b)
}

/// Function with Result return type for error handling
pub fn divide(a: i32, b: i32) -> Result<i32, String> {
    if b == 0 {
        Err("Division by zero".to_string())
    } else {
        Ok(a / b)
    }
}

/// Function with Option return type
pub fn find_first_even(numbers: &[i32]) -> Option<i32> {
    for &num in numbers {
        if num % 2 == 0 {
            return Some(num);
        }
    }
    None
}

/// Function demonstrating ownership transfer
pub fn take_ownership(s: String) -> usize {
    let len = s.len();
    println!("Taking ownership of: {}", s);
    len
}

/// Function borrowing immutably
pub fn borrow_read(s: &String) -> usize {
    s.len()
}

/// Function borrowing mutably
pub fn borrow_write(s: &mut String) {
    s.push_str(" - modified");
}

/// Function returning borrowed reference with lifetime
pub fn longest<'a>(x: &'a str, y: &'a str) -> &'a str {
    if x.len() > y.len() {
        x
    } else {
        y
    }
}

/// Generic function with trait bound
pub fn print_it<T: fmt::Display>(item: T) {
    println!("Item: {}", item);
}

/// Generic function with multiple trait bounds
pub fn compare_and_print<T: PartialOrd + fmt::Display>(a: T, b: T) {
    if a > b {
        println!("{} is greater than {}", a, b);
    } else {
        println!("{} is less than or equal to {}", a, b);
    }
}

/// Higher-order function taking closure
pub fn apply_twice<F>(f: F, x: i32) -> i32
where
    F: Fn(i32) -> i32,
{
    f(f(x))
}

/// Function returning closure
pub fn make_multiplier(factor: i32) -> impl Fn(i32) -> i32 {
    move |x| x * factor
}

/// Recursive function
pub fn factorial(n: u32) -> u32 {
    match n {
        0 | 1 => 1,
        _ => n * factorial(n - 1),
    }
}

/// Fibonacci using recursion
pub fn fibonacci(n: u32) -> u32 {
    match n {
        0 => 0,
        1 => 1,
        _ => fibonacci(n - 1) + fibonacci(n - 2),
    }
}

/// Function with slice parameter
pub fn sum_slice(numbers: &[i32]) -> i32 {
    numbers.iter().sum()
}

/// Function with vector parameter (takes ownership)
pub fn sort_vector(mut vec: Vec<i32>) -> Vec<i32> {
    vec.sort();
    vec
}

/// Function demonstrating early return
pub fn validate_age(age: i32) -> Result<i32, String> {
    if age < 0 {
        return Err("Age cannot be negative".to_string());
    }
    if age > 150 {
        return Err("Age is unrealistic".to_string());
    }
    Ok(age)
}

/// Function with default parameters using Option
pub fn greet(name: &str, title: Option<&str>) -> String {
    match title {
        Some(t) => format!("Hello, {} {}", t, name),
        None => format!("Hello, {}", name),
    }
}

/// Variadic-like function using slice
pub fn sum_all(numbers: &[i32]) -> i32 {
    numbers.iter().sum()
}

/// Function with multiple lifetimes
pub fn first_word<'a, 'b>(s1: &'a str, s2: &'b str) -> &'a str {
    s1.split_whitespace().next().unwrap_or(s1)
}

/// Associated function (like static method)
pub fn from_string(s: String) -> Result<i32, std::num::ParseIntError> {
    s.parse()
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_simple_function() {
        assert_eq!(simple_function(5), 10);
    }

    #[test]
    fn test_multiple_returns() {
        let (sum, diff, prod) = multiple_returns(10, 3);
        assert_eq!(sum, 13);
        assert_eq!(diff, 7);
        assert_eq!(prod, 30);
    }

    #[test]
    fn test_divide() {
        assert_eq!(divide(10, 2), Ok(5));
        assert!(divide(10, 0).is_err());
    }

    #[test]
    fn test_factorial() {
        assert_eq!(factorial(5), 120);
    }
}


```

--------------------------------------------------------------------------------
/website/src/hooks/use-toast.ts:
--------------------------------------------------------------------------------

```typescript
import * as React from "react";

import type { ToastActionElement, ToastProps } from "@/components/ui/toast";

const TOAST_LIMIT = 1;
const TOAST_REMOVE_DELAY = 1000000;

type ToasterToast = ToastProps & {
  id: string;
  title?: React.ReactNode;
  description?: React.ReactNode;
  action?: ToastActionElement;
};

const actionTypes = {
  ADD_TOAST: "ADD_TOAST",
  UPDATE_TOAST: "UPDATE_TOAST",
  DISMISS_TOAST: "DISMISS_TOAST",
  REMOVE_TOAST: "REMOVE_TOAST",
} as const;

let count = 0;

function genId() {
  count = (count + 1) % Number.MAX_SAFE_INTEGER;
  return count.toString();
}

type ActionType = typeof actionTypes;

type Action =
  | {
      type: ActionType["ADD_TOAST"];
      toast: ToasterToast;
    }
  | {
      type: ActionType["UPDATE_TOAST"];
      toast: Partial<ToasterToast>;
    }
  | {
      type: ActionType["DISMISS_TOAST"];
      toastId?: ToasterToast["id"];
    }
  | {
      type: ActionType["REMOVE_TOAST"];
      toastId?: ToasterToast["id"];
    };

interface State {
  toasts: ToasterToast[];
}

const toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>();

const addToRemoveQueue = (toastId: string) => {
  if (toastTimeouts.has(toastId)) {
    return;
  }

  const timeout = setTimeout(() => {
    toastTimeouts.delete(toastId);
    dispatch({
      type: "REMOVE_TOAST",
      toastId: toastId,
    });
  }, TOAST_REMOVE_DELAY);

  toastTimeouts.set(toastId, timeout);
};

export const reducer = (state: State, action: Action): State => {
  switch (action.type) {
    case "ADD_TOAST":
      return {
        ...state,
        toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),
      };

    case "UPDATE_TOAST":
      return {
        ...state,
        toasts: state.toasts.map((t) => (t.id === action.toast.id ? { ...t, ...action.toast } : t)),
      };

    case "DISMISS_TOAST": {
      const { toastId } = action;

      // ! Side effects ! - This could be extracted into a dismissToast() action,
      // but I'll keep it here for simplicity
      if (toastId) {
        addToRemoveQueue(toastId);
      } else {
        state.toasts.forEach((toast) => {
          addToRemoveQueue(toast.id);
        });
      }

      return {
        ...state,
        toasts: state.toasts.map((t) =>
          t.id === toastId || toastId === undefined
            ? {
                ...t,
                open: false,
              }
            : t,
        ),
      };
    }
    case "REMOVE_TOAST":
      if (action.toastId === undefined) {
        return {
          ...state,
          toasts: [],
        };
      }
      return {
        ...state,
        toasts: state.toasts.filter((t) => t.id !== action.toastId),
      };
  }
};

const listeners: Array<(state: State) => void> = [];

let memoryState: State = { toasts: [] };

function dispatch(action: Action) {
  memoryState = reducer(memoryState, action);
  listeners.forEach((listener) => {
    listener(memoryState);
  });
}

type Toast = Omit<ToasterToast, "id">;

function toast({ ...props }: Toast) {
  const id = genId();

  const update = (props: ToasterToast) =>
    dispatch({
      type: "UPDATE_TOAST",
      toast: { ...props, id },
    });
  const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });

  dispatch({
    type: "ADD_TOAST",
    toast: {
      ...props,
      id,
      open: true,
      onOpenChange: (open) => {
        if (!open) dismiss();
      },
    },
  });

  return {
    id: id,
    dismiss,
    update,
  };
}

function useToast() {
  const [state, setState] = React.useState<State>(memoryState);

  React.useEffect(() => {
    listeners.push(setState);
    return () => {
      const index = listeners.indexOf(setState);
      if (index > -1) {
        listeners.splice(index, 1);
      }
    };
  }, [state]);

  return {
    ...state,
    toast,
    dismiss: (toastId?: string) => dispatch({ type: "DISMISS_TOAST", toastId }),
  };
}

export { useToast, toast };

```

--------------------------------------------------------------------------------
/website/src/components/ui/form.tsx:
--------------------------------------------------------------------------------

```typescript
import * as React from "react";
import * as LabelPrimitive from "@radix-ui/react-label";
import { Slot } from "@radix-ui/react-slot";
import { Controller, ControllerProps, FieldPath, FieldValues, FormProvider, useFormContext } from "react-hook-form";

import { cn } from "@/lib/utils";
import { Label } from "@/components/ui/label";

const Form = FormProvider;

type FormFieldContextValue<
  TFieldValues extends FieldValues = FieldValues,
  TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
> = {
  name: TName;
};

const FormFieldContext = React.createContext<FormFieldContextValue>({} as FormFieldContextValue);

const FormField = <
  TFieldValues extends FieldValues = FieldValues,
  TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
>({
  ...props
}: ControllerProps<TFieldValues, TName>) => {
  return (
    <FormFieldContext.Provider value={{ name: props.name }}>
      <Controller {...props} />
    </FormFieldContext.Provider>
  );
};

const useFormField = () => {
  const fieldContext = React.useContext(FormFieldContext);
  const itemContext = React.useContext(FormItemContext);
  const { getFieldState, formState } = useFormContext();

  const fieldState = getFieldState(fieldContext.name, formState);

  if (!fieldContext) {
    throw new Error("useFormField should be used within <FormField>");
  }

  const { id } = itemContext;

  return {
    id,
    name: fieldContext.name,
    formItemId: `${id}-form-item`,
    formDescriptionId: `${id}-form-item-description`,
    formMessageId: `${id}-form-item-message`,
    ...fieldState,
  };
};

type FormItemContextValue = {
  id: string;
};

const FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue);

const FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
  ({ className, ...props }, ref) => {
    const id = React.useId();

    return (
      <FormItemContext.Provider value={{ id }}>
        <div ref={ref} className={cn("space-y-2", className)} {...props} />
      </FormItemContext.Provider>
    );
  },
);
FormItem.displayName = "FormItem";

const FormLabel = React.forwardRef<
  React.ElementRef<typeof LabelPrimitive.Root>,
  React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
>(({ className, ...props }, ref) => {
  const { error, formItemId } = useFormField();

  return <Label ref={ref} className={cn(error && "text-destructive", className)} htmlFor={formItemId} {...props} />;
});
FormLabel.displayName = "FormLabel";

const FormControl = React.forwardRef<React.ElementRef<typeof Slot>, React.ComponentPropsWithoutRef<typeof Slot>>(
  ({ ...props }, ref) => {
    const { error, formItemId, formDescriptionId, formMessageId } = useFormField();

    return (
      <Slot
        ref={ref}
        id={formItemId}
        aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}
        aria-invalid={!!error}
        {...props}
      />
    );
  },
);
FormControl.displayName = "FormControl";

const FormDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
  ({ className, ...props }, ref) => {
    const { formDescriptionId } = useFormField();

    return <p ref={ref} id={formDescriptionId} className={cn("text-sm text-muted-foreground", className)} {...props} />;
  },
);
FormDescription.displayName = "FormDescription";

const FormMessage = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
  ({ className, children, ...props }, ref) => {
    const { error, formMessageId } = useFormField();
    const body = error ? String(error?.message) : children;

    if (!body) {
      return null;
    }

    return (
      <p ref={ref} id={formMessageId} className={cn("text-sm font-medium text-destructive", className)} {...props}>
        {body}
      </p>
    );
  },
);
FormMessage.displayName = "FormMessage";

export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField };

```

--------------------------------------------------------------------------------
/src/codegraphcontext/core/__init__.py:
--------------------------------------------------------------------------------

```python
# src/codegraphcontext/core/__init__.py
"""
Core database management module.

Supports both Neo4j and FalkorDB Lite backends.
Use DATABASE_TYPE environment variable to switch:
- DATABASE_TYPE=falkordb - Uses embedded FalkorDB Lite (recommended for lite-version)
- DATABASE_TYPE=neo4j - Uses Neo4j server
- If not set, auto-detects based on what's available
"""
import os
from typing import Union

import importlib.util

def _is_falkordb_available() -> bool:
    """Check if FalkorDB Lite is installed (without importing native modules)."""
    import sys
    if sys.version_info < (3, 12):
        return False
    try:
        # Check for redislite/falkordb-client spec without loading it
        return importlib.util.find_spec("redislite") is not None
    except ImportError:
        return False

def _is_neo4j_configured() -> bool:
    """Check if Neo4j is configured with credentials."""
    return all([
        os.getenv('NEO4J_URI'),
        os.getenv('NEO4J_USERNAME'),
        os.getenv('NEO4J_PASSWORD')
    ])

def get_database_manager() -> Union['DatabaseManager', 'FalkorDBManager']:
    """
    Factory function to get the appropriate database manager based on configuration.
    
    Selection logic:
    1. Runtime Override: 'CGC_RUNTIME_DB_TYPE' (set via --database flag)
    2. Configured Default: 'DEFAULT_DATABASE' (set via 'cgc default database')
    3. Legacy Env Var: 'DATABASE_TYPE'
    4. Implicit Default: FalkorDB (if available)
    5. Fallback: Neo4j (if configured)
    """
    from codegraphcontext.utils.debug_log import info_logger
    
    # 1. Runtime Override (CLI flag) or Config/Env
    db_type = os.getenv('CGC_RUNTIME_DB_TYPE')
    if not db_type:
        db_type = os.getenv('DEFAULT_DATABASE')
    if not db_type:
        db_type = os.getenv('DATABASE_TYPE')

    if db_type:
        db_type = db_type.lower()
        if db_type == 'falkordb':
            if not _is_falkordb_available():
                 raise ValueError("Database set to 'falkordb' but FalkorDB Lite is not installed.\nRun 'pip install falkordblite'")
            from .database_falkordb import FalkorDBManager
            info_logger("Using FalkorDB Lite (explicit)")
            return FalkorDBManager()
            
        elif db_type == 'neo4j':
            if not _is_neo4j_configured():
                 raise ValueError("Database set to 'neo4j' but it is not configured.\nRun 'cgc neo4j setup' to configure Neo4j.")
            from .database import DatabaseManager
            info_logger("Using Neo4j Server (explicit)")
            return DatabaseManager()
        else:
            raise ValueError(f"Unknown database type: '{db_type}'. Use 'falkordb' or 'neo4j'.")

    # 4. Implicit Default -> FalkorDB (Zero Config)
    if _is_falkordb_available():
        from .database_falkordb import FalkorDBManager
        info_logger("Using FalkorDB Lite (default)")
        return FalkorDBManager()
        
    # 5. Fallback if FalkorDB missing but Neo4j is ready
    if _is_neo4j_configured():
        from .database import DatabaseManager
        info_logger("Using Neo4j Server (auto-detected)")
        return DatabaseManager()

    import sys
    error_msg = "No database backend available.\n"
    
    if sys.version_info < (3, 12):
        error_msg += (
            "FalkorDB Lite is not supported on Python < 3.12.\n"
            "You are running Python " + str(sys.version_info.major) + "." + str(sys.version_info.minor) + ".\n"
            "Please upgrade to Python 3.12+ to use the embedded database,\n"
            "OR run 'cgc neo4j setup' to configure an external Neo4j database."
        )
    else:
        error_msg += (
            "Recommended: Install FalkorDB Lite ('pip install falkordblite')\n"
            "Alternative: Run 'cgc neo4j setup' to configure Neo4j."
        )
            
    raise ValueError(error_msg)

# For backward compatibility, export DatabaseManager
from .database import DatabaseManager
from .database_falkordb import FalkorDBManager

__all__ = ['DatabaseManager', 'FalkorDBManager', 'get_database_manager']

```

--------------------------------------------------------------------------------
/website/src/components/ui/sheet.tsx:
--------------------------------------------------------------------------------

```typescript
import * as SheetPrimitive from "@radix-ui/react-dialog";
import { cva, type VariantProps } from "class-variance-authority";
import { X } from "lucide-react";
import * as React from "react";

import { cn } from "@/lib/utils";

const Sheet = SheetPrimitive.Root;

const SheetTrigger = SheetPrimitive.Trigger;

const SheetClose = SheetPrimitive.Close;

const SheetPortal = SheetPrimitive.Portal;

const SheetOverlay = React.forwardRef<
  React.ElementRef<typeof SheetPrimitive.Overlay>,
  React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>
>(({ className, ...props }, ref) => (
  <SheetPrimitive.Overlay
    className={cn(
      "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
      className,
    )}
    {...props}
    ref={ref}
  />
));
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;

const sheetVariants = cva(
  "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
  {
    variants: {
      side: {
        top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
        bottom:
          "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
        left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
        right:
          "inset-y-0 right-0 h-full w-3/4  border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
      },
    },
    defaultVariants: {
      side: "right",
    },
  },
);

interface SheetContentProps
  extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
    VariantProps<typeof sheetVariants> {}

const SheetContent = React.forwardRef<React.ElementRef<typeof SheetPrimitive.Content>, SheetContentProps>(
  ({ side = "right", className, children, ...props }, ref) => (
    <SheetPortal>
      <SheetOverlay />
      <SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>
        {children}
        <SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none">
          <X className="h-4 w-4" />
          <span className="sr-only">Close</span>
        </SheetPrimitive.Close>
      </SheetPrimitive.Content>
    </SheetPortal>
  ),
);
SheetContent.displayName = SheetPrimitive.Content.displayName;

const SheetHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
  <div className={cn("flex flex-col space-y-2 text-center sm:text-left", className)} {...props} />
);
SheetHeader.displayName = "SheetHeader";

const SheetFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
  <div className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)} {...props} />
);
SheetFooter.displayName = "SheetFooter";

const SheetTitle = React.forwardRef<
  React.ElementRef<typeof SheetPrimitive.Title>,
  React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>
>(({ className, ...props }, ref) => (
  <SheetPrimitive.Title ref={ref} className={cn("text-lg font-semibold text-foreground", className)} {...props} />
));
SheetTitle.displayName = SheetPrimitive.Title.displayName;

const SheetDescription = React.forwardRef<
  React.ElementRef<typeof SheetPrimitive.Description>,
  React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>
>(({ className, ...props }, ref) => (
  <SheetPrimitive.Description ref={ref} className={cn("text-sm text-muted-foreground", className)} {...props} />
));
SheetDescription.displayName = SheetPrimitive.Description.displayName;

export {
  Sheet,
  SheetClose,
  SheetContent,
  SheetDescription,
  SheetFooter,
  SheetHeader,
  SheetOverlay,
  SheetPortal,
  SheetTitle,
  SheetTrigger,
};

```

--------------------------------------------------------------------------------
/tests/sample_project_go/interfaces.go:
--------------------------------------------------------------------------------

```go
// interfaces.go - Demonstrates Go interfaces
package main

import (
	"fmt"
	"math"
)

// Shape is a basic interface
type Shape interface {
	Area() float64
	Perimeter() float64
}

// Drawable extends Shape interface
type Drawable interface {
	Shape
	Draw() string
}

// Named is a simple interface
type Named interface {
	GetName() string
}

// Circle implements Shape
type Circle struct {
	Radius float64
	Name   string
}

// Rectangle implements Shape
type Rectangle struct {
	Width  float64
	Height float64
	Name   string
}

// Triangle implements Shape
type Triangle struct {
	A, B, C float64
	Name    string
}

// Area implements Shape interface for Circle
func (c Circle) Area() float64 {
	return math.Pi * c.Radius * c.Radius
}

// Perimeter implements Shape interface for Circle
func (c Circle) Perimeter() float64 {
	return 2 * math.Pi * c.Radius
}

// Draw implements Drawable interface for Circle
func (c Circle) Draw() string {
	return fmt.Sprintf("Drawing circle with radius %.2f", c.Radius)
}

// GetName implements Named interface for Circle
func (c Circle) GetName() string {
	return c.Name
}

// Area implements Shape interface for Rectangle
func (r Rectangle) Area() float64 {
	return r.Width * r.Height
}

// Perimeter implements Shape interface for Rectangle
func (r Rectangle) Perimeter() float64 {
	return 2 * (r.Width + r.Height)
}

// Draw implements Drawable interface for Rectangle
func (r Rectangle) Draw() string {
	return fmt.Sprintf("Drawing rectangle %.2fx%.2f", r.Width, r.Height)
}

// GetName implements Named interface for Rectangle
func (r Rectangle) GetName() string {
	return r.Name
}

// Area implements Shape interface for Triangle
func (t Triangle) Area() float64 {
	// Heron's formula
	s := (t.A + t.B + t.C) / 2
	return math.Sqrt(s * (s - t.A) * (s - t.B) * (s - t.C))
}

// Perimeter implements Shape interface for Triangle
func (t Triangle) Perimeter() float64 {
	return t.A + t.B + t.C
}

// GetName implements Named interface for Triangle
func (t Triangle) GetName() string {
	return t.Name
}

// CalculateTotalArea accepts interface and calculates total
func CalculateTotalArea(shapes []Shape) float64 {
	total := 0.0
	for _, shape := range shapes {
		total += shape.Area()
	}
	return total
}

// PrintShapeInfo uses interface for polymorphism
func PrintShapeInfo(s Shape) {
	fmt.Printf("Area: %.2f, Perimeter: %.2f\n", s.Area(), s.Perimeter())
}

// DrawIfPossible uses type assertion
func DrawIfPossible(s Shape) string {
	if drawable, ok := s.(Drawable); ok {
		return drawable.Draw()
	}
	return "Shape is not drawable"
}

// DescribeShape uses type switch
func DescribeShape(s Shape) string {
	switch v := s.(type) {
	case Circle:
		return fmt.Sprintf("Circle with radius %.2f", v.Radius)
	case Rectangle:
		return fmt.Sprintf("Rectangle with dimensions %.2fx%.2f", v.Width, v.Height)
	case Triangle:
		return fmt.Sprintf("Triangle with sides %.2f, %.2f, %.2f", v.A, v.B, v.C)
	default:
		return "Unknown shape"
	}
}

// EmptyInterface demonstrates empty interface usage
func EmptyInterface(data interface{}) string {
	switch v := data.(type) {
	case int:
		return fmt.Sprintf("Integer: %d", v)
	case string:
		return fmt.Sprintf("String: %s", v)
	case Shape:
		return fmt.Sprintf("Shape with area: %.2f", v.Area())
	default:
		return fmt.Sprintf("Unknown type: %T", v)
	}
}

// InterfaceComposition demonstrates interface embedding
type ComplexShape interface {
	Shape
	Named
	Volume() float64
}

// ProcessShapes processes multiple shapes
func ProcessShapes(shapes ...Shape) map[string]float64 {
	results := make(map[string]float64)
	totalArea := 0.0
	totalPerimeter := 0.0
	
	for _, shape := range shapes {
		totalArea += shape.Area()
		totalPerimeter += shape.Perimeter()
	}
	
	results["total_area"] = totalArea
	results["total_perimeter"] = totalPerimeter
	results["count"] = float64(len(shapes))
	
	return results
}

func demonstrateInterfaces() {
	circle := Circle{Radius: 5.0, Name: "MyCircle"}
	rectangle := Rectangle{Width: 10.0, Height: 5.0, Name: "MyRectangle"}
	
	shapes := []Shape{circle, rectangle}
	fmt.Printf("Total area: %.2f\n", CalculateTotalArea(shapes))
	
	fmt.Println(DescribeShape(circle))
	fmt.Println(DrawIfPossible(circle))
}


```

--------------------------------------------------------------------------------
/website/src/components/ExamplesSection.tsx:
--------------------------------------------------------------------------------

```typescript
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
import { Badge } from "@/components/ui/badge";
import { MessageCircle, Search, Eye, BarChart3 } from "lucide-react";
import { motion } from "framer-motion";

const examplesData = [
  {
    icon: MessageCircle,
    category: "Indexing",
    title: "Add Projects to Graph",
    examples: [
      "Please index the code in the `/path/to/my-project` directory.",
      "Add the project at `~/dev/my-app` to the code graph."
    ]
  },
  {
    icon: Search,
    category: "Analysis",
    title: "Code Relationships", 
    examples: [
      "Show me all functions that call `process_data()`",
      "Find the class hierarchy for `BaseProcessor`"
    ]
  },
  {
    icon: Eye,
    category: "Monitoring",
    title: "Live Updates",
    examples: [
      "Watch the `/project` directory for changes.",
      "Keep the graph updated for my active development."
    ]
  },
  {
    icon: BarChart3,
    category: "Insights",
    title: "Code Quality",
    examples: [
      "Find dead code in my project",
      "Show the most complex functions by cyclomatic complexity"
    ]
  }
];

const ExamplesSection = () => {
  return (
    <section className="py-24 px-4" data-aos="fade-in">
      <div className="container mx-auto max-w-6xl">
        <div className="text-center mb-16" data-aos="fade-down">
          <h2 className="text-4xl md:text-5xl font-bold mb-6 bg-gradient-to-r from-primary via-primary to-accent bg-clip-text text-transparent py-2">
            Natural Language Interface
          </h2>
          <p className="text-xl text-muted-foreground max-w-3xl mx-auto">
            Interact with your code graph using plain English. No complex queries or syntax to learn.
          </p>
        </div>
        
        <div className="grid grid-cols-1 lg:grid-cols-2 gap-8">
          {examplesData.map((example, index) => (
            <div key={index} data-aos="fade-up" data-aos-delay={index * 100}>
              <Card className="h-full border-border/50 group animate-float-up bg-white/95 dark:bg-card/50 shadow-sm hover:shadow-lg transition-shadow duration-300">
                <CardHeader>
                  <div className="flex items-center gap-4 mb-4">
                    <div className="p-3 rounded-xl bg-primary/5 border border-primary/15 group-hover:bg-primary/10 transition-colors dark:bg-primary/20 dark:border-primary/30">
                      <example.icon className="h-6 w-6 text-primary" />
                    </div>
                    <div>
                      <Badge variant="secondary" className="mb-2">{example.category}</Badge>
                      <CardTitle className="text-xl font-semibold">{example.title}</CardTitle>
                    </div>
                  </div>
                </CardHeader>
                <CardContent>
                  <div className="space-y-4">
                    {example.examples.map((text, idx) => (
                      <div key={idx} className="p-3 rounded-md border-l-4 border-accent/30 bg-muted/30 hover:border-accent/60 transition-colors">
                        <p className="text-sm text-muted-foreground italic">"{text}"</p>
                      </div>
                    ))}
                  </div>
                </CardContent>
              </Card>
            </div>
          ))}
        </div>
        
        <div className="text-center mt-16" data-aos="fade-up" data-aos-delay="200">
          <Card className="max-w-2xl mx-auto bg-white/95 dark:bg-card/50 shadow-sm p-2">
            <CardContent className="pt-8">
              <h3 className="text-2xl font-bold mb-4">Ready to enhance your AI assistant?</h3>
              <p className="text-muted-foreground mb-6">
                Start building intelligent code understanding today with CodeGraphContext.
              </p>
              <div className="p-3 rounded-md bg-muted/40 max-w-md mx-auto border shadow-inner">
                <code className="text-accent font-mono">$ pip install codegraphcontext</code>
              </div>
            </CardContent>
          </Card>
        </div>
      </div>
    </section>
  );
};

export default ExamplesSection;

```

--------------------------------------------------------------------------------
/organizer/troubleshoot.md:
--------------------------------------------------------------------------------

```markdown
# CodeGraphContext Troubleshooting Guide

Use this checklist whenever `cgc neo4j setup` or `cgc start` doesn’t behave as expected. It keeps the happy path short, but includes the fallback steps when something goes wrong.

## 1. Prerequisites at a glance

- **Windows + PowerShell** commands below assume the `py` launcher. Adapt to `python3` if you’re on macOS/Linux.
- **Python 3.11** (recommended). Run `py -3.11 --version` to confirm.
- **Git** for cloning the repository.
- **Docker Desktop** installed *and running* before you launch `cgc neo4j setup` if you want the wizard to spin up a local Neo4j for you.
- **Neo4j account** (only required if you prefer Neo4j AuraDB instead of Docker).

> **Tip:** If Docker isn’t running, the setup wizard will fail when it tries to install Neo4j locally.

## 2. Create and activate a virtual environment

From the repository root (`CodeGraphContext/`):

```powershell
py -3.11 -m venv venv
.\venv\Scripts\python.exe -m pip install --upgrade pip
```

- On Windows, Neo4j driver 6.x can crash with `AttributeError: socket.EAI_ADDRFAMILY`. If you see that, run:
  ```powershell
  .\venv\Scripts\python.exe -m pip install "neo4j<6"
  ```

## 3. Run the Neo4j setup wizard (preferred)

Launch the wizard:

```powershell
.\venv\Scripts\cgc.exe neo4j setup
```

What happens next:

- The wizard checks for Docker. If it’s running, it can auto-provision a local Neo4j instance for you.
- Alternatively, you can supply credentials for an existing Neo4j AuraDB database.
- At the end, it generates:
  - `mcp.json` in your project directory (stores the MCP server command + env vars).
  - `~/.codegraphcontext/.env` containing `NEO4J_URI`, `NEO4J_USERNAME`, `NEO4J_PASSWORD`.

Make sure the Docker container (or remote Neo4j) is still running before you start the server.

## 4. Start the MCP server

Once the wizard completes successfully:

```powershell
.\venv\Scripts\cgc.exe start
```

Expected output includes:

```text
Starting CodeGraphContext Server...
...
MCP Server is running. Waiting for requests...
```

If you instead see:

```text
Configuration Error: Neo4j credentials must be set via environment variables
```

then either no credentials were saved, or the wizard was skipped—see the manual alternative below.

## 5. Manual credential setup (fallback)

If you prefer not to use the wizard or need to fix a broken configuration:

1. Create a `mcp.json` (or edit the one that exists) in the repository root:

   ```json
   {
     "mcpServers": {
       "CodeGraphContext": {
         "command": "cgc",
         "args": ["start"],
         "env": {
           "NEO4J_URI": "neo4j+s://YOUR-HOSTNAME:7687",
           "NEO4J_USERNAME": "neo4j",
           "NEO4J_PASSWORD": "super-secret-password"
         }
       }
     }
   }
   ```

2. (Optional) Also create `%USERPROFILE%\.codegraphcontext\.env` with the same key/value pairs. The CLI loads that file automatically.

3. Re-run:

   ```powershell
   .\venv\Scripts\cgc.exe start
   ```

## 6. Common issues & fixes

| Symptom | Likely Cause | Fix |
| --- | --- | --- |
| `Configuration Error: Neo4j credentials must be set…` | `mcp.json`/`.env` missing or empty | Run `cgc neo4j setup` again **with Docker running**, or create the files manually (section 5). |
| `AttributeError: socket.EAI_ADDRFAMILY` | Neo4j 6.x bug on Windows | Install the 5.x driver: `.\venv\Scripts\python.exe -m pip install "neo4j<6"` and retry. |
| Setup wizard fails while pulling Docker image | Docker Desktop not running or Docker permissions missing | Start Docker Desktop, wait for it to report “Running”, then rerun `cgc neo4j setup`. |
| Server exits immediately with no log | Neo4j instance is offline | Check Docker container status or AuraDB dashboard; restart Neo4j and call `cgc start` again. |

## 7. After the server is running

- Keep the virtual environment active whenever you run `cgc` commands.
- Use `pytest` from the same env to run tests:

  ```powershell
  .\venv\Scripts\pytest
  ```

- Front-end website lives under `website/` if you need to run `npm run dev`.

When in doubt, re-run the wizard with Docker active—it regenerates the configuration files without touching your code. Let me know if any section needs clarifying! :)

```

--------------------------------------------------------------------------------
/website/src/components/ui/alert-dialog.tsx:
--------------------------------------------------------------------------------

```typescript
import * as React from "react";
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";

import { cn } from "@/lib/utils";
import { buttonVariants } from "@/components/ui/button";

const AlertDialog = AlertDialogPrimitive.Root;

const AlertDialogTrigger = AlertDialogPrimitive.Trigger;

const AlertDialogPortal = AlertDialogPrimitive.Portal;

const AlertDialogOverlay = React.forwardRef<
  React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
  React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
>(({ className, ...props }, ref) => (
  <AlertDialogPrimitive.Overlay
    className={cn(
      "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
      className,
    )}
    {...props}
    ref={ref}
  />
));
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;

const AlertDialogContent = React.forwardRef<
  React.ElementRef<typeof AlertDialogPrimitive.Content>,
  React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
>(({ className, ...props }, ref) => (
  <AlertDialogPortal>
    <AlertDialogOverlay />
    <AlertDialogPrimitive.Content
      ref={ref}
      className={cn(
        "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
        className,
      )}
      {...props}
    />
  </AlertDialogPortal>
));
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;

const AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
  <div className={cn("flex flex-col space-y-2 text-center sm:text-left", className)} {...props} />
);
AlertDialogHeader.displayName = "AlertDialogHeader";

const AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
  <div className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)} {...props} />
);
AlertDialogFooter.displayName = "AlertDialogFooter";

const AlertDialogTitle = React.forwardRef<
  React.ElementRef<typeof AlertDialogPrimitive.Title>,
  React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
>(({ className, ...props }, ref) => (
  <AlertDialogPrimitive.Title ref={ref} className={cn("text-lg font-semibold", className)} {...props} />
));
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;

const AlertDialogDescription = React.forwardRef<
  React.ElementRef<typeof AlertDialogPrimitive.Description>,
  React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
>(({ className, ...props }, ref) => (
  <AlertDialogPrimitive.Description ref={ref} className={cn("text-sm text-muted-foreground", className)} {...props} />
));
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;

const AlertDialogAction = React.forwardRef<
  React.ElementRef<typeof AlertDialogPrimitive.Action>,
  React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
>(({ className, ...props }, ref) => (
  <AlertDialogPrimitive.Action ref={ref} className={cn(buttonVariants(), className)} {...props} />
));
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;

const AlertDialogCancel = React.forwardRef<
  React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
  React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
>(({ className, ...props }, ref) => (
  <AlertDialogPrimitive.Cancel
    ref={ref}
    className={cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className)}
    {...props}
  />
));
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;

export {
  AlertDialog,
  AlertDialogPortal,
  AlertDialogOverlay,
  AlertDialogTrigger,
  AlertDialogContent,
  AlertDialogHeader,
  AlertDialogFooter,
  AlertDialogTitle,
  AlertDialogDescription,
  AlertDialogAction,
  AlertDialogCancel,
};

```

--------------------------------------------------------------------------------
/tests/sample_project_go/util/helpers.go:
--------------------------------------------------------------------------------

```go
// Package util provides utility functions for the sample project
package util

import (
	"fmt"
	"strings"
)

// StringUtils provides string utility functions
type StringUtils struct{}

// Reverse reverses a string
func (su StringUtils) Reverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
}

// IsPalindrome checks if a string is a palindrome
func (su StringUtils) IsPalindrome(s string) bool {
	s = strings.ToLower(strings.ReplaceAll(s, " ", ""))
	return s == su.Reverse(s)
}

// MathUtils provides math utility functions
type MathUtils struct{}

// Factorial calculates factorial
func (mu MathUtils) Factorial(n int) int {
	if n <= 1 {
		return 1
	}
	return n * mu.Factorial(n-1)
}

// Fibonacci calculates fibonacci number
func (mu MathUtils) Fibonacci(n int) int {
	if n <= 1 {
		return n
	}
	return mu.Fibonacci(n-1) + mu.Fibonacci(n-2)
}

// GCD calculates greatest common divisor
func (mu MathUtils) GCD(a, b int) int {
	for b != 0 {
		a, b = b, a%b
	}
	return a
}

// LCM calculates least common multiple
func (mu MathUtils) LCM(a, b int) int {
	return (a * b) / mu.GCD(a, b)
}

// SliceUtils provides slice utility functions
type SliceUtils struct{}

// Sum calculates sum of integers
func (su SliceUtils) Sum(nums []int) int {
	total := 0
	for _, num := range nums {
		total += num
	}
	return total
}

// Average calculates average
func (su SliceUtils) Average(nums []int) float64 {
	if len(nums) == 0 {
		return 0
	}
	return float64(su.Sum(nums)) / float64(len(nums))
}

// Max finds maximum value
func (su SliceUtils) Max(nums []int) int {
	if len(nums) == 0 {
		return 0
	}
	max := nums[0]
	for _, num := range nums {
		if num > max {
			max = num
		}
	}
	return max
}

// Min finds minimum value
func (su SliceUtils) Min(nums []int) int {
	if len(nums) == 0 {
		return 0
	}
	min := nums[0]
	for _, num := range nums {
		if num < min {
			min = num
		}
	}
	return min
}

// Unique removes duplicates from slice
func (su SliceUtils) Unique(nums []int) []int {
	seen := make(map[int]bool)
	result := []int{}
	
	for _, num := range nums {
		if !seen[num] {
			seen[num] = true
			result = append(result, num)
		}
	}
	
	return result
}

// Validator provides validation functions
type Validator struct{}

// IsEmail checks if string is valid email format (simplified)
func (v Validator) IsEmail(email string) bool {
	return strings.Contains(email, "@") && strings.Contains(email, ".")
}

// IsURL checks if string is valid URL format (simplified)
func (v Validator) IsURL(url string) bool {
	return strings.HasPrefix(url, "http://") || strings.HasPrefix(url, "https://")
}

// IsEmpty checks if string is empty or whitespace
func (v Validator) IsEmpty(s string) bool {
	return strings.TrimSpace(s) == ""
}

// Logger provides logging functionality
type Logger struct {
	Prefix string
}

// NewLogger creates a new logger
func NewLogger(prefix string) *Logger {
	return &Logger{Prefix: prefix}
}

// Info logs info message
func (l Logger) Info(message string) {
	fmt.Printf("[%s] INFO: %s\n", l.Prefix, message)
}

// Error logs error message
func (l Logger) Error(message string) {
	fmt.Printf("[%s] ERROR: %s\n", l.Prefix, message)
}

// Debug logs debug message
func (l Logger) Debug(message string) {
	fmt.Printf("[%s] DEBUG: %s\n", l.Prefix, message)
}

// Helper functions (package-level)

// Capitalize capitalizes first letter of string
func Capitalize(s string) string {
	if len(s) == 0 {
		return s
	}
	return strings.ToUpper(s[:1]) + s[1:]
}

// Truncate truncates string to specified length
func Truncate(s string, length int) string {
	if len(s) <= length {
		return s
	}
	return s[:length] + "..."
}

// Contains checks if slice contains value
func Contains(slice []string, value string) bool {
	for _, item := range slice {
		if item == value {
			return true
		}
	}
	return false
}

// Map applies function to each element
func Map(slice []int, fn func(int) int) []int {
	result := make([]int, len(slice))
	for i, v := range slice {
		result[i] = fn(v)
	}
	return result
}

// Filter filters slice based on predicate
func Filter(slice []int, predicate func(int) bool) []int {
	result := []int{}
	for _, v := range slice {
		if predicate(v) {
			result = append(result, v)
		}
	}
	return result
}


```

--------------------------------------------------------------------------------
/docs/docs/server.md:
--------------------------------------------------------------------------------

```markdown
# MCPServer

The `MCPServer` class is the core of the CodeGraphContext application. It orchestrates all the major components, including database management, background job tracking, file system watching, and tool handling.

## Initialization

The server is initialized with an asyncio event loop. Upon initialization, it sets up the following components:

-   `DatabaseManager`: Manages the connection to the Neo4j database.
-   `JobManager`: Tracks the status of background jobs, such as code indexing.
-   `CodeWatcher`: Monitors the file system for changes to keep the code graph up-to-date.
-   `GraphBuilder`: Builds the code graph from the source code.
-   `CodeFinder`: Provides tools for searching and analyzing the code graph.

## Tool Manifest

The `MCPServer` exposes a set of tools to the AI assistant. These tools are defined in the `_init_tools` method. Here is a list of available tools:

### `add_code_to_graph`
Performs a one-time scan of a local folder to add its code to the graph. Ideal for indexing libraries, dependencies, or projects not being actively modified. Returns a job ID for background processing.

### `check_job_status`
Check the status and progress of a background job.

### `list_jobs`
List all background jobs and their current status.

### `find_code`
Find relevant code snippets related to a keyword (e.g., function name, class name, or content).

### `analyze_code_relationships`
Analyze code relationships like 'who calls this function' or 'class hierarchy'. Supported query types include: find_callers, find_callees, find_all_callers, find_all_callees, find_importers, who_modifies, class_hierarchy, overrides, dead_code, call_chain, module_deps, variable_scope, find_complexity, find_functions_by_argument, find_functions_by_decorator.

### `watch_directory`
Performs an initial scan of a directory and then continuously monitors it for changes, automatically keeping the graph up-to-date. Ideal for projects under active development. Returns a job ID for the initial scan.

### `execute_cypher_query`

This is an advanced tool for directly querying the underlying Neo4j graph using a read-only Cypher query. It should be used as a fallback when other tools cannot answer very specific or complex questions about the code graph.

**Schema Overview:**

The code graph has the following structure:

*   **Nodes:**
    *   `Repository`: Represents a project repository.
    *   `File`: Represents a single source code file.
    *   `Module`: Represents a package or a module.
    *   `Class`: Represents a class definition.
    *   `Function`: Represents a function or method definition.
*   **Properties:**
    *   Nodes have properties like `name`, `path`, `cyclomatic_complexity` (for functions), and `code`.
*   **Relationships:**
    *   `CONTAINS`: e.g., `(:File)-[:CONTAINS]->(:Function)`
    *   `CALLS`: e.g., `(:Function)-[:CALLS]->(:Function)`
    *   `IMPORTS`: e.g., `(:File)-[:IMPORTS]->(:Module)`
    *   `INHERITS`: e.g., `(:Class)-[:INHERITS]->(:Class)`

### `add_package_to_graph`
Add a Python package to Neo4j graph by discovering its location. Returns immediately with job ID.

### `find_dead_code`
Find potentially unused functions (dead code) across the entire indexed codebase, optionally excluding functions with specific decorators.

### `calculate_cyclomatic_complexity`
Calculate the cyclomatic complexity of a specific function to measure its complexity.

### `find_most_complex_functions`
Find the most complex functions in the codebase based on cyclomatic complexity.

### `list_indexed_repositories`
List all indexed repositories.

### `delete_repository`
Delete an indexed repository from the graph.

### `visualize_graph_query`
Generates a URL to visualize the results of a Cypher query in the Neo4j Browser. The user can open this URL in their web browser to see the graph visualization.

### `list_watched_paths`
Lists all directories currently being watched for live file changes.

### `unwatch_directory`
Stops watching a directory for live file changes.

## Other Methods

-   `get_database_status()`: Returns the current connection status of the Neo4j database.
-   `get_local_package_path(package_name)`: Finds the local installation path of a Python package.
-   `run()`: Runs the main server loop, listening for JSON-RPC requests from stdin.
-   `shutdown()`: Gracefully shuts down the server and its components.

```
Page 2/17FirstPrevNextLast