OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

feat(frontend): typing chat feature | for #187

Open 808vita opened this issue 10 months ago • 3 comments

for #187 Print terminal and chat output character by character

changes:

  • created hook - useTypingEffect
  • modified chatInterface - created a new jsx typing chat
  • chatSlice - exported Message type

preview (using mock server):

typing chat preview .webm

808vita avatar Mar 29 '24 17:03 808vita

This looks awesome!

LGTM but I will let frontend folks look

rbren avatar Mar 29 '24 19:03 rbren

@rbren In the future, should we make the typewriter effect available on the backend? For example using SSE (Server-Sent Events) implementation?

huybery avatar Mar 30 '24 12:03 huybery

IMO it's something for the frontend to handle as it wants--the backend shouldn't concern itself with how data gets displayed.

That said, many of the LLMs offer a "streaming" response, since response generation is slow. So we could stream data to the frontend as it becomes available, rather than waiting for the entire response to buffer and then typing it out.

So I guess the answer is "we should do both"

rbren avatar Mar 30 '24 14:03 rbren

I have resolved the merge conflicts .

oof I tried it out

break words css

probably because break words css class.webm

808vita avatar Mar 31 '24 07:03 808vita

actually its w-4/5 thats causing this

808vita avatar Mar 31 '24 16:03 808vita

new typing.webm

808vita avatar Mar 31 '24 17:03 808vita

LGTM. Thank you!

huybery avatar Mar 31 '24 19:03 huybery