@aintela/chat 0.14.4 → 0.14.6
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 +3294 -3251
- package/dist/components.js.map +1 -1
- package/dist/{detachedRunActivity-Cf-RPK9j.js → detachedRunActivity-Dw1Far2p.js} +83 -54
- package/dist/detachedRunActivity-Dw1Far2p.js.map +1 -0
- package/dist/hooks.js +1 -1
- package/dist/{httpSessionService-B2wgAfly.js → httpSessionService-BCe4DpgA.js} +2 -2
- package/dist/{httpSessionService-B2wgAfly.js.map → httpSessionService-BCe4DpgA.js.map} +1 -1
- package/dist/index.js +225 -223
- package/dist/models.js +1 -1
- package/dist/{serializer-CdIQS0hy.js → serializer-Dagz_6VT.js} +95 -94
- package/dist/serializer-Dagz_6VT.js.map +1 -0
- package/dist/services.js +2 -2
- package/dist/src/components/AiChat/ChatPane/FriendlyPartDisplay.d.ts +2 -0
- package/dist/src/components/AiChat/ChatPane/askUserInlineOutage.test.d.ts +1 -0
- package/dist/src/components/AiChat/ChatPane/friendlyToolConfig.d.ts +25 -1
- package/dist/src/components/AiChat/sessionStateManagerService.d.ts +8 -0
- package/dist/src/components/index.d.ts +2 -1
- package/dist/src/models/ServerEvent.d.ts +8 -1
- package/dist/src/services/eventBusService.d.ts +6 -0
- package/dist/src/services/servers/AgentGatewayWSAsync.d.ts +14 -0
- package/dist/src/services/servers/gatewayRewindLost.test.d.ts +1 -0
- package/dist/tests/fakes/fakeWebSocket.d.ts +3 -1
- package/dist/{useChatSessions-BVpCsm8u.js → useChatSessions-BgfeYkcc.js} +2 -2
- package/dist/{useChatSessions-BVpCsm8u.js.map → useChatSessions-BgfeYkcc.js.map} +1 -1
- package/package.json +1 -1
- package/dist/detachedRunActivity-Cf-RPK9j.js.map +0 -1
- package/dist/serializer-CdIQS0hy.js.map +0 -1
|
@@ -373,7 +373,7 @@ const Me = /* @__PURE__ */ p((s, t) => {
|
|
|
373
373
|
}, "getConnectionStateColor"), U = class U {
|
|
374
374
|
static replaceFirstTwoTabsPerLine(t) {
|
|
375
375
|
const i = /^\s{15}/gm;
|
|
376
|
-
return typeof t == "string" ? t.replaceAll(i, (
|
|
376
|
+
return typeof t == "string" ? t.replaceAll(i, (r) => r.substring(15)) : t ?? "";
|
|
377
377
|
}
|
|
378
378
|
static jsonToString(t) {
|
|
379
379
|
if (t == null) return "";
|
|
@@ -386,15 +386,15 @@ const Me = /* @__PURE__ */ p((s, t) => {
|
|
|
386
386
|
} catch {
|
|
387
387
|
return String(t);
|
|
388
388
|
}
|
|
389
|
-
const
|
|
390
|
-
return
|
|
389
|
+
const r = Object.keys(t), a = [];
|
|
390
|
+
return r.forEach((l) => {
|
|
391
391
|
let u = t[l];
|
|
392
392
|
typeof u == "object" && (u = JSON.stringify(t[l], null, 2));
|
|
393
393
|
const f = (u == null ? void 0 : u.toString().indexOf(`
|
|
394
394
|
`)) > -1 ? `
|
|
395
395
|
` : "";
|
|
396
|
-
|
|
397
|
-
}),
|
|
396
|
+
a.push(`${l}:${f}${u}`);
|
|
397
|
+
}), a.join(`
|
|
398
398
|
`);
|
|
399
399
|
}
|
|
400
400
|
static functionDetailsToString(t) {
|
|
@@ -414,15 +414,15 @@ const Me = /* @__PURE__ */ p((s, t) => {
|
|
|
414
414
|
} catch {
|
|
415
415
|
return String(t);
|
|
416
416
|
}
|
|
417
|
-
const i = Object.keys(t),
|
|
418
|
-
return i.forEach((
|
|
419
|
-
let l = t == null ? void 0 : t[
|
|
417
|
+
const i = Object.keys(t), r = [];
|
|
418
|
+
return i.forEach((a) => {
|
|
419
|
+
let l = t == null ? void 0 : t[a];
|
|
420
420
|
typeof l == "object" && (l = JSON.stringify(l, null, 2));
|
|
421
421
|
const u = (l == null ? void 0 : l.toString().indexOf(`
|
|
422
422
|
`)) > -1 ? `
|
|
423
423
|
` : "";
|
|
424
|
-
|
|
425
|
-
}),
|
|
424
|
+
r.push(`${a}:${u}${l}`);
|
|
425
|
+
}), r.join(`
|
|
426
426
|
`);
|
|
427
427
|
}
|
|
428
428
|
/**
|
|
@@ -442,8 +442,8 @@ const Me = /* @__PURE__ */ p((s, t) => {
|
|
|
442
442
|
return;
|
|
443
443
|
}
|
|
444
444
|
if (!i || typeof i != "object") return;
|
|
445
|
-
const
|
|
446
|
-
return typeof
|
|
445
|
+
const r = i, a = r.SlotId ?? r.slotId;
|
|
446
|
+
return typeof a == "string" ? a : void 0;
|
|
447
447
|
}
|
|
448
448
|
static fromError(t) {
|
|
449
449
|
return {
|
|
@@ -457,11 +457,11 @@ const Me = /* @__PURE__ */ p((s, t) => {
|
|
|
457
457
|
textAppendable: !1
|
|
458
458
|
};
|
|
459
459
|
}
|
|
460
|
-
static fromText(t, i,
|
|
460
|
+
static fromText(t, i, r) {
|
|
461
461
|
return {
|
|
462
462
|
text: t,
|
|
463
463
|
eventType: c.Text,
|
|
464
|
-
id:
|
|
464
|
+
id: r ?? Wt(),
|
|
465
465
|
created: /* @__PURE__ */ new Date(),
|
|
466
466
|
author: i ?? "main",
|
|
467
467
|
partial: !1,
|
|
@@ -475,9 +475,9 @@ const Me = /* @__PURE__ */ p((s, t) => {
|
|
|
475
475
|
* and replayed parts are identical: an `EventType.UserAnswer` carrying functionDetails
|
|
476
476
|
* {name, args, isUi, status:'Done'} that routes through the uiTool dispatcher/registry.
|
|
477
477
|
*/
|
|
478
|
-
static fromUserUi(t, i,
|
|
478
|
+
static fromUserUi(t, i, r) {
|
|
479
479
|
return {
|
|
480
|
-
id:
|
|
480
|
+
id: r ?? Wt(),
|
|
481
481
|
eventType: c.UserAnswer,
|
|
482
482
|
author: "user",
|
|
483
483
|
created: /* @__PURE__ */ new Date(),
|
|
@@ -493,14 +493,14 @@ const Me = /* @__PURE__ */ p((s, t) => {
|
|
|
493
493
|
}
|
|
494
494
|
};
|
|
495
495
|
}
|
|
496
|
-
static createWaiting(t = !1, i = !0,
|
|
497
|
-
|
|
496
|
+
static createWaiting(t = !1, i = !0, r, a, l) {
|
|
497
|
+
r || (r = "Waiting");
|
|
498
498
|
const u = U.fromText("...", void 0, "waitingpart");
|
|
499
499
|
return u.eventType = c.Waiting, u.waitingDetails = {
|
|
500
|
-
startingPoint:
|
|
500
|
+
startingPoint: a,
|
|
501
501
|
addTimer: t,
|
|
502
502
|
isTimerRunning: i,
|
|
503
|
-
status:
|
|
503
|
+
status: r,
|
|
504
504
|
stopPoint: l
|
|
505
505
|
}, u;
|
|
506
506
|
}
|
|
@@ -514,16 +514,16 @@ const Me = /* @__PURE__ */ p((s, t) => {
|
|
|
514
514
|
static FlatParts(t) {
|
|
515
515
|
if (t.length === 0)
|
|
516
516
|
return;
|
|
517
|
-
const i = t.filter((l) => l.eventType == c.Text),
|
|
518
|
-
|
|
517
|
+
const i = t.filter((l) => l.eventType == c.Text), r = i.length > 0 ? i[0] : t[0], a = [...new Set(t.map((l) => l.eventType))];
|
|
518
|
+
a.length == 1 ? r.eventType = a[0] : i.length > 0 && (r.eventType = c.Text), r.mustPush = !(r.eventType == c.Text || r.eventType == c.Thought || r.eventType == c.NotDefined || r.eventType == c.PartialFunctionCall), r.textAppendable = r.eventType == c.Text || r.eventType == c.Thought || r.eventType == c.PartialFunctionCall;
|
|
519
519
|
for (const l of t) {
|
|
520
|
-
if (!
|
|
521
|
-
const u =
|
|
520
|
+
if (!r.codeExecutionResultDetails && l.codeExecutionResultDetails && (r.codeExecutionResultDetails = l.codeExecutionResultDetails), !r.errorDetails && l.errorDetails && (r.errorDetails = l.errorDetails), !r.executableCodeDetails && l.executableCodeDetails && (r.executableCodeDetails = l.executableCodeDetails), !r.functionDetails && l.functionDetails && (r.functionDetails = l.functionDetails), r.functionDetails && l.functionDetails && l !== r) {
|
|
521
|
+
const u = r.functionDetails, f = l.functionDetails;
|
|
522
522
|
!u.askUserComponent && f.askUserComponent && (u.askUserComponent = f.askUserComponent), !u.isUi && f.isUi && (u.isUi = !0), !u.clientOutput && f.clientOutput && (u.clientOutput = f.clientOutput), u.isAskUser = u.isAskUser || f.isAskUser || !!u.askUserComponent;
|
|
523
523
|
}
|
|
524
|
-
!
|
|
524
|
+
!r.rawDetails && l.rawDetails && (r.rawDetails = l.rawDetails), !r.thoughtDetails && l.thoughtDetails && (r.thoughtDetails = l.thoughtDetails), !r.errorDetails && l.errorDetails && (r.errorDetails = l.errorDetails);
|
|
525
525
|
}
|
|
526
|
-
return
|
|
526
|
+
return r;
|
|
527
527
|
}
|
|
528
528
|
static isCharArray(t) {
|
|
529
529
|
return Array.isArray(t) && t.length > 0 && t.every((i) => typeof i == "string" && i.length === 1);
|
|
@@ -538,12 +538,12 @@ const Me = /* @__PURE__ */ p((s, t) => {
|
|
|
538
538
|
if (t == null || typeof t != "object" || Array.isArray(t)) return null;
|
|
539
539
|
const i = Object.keys(t);
|
|
540
540
|
if (i.length === 0) return null;
|
|
541
|
-
for (let
|
|
542
|
-
if (i[
|
|
543
|
-
const
|
|
544
|
-
if (typeof
|
|
541
|
+
for (let r = 0; r < i.length; r++) {
|
|
542
|
+
if (i[r] !== String(r)) return null;
|
|
543
|
+
const a = t[i[r]];
|
|
544
|
+
if (typeof a != "string" || a.length !== 1) return null;
|
|
545
545
|
}
|
|
546
|
-
return i.map((
|
|
546
|
+
return i.map((r) => t[r]).join("");
|
|
547
547
|
}
|
|
548
548
|
static isCodeExecution(t) {
|
|
549
549
|
return t.eventType === c.CodeExecutionResult || t.eventType === c.ExecutableCode;
|
|
@@ -551,10 +551,10 @@ const Me = /* @__PURE__ */ p((s, t) => {
|
|
|
551
551
|
};
|
|
552
552
|
p(U, "InteractionPartUtils");
|
|
553
553
|
let Bt = U;
|
|
554
|
-
var pe = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, n = /* @__PURE__ */ p((s, t, i,
|
|
555
|
-
for (var
|
|
556
|
-
(u = s[l]) && (
|
|
557
|
-
return
|
|
554
|
+
var pe = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, n = /* @__PURE__ */ p((s, t, i, r) => {
|
|
555
|
+
for (var a = r > 1 ? void 0 : r ? ue(t, i) : t, l = s.length - 1, u; l >= 0; l--)
|
|
556
|
+
(u = s[l]) && (a = (r ? u(t, i, a) : u(a)) || a);
|
|
557
|
+
return r && a && pe(t, i, a), a;
|
|
558
558
|
}, "__decorateClass");
|
|
559
559
|
const C = {
|
|
560
560
|
// KernelContent derived types
|
|
@@ -1419,18 +1419,18 @@ Kt = n([
|
|
|
1419
1419
|
g({ name: "Payload" })
|
|
1420
1420
|
], Kt);
|
|
1421
1421
|
function Yt(s) {
|
|
1422
|
-
var
|
|
1423
|
-
const t = (s == null ? void 0 : s.presentation) ?? ((
|
|
1422
|
+
var a;
|
|
1423
|
+
const t = (s == null ? void 0 : s.presentation) ?? ((a = s == null ? void 0 : s.metadata) == null ? void 0 : a[de]);
|
|
1424
1424
|
if (!t || typeof t != "object") return { isUi: !1 };
|
|
1425
|
-
const i = t,
|
|
1425
|
+
const i = t, r = /* @__PURE__ */ p((l, u) => i[l] ?? i[u], "pick");
|
|
1426
1426
|
return {
|
|
1427
|
-
isUi:
|
|
1428
|
-
askUserComponent:
|
|
1429
|
-
argsDescription:
|
|
1427
|
+
isUi: r("isUi", "IsUi") === !0,
|
|
1428
|
+
askUserComponent: r("askUserComponent", "AskUserComponent") || void 0,
|
|
1429
|
+
argsDescription: r("argsDescription", "ArgsDescription") || void 0,
|
|
1430
1430
|
// Runtime override on a RESULT: the UI tool chose not to render (CallContext.CancelUiRender).
|
|
1431
|
-
cancelUi:
|
|
1431
|
+
cancelUi: r("cancelUi", "CancelUi") === !0 || void 0,
|
|
1432
1432
|
// Live signal on the PARK event: the tool is now waiting on a human, so the drawer may open.
|
|
1433
|
-
parked:
|
|
1433
|
+
parked: r("parked", "Parked") === !0 || void 0
|
|
1434
1434
|
};
|
|
1435
1435
|
}
|
|
1436
1436
|
p(Yt, "readPresentation");
|
|
@@ -1471,13 +1471,14 @@ const w = class w {
|
|
|
1471
1471
|
e(this, "visible", !0);
|
|
1472
1472
|
this.interactionId = t, this.author = "main";
|
|
1473
1473
|
}
|
|
1474
|
-
static createErrorEvent(t, i) {
|
|
1474
|
+
static createErrorEvent(t, i, r) {
|
|
1475
1475
|
const a = new w(i);
|
|
1476
1476
|
a.turn_complete = !0, a.partial = !1, a.parts = [];
|
|
1477
|
-
const
|
|
1477
|
+
const l = {
|
|
1478
1478
|
eventType: c.ServerError,
|
|
1479
1479
|
errorDetails: {
|
|
1480
|
-
errorMessage: t
|
|
1480
|
+
errorMessage: t,
|
|
1481
|
+
...r != null && r.connectionCutoff ? { connectionCutoff: !0 } : {}
|
|
1481
1482
|
},
|
|
1482
1483
|
id: "",
|
|
1483
1484
|
author: "main",
|
|
@@ -1486,14 +1487,14 @@ const w = class w {
|
|
|
1486
1487
|
mustPush: !1,
|
|
1487
1488
|
textAppendable: !1
|
|
1488
1489
|
};
|
|
1489
|
-
return a.parts.push(
|
|
1490
|
+
return a.parts.push(l), a;
|
|
1490
1491
|
}
|
|
1491
1492
|
static parseFlatPropertiesTypedEvent(t) {
|
|
1492
|
-
var
|
|
1493
|
+
var r, a, l, u, f;
|
|
1493
1494
|
const i = new w(t.interactionId);
|
|
1494
1495
|
if (i.serverError = t.serverError, !t.interactionId && !w.carriesServerError(t))
|
|
1495
1496
|
throw new Error("Interaction ID is required");
|
|
1496
|
-
switch (i.model_session_id = "", i.server_session_id = null, i.asyncFinalResponse = t.turnComplete, i.command = (
|
|
1497
|
+
switch (i.model_session_id = "", i.server_session_id = null, i.asyncFinalResponse = t.turnComplete, i.command = (r = t.command) == null ? void 0 : r.toString(), t.sessionInformation && (i.session_information = t.sessionInformation), (!t.author || t.author == "") && console.warn('[ServerEvent] event with no author; defaulting to "main"', {
|
|
1497
1498
|
interactionId: t.interactionId,
|
|
1498
1499
|
turnComplete: t.turnComplete
|
|
1499
1500
|
}), t == null ? void 0 : t.author) {
|
|
@@ -1506,15 +1507,15 @@ const w = class w {
|
|
|
1506
1507
|
default:
|
|
1507
1508
|
i.author = "main";
|
|
1508
1509
|
}
|
|
1509
|
-
return i.mimeType = t.mimeType, i.created = new Date(t.timestamp), i.eventType = c.NotDefined, i.partial = ((l = (
|
|
1510
|
+
return i.mimeType = t.mimeType, i.created = new Date(t.timestamp), i.eventType = c.NotDefined, i.partial = ((l = (a = t.partial) == null ? void 0 : a.toString()) == null ? void 0 : l.toLowerCase()) === "true", i.turn_complete = t.turnComplete, i.visible = t.visible, i.isFinalResponse = t.turnComplete ?? !1, i.artifactsDelta = [], t.artifactsGenerated && t.artifactsGenerated.length > 0 && (i.created = new Date(t.timestamp), i.llmArtifacts = t.artifactsGenerated), i.detachedRunId = t.detachedRunId, i.detachedRunName = t.detachedRunName, (u = t.agent) != null && u.personaId && ((f = t.agent) != null && f.role) && (i.agent = { personaId: t.agent.personaId, role: t.agent.role }), i;
|
|
1510
1511
|
}
|
|
1511
1512
|
static getPartType(t) {
|
|
1512
1513
|
return t instanceof vt ? "TextContent" : t instanceof v ? "FunctionCallContent" : t instanceof N ? "FunctionResultContent" : t instanceof b ? "StreamingFunctionCallUpdateContent" : t instanceof O ? "StreamingFinalFunctionCallContent" : t instanceof A ? "StreamingFinalFunctionResultContent" : t instanceof Ft ? "FunctionClientOutputContent" : t instanceof q ? "StreamingClientOutputContent" : t instanceof Et ? "UserUiContent" : t instanceof Nt ? "InteractionOriginContent" : t instanceof bt ? "QueuedMessageContent" : t instanceof Ut ? "StreamingTextContent" : t instanceof Pt ? "StreamingReasoningContent" : t instanceof Mt ? "StreamingThoughtHighlightContent" : t instanceof G ? "ToolEventContent" : t instanceof M ? "StreamingToolEventContent" : "Unknown";
|
|
1513
1514
|
}
|
|
1514
1515
|
/** True when the event holds the SDK's "Server Error" sentinel call (`Event.GetErrorEvent`). */
|
|
1515
1516
|
static carriesServerError(t) {
|
|
1516
|
-
var
|
|
1517
|
-
return (((
|
|
1517
|
+
var r;
|
|
1518
|
+
return (((r = t.content) == null ? void 0 : r.items) ?? []).some((a) => (a == null ? void 0 : a.id) === w.SERVER_ERROR_CALL_ID);
|
|
1518
1519
|
}
|
|
1519
1520
|
static parseFromTypedEvent(t) {
|
|
1520
1521
|
var l, u, f, z, Qt, Jt, Vt;
|
|
@@ -1524,9 +1525,9 @@ const w = class w {
|
|
|
1524
1525
|
if (!t.content && !t.streamingParts)
|
|
1525
1526
|
return i;
|
|
1526
1527
|
i.parts = [];
|
|
1527
|
-
const
|
|
1528
|
+
const r = [...((l = t.content) == null ? void 0 : l.items) ?? [], ...t.streamingParts ?? []];
|
|
1528
1529
|
i.eventType = le(((u = t.eventType) == null ? void 0 : u.type) ?? "");
|
|
1529
|
-
for (const y of
|
|
1530
|
+
for (const y of r) {
|
|
1530
1531
|
let d = {
|
|
1531
1532
|
id: "",
|
|
1532
1533
|
author: i.author,
|
|
@@ -1539,9 +1540,9 @@ const w = class w {
|
|
|
1539
1540
|
};
|
|
1540
1541
|
const h = w.getPartType(y);
|
|
1541
1542
|
if (h == C.FunctionCallContent || h == C.FunctionResultContent || h == C.StreamingFinalFunctionCallContent || h == C.StreamingFinalFunctionResultContent) {
|
|
1542
|
-
var
|
|
1543
|
-
if (
|
|
1544
|
-
const m =
|
|
1543
|
+
var a = y;
|
|
1544
|
+
if (a.id == w.SERVER_ERROR_CALL_ID) {
|
|
1545
|
+
const m = a.arguments ?? {}, B = typeof m.error == "string" && m.error.trim().length > 0 ? m.error : JSON.stringify(a.arguments);
|
|
1545
1546
|
d.eventType = c.ServerError, d.errorDetails = {
|
|
1546
1547
|
errorMessage: B,
|
|
1547
1548
|
stackTrace: typeof m.stackTrace == "string" ? m.stackTrace : void 0
|
|
@@ -1550,24 +1551,24 @@ const w = class w {
|
|
|
1550
1551
|
d.eventType = h == C.FunctionCallContent || h == C.StreamingFinalFunctionCallContent ? c.FunctionCall : c.FunctionResponse;
|
|
1551
1552
|
let m;
|
|
1552
1553
|
try {
|
|
1553
|
-
if (
|
|
1554
|
-
if (typeof
|
|
1555
|
-
m =
|
|
1556
|
-
else if (typeof
|
|
1557
|
-
const At = JSON.parse(
|
|
1558
|
-
m = typeof At == "object" && At !== null ? At :
|
|
1554
|
+
if (a != null && a.result)
|
|
1555
|
+
if (typeof a.result == "object")
|
|
1556
|
+
m = a.result;
|
|
1557
|
+
else if (typeof a.result == "string") {
|
|
1558
|
+
const At = JSON.parse(a.result);
|
|
1559
|
+
m = typeof At == "object" && At !== null ? At : a.result;
|
|
1559
1560
|
} else
|
|
1560
|
-
m =
|
|
1561
|
+
m = a.result;
|
|
1561
1562
|
} catch (At) {
|
|
1562
|
-
console.warn("Parse function error", At), m =
|
|
1563
|
+
console.warn("Parse function error", At), m = a == null ? void 0 : a.result;
|
|
1563
1564
|
}
|
|
1564
1565
|
d.thoughtDetails = {
|
|
1565
1566
|
text: ""
|
|
1566
1567
|
};
|
|
1567
|
-
const B = Yt(
|
|
1568
|
+
const B = Yt(a);
|
|
1568
1569
|
d.functionDetails = {
|
|
1569
|
-
id: (
|
|
1570
|
-
args:
|
|
1570
|
+
id: (a == null ? void 0 : a.id) ?? "",
|
|
1571
|
+
args: a == null ? void 0 : a.arguments,
|
|
1571
1572
|
// The SETTLED call arrives as FunctionCallContent on the persisted/replay path and as
|
|
1572
1573
|
// StreamingFinalFunctionCallContent on the live one — both open the call, so both stamp
|
|
1573
1574
|
// `start`. Keying on the persisted type alone left every LIVE call `Executing` with no
|
|
@@ -1575,8 +1576,8 @@ const w = class w {
|
|
|
1575
1576
|
// showed "running" with no stopwatch (AIA issue 1022). Same for `end` on the result.
|
|
1576
1577
|
start: h == C.FunctionCallContent || h == C.StreamingFinalFunctionCallContent ? i.created : void 0,
|
|
1577
1578
|
end: h == C.FunctionResultContent || h == C.StreamingFinalFunctionResultContent ? i.created : void 0,
|
|
1578
|
-
text: JSON.stringify(
|
|
1579
|
-
name: (
|
|
1579
|
+
text: JSON.stringify(a == null ? void 0 : a.arguments) ?? "",
|
|
1580
|
+
name: (a == null ? void 0 : a.functionName) ?? "",
|
|
1580
1581
|
status: d.eventType == c.FunctionCall ? "Executing" : "Done",
|
|
1581
1582
|
response: m,
|
|
1582
1583
|
isUi: B.isUi,
|
|
@@ -1584,11 +1585,11 @@ const w = class w {
|
|
|
1584
1585
|
// Client-only payload riding the RESULT event: live top-level `clientOutput`, or
|
|
1585
1586
|
// metadata.clientOutput on the collapsed/persisted result. Calls leave it undefined.
|
|
1586
1587
|
// The persisted-replay form also folds in via FunctionClientOutputContent.
|
|
1587
|
-
clientOutput: (
|
|
1588
|
+
clientOutput: (a == null ? void 0 : a.clientOutput) ?? ((f = a == null ? void 0 : a.metadata) == null ? void 0 : f.clientOutput),
|
|
1588
1589
|
askUserComponent: B.askUserComponent,
|
|
1589
1590
|
// Runtime "don't render" override on a RESULT (CallContext.CancelUiRender).
|
|
1590
1591
|
cancelUi: B.cancelUi
|
|
1591
|
-
}, d.functionDetails.isAskUser = !!d.functionDetails.askUserComponent, t.text =
|
|
1592
|
+
}, d.functionDetails.isAskUser = !!d.functionDetails.askUserComponent, t.text = a == null ? void 0 : a.arguments;
|
|
1592
1593
|
}
|
|
1593
1594
|
} else if (h == C.StreamingTextContent)
|
|
1594
1595
|
d.eventType = c.Text, d.text = (z = y == null ? void 0 : y.text) == null ? void 0 : z.replaceAll("\\n", `
|
|
@@ -1702,19 +1703,19 @@ const w = class w {
|
|
|
1702
1703
|
]
|
|
1703
1704
|
};
|
|
1704
1705
|
}
|
|
1705
|
-
static createFromFunctionName(t, i,
|
|
1706
|
-
const
|
|
1707
|
-
return
|
|
1706
|
+
static createFromFunctionName(t, i, r) {
|
|
1707
|
+
const a = w.createFromText("", i);
|
|
1708
|
+
return a.parts[0].text = void 0, a.parts[0].thoughtDetails = void 0, a.parts[0].textAppendable = !1, a.parts[0].mustPush = !0, a.parts[0].functionDetails = {
|
|
1708
1709
|
name: t,
|
|
1709
1710
|
id: "callId",
|
|
1710
1711
|
status: "Executing",
|
|
1711
1712
|
start: /* @__PURE__ */ new Date(),
|
|
1712
1713
|
end: void 0,
|
|
1713
1714
|
text: "dfsdfdf",
|
|
1714
|
-
args:
|
|
1715
|
-
},
|
|
1715
|
+
args: r
|
|
1716
|
+
}, a;
|
|
1716
1717
|
}
|
|
1717
|
-
static createFromText(t, i,
|
|
1718
|
+
static createFromText(t, i, r) {
|
|
1718
1719
|
return {
|
|
1719
1720
|
author: "main",
|
|
1720
1721
|
visible: !0,
|
|
@@ -1735,8 +1736,8 @@ const w = class w {
|
|
|
1735
1736
|
// with `eventType: Text` AND a populated `thoughtDetails`
|
|
1736
1737
|
// render the text in the body and the trace in the
|
|
1737
1738
|
// thinking strip.
|
|
1738
|
-
thoughtDetails:
|
|
1739
|
-
text:
|
|
1739
|
+
thoughtDetails: r ? {
|
|
1740
|
+
text: r
|
|
1740
1741
|
} : void 0,
|
|
1741
1742
|
id: Wt(),
|
|
1742
1743
|
created: /* @__PURE__ */ new Date(),
|
|
@@ -1788,8 +1789,8 @@ function me(s) {
|
|
|
1788
1789
|
return s.name;
|
|
1789
1790
|
}
|
|
1790
1791
|
p(me, "getConstructorName");
|
|
1791
|
-
function ee(s, t, i,
|
|
1792
|
-
t.constructor !== i && (s.$type = (
|
|
1792
|
+
function ee(s, t, i, r) {
|
|
1793
|
+
t.constructor !== i && (s.$type = (r == null ? void 0 : r.name) ?? me(t.constructor));
|
|
1793
1794
|
}
|
|
1794
1795
|
p(ee, "dotNetTypeEmitter");
|
|
1795
1796
|
function ne(s, t) {
|
|
@@ -1819,16 +1820,16 @@ function ie(s) {
|
|
|
1819
1820
|
try {
|
|
1820
1821
|
return JSON.parse(s), s;
|
|
1821
1822
|
} catch {
|
|
1822
|
-
let i = "",
|
|
1823
|
-
for (let
|
|
1824
|
-
const l = s[
|
|
1825
|
-
if (l === "\\" &&
|
|
1826
|
-
const f = s[
|
|
1823
|
+
let i = "", r = !1;
|
|
1824
|
+
for (let a = 0; a < s.length; a++) {
|
|
1825
|
+
const l = s[a], u = l.charCodeAt(0);
|
|
1826
|
+
if (l === "\\" && r && a + 1 < s.length) {
|
|
1827
|
+
const f = s[a + 1];
|
|
1827
1828
|
if (f === '"' || f === "\\" || f === "/" || f === "b" || f === "f" || f === "n" || f === "r" || f === "t") {
|
|
1828
|
-
i += l + f,
|
|
1829
|
+
i += l + f, a++;
|
|
1829
1830
|
continue;
|
|
1830
|
-
} else if (f === "u" &&
|
|
1831
|
-
i += s.substring(
|
|
1831
|
+
} else if (f === "u" && a + 5 < s.length) {
|
|
1832
|
+
i += s.substring(a, a + 6), a += 5;
|
|
1832
1833
|
continue;
|
|
1833
1834
|
} else {
|
|
1834
1835
|
i += l;
|
|
@@ -1837,12 +1838,12 @@ function ie(s) {
|
|
|
1837
1838
|
}
|
|
1838
1839
|
if (l === '"') {
|
|
1839
1840
|
let f = 0;
|
|
1840
|
-
for (let z =
|
|
1841
|
+
for (let z = a - 1; z >= 0 && s[z] === "\\"; z--)
|
|
1841
1842
|
f++;
|
|
1842
|
-
f % 2 === 0 && (
|
|
1843
|
+
f % 2 === 0 && (r = !r), i += l;
|
|
1843
1844
|
continue;
|
|
1844
1845
|
}
|
|
1845
|
-
if (
|
|
1846
|
+
if (r && u < 32)
|
|
1846
1847
|
switch (l) {
|
|
1847
1848
|
case `
|
|
1848
1849
|
`:
|
|
@@ -1928,4 +1929,4 @@ export {
|
|
|
1928
1929
|
He as y,
|
|
1929
1930
|
Ie as z
|
|
1930
1931
|
};
|
|
1931
|
-
//# sourceMappingURL=serializer-
|
|
1932
|
+
//# sourceMappingURL=serializer-Dagz_6VT.js.map
|