@aintela/chat 0.2.39 → 0.2.40
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/components.js +5872 -5681
- package/dist/components.js.map +1 -1
- package/dist/hooks.js +1 -1
- package/dist/{httpArtifactService-BpRwcTJp.js → httpArtifactService-BqcorW_s.js} +57 -56
- package/dist/{httpArtifactService-BpRwcTJp.js.map → httpArtifactService-BqcorW_s.js.map} +1 -1
- package/dist/{httpSessionService-M1IKQIQK.js → httpSessionService-CNzThf-T.js} +85 -80
- package/dist/httpSessionService-CNzThf-T.js.map +1 -0
- package/dist/index.js +190 -183
- package/dist/services.js +7 -6
- package/dist/src/components/AiChat/AiChatContext.d.ts +8 -0
- package/dist/src/components/AiChat/AiChatTypes.d.ts +29 -0
- package/dist/src/components/AiChat/ChatPane/AskUserSheet.d.ts +21 -9
- package/dist/src/components/AiChat/ChatPane/CurrentMessage.d.ts +2 -2
- package/dist/src/components/AiChat/aiChatEngine.d.ts +89 -0
- package/dist/src/components/AiChat/aiChatEngine.test.d.ts +1 -0
- package/dist/src/components/AiChat/useLiveSession.d.ts +52 -0
- package/dist/src/components/index.d.ts +6 -0
- package/dist/src/services/accessTokenProvider.d.ts +9 -0
- package/dist/src/services/httpArtifactService.d.ts +2 -1
- package/dist/src/services/httpPromptAssistService.d.ts +2 -7
- package/dist/src/services/httpSessionService.d.ts +2 -1
- package/dist/src/services/index.d.ts +2 -0
- package/dist/{useChatSessions-C-XVE-h3.js → useChatSessions-mnF6pUGm.js} +2 -2
- package/dist/{useChatSessions-C-XVE-h3.js.map → useChatSessions-mnF6pUGm.js.map} +1 -1
- package/package.json +1 -1
- package/dist/httpSessionService-M1IKQIQK.js.map +0 -1
package/dist/hooks.js
CHANGED
|
@@ -2,7 +2,7 @@ var nt = Object.defineProperty;
|
|
|
2
2
|
var gt = (O, t, e) => t in O ? nt(O, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : O[t] = e;
|
|
3
3
|
var f = (O, t) => nt(O, "name", { value: t, configurable: !0 });
|
|
4
4
|
var a = (O, t, e) => gt(O, typeof t != "symbol" ? t + "" : t, e);
|
|
5
|
-
import { d as L, t as
|
|
5
|
+
import { d as L, t as mt, E as I, k as pt, j as St, q as wt, C as B } from "./environmentUtils-CUVZ6Dq1.js";
|
|
6
6
|
import { I as _, S as ut, g as yt, L as Tt, P as x, b as It, e as Ct, T as vt, c as Et } from "./serializer-uea8YsIP.js";
|
|
7
7
|
import { unified as Mt } from "unified";
|
|
8
8
|
import Ot from "remark-parse";
|
|
@@ -10,6 +10,7 @@ import { toMarkdown as Dt } from "mdast-util-to-markdown";
|
|
|
10
10
|
import { format as At } from "date-fns";
|
|
11
11
|
import Nt from "lodash";
|
|
12
12
|
import { P as kt, C as R } from "./Prompt-DZb7OaPp.js";
|
|
13
|
+
import { r as Pt } from "./httpSessionService-CNzThf-T.js";
|
|
13
14
|
const w = {
|
|
14
15
|
ARTIFACTS: "envision-artifacts",
|
|
15
16
|
SECTIONS: "envision-sections",
|
|
@@ -198,7 +199,7 @@ const w = {
|
|
|
198
199
|
};
|
|
199
200
|
f(K, "LocalStorageService");
|
|
200
201
|
let it = K;
|
|
201
|
-
const
|
|
202
|
+
const Qt = /* @__PURE__ */ f((O) => {
|
|
202
203
|
const t = O.getPrompts(), e = t.length;
|
|
203
204
|
if (e > 0) {
|
|
204
205
|
const s = t[0].promptText, i = t[t.length - 1].promptText, n = t[0].created;
|
|
@@ -493,7 +494,7 @@ const j = class j extends J {
|
|
|
493
494
|
console.log("MockEventBusService.gatewayEmitConnectionStateChange");
|
|
494
495
|
}
|
|
495
496
|
gatewayEmitMessage(t, e) {
|
|
496
|
-
|
|
497
|
+
mt() ? process.stdout.write(`M${t.version}, `) : console.log("MockEventBusService.gatewayEmitMessage");
|
|
497
498
|
}
|
|
498
499
|
gatewayEmitTurnComplete(t, e) {
|
|
499
500
|
console.log("MockEventBusService.gatewayEmitTurnComplete");
|
|
@@ -595,21 +596,21 @@ ${n.value}
|
|
|
595
596
|
}, "cloneFunctionMap"), v = /* @__PURE__ */ f(() => {
|
|
596
597
|
o === e.parts && (o = e.parts.slice());
|
|
597
598
|
}, "clonePartsIfShared");
|
|
598
|
-
let
|
|
599
|
+
let p = !1;
|
|
599
600
|
if ((n == null ? void 0 : n.eventType) === I.FunctionClientOutput && !!((A = n.functionDetails) != null && A.id) && n) {
|
|
600
601
|
const g = n.functionDetails.id, C = n.functionDetails.clientOutput, E = o.findIndex((S) => {
|
|
601
|
-
var
|
|
602
|
-
return ((
|
|
602
|
+
var m;
|
|
603
|
+
return ((m = S.functionDetails) == null ? void 0 : m.id) === g;
|
|
603
604
|
});
|
|
604
605
|
if (E > -1) {
|
|
605
|
-
const S = o[E],
|
|
606
|
+
const S = o[E], m = {
|
|
606
607
|
...S,
|
|
607
608
|
functionDetails: {
|
|
608
609
|
...S.functionDetails,
|
|
609
610
|
clientOutput: C ?? S.functionDetails.clientOutput
|
|
610
611
|
}
|
|
611
612
|
};
|
|
612
|
-
v(), o[E] =
|
|
613
|
+
v(), o[E] = m, h(), u.set(g, m), s.push(m);
|
|
613
614
|
} else {
|
|
614
615
|
const S = {
|
|
615
616
|
...n,
|
|
@@ -626,12 +627,12 @@ ${n.value}
|
|
|
626
627
|
const S = o.findIndex((ft) => {
|
|
627
628
|
var st;
|
|
628
629
|
return ((st = ft.functionDetails) == null ? void 0 : st.id) === C;
|
|
629
|
-
}),
|
|
630
|
-
...
|
|
630
|
+
}), m = S > -1 ? o[S] : E, F = {
|
|
631
|
+
...m,
|
|
631
632
|
eventType: n.eventType,
|
|
632
633
|
functionDetails: {
|
|
633
|
-
id:
|
|
634
|
-
name: n.functionDetails.name ??
|
|
634
|
+
id: m.functionDetails.id,
|
|
635
|
+
name: n.functionDetails.name ?? m.functionDetails.name,
|
|
635
636
|
// Take the parsed args from the incoming event when
|
|
636
637
|
// present (the full FunctionCall carries them), fall
|
|
637
638
|
// back to what was already on the part. Previously
|
|
@@ -640,41 +641,41 @@ ${n.value}
|
|
|
640
641
|
// args off every full FunctionCall fold because the
|
|
641
642
|
// PartialFunctionCall stream only accumulates raw
|
|
642
643
|
// JSON in `.text` — `.args` stayed undefined.
|
|
643
|
-
args: n.functionDetails.args ??
|
|
644
|
+
args: n.functionDetails.args ?? m.functionDetails.args,
|
|
644
645
|
response: n.functionDetails.response,
|
|
645
646
|
status: n.functionDetails.status ?? "Composing",
|
|
646
|
-
start: n.functionDetails.start ??
|
|
647
|
-
end: n.functionDetails.end ??
|
|
647
|
+
start: n.functionDetails.start ?? m.functionDetails.start,
|
|
648
|
+
end: n.functionDetails.end ?? m.functionDetails.end,
|
|
648
649
|
// true-wins: a UI call has multiple reps (streaming part with isUi, the
|
|
649
650
|
// persisted FunctionCall, the result) and they interleave. `??` let a later
|
|
650
651
|
// `false`/`undefined` rep clobber an earlier `true`; OR-ing keeps it sticky.
|
|
651
|
-
isUi: n.functionDetails.isUi === !0 ||
|
|
652
|
+
isUi: n.functionDetails.isUi === !0 || m.functionDetails.isUi === !0,
|
|
652
653
|
// Keep the call's friendly args summary when the result event (which has none) folds in.
|
|
653
|
-
argsDescription: n.functionDetails.argsDescription ??
|
|
654
|
+
argsDescription: n.functionDetails.argsDescription ?? m.functionDetails.argsDescription,
|
|
654
655
|
// The tool's client-only payload rides the RESULT event; keep it sticky so a
|
|
655
656
|
// later rep without one can't clobber it. This is what a uiTool renderer reads.
|
|
656
|
-
clientOutput: n.functionDetails.clientOutput ??
|
|
657
|
+
clientOutput: n.functionDetails.clientOutput ?? m.functionDetails.clientOutput,
|
|
657
658
|
// Ask-user component ([KernelUIComponent]) — sticky like isUi/clientOutput. The
|
|
658
659
|
// streaming final CALL carries it, but the PartialFunctionCall it folds onto (and a
|
|
659
660
|
// later result rep) may not; dropping it strips the part's askUser classification so
|
|
660
661
|
// the docked drawer never surfaces (issue #60 — esp. a no-arg tool like update_profile,
|
|
661
662
|
// which has no name match to fall back on the way ask_user/askauth do).
|
|
662
|
-
askUserComponent: n.functionDetails.askUserComponent ??
|
|
663
|
-
isAskUser: n.functionDetails.isAskUser ||
|
|
663
|
+
askUserComponent: n.functionDetails.askUserComponent ?? m.functionDetails.askUserComponent,
|
|
664
|
+
isAskUser: n.functionDetails.isAskUser || m.functionDetails.isAskUser || !!(n.functionDetails.askUserComponent ?? m.functionDetails.askUserComponent),
|
|
664
665
|
// Runtime "don't render" override rides the RESULT; true-wins sticky like isUi so it
|
|
665
666
|
// survives folding onto the earlier call rep and suppresses drawer/uiTool classification.
|
|
666
|
-
cancelUi: n.functionDetails.cancelUi === !0 ||
|
|
667
|
+
cancelUi: n.functionDetails.cancelUi === !0 || m.functionDetails.cancelUi === !0
|
|
667
668
|
}
|
|
668
669
|
};
|
|
669
670
|
h(), u.set(C, F), F.eventType === I.FunctionResponse && this.eventBusService.gatewayEmitFunctionResponse(F.functionDetails), s.push(F), S > -1 && (v(), o[S] = F);
|
|
670
671
|
} else {
|
|
671
672
|
if (C && n.functionDetails && !E && (h(), u.set(C, n)), r && r.textAppendable) {
|
|
672
|
-
const
|
|
673
|
+
const m = {
|
|
673
674
|
...r,
|
|
674
675
|
ended: /* @__PURE__ */ new Date(),
|
|
675
676
|
isStillWriting: !1
|
|
676
677
|
};
|
|
677
|
-
v(), o[o.length - 1] =
|
|
678
|
+
v(), o[o.length - 1] = m, s.push(m);
|
|
678
679
|
}
|
|
679
680
|
const S = {
|
|
680
681
|
...n,
|
|
@@ -682,7 +683,7 @@ ${n.value}
|
|
|
682
683
|
isStillWriting: n.textAppendable,
|
|
683
684
|
partial: t.partial
|
|
684
685
|
};
|
|
685
|
-
(et = S.functionDetails) != null && et.silent || s.push(S), o = [...o, S],
|
|
686
|
+
(et = S.functionDetails) != null && et.silent || s.push(S), o = [...o, S], p = !0;
|
|
686
687
|
}
|
|
687
688
|
}
|
|
688
689
|
let y = o[o.length - 1] ?? null;
|
|
@@ -695,7 +696,7 @@ ${n.value}
|
|
|
695
696
|
let C = !1;
|
|
696
697
|
if (t.partial) {
|
|
697
698
|
try {
|
|
698
|
-
g.textDetails.version++,
|
|
699
|
+
g.textDetails.version++, p || (g.text = (y.text ?? "") + (n.text ?? ""));
|
|
699
700
|
} catch (E) {
|
|
700
701
|
console.error("Error here", E.toString());
|
|
701
702
|
}
|
|
@@ -716,7 +717,7 @@ ${n.value}
|
|
|
716
717
|
for (const C of t.llmArtifacts) {
|
|
717
718
|
const E = C.toArtifact();
|
|
718
719
|
g || (M = M.slice(), g = !0);
|
|
719
|
-
const S = M.findIndex((
|
|
720
|
+
const S = M.findIndex((m) => m.id === E.id);
|
|
720
721
|
S === -1 ? M.push(E) : M[S] = E;
|
|
721
722
|
}
|
|
722
723
|
}
|
|
@@ -743,9 +744,9 @@ ${n.value}
|
|
|
743
744
|
};
|
|
744
745
|
f(X, "InteractionService");
|
|
745
746
|
let $ = X;
|
|
746
|
-
const
|
|
747
|
+
const _t = 1200 * 1e3, k = class k {
|
|
747
748
|
constructor(t, e, s, i, n, r, l, o, u, d = St.Interactive) {
|
|
748
|
-
a(this, "base_production_url",
|
|
749
|
+
a(this, "base_production_url", pt() ?? "https://agent.tripapi.com.br");
|
|
749
750
|
a(this, "base_url_local", "http://localagent:8000");
|
|
750
751
|
a(this, "base_url");
|
|
751
752
|
a(this, "isLocal", !1);
|
|
@@ -1103,7 +1104,7 @@ const Pt = 1200 * 1e3, k = class k {
|
|
|
1103
1104
|
}), this.sessionState.setTurnOpen(!1);
|
|
1104
1105
|
}
|
|
1105
1106
|
async handlePing() {
|
|
1106
|
-
return Date.now() - this.lastPing.getTime() >
|
|
1107
|
+
return Date.now() - this.lastPing.getTime() > _t ? await this.ping() ? (this.lastPing = /* @__PURE__ */ new Date(), this.lastPingStatus = !0, !0) : (this.lastPingStatus = !1, !1) : (this.lastPingStatus = !0, !0);
|
|
1107
1108
|
}
|
|
1108
1109
|
async sendMessage(t, e) {
|
|
1109
1110
|
let s = this.getInteractions().length, i = _.createWaiting(!0, !0, "Overall", /* @__PURE__ */ new Date());
|
|
@@ -1171,7 +1172,7 @@ const Pt = 1200 * 1e3, k = class k {
|
|
|
1171
1172
|
};
|
|
1172
1173
|
f(k, "AgentGatewayService"), a(k, "SUSPENSION_MSG", "SUSPEND"), a(k, "CURRENT_MSG_THROTTLE_MS", 20);
|
|
1173
1174
|
let G = k;
|
|
1174
|
-
const H = 4001,
|
|
1175
|
+
const H = 4001, bt = 4002, rt = 4, Ft = 3, Rt = 500, Ut = 3e4, Lt = 2, xt = 0.2, ot = 2, Z = class Z {
|
|
1175
1176
|
constructor(t = "ws://localhost:8000", e) {
|
|
1176
1177
|
a(this, "ws", null);
|
|
1177
1178
|
a(this, "stats");
|
|
@@ -1320,7 +1321,7 @@ const H = 4001, _t = 4002, rt = 4, bt = 3, Ft = 500, Rt = 3e4, Ut = 2, Lt = 0.2,
|
|
|
1320
1321
|
}
|
|
1321
1322
|
this.isReconnecting = !1, this.reconnectAttempts = 0, this.onClose && this.onClose(T.code, T.reason);
|
|
1322
1323
|
};
|
|
1323
|
-
const v = 200,
|
|
1324
|
+
const v = 200, p = 3e4, D = 8e3, y = this.ws;
|
|
1324
1325
|
this.sessionId = void 0;
|
|
1325
1326
|
let M = 0, P = 0;
|
|
1326
1327
|
for (; !this.sessionId; ) {
|
|
@@ -1332,12 +1333,12 @@ const H = 4001, _t = 4002, rt = 4, bt = 3, Ft = 500, Rt = 3e4, Ut = 2, Lt = 0.2,
|
|
|
1332
1333
|
s("Connection closed before a session id was received");
|
|
1333
1334
|
return;
|
|
1334
1335
|
}
|
|
1335
|
-
if (y.readyState === WebSocket.CONNECTING && M >=
|
|
1336
|
+
if (y.readyState === WebSocket.CONNECTING && M >= p) {
|
|
1336
1337
|
try {
|
|
1337
1338
|
y.close();
|
|
1338
1339
|
} catch {
|
|
1339
1340
|
}
|
|
1340
|
-
s(`Server did not accept the connection within ${
|
|
1341
|
+
s(`Server did not accept the connection within ${p / 1e3}s`);
|
|
1341
1342
|
return;
|
|
1342
1343
|
}
|
|
1343
1344
|
if (y.readyState === WebSocket.OPEN && P >= D) {
|
|
@@ -1359,13 +1360,13 @@ const H = 4001, _t = 4002, rt = 4, bt = 3, Ft = 500, Rt = 3e4, Ut = 2, Lt = 0.2,
|
|
|
1359
1360
|
* - 4000-4099 reserved for app-level fatal codes from the server
|
|
1360
1361
|
*/
|
|
1361
1362
|
shouldAttemptReconnect(t) {
|
|
1362
|
-
return !(this.intentionalDisconnect || t === H || t ===
|
|
1363
|
+
return !(this.intentionalDisconnect || t === H || t === bt || t === 1e3 || t === 1008);
|
|
1363
1364
|
}
|
|
1364
1365
|
cancelPendingReconnect() {
|
|
1365
1366
|
this.reconnectTimer && (clearTimeout(this.reconnectTimer), this.reconnectTimer = null);
|
|
1366
1367
|
}
|
|
1367
1368
|
computeBackoffDelay() {
|
|
1368
|
-
const t =
|
|
1369
|
+
const t = Rt * Math.pow(Lt, this.reconnectAttempts), e = Math.min(t, Ut), s = e * xt * (Math.random() * 2 - 1);
|
|
1369
1370
|
return Math.max(0, Math.round(e + s));
|
|
1370
1371
|
}
|
|
1371
1372
|
scheduleReconnect(t, e, s) {
|
|
@@ -1650,7 +1651,7 @@ const H = 4001, _t = 4002, rt = 4, bt = 3, Ft = 500, Rt = 3e4, Ut = 2, Lt = 0.2,
|
|
|
1650
1651
|
if (!i)
|
|
1651
1652
|
throw "Server event was null";
|
|
1652
1653
|
this.events.push([(/* @__PURE__ */ new Date()).getTime(), ((s = t.text) == null ? void 0 : s.length) ?? 0]), this.stats.eventCount += 1, this.stats.totalTransfered += e.length, i.session_information && !i.subAgentId && (this.stats.sessionInformation = i.session_information), this.stats.elapsed = (Date.now() - this.stats.startTime.getTime()) / 1e3;
|
|
1653
|
-
const n = Date.now() - rt * 1e3, l = this.events.filter((o) => o[0] > n).reduce((o, u) => o += u[1], 0) /
|
|
1654
|
+
const n = Date.now() - rt * 1e3, l = this.events.filter((o) => o[0] > n).reduce((o, u) => o += u[1], 0) / Ft;
|
|
1654
1655
|
this.stats.tokensPerSecond = l / rt, this.flushStatsCoalesced(), this.onEvent && this.onEvent(i).catch((o) => {
|
|
1655
1656
|
console.error("Lost error on on-event", o);
|
|
1656
1657
|
});
|
|
@@ -1661,7 +1662,7 @@ const H = 4001, _t = 4002, rt = 4, bt = 3, Ft = 500, Rt = 3e4, Ut = 2, Lt = 0.2,
|
|
|
1661
1662
|
};
|
|
1662
1663
|
f(Z, "WebSocketConnecionV2");
|
|
1663
1664
|
let ct = Z;
|
|
1664
|
-
const
|
|
1665
|
+
const Bt = "envision_agent_sessionId", V = class V extends G {
|
|
1665
1666
|
constructor(e, s, i, n, r, l, o, u, d, h, v) {
|
|
1666
1667
|
super(e, s, i, n, r, l, o, d, v);
|
|
1667
1668
|
a(this, "suspendState", !1);
|
|
@@ -1680,30 +1681,30 @@ const xt = "envision_agent_sessionId", V = class V extends G {
|
|
|
1680
1681
|
a(this, "lastConnectionPromise", null);
|
|
1681
1682
|
a(this, "socketState", R.Disconnected);
|
|
1682
1683
|
a(this, "streamOpened", !1);
|
|
1683
|
-
this.hearBeatPort = h, this.root_url = this.base_url, this.wsService = u, this.wsService.onEvent = async (
|
|
1684
|
-
await super.Message(
|
|
1685
|
-
}, this.wsService.onNewPacket = (
|
|
1686
|
-
this.sessionState.setStatistics(
|
|
1687
|
-
}, this.wsService.onPong = (
|
|
1688
|
-
}, this.wsService.onError = (
|
|
1684
|
+
this.hearBeatPort = h, this.root_url = this.base_url, this.wsService = u, this.wsService.onEvent = async (p) => {
|
|
1685
|
+
await super.Message(p);
|
|
1686
|
+
}, this.wsService.onNewPacket = (p) => {
|
|
1687
|
+
this.sessionState.setStatistics(p), this.eventBusService.streamEmitNewChunk(p);
|
|
1688
|
+
}, this.wsService.onPong = (p) => {
|
|
1689
|
+
}, this.wsService.onError = (p) => {
|
|
1689
1690
|
this.streamOpened = !1;
|
|
1690
1691
|
const D = {
|
|
1691
|
-
data: this.getErrorEvent(
|
|
1692
|
+
data: this.getErrorEvent(p),
|
|
1692
1693
|
lastEventId: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
1693
1694
|
origin: "gatewayService"
|
|
1694
1695
|
};
|
|
1695
|
-
console.error("Stream error:",
|
|
1696
|
+
console.error("Stream error:", p), this.everConnected && this.notificationPort.pushNotification({
|
|
1696
1697
|
message: "Reiniciando a conexão com o servidor",
|
|
1697
1698
|
type: "info"
|
|
1698
1699
|
}), super.Message(D);
|
|
1699
1700
|
}, this.wsService.onOpen = () => {
|
|
1700
1701
|
this.everConnected = !0, this.sessionState.setConnectionStatus(R.Connected);
|
|
1701
|
-
}, this.wsService.onReconnected = (
|
|
1702
|
+
}, this.wsService.onReconnected = (p) => {
|
|
1702
1703
|
this.sessionState.setConnectionStatus(R.Connected);
|
|
1703
|
-
}, this.wsService.onFirstToken = (
|
|
1704
|
-
this.localEmitFirstToken(
|
|
1705
|
-
}, this.wsService.onClose = (
|
|
1706
|
-
|
|
1704
|
+
}, this.wsService.onFirstToken = (p) => {
|
|
1705
|
+
this.localEmitFirstToken(p);
|
|
1706
|
+
}, this.wsService.onClose = (p, D) => {
|
|
1707
|
+
p != H && this.sessionState.setConnectionStatus(R.Disconnected);
|
|
1707
1708
|
};
|
|
1708
1709
|
}
|
|
1709
1710
|
reset(e, s) {
|
|
@@ -1716,7 +1717,7 @@ const xt = "envision_agent_sessionId", V = class V extends G {
|
|
|
1716
1717
|
return this.suspendState;
|
|
1717
1718
|
}
|
|
1718
1719
|
getStoredSessionId() {
|
|
1719
|
-
const e = localStorage.getItem(
|
|
1720
|
+
const e = localStorage.getItem(Bt);
|
|
1720
1721
|
if (e)
|
|
1721
1722
|
return e;
|
|
1722
1723
|
}
|
|
@@ -1803,7 +1804,7 @@ const xt = "envision_agent_sessionId", V = class V extends G {
|
|
|
1803
1804
|
}
|
|
1804
1805
|
// Send a message to the server via HTTP POST
|
|
1805
1806
|
async sendMessageInternal(e, s, i) {
|
|
1806
|
-
var l, o, u, d, h, v,
|
|
1807
|
+
var l, o, u, d, h, v, p, D;
|
|
1807
1808
|
const n = this.suspendState;
|
|
1808
1809
|
this.suspendState = !1;
|
|
1809
1810
|
const r = this.startInteraction(e.friendlyMessage ?? e.data, n);
|
|
@@ -1832,7 +1833,7 @@ const xt = "envision_agent_sessionId", V = class V extends G {
|
|
|
1832
1833
|
},
|
|
1833
1834
|
// Forward image attachments as a structured payload (PascalCase
|
|
1834
1835
|
// keys to match the C# `Message.Images` / `MessageImage` model).
|
|
1835
|
-
Images: (
|
|
1836
|
+
Images: (p = e.images) != null && p.length ? e.images.map((y) => ({ MimeType: y.mimeType, Data: y.data })) : void 0,
|
|
1836
1837
|
// Client-only UI representation for this turn (PascalCase to match the C# `Message.UserUi`
|
|
1837
1838
|
// model). The server persists it as a UserUiContent sibling and strips it from the model
|
|
1838
1839
|
// request; Content remains the only model-facing text.
|
|
@@ -1853,7 +1854,7 @@ const tt = class tt {
|
|
|
1853
1854
|
this.serverBaseUrl = t.replace(/\/$/, ""), this.accessToken = e;
|
|
1854
1855
|
}
|
|
1855
1856
|
get headers() {
|
|
1856
|
-
return { Authorization: `Bearer ${this.accessToken}` };
|
|
1857
|
+
return { Authorization: `Bearer ${Pt(this.accessToken)}` };
|
|
1857
1858
|
}
|
|
1858
1859
|
async init() {
|
|
1859
1860
|
}
|
|
@@ -1911,6 +1912,6 @@ export {
|
|
|
1911
1912
|
at as M,
|
|
1912
1913
|
ct as W,
|
|
1913
1914
|
lt as a,
|
|
1914
|
-
|
|
1915
|
+
Qt as u
|
|
1915
1916
|
};
|
|
1916
|
-
//# sourceMappingURL=httpArtifactService-
|
|
1917
|
+
//# sourceMappingURL=httpArtifactService-BqcorW_s.js.map
|