isdata-customer-sdk 0.1.60 → 0.1.61
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/dist/index.umd.js
CHANGED
|
@@ -30956,7 +30956,7 @@ class ChatClientMgr {
|
|
|
30956
30956
|
}
|
|
30957
30957
|
}
|
|
30958
30958
|
onChatAIReady(event) {
|
|
30959
|
-
let robotID = this.lastRobotID;
|
|
30959
|
+
let robotID = this.chatAIClient.lastRobotID;
|
|
30960
30960
|
let robotInfo = this.getAIRobotInfoByID(robotID);
|
|
30961
30961
|
console.log(`[AI chat] ${robotInfo.name}已经就绪:`, event);
|
|
30962
30962
|
if (this.chatAIClient) {
|
|
@@ -30986,9 +30986,9 @@ class ChatClientMgr {
|
|
|
30986
30986
|
}
|
|
30987
30987
|
async sendMessageToChatServer(robotID, messageOption) {
|
|
30988
30988
|
let robotInfo = this.getAIRobotInfoByID(robotID);
|
|
30989
|
-
if (this.lastRobotID != robotID) {
|
|
30989
|
+
if (this.chatAIClient.lastRobotID != robotID) {
|
|
30990
30990
|
console.log(`[AI chat]需要新机器人回答,切换到新机器人${robotInfo.name}`);
|
|
30991
|
-
if (this.lastRobotID) {
|
|
30991
|
+
if (this.chatAIClient.lastRobotID) {
|
|
30992
30992
|
await this.chatAIClient.logout();
|
|
30993
30993
|
}
|
|
30994
30994
|
await this.chatAIClient.login({
|
|
@@ -30996,7 +30996,7 @@ class ChatClientMgr {
|
|
|
30996
30996
|
userSig: robotInfo.userSig
|
|
30997
30997
|
});
|
|
30998
30998
|
}
|
|
30999
|
-
this.lastRobotID = robotID;
|
|
30999
|
+
this.chatAIClient.lastRobotID = robotID;
|
|
31000
31000
|
if (this.chatAIClient && this.chatAIClient.isReady()) {
|
|
31001
31001
|
let new_message = await this.chatAIClient.createTextMessage(messageOption);
|
|
31002
31002
|
this.chatAIClient.sendMessage(new_message).then(res => {
|