MCPcopy Index your code
hub / github.com/coder/mux / recordDelete

Method recordDelete

src/node/services/memoryService.ts:523–541  ·  view source on GitHub ↗
(
    ctx: MemoryScopeContext,
    scope: MemoryScope,
    relPath: string
  )

Source from the content-addressed store, hash-verified

521 }
522
523 private async recordDelete(
524 ctx: MemoryScopeContext,
525 scope: MemoryScope,
526 relPath: string
527 ): Promise<void> {
528 try {
529 const key = this.logicalKeyFor(ctx, scope, relPath);
530 if (key === null) return;
531 // Subtree-aware: deleting a directory drops metadata for everything in it,
532 // so a future file at the same path never resurrects stale pins/stats.
533 await this.metaService.removeKeys(key);
534 } catch (error) {
535 log.debug("[MemoryService] failed to drop memory usage stats on delete", {
536 scope,
537 relPath,
538 error,
539 });
540 }
541 }
542
543 private getStore(ctx: MemoryScopeContext, scope: MemoryScope): MemoryStore {
544 switch (scope) {

Callers 1

deletePathMethod · 0.95

Calls 3

logicalKeyForMethod · 0.95
removeKeysMethod · 0.80
debugMethod · 0.80

Tested by

no test coverage detected