@aochuang/client-sdk 1.0.381 → 1.0.382

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.
@@ -9,6 +9,7 @@
9
9
  :initialSize="initialSize"
10
10
  :minSize="270"
11
11
  :maxSize="480"
12
+ :hidePanel="hideAddon"
12
13
  @change="handleSizeChange"
13
14
  >
14
15
  <template slot="content">
@@ -41,6 +42,10 @@ export default {
41
42
  },
42
43
  hideSidebar: {
43
44
  type: Boolean
45
+ },
46
+ // 隐藏addon区域(包括拖拽条)
47
+ hideAddon: {
48
+ type: Boolean
44
49
  }
45
50
  },
46
51
  methods: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aochuang/client-sdk",
3
- "version": "1.0.381",
3
+ "version": "1.0.382",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -4,6 +4,8 @@ import { createSessionId } from './utils.js'
4
4
  import { createPollRequest } from '../../../utils/util.js'
5
5
 
6
6
  const ALL_WECHAT_ACCOUNT_ID = 'all'
7
+ const GET_SESSION_POLL_SPAN_TIME = 5 * 1000
8
+ const GET_SESSION_POLL_TIMEOUT = 10 * 60 * 1000
7
9
 
8
10
  const loopLoadAssignSessionData = (fetchFn, params) => {
9
11
  let lastPs = null
@@ -273,7 +275,7 @@ export default class ClientChatSession {
273
275
  pollRequest.lastRequestError = error && (error.message || error.errMsg || error.toString && error.toString()) || error
274
276
  return Promise.reject(error)
275
277
  })
276
- })
278
+ }, GET_SESSION_POLL_SPAN_TIME, GET_SESSION_POLL_TIMEOUT)
277
279
  pollRequest.serializeMethods = serializeMethod ? [serializeMethod] : []
278
280
  pollRequest.requestCount = 0
279
281
  pollRequest.emptyResponseCount = 0
@@ -282,7 +284,9 @@ export default class ClientChatSession {
282
284
  pollRequest.startedAt = Date.now()
283
285
  this.pollRequestMap[sessionId] = pollRequest
284
286
  this._addGetSessionLog('创建会话轮询', {
285
- sessionId
287
+ sessionId,
288
+ spanTime: GET_SESSION_POLL_SPAN_TIME,
289
+ timeout: GET_SESSION_POLL_TIMEOUT
286
290
  })
287
291
  pollRequest.ps = pollRequest.start().then(rs => {
288
292
  if (!rs.data) {
@@ -328,6 +332,8 @@ export default class ClientChatSession {
328
332
  }).catch((error) => {
329
333
  this._addGetSessionLog('会话轮询失败', {
330
334
  sessionId,
335
+ isTimeout: error === 'timeout',
336
+ timeout: GET_SESSION_POLL_TIMEOUT,
331
337
  requestCount: pollRequest.requestCount,
332
338
  emptyResponseCount: pollRequest.emptyResponseCount,
333
339
  requestErrorCount: pollRequest.requestErrorCount,