(
id: string,
data: Partial<Omit<Annotation, "id" | "sessionId" | "createdAt">>
)
| 154 | }, |
| 155 | |
| 156 | updateAnnotation( |
| 157 | id: string, |
| 158 | data: Partial<Omit<Annotation, "id" | "sessionId" | "createdAt">> |
| 159 | ): Annotation | undefined { |
| 160 | const annotation = annotations.get(id); |
| 161 | if (!annotation) return undefined; |
| 162 | |
| 163 | Object.assign(annotation, data, { updatedAt: new Date().toISOString() }); |
| 164 | |
| 165 | if (annotation.sessionId) { |
| 166 | const event = eventBus.emit("annotation.updated", annotation.sessionId, annotation); |
| 167 | events.push(event); |
| 168 | } |
| 169 | |
| 170 | return annotation; |
| 171 | }, |
| 172 | |
| 173 | updateAnnotationStatus( |
| 174 | id: string, |
no test coverage detected
searching dependent graphs…