Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

release: v1.8.0 #360

Merged
merged 2 commits into from
Sep 12, 2024
Merged
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
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",
2 changes: 1 addition & 1 deletion packages/self-service/package.json
Original file line number Diff line number Diff line change
@@ -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"
},
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -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:
@@ -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"