MCPcopy Create free account
hub / github.com/IgorWarzocha/howcode / getThreadAssistantSnapshot

Function getThreadAssistantSnapshot

desktop/thread-state-db/queries.ts:359–378  ·  view source on GitHub ↗
(sessionPath: string)

Source from the content-addressed store, hash-verified

357}
358
359export function getThreadAssistantSnapshot(sessionPath: string) {
360 const db = getThreadStateDatabase()
361 const row = db
362 .prepare(
363 `
364 SELECT
365 last_assistant_message_json AS messageJson,
366 last_assistant_preview AS preview
367 FROM threads
368 WHERE session_path = ?
369 `,
370 )
371 .get(sessionPath) as ThreadAssistantSnapshotRow | undefined
372
373 if (!row?.messageJson) {
374 return null
375 }
376
377 return row
378}
379
380export function getSessionNativeExtensions(
381 sessionPath: string | null | undefined,

Callers 2

Calls 3

getThreadStateDatabaseFunction · 0.90
getMethod · 0.80
prepareMethod · 0.80

Tested by

no test coverage detected