Skip to content

Persist aborted streamed messages #191

@krishokr

Description

@krishokr

Todo

Currently, stopped messages are not persisted in state on subsequent re-renders in the UI - this means that any messages that are stopped mid-stream will be lost after a new stream is started (which causes a re-render). Additionally, this means that a user can only "Retry" immediately after the message has been stopped.

The aim of this ticket is to support "persisting" stopped messages such that a user can go back and "retry" a stopped message, even after subsequent streams.

There is a refetch of messages after each stream. This is because the threadId changes after the url changes, triggering a message refetch. We either need to avoid this, or to persist the stopped messages through the message refetch. Currently, the stopped messages are persisted in the streamedMessages state, however the state is emptied after the refetch to ensure messages from the current thread are not carried over if a user navigates to a new thread.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions