@glodon-aiot/bot-client-sdk 3.26.0-alpha.5 → 3.26.0-alpha.9
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/README.md +20 -37
- package/dist/es/AgentSession.mjs +32 -33
- package/dist/es/DialogSession.mjs +39 -40
- package/dist/es/Session.mjs +71 -63
- package/dist/es/builtinTools/createBuiltinToolsPlugin.mjs +136 -128
- package/dist/es/localFiles/adapters/HostBridgeAdapter.mjs +102 -178
- package/dist/es/localFiles/host/connectHostBridge.mjs +38 -39
- package/dist/es/localFiles/host/protocol.mjs +1 -1
- package/dist/es/localFiles/host/sandboxClient.mjs +324 -0
- package/dist/es/localFiles/host/sandboxFrames.mjs +21 -0
- package/dist/es/package.json.mjs +2 -2
- package/dist/lib/index.js +43 -42
- package/dist/src/Session.d.ts +4 -0
- package/dist/src/builtinTools/command.d.ts +2 -0
- package/dist/src/localFiles/adapters/HostBridgeAdapter.d.ts +14 -20
- package/dist/src/localFiles/host/protocol.d.ts +16 -22
- package/dist/src/localFiles/host/sandboxClient.d.ts +62 -0
- package/dist/src/localFiles/host/sandboxFrames.d.ts +9 -0
- package/package.json +2 -2
package/dist/es/Session.mjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
var
|
|
1
|
+
var T = Object.defineProperty, C = Object.defineProperties;
|
|
2
2
|
var M = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var E = Object.getOwnPropertySymbols;
|
|
4
4
|
var R = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var b = (l, e, t) => e in l ?
|
|
5
|
+
var b = (l, e, t) => e in l ? T(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t, f = (l, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
7
|
R.call(e, t) && b(l, t, e[t]);
|
|
8
8
|
if (E)
|
|
9
9
|
for (var t of E(e))
|
|
10
10
|
O.call(e, t) && b(l, t, e[t]);
|
|
11
11
|
return l;
|
|
12
|
-
}, I = (l, e) =>
|
|
12
|
+
}, I = (l, e) => C(l, M(e));
|
|
13
13
|
var p = (l, e, t) => (b(l, typeof e != "symbol" ? e + "" : e, t), t);
|
|
14
|
-
var c = (l, e, t) => new Promise((s,
|
|
14
|
+
var c = (l, e, t) => new Promise((s, a) => {
|
|
15
15
|
var n = (i) => {
|
|
16
16
|
try {
|
|
17
17
|
r(t.next(i));
|
|
18
18
|
} catch (h) {
|
|
19
|
-
|
|
19
|
+
a(h);
|
|
20
20
|
}
|
|
21
21
|
}, d = (i) => {
|
|
22
22
|
try {
|
|
23
23
|
r(t.throw(i));
|
|
24
24
|
} catch (h) {
|
|
25
|
-
|
|
25
|
+
a(h);
|
|
26
26
|
}
|
|
27
27
|
}, r = (i) => i.done ? s(i.value) : Promise.resolve(i.value).then(n, d);
|
|
28
28
|
r((t = t.apply(l, e)).next());
|
|
@@ -47,7 +47,7 @@ class te {
|
|
|
47
47
|
* @param _application - 应用信息,可选参数。
|
|
48
48
|
* @param client - Bot 客户端实例,可选参数。
|
|
49
49
|
*/
|
|
50
|
-
constructor(e, t = "", s,
|
|
50
|
+
constructor(e, t = "", s, a, n, d) {
|
|
51
51
|
p(this, "_id");
|
|
52
52
|
p(this, "_frozen", !1);
|
|
53
53
|
//是否可发送新问题
|
|
@@ -72,13 +72,13 @@ class te {
|
|
|
72
72
|
p(this, "_dataLoading", !1);
|
|
73
73
|
p(this, "_dataLoaded", !1);
|
|
74
74
|
p(this, "_mcpServers", null);
|
|
75
|
-
this.token = e, this.lazyload =
|
|
75
|
+
this.token = e, this.lazyload = a, this.client = d || null, this._applicationId = z(e).rid || S.applicationId, this.cvforceApi = this.getService(), n && (this._application = n), this.event.emit("init", {
|
|
76
76
|
applicationId: this._applicationId,
|
|
77
77
|
sessionId: t
|
|
78
78
|
}), this.loadApplicationInfo().then(() => {
|
|
79
79
|
var r;
|
|
80
80
|
if (t)
|
|
81
|
-
this._id = t, this.event.emit("data:loading"), s ? (this.data = s,
|
|
81
|
+
this._id = t, this.event.emit("data:loading"), s ? (this.data = s, a || (this._dataLoading = !0, this.cvforceApi.getSession(this.applicationId, t).then((i) => c(this, null, function* () {
|
|
82
82
|
this.data = i, this._promptVariables = yield this.cvforceApi.getApplicationIdSessionIdPromptVariables(this.applicationId, t);
|
|
83
83
|
})).then(() => c(this, null, function* () {
|
|
84
84
|
this.messages = [], yield this.fetchMessages(), this.event.emit("data:loaded", this.data), this.event.emit("data:updated", this.data);
|
|
@@ -114,8 +114,8 @@ class te {
|
|
|
114
114
|
yield (() => {
|
|
115
115
|
if (s != null && s.promptVariables) {
|
|
116
116
|
const y = this._promptVariables.map((v) => {
|
|
117
|
-
var _,
|
|
118
|
-
const w = ((
|
|
117
|
+
var _, o;
|
|
118
|
+
const w = ((o = (_ = s.promptVariables) == null ? void 0 : _.find((g) => g.key === v.key && g.type === v.type)) == null ? void 0 : o.value) || "";
|
|
119
119
|
return I(f({}, v), {
|
|
120
120
|
value: w
|
|
121
121
|
});
|
|
@@ -175,12 +175,12 @@ class te {
|
|
|
175
175
|
return c(this, null, function* () {
|
|
176
176
|
if (!this.data)
|
|
177
177
|
throw Error("session data is not loaded");
|
|
178
|
-
if ((e || []).some((
|
|
178
|
+
if ((e || []).some((a) => Array.isArray(a.fileIds) && a.fileIds.length === 0))
|
|
179
179
|
throw Error("fileIds cannot be an empty array");
|
|
180
|
-
if ((e || []).reduce((
|
|
180
|
+
if ((e || []).reduce((a, n) => {
|
|
181
181
|
var r, i;
|
|
182
182
|
const d = (i = (r = n.fileIds) == null ? void 0 : r.length) != null ? i : 0;
|
|
183
|
-
return
|
|
183
|
+
return a + (d > 0 ? d : 1);
|
|
184
184
|
}, 0) > V)
|
|
185
185
|
throw Error(`knowledges and fileIds total count cannot exceed ${V}`);
|
|
186
186
|
return yield this.cvforceApi.patchSessionsId(this._applicationId, this.data.id, {
|
|
@@ -241,12 +241,12 @@ class te {
|
|
|
241
241
|
*/
|
|
242
242
|
setNetOpen(e) {
|
|
243
243
|
return c(this, null, function* () {
|
|
244
|
-
var t, s,
|
|
244
|
+
var t, s, a;
|
|
245
245
|
if (u.log("setNetOpen:", e), u.log("application arrange setting value: ", (t = this._application) == null ? void 0 : t.arrange[0].enableNetOpen), ((s = this._application) == null ? void 0 : s.type) === Q.Agent) {
|
|
246
246
|
console.warn("Agent Application Sessions are disabled to setNetOpen.");
|
|
247
247
|
return;
|
|
248
248
|
}
|
|
249
|
-
if (((
|
|
249
|
+
if (((a = this._application) == null ? void 0 : a.arrange[0].enableNetOpen) === !1) {
|
|
250
250
|
console.warn("This Application is disabled to change netOpen.");
|
|
251
251
|
return;
|
|
252
252
|
}
|
|
@@ -290,7 +290,7 @@ class te {
|
|
|
290
290
|
*/
|
|
291
291
|
fetchMessages() {
|
|
292
292
|
return c(this, arguments, function* (e = {}) {
|
|
293
|
-
var s,
|
|
293
|
+
var s, a;
|
|
294
294
|
const t = {
|
|
295
295
|
pageSize: this._loadingMessagesSize
|
|
296
296
|
};
|
|
@@ -299,7 +299,7 @@ class te {
|
|
|
299
299
|
const n = yield this.cvforceApi.getChatHistorySessionId(this._applicationId, this._id, e), d = n.map((i, h) => {
|
|
300
300
|
var v, w;
|
|
301
301
|
let m = [], y;
|
|
302
|
-
return typeof ((v = i.agentHistoryList) == null ? void 0 : v.agentList) == "string" && (m = JSON.parse(i.agentHistoryList.agentList).reduce((
|
|
302
|
+
return typeof ((v = i.agentHistoryList) == null ? void 0 : v.agentList) == "string" && (m = JSON.parse(i.agentHistoryList.agentList).reduce((o, g) => (o[g.data.step - 1] || (o[g.data.step - 1] = []), o[g.data.step - 1].push(g), o), [])), h === n.length - 1 && (y = (w = this.data) == null ? void 0 : w.lastRelatedQuestion), I(f({}, i), {
|
|
303
303
|
actions: m,
|
|
304
304
|
relatedQuesion: y,
|
|
305
305
|
fromHistory: !0
|
|
@@ -319,7 +319,7 @@ class te {
|
|
|
319
319
|
this.messages.splice(i, h - i + 1, ...d);
|
|
320
320
|
}
|
|
321
321
|
const r = this.messages[this.messages.length - 1];
|
|
322
|
-
return r && !r.relatedQuesion && (r.relatedQuesion = (
|
|
322
|
+
return r && !r.relatedQuesion && (r.relatedQuesion = (a = this.data) == null ? void 0 : a.lastRelatedQuestion), this.event.emit("history:moreloaded", d), u.log("history:loaded", this.messages), this.event.emit("history:loaded", this.messages), this._loadingMessages = !1, d;
|
|
323
323
|
} else {
|
|
324
324
|
const n = new Error(
|
|
325
325
|
"session id is not defined"
|
|
@@ -401,6 +401,14 @@ class te {
|
|
|
401
401
|
inactivate(e = !1) {
|
|
402
402
|
return this.socket ? this._frozen ? (e || (this.inactivating = !0), this.activing = !1, !0) : (this.socket.close(), this.socket = null, this.event.emit("inactivated"), this.active = !1, this.activing = !1, !0) : (this.activing = !1, !0);
|
|
403
403
|
}
|
|
404
|
+
/**
|
|
405
|
+
* 会话标题摘要开关。应用详情返回布尔值时用该值,字段缺失时默认开启。
|
|
406
|
+
*/
|
|
407
|
+
resolveEnableTitleSummary() {
|
|
408
|
+
var t, s, a;
|
|
409
|
+
const e = (a = (s = (t = this.application) == null ? void 0 : t.arrange) == null ? void 0 : s[0]) == null ? void 0 : a.autoGenerateSessionTitle;
|
|
410
|
+
return typeof e == "boolean" ? e : !0;
|
|
411
|
+
}
|
|
404
412
|
//TODO: remove mcp server
|
|
405
413
|
// abstract removeMcpServers(mcpServers: MCPConfig): Promise<boolean>;
|
|
406
414
|
get dataLoaded() {
|
|
@@ -416,42 +424,42 @@ class te {
|
|
|
416
424
|
var _;
|
|
417
425
|
try {
|
|
418
426
|
this.validateConfigs();
|
|
419
|
-
} catch (
|
|
420
|
-
console.error(
|
|
427
|
+
} catch (o) {
|
|
428
|
+
console.error(o);
|
|
421
429
|
}
|
|
422
430
|
const {
|
|
423
|
-
stream:
|
|
431
|
+
stream: a = S.stream,
|
|
424
432
|
referenceFirst: n = !1
|
|
425
433
|
} = t, d = e.uuid || x(), r = ((_ = e.text) == null ? void 0 : _.trim()) || "", i = e.files || [], h = e.fileIds, m = e.imageContent;
|
|
426
434
|
if (!r && !i.length && !(h != null && h.length)) {
|
|
427
|
-
const
|
|
435
|
+
const o = new Error(
|
|
428
436
|
"failed at sending empty content"
|
|
429
437
|
/* SendingEmptyContent */
|
|
430
438
|
// {
|
|
431
439
|
// cause: SESSION_ERROR_CAUSE[SessionErrors.SendingEmptyContent],
|
|
432
440
|
// }
|
|
433
441
|
);
|
|
434
|
-
return u.error(
|
|
442
|
+
return u.error(o), this.event.emit("error", o), !1;
|
|
435
443
|
}
|
|
436
444
|
if (!this._id) {
|
|
437
|
-
const
|
|
445
|
+
const o = new Error(
|
|
438
446
|
"session id is not defined"
|
|
439
447
|
/* IdUndefined */
|
|
440
448
|
// {
|
|
441
449
|
// cause: SESSION_ERROR_CAUSE[SessionErrors.IdUndefined],
|
|
442
450
|
// }
|
|
443
451
|
);
|
|
444
|
-
return u.error(
|
|
452
|
+
return u.error(o), this.event.emit("error", o), !1;
|
|
445
453
|
}
|
|
446
454
|
if (this.frozen) {
|
|
447
|
-
const
|
|
455
|
+
const o = new Error(
|
|
448
456
|
"session is frozen"
|
|
449
457
|
/* Frozen */
|
|
450
458
|
// {
|
|
451
459
|
// cause: { code: -1, message: 'session is frozen.' },
|
|
452
460
|
// }
|
|
453
461
|
);
|
|
454
|
-
return u.error(
|
|
462
|
+
return u.error(o), this.event.emit("error", o), !1;
|
|
455
463
|
}
|
|
456
464
|
this.frozen = !0, this._stopAnswer = !1;
|
|
457
465
|
const y = {
|
|
@@ -466,44 +474,44 @@ class te {
|
|
|
466
474
|
imageContent: m
|
|
467
475
|
}, v = {
|
|
468
476
|
content: r,
|
|
469
|
-
stream:
|
|
477
|
+
stream: a,
|
|
470
478
|
requestId: d,
|
|
471
479
|
fileIds: h,
|
|
472
480
|
referenceFirst: n,
|
|
473
481
|
imageContent: m
|
|
474
482
|
};
|
|
475
483
|
this.pushMessage(y), this.event.emit("question:content", r);
|
|
476
|
-
const w = (
|
|
477
|
-
if (
|
|
484
|
+
const w = (o) => c(this, null, function* () {
|
|
485
|
+
if (o.role !== A.Robot)
|
|
478
486
|
return;
|
|
479
|
-
switch (this.removeEventListener("answer:finish", w), this._id &&
|
|
480
|
-
finialMessage:
|
|
487
|
+
switch (this.removeEventListener("answer:finish", w), this._id && o.content && o.index && o.index < 0 && (this.data = yield this.cvforceApi.patchSessionsId(this.applicationId, this._id, {
|
|
488
|
+
finialMessage: o.content
|
|
481
489
|
}), this.event.emit("data:updated", this.data), this.event.emit("data:updated:finialMessage", {
|
|
482
|
-
finialMessage:
|
|
483
|
-
})), yield this.fillMessageReference(
|
|
490
|
+
finialMessage: o.content
|
|
491
|
+
})), yield this.fillMessageReference(o), o.code) {
|
|
484
492
|
case 11915:
|
|
485
|
-
|
|
493
|
+
o.content = "请您换个问题问我吧~", o.index = -1, o.isSensitive = !0, o.isLoading = !1, o.sessionId = this._id || "", this.event.emit("message:error", o);
|
|
486
494
|
break;
|
|
487
495
|
case 11916:
|
|
488
|
-
|
|
496
|
+
o.content = "尊敬的用户您好,让我们换个话题再聊聊吧。", o.index = -1, o.isSensitive = !0, o.isLoading = !1, o.sessionId = this._id || "", this.event.emit("message:error", o);
|
|
489
497
|
break;
|
|
490
498
|
case 200:
|
|
491
|
-
|
|
499
|
+
o.index = -1, o.isLoading = !1;
|
|
492
500
|
break;
|
|
493
501
|
default:
|
|
494
|
-
|
|
502
|
+
o.content = o.message || "未知错误", o.isLoading = !1, o.index = -1, this.event.emit("message:error", o);
|
|
495
503
|
}
|
|
496
|
-
this.getRelatedQuesion(
|
|
504
|
+
this.getRelatedQuesion(o), o.isLoading = !1;
|
|
497
505
|
let g = this.messages[this.messages.length - 1];
|
|
498
506
|
if (g && g.role === A.Robot) {
|
|
499
|
-
const k = f(f({}, g),
|
|
507
|
+
const k = f(f({}, g), o);
|
|
500
508
|
this.messages[this.messages.length - 1] = k, this.event.emit("message:updated", k);
|
|
501
509
|
} else
|
|
502
|
-
this.pushMessage(
|
|
510
|
+
this.pushMessage(o);
|
|
503
511
|
this.frozen = !1;
|
|
504
512
|
});
|
|
505
513
|
return this.addEventListener("answer:finish", w), this.sendQuestion(v, I(f({}, t), {
|
|
506
|
-
stream:
|
|
514
|
+
stream: a,
|
|
507
515
|
referenceFirst: n
|
|
508
516
|
})), y;
|
|
509
517
|
});
|
|
@@ -525,10 +533,10 @@ class te {
|
|
|
525
533
|
if (s === null)
|
|
526
534
|
return e;
|
|
527
535
|
this.event.emit("message:relatedQuesion:loading", e);
|
|
528
|
-
const
|
|
536
|
+
const a = yield this.cvforceApi.postGeneques({
|
|
529
537
|
content: s
|
|
530
538
|
}).catch((h) => null);
|
|
531
|
-
if (!
|
|
539
|
+
if (!a) {
|
|
532
540
|
const h = [], m = I(f({}, e), {
|
|
533
541
|
relatedQuesion: h,
|
|
534
542
|
index: -3,
|
|
@@ -538,7 +546,7 @@ class te {
|
|
|
538
546
|
relatedQuesion: h
|
|
539
547
|
}), this.event.emit("message:updated", m), m;
|
|
540
548
|
}
|
|
541
|
-
const n = (i =
|
|
549
|
+
const n = (i = a.content) == null ? void 0 : i.split("*").map(F).map(N).filter((h) => !!h);
|
|
542
550
|
e.relatedQuesion = n, e.index = -3, e.isLoading = !1;
|
|
543
551
|
const d = I(f({}, e), {
|
|
544
552
|
relatedQuesion: n,
|
|
@@ -554,7 +562,7 @@ class te {
|
|
|
554
562
|
return c(this, null, function* () {
|
|
555
563
|
try {
|
|
556
564
|
const t = yield Promise.all(e.reference.map((s) => this.cvforceApi.getKnowledgeIdFileId(s.knowledgeId, s.docId)));
|
|
557
|
-
e.reference = e.reference.map((s,
|
|
565
|
+
e.reference = e.reference.map((s, a) => f(f({}, s), t[a]));
|
|
558
566
|
} catch (t) {
|
|
559
567
|
console.error("Failed to fill message reference:", t);
|
|
560
568
|
}
|
|
@@ -572,14 +580,14 @@ class te {
|
|
|
572
580
|
const {
|
|
573
581
|
stream: s = S.stream
|
|
574
582
|
} = e;
|
|
575
|
-
let
|
|
576
|
-
t.role !== A.User && (
|
|
583
|
+
let a;
|
|
584
|
+
t.role !== A.User && (a = e.oldMessageId || t.messageId, this.messages.splice(this.messages.length - 1, 1), this.event.emit("message:remove", t), this.event.emit("history:remove", t));
|
|
577
585
|
const n = this.messages[this.messages.length - 1], d = {
|
|
578
586
|
content: n.content,
|
|
579
587
|
fileIds: n.fileIds,
|
|
580
588
|
requestId: n.messageId,
|
|
581
589
|
stream: s,
|
|
582
|
-
oldMessageId:
|
|
590
|
+
oldMessageId: a
|
|
583
591
|
}, r = (i) => c(this, null, function* () {
|
|
584
592
|
if (i.role === A.Robot && i.index === -1) {
|
|
585
593
|
switch (this._id && i.content && i.index && i.index < 0 && (this.data = yield this.cvforceApi.patchSessionsId(this.applicationId, this._id, {
|
|
@@ -652,9 +660,9 @@ class te {
|
|
|
652
660
|
if (e.index === -2)
|
|
653
661
|
return;
|
|
654
662
|
if (e.actions) {
|
|
655
|
-
const
|
|
656
|
-
if (
|
|
657
|
-
const n =
|
|
663
|
+
const a = e.actions[((s = e.actions) == null ? void 0 : s.length) - 1];
|
|
664
|
+
if (a) {
|
|
665
|
+
const n = a[a.length - 1];
|
|
658
666
|
if (n && (n.type === "BEFORE_CALL" || n.type === "FUNCTION_CALL")) {
|
|
659
667
|
const {
|
|
660
668
|
pluginName: d,
|
|
@@ -662,7 +670,7 @@ class te {
|
|
|
662
670
|
funcCode: i,
|
|
663
671
|
funcName: h
|
|
664
672
|
} = n.data;
|
|
665
|
-
|
|
673
|
+
a.push({
|
|
666
674
|
data: {
|
|
667
675
|
pluginName: d,
|
|
668
676
|
pluginCode: r,
|
|
@@ -673,7 +681,7 @@ class te {
|
|
|
673
681
|
type: "ABORT"
|
|
674
682
|
}), this.event.emit("message:action", {
|
|
675
683
|
messageId: e.messageId,
|
|
676
|
-
action:
|
|
684
|
+
action: a
|
|
677
685
|
});
|
|
678
686
|
}
|
|
679
687
|
}
|
|
@@ -692,7 +700,7 @@ class te {
|
|
|
692
700
|
var d;
|
|
693
701
|
if (!e.data)
|
|
694
702
|
return;
|
|
695
|
-
const s = e.data.type,
|
|
703
|
+
const s = e.data.type, a = e.data.payload;
|
|
696
704
|
t.isReplying = !0;
|
|
697
705
|
const n = () => {
|
|
698
706
|
if (!t.searchingStatus) {
|
|
@@ -704,22 +712,22 @@ class te {
|
|
|
704
712
|
return;
|
|
705
713
|
}
|
|
706
714
|
};
|
|
707
|
-
if (s === "error" && (t.index = -1), s === "beforeSearch" && n(), s === "searchOver" && n(), s === "search" && t.searchReference.push(
|
|
715
|
+
if (s === "error" && (t.index = -1), s === "beforeSearch" && n(), s === "searchOver" && n(), s === "search" && t.searchReference.push(a), s === "thinking") {
|
|
708
716
|
t.thinkingStatus = "start";
|
|
709
|
-
const i =
|
|
717
|
+
const i = a.choices[0];
|
|
710
718
|
t.reasoningContent = (t.reasoningContent || "") + ((d = i.delta.reasoningContent) != null ? d : "");
|
|
711
719
|
}
|
|
712
720
|
if (s === "thinkingOver") {
|
|
713
721
|
t.thinkingStatus = "end";
|
|
714
|
-
const r =
|
|
722
|
+
const r = a.thinkingSecs;
|
|
715
723
|
t.thinkingSecs = r;
|
|
716
724
|
}
|
|
717
725
|
if (s === "text") {
|
|
718
|
-
const i =
|
|
726
|
+
const i = a.choices[0];
|
|
719
727
|
t.content = (t.content || "") + i.delta.content;
|
|
720
728
|
}
|
|
721
|
-
if (s === "reference" && (t.reference =
|
|
722
|
-
const r =
|
|
729
|
+
if (s === "reference" && (t.reference = a), s === "updateSession" && a && this.data && (this.data = f(f({}, this.data), a), this.event.emit("data:updated", this.data)), s === "result") {
|
|
730
|
+
const r = a.messageId, i = a.llmModel, h = a.messageTime;
|
|
723
731
|
t.messageId = r, t.llmModel = i, t.messageTime = h;
|
|
724
732
|
}
|
|
725
733
|
s === "over" ? t.index = -1 : (t.code = e.code, t.message = e.message);
|
|
@@ -746,7 +754,7 @@ class te {
|
|
|
746
754
|
if (!this._applicationId || !this._id)
|
|
747
755
|
throw Error("session is not avalible. id is undefined");
|
|
748
756
|
return this.cvforceApi.postComments(this._applicationId, this._id, e).then((t) => {
|
|
749
|
-
const s = this.messages.find((
|
|
757
|
+
const s = this.messages.find((a) => a.messageId === e.messageId);
|
|
750
758
|
return s && (s.comment = e, this.event.emit("message:comment", s)), t;
|
|
751
759
|
});
|
|
752
760
|
});
|