Skip to content
Open
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@uipath/uipath-typescript",
"version": "1.2.1",
"version": "1.3.0",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not bump up the version with this change. We might have a few other changes we want to ship with the next version. We'll raise a separate PR for the version change.

"description": "UiPath TypeScript SDK",
"license": "MIT",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,22 @@ export class ConversationService extends BaseService implements ConversationServ
return this._sessionManager.onConnectionStatusChanged(handler);
}

/**
* Disconnects the WebSocket and releases all session resources.
*
* Immediately closes the WebSocket connection and clears all per-conversation
* socket tracking. Call this after ending all sessions to allow the process to exit.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Call this after ending all sessions" implies endSession() is a required prerequisite. It isn't,disconnect closes all sockets directly without needing prior endSession calls.
better add: "Call this to shut down the WebSocket connection entirely."

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have the same description in models as well when you add, because in public docs, comments from models get picked up.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also add a line somehting like this: "In Node.js, the WebSocket keeps the event loop alive until disconnected, call this to allow the process to exit cleanly." because In a browser, the runtime handles socket cleanup on page unload, so this is a no-op there.

*
* @example
* ```typescript
* conversationalAgent.conversations.endSession(conversationId);
* conversationalAgent.conversations.disconnect();
* ```
*/
disconnect(): void {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Please add this method in the ConversationServiceModel as well.
  2. Add a test case here -

this._sessionManager.disconnect();
}

// ==================== Private Methods ====================

private _getEvents(): ConversationEventHelperManager {
Expand Down
Loading