MCPcopy
hub / github.com/MinishLab/semble / _load_index

Function _load_index

src/semble/cli.py:99–105  ·  view source on GitHub ↗

Build an index from a local path or git URL, exiting on FileNotFoundError.

(path: str, content: list[ContentType])

Source from the content-addressed store, hash-verified

97
98
99def _load_index(path: str, content: list[ContentType]) -> SembleIndex:
100 """Build an index from a local path or git URL, exiting on FileNotFoundError."""
101 try:
102 return _build_index(path, content)
103 except FileNotFoundError as e:
104 print(str(e), file=sys.stderr)
105 sys.exit(1)
106
107
108def _run_search(path: str, query: str, top_k: int, content: list[ContentType], max_snippet_lines: int | None) -> None:

Callers 2

_run_searchFunction · 0.85
_run_find_relatedFunction · 0.85

Calls 1

_build_indexFunction · 0.70

Tested by

no test coverage detected