Skip to content
Draft
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.1.6]
### Added
- Add `chatSession.isParticipantDisconnected()` method to check if participant has been disconnected from chat
### Changed
- Bump dependencies to patch security vulnerabilities

## [3.1.5]
### Changed
- Remove verbose websocket incoming message logging from LpcConnectionHelper
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1298,6 +1298,17 @@ Cleans up all event handlers when chat has been ended.

Applies only to `AgentChatSession`. See connect.ChatSession.create() for more info.

#### `chatSession.isParticipantDisconnected()`

Returns a boolean indicating whether the participant has been disconnected from the chat. This is useful for checking if the chat session has ended before attempting other operations like `disconnectParticipant()`.

```js
if (!chatSession.isParticipantDisconnected()) {
// Safe to call disconnect or other operations
await chatSession.disconnectParticipant();
}
```

### `chatSession` Events

#### `chatSession.onMessage()`
Expand Down
Loading
Loading