Skip to content

Conversation

@Fabilin
Copy link
Member

@Fabilin Fabilin commented Oct 14, 2024

This PR resolves #178 by swapping out the EventSource implementation with Microsoft's fetch-event-source package. The new implementation keeps retrying every second except if the server answers with a 4XX HTTP status code.
The PR also resolves #179 by scoping the SSE connection to the useTock hook. To allow preserving the connection across re-mounting of the Chat component, it also refactors useTock to allow storing all the network context in TockContext.

Important

This PR continues a deprecation process started in #164, moving several properties from the Chat component's properties to the TockSettings configuration object. Direct support of these properties in Chat can be removed in a future major release.

…SE processing

* scope SSE state
* allow hoisting SSE processing out of render
* add retry behavior
* make it so SSE only gets auto-disabled when the server sends a 4XX error
* start moving network settings to TockContext
@Fabilin Fabilin marked this pull request as ready for review October 15, 2024 15:01
@Fabilin Fabilin merged commit 427112b into theopenconversationkit:master Oct 28, 2024
@Fabilin Fabilin added this to the 24.3.0 milestone Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants