Skip to content

Commit a97f3ee

Browse files
removed notify in vfs
1 parent b2501c5 commit a97f3ee

File tree

1 file changed

+36
-35
lines changed

1 file changed

+36
-35
lines changed

Frontend/src/lib/vfs/vfs-bridge.ts

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ export class VFSBridge {
1515
}
1616

1717
private setupVFSListener() {
18+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1819
this.vfsStore.on((_: VFSChangeEvent) => {
1920
if (this.isUpdatingFromVFS) return; // Prevent circular updates
2021

2122
// Notify listeners about VFS changes
22-
this.notifyListeners();
23+
// this.notifyListeners();
2324
});
2425
}
2526

@@ -290,40 +291,40 @@ export class VFSBridge {
290291
};
291292
}
292293

293-
private notifyListeners() {
294-
// Convert VFS tree back to FileNode format
295-
const vfsTree = this.vfsStore.getTree("/");
296-
if (vfsTree) {
297-
const fileTree = this.convertVFSToFileTree(vfsTree);
298-
this.listeners.forEach((listener) =>
299-
listener(fileTree ? [fileTree] : [])
300-
);
301-
}
302-
}
303-
304-
private convertVFSToFileTree(vfsEntry: any): FileNode | null {
305-
const id = this.pathToIdMap.get(vfsEntry.path) || vfsEntry.id;
306-
307-
if (vfsEntry.type === "folder") {
308-
return {
309-
id,
310-
name: vfsEntry.name,
311-
type: "folder",
312-
children:
313-
vfsEntry.children
314-
?.map((child: any) => this.convertVFSToFileTree(child))
315-
.filter(Boolean) || [],
316-
isExpanded: vfsEntry.isExpanded,
317-
};
318-
} else {
319-
return {
320-
id,
321-
name: vfsEntry.name,
322-
type: "file",
323-
content: vfsEntry.content,
324-
};
325-
}
326-
}
294+
// private notifyListeners() {
295+
// // Convert VFS tree back to FileNode format
296+
// const vfsTree = this.vfsStore.getTree("/");
297+
// if (vfsTree) {
298+
// const fileTree = this.convertVFSToFileTree(vfsTree);
299+
// this.listeners.forEach((listener) =>
300+
// listener(fileTree ? [fileTree] : [])
301+
// );
302+
// }
303+
// }
304+
305+
// private convertVFSToFileTree(vfsEntry: any): FileNode | null {
306+
// const id = this.pathToIdMap.get(vfsEntry.path) || vfsEntry.id;
307+
308+
// if (vfsEntry.type === "folder") {
309+
// return {
310+
// id,
311+
// name: vfsEntry.name,
312+
// type: "folder",
313+
// children:
314+
// vfsEntry.children
315+
// ?.map((child: any) => this.convertVFSToFileTree(child))
316+
// .filter(Boolean) || [],
317+
// isExpanded: vfsEntry.isExpanded,
318+
// };
319+
// } else {
320+
// return {
321+
// id,
322+
// name: vfsEntry.name,
323+
// type: "file",
324+
// content: vfsEntry.content,
325+
// };
326+
// }
327+
// }
327328

328329
getVFSStore(): VFSStore {
329330
return this.vfsStore;

0 commit comments

Comments
 (0)