MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / getLastPlatformMessageId

Function getLastPlatformMessageId

packages/core/src/query/session-queries.ts:107–112  ·  view source on GitHub ↗
(db: DatabaseAdapter)

Source from the content-addressed store, hash-verified

105 * Get the latest platform_message_id (used as incremental import boundary).
106 */
107export function getLastPlatformMessageId(db: DatabaseAdapter): string | null {
108 const row = db
109 .prepare('SELECT platform_message_id FROM message WHERE platform_message_id IS NOT NULL ORDER BY ts DESC LIMIT 1')
110 .get() as { platform_message_id: string } | undefined
111 return row?.platform_message_id ?? null
112}
113
114// ==================== Core identification ====================
115

Callers 3

getSessionFunction · 0.90

Calls 2

getMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected