MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / getSummaryCount

Function getSummaryCount

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

Source from the content-addressed store, hash-verified

94 * Count of chat sessions that have an AI-generated summary.
95 */
96export function getSummaryCount(db: DatabaseAdapter): number {
97 if (!hasTable(db, 'segment')) return 0
98 const row = db.prepare("SELECT COUNT(*) as count FROM segment WHERE summary IS NOT NULL AND summary != ''").get() as
99 | { count: number }
100 | undefined
101 return row?.count ?? 0
102}
103
104/**
105 * Get the latest platform_message_id (used as incremental import boundary).

Callers 6

buildSessionFunction · 0.90
getAllSessionsFunction · 0.90
getChatOverviewFunction · 0.90
getSessionInfoFunction · 0.85
getChatOverviewFunction · 0.85

Calls 3

hasTableFunction · 0.90
getMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected