-
Notifications
You must be signed in to change notification settings - Fork 6
wip(vue): create Vue wrapper SDK and an example for it #21
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
Conversation
a7f579b
to
117a007
Compare
examples/vue-example/package.json
Outdated
"dependencies": { | ||
"vue": "^3.5.13", | ||
"@chatkitty/vue": "workspace:*", | ||
"chatkitty": "workspace:*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to depend on chatkitty
directly.
chat: (context) => ({ | ||
menuActions: [], | ||
onMounted: () => { | ||
console.log("Chat UI mounted with context:", context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can take this time to remove the miscellaneous console log statements and updateUser
example call - these are leftovers from tests and examples from the original demo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually, we'll add event hooks, etc. for folks to handle events like on mounted from chat-ui
The chat-ui is rendered server side in Phoenix. Therefore, using it in a webpage requires sending a request to the Phoenix app. To make this easier, the Vue wrapper SDK is a Vue component which automatically handles the request to the Phoenix app. This way, it can simply be added to a webpage without needing to understand how to communicate with the Phoenix app. This code contains the wrapper component and an example to show how it is used.