Skip to content

Add INDEX_SOURCE config to control source code storage - #524

Merged
Shashankss1205 merged 2 commits into
CodeGraphContext:mainfrom
spinola103:feature/index-source-config
Feb 1, 2026
Merged

Add INDEX_SOURCE config to control source code storage#524
Shashankss1205 merged 2 commits into
CodeGraphContext:mainfrom
spinola103:feature/index-source-config

Conversation

@spinola103

Copy link
Copy Markdown
Contributor

Add INDEX_SOURCE configuration flag

Closes #513

What this PR does

  • Adds a new INDEX_SOURCE configuration flag (default: false)
  • When false, graph structure is indexed without storing full source code
  • When true, full source code for functions is stored in the graph

Why this is useful

  • Reduces database size for large repositories
  • Allows users to choose between lightweight graph-only indexing and full source storage
  • Keeps default behavior safe and efficient

Verification

  • Tested using FalkorDB Lite on WSL (no Neo4j required)
  • Verified that:
    • INDEX_SOURCE=falsef.source = null
    • INDEX_SOURCE=true → full function source stored
  • Validated using repository-scoped Cypher queries via CLI

Notes

  • Docstrings remain embedded in source (existing behavior)
Screenshot 2026-01-14 114607 Screenshot 2026-01-14 112923

@spinola103

Copy link
Copy Markdown
Contributor Author

Hey @Shashankss1205 , can you review this pr soon?

Comment thread src/codegraphcontext/tools/graph_builder.py
@vercel

vercel Bot commented Jan 21, 2026

Copy link
Copy Markdown

@spinola103 is attempting to deploy a commit to the shashankss1205's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Shashankss1205

Copy link
Copy Markdown
Collaborator

Is this PR complete from your end? @spinola103

@spinola103

Copy link
Copy Markdown
Contributor Author

Yes, I have added a pr as asked.
@Shashankss1205 kindly review it

@Shashankss1205

Copy link
Copy Markdown
Collaborator

This is inaccurate and hence closing. You are just referring to Python but we support 12 other languages.

@Shashankss1205

Copy link
Copy Markdown
Collaborator

I will be merging all the changes and will make a commit for all other languages. Thanks for your contribution @spinola103 !

@Shashankss1205
Shashankss1205 merged commit 80d6a76 into CodeGraphContext:main Feb 1, 2026
3 of 4 checks passed
psihius pushed a commit to psihius/CodeGraphContext that referenced this pull request Mar 24, 2026
…-source-config

Add INDEX_SOURCE config to control source code storage
macunha1 pushed a commit to macunha1/CodeGraphContext that referenced this pull request Jun 21, 2026
…-source-config

Add INDEX_SOURCE config to control source code storage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a new config: index_source: true/false

2 participants