(pred, ms = 1000)
| 134 | } |
| 135 | |
| 136 | const waitFor = async (pred, ms = 1000) => { |
| 137 | const t0 = Date.now() |
| 138 | while (Date.now() - t0 < ms) { |
| 139 | if (pred()) return true |
| 140 | await new Promise((r) => setTimeout(r, 20)) |
| 141 | } |
| 142 | return pred() |
| 143 | } |
| 144 | |
| 145 | // F — SessionStart injects context into the first message of the session. |
| 146 | { |
no outgoing calls
no test coverage detected