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

Function loadThreadSnapshot

desktop/pi-threads/thread-loader.ts:80–93  ·  view source on GitHub ↗
(
  sessionPath: string,
  options?: { historyCompactions?: number | undefined },
)

Source from the content-addressed store, hash-verified

78}
79
80export async function loadThreadSnapshot(
81 sessionPath: string,
82 options?: { historyCompactions?: number | undefined },
83): Promise<LoadedThreadSnapshot> {
84 const snapshot = await invokeRuntimeHost('loadThreadSnapshot', {
85 sessionPath,
86 historyCompactions: options?.historyCompactions,
87 })
88
89 return {
90 ...snapshot,
91 thread: attachThreadDiffPreferences(snapshot.thread),
92 }
93}
94
95export async function loadThread(
96 sessionPath: string,

Callers 2

refreshWatchedSessionFunction · 0.90
loadThreadFunction · 0.70

Calls 2

invokeRuntimeHostFunction · 0.90

Tested by

no test coverage detected