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.
@@ -30946,7 +30946,7 @@ class ChatClientMgr {
30946
30946
  }
30947
30947
  }
30948
30948
  onChatAIReady(event) {
30949
- let robotID = this.lastRobotID;
30949
+ let robotID = this.chatAIClient.lastRobotID;
30950
30950
  let robotInfo = this.getAIRobotInfoByID(robotID);
30951
30951
  console.log(`[AI chat] ${robotInfo.name}已经就绪:`, event);
30952
30952
  if (this.chatAIClient) {
@@ -30976,9 +30976,9 @@ class ChatClientMgr {
30976
30976
  }
30977
30977
  async sendMessageToChatServer(robotID, messageOption) {
30978
30978
  let robotInfo = this.getAIRobotInfoByID(robotID);
30979
- if (this.lastRobotID != robotID) {
30979
+ if (this.chatAIClient.lastRobotID != robotID) {
30980
30980
  console.log(`[AI chat]需要新机器人回答,切换到新机器人${robotInfo.name}`);
30981
- if (this.lastRobotID) {
30981
+ if (this.chatAIClient.lastRobotID) {
30982
30982
  await this.chatAIClient.logout();
30983
30983
  }
30984
30984
  await this.chatAIClient.login({
@@ -30986,7 +30986,7 @@ class ChatClientMgr {
30986
30986
  userSig: robotInfo.userSig
30987
30987
  });
30988
30988
  }
30989
- this.lastRobotID = robotID;
30989
+ this.chatAIClient.lastRobotID = robotID;
30990
30990
  if (this.chatAIClient && this.chatAIClient.isReady()) {
30991
30991
  let new_message = await this.chatAIClient.createTextMessage(messageOption);
30992
30992
  this.chatAIClient.sendMessage(new_message).then(res => {