@blueking/chat-helper 0.0.9 → 0.0.10-beta.1

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.
@@ -25,4 +25,5 @@ export declare const useSession: (fetchClient: FetchClient) => {
25
25
  uploadFile: (sessionCode: string, file: File, config?: IRequestConfig) => Promise<{
26
26
  download_url?: string;
27
27
  }>;
28
+ isResumeSession: (sessionCode: string, config?: IRequestConfig) => Promise<boolean>;
28
29
  };
@@ -113,6 +113,8 @@ import { transferSession2SessionApi, transferSessionApi2Session, transferSession
113
113
  }
114
114
  })));
115
115
  };
116
+ // 轮询接口,判断是否可以继续聊天
117
+ const isResumeSession = (sessionCode, config)=>fetchClient.get(`session/${sessionCode}/is_resume/`, undefined, config);
116
118
  return {
117
119
  clearSession,
118
120
  getSessions,
@@ -124,6 +126,7 @@ import { transferSession2SessionApi, transferSessionApi2Session, transferSession
124
126
  postSessionFeedback,
125
127
  getSessionFeedbackReasons,
126
128
  renameSession,
127
- uploadFile
129
+ uploadFile,
130
+ isResumeSession
128
131
  };
129
132
  };
@@ -337,6 +337,11 @@ import { ActivityType, MessageRole, MessageType } from '../../message/type.ts.js
337
337
  });
338
338
  return result;
339
339
  }
340
+ case MessageRole.Interrupt:
341
+ {
342
+ const result = _object_spread({}, baseMessage, data);
343
+ return result;
344
+ }
340
345
  }
341
346
  };
342
347
  /**
@@ -601,5 +606,10 @@ import { ActivityType, MessageRole, MessageType } from '../../message/type.ts.js
601
606
  });
602
607
  return result;
603
608
  }
609
+ case MessageRole.Interrupt:
610
+ {
611
+ const result = _object_spread({}, baseMessage, data);
612
+ return result;
613
+ }
604
614
  }
605
615
  };