Wired external change detection and update

This commit is contained in:
2025-06-21 18:17:01 -05:00
parent d354a940c4
commit dae0cd9516
3 changed files with 16 additions and 10 deletions

View File

@@ -149,10 +149,15 @@ export class EditorsComponent {
this.setSession(file);
});
window.fs.onChangedFile(async (path: string) => {
window.fs.onChangedFile(async (path: string, data: string) => {
let file = this.filesService.get(path);
file.session.setValue(data);
// Note: fake 'save' event to not show as changed iven external save happened...
let message = new ServiceMessage();
message.action = "file-changed";
message.action = "file-saved";
message.filePath = path;
this.tabsService.sendMessage(message);
});