MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / copyNoteComments

Function copyNoteComments

apps/desktop/src/main/vault.ts:2774–2789  ·  view source on GitHub ↗
(root: string, sourceRel: string, nextRel: string)

Source from the content-addressed store, hash-verified

2772}
2773
2774async function copyNoteComments(root: string, sourceRel: string, nextRel: string): Promise<void> {
2775 const source = await readNoteComments(root, sourceRel)
2776 if (source.length === 0) return
2777 const now = Date.now()
2778 await writeNoteComments(
2779 root,
2780 nextRel,
2781 source.map((comment) => ({
2782 ...comment,
2783 id: randomUUID(),
2784 notePath: nextRel,
2785 createdAt: now,
2786 updatedAt: now
2787 }))
2788 )
2789}
2790
2791export async function appendToNote(
2792 root: string,

Callers 1

duplicateNoteFunction · 0.85

Calls 2

readNoteCommentsFunction · 0.70
writeNoteCommentsFunction · 0.70

Tested by

no test coverage detected