MCPcopy
hub / github.com/giancarloerra/SocratiCode / deleteSymbolGraphData

Function deleteSymbolGraphData

src/services/symbol-graph-store.ts:335–356  ·  view source on GitHub ↗
(projectId: string)

Source from the content-addressed store, hash-verified

333
334/** Delete all symbol-graph data for a project (best-effort). */
335export async function deleteSymbolGraphData(projectId: string): Promise<void> {
336 const qdrant = getClient();
337 const names = [
338 symgraphMetaCollectionName(projectId),
339 symgraphFileCollectionName(projectId),
340 symgraphIndexCollectionName(projectId),
341 ];
342 const existing = await qdrant.getCollections();
343 for (const name of names) {
344 if (existing.collections.some((c) => c.name === name)) {
345 try {
346 await qdrant.deleteCollection(name);
347 collectionsReady.delete(name);
348 } catch (err) {
349 logger.warn("deleteSymbolGraphData: deleteCollection failed (ignored)", {
350 name,
351 error: err instanceof Error ? err.message : String(err),
352 });
353 }
354 }
355 }
356}
357
358/** Compute SHA-256 of a string and return hex digest. Used for `contentHash`. */
359export function contentHashOf(source: string): string {

Callers 2

removeGraphFunction · 0.85

Calls 5

deleteMethod · 0.80
getClientFunction · 0.70

Tested by

no test coverage detected