* Handle file change event (debounced)
()
| 95 | * Handle file change event (debounced) |
| 96 | */ |
| 97 | function handleFileChange(): void { |
| 98 | if (state.debounceTimer) { |
| 99 | clearTimeout(state.debounceTimer); |
| 100 | } |
| 101 | |
| 102 | state.debounceTimer = setTimeout(() => { |
| 103 | state.debounceTimer = null; |
| 104 | processFileChange().catch((e) => { |
| 105 | log('warn', `[xcode-watcher] Error processing file change: ${e}`); |
| 106 | }); |
| 107 | }, DEBOUNCE_MS); |
| 108 | } |
| 109 | |
| 110 | /** |
| 111 | * Process the file change and update session defaults |
no test coverage detected