({
runtime,
sessionPath,
thread,
timestamp,
}: {
runtime: PiRuntime
sessionPath: string
thread: ThreadData
timestamp: number
})
| 226 | } |
| 227 | |
| 228 | function 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 | |
| 252 | function updateThreadRunningState( |
| 253 | sessionPath: string, |
no test coverage detected