Skip to content

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

Merged
merged 8 commits into from
Mar 19, 2025

Conversation

KevinGrafstrom
Copy link
Collaborator

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.

"dependencies": {
"vue": "^3.5.13",
"@chatkitty/vue": "workspace:*",
"chatkitty": "workspace:*"
Copy link
Member

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);
Copy link
Member

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.

Copy link
Member

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

@aerovulpe aerovulpe merged commit a70ac80 into main Mar 19, 2025
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

Successfully merging this pull request may close these issues.

2 participants