6
6
from typing import TYPE_CHECKING
7
7
8
8
from 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
10
10
from gitingest .schemas .filesystem import FileSystemDirectory , FileSystemFile , FileSystemSymlink , GitRepository
11
11
from gitingest .utils .ingestion_utils import _should_exclude , _should_include
12
12
from gitingest .utils .logging_config import get_logger
@@ -23,11 +23,11 @@ def _is_git_repository(path: Path) -> bool:
23
23
return (path / ".git" ).exists ()
24
24
25
25
26
- def ingest_query (query : IngestionQuery ) -> Context :
26
+ def ingest_query (query : IngestionQuery ) -> ContextV1 :
27
27
"""Run the ingestion process for a parsed query.
28
28
29
29
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.
31
31
32
32
Parameters
33
33
----------
@@ -36,8 +36,8 @@ def ingest_query(query: IngestionQuery) -> Context:
36
36
37
37
Returns
38
38
-------
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.
41
41
42
42
Raises
43
43
------
@@ -92,7 +92,7 @@ def ingest_query(query: IngestionQuery) -> Context:
92
92
"file_size" : file_node .size ,
93
93
},
94
94
)
95
- return Context ([file_node ], query )
95
+ return ContextV1 ([file_node ], query )
96
96
97
97
# Check if this is a git repository and create appropriate node type
98
98
if _is_git_repository (path ):
@@ -123,7 +123,7 @@ def ingest_query(query: IngestionQuery) -> Context:
123
123
},
124
124
)
125
125
126
- return Context ([root_node ], query )
126
+ return ContextV1 ([root_node ], query )
127
127
128
128
129
129
def _process_node (node : FileSystemNode , query : IngestionQuery , stats : FileSystemStats ) -> None :
0 commit comments