fix(editor): synchronize external file changes on focus (#564)

Open files only reloaded from file watcher events, so a change the watcher skipped stayed stale in its tab: excluded and git-ignored folders, files outside the project, and missed events.

- Re-check open documents against disk when the window gains focus, off the UI thread and debounced. Clean documents reload, dirty ones keep the existing warning, and unchanged ones cost one metadata call.
- Refresh the project tree and Git status on the same focus event.
- Add "Synchronize external changes when switching to the IDE window" under System Settings, on by default.

Fixes #563
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-10-31 20:12:00 +08:00
1 джерело 4796265b5c
коміт 17e3cd2b39
18 files changed
+510

No files matched your search

+1
Переглянути файл
@@ -1795,6 +1795,7 @@
"Save Files": "保存文件",
"Save files if the IDE is idle for": "IDE 空闲以下时长时保存文件",
"Save files when switching to a different application or a built-in terminal": "切换到其他应用程序或内置终端时保存文件",
"Synchronize external changes when switching to the IDE window": "切换回 IDE 窗口时同步外部更改",
"Save or roll back the changes before reloading it from disk.": "从磁盘重新加载前,请先保存或回滚更改。",
"Save password": "保存密码",
"Save to file:": "保存到文件:",