MCPcopy Create free account
hub / github.com/PromtEngineer/localGPT / linkIndexToSession

Method linkIndexToSession

src/lib/api.ts:512–519  ·  view source on GitHub ↗
(sessionId: string, indexId: string)

Source from the content-addressed store, hash-verified

510 }
511
512 async linkIndexToSession(sessionId: string, indexId: string): Promise<{ message: string }> {
513 const resp = await fetch(`${API_BASE_URL}/sessions/${sessionId}/indexes/${indexId}`, { method: 'POST' });
514 if (!resp.ok) {
515 const err = await resp.json().catch(() => ({}));
516 throw new Error(`Link index error: ${err.error || resp.statusText}`);
517 }
518 return resp.json();
519 }
520
521 async listIndexes(): Promise<{ indexes: any[]; total: number }> {
522 const resp = await fetch(`${API_BASE_URL}/indexes`);

Callers 2

handleSubmitFunction · 0.80
DemoFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected