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

Method getAIChats

packages/node-runtime/src/ai/chats.ts:546–556  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

544 }
545
546 getAIChats(sessionId: string): AIChat[] {
547 const db = this.getDb()
548 return db
549 .prepare(
550 `SELECT id, session_id as sessionId, title, assistant_id as assistantId,
551 active_message_id as activeMessageId,
552 created_at as createdAt, updated_at as updatedAt
553 FROM ai_chat WHERE session_id = ? ORDER BY updated_at DESC`
554 )
555 .all(sessionId) as AIChat[]
556 }
557
558 getAIChat(aiChatId: string): AIChat | null {
559 const db = this.getDb()

Callers

nothing calls this directly

Calls 3

getDbMethod · 0.95
allMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected