mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-22 00:32:49 +00:00
- replace watch_paths parameter with single watch_path string - add FileGraph integration for tracking file relationships - implement persistent graph storage in .reme directory - add load/build graph functionality on start - refactor file change handling with separate methods for add/modify/delete - update scan_existing_files to work with single path - add file filter to exclude meta directory from watching - remove abstract method requirement and implement concrete change handlers BREAKING CHANGE: watch_paths parameter changed to watch_path (single path)
16 lines
487 B
Python
16 lines
487 B
Python
"""Lightweight file watcher for Markdown files only."""
|
|
|
|
from pathlib import Path
|
|
|
|
from .base_file_watcher import BaseFileWatcher
|
|
from ..component_registry import R
|
|
|
|
_MD_SUFFIXES = {".md", ".markdown"}
|
|
|
|
|
|
@R.register("light")
|
|
class LightFileWatcher(BaseFileWatcher):
|
|
"""Watches only Markdown files and delegates parsing to registered parsers."""
|
|
|
|
def _watch_filter(self, path: str) -> bool:
|
|
return super()._watch_filter(path) and Path(path).suffix.lower() in _MD_SUFFIXES
|