MCPcopy
hub / github.com/mixedbread-ai/mgrep / createStore

Function createStore

src/lib/context.ts:20–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18 * Supports authentication via MXBAI_API_KEY env var or OAuth token
19 */
20export async function createStore(): Promise<Store> {
21 if (isTest) {
22 return new TestStore();
23 }
24
25 await ensureAuthenticated();
26
27 async function createClient() {
28 const jwtToken = await getJWTToken();
29 return new Mixedbread({
30 baseURL: BASE_URL,
31 apiKey: jwtToken,
32 });
33 }
34
35 const client = await createClient();
36 return new MixedbreadStore(client, createClient);
37}
38
39/**
40 * Creates a Git instance

Callers 2

startWatchFunction · 0.85
search.tsFile · 0.85

Calls 2

ensureAuthenticatedFunction · 0.85
createClientFunction · 0.85

Tested by

no test coverage detected