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

Function appendNoteJumpHistory

packages/app-core/src/store.ts:1333–1343  ·  view source on GitHub ↗
(
  history: NoteJumpLocation[],
  location: NoteJumpLocation | null
)

Source from the content-addressed store, hash-verified

1331}
1332
1333function appendNoteJumpHistory(
1334 history: NoteJumpLocation[],
1335 location: NoteJumpLocation | null
1336): NoteJumpLocation[] {
1337 if (!location) return history
1338 if (sameNoteJumpLocation(history[history.length - 1] ?? null, location)) return history
1339 const next = [...history, location]
1340 return next.length > MAX_NOTE_JUMP_HISTORY
1341 ? next.slice(next.length - MAX_NOTE_JUMP_HISTORY)
1342 : next
1343}
1344
1345function rewriteNoteJumpHistory(
1346 history: NoteJumpLocation[],

Callers 2

selectNoteImplFunction · 0.85
jumpThroughNoteHistoryFunction · 0.85

Calls 1

sameNoteJumpLocationFunction · 0.85

Tested by

no test coverage detected