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

Function getSegmentSummary

packages/core/src/query/session-queries.ts:531–540  ·  view source on GitHub ↗
(db: DatabaseAdapter, segmentId: number)

Source from the content-addressed store, hash-verified

529 * Get summary text for a single chat session.
530 */
531export function getSegmentSummary(db: DatabaseAdapter, segmentId: number): string | null {
532 try {
533 const row = db.prepare('SELECT summary FROM segment WHERE id = ?').get(segmentId) as
534 | { summary: string | null }
535 | undefined
536 return row?.summary ?? null
537 } catch {
538 return null
539 }
540}
541
542/**
543 * Save summary text for a chat session.

Callers 3

getSummaryFunction · 0.90
getSummaryFunction · 0.90

Calls 2

getMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected