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

Method getAIChat

packages/node-runtime/src/ai/chats.ts:558–569  ·  view source on GitHub ↗
(aiChatId: string)

Source from the content-addressed store, hash-verified

556 }
557
558 getAIChat(aiChatId: string): AIChat | null {
559 const db = this.getDb()
560 const row = db
561 .prepare(
562 `SELECT id, session_id as sessionId, title, assistant_id as assistantId,
563 active_message_id as activeMessageId,
564 created_at as createdAt, updated_at as updatedAt
565 FROM ai_chat WHERE id = ?`
566 )
567 .get(aiChatId) as AIChat | undefined
568 return row || null
569 }
570
571 updateAIChatTitle(aiChatId: string, title: string): boolean {
572 const db = this.getDb()

Callers 2

forkAIChatMethod · 0.95

Calls 3

getDbMethod · 0.95
getMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected