MCPcopy
hub / github.com/VectifyAI/PageIndex / _load_workspace

Method _load_workspace

pageindex/client.py:196–206  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

194 json.dump(meta, f, ensure_ascii=False, indent=2)
195
196 def _load_workspace(self):
197 meta = self._read_meta()
198 if meta is None:
199 meta = self._rebuild_meta()
200 if meta:
201 print(f"Loaded {len(meta)} document(s) from workspace (legacy mode).")
202 for doc_id, entry in meta.items():
203 doc = dict(entry, id=doc_id)
204 if doc.get('path') and not os.path.isabs(doc['path']):
205 doc['path'] = str((self.workspace / doc['path']).resolve())
206 self.documents[doc_id] = doc
207
208 def _ensure_doc_loaded(self, doc_id: str):
209 """Load full document JSON on demand (structure, pages, etc.)."""

Callers 1

__init__Method · 0.95

Calls 2

_read_metaMethod · 0.95
_rebuild_metaMethod · 0.95

Tested by

no test coverage detected