Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Optimize ts definition with vue and make botname changeable. #4

Open
DSYZayn opened this issue Apr 18, 2024 · 0 comments
Open

Comments

@DSYZayn
Copy link

DSYZayn commented Apr 18, 2024

Hi there😊
I noticed this great project for building a simple and strong chat web application, but during the usage I found some issues which is mentioned in #3 . I've optimized the ts definition by using setup lang='ts' sugar syntax and defineProps api. Except the origin five files in vue version, I add a type file named message to define the single message in chatdata. Next I wish the definition of message may have more detail like message<T extends 'chatbot' | 'person'> which is I'm using outside of the component now. By the way, I've fixed the scroll behavior to adapt my stream response from the server, now it can always scroll to the right position.
However, though I optimized these problems, I won't pull a request directly because this project is a little complicated for me especially the structure for build three version at one time. So I publish a new npm package https://www.npmjs.com/package/@heyzayn/components and the corresponding source code at https://github.com/DSYZayn/components/tree/main/packages/ChatUI
Wish you can benefit from it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant