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

Method deleteIndex

src/lib/api.ts:535–544  ·  view source on GitHub ↗
(indexId: string)

Source from the content-addressed store, hash-verified

533 }
534
535 async deleteIndex(indexId: string): Promise<{ message: string }> {
536 const resp = await fetch(`${API_BASE_URL}/indexes/${indexId}`, {
537 method: 'DELETE',
538 });
539 if (!resp.ok) {
540 const data = await resp.json().catch(() => ({ error: 'Unknown error'}));
541 throw new Error(data.error || `Failed to delete index: ${resp.status}`);
542 }
543 return resp.json();
544 }
545
546 // -------------------- Streaming (SSE-over-fetch) --------------------
547 async streamSessionMessage(

Callers 1

handleDeleteFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected