diff --git a/src/ingest.py b/src/ingest.py index 3cfc5e9..f345189 100644 --- a/src/ingest.py +++ b/src/ingest.py @@ -16,8 +16,8 @@ def should_include(path: str, base_path: str, include_patterns: List[str]) -> bo for pattern in include_patterns: if fnmatch(rel_path, pattern): include = True - else: - include = False + + return include def should_exclude(path: str, base_path: str, ignore_patterns: List[str]) -> bool: diff --git a/src/process_query.py b/src/process_query.py index 6b2a613..051c6b1 100644 --- a/src/process_query.py +++ b/src/process_query.py @@ -29,6 +29,8 @@ async def process_query(request: Request, input_text: str, slider_position: int, "error_message": f"Error: {e}", "examples": EXAMPLE_REPOS if is_index else [], "default_file_size": slider_position, + "pattern_type": pattern_type, + "pattern": pattern, } ) @@ -46,6 +48,8 @@ async def process_query(request: Request, input_text: str, slider_position: int, "content": content, "examples": EXAMPLE_REPOS if is_index else [], "ingest_id": query['id'], - "default_file_size": slider_position, + "default_file_size": slider_position, + "pattern_type": pattern_type, + "pattern": pattern, } ) diff --git a/src/templates/components/github_form.jinja.html b/src/templates/components/github_form.jinja.html index 557c582..0ae70ef 100644 --- a/src/templates/components/github_form.jinja.html +++ b/src/templates/components/github_form.jinja.html @@ -34,8 +34,8 @@ @@ -45,6 +45,7 @@ id="pattern" name="pattern" placeholder="*.md, src/ " + value="{{ pattern if pattern else '' }}" class=" py-2 px-2 bg-[#FFFDF8] focus:outline-none w-full">