(sessionPath: string)
| 357 | } |
| 358 | |
| 359 | export 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 | |
| 380 | export function getSessionNativeExtensions( |
| 381 | sessionPath: string | null | undefined, |
no test coverage detected