Find a queued elicitation event by server name and elicitationId.
( queue: ElicitationRequestEvent[], serverName: string, elicitationId: string, )
| 52 | |
| 53 | /** Find a queued elicitation event by server name and elicitationId. */ |
| 54 | function findElicitationInQueue( |
| 55 | queue: ElicitationRequestEvent[], |
| 56 | serverName: string, |
| 57 | elicitationId: string, |
| 58 | ): number { |
| 59 | return queue.findIndex( |
| 60 | e => |
| 61 | e.serverName === serverName && |
| 62 | e.params.mode === 'url' && |
| 63 | 'elicitationId' in e.params && |
| 64 | e.params.elicitationId === elicitationId, |
| 65 | ) |
| 66 | } |
| 67 | |
| 68 | export function registerElicitationHandler( |
| 69 | client: Client, |
no outgoing calls
no test coverage detected