(deletions: { entityName: string; observations: string[] }[])
| 159 | } |
| 160 | |
| 161 | async deleteObservations(deletions: { entityName: string; observations: string[] }[]): Promise<void> { |
| 162 | const graph = await this.loadGraph(); |
| 163 | deletions.forEach(d => { |
| 164 | const entity = graph.entities.find(e => e.name === d.entityName); |
| 165 | if (entity) { |
| 166 | entity.observations = entity.observations.filter(o => !d.observations.includes(o)); |
| 167 | } |
| 168 | }); |
| 169 | await this.saveGraph(graph); |
| 170 | } |
| 171 | |
| 172 | async deleteRelations(relations: Relation[]): Promise<void> { |
| 173 | const graph = await this.loadGraph(); |
no test coverage detected