( session: SlashCommandHost['session'], )
| 187 | } |
| 188 | |
| 189 | async function getSessionContext( |
| 190 | session: SlashCommandHost['session'], |
| 191 | ): Promise<UndoSessionContext | undefined> { |
| 192 | const getContext = ( |
| 193 | session as { getContext?: () => Promise<UndoSessionContext> } | undefined |
| 194 | )?.getContext; |
| 195 | if (session === undefined || getContext === undefined) return undefined; |
| 196 | try { |
| 197 | return await getContext.call(session); |
| 198 | } catch { |
| 199 | return undefined; |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | function undoAvailabilityFromTranscript( |
| 204 | entries: readonly TranscriptEntry[], |
no outgoing calls
no test coverage detected