Reads the single pending requestId for a session (test helper).
(sessionId: string)
| 214 | |
| 215 | /** Reads the single pending requestId for a session (test helper). */ |
| 216 | function pendingRequestId(sessionId: string): string { |
| 217 | const sessions = ( |
| 218 | interactivePromptServer as unknown as { |
| 219 | sessions: Map<string, { pending: Map<string, unknown> }>; |
| 220 | } |
| 221 | ).sessions; |
| 222 | const pending = sessions.get(sessionId)?.pending; |
| 223 | const first = pending ? [...pending.keys()][0] : undefined; |
| 224 | if (!first) throw new Error("no pending prompt"); |
| 225 | return first; |
| 226 | } |
no test coverage detected