MCPcopy Create free account
hub / github.com/Ishabdullah/Codey-v2 / _load_all_chunks

Function _load_all_chunks

tools/kb_semantic.py:326–337  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

324# ── Chunk loading ─────────────────────────────────────────────────────────────
325
326def _load_all_chunks() -> list:
327 chunk_dir = KB_ROOT / "embeddings"
328 if not chunk_dir.exists():
329 return []
330 all_chunks = []
331 for cf in sorted(chunk_dir.glob("*.chunks.json")):
332 try:
333 with open(cf, encoding="utf-8") as f:
334 all_chunks.extend(json.load(f))
335 except Exception:
336 pass
337 return all_chunks
338
339
340# ── Vector index: build + load ────────────────────────────────────────────────

Callers 2

build_semantic_indexFunction · 0.85
keyword_fallbackFunction · 0.85

Calls 2

existsMethod · 0.80
loadMethod · 0.80

Tested by

no test coverage detected