feat: Add file watcher with debounced auto-sync and comprehensive test coverage
Addresses the need for automatic graph synchronization on file changes. Implements FileWatcher using native OS file events (FSEvents/inotify/ReadDirectoryChangesW) with 2-second debouncing to prevent thrashing on rapid saves. Filters changes against include/exclude patterns and ignores .codegraph directory modifications. Integrates with CodeGraph API (watch/unwatch/isWatching methods) and MCP server for automatic activation. Updates documentation to reflect shift from semantic to full-text search and removal of manual hook installation requirements.
This commit is contained in:
+2
-6
@@ -4,14 +4,10 @@
|
||||
* Provides synchronization functionality for keeping the code graph
|
||||
* up-to-date with file system changes.
|
||||
*
|
||||
* Note: Git hooks functionality has been removed. CodeGraph sync is now
|
||||
* triggered through codegraph's Claude Code hooks integration instead.
|
||||
*
|
||||
* Components:
|
||||
* - FileWatcher: Debounced fs.watch that auto-triggers sync on file changes
|
||||
* - Content hashing for change detection (in extraction module)
|
||||
* - Incremental reindexing (in extraction module)
|
||||
*/
|
||||
|
||||
// This module is kept for potential future sync-related exports
|
||||
// Currently all sync functionality is in the extraction module
|
||||
export {};
|
||||
export { FileWatcher, WatchOptions } from './watcher';
|
||||
|
||||
Reference in New Issue
Block a user