Inactive session with directory path but no agent thread and no prior user turn.
(session: Session, sessionId: string, namespace: string)
| 1050 | |
| 1051 | /** Inactive session with directory path but no agent thread and no prior user turn. */ |
| 1052 | private canFreshSpawnNeverStartedSession(session: Session, sessionId: string, namespace: string): boolean { |
| 1053 | const metadata = session.metadata |
| 1054 | if (!metadata || typeof metadata.path !== 'string' || metadata.path.length === 0) { |
| 1055 | return false |
| 1056 | } |
| 1057 | if (this.resolveAgentResumeId(session, namespace)) { |
| 1058 | return false |
| 1059 | } |
| 1060 | return this.store.messages.getFirstMessages(sessionId, 1).length === 0 |
| 1061 | } |
| 1062 | |
| 1063 | async resumeSession(sessionId: string, namespace: string, opts?: { permissionMode?: PermissionMode }): Promise<ResumeSessionResult> { |
| 1064 | const access = this.sessionCache.resolveSessionAccess(sessionId, namespace) |
no test coverage detected