removeSource method
Remove a source and all its chunks from the database.
Implementation
Future<void> removeSource(int sourceId, {String? collectionId}) async {
final normalized = _normalizeCollectionId(collectionId);
final service = await _serviceForCollection(normalized);
if (normalized == SourceRagService.defaultCollectionId) {
_startOperation();
}
try {
await service.removeSource(sourceId);
} finally {
if (normalized == SourceRagService.defaultCollectionId) {
_endOperation();
}
}
}