Skip to content

feat: improve file watcher with chokidar and better ignore patterns#2621

Merged
thdxr merged 6 commits into
devfrom
watcher
Sep 16, 2025
Merged

feat: improve file watcher with chokidar and better ignore patterns#2621
thdxr merged 6 commits into
devfrom
watcher

Conversation

@thdxr

@thdxr thdxr commented Sep 16, 2025

Copy link
Copy Markdown
Member

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

@thdxr
thdxr merged commit 14cb2d2 into dev Sep 16, 2025
3 checks passed
@thdxr
thdxr deleted the watcher branch February 1, 2026 03:31
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
Rwanbt pushed a commit to Rwanbt/opencode that referenced this pull request May 5, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants