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

Function upsertPersistedThreadSummary

desktop/runtime/thread-publisher.ts:228–250  ·  view source on GitHub ↗
({
  runtime,
  sessionPath,
  thread,
  timestamp,
}: {
  runtime: PiRuntime
  sessionPath: string
  thread: ThreadData
  timestamp: number
})

Source from the content-addressed store, hash-verified

226}
227
228function upsertPersistedThreadSummary({
229 runtime,
230 sessionPath,
231 thread,
232 timestamp,
233}: {
234 runtime: PiRuntime
235 sessionPath: string
236 thread: ThreadData
237 timestamp: number
238}) {
239 const threadId = upsertThreadSummary({
240 id: runtime.session.sessionId,
241 cwd: runtime.cwd,
242 sessionPath,
243 title: thread.title,
244 lastModifiedMs: timestamp,
245 })
246 if (isChatSessionPath(sessionPath)) {
247 upsertChatThread({ sessionPath, groupId: runtime.chatGroupId ?? null })
248 }
249 return threadId
250}
251
252function updateThreadRunningState(
253 sessionPath: string,

Callers 1

Calls 3

upsertThreadSummaryFunction · 0.90
isChatSessionPathFunction · 0.90
upsertChatThreadFunction · 0.90

Tested by

no test coverage detected