i-dot-ai / redbox

Bringing Generative AI to the way the Civil Service works
https://i-dot-ai.github.io/redbox/
MIT License
93 stars 31 forks source link

Feature/stop streaming button #930

Closed KevinEtchells closed 2 months ago

KevinEtchells commented 2 months ago

Context

Being able to stop a stream has been a highly requested feature. We have this functionality as an escape key, but many users won’t be aware of or think of this - a button would be better.

I've tried two approaches: (A) having a button in the message container, and (B) ChatGPT-style where the send button turns into a stop button. I've opted for B in the end, as A was a bit clunky when scrolling, and there is already a design for B. A is a separate commit on this branch should we ever wish to go back to it.

Changes proposed in this pull request

Make the send button turn into a stop button while streaming is happening.

Guidance to review

Relevant links

https://technologyprogramme.atlassian.net/browse/REDBOX-619

Things to check