@aintela/chat 0.2.22 → 0.2.26
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 +4518 -4442
- package/dist/components.js.map +1 -1
- package/dist/hooks.js +2 -2
- package/dist/{httpArtifactService-Dh9LGQ9a.js → httpArtifactService-DFlQzSgN.js} +429 -407
- package/dist/httpArtifactService-DFlQzSgN.js.map +1 -0
- package/dist/{httpSessionService-5Kr__oQL.js → httpSessionService-D9JXx3JD.js} +2 -2
- package/dist/{httpSessionService-5Kr__oQL.js.map → httpSessionService-D9JXx3JD.js.map} +1 -1
- package/dist/index.js +5 -5
- package/dist/models.js +1 -1
- package/dist/{serializer-DyHZxlAG.js → serializer-C1uBjgTd.js} +499 -457
- package/dist/serializer-C1uBjgTd.js.map +1 -0
- package/dist/services.js +2 -2
- package/dist/src/components/AiChat/ChatPane/parts/AskUserDispatcher.d.ts +22 -0
- package/dist/src/components/AiChat/ChatPane/parts/types.d.ts +17 -0
- package/dist/src/components/AiChat/ChatPane/parts/uiToolRegistry.d.ts +47 -2
- package/dist/src/components/v2/PromptV2.d.ts +8 -1
- package/dist/src/hooks/usePromptAssist.d.ts +7 -1
- package/dist/src/models/ServerEvent.d.ts +11 -0
- package/dist/src/models/semanticKernelModel/models.d.ts +8 -1
- package/dist/src/services/httpPromptAssistService.d.ts +19 -0
- package/dist/{useChatSessions-DttlifVk.js → useChatSessions-C1rHmRuS.js} +2 -2
- package/dist/{useChatSessions-DttlifVk.js.map → useChatSessions-C1rHmRuS.js.map} +1 -1
- package/dist/useContainerWidth-0EA-kdzl.js +260 -0
- package/dist/useContainerWidth-0EA-kdzl.js.map +1 -0
- package/package.json +1 -1
- package/dist/httpArtifactService-Dh9LGQ9a.js.map +0 -1
- package/dist/serializer-DyHZxlAG.js.map +0 -1
- package/dist/useContainerWidth-DsNHNR-z.js +0 -187
- package/dist/useContainerWidth-DsNHNR-z.js.map +0 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var e = (
|
|
5
|
-
import { E as l, q as
|
|
6
|
-
import { jsonMember as r, jsonObject as
|
|
7
|
-
const
|
|
1
|
+
var Ot = Object.defineProperty;
|
|
2
|
+
var Lt = (s, t, o) => t in s ? Ot(s, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : s[t] = o;
|
|
3
|
+
var c = (s, t) => Ot(s, "name", { value: t, configurable: !0 });
|
|
4
|
+
var e = (s, t, o) => Lt(s, typeof t != "symbol" ? t + "" : t, o);
|
|
5
|
+
import { E as l, q as Dt, A as Jt, G as Wt } from "./environmentUtils-BaKw5_VD.js";
|
|
6
|
+
import { jsonMember as r, jsonObject as m, AnyT as Et, jsonArrayMember as gt, TypedJSON as Rt } from "typedjson";
|
|
7
|
+
const R = class R {
|
|
8
8
|
static replaceFirstTwoTabsPerLine(t) {
|
|
9
|
-
const
|
|
10
|
-
return typeof t == "string" ? t.replaceAll(
|
|
9
|
+
const o = /^\s{15}/gm;
|
|
10
|
+
return typeof t == "string" ? t.replaceAll(o, (a) => a.substring(15)) : t ?? "";
|
|
11
11
|
}
|
|
12
12
|
static jsonToString(t) {
|
|
13
13
|
if (t == null) return "";
|
|
14
14
|
if (typeof t != "object") return String(t);
|
|
15
|
-
const
|
|
16
|
-
if (
|
|
15
|
+
const o = Array.isArray(t) ? R.isCharArray(t) ? t.join("") : null : R.tryCollapseCharIndexedObject(t);
|
|
16
|
+
if (o != null) return o;
|
|
17
17
|
if (Array.isArray(t))
|
|
18
18
|
try {
|
|
19
19
|
return JSON.stringify(t, null, 2);
|
|
20
20
|
} catch {
|
|
21
21
|
return String(t);
|
|
22
22
|
}
|
|
23
|
-
const a = Object.keys(t),
|
|
24
|
-
return a.forEach((
|
|
25
|
-
let
|
|
26
|
-
typeof
|
|
27
|
-
const f = (
|
|
23
|
+
const a = Object.keys(t), i = [];
|
|
24
|
+
return a.forEach((p) => {
|
|
25
|
+
let g = t[p];
|
|
26
|
+
typeof g == "object" && (g = JSON.stringify(t[p], null, 2));
|
|
27
|
+
const f = (g == null ? void 0 : g.toString().indexOf(`
|
|
28
28
|
`)) > -1 ? `
|
|
29
29
|
` : "";
|
|
30
|
-
|
|
31
|
-
}),
|
|
30
|
+
i.push(`${p}:${f}${g}`);
|
|
31
|
+
}), i.join(`
|
|
32
32
|
`);
|
|
33
33
|
}
|
|
34
34
|
static functionDetailsToString(t) {
|
|
@@ -48,14 +48,14 @@ const P = class P {
|
|
|
48
48
|
} catch {
|
|
49
49
|
return String(t);
|
|
50
50
|
}
|
|
51
|
-
const
|
|
52
|
-
return
|
|
53
|
-
let
|
|
54
|
-
typeof
|
|
55
|
-
const
|
|
51
|
+
const o = Object.keys(t), a = [];
|
|
52
|
+
return o.forEach((i) => {
|
|
53
|
+
let p = t == null ? void 0 : t[i];
|
|
54
|
+
typeof p == "object" && (p = JSON.stringify(p, null, 2));
|
|
55
|
+
const g = (p == null ? void 0 : p.toString().indexOf(`
|
|
56
56
|
`)) > -1 ? `
|
|
57
57
|
` : "";
|
|
58
|
-
a.push(`${
|
|
58
|
+
a.push(`${i}:${g}${p}`);
|
|
59
59
|
}), a.join(`
|
|
60
60
|
`);
|
|
61
61
|
}
|
|
@@ -67,17 +67,17 @@ const P = class P {
|
|
|
67
67
|
* before reading the field. Returns undefined when absent or unparseable.
|
|
68
68
|
*/
|
|
69
69
|
static uiSlotId(t) {
|
|
70
|
-
var
|
|
71
|
-
let
|
|
72
|
-
for (let
|
|
70
|
+
var p;
|
|
71
|
+
let o = (p = t == null ? void 0 : t.functionDetails) == null ? void 0 : p.response;
|
|
72
|
+
for (let g = 0; g < 2 && typeof o == "string"; g++)
|
|
73
73
|
try {
|
|
74
|
-
|
|
74
|
+
o = JSON.parse(o);
|
|
75
75
|
} catch {
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
if (!
|
|
79
|
-
const a =
|
|
80
|
-
return typeof
|
|
78
|
+
if (!o || typeof o != "object") return;
|
|
79
|
+
const a = o, i = a.SlotId ?? a.slotId;
|
|
80
|
+
return typeof i == "string" ? i : void 0;
|
|
81
81
|
}
|
|
82
82
|
static fromError(t) {
|
|
83
83
|
return {
|
|
@@ -92,13 +92,13 @@ const P = class P {
|
|
|
92
92
|
textAppendable: !1
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
static fromText(t,
|
|
95
|
+
static fromText(t, o, a) {
|
|
96
96
|
return {
|
|
97
97
|
text: t,
|
|
98
98
|
eventType: l.Text,
|
|
99
|
-
id: a ??
|
|
99
|
+
id: a ?? Dt(),
|
|
100
100
|
created: /* @__PURE__ */ new Date(),
|
|
101
|
-
author:
|
|
101
|
+
author: o ?? "main",
|
|
102
102
|
partial: !1,
|
|
103
103
|
isStillWriting: !1,
|
|
104
104
|
mustPush: !1,
|
|
@@ -111,9 +111,9 @@ const P = class P {
|
|
|
111
111
|
* and replayed parts are identical: an `EventType.UserAnswer` carrying functionDetails
|
|
112
112
|
* {name, args, isUi, status:'Done'} that routes through the uiTool dispatcher/registry.
|
|
113
113
|
*/
|
|
114
|
-
static fromUserUi(t,
|
|
114
|
+
static fromUserUi(t, o, a) {
|
|
115
115
|
return {
|
|
116
|
-
id: a ??
|
|
116
|
+
id: a ?? Dt(),
|
|
117
117
|
eventType: l.UserAnswer,
|
|
118
118
|
author: "user",
|
|
119
119
|
created: /* @__PURE__ */ new Date(),
|
|
@@ -124,25 +124,25 @@ const P = class P {
|
|
|
124
124
|
functionDetails: {
|
|
125
125
|
id: "",
|
|
126
126
|
name: t,
|
|
127
|
-
args:
|
|
127
|
+
args: o,
|
|
128
128
|
status: "Done",
|
|
129
129
|
isUi: !0
|
|
130
130
|
}
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
-
static createWaiting(t = !1,
|
|
133
|
+
static createWaiting(t = !1, o = !0, a, i, p) {
|
|
134
134
|
a || (a = "Waiting");
|
|
135
|
-
const
|
|
136
|
-
return
|
|
137
|
-
startingPoint:
|
|
135
|
+
const g = R.fromText("...", void 0, "waitingpart");
|
|
136
|
+
return g.eventType = l.Waiting, g.waitingDetails = {
|
|
137
|
+
startingPoint: i,
|
|
138
138
|
addTimer: t,
|
|
139
|
-
isTimerRunning:
|
|
139
|
+
isTimerRunning: o,
|
|
140
140
|
status: a,
|
|
141
|
-
stopPoint:
|
|
142
|
-
},
|
|
141
|
+
stopPoint: p
|
|
142
|
+
}, g;
|
|
143
143
|
}
|
|
144
144
|
static createSuspended() {
|
|
145
|
-
const t =
|
|
145
|
+
const t = R.fromText("SUSPEND");
|
|
146
146
|
return t.eventType = l.Suspended, t;
|
|
147
147
|
}
|
|
148
148
|
static getPartTextContent(t) {
|
|
@@ -151,14 +151,14 @@ const P = class P {
|
|
|
151
151
|
static FlatParts(t) {
|
|
152
152
|
if (t.length === 0)
|
|
153
153
|
return;
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
for (const
|
|
157
|
-
!a.codeExecutionResultDetails &&
|
|
154
|
+
const o = t.filter((p) => p.eventType == l.Text), a = o.length > 0 ? o[0] : t[0], i = [...new Set(t.map((p) => p.eventType))];
|
|
155
|
+
i.length == 1 ? a.eventType = i[0] : o.length > 0 && (a.eventType = l.Text), a.mustPush = !(a.eventType == l.Text || a.eventType == l.Thought || a.eventType == l.NotDefined || a.eventType == l.PartialFunctionCall), a.textAppendable = a.eventType == l.Text || a.eventType == l.Thought || a.eventType == l.PartialFunctionCall;
|
|
156
|
+
for (const p of t)
|
|
157
|
+
!a.codeExecutionResultDetails && p.codeExecutionResultDetails && (a.codeExecutionResultDetails = p.codeExecutionResultDetails), !a.errorDetails && p.errorDetails && (a.errorDetails = p.errorDetails), !a.executableCodeDetails && p.executableCodeDetails && (a.executableCodeDetails = p.executableCodeDetails), !a.functionDetails && p.functionDetails && (a.functionDetails = p.functionDetails), !a.rawDetails && p.rawDetails && (a.rawDetails = p.rawDetails), !a.thoughtDetails && p.thoughtDetails && (a.thoughtDetails = p.thoughtDetails), !a.errorDetails && p.errorDetails && (a.errorDetails = p.errorDetails);
|
|
158
158
|
return a;
|
|
159
159
|
}
|
|
160
160
|
static isCharArray(t) {
|
|
161
|
-
return Array.isArray(t) && t.length > 0 && t.every((
|
|
161
|
+
return Array.isArray(t) && t.length > 0 && t.every((o) => typeof o == "string" && o.length === 1);
|
|
162
162
|
}
|
|
163
163
|
/**
|
|
164
164
|
* Detects objects like `{0: "a", 1: "b", 2: "c", ...}` — a string that was
|
|
@@ -168,25 +168,25 @@ const P = class P {
|
|
|
168
168
|
*/
|
|
169
169
|
static tryCollapseCharIndexedObject(t) {
|
|
170
170
|
if (t == null || typeof t != "object" || Array.isArray(t)) return null;
|
|
171
|
-
const
|
|
172
|
-
if (
|
|
173
|
-
for (let a = 0; a <
|
|
174
|
-
if (
|
|
175
|
-
const
|
|
176
|
-
if (typeof
|
|
171
|
+
const o = Object.keys(t);
|
|
172
|
+
if (o.length === 0) return null;
|
|
173
|
+
for (let a = 0; a < o.length; a++) {
|
|
174
|
+
if (o[a] !== String(a)) return null;
|
|
175
|
+
const i = t[o[a]];
|
|
176
|
+
if (typeof i != "string" || i.length !== 1) return null;
|
|
177
177
|
}
|
|
178
|
-
return
|
|
178
|
+
return o.map((a) => t[a]).join("");
|
|
179
179
|
}
|
|
180
180
|
static isCodeExecution(t) {
|
|
181
181
|
return t.eventType === l.CodeExecutionResult || t.eventType === l.ExecutableCode;
|
|
182
182
|
}
|
|
183
183
|
};
|
|
184
|
-
|
|
185
|
-
let
|
|
186
|
-
var
|
|
187
|
-
for (var
|
|
188
|
-
(
|
|
189
|
-
return a &&
|
|
184
|
+
c(R, "InteractionPartUtils");
|
|
185
|
+
let Ft = R;
|
|
186
|
+
var $t = Object.defineProperty, Gt = Object.getOwnPropertyDescriptor, n = /* @__PURE__ */ c((s, t, o, a) => {
|
|
187
|
+
for (var i = a > 1 ? void 0 : a ? Gt(t, o) : t, p = s.length - 1, g; p >= 0; p--)
|
|
188
|
+
(g = s[p]) && (i = (a ? g(t, o, i) : g(i)) || i);
|
|
189
|
+
return a && i && $t(t, o, i), i;
|
|
190
190
|
}, "__decorateClass");
|
|
191
191
|
const x = {
|
|
192
192
|
// KernelContent derived types
|
|
@@ -202,38 +202,39 @@ const x = {
|
|
|
202
202
|
StreamingTextContent: "StreamingTextContent",
|
|
203
203
|
StreamingFunctionCallUpdateContent: "StreamingFunctionCallUpdateContent",
|
|
204
204
|
StreamingFinalFunctionCallContent: "StreamingFinalFunctionCallContent",
|
|
205
|
-
StreamingFinalFunctionResultContent: "StreamingFinalFunctionResultContent"
|
|
205
|
+
StreamingFinalFunctionResultContent: "StreamingFinalFunctionResultContent",
|
|
206
|
+
StreamingClientOutputContent: "StreamingClientOutputContent"
|
|
206
207
|
};
|
|
207
|
-
var
|
|
208
|
-
let yt = (
|
|
208
|
+
var z;
|
|
209
|
+
let yt = (z = class {
|
|
209
210
|
constructor() {
|
|
210
211
|
e(this, "label");
|
|
211
212
|
}
|
|
212
|
-
},
|
|
213
|
+
}, c(z, "AuthorRole"), z);
|
|
213
214
|
n([
|
|
214
215
|
r(String)
|
|
215
216
|
], yt.prototype, "label", 2);
|
|
216
217
|
yt = n([
|
|
217
|
-
|
|
218
|
+
m({ name: "AuthorRole" })
|
|
218
219
|
], yt);
|
|
219
|
-
var
|
|
220
|
-
let
|
|
220
|
+
var L;
|
|
221
|
+
let pt = (L = class {
|
|
221
222
|
constructor() {
|
|
222
223
|
e(this, "type");
|
|
223
224
|
e(this, "fullName");
|
|
224
225
|
}
|
|
225
|
-
},
|
|
226
|
+
}, c(L, "EventTypeInformation"), L);
|
|
226
227
|
n([
|
|
227
228
|
r(String)
|
|
228
|
-
],
|
|
229
|
+
], pt.prototype, "type", 2);
|
|
229
230
|
n([
|
|
230
231
|
r(String)
|
|
231
|
-
],
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
],
|
|
235
|
-
var
|
|
236
|
-
let
|
|
232
|
+
], pt.prototype, "fullName", 2);
|
|
233
|
+
pt = n([
|
|
234
|
+
m({ name: "EventTypeInformation" })
|
|
235
|
+
], pt);
|
|
236
|
+
var J;
|
|
237
|
+
let w = (J = class {
|
|
237
238
|
constructor() {
|
|
238
239
|
e(this, "id");
|
|
239
240
|
e(this, "name");
|
|
@@ -250,24 +251,24 @@ let U = (L = class {
|
|
|
250
251
|
id: this.id
|
|
251
252
|
};
|
|
252
253
|
}
|
|
253
|
-
},
|
|
254
|
+
}, c(J, "LlmArtifact"), J);
|
|
254
255
|
n([
|
|
255
256
|
r(String)
|
|
256
|
-
],
|
|
257
|
+
], w.prototype, "id", 2);
|
|
257
258
|
n([
|
|
258
259
|
r(String)
|
|
259
|
-
],
|
|
260
|
+
], w.prototype, "name", 2);
|
|
260
261
|
n([
|
|
261
262
|
r(String)
|
|
262
|
-
],
|
|
263
|
+
], w.prototype, "mimeType", 2);
|
|
263
264
|
n([
|
|
264
265
|
r(String)
|
|
265
|
-
],
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
],
|
|
269
|
-
var
|
|
270
|
-
let h = (
|
|
266
|
+
], w.prototype, "description", 2);
|
|
267
|
+
w = n([
|
|
268
|
+
m({ name: "LlmArtifact" })
|
|
269
|
+
], w);
|
|
270
|
+
var W;
|
|
271
|
+
let h = (W = class {
|
|
271
272
|
constructor() {
|
|
272
273
|
e(this, "mimeType");
|
|
273
274
|
// InnerContent is ignored (JsonIgnore in C#)
|
|
@@ -276,7 +277,7 @@ let h = (J = class {
|
|
|
276
277
|
e(this, "modelId");
|
|
277
278
|
e(this, "metadata");
|
|
278
279
|
}
|
|
279
|
-
},
|
|
280
|
+
}, c(W, "KernelContent"), W);
|
|
280
281
|
n([
|
|
281
282
|
r(String)
|
|
282
283
|
], h.prototype, "mimeType", 2);
|
|
@@ -284,13 +285,13 @@ n([
|
|
|
284
285
|
r(String)
|
|
285
286
|
], h.prototype, "modelId", 2);
|
|
286
287
|
n([
|
|
287
|
-
r(
|
|
288
|
+
r(Et)
|
|
288
289
|
], h.prototype, "metadata", 2);
|
|
289
290
|
h = n([
|
|
290
|
-
|
|
291
|
+
m({ name: "KernelContent" })
|
|
291
292
|
], h);
|
|
292
|
-
var
|
|
293
|
-
let D = (
|
|
293
|
+
var $;
|
|
294
|
+
let D = ($ = class {
|
|
294
295
|
constructor() {
|
|
295
296
|
e(this, "choiceIndex", 0);
|
|
296
297
|
// InnerContent is ignored (JsonIgnore in C#)
|
|
@@ -299,7 +300,7 @@ let D = (W = class {
|
|
|
299
300
|
e(this, "modelId");
|
|
300
301
|
e(this, "metadata");
|
|
301
302
|
}
|
|
302
|
-
},
|
|
303
|
+
}, c($, "StreamingKernelContent"), $);
|
|
303
304
|
n([
|
|
304
305
|
r(Number)
|
|
305
306
|
], D.prototype, "choiceIndex", 2);
|
|
@@ -310,10 +311,10 @@ n([
|
|
|
310
311
|
r(Object)
|
|
311
312
|
], D.prototype, "metadata", 2);
|
|
312
313
|
D = n([
|
|
313
|
-
|
|
314
|
+
m({ name: "StreamingKernelContent" })
|
|
314
315
|
], D);
|
|
315
|
-
var
|
|
316
|
-
let
|
|
316
|
+
var G;
|
|
317
|
+
let ft = (G = class extends h {
|
|
317
318
|
constructor() {
|
|
318
319
|
super();
|
|
319
320
|
e(this, "text");
|
|
@@ -325,74 +326,74 @@ let dt = ($ = class extends h {
|
|
|
325
326
|
toString() {
|
|
326
327
|
return this.text ?? "";
|
|
327
328
|
}
|
|
328
|
-
},
|
|
329
|
+
}, c(G, "TextContent"), G);
|
|
329
330
|
n([
|
|
330
331
|
r(String)
|
|
331
|
-
],
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
],
|
|
335
|
-
var
|
|
336
|
-
let
|
|
332
|
+
], ft.prototype, "text", 2);
|
|
333
|
+
ft = n([
|
|
334
|
+
m({ name: "TextContent" })
|
|
335
|
+
], ft);
|
|
336
|
+
var q;
|
|
337
|
+
let ut = (q = class extends D {
|
|
337
338
|
constructor() {
|
|
338
339
|
super();
|
|
339
340
|
e(this, "eventName");
|
|
340
341
|
e(this, "eventData");
|
|
341
342
|
e(this, "sessionId");
|
|
342
343
|
}
|
|
343
|
-
},
|
|
344
|
+
}, c(q, "StreamingToolEventContent"), q);
|
|
344
345
|
n([
|
|
345
346
|
r(String)
|
|
346
|
-
],
|
|
347
|
+
], ut.prototype, "eventName", 2);
|
|
347
348
|
n([
|
|
348
349
|
r(String)
|
|
349
|
-
],
|
|
350
|
+
], ut.prototype, "eventData", 2);
|
|
350
351
|
n([
|
|
351
352
|
r(String)
|
|
352
|
-
],
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
],
|
|
356
|
-
var
|
|
357
|
-
let
|
|
353
|
+
], ut.prototype, "sessionId", 2);
|
|
354
|
+
ut = n([
|
|
355
|
+
m({ name: "StreamingToolEventContent" })
|
|
356
|
+
], ut);
|
|
357
|
+
var B;
|
|
358
|
+
let P = (B = class extends h {
|
|
358
359
|
constructor() {
|
|
359
360
|
super();
|
|
360
361
|
e(this, "eventName");
|
|
361
362
|
e(this, "eventData");
|
|
362
363
|
e(this, "sessionId");
|
|
363
364
|
}
|
|
364
|
-
},
|
|
365
|
+
}, c(B, "ToolEventContent"), B);
|
|
365
366
|
n([
|
|
366
367
|
r(String)
|
|
367
|
-
],
|
|
368
|
+
], P.prototype, "eventName", 2);
|
|
368
369
|
n([
|
|
369
370
|
r(String)
|
|
370
|
-
],
|
|
371
|
+
], P.prototype, "eventData", 2);
|
|
371
372
|
n([
|
|
372
373
|
r(String)
|
|
373
|
-
],
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
],
|
|
377
|
-
var
|
|
378
|
-
let
|
|
374
|
+
], P.prototype, "sessionId", 2);
|
|
375
|
+
P = n([
|
|
376
|
+
m({ name: "ToolEventContent" })
|
|
377
|
+
], P);
|
|
378
|
+
var M;
|
|
379
|
+
let St = (M = class extends h {
|
|
379
380
|
constructor() {
|
|
380
381
|
super(...arguments);
|
|
381
382
|
e(this, "url");
|
|
382
383
|
e(this, "dataUri");
|
|
383
384
|
}
|
|
384
|
-
},
|
|
385
|
+
}, c(M, "ImageContent"), M);
|
|
385
386
|
n([
|
|
386
387
|
r(String)
|
|
387
|
-
],
|
|
388
|
+
], St.prototype, "url", 2);
|
|
388
389
|
n([
|
|
389
390
|
r(String)
|
|
390
|
-
],
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
],
|
|
394
|
-
var
|
|
395
|
-
let A = (
|
|
391
|
+
], St.prototype, "dataUri", 2);
|
|
392
|
+
St = n([
|
|
393
|
+
m({ name: "ImageContent" })
|
|
394
|
+
], St);
|
|
395
|
+
var K;
|
|
396
|
+
let A = (K = class extends h {
|
|
396
397
|
constructor() {
|
|
397
398
|
super(...arguments);
|
|
398
399
|
e(this, "id");
|
|
@@ -402,7 +403,7 @@ let A = (M = class extends h {
|
|
|
402
403
|
// Exception is not serializable - omit jsonMember decorator
|
|
403
404
|
e(this, "exception");
|
|
404
405
|
}
|
|
405
|
-
},
|
|
406
|
+
}, c(K, "FunctionCallContent"), K);
|
|
406
407
|
n([
|
|
407
408
|
r(String)
|
|
408
409
|
], A.prototype, "id", 2);
|
|
@@ -413,13 +414,13 @@ n([
|
|
|
413
414
|
r(String)
|
|
414
415
|
], A.prototype, "functionName", 2);
|
|
415
416
|
n([
|
|
416
|
-
r(
|
|
417
|
+
r(Et)
|
|
417
418
|
], A.prototype, "arguments", 2);
|
|
418
419
|
A = n([
|
|
419
|
-
|
|
420
|
+
m({ name: "FunctionCallContent" })
|
|
420
421
|
], A);
|
|
421
|
-
var
|
|
422
|
-
let
|
|
422
|
+
var H;
|
|
423
|
+
let N = (H = class extends D {
|
|
423
424
|
constructor() {
|
|
424
425
|
super(...arguments);
|
|
425
426
|
e(this, "id");
|
|
@@ -427,28 +428,32 @@ let I = (K = class extends D {
|
|
|
427
428
|
e(this, "arguments");
|
|
428
429
|
e(this, "isUi");
|
|
429
430
|
e(this, "friendlyArgsDescription");
|
|
431
|
+
e(this, "askUserComponent");
|
|
430
432
|
}
|
|
431
|
-
},
|
|
433
|
+
}, c(H, "StreamingFinalFunctionCallContent"), H);
|
|
432
434
|
n([
|
|
433
435
|
r(String, { name: "callId" })
|
|
434
|
-
],
|
|
436
|
+
], N.prototype, "id", 2);
|
|
435
437
|
n([
|
|
436
438
|
r(String, { name: "name" })
|
|
437
|
-
],
|
|
439
|
+
], N.prototype, "functionName", 2);
|
|
438
440
|
n([
|
|
439
441
|
r(String)
|
|
440
|
-
],
|
|
442
|
+
], N.prototype, "arguments", 2);
|
|
441
443
|
n([
|
|
442
444
|
r(Boolean)
|
|
443
|
-
],
|
|
445
|
+
], N.prototype, "isUi", 2);
|
|
444
446
|
n([
|
|
445
447
|
r(String)
|
|
446
|
-
],
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
],
|
|
450
|
-
|
|
451
|
-
|
|
448
|
+
], N.prototype, "friendlyArgsDescription", 2);
|
|
449
|
+
n([
|
|
450
|
+
r(String)
|
|
451
|
+
], N.prototype, "askUserComponent", 2);
|
|
452
|
+
N = n([
|
|
453
|
+
m({ name: "StreamingFinalFunctionCallContent" })
|
|
454
|
+
], N);
|
|
455
|
+
var Y;
|
|
456
|
+
let O = (Y = class extends h {
|
|
452
457
|
constructor() {
|
|
453
458
|
super(...arguments);
|
|
454
459
|
e(this, "id");
|
|
@@ -456,24 +461,24 @@ let R = (H = class extends h {
|
|
|
456
461
|
e(this, "functionName");
|
|
457
462
|
e(this, "result");
|
|
458
463
|
}
|
|
459
|
-
},
|
|
464
|
+
}, c(Y, "FunctionResultContent"), Y);
|
|
460
465
|
n([
|
|
461
466
|
r(String, { name: "callId" })
|
|
462
|
-
],
|
|
467
|
+
], O.prototype, "id", 2);
|
|
463
468
|
n([
|
|
464
469
|
r(String)
|
|
465
|
-
],
|
|
470
|
+
], O.prototype, "pluginName", 2);
|
|
466
471
|
n([
|
|
467
472
|
r(String)
|
|
468
|
-
],
|
|
473
|
+
], O.prototype, "functionName", 2);
|
|
469
474
|
n([
|
|
470
|
-
r(
|
|
471
|
-
],
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
],
|
|
475
|
-
var
|
|
476
|
-
let
|
|
475
|
+
r(Et)
|
|
476
|
+
], O.prototype, "result", 2);
|
|
477
|
+
O = n([
|
|
478
|
+
m({ name: "FunctionResultContent" })
|
|
479
|
+
], O);
|
|
480
|
+
var v;
|
|
481
|
+
let F = (v = class extends D {
|
|
477
482
|
constructor() {
|
|
478
483
|
super(...arguments);
|
|
479
484
|
e(this, "id");
|
|
@@ -482,54 +487,75 @@ let N = (Y = class extends D {
|
|
|
482
487
|
e(this, "result");
|
|
483
488
|
e(this, "isUi");
|
|
484
489
|
e(this, "clientOutput");
|
|
490
|
+
e(this, "askUserComponent");
|
|
485
491
|
}
|
|
486
|
-
},
|
|
492
|
+
}, c(v, "StreamingFinalFunctionResultContent"), v);
|
|
487
493
|
n([
|
|
488
494
|
r(String, { name: "callId" })
|
|
489
|
-
],
|
|
495
|
+
], F.prototype, "id", 2);
|
|
490
496
|
n([
|
|
491
497
|
r(String)
|
|
492
|
-
],
|
|
498
|
+
], F.prototype, "pluginName", 2);
|
|
493
499
|
n([
|
|
494
500
|
r(String)
|
|
495
|
-
],
|
|
501
|
+
], F.prototype, "functionName", 2);
|
|
496
502
|
n([
|
|
497
|
-
r(
|
|
498
|
-
],
|
|
503
|
+
r(Et)
|
|
504
|
+
], F.prototype, "result", 2);
|
|
499
505
|
n([
|
|
500
506
|
r(Boolean)
|
|
501
|
-
],
|
|
507
|
+
], F.prototype, "isUi", 2);
|
|
502
508
|
n([
|
|
503
509
|
r(String)
|
|
504
|
-
],
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
],
|
|
510
|
+
], F.prototype, "clientOutput", 2);
|
|
511
|
+
n([
|
|
512
|
+
r(String)
|
|
513
|
+
], F.prototype, "askUserComponent", 2);
|
|
514
|
+
F = n([
|
|
515
|
+
m({ name: "StreamingFinalFunctionResultContent" })
|
|
516
|
+
], F);
|
|
508
517
|
var Q;
|
|
509
|
-
let
|
|
518
|
+
let ct = (Q = class extends h {
|
|
510
519
|
constructor() {
|
|
511
520
|
super(...arguments);
|
|
512
521
|
e(this, "id");
|
|
513
522
|
e(this, "data");
|
|
514
523
|
}
|
|
515
|
-
},
|
|
524
|
+
}, c(Q, "FunctionClientOutputContent"), Q);
|
|
516
525
|
n([
|
|
517
526
|
r(String, { name: "callId" })
|
|
518
|
-
],
|
|
527
|
+
], ct.prototype, "id", 2);
|
|
519
528
|
n([
|
|
520
529
|
r(String)
|
|
521
|
-
],
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
],
|
|
530
|
+
], ct.prototype, "data", 2);
|
|
531
|
+
ct = n([
|
|
532
|
+
m({ name: "FunctionClientOutputContent" })
|
|
533
|
+
], ct);
|
|
525
534
|
var V;
|
|
526
|
-
let
|
|
535
|
+
let Tt = (V = class extends D {
|
|
536
|
+
constructor() {
|
|
537
|
+
super(...arguments);
|
|
538
|
+
e(this, "id");
|
|
539
|
+
e(this, "clientOutput");
|
|
540
|
+
}
|
|
541
|
+
}, c(V, "StreamingClientOutputContent"), V);
|
|
542
|
+
n([
|
|
543
|
+
r(String, { name: "callId" })
|
|
544
|
+
], Tt.prototype, "id", 2);
|
|
545
|
+
n([
|
|
546
|
+
r(String)
|
|
547
|
+
], Tt.prototype, "clientOutput", 2);
|
|
548
|
+
Tt = n([
|
|
549
|
+
m({ name: "StreamingClientOutputContent" })
|
|
550
|
+
], Tt);
|
|
551
|
+
var X;
|
|
552
|
+
let lt = (X = class extends h {
|
|
527
553
|
constructor() {
|
|
528
554
|
super(...arguments);
|
|
529
555
|
e(this, "name");
|
|
530
556
|
e(this, "args");
|
|
531
557
|
}
|
|
532
|
-
},
|
|
558
|
+
}, c(X, "UserUiContent"), X);
|
|
533
559
|
n([
|
|
534
560
|
r(String)
|
|
535
561
|
], lt.prototype, "name", 2);
|
|
@@ -537,27 +563,27 @@ n([
|
|
|
537
563
|
r(String)
|
|
538
564
|
], lt.prototype, "args", 2);
|
|
539
565
|
lt = n([
|
|
540
|
-
|
|
566
|
+
m({ name: "UserUiContent" })
|
|
541
567
|
], lt);
|
|
542
|
-
var
|
|
543
|
-
let
|
|
568
|
+
var Z;
|
|
569
|
+
let mt = (Z = class extends h {
|
|
544
570
|
constructor() {
|
|
545
571
|
super(...arguments);
|
|
546
572
|
e(this, "role");
|
|
547
573
|
e(this, "items");
|
|
548
574
|
}
|
|
549
|
-
},
|
|
575
|
+
}, c(Z, "ChatMessageContent"), Z);
|
|
550
576
|
n([
|
|
551
577
|
r(yt)
|
|
552
|
-
],
|
|
578
|
+
], mt.prototype, "role", 2);
|
|
553
579
|
n([
|
|
554
|
-
|
|
555
|
-
],
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
],
|
|
559
|
-
var
|
|
560
|
-
let
|
|
580
|
+
gt(() => h)
|
|
581
|
+
], mt.prototype, "items", 2);
|
|
582
|
+
mt = n([
|
|
583
|
+
m({ name: "ChatMessageContent" })
|
|
584
|
+
], mt);
|
|
585
|
+
var j;
|
|
586
|
+
let U = (j = class extends D {
|
|
561
587
|
constructor() {
|
|
562
588
|
super(...arguments);
|
|
563
589
|
e(this, "callId");
|
|
@@ -565,24 +591,24 @@ let w = (Z = class extends D {
|
|
|
565
591
|
e(this, "arguments");
|
|
566
592
|
e(this, "functionCallIndex", 0);
|
|
567
593
|
}
|
|
568
|
-
},
|
|
594
|
+
}, c(j, "StreamingFunctionCallUpdateContent"), j);
|
|
569
595
|
n([
|
|
570
596
|
r(String)
|
|
571
|
-
],
|
|
597
|
+
], U.prototype, "callId", 2);
|
|
572
598
|
n([
|
|
573
599
|
r(String)
|
|
574
|
-
],
|
|
600
|
+
], U.prototype, "name", 2);
|
|
575
601
|
n([
|
|
576
602
|
r(String)
|
|
577
|
-
],
|
|
603
|
+
], U.prototype, "arguments", 2);
|
|
578
604
|
n([
|
|
579
605
|
r(Number)
|
|
580
|
-
],
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
],
|
|
584
|
-
var
|
|
585
|
-
let
|
|
606
|
+
], U.prototype, "functionCallIndex", 2);
|
|
607
|
+
U = n([
|
|
608
|
+
m({ name: "StreamingFunctionCallUpdateContent" })
|
|
609
|
+
], U);
|
|
610
|
+
var tt;
|
|
611
|
+
let xt = (tt = class extends D {
|
|
586
612
|
constructor() {
|
|
587
613
|
super(...arguments);
|
|
588
614
|
e(this, "text");
|
|
@@ -590,15 +616,15 @@ let St = (j = class extends D {
|
|
|
590
616
|
// Not decorated with @jsonMember
|
|
591
617
|
e(this, "encoding");
|
|
592
618
|
}
|
|
593
|
-
},
|
|
619
|
+
}, c(tt, "StreamingTextContent"), tt);
|
|
594
620
|
n([
|
|
595
621
|
r(String)
|
|
596
|
-
],
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
],
|
|
600
|
-
var
|
|
601
|
-
let
|
|
622
|
+
], xt.prototype, "text", 2);
|
|
623
|
+
xt = n([
|
|
624
|
+
m({ name: "StreamingTextContent" })
|
|
625
|
+
], xt);
|
|
626
|
+
var et;
|
|
627
|
+
let ht = (et = class extends D {
|
|
602
628
|
constructor() {
|
|
603
629
|
super(...arguments);
|
|
604
630
|
e(this, "text");
|
|
@@ -606,35 +632,35 @@ let Tt = (tt = class extends D {
|
|
|
606
632
|
// Not decorated with @jsonMember
|
|
607
633
|
e(this, "encoding");
|
|
608
634
|
}
|
|
609
|
-
},
|
|
635
|
+
}, c(et, "StreamingReasoningContent"), et);
|
|
610
636
|
n([
|
|
611
637
|
r(String)
|
|
612
|
-
],
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
],
|
|
616
|
-
var
|
|
617
|
-
let
|
|
638
|
+
], ht.prototype, "text", 2);
|
|
639
|
+
ht = n([
|
|
640
|
+
m({ name: "StreamingReasoningContent" })
|
|
641
|
+
], ht);
|
|
642
|
+
var nt;
|
|
643
|
+
let k = (nt = class {
|
|
618
644
|
constructor() {
|
|
619
645
|
e(this, "instructionCategory", "");
|
|
620
646
|
e(this, "description", "");
|
|
621
647
|
e(this, "interactionId", "");
|
|
622
648
|
}
|
|
623
|
-
},
|
|
649
|
+
}, c(nt, "InstructionSummary"), nt);
|
|
624
650
|
n([
|
|
625
651
|
r(String)
|
|
626
|
-
],
|
|
652
|
+
], k.prototype, "instructionCategory", 2);
|
|
627
653
|
n([
|
|
628
654
|
r(String)
|
|
629
|
-
],
|
|
655
|
+
], k.prototype, "description", 2);
|
|
630
656
|
n([
|
|
631
657
|
r(String)
|
|
632
|
-
],
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
],
|
|
636
|
-
var
|
|
637
|
-
let
|
|
658
|
+
], k.prototype, "interactionId", 2);
|
|
659
|
+
k = n([
|
|
660
|
+
m({ name: "InstructionSummary" })
|
|
661
|
+
], k);
|
|
662
|
+
var it;
|
|
663
|
+
let C = (it = class {
|
|
638
664
|
constructor() {
|
|
639
665
|
e(this, "size", 0);
|
|
640
666
|
e(this, "originalSize", 0);
|
|
@@ -645,36 +671,36 @@ let E = (nt = class {
|
|
|
645
671
|
e(this, "id");
|
|
646
672
|
e(this, "instructionSummaries", []);
|
|
647
673
|
}
|
|
648
|
-
},
|
|
674
|
+
}, c(it, "SessionInformation"), it);
|
|
649
675
|
n([
|
|
650
676
|
r(Number)
|
|
651
|
-
],
|
|
677
|
+
], C.prototype, "size", 2);
|
|
652
678
|
n([
|
|
653
679
|
r(Number)
|
|
654
|
-
],
|
|
680
|
+
], C.prototype, "originalSize", 2);
|
|
655
681
|
n([
|
|
656
682
|
r(Number)
|
|
657
|
-
],
|
|
683
|
+
], C.prototype, "ratio", 2);
|
|
658
684
|
n([
|
|
659
685
|
r(Number)
|
|
660
|
-
],
|
|
686
|
+
], C.prototype, "previousRatio", 2);
|
|
661
687
|
n([
|
|
662
688
|
r(Number)
|
|
663
|
-
],
|
|
689
|
+
], C.prototype, "threshold", 2);
|
|
664
690
|
n([
|
|
665
691
|
r(Number)
|
|
666
|
-
],
|
|
692
|
+
], C.prototype, "maxSize", 2);
|
|
667
693
|
n([
|
|
668
694
|
r(String)
|
|
669
|
-
],
|
|
695
|
+
], C.prototype, "id", 2);
|
|
670
696
|
n([
|
|
671
|
-
|
|
672
|
-
],
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
],
|
|
676
|
-
var
|
|
677
|
-
let S = (
|
|
697
|
+
gt(k)
|
|
698
|
+
], C.prototype, "instructionSummaries", 2);
|
|
699
|
+
C = n([
|
|
700
|
+
m({ name: "SessionInformation" })
|
|
701
|
+
], C);
|
|
702
|
+
var ot;
|
|
703
|
+
let S = (ot = class {
|
|
678
704
|
constructor() {
|
|
679
705
|
e(this, "timestamp");
|
|
680
706
|
e(this, "mimeType");
|
|
@@ -695,7 +721,7 @@ let S = (it = class {
|
|
|
695
721
|
e(this, "subAgentName");
|
|
696
722
|
e(this, "text");
|
|
697
723
|
}
|
|
698
|
-
},
|
|
724
|
+
}, c(ot, "LlmEvent"), ot);
|
|
699
725
|
n([
|
|
700
726
|
r(Number)
|
|
701
727
|
], S.prototype, "timestamp", 2);
|
|
@@ -718,13 +744,13 @@ n([
|
|
|
718
744
|
r(String)
|
|
719
745
|
], S.prototype, "interactionId", 2);
|
|
720
746
|
n([
|
|
721
|
-
r(
|
|
747
|
+
r(C)
|
|
722
748
|
], S.prototype, "sessionInformation", 2);
|
|
723
749
|
n([
|
|
724
|
-
r(
|
|
750
|
+
r(pt)
|
|
725
751
|
], S.prototype, "eventType", 2);
|
|
726
752
|
n([
|
|
727
|
-
|
|
753
|
+
gt(w)
|
|
728
754
|
], S.prototype, "artifactsGenerated", 2);
|
|
729
755
|
n([
|
|
730
756
|
r(String)
|
|
@@ -736,16 +762,16 @@ n([
|
|
|
736
762
|
r(String)
|
|
737
763
|
], S.prototype, "command", 2);
|
|
738
764
|
n([
|
|
739
|
-
r(
|
|
765
|
+
r(mt)
|
|
740
766
|
], S.prototype, "content", 2);
|
|
741
767
|
n([
|
|
742
|
-
|
|
768
|
+
gt(() => D)
|
|
743
769
|
], S.prototype, "streamingParts", 2);
|
|
744
770
|
S = n([
|
|
745
|
-
|
|
771
|
+
m({ name: "LlmEvent" })
|
|
746
772
|
], S);
|
|
747
|
-
var
|
|
748
|
-
let
|
|
773
|
+
var rt;
|
|
774
|
+
let E = (rt = class {
|
|
749
775
|
constructor() {
|
|
750
776
|
e(this, "timeStamp");
|
|
751
777
|
e(this, "partialText");
|
|
@@ -758,42 +784,42 @@ let C = (ot = class {
|
|
|
758
784
|
e(this, "partialEventType");
|
|
759
785
|
e(this, "subAgentId");
|
|
760
786
|
}
|
|
761
|
-
},
|
|
787
|
+
}, c(rt, "PartialLlmEvent"), rt);
|
|
762
788
|
n([
|
|
763
789
|
r(Number, { name: "ts" })
|
|
764
|
-
],
|
|
790
|
+
], E.prototype, "timeStamp", 2);
|
|
765
791
|
n([
|
|
766
792
|
r(String, { name: "pt" })
|
|
767
|
-
],
|
|
793
|
+
], E.prototype, "partialText", 2);
|
|
768
794
|
n([
|
|
769
795
|
r(String, { name: "pr" })
|
|
770
|
-
],
|
|
796
|
+
], E.prototype, "partialReasoning", 2);
|
|
771
797
|
n([
|
|
772
798
|
r(String, { name: "fn" })
|
|
773
|
-
],
|
|
799
|
+
], E.prototype, "functionName", 2);
|
|
774
800
|
n([
|
|
775
|
-
|
|
776
|
-
],
|
|
801
|
+
gt(() => D)
|
|
802
|
+
], E.prototype, "streamingParts", 2);
|
|
777
803
|
n([
|
|
778
804
|
r(String, { name: "fid" })
|
|
779
|
-
],
|
|
805
|
+
], E.prototype, "functionCallId", 2);
|
|
780
806
|
n([
|
|
781
807
|
r(String, { name: "tp" })
|
|
782
|
-
],
|
|
808
|
+
], E.prototype, "type", 2);
|
|
783
809
|
n([
|
|
784
810
|
r(String, { name: "itid" })
|
|
785
|
-
],
|
|
811
|
+
], E.prototype, "iteractionId", 2);
|
|
786
812
|
n([
|
|
787
|
-
r(
|
|
788
|
-
],
|
|
813
|
+
r(pt)
|
|
814
|
+
], E.prototype, "partialEventType", 2);
|
|
789
815
|
n([
|
|
790
816
|
r(String, { name: "said" })
|
|
791
|
-
],
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
],
|
|
795
|
-
var
|
|
796
|
-
let
|
|
817
|
+
], E.prototype, "subAgentId", 2);
|
|
818
|
+
E = n([
|
|
819
|
+
m({ name: "PartialLlmEvent" })
|
|
820
|
+
], E);
|
|
821
|
+
var at;
|
|
822
|
+
let I = (at = class {
|
|
797
823
|
constructor() {
|
|
798
824
|
e(this, "type");
|
|
799
825
|
e(this, "event");
|
|
@@ -804,45 +830,45 @@ let F = (rt = class {
|
|
|
804
830
|
e(this, "subAgentName");
|
|
805
831
|
e(this, "seq");
|
|
806
832
|
}
|
|
807
|
-
},
|
|
833
|
+
}, c(at, "StreamingResponse"), at);
|
|
808
834
|
n([
|
|
809
835
|
r(String)
|
|
810
|
-
],
|
|
836
|
+
], I.prototype, "type", 2);
|
|
811
837
|
n([
|
|
812
838
|
r(S)
|
|
813
|
-
],
|
|
839
|
+
], I.prototype, "event", 2);
|
|
814
840
|
n([
|
|
815
841
|
r(String)
|
|
816
|
-
],
|
|
842
|
+
], I.prototype, "sessionId", 2);
|
|
817
843
|
n([
|
|
818
844
|
r(String)
|
|
819
|
-
],
|
|
845
|
+
], I.prototype, "accessToken", 2);
|
|
820
846
|
n([
|
|
821
|
-
r(
|
|
822
|
-
],
|
|
847
|
+
r(E, { name: "pe" })
|
|
848
|
+
], I.prototype, "partialEvent", 2);
|
|
823
849
|
n([
|
|
824
850
|
r(String)
|
|
825
|
-
],
|
|
851
|
+
], I.prototype, "subAgentId", 2);
|
|
826
852
|
n([
|
|
827
853
|
r(String)
|
|
828
|
-
],
|
|
854
|
+
], I.prototype, "subAgentName", 2);
|
|
829
855
|
n([
|
|
830
856
|
r(Number)
|
|
831
|
-
],
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
],
|
|
835
|
-
var
|
|
836
|
-
let Ct = (
|
|
857
|
+
], I.prototype, "seq", 2);
|
|
858
|
+
I = n([
|
|
859
|
+
m({ name: "StreamingResponse" })
|
|
860
|
+
], I);
|
|
861
|
+
var st;
|
|
862
|
+
let Ct = (st = class {
|
|
837
863
|
constructor() {
|
|
838
864
|
e(this, "events");
|
|
839
865
|
}
|
|
840
|
-
},
|
|
866
|
+
}, c(st, "Payload"), st);
|
|
841
867
|
n([
|
|
842
|
-
|
|
868
|
+
gt(S)
|
|
843
869
|
], Ct.prototype, "events", 2);
|
|
844
870
|
Ct = n([
|
|
845
|
-
|
|
871
|
+
m({ name: "Payload" })
|
|
846
872
|
], Ct);
|
|
847
873
|
const b = class b {
|
|
848
874
|
constructor(t) {
|
|
@@ -879,10 +905,10 @@ const b = class b {
|
|
|
879
905
|
e(this, "visible", !0);
|
|
880
906
|
this.interactionId = t, this.author = "main";
|
|
881
907
|
}
|
|
882
|
-
static createErrorEvent(t,
|
|
883
|
-
const a = new b(
|
|
908
|
+
static createErrorEvent(t, o) {
|
|
909
|
+
const a = new b(o);
|
|
884
910
|
a.turn_complete = !0, a.partial = !1, a.parts = [];
|
|
885
|
-
const
|
|
911
|
+
const i = {
|
|
886
912
|
eventType: l.ServerError,
|
|
887
913
|
errorDetails: {
|
|
888
914
|
errorMessage: t
|
|
@@ -895,140 +921,155 @@ const b = class b {
|
|
|
895
921
|
mustPush: !1,
|
|
896
922
|
textAppendable: !1
|
|
897
923
|
};
|
|
898
|
-
return a.parts.push(
|
|
924
|
+
return a.parts.push(i), a;
|
|
899
925
|
}
|
|
900
926
|
static parseFlatPropertiesTypedEvent(t) {
|
|
901
|
-
var a,
|
|
902
|
-
const
|
|
903
|
-
if (
|
|
927
|
+
var a, i, p;
|
|
928
|
+
const o = new b(t.interactionId);
|
|
929
|
+
if (o.serverError = t.serverError, !t.interactionId)
|
|
904
930
|
throw new Error("Interaction ID is required");
|
|
905
|
-
switch (
|
|
931
|
+
switch (o.model_session_id = "", o.server_session_id = null, o.asyncFinalResponse = t.turnComplete, o.command = (a = t.command) == null ? void 0 : a.toString(), t.sessionInformation && (o.session_information = t.sessionInformation), (!t.author || t.author == "") && console.warn('[ServerEvent] event with no author; defaulting to "main"', {
|
|
906
932
|
interactionId: t.interactionId,
|
|
907
933
|
turnComplete: t.turnComplete
|
|
908
934
|
}), t == null ? void 0 : t.author) {
|
|
909
|
-
case
|
|
910
|
-
|
|
935
|
+
case Jt:
|
|
936
|
+
o.author = "tool";
|
|
911
937
|
break;
|
|
912
938
|
case "system":
|
|
913
|
-
|
|
939
|
+
o.author = "system";
|
|
914
940
|
break;
|
|
915
941
|
default:
|
|
916
|
-
|
|
942
|
+
o.author = "main";
|
|
917
943
|
}
|
|
918
|
-
return
|
|
944
|
+
return o.mimeType = t.mimeType, o.created = new Date(t.timestamp), o.eventType = l.NotDefined, o.partial = ((p = (i = t.partial) == null ? void 0 : i.toString()) == null ? void 0 : p.toLowerCase()) === "true", o.turn_complete = t.turnComplete, o.visible = t.visible, o.isFinalResponse = t.turnComplete ?? !1, o.artifactsDelta = [], t.artifactsGenerated && t.artifactsGenerated.length > 0 && (o.created = new Date(t.timestamp), o.llmArtifacts = t.artifactsGenerated), o.subAgentId = t.subAgentId, o.subAgentName = t.subAgentName, o;
|
|
919
945
|
}
|
|
920
946
|
static getPartType(t) {
|
|
921
|
-
return t instanceof
|
|
947
|
+
return t instanceof ft ? "TextContent" : t instanceof A ? "FunctionCallContent" : t instanceof O ? "FunctionResultContent" : t instanceof U ? "StreamingFunctionCallUpdateContent" : t instanceof N ? "StreamingFinalFunctionCallContent" : t instanceof F ? "StreamingFinalFunctionResultContent" : t instanceof ct ? "FunctionClientOutputContent" : t instanceof lt ? "UserUiContent" : t instanceof xt ? "StreamingTextContent" : t instanceof ht ? "StreamingReasoningContent" : t instanceof P ? "ToolEventContent" : t instanceof ut ? "StreamingToolEventContent" : "Unknown";
|
|
922
948
|
}
|
|
923
949
|
static parseFromTypedEvent(t) {
|
|
924
|
-
var
|
|
925
|
-
const
|
|
926
|
-
if (
|
|
927
|
-
return
|
|
950
|
+
var p, g, f, _, It, Nt, bt, At;
|
|
951
|
+
const o = b.parseFlatPropertiesTypedEvent(t);
|
|
952
|
+
if (o.serverError)
|
|
953
|
+
return o.parts.push(Ft.fromError(o.serverError)), o;
|
|
928
954
|
if (!t.content && !t.streamingParts)
|
|
929
|
-
return
|
|
930
|
-
|
|
931
|
-
const a = [...((
|
|
932
|
-
|
|
955
|
+
return o;
|
|
956
|
+
o.parts = [];
|
|
957
|
+
const a = [...((p = t.content) == null ? void 0 : p.items) ?? [], ...t.streamingParts ?? []];
|
|
958
|
+
o.eventType = Wt(((g = t.eventType) == null ? void 0 : g.type) ?? "");
|
|
933
959
|
for (const y of a) {
|
|
934
|
-
let
|
|
960
|
+
let u = {
|
|
935
961
|
id: "",
|
|
936
|
-
author:
|
|
937
|
-
eventType:
|
|
962
|
+
author: o.author,
|
|
963
|
+
eventType: o.eventType,
|
|
938
964
|
created: /* @__PURE__ */ new Date(),
|
|
939
|
-
visible:
|
|
940
|
-
partial:
|
|
965
|
+
visible: o.visible,
|
|
966
|
+
partial: o.partial,
|
|
941
967
|
isStillWriting: !1,
|
|
942
968
|
mustPush: !1,
|
|
943
969
|
textAppendable: !1
|
|
944
970
|
};
|
|
945
971
|
const T = b.getPartType(y);
|
|
946
972
|
if (T == x.FunctionCallContent || T == x.FunctionResultContent || T == x.StreamingFinalFunctionCallContent || T == x.StreamingFinalFunctionResultContent) {
|
|
947
|
-
var
|
|
948
|
-
if (
|
|
949
|
-
|
|
950
|
-
errorMessage: JSON.stringify(
|
|
951
|
-
},
|
|
973
|
+
var i = y;
|
|
974
|
+
if (i.id == "Server Error")
|
|
975
|
+
u.eventType = l.ServerError, u.errorDetails = {
|
|
976
|
+
errorMessage: JSON.stringify(i.arguments)
|
|
977
|
+
}, u.functionDetails = void 0;
|
|
952
978
|
else {
|
|
953
|
-
|
|
979
|
+
u.eventType = T == x.FunctionCallContent || T == x.StreamingFinalFunctionCallContent ? l.FunctionCall : l.FunctionResponse;
|
|
954
980
|
let d;
|
|
955
981
|
try {
|
|
956
|
-
if (
|
|
957
|
-
if (typeof
|
|
958
|
-
d =
|
|
959
|
-
else if (typeof
|
|
960
|
-
const
|
|
961
|
-
d = typeof
|
|
982
|
+
if (i != null && i.result)
|
|
983
|
+
if (typeof i.result == "object")
|
|
984
|
+
d = i.result;
|
|
985
|
+
else if (typeof i.result == "string") {
|
|
986
|
+
const dt = JSON.parse(i.result);
|
|
987
|
+
d = typeof dt == "object" && dt !== null ? dt : i.result;
|
|
962
988
|
} else
|
|
963
|
-
d =
|
|
964
|
-
} catch (
|
|
965
|
-
console.warn("Parse function error",
|
|
989
|
+
d = i.result;
|
|
990
|
+
} catch (dt) {
|
|
991
|
+
console.warn("Parse function error", dt), d = i == null ? void 0 : i.result;
|
|
966
992
|
}
|
|
967
|
-
|
|
993
|
+
u.thoughtDetails = {
|
|
968
994
|
text: ""
|
|
969
|
-
},
|
|
970
|
-
id: (
|
|
971
|
-
args:
|
|
972
|
-
start: T == x.FunctionCallContent ?
|
|
973
|
-
end: T == x.FunctionResultContent ?
|
|
974
|
-
text: JSON.stringify(
|
|
975
|
-
name: (
|
|
976
|
-
status:
|
|
995
|
+
}, u.functionDetails = {
|
|
996
|
+
id: (i == null ? void 0 : i.id) ?? "",
|
|
997
|
+
args: i == null ? void 0 : i.arguments,
|
|
998
|
+
start: T == x.FunctionCallContent ? o.created : void 0,
|
|
999
|
+
end: T == x.FunctionResultContent ? o.created : void 0,
|
|
1000
|
+
text: JSON.stringify(i == null ? void 0 : i.arguments) ?? "",
|
|
1001
|
+
name: (i == null ? void 0 : i.functionName) ?? "",
|
|
1002
|
+
status: u.eventType == l.FunctionCall ? "Executing" : "Done",
|
|
977
1003
|
response: d,
|
|
978
|
-
isUi: (
|
|
1004
|
+
isUi: (i == null ? void 0 : i.isUi) === !0 || typeof (i == null ? void 0 : i.arguments) == "object" && (i == null ? void 0 : i.arguments) !== null && i.arguments.__isUi === !0,
|
|
979
1005
|
// Friendly args summary for the chip — mirrors __isUi: the live streaming part
|
|
980
1006
|
// carries `friendlyArgsDescription`; the persisted FunctionCall carries
|
|
981
1007
|
// `__argsDescription` in its args (see StreamingFinalFunctionCallContent.ToKernelContent).
|
|
982
|
-
argsDescription: (
|
|
1008
|
+
argsDescription: (i == null ? void 0 : i.friendlyArgsDescription) ?? (typeof (i == null ? void 0 : i.arguments) == "object" && (i == null ? void 0 : i.arguments) !== null ? i.arguments.__argsDescription : void 0),
|
|
983
1009
|
// Client-only payload riding the RESULT event. The streaming form carries it
|
|
984
1010
|
// top-level (clientOutput); when the runtime collapses that to a sealed
|
|
985
1011
|
// FunctionResultContent (ToKernelContent) the payload rides in metadata, and
|
|
986
1012
|
// the client's part flattener keeps THAT collapsed part — so read both. Calls
|
|
987
1013
|
// leave it undefined. The persisted-replay form folds in via FunctionClientOutputContent.
|
|
988
|
-
clientOutput: (
|
|
989
|
-
|
|
1014
|
+
clientOutput: (i == null ? void 0 : i.clientOutput) ?? ((f = i == null ? void 0 : i.metadata) == null ? void 0 : f.clientOutput),
|
|
1015
|
+
// Ask-user component ([KernelUIComponent]). Mirrors __isUi/clientOutput across the
|
|
1016
|
+
// three shapes: the live streaming part carries it top-level (askUserComponent), a
|
|
1017
|
+
// persisted FunctionCall carries `__askUserComponent` in its args, and a collapsed
|
|
1018
|
+
// FunctionResult carries it in metadata (see the two ToKernelContent methods).
|
|
1019
|
+
askUserComponent: (i == null ? void 0 : i.askUserComponent) ?? (typeof (i == null ? void 0 : i.arguments) == "object" && (i == null ? void 0 : i.arguments) !== null ? i.arguments.__askUserComponent : void 0) ?? ((_ = i == null ? void 0 : i.metadata) == null ? void 0 : _.askUserComponent)
|
|
1020
|
+
}, u.functionDetails.isAskUser = !!u.functionDetails.askUserComponent, t.text = i == null ? void 0 : i.arguments;
|
|
990
1021
|
}
|
|
991
1022
|
} else if (T == x.StreamingTextContent)
|
|
992
|
-
|
|
993
|
-
`),
|
|
1023
|
+
u.eventType = l.Text, u.text = (It = y == null ? void 0 : y.text) == null ? void 0 : It.replaceAll("\\n", `
|
|
1024
|
+
`), u.textLastChunk = y.text, t.text = u.text;
|
|
994
1025
|
else if (T == x.TextContent)
|
|
995
|
-
|
|
996
|
-
`),
|
|
1026
|
+
u.eventType = l.Text, u.text = (Nt = y == null ? void 0 : y.text) == null ? void 0 : Nt.replaceAll("\\n", `
|
|
1027
|
+
`), u.textLastChunk = y.text, t.text = u.text;
|
|
997
1028
|
else if (T == x.StreamingReasoningContent)
|
|
998
|
-
|
|
999
|
-
text: ((
|
|
1029
|
+
u.eventType = l.Thought, u.thoughtDetails = {
|
|
1030
|
+
text: ((bt = y == null ? void 0 : y.text) == null ? void 0 : bt.replaceAll("\\n", `
|
|
1000
1031
|
`)) ?? ""
|
|
1001
|
-
},
|
|
1002
|
-
`),
|
|
1032
|
+
}, u.text = (At = y == null ? void 0 : y.text) == null ? void 0 : At.replaceAll("\\n", `
|
|
1033
|
+
`), u.textLastChunk = y.text, t.text = u.text;
|
|
1003
1034
|
else if (T == x.StreamingFunctionCallUpdateContent) {
|
|
1004
1035
|
const d = y;
|
|
1005
|
-
|
|
1036
|
+
u.eventType = l.PartialFunctionCall, u.text = d.arguments, u.thoughtDetails = {
|
|
1006
1037
|
text: ""
|
|
1007
|
-
},
|
|
1038
|
+
}, u.functionDetails = {
|
|
1008
1039
|
id: d.callId ?? "",
|
|
1009
|
-
text:
|
|
1040
|
+
text: u.text,
|
|
1010
1041
|
status: "Composing",
|
|
1011
1042
|
name: (d == null ? void 0 : d.name) ?? "Unknown"
|
|
1012
|
-
}, t.text =
|
|
1043
|
+
}, t.text = u.text;
|
|
1013
1044
|
} else if (T == x.ToolEventContent || T == x.StreamingToolEventContent) {
|
|
1014
|
-
|
|
1045
|
+
u.eventType = l.ToolEvent;
|
|
1015
1046
|
const d = y;
|
|
1016
|
-
|
|
1047
|
+
u.toolDetails = {
|
|
1017
1048
|
eventName: d.eventName ?? "",
|
|
1018
1049
|
eventData: d.eventData ?? "",
|
|
1019
1050
|
sessionId: d.sessionId ?? void 0
|
|
1020
1051
|
};
|
|
1021
1052
|
} else if (T == x.FunctionClientOutputContent) {
|
|
1022
1053
|
const d = y;
|
|
1023
|
-
|
|
1054
|
+
u.eventType = l.FunctionClientOutput, u.functionDetails = {
|
|
1024
1055
|
id: d.id ?? "",
|
|
1025
1056
|
name: "",
|
|
1026
1057
|
status: "Done",
|
|
1027
1058
|
clientOutput: d.data
|
|
1028
1059
|
};
|
|
1060
|
+
} else if (T == x.StreamingClientOutputContent) {
|
|
1061
|
+
const d = y;
|
|
1062
|
+
u.eventType = l.FunctionClientOutput, u.functionDetails = {
|
|
1063
|
+
id: d.id ?? "",
|
|
1064
|
+
name: "",
|
|
1065
|
+
// The parked call stays Executing; interactionService folds only clientOutput onto it and
|
|
1066
|
+
// leaves the existing status untouched, so this is just to satisfy the type.
|
|
1067
|
+
status: "Executing",
|
|
1068
|
+
clientOutput: d.clientOutput
|
|
1069
|
+
};
|
|
1029
1070
|
} else if (T == x.UserUiContent) {
|
|
1030
1071
|
const d = y;
|
|
1031
|
-
|
|
1072
|
+
u.eventType = l.UserAnswer, u.author = "user", u.functionDetails = {
|
|
1032
1073
|
id: "",
|
|
1033
1074
|
name: d.name ?? "",
|
|
1034
1075
|
args: d.args,
|
|
@@ -1036,14 +1077,14 @@ const b = class b {
|
|
|
1036
1077
|
isUi: !0
|
|
1037
1078
|
};
|
|
1038
1079
|
} else {
|
|
1039
|
-
|
|
1080
|
+
u.eventType = l.NotDefined, console.warn(`Got a unmapped event_type:${o.eventType}, data:`, T, y);
|
|
1040
1081
|
continue;
|
|
1041
1082
|
}
|
|
1042
|
-
|
|
1083
|
+
o.parts.push(u);
|
|
1043
1084
|
}
|
|
1044
|
-
return
|
|
1085
|
+
return o;
|
|
1045
1086
|
}
|
|
1046
|
-
static createFromThought(t,
|
|
1087
|
+
static createFromThought(t, o) {
|
|
1047
1088
|
return {
|
|
1048
1089
|
author: "main",
|
|
1049
1090
|
visible: !0,
|
|
@@ -1061,9 +1102,9 @@ const b = class b {
|
|
|
1061
1102
|
parts: [
|
|
1062
1103
|
{
|
|
1063
1104
|
thoughtDetails: {
|
|
1064
|
-
text:
|
|
1105
|
+
text: o
|
|
1065
1106
|
},
|
|
1066
|
-
id:
|
|
1107
|
+
id: Dt(),
|
|
1067
1108
|
created: /* @__PURE__ */ new Date(),
|
|
1068
1109
|
eventType: l.Thought,
|
|
1069
1110
|
author: "main",
|
|
@@ -1075,9 +1116,9 @@ const b = class b {
|
|
|
1075
1116
|
]
|
|
1076
1117
|
};
|
|
1077
1118
|
}
|
|
1078
|
-
static createFromFunctionName(t,
|
|
1079
|
-
const
|
|
1080
|
-
return
|
|
1119
|
+
static createFromFunctionName(t, o, a) {
|
|
1120
|
+
const i = b.createFromText("", o);
|
|
1121
|
+
return i.parts[0].text = void 0, i.parts[0].thoughtDetails = void 0, i.parts[0].textAppendable = !1, i.parts[0].mustPush = !0, i.parts[0].functionDetails = {
|
|
1081
1122
|
name: t,
|
|
1082
1123
|
id: "callId",
|
|
1083
1124
|
status: "Executing",
|
|
@@ -1085,15 +1126,15 @@ const b = class b {
|
|
|
1085
1126
|
end: void 0,
|
|
1086
1127
|
text: "dfsdfdf",
|
|
1087
1128
|
args: a
|
|
1088
|
-
},
|
|
1129
|
+
}, i;
|
|
1089
1130
|
}
|
|
1090
|
-
static createFromText(t,
|
|
1131
|
+
static createFromText(t, o, a) {
|
|
1091
1132
|
return {
|
|
1092
1133
|
author: "main",
|
|
1093
1134
|
visible: !0,
|
|
1094
1135
|
eventType: l.Text,
|
|
1095
1136
|
uniqueId: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
1096
|
-
interactionId:
|
|
1137
|
+
interactionId: o,
|
|
1097
1138
|
allEventTypes: [l.Text],
|
|
1098
1139
|
artifactsDelta: [""],
|
|
1099
1140
|
model_session_id: "",
|
|
@@ -1111,7 +1152,7 @@ const b = class b {
|
|
|
1111
1152
|
thoughtDetails: a ? {
|
|
1112
1153
|
text: a
|
|
1113
1154
|
} : void 0,
|
|
1114
|
-
id:
|
|
1155
|
+
id: Dt(),
|
|
1115
1156
|
created: /* @__PURE__ */ new Date(),
|
|
1116
1157
|
// Part eventType MUST match the outer event's eventType.
|
|
1117
1158
|
// Was previously `Thought` here, which made the merger
|
|
@@ -1131,146 +1172,147 @@ const b = class b {
|
|
|
1131
1172
|
};
|
|
1132
1173
|
}
|
|
1133
1174
|
};
|
|
1134
|
-
|
|
1135
|
-
let
|
|
1136
|
-
const
|
|
1175
|
+
c(b, "ServerEvent");
|
|
1176
|
+
let Ut = b;
|
|
1177
|
+
const wt = [
|
|
1137
1178
|
// KernelContent derived types
|
|
1138
|
-
dt,
|
|
1139
1179
|
ft,
|
|
1180
|
+
St,
|
|
1140
1181
|
A,
|
|
1182
|
+
P,
|
|
1141
1183
|
O,
|
|
1142
|
-
R,
|
|
1143
|
-
ut,
|
|
1144
|
-
lt,
|
|
1145
1184
|
ct,
|
|
1185
|
+
lt,
|
|
1186
|
+
mt,
|
|
1146
1187
|
// StreamingKernelContent derived types
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
I,
|
|
1188
|
+
xt,
|
|
1189
|
+
U,
|
|
1190
|
+
ht,
|
|
1151
1191
|
N,
|
|
1152
|
-
|
|
1192
|
+
F,
|
|
1193
|
+
Tt,
|
|
1194
|
+
k
|
|
1153
1195
|
];
|
|
1154
|
-
function
|
|
1155
|
-
return
|
|
1196
|
+
function qt(s) {
|
|
1197
|
+
return s.name;
|
|
1156
1198
|
}
|
|
1157
|
-
|
|
1158
|
-
function
|
|
1159
|
-
t.constructor !==
|
|
1199
|
+
c(qt, "getConstructorName");
|
|
1200
|
+
function Pt(s, t, o, a) {
|
|
1201
|
+
t.constructor !== o && (s.$type = (a == null ? void 0 : a.name) ?? qt(t.constructor));
|
|
1160
1202
|
}
|
|
1161
|
-
|
|
1162
|
-
function
|
|
1163
|
-
if (
|
|
1164
|
-
return t.get(
|
|
1203
|
+
c(Pt, "dotNetTypeEmitter");
|
|
1204
|
+
function kt(s, t) {
|
|
1205
|
+
if (s.$type != null)
|
|
1206
|
+
return t.get(s.$type);
|
|
1165
1207
|
}
|
|
1166
|
-
|
|
1167
|
-
function
|
|
1168
|
-
const
|
|
1169
|
-
return
|
|
1170
|
-
knownTypes:
|
|
1171
|
-
typeHintEmitter:
|
|
1172
|
-
typeResolver:
|
|
1173
|
-
}),
|
|
1208
|
+
c(kt, "dotnetTypeResolver");
|
|
1209
|
+
function _t() {
|
|
1210
|
+
const s = new Rt(S);
|
|
1211
|
+
return s.config({
|
|
1212
|
+
knownTypes: wt,
|
|
1213
|
+
typeHintEmitter: Pt,
|
|
1214
|
+
typeResolver: kt
|
|
1215
|
+
}), s;
|
|
1174
1216
|
}
|
|
1175
|
-
|
|
1176
|
-
function
|
|
1177
|
-
const
|
|
1178
|
-
return
|
|
1179
|
-
knownTypes:
|
|
1180
|
-
typeHintEmitter:
|
|
1181
|
-
typeResolver:
|
|
1182
|
-
}),
|
|
1217
|
+
c(_t, "createEventSerializer");
|
|
1218
|
+
function Bt() {
|
|
1219
|
+
const s = new Rt(I);
|
|
1220
|
+
return s.config({
|
|
1221
|
+
knownTypes: wt,
|
|
1222
|
+
typeHintEmitter: Pt,
|
|
1223
|
+
typeResolver: kt
|
|
1224
|
+
}), s;
|
|
1183
1225
|
}
|
|
1184
|
-
|
|
1185
|
-
function
|
|
1226
|
+
c(Bt, "createStreamingResponseSerializer");
|
|
1227
|
+
function zt(s) {
|
|
1186
1228
|
try {
|
|
1187
|
-
return JSON.parse(
|
|
1229
|
+
return JSON.parse(s), s;
|
|
1188
1230
|
} catch {
|
|
1189
|
-
let
|
|
1190
|
-
for (let
|
|
1191
|
-
const
|
|
1192
|
-
if (
|
|
1193
|
-
const f =
|
|
1231
|
+
let o = "", a = !1;
|
|
1232
|
+
for (let i = 0; i < s.length; i++) {
|
|
1233
|
+
const p = s[i], g = p.charCodeAt(0);
|
|
1234
|
+
if (p === "\\" && a && i + 1 < s.length) {
|
|
1235
|
+
const f = s[i + 1];
|
|
1194
1236
|
if (f === '"' || f === "\\" || f === "/" || f === "b" || f === "f" || f === "n" || f === "r" || f === "t") {
|
|
1195
|
-
|
|
1237
|
+
o += p + f, i++;
|
|
1196
1238
|
continue;
|
|
1197
|
-
} else if (f === "u" &&
|
|
1198
|
-
|
|
1239
|
+
} else if (f === "u" && i + 5 < s.length) {
|
|
1240
|
+
o += s.substring(i, i + 6), i += 5;
|
|
1199
1241
|
continue;
|
|
1200
1242
|
} else {
|
|
1201
|
-
|
|
1243
|
+
o += p;
|
|
1202
1244
|
continue;
|
|
1203
1245
|
}
|
|
1204
1246
|
}
|
|
1205
|
-
if (
|
|
1247
|
+
if (p === '"') {
|
|
1206
1248
|
let f = 0;
|
|
1207
|
-
for (let
|
|
1249
|
+
for (let _ = i - 1; _ >= 0 && s[_] === "\\"; _--)
|
|
1208
1250
|
f++;
|
|
1209
|
-
f % 2 === 0 && (a = !a),
|
|
1251
|
+
f % 2 === 0 && (a = !a), o += p;
|
|
1210
1252
|
continue;
|
|
1211
1253
|
}
|
|
1212
|
-
if (a &&
|
|
1213
|
-
switch (
|
|
1254
|
+
if (a && g < 32)
|
|
1255
|
+
switch (p) {
|
|
1214
1256
|
case `
|
|
1215
1257
|
`:
|
|
1216
|
-
|
|
1258
|
+
o += "\\n";
|
|
1217
1259
|
break;
|
|
1218
1260
|
case "\r":
|
|
1219
|
-
|
|
1261
|
+
o += "\\r";
|
|
1220
1262
|
break;
|
|
1221
1263
|
case " ":
|
|
1222
|
-
|
|
1264
|
+
o += "\\t";
|
|
1223
1265
|
break;
|
|
1224
1266
|
case "\f":
|
|
1225
|
-
|
|
1267
|
+
o += "\\f";
|
|
1226
1268
|
break;
|
|
1227
1269
|
case "\b":
|
|
1228
|
-
|
|
1270
|
+
o += "\\b";
|
|
1229
1271
|
break;
|
|
1230
1272
|
default:
|
|
1231
|
-
const f =
|
|
1232
|
-
|
|
1273
|
+
const f = g.toString(16).padStart(4, "0");
|
|
1274
|
+
o += `\\u${f}`;
|
|
1233
1275
|
break;
|
|
1234
1276
|
}
|
|
1235
1277
|
else
|
|
1236
|
-
|
|
1278
|
+
o += p;
|
|
1237
1279
|
}
|
|
1238
|
-
return
|
|
1280
|
+
return o;
|
|
1239
1281
|
}
|
|
1240
1282
|
}
|
|
1241
|
-
|
|
1242
|
-
function
|
|
1243
|
-
const t =
|
|
1244
|
-
return
|
|
1283
|
+
c(zt, "sanitizeJsonString");
|
|
1284
|
+
function Yt(s) {
|
|
1285
|
+
const t = zt(s);
|
|
1286
|
+
return Bt().parse(t);
|
|
1245
1287
|
}
|
|
1246
|
-
|
|
1247
|
-
function
|
|
1248
|
-
const t =
|
|
1249
|
-
return
|
|
1288
|
+
c(Yt, "deserializePayload");
|
|
1289
|
+
function vt(s) {
|
|
1290
|
+
const t = zt(s);
|
|
1291
|
+
return _t().parse(t);
|
|
1250
1292
|
}
|
|
1251
|
-
|
|
1252
|
-
function
|
|
1253
|
-
return
|
|
1293
|
+
c(vt, "deserializeEvent");
|
|
1294
|
+
function Qt(s) {
|
|
1295
|
+
return _t().stringify(s);
|
|
1254
1296
|
}
|
|
1255
|
-
|
|
1297
|
+
c(Qt, "serializeEvent");
|
|
1256
1298
|
export {
|
|
1257
|
-
|
|
1299
|
+
mt as C,
|
|
1258
1300
|
A as F,
|
|
1259
|
-
|
|
1301
|
+
Ft as I,
|
|
1260
1302
|
S as L,
|
|
1261
1303
|
x as P,
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1304
|
+
Ut as S,
|
|
1305
|
+
ft as T,
|
|
1306
|
+
O as a,
|
|
1307
|
+
U as b,
|
|
1308
|
+
ht as c,
|
|
1309
|
+
I as d,
|
|
1310
|
+
xt as e,
|
|
1311
|
+
_t as f,
|
|
1312
|
+
Bt as g,
|
|
1313
|
+
vt as h,
|
|
1314
|
+
Yt as i,
|
|
1315
|
+
Qt as j,
|
|
1316
|
+
zt as s
|
|
1275
1317
|
};
|
|
1276
|
-
//# sourceMappingURL=serializer-
|
|
1318
|
+
//# sourceMappingURL=serializer-C1uBjgTd.js.map
|