MCPcopy Create free account
hub / github.com/apache/maka / removeLocalMemoryEntrySection

Function removeLocalMemoryEntrySection

packages/core/src/local-memory.ts:853–857  ·  view source on GitHub ↗
(input: string, range: LocalMemoryEntryDraftRange)

Source from the content-addressed store, hash-verified

851}
852
853function removeLocalMemoryEntrySection(input: string, range: LocalMemoryEntryDraftRange): string {
854 const before = input.slice(0, range.start).replace(/\n{3,}$/g, '\n\n');
855 const after = input.slice(range.end).replace(/^\n{2,}/g, '\n');
856 return `${before}${after}`.trimEnd() + '\n';
857}
858
859function serializeMetaComment(meta: Record<string, string>): string {
860 const orderedKeys = [

Callers 1

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected