From 09b33b795b9a24513afb7defaf0db1bf6bd0a9e6 Mon Sep 17 00:00:00 2001 From: imfarhanm Date: Mon, 4 May 2026 20:01:20 +0530 Subject: [PATCH] fix: include .md/.mdx document files in graphify update rebuild path --- graphify/watch.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/graphify/watch.py b/graphify/watch.py index a967b5d8..0b7bd956 100644 --- a/graphify/watch.py +++ b/graphify/watch.py @@ -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