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

release: v1.8.0 #360

Merged
merged 2 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
## [1.8.0] (Sep 12, 2024)

### Feat:
- **File Message Support**: File attachment in messages is now supported. Of course, drag-and-drop and copy-paste actions are also supported.
- **Locale Support**: Added a `locale` option to support multiple languages for welcome messages and suggested replies. If not specified, the browser's default language will be used. (support for multilingual settings will be available in the dashboard).
- **Carousel Adapter for Function Call**: Introduced an adapter to convert function call responses into a carousel UI. Example usage is as follows:
```tsx
interface MealFunctionCallResponse {
meals: { strYoutube: string; strMeal: string; strMealThumb: string }[];
}

function isMealsResponse(response: unknown): response is MealFunctionCallResponse {
return !!response && typeof response === 'object' && 'meals' in response && Array.isArray(response.meals);
}

const App = () => {
return (
<ChatAiWidget
tools={{
functionCall: {
carouselAdapter({ response }) {
if (isMealsResponse(response)) {
return response.meals.map((it) => ({
title: it.strMeal, // Carousel card title
featured_image: it.strMealThumb, // Carousel card image
url: it.strYoutube, // URL to open when the carousel card is clicked
}));
}

return [];
},
},
}}
/>
);
};
```

## [1.7.10] (Aug 29, 2024)
### Update:
- Improved user interface and experience of form message feature
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sendbird/chat-ai-widget",
"version": "1.7.10",
"version": "1.8.0",
"description": "Sendbird Chat AI Widget,\n Detailed documentation can be found at https://github.com/sendbird/chat-ai-widget#readme",
"main": "./dist/index.umd.js",
"module": "./dist/index.es.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/self-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"format": "npm run prettier:fix && npm run lint:fix"
},
"dependencies": {
"@sendbird/chat-ai-widget": "1.7.10",
"@sendbird/chat-ai-widget": "1.8.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3259,7 +3259,7 @@ __metadata:
languageName: node
linkType: hard

"@sendbird/chat-ai-widget@npm:1.7.10, @sendbird/chat-ai-widget@workspace:.":
"@sendbird/chat-ai-widget@npm:1.8.0, @sendbird/chat-ai-widget@workspace:.":
version: 0.0.0-use.local
resolution: "@sendbird/chat-ai-widget@workspace:."
dependencies:
Expand Down Expand Up @@ -15956,7 +15956,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "self-service@workspace:packages/self-service"
dependencies:
"@sendbird/chat-ai-widget": "npm:1.7.10"
"@sendbird/chat-ai-widget": "npm:1.8.0"
"@types/react": "npm:^18.0.37"
"@types/react-dom": "npm:^18.0.11"
"@vitejs/plugin-react": "npm:^4.2.1"
Expand Down