@figoailabs/figochat-capacitor 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/Package.swift +1 -1
- package/README.md +6 -4
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/figolabs/figochat/capacitor/FigoChatPlugin.kt +1 -2
- package/dist/esm/definitions.d.ts +5 -4
- package/ios/Sources/FigoChatPlugin/FigoChatPlugin.swift +1 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
- **Breaking:** `title` and `welcomeMessage` are removed from `initialize`. The header title, welcome message and waiting message now come from the chatbot's settings in the FigoChat admin (**Persona** or **Name**, **Welcome Message**, **Choose a Waiting Message**), loaded from the new `GET /api/v1/sdk/assistant/{assistantId}` API.
|
|
6
|
+
- New `firstCustomerMessage` option: sent for the customer as soon as `initialize` runs. The chat opens with it and its reply, and continues the same thread.
|
|
7
|
+
- While a reply is on its way, the chatbot's waiting message shows on the left with animated dots.
|
|
8
|
+
- Uses the native FigoChat SDKs 2.0.0 (figochat-ios and figochat-android).
|
|
9
|
+
|
|
3
10
|
## 1.1.0
|
|
4
11
|
|
|
5
12
|
- First release: FigoChat for Capacitor 8 (Ionic Angular, React, Vue).
|
package/Package.swift
CHANGED
|
@@ -10,7 +10,7 @@ let package = Package(
|
|
|
10
10
|
],
|
|
11
11
|
dependencies: [
|
|
12
12
|
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0"),
|
|
13
|
-
.package(url: "https://github.com/figoailabs/figochat-ios.git", from: "
|
|
13
|
+
.package(url: "https://github.com/figoailabs/figochat-ios.git", from: "2.0.0"),
|
|
14
14
|
],
|
|
15
15
|
targets: [
|
|
16
16
|
.target(
|
package/README.md
CHANGED
|
@@ -69,8 +69,8 @@ await FigoChat.initialize({
|
|
|
69
69
|
emailAddress: 'ada@example.com',
|
|
70
70
|
mobilePhone: '+2348012345678',
|
|
71
71
|
primaryColor: '#F97316',
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
// optional: send the customer's first question for them
|
|
73
|
+
firstCustomerMessage: 'Where is my order #1042?',
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
// from a button
|
|
@@ -135,8 +135,7 @@ export class ChatService {
|
|
|
135
135
|
| `assistantId` | ✓ | **AI Chatbots** → your chatbot → **Assistant ID** |
|
|
136
136
|
| `fullName`, `emailAddress`, `mobilePhone` | ✓ | The signed-in user; phone ideally in international format |
|
|
137
137
|
| `primaryColor` | ✓ | Brand color as hex, e.g. `#F97316` |
|
|
138
|
-
| `
|
|
139
|
-
| `welcomeMessage` | | First assistant message. HTML is rendered |
|
|
138
|
+
| `firstCustomerMessage` | | Sent for the customer as soon as `initialize` runs; the chat opens with it and its reply |
|
|
140
139
|
| `threadId` | | Resume an earlier conversation |
|
|
141
140
|
| `maxFiles` | | Most files per message. Defaults to 5 |
|
|
142
141
|
| `maxFileSizeMB` | | Largest file. Defaults to 10 |
|
|
@@ -144,6 +143,9 @@ export class ChatService {
|
|
|
144
143
|
| `timeout` | | Request timeout in milliseconds. Defaults to 120000 |
|
|
145
144
|
| `baseUrl` | | API host. Defaults to `https://api.figolabs.ai` |
|
|
146
145
|
|
|
146
|
+
The header title, welcome message and waiting message come from the chatbot's settings in the FigoChat admin (**AI Chatbots** → your chatbot → **Edit**: **Persona** or **Name**, **Welcome Message**, **Choose a Waiting Message**), so they aren't passed to `initialize`. `firstCustomerMessage` is sent for the customer straight away; the chat opens with it and its reply, and continues the same thread.
|
|
147
|
+
|
|
148
|
+
|
|
147
149
|
### Errors
|
|
148
150
|
|
|
149
151
|
Calls reject with a `code`:
|
package/android/build.gradle
CHANGED
|
@@ -52,5 +52,5 @@ repositories {
|
|
|
52
52
|
dependencies {
|
|
53
53
|
implementation project(':capacitor-android')
|
|
54
54
|
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
55
|
-
implementation 'com.github.figoailabs:figochat-android:
|
|
55
|
+
implementation 'com.github.figoailabs:figochat-android:2.0.0'
|
|
56
56
|
}
|
|
@@ -42,8 +42,7 @@ class FigoChatPlugin : Plugin() {
|
|
|
42
42
|
assistantId = call.getString("assistantId") ?: "",
|
|
43
43
|
primaryColor = call.getString("primaryColor") ?: "",
|
|
44
44
|
baseUrl = call.getString("baseUrl") ?: "https://api.figolabs.ai",
|
|
45
|
-
|
|
46
|
-
welcomeMessage = call.getString("welcomeMessage"),
|
|
45
|
+
firstCustomerMessage = call.getString("firstCustomerMessage"),
|
|
47
46
|
threadId = call.getString("threadId"),
|
|
48
47
|
maxFiles = call.getInt("maxFiles") ?: 5,
|
|
49
48
|
maxFileSizeMB = call.getInt("maxFileSizeMB") ?: 10,
|
|
@@ -15,10 +15,11 @@ export interface FigoChatOptions {
|
|
|
15
15
|
primaryColor: string;
|
|
16
16
|
/** API host. Defaults to `https://api.figolabs.ai`. */
|
|
17
17
|
baseUrl?: string;
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
/**
|
|
19
|
+
* A message to send on the customer's behalf as soon as `initialize` runs, for example the question they typed
|
|
20
|
+
* on your own screen. The reply and the thread are kept, so the chat opens with both and continues from there.
|
|
21
|
+
*/
|
|
22
|
+
firstCustomerMessage?: string;
|
|
22
23
|
/** Resume an earlier conversation with the value from `getThreadId()`. */
|
|
23
24
|
threadId?: string;
|
|
24
25
|
/** Most files per message. Defaults to 5. */
|
|
@@ -39,8 +39,7 @@ public class FigoChatPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
39
39
|
assistantId: call.getString("assistantId") ?? "",
|
|
40
40
|
primaryColor: call.getString("primaryColor") ?? "",
|
|
41
41
|
baseURL: baseURL,
|
|
42
|
-
|
|
43
|
-
welcomeMessage: call.getString("welcomeMessage"),
|
|
42
|
+
firstCustomerMessage: call.getString("firstCustomerMessage"),
|
|
44
43
|
threadId: call.getString("threadId"),
|
|
45
44
|
maxFiles: call.getInt("maxFiles") ?? 5,
|
|
46
45
|
maxFileSizeMB: call.getInt("maxFileSizeMB") ?? 10,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@figoailabs/figochat-capacitor",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "FigoChat for Capacitor and Ionic apps (Angular, React, Vue): a native AI assistant chat with voice notes, file uploads and live agents, built on the FigoChat iOS and Android SDKs.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|