( sessionPath: string, thread: ThreadData, reason: RuntimeThreadReason, )
| 263 | } |
| 264 | |
| 265 | function updateInboxStartState( |
| 266 | sessionPath: string, |
| 267 | thread: ThreadData, |
| 268 | reason: RuntimeThreadReason, |
| 269 | ) { |
| 270 | if (reason !== 'start') return |
| 271 | const latestUserPrompt = getLatestUserPrompt(thread) |
| 272 | if (latestUserPrompt || hasInboxItem(sessionPath)) { |
| 273 | beginInboxThreadTurn(sessionPath, latestUserPrompt) |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | function updateInboxEndState( |
| 278 | sessionPath: string, |
no test coverage detected