(projectId: string)
| 333 | |
| 334 | /** Delete all symbol-graph data for a project (best-effort). */ |
| 335 | export 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`. */ |
| 359 | export function contentHashOf(source: string): string { |
no test coverage detected