diff --git a/examples/contextModifiers/notes.md b/examples/contextModifiers/notes.md index 137fa9e..720a3f7 100644 --- a/examples/contextModifiers/notes.md +++ b/examples/contextModifiers/notes.md @@ -38,8 +38,8 @@ Set a note by typing `note: ` when in Do mode. It will be tagged to whatever the const modifier = (text) => { state.notes = state.notes || [] - const contextMemory = text.slice(0, info.memoryLength || 0) - let context = info.memoryLength ? text.slice(info.memoryLength + 1) : text + const contextMemory = info.memoryLength ? text.slice(0, info.memoryLength) : '' + let context = info.memoryLength ? text.slice(info.memoryLength) : text // Assumes that the notes are sorted from oldest to newest. state.notes = state.notes.filter(({ pattern, note, actionCount }) => { diff --git a/examples/contextModifiers/reimplementAuthorsNote.js b/examples/contextModifiers/reimplementAuthorsNote.js index 986029d..83f1589 100644 --- a/examples/contextModifiers/reimplementAuthorsNote.js +++ b/examples/contextModifiers/reimplementAuthorsNote.js @@ -7,7 +7,7 @@ // This modifier re-implements Author's Note as an example. const modifier = (text) => { const contextMemory = info.memoryLength ? text.slice(0, info.memoryLength) : '' - const context = info.memoryLength ? text.slice(info.memoryLength + 1) : text + const context = info.memoryLength ? text.slice(info.memoryLength) : text const lines = context.split("\n") if (lines.length > 2) { const authorsNote = "Everyone in this story is an AI programmer."