fix: include .md/.mdx document files in graphify update rebuild path

This commit is contained in:
imfarhanm
2026-05-04 20:01:20 +05:30
parent 68081c1c89
commit 09b33b795b
+7
View File
@@ -70,6 +70,13 @@ def _rebuild_code(watch_path: Path, *, follow_symlinks: bool = False, force: boo
detected = detect(watch_path, follow_symlinks=follow_symlinks)
code_files = [Path(f) for f in detected['files']['code']]
# Include document files that have AST extractors (e.g. .md, .mdx)
from graphify.extract import _get_extractor
for doc_file in detected['files'].get('document', []):
p = Path(doc_file)
if _get_extractor(p) is not None:
code_files.append(p)
if not code_files:
print("[graphify watch] No code files found - nothing to rebuild.")
return False