[PR #2621] feat: improve file watcher with chokidar and better ignore patterns #10379

Closed
opened 2026-02-16 18:15:01 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/2621

State: closed
Merged: Yes


Summary

  • Replace native fs.watch with chokidar for more reliable file watching
  • Add comprehensive ignore patterns for common directories and files
  • Make file watcher opt-in with OPENCODE_EXPERIMENTAL_WATCHER flag
  • Add watcher configuration option for custom ignore patterns
  • Improve file watcher initialization timing

Changes

  • packages/opencode/src/file/watcher.ts: New chokidar-based implementation
  • packages/opencode/src/file/ignore.ts: New ignore patterns system
  • packages/opencode/package.json: Add chokidar dependency
  • packages/opencode/src/config/config.ts: Add watcher configuration schema
  • packages/opencode/src/flag/flag.ts: Replace disable flag with experimental flag
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/2621 **State:** closed **Merged:** Yes --- ## Summary - Replace native fs.watch with chokidar for more reliable file watching - Add comprehensive ignore patterns for common directories and files - Make file watcher opt-in with OPENCODE_EXPERIMENTAL_WATCHER flag - Add watcher configuration option for custom ignore patterns - Improve file watcher initialization timing ## Changes - **packages/opencode/src/file/watcher.ts**: New chokidar-based implementation - **packages/opencode/src/file/ignore.ts**: New ignore patterns system - **packages/opencode/package.json**: Add chokidar dependency - **packages/opencode/src/config/config.ts**: Add watcher configuration schema - **packages/opencode/src/flag/flag.ts**: Replace disable flag with experimental flag
yindo added the pull-request label 2026-02-16 18:15:01 -05:00
yindo closed this issue 2026-02-16 18:15:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10379