4da48555ee
Handle OpenCode session events that carry the session ID under properties.info.id or properties.info.sessionID so background tasks and continuation hooks do not miss idle/error/delete events. Add regression coverage for nested session.idle events completing background tasks and waking continuation hooks.
10 lines
328 B
TypeScript
10 lines
328 B
TypeScript
import { resolveSessionEventID } from "../../shared/event-session-id"
|
|
|
|
export function isCompactionAgent(agent: string | undefined): boolean {
|
|
return agent?.trim().toLowerCase() === "compaction"
|
|
}
|
|
|
|
export function resolveSessionID(props?: Record<string, unknown>): string | undefined {
|
|
return resolveSessionEventID(props)
|
|
}
|