(
sessionPath: string,
options?: { historyCompactions?: number | undefined },
)
| 93 | } |
| 94 | |
| 95 | export async function loadThread( |
| 96 | sessionPath: string, |
| 97 | options?: { historyCompactions?: number | undefined }, |
| 98 | ): Promise<ThreadData> { |
| 99 | const liveThread = getLiveThread(sessionPath) |
| 100 | if ( |
| 101 | (liveThread?.isStreaming || liveThread?.isCompacting) && |
| 102 | (options?.historyCompactions ?? 0) === 0 |
| 103 | ) { |
| 104 | return attachThreadDiffPreferences(liveThread) |
| 105 | } |
| 106 | |
| 107 | return (await loadThreadSnapshot(sessionPath, options)).thread |
| 108 | } |
no test coverage detected