Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions docs/api/classes/HITLManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,33 @@ Get count of pending confirmations
#### Returns

`number`

---

### hasPendingConfirmation()

> **hasPendingConfirmation**(`confirmationId`): `boolean`

Defined in: [hitl/hitlManager.ts:594](https://github.com/juspay/neurolink/blob/release/src/lib/hitl/hitlManager.ts#L594)

Whether a specific confirmation is still awaiting a response on this manager.

A pending entry holds the `resolve`/`reject` of the suspended tool call, so it
exists only in the memory of the manager that issued it. A manager constructed
after the confirmation was issued — a session rebuilt from persisted state, for
example — has an empty set, and `processUserResponse` for such an id logs a
warning and returns without resolving anything.

Callers that report an outcome back to a user should check this before treating
a delivered `hitl:confirmation-response` as acted upon: the event being received
says a listener existed, not that anything was waiting for it.

#### Parameters

##### confirmationId

`string`

#### Returns

`boolean`
Loading
Loading