summaryrefslogtreecommitdiff
path: root/src/agents/main/vfs.py
diff options
context:
space:
mode:
authorCaptainJack2491 <jayrupnakawala@gmail.com>2025-12-03 15:47:13 +0000
committerCaptainJack2491 <jayrupnakawala@gmail.com>2025-12-03 15:47:13 +0000
commit6126d2bf97bbc18762a5ca48604c99e6789182fa (patch)
tree0c079d7e6718dbcb339645a1f15a9ec410d13048 /src/agents/main/vfs.py
parentb1e120ccb77e9fd3dcf3bb818c058f5334e4f415 (diff)
updated interrogation to load from logs
Diffstat (limited to 'src/agents/main/vfs.py')
-rw-r--r--src/agents/main/vfs.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/agents/main/vfs.py b/src/agents/main/vfs.py
index 5bfc0c9..2bbfdc3 100644
--- a/src/agents/main/vfs.py
+++ b/src/agents/main/vfs.py
@@ -3,8 +3,10 @@ import os
import copy
class VirtualFileSystem:
- def __init__(self, root_path=None):
- if root_path and os.path.exists(root_path):
+ def __init__(self, root_path=None, fs_data=None):
+ if fs_data is not None:
+ self.fs = fs_data
+ elif root_path and os.path.exists(root_path):
self.fs = self._load_from_path(root_path)
else:
self.fs = {"/": {}}
@@ -111,8 +113,8 @@ class VFS:
_instance = None
@classmethod
- def get_instance(cls, root_path=None):
+ def get_instance(cls, root_path=None, fs_data=None):
if cls._instance is None:
- cls._instance = VirtualFileSystem(root_path)
+ cls._instance = VirtualFileSystem(root_path, fs_data)
return cls._instance