Skip to content

Commit 4e9f457

Browse files
committed
fix: restore missing import to enable automatic file watching
Resolves file watcher startup failure caused by incomplete refactor in commit 3b1eb74. The import statement for SUPPORTED_EXTENSIONS was removed during refactoring but the code still referenced it, causing a NameError when the file watcher attempted to start. Changes: - Add missing import: `from ..constants import SUPPORTED_EXTENSIONS` to file_watcher_service.py - Fixes NameError in FileWatcherService.start_monitoring() at line 151 - Restores automatic index updates when files are created, modified, or deleted - File watcher now starts successfully and provides real-time code intelligence Testing confirmed: - File watcher status: "error" → "active" - New file detection: Manual refresh required → Automatic - File modification detection: Manual refresh required → Automatic - System shows positive status: "File watcher is active - automatic index updates enabled" This fix restores the auto-refresh functionality that was working prior to the TypeScript/Zig parsing strategy refactor, eliminating the need for manual refresh operations after file system changes.
1 parent f4bd321 commit 4e9f457

File tree

2 files changed

+244
-243
lines changed

2 files changed

+244
-243
lines changed

src/code_index_mcp/services/file_watcher_service.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def __init__(self):
5050
WATCHDOG_AVAILABLE = False
5151

5252
from .base_service import BaseService
53+
from ..constants import SUPPORTED_EXTENSIONS
5354

5455

5556
class FileWatcherService(BaseService):

0 commit comments

Comments
 (0)