66from typing import TYPE_CHECKING
77
88from gitingest .config import MAX_DIRECTORY_DEPTH , MAX_FILES , MAX_TOTAL_SIZE_BYTES
9- from gitingest .schemas import Context , FileSystemNode , FileSystemStats
9+ from gitingest .schemas import ContextV1 , FileSystemNode , FileSystemStats
1010from gitingest .schemas .filesystem import FileSystemDirectory , FileSystemFile , FileSystemSymlink , GitRepository
1111from gitingest .utils .ingestion_utils import _should_exclude , _should_include
1212from gitingest .utils .logging_config import get_logger
@@ -23,11 +23,11 @@ def _is_git_repository(path: Path) -> bool:
2323 return (path / ".git" ).exists ()
2424
2525
26- def ingest_query (query : IngestionQuery ) -> Context :
26+ def ingest_query (query : IngestionQuery ) -> ContextV1 :
2727 """Run the ingestion process for a parsed query.
2828
2929 This is the main entry point for analyzing a codebase directory or single file. It processes the query
30- parameters, reads the file or directory content, and returns a Context object that can generate the final output digest on demand.
30+ parameters, reads the file or directory content, and returns a ContextV1 object that can generate the final output digest on demand.
3131
3232 Parameters
3333 ----------
@@ -36,8 +36,8 @@ def ingest_query(query: IngestionQuery) -> Context:
3636
3737 Returns
3838 -------
39- Context
40- A Context object representing the ingested file system nodes. Use generate_digest(context) to get the summary, directory structure, and file contents.
39+ ContextV1
40+ A ContextV1 object representing the ingested file system nodes. Use generate_digest(context) to get the summary, directory structure, and file contents.
4141
4242 Raises
4343 ------
@@ -92,7 +92,7 @@ def ingest_query(query: IngestionQuery) -> Context:
9292 "file_size" : file_node .size ,
9393 },
9494 )
95- return Context ([file_node ], query )
95+ return ContextV1 ([file_node ], query )
9696
9797 # Check if this is a git repository and create appropriate node type
9898 if _is_git_repository (path ):
@@ -123,7 +123,7 @@ def ingest_query(query: IngestionQuery) -> Context:
123123 },
124124 )
125125
126- return Context ([root_node ], query )
126+ return ContextV1 ([root_node ], query )
127127
128128
129129def _process_node (node : FileSystemNode , query : IngestionQuery , stats : FileSystemStats ) -> None :
0 commit comments