refactor: rename getNewMessages to consumeNewMessages

Rename to signal mutation behavior - the function advances the cursor
as a side effect, so 'consume' better reflects that calling it twice
with the same input yields different results.
This commit is contained in:
Kenny
2026-01-14 21:06:26 -05:00
parent acb16bcb27
commit 3de559ff87
4 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ function buildMessageKey(message: CursorMessage, index: number): string {
return `i:${index}`
}
export function getNewMessages<T extends CursorMessage>(
export function consumeNewMessages<T extends CursorMessage>(
sessionID: string | undefined,
messages: T[]
): T[] {