MCPcopy Create free account
hub / github.com/modelcontextprotocol/ext-apps / removeAnnotation

Function removeAnnotation

examples/pdf-server/src/mcp-app.ts:2293–2304  ·  view source on GitHub ↗
(id: string, skipUndo = false)

Source from the content-addressed store, hash-verified

2291}
2292
2293function removeAnnotation(id: string, skipUndo = false): void {
2294 const tracked = annotationMap.get(id);
2295 if (!tracked) return;
2296 if (!skipUndo) {
2297 pushEdit({ type: "remove", id, before: { ...tracked.def }, after: null });
2298 }
2299 for (const el of tracked.elements) el.remove();
2300 annotationMap.delete(id);
2301 selectedAnnotationIds.delete(id);
2302 updateAnnotationsBadge();
2303 renderAnnotationPanel();
2304}
2305// =============================================================================
2306// Annotation Panel → extracted to ./annotation-panel.ts
2307// =============================================================================

Callers 4

applyEditFunction · 0.85
addAnnotationFunction · 0.85
mcp-app.tsFile · 0.85
processCommandsFunction · 0.85

Calls 4

pushEditFunction · 0.85
updateAnnotationsBadgeFunction · 0.85
renderAnnotationPanelFunction · 0.85
removeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…