Skip to content

Commit 016e952

Browse files
fix #375
1 parent c5d83ff commit 016e952

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/gitingest/utils/ignore_patterns.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
"*.out",
5454
"*.a",
5555
"*.pdb",
56+
# Binary
57+
"*.bin",
5658
# Swift/Xcode
5759
".build/",
5860
"*.xcodeproj/",
@@ -147,6 +149,10 @@
147149
".docusaurus",
148150
".next",
149151
".nuxt",
152+
# Database
153+
"*.db",
154+
"*.sqlite",
155+
"*.sqlite3",
150156
# Other common patterns
151157
## Minified files
152158
"*.min.js",

src/server/query_processor.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010
from gitingest.query_parser import IngestionQuery, parse_query
1111
from gitingest.utils.git_utils import validate_github_token
1212
from server.models import IngestErrorResponse, IngestResponse, IngestSuccessResponse
13-
from server.server_config import (
14-
DEFAULT_MAX_FILE_SIZE_KB,
15-
MAX_DISPLAY_SIZE,
16-
)
13+
from server.server_config import MAX_DISPLAY_SIZE
1714
from server.server_utils import Colors, log_slider_to_size
1815

1916

@@ -148,10 +145,11 @@ def _print_query(url: str, max_file_size: int, pattern_type: str, pattern: str)
148145
The actual pattern string to include or exclude in the query.
149146
150147
"""
148+
default_max_file_kb = 50
151149
print(f"{Colors.WHITE}{url:<20}{Colors.END}", end="")
152-
if int(max_file_size / 1024) != DEFAULT_MAX_FILE_SIZE_KB:
150+
if int(max_file_size / 1024) != default_max_file_kb:
153151
print(
154-
f" | {Colors.YELLOW}Size: {int(max_file_size / 1024)}kb{Colors.END}",
152+
f" | {Colors.YELLOW}Size: {int(max_file_size / 1024)}kB{Colors.END}",
155153
end="",
156154
)
157155
if pattern_type == "include" and pattern != "":

src/server/server_config.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
MAX_DISPLAY_SIZE: int = 300_000
88
DELETE_REPO_AFTER: int = 60 * 60 # In seconds (1 hour)
99

10-
DEFAULT_MAX_FILE_SIZE_KB: int = 50 # Default maximum file size to include in the digest
11-
1210
# Slider configuration (if updated, update the logSliderToSize function in src/static/js/utils.js)
1311
MAX_FILE_SIZE_KB: int = 100 * 1024 # 100 MB
1412
MAX_SLIDER_POSITION: int = 500 # Maximum slider position

0 commit comments

Comments
 (0)