Skip to content

Commit ea047c6

Browse files
committed
idk
1 parent 2265108 commit ea047c6

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/gitingest/output_formatter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ def _format_token_count(text: str) -> str | None:
167167

168168
return str(total_tokens)
169169

170-
# Rename JinjaFormatter to DefaultFormatter throughout the file
171170
class DefaultFormatter:
172171
def __init__(self):
173172
self.env = Environment(loader=BaseLoader())
@@ -207,7 +206,8 @@ def _(self, node: FileSystemDirectory, query):
207206

208207
@summary.register
209208
def _(self, node: FileSystemDirectory, query):
210-
template = """
209+
template = \
210+
"""
211211
Directory structure:
212212
{{ node.tree }}
213213
"""

src/server/query_processor.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,6 @@ async def process_query(
8686
context = ingest_query(query)
8787
digest = context.generate_digest()
8888

89-
summary, tree, content = context.generate_digest()
90-
91-
# Prepare the digest content (tree + content)
92-
digest_content = tree + "\n" + content
93-
9489
# Store digest based on S3 configuration
9590
if is_s3_enabled():
9691
# Upload to S3 instead of storing locally
@@ -102,14 +97,14 @@ async def process_query(
10297
include_patterns=query.include_patterns,
10398
ignore_patterns=query.ignore_patterns,
10499
)
105-
s3_url = upload_to_s3(content=digest_content, s3_file_path=s3_file_path, ingest_id=query.id)
100+
s3_url = upload_to_s3(content=context.digest, s3_file_path=s3_file_path, ingest_id=query.id)
106101
# Store S3 URL in query for later use
107102
query.s3_url = s3_url
108103
else:
109104
# Store locally
110105
local_txt_file = Path(clone_config.local_path).with_suffix(".txt")
111106
with local_txt_file.open("w", encoding="utf-8") as f:
112-
f.write(digest_content)
107+
f.write(digest)
113108

114109
except Exception as exc:
115110
_print_error(query.url, exc, max_file_size, pattern_type, pattern)

0 commit comments

Comments
 (0)