@aintela/chat 0.4.37 → 0.5.1
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 +7213 -6950
- package/dist/components.js.map +1 -1
- package/dist/hooks.js +1 -1
- package/dist/httpArtifactService-EEhF_mp9.js +1744 -0
- package/dist/httpArtifactService-EEhF_mp9.js.map +1 -0
- package/dist/{httpSessionService-CUujaUo6.js → httpSessionService-wBby4ggl.js} +51 -53
- package/dist/httpSessionService-wBby4ggl.js.map +1 -0
- package/dist/index.js +248 -240
- package/dist/models.js +1 -1
- package/dist/{serializer-DX-yGa_k.js → serializer-CC-nM3ig.js} +497 -498
- package/dist/serializer-CC-nM3ig.js.map +1 -0
- package/dist/services.js +12 -10
- package/dist/src/components/AiChat/AiChatContext.d.ts +4 -0
- package/dist/src/components/AiChat/AiChatTypes.d.ts +8 -0
- package/dist/src/components/AiChat/ChatPane/CrossfadeSlot.d.ts +24 -0
- package/dist/src/components/AiChat/ChatPane/CurrentMessage.d.ts +9 -9
- package/dist/src/components/AiChat/ChatPane/Message.d.ts +1 -3
- package/dist/src/components/AiChat/ChatPane/MessageAgent.d.ts +9 -8
- package/dist/src/components/AiChat/ChatPane/MessageScope.d.ts +32 -0
- package/dist/src/components/AiChat/ChatPane/MessageUser.d.ts +0 -1
- package/dist/src/components/AiChat/ChatPane/StickyQuestionHeader.d.ts +0 -1
- package/dist/src/components/AiChat/ChatPane/groupParts.d.ts +34 -0
- package/dist/src/components/AiChat/ChatPane/messageAgentVerbosity.test.d.ts +1 -0
- package/dist/src/components/AiChat/ChatPane/parts/ActivityLine.d.ts +9 -0
- package/dist/src/components/AiChat/ChatPane/parts/ConnectionOutagePart.d.ts +9 -0
- package/dist/src/components/AiChat/ChatPane/parts/connectionOutagePart.test.d.ts +1 -0
- package/dist/src/components/AiChat/ChatPane/parts/index.d.ts +4 -1
- package/dist/src/components/AiChat/ChatPane/parts/types.d.ts +25 -5
- package/dist/src/components/AiChat/ChatPane/reasoningHeadlines.d.ts +4 -9
- package/dist/src/components/AiChat/ChatPane/verbosity.d.ts +57 -0
- package/dist/src/components/AiChat/sessionStateManagerService.d.ts +36 -35
- package/dist/src/components/AiChat/stateConfiguration.d.ts +18 -0
- package/dist/src/components/index.d.ts +10 -4
- package/dist/src/components/v2/VerbositySlider.d.ts +12 -0
- package/dist/src/interfaces/index.d.ts +0 -1
- package/dist/src/models/Interaction.d.ts +0 -9
- package/dist/src/models/InteractionPart.d.ts +4 -3
- package/dist/src/models/Notification.d.ts +7 -1
- package/dist/src/models/ServerEvent.d.ts +4 -0
- package/dist/src/models/index.d.ts +1 -1
- package/dist/src/services/WebSocketConnection/WebSocketConnectionV2.d.ts +28 -108
- package/dist/src/services/WebSocketConnection/closeCodes.d.ts +24 -0
- package/dist/src/services/WebSocketConnection/streamStats.d.ts +41 -0
- package/dist/src/services/WebSocketConnection/streamStats.test.d.ts +1 -0
- package/dist/src/services/WebSocketConnection/webSocketConnection.d.ts +15 -12
- package/dist/src/services/eventBusService.d.ts +28 -67
- package/dist/src/services/index.d.ts +2 -1
- package/dist/src/services/interaction/reduceInteraction.d.ts +28 -0
- package/dist/src/services/interactionService.d.ts +15 -32
- package/dist/src/services/interactionService.invariants.test.d.ts +1 -0
- package/dist/src/services/servers/AgentGatewayService.d.ts +3 -182
- package/dist/src/services/servers/AgentGatewayWSAsync.d.ts +145 -46
- package/dist/src/services/servers/connectionSupervisor.d.ts +173 -0
- package/dist/src/services/servers/connectionSupervisor.test.d.ts +1 -0
- package/dist/src/services/servers/connectionSupervisor.wire.test.d.ts +0 -0
- package/dist/src/services/servers/gatewayErrorClosesTurn.test.d.ts +1 -0
- package/dist/src/services/servers/gatewayFixes.test.d.ts +1 -0
- package/dist/src/services/servers/throttledEmit.test.d.ts +1 -0
- package/dist/src/services/servers/throttledEmitter.d.ts +38 -0
- package/dist/src/services/streamPipeline.characterization.test.d.ts +1 -0
- package/dist/src/services/wire/decodeFrame.d.ts +21 -0
- package/dist/src/services/wire/decodeFrame.test.d.ts +1 -0
- package/dist/tests/bench/streamPipeline.bench.d.ts +1 -0
- package/dist/tests/fakes/fakeRawWebSocket.d.ts +2 -0
- package/dist/tests/fakes/fakeWebSocket.d.ts +4 -3
- package/dist/tests/fakes/makeGateway.d.ts +7 -0
- package/dist/tests/wire/journey.d.ts +47 -0
- package/dist/{useChatSessions-BXYvvd4S.js → useChatSessions-C6sYF4U6.js} +2 -2
- package/dist/{useChatSessions-BXYvvd4S.js.map → useChatSessions-C6sYF4U6.js.map} +1 -1
- package/package.json +2 -1
- package/dist/httpArtifactService-GdGsaFKS.js +0 -1979
- package/dist/httpArtifactService-GdGsaFKS.js.map +0 -1
- package/dist/httpSessionService-CUujaUo6.js.map +0 -1
- package/dist/serializer-DX-yGa_k.js.map +0 -1
- package/dist/src/interfaces/IHeartbeatPort.d.ts +0 -4
- /package/dist/src/components/AiChat/{sessionStateManagerService.idle.test.d.ts → ChatPane/crossfadeSlot.test.d.ts} +0 -0
- /package/dist/src/{services/interactionServiceGrouping.test.d.ts → components/AiChat/ChatPane/groupParts.test.d.ts} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var qt = Object.defineProperty;
|
|
2
|
-
var Qt = (s, t,
|
|
3
|
-
var
|
|
4
|
-
var e = (s, t,
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
2
|
+
var Qt = (s, t, o) => t in s ? qt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : s[t] = o;
|
|
3
|
+
var p = (s, t) => qt(s, "name", { value: t, configurable: !0 });
|
|
4
|
+
var e = (s, t, o) => Qt(s, typeof t != "symbol" ? t + "" : t, o);
|
|
5
|
+
import Rt from "@mui/icons-material/Psychology";
|
|
6
|
+
import L from "@mui/icons-material/FlashOn";
|
|
7
|
+
import vt from "@mui/icons-material/RocketLaunch";
|
|
8
8
|
import Zt from "@mui/icons-material/GeneratingTokensOutlined";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { d as
|
|
12
|
-
import { jsonMember as
|
|
9
|
+
import Nt from "@mui/icons-material/SortByAlphaOutlined";
|
|
10
|
+
import Ht from "@mui/icons-material/AllInclusive";
|
|
11
|
+
import { d as bt, A as Yt } from "./environmentUtils-VZNTCzEE.js";
|
|
12
|
+
import { jsonMember as i, jsonObject as g, AnyT as q, jsonArrayMember as xt, TypedJSON as zt } from "typedjson";
|
|
13
13
|
const me = {
|
|
14
14
|
ChatEvent: "ChatEvent",
|
|
15
15
|
ChatResponse: "ChatResponse",
|
|
@@ -51,7 +51,7 @@ const me = {
|
|
|
51
51
|
NotDefined: "not_defined",
|
|
52
52
|
Waiting: "waiting",
|
|
53
53
|
Suspended: "suspended"
|
|
54
|
-
}, Xt = /* @__PURE__ */
|
|
54
|
+
}, Xt = /* @__PURE__ */ p((s) => {
|
|
55
55
|
switch (s.toLocaleLowerCase()) {
|
|
56
56
|
case "functioncall":
|
|
57
57
|
return l.FunctionCall;
|
|
@@ -87,7 +87,7 @@ const me = {
|
|
|
87
87
|
default:
|
|
88
88
|
return l.NotDefined;
|
|
89
89
|
}
|
|
90
|
-
}, "GetEventTypeFromDotNetName"),
|
|
90
|
+
}, "GetEventTypeFromDotNetName"), ye = {
|
|
91
91
|
[l.FunctionCall]: "Executing function call",
|
|
92
92
|
[l.FunctionResponse]: "Getting response",
|
|
93
93
|
[l.Video]: "Video",
|
|
@@ -99,7 +99,7 @@ const me = {
|
|
|
99
99
|
[l.Other]: "Other",
|
|
100
100
|
[l.Text]: "Text",
|
|
101
101
|
[l.NotDefined]: "NotDefined"
|
|
102
|
-
},
|
|
102
|
+
}, he = {
|
|
103
103
|
Regular: "Regular",
|
|
104
104
|
Artifact: "Artifact"
|
|
105
105
|
}, Ce = {
|
|
@@ -110,7 +110,7 @@ const me = {
|
|
|
110
110
|
Dashboard: "Dashboard",
|
|
111
111
|
Chart: "Chart",
|
|
112
112
|
Code: "Code"
|
|
113
|
-
},
|
|
113
|
+
}, It = {
|
|
114
114
|
BI_Envision_Agent: "BI_Envision_Agent",
|
|
115
115
|
BI_Master_Customer_Agent: "BI_Master_Customer_Agent",
|
|
116
116
|
BI_Dedicated_Customer_Agent: "BI_Dedicated_Customer_Agent",
|
|
@@ -119,29 +119,29 @@ const me = {
|
|
|
119
119
|
Interactive: "Interactive",
|
|
120
120
|
Newsletter: "Newsletter"
|
|
121
121
|
}, xe = {
|
|
122
|
-
[
|
|
122
|
+
[It.BI_Envision_Agent]: {
|
|
123
123
|
name: "Envision",
|
|
124
124
|
description: `Analisa dados de vendas globais
|
|
125
125
|
com insights consolidados de todos os clientes
|
|
126
126
|
e métricas agregadas do mercado`
|
|
127
127
|
},
|
|
128
|
-
[
|
|
128
|
+
[It.BI_Master_Customer_Agent]: {
|
|
129
129
|
name: "Clientes Master",
|
|
130
130
|
description: `Visão consolidada de todos os clientes
|
|
131
131
|
com análises comparativas e benchmarks
|
|
132
132
|
entre diferentes organizações`
|
|
133
133
|
},
|
|
134
|
-
[
|
|
134
|
+
[It.BI_Dedicated_Customer_Agent]: {
|
|
135
135
|
name: "Cliente Único",
|
|
136
136
|
description: `Foco em um cliente específico
|
|
137
137
|
com análises detalhadas e personalizadas
|
|
138
138
|
para sua organização`
|
|
139
139
|
},
|
|
140
|
-
[
|
|
140
|
+
[It.Unknown]: {
|
|
141
141
|
name: "Não definido",
|
|
142
142
|
description: "Não definido"
|
|
143
143
|
}
|
|
144
|
-
},
|
|
144
|
+
}, _e = {
|
|
145
145
|
FAST: "FAST",
|
|
146
146
|
BALANCED: "BALANCED",
|
|
147
147
|
PRO: "PRO",
|
|
@@ -170,11 +170,11 @@ para sua organização`
|
|
|
170
170
|
ShowGuideDemo: "ShowGuideDemo",
|
|
171
171
|
uiToolShowcase: "uiToolShowcase",
|
|
172
172
|
AUTO: "AUTO"
|
|
173
|
-
},
|
|
173
|
+
}, De = {
|
|
174
174
|
[T.Claude_Opus_4_6]: {
|
|
175
175
|
name: "Claude Opus 4.6",
|
|
176
176
|
description: "Modelo mais avançado da anthropic, no entanto, não tão rápido como o Sonnet",
|
|
177
|
-
icon:
|
|
177
|
+
icon: Ht,
|
|
178
178
|
contextWindow: "1M tokens",
|
|
179
179
|
speed: "Moderate",
|
|
180
180
|
quality: "Highest"
|
|
@@ -182,7 +182,7 @@ para sua organização`
|
|
|
182
182
|
[T.Claude_Sonnet_4_6]: {
|
|
183
183
|
name: "Claude Sonnet 4.6",
|
|
184
184
|
description: "Ótima relação velocidade/qualidade",
|
|
185
|
-
icon:
|
|
185
|
+
icon: Ht,
|
|
186
186
|
contextWindow: "1M tokens",
|
|
187
187
|
speed: "Fast",
|
|
188
188
|
quality: "High"
|
|
@@ -192,7 +192,7 @@ para sua organização`
|
|
|
192
192
|
description: `Modelo mais avançado
|
|
193
193
|
Melhor qualidade para tarefas complexas
|
|
194
194
|
Contexto: 2M tokens`,
|
|
195
|
-
icon:
|
|
195
|
+
icon: Rt,
|
|
196
196
|
contextWindow: "2M tokens",
|
|
197
197
|
speed: "Moderate",
|
|
198
198
|
quality: "Highest"
|
|
@@ -202,7 +202,7 @@ Contexto: 2M tokens`,
|
|
|
202
202
|
description: `Equilibrio ideal entre velocidade e qualidade
|
|
203
203
|
Ótimo para a maioria das tarefas
|
|
204
204
|
Contexto: 1M tokens`,
|
|
205
|
-
icon:
|
|
205
|
+
icon: L,
|
|
206
206
|
contextWindow: "1M tokens",
|
|
207
207
|
speed: "Fast",
|
|
208
208
|
quality: "High"
|
|
@@ -212,7 +212,7 @@ Contexto: 1M tokens`,
|
|
|
212
212
|
description: `NOVO: Equilibrio ideal entre velocidade e qualidade
|
|
213
213
|
Ótimo para a maioria das tarefas
|
|
214
214
|
Contexto: 1M tokens`,
|
|
215
|
-
icon:
|
|
215
|
+
icon: L,
|
|
216
216
|
contextWindow: "1M tokens",
|
|
217
217
|
speed: "Fast",
|
|
218
218
|
quality: "High"
|
|
@@ -220,7 +220,7 @@ Contexto: 1M tokens`,
|
|
|
220
220
|
[T.Gpt_5_1]: {
|
|
221
221
|
name: "Chat GPT 5.1",
|
|
222
222
|
description: "Chat GPT 5.1",
|
|
223
|
-
icon:
|
|
223
|
+
icon: vt,
|
|
224
224
|
contextWindow: "200k tokens",
|
|
225
225
|
speed: "Good",
|
|
226
226
|
quality: "High"
|
|
@@ -228,7 +228,7 @@ Contexto: 1M tokens`,
|
|
|
228
228
|
[T.Gpt_5_2]: {
|
|
229
229
|
name: "Chat GPT 5.2",
|
|
230
230
|
description: "Chat GPT 5.2",
|
|
231
|
-
icon:
|
|
231
|
+
icon: vt,
|
|
232
232
|
contextWindow: "200k tokens",
|
|
233
233
|
speed: "Good",
|
|
234
234
|
quality: "Highest"
|
|
@@ -236,7 +236,7 @@ Contexto: 1M tokens`,
|
|
|
236
236
|
[T.Gpt_5_5]: {
|
|
237
237
|
name: "Chat GPT 5.5",
|
|
238
238
|
description: "A melhor inteligência em escala para fluxos de trabalho de agentes, codificação e profissionais.",
|
|
239
|
-
icon:
|
|
239
|
+
icon: vt,
|
|
240
240
|
contextWindow: "200k tokens",
|
|
241
241
|
speed: "Good",
|
|
242
242
|
quality: "Highest"
|
|
@@ -244,7 +244,7 @@ Contexto: 1M tokens`,
|
|
|
244
244
|
[T.Gpt_5_4_mini]: {
|
|
245
245
|
name: "Chat GPT 5.4 Mini",
|
|
246
246
|
description: "Modelo compacto mais robusto da OpenAi até momento para codificação, uso de computadores e subagentes.",
|
|
247
|
-
icon:
|
|
247
|
+
icon: vt,
|
|
248
248
|
contextWindow: "200k tokens",
|
|
249
249
|
speed: "Fast",
|
|
250
250
|
quality: "Highest"
|
|
@@ -252,7 +252,7 @@ Contexto: 1M tokens`,
|
|
|
252
252
|
[T["Glm-5_2"]]: {
|
|
253
253
|
name: "Z.ai Glm-5",
|
|
254
254
|
description: "Modelo open weights bem competente da Z.Ai. Apesar de gerar respostas mais longas o modelo é muito capaz.",
|
|
255
|
-
icon:
|
|
255
|
+
icon: Nt,
|
|
256
256
|
contextWindow: "200k tokens",
|
|
257
257
|
speed: "Good",
|
|
258
258
|
quality: "Highest"
|
|
@@ -260,7 +260,7 @@ Contexto: 1M tokens`,
|
|
|
260
260
|
[T["Glm_4.7"]]: {
|
|
261
261
|
name: "Z.ai Glm-4.7",
|
|
262
262
|
description: "",
|
|
263
|
-
icon:
|
|
263
|
+
icon: Nt,
|
|
264
264
|
contextWindow: "200k tokens",
|
|
265
265
|
speed: "Fast",
|
|
266
266
|
quality: "High"
|
|
@@ -268,7 +268,7 @@ Contexto: 1M tokens`,
|
|
|
268
268
|
[T["Glm_4.7_flash"]]: {
|
|
269
269
|
name: "Z.ai Glm-4.7",
|
|
270
270
|
description: "",
|
|
271
|
-
icon:
|
|
271
|
+
icon: Nt,
|
|
272
272
|
contextWindow: "200k tokens",
|
|
273
273
|
speed: "Good",
|
|
274
274
|
quality: "High"
|
|
@@ -277,7 +277,7 @@ Contexto: 1M tokens`,
|
|
|
277
277
|
name: "DeepSeek Reasoner",
|
|
278
278
|
description: `Modelo da DeepSeek com modo de raciocínio profundo (thinking mode).
|
|
279
279
|
Ideal para tarefas complexas que se beneficiam de cadeia de pensamento extensa.`,
|
|
280
|
-
icon:
|
|
280
|
+
icon: Rt,
|
|
281
281
|
contextWindow: "128k tokens",
|
|
282
282
|
speed: "Moderate",
|
|
283
283
|
quality: "Highest"
|
|
@@ -286,7 +286,7 @@ Ideal para tarefas complexas que se beneficiam de cadeia de pensamento extensa.`
|
|
|
286
286
|
name: "DeepSeek Chat",
|
|
287
287
|
description: `Modelo de chat rápido da DeepSeek, sem modo de raciocínio.
|
|
288
288
|
Ótimo equilíbrio entre velocidade e qualidade para uso geral.`,
|
|
289
|
-
icon:
|
|
289
|
+
icon: L,
|
|
290
290
|
contextWindow: "128k tokens",
|
|
291
291
|
speed: "Fast",
|
|
292
292
|
quality: "High"
|
|
@@ -295,7 +295,7 @@ Ideal para tarefas complexas que se beneficiam de cadeia de pensamento extensa.`
|
|
|
295
295
|
name: "Kimi K2.6 Pro",
|
|
296
296
|
description: `Modelo híbrido da Moonshot com modo de raciocínio (thinking) ativado por padrão.
|
|
297
297
|
Melhor capacidade da família K2 para tarefas complexas.`,
|
|
298
|
-
icon:
|
|
298
|
+
icon: Rt,
|
|
299
299
|
contextWindow: "256k tokens",
|
|
300
300
|
speed: "Moderate",
|
|
301
301
|
quality: "Highest"
|
|
@@ -304,7 +304,7 @@ Melhor capacidade da família K2 para tarefas complexas.`,
|
|
|
304
304
|
name: "Kimi K2 Turbo",
|
|
305
305
|
description: `Variante rápida (não-thinking) da Moonshot.
|
|
306
306
|
Ótima relação velocidade/qualidade para uso geral.`,
|
|
307
|
-
icon:
|
|
307
|
+
icon: L,
|
|
308
308
|
contextWindow: "256k tokens",
|
|
309
309
|
speed: "Fast",
|
|
310
310
|
quality: "High"
|
|
@@ -312,7 +312,7 @@ Melhor capacidade da família K2 para tarefas complexas.`,
|
|
|
312
312
|
[T["Qwen3_6-plus"]]: {
|
|
313
313
|
name: "Qwen 3.6 Plus - Alibaba",
|
|
314
314
|
description: "Multimodal nativo, context window - 1 milhão de tokens, codificação agentiva",
|
|
315
|
-
icon:
|
|
315
|
+
icon: L,
|
|
316
316
|
contextWindow: "1 milhão",
|
|
317
317
|
speed: "Moderate",
|
|
318
318
|
quality: "Highest"
|
|
@@ -320,7 +320,7 @@ Melhor capacidade da família K2 para tarefas complexas.`,
|
|
|
320
320
|
[T["Qwen3_7-max"]]: {
|
|
321
321
|
name: "Qwen 3.7 Max - Alibaba",
|
|
322
322
|
description: "Multimodal nativo, context window - 1 milhão de tokens, codificação agentiva",
|
|
323
|
-
icon:
|
|
323
|
+
icon: L,
|
|
324
324
|
contextWindow: "1 milhão",
|
|
325
325
|
speed: "Moderate",
|
|
326
326
|
quality: "Highest"
|
|
@@ -339,8 +339,8 @@ function Fe(s) {
|
|
|
339
339
|
const t = s.toLowerCase();
|
|
340
340
|
return t.startsWith("gemini") || t.startsWith("live") ? "Google" : t.startsWith("claude") ? "Anthropic" : t.startsWith("gpt") ? "OpenAI" : t.startsWith("glm") ? "ZhiPu" : t.startsWith("kimi") ? "Moonshot" : t.startsWith("deepseek") ? "DeepSeek" : "Unknown";
|
|
341
341
|
}
|
|
342
|
-
|
|
343
|
-
const we = /* @__PURE__ */
|
|
342
|
+
p(Fe, "getModelVendor");
|
|
343
|
+
const we = /* @__PURE__ */ p((s, t) => {
|
|
344
344
|
switch (s) {
|
|
345
345
|
case "Connected":
|
|
346
346
|
return t.palette.primary.light;
|
|
@@ -355,16 +355,16 @@ const we = /* @__PURE__ */ c((s, t) => {
|
|
|
355
355
|
default:
|
|
356
356
|
return t.palette.text.secondary;
|
|
357
357
|
}
|
|
358
|
-
}, "getConnectionStateColor"),
|
|
358
|
+
}, "getConnectionStateColor"), N = class N {
|
|
359
359
|
static replaceFirstTwoTabsPerLine(t) {
|
|
360
|
-
const
|
|
361
|
-
return typeof t == "string" ? t.replaceAll(
|
|
360
|
+
const o = /^\s{15}/gm;
|
|
361
|
+
return typeof t == "string" ? t.replaceAll(o, (a) => a.substring(15)) : t ?? "";
|
|
362
362
|
}
|
|
363
363
|
static jsonToString(t) {
|
|
364
364
|
if (t == null) return "";
|
|
365
365
|
if (typeof t != "object") return String(t);
|
|
366
|
-
const
|
|
367
|
-
if (
|
|
366
|
+
const o = Array.isArray(t) ? N.isCharArray(t) ? t.join("") : null : N.tryCollapseCharIndexedObject(t);
|
|
367
|
+
if (o != null) return o;
|
|
368
368
|
if (Array.isArray(t))
|
|
369
369
|
try {
|
|
370
370
|
return JSON.stringify(t, null, 2);
|
|
@@ -372,13 +372,13 @@ const we = /* @__PURE__ */ c((s, t) => {
|
|
|
372
372
|
return String(t);
|
|
373
373
|
}
|
|
374
374
|
const a = Object.keys(t), r = [];
|
|
375
|
-
return a.forEach((
|
|
376
|
-
let d = t[
|
|
377
|
-
typeof d == "object" && (d = JSON.stringify(t[
|
|
375
|
+
return a.forEach((c) => {
|
|
376
|
+
let d = t[c];
|
|
377
|
+
typeof d == "object" && (d = JSON.stringify(t[c], null, 2));
|
|
378
378
|
const f = (d == null ? void 0 : d.toString().indexOf(`
|
|
379
379
|
`)) > -1 ? `
|
|
380
380
|
` : "";
|
|
381
|
-
r.push(`${
|
|
381
|
+
r.push(`${c}:${f}${d}`);
|
|
382
382
|
}), r.join(`
|
|
383
383
|
`);
|
|
384
384
|
}
|
|
@@ -399,14 +399,14 @@ const we = /* @__PURE__ */ c((s, t) => {
|
|
|
399
399
|
} catch {
|
|
400
400
|
return String(t);
|
|
401
401
|
}
|
|
402
|
-
const
|
|
403
|
-
return
|
|
404
|
-
let
|
|
405
|
-
typeof
|
|
406
|
-
const d = (
|
|
402
|
+
const o = Object.keys(t), a = [];
|
|
403
|
+
return o.forEach((r) => {
|
|
404
|
+
let c = t == null ? void 0 : t[r];
|
|
405
|
+
typeof c == "object" && (c = JSON.stringify(c, null, 2));
|
|
406
|
+
const d = (c == null ? void 0 : c.toString().indexOf(`
|
|
407
407
|
`)) > -1 ? `
|
|
408
408
|
` : "";
|
|
409
|
-
a.push(`${r}:${d}${
|
|
409
|
+
a.push(`${r}:${d}${c}`);
|
|
410
410
|
}), a.join(`
|
|
411
411
|
`);
|
|
412
412
|
}
|
|
@@ -418,16 +418,16 @@ const we = /* @__PURE__ */ c((s, t) => {
|
|
|
418
418
|
* before reading the field. Returns undefined when absent or unparseable.
|
|
419
419
|
*/
|
|
420
420
|
static uiSlotId(t) {
|
|
421
|
-
var
|
|
422
|
-
let
|
|
423
|
-
for (let d = 0; d < 2 && typeof
|
|
421
|
+
var c;
|
|
422
|
+
let o = (c = t == null ? void 0 : t.functionDetails) == null ? void 0 : c.response;
|
|
423
|
+
for (let d = 0; d < 2 && typeof o == "string"; d++)
|
|
424
424
|
try {
|
|
425
|
-
|
|
425
|
+
o = JSON.parse(o);
|
|
426
426
|
} catch {
|
|
427
427
|
return;
|
|
428
428
|
}
|
|
429
|
-
if (!
|
|
430
|
-
const a =
|
|
429
|
+
if (!o || typeof o != "object") return;
|
|
430
|
+
const a = o, r = a.SlotId ?? a.slotId;
|
|
431
431
|
return typeof r == "string" ? r : void 0;
|
|
432
432
|
}
|
|
433
433
|
static fromError(t) {
|
|
@@ -438,20 +438,18 @@ const we = /* @__PURE__ */ c((s, t) => {
|
|
|
438
438
|
author: "main",
|
|
439
439
|
created: /* @__PURE__ */ new Date(),
|
|
440
440
|
partial: !1,
|
|
441
|
-
isStillWriting: !1,
|
|
442
441
|
mustPush: !1,
|
|
443
442
|
textAppendable: !1
|
|
444
443
|
};
|
|
445
444
|
}
|
|
446
|
-
static fromText(t,
|
|
445
|
+
static fromText(t, o, a) {
|
|
447
446
|
return {
|
|
448
447
|
text: t,
|
|
449
448
|
eventType: l.Text,
|
|
450
|
-
id: a ??
|
|
449
|
+
id: a ?? bt(),
|
|
451
450
|
created: /* @__PURE__ */ new Date(),
|
|
452
|
-
author:
|
|
451
|
+
author: o ?? "main",
|
|
453
452
|
partial: !1,
|
|
454
|
-
isStillWriting: !1,
|
|
455
453
|
mustPush: !1,
|
|
456
454
|
textAppendable: !1
|
|
457
455
|
};
|
|
@@ -462,38 +460,37 @@ const we = /* @__PURE__ */ c((s, t) => {
|
|
|
462
460
|
* and replayed parts are identical: an `EventType.UserAnswer` carrying functionDetails
|
|
463
461
|
* {name, args, isUi, status:'Done'} that routes through the uiTool dispatcher/registry.
|
|
464
462
|
*/
|
|
465
|
-
static fromUserUi(t,
|
|
463
|
+
static fromUserUi(t, o, a) {
|
|
466
464
|
return {
|
|
467
|
-
id: a ??
|
|
465
|
+
id: a ?? bt(),
|
|
468
466
|
eventType: l.UserAnswer,
|
|
469
467
|
author: "user",
|
|
470
468
|
created: /* @__PURE__ */ new Date(),
|
|
471
469
|
partial: !1,
|
|
472
|
-
isStillWriting: !1,
|
|
473
470
|
mustPush: !1,
|
|
474
471
|
textAppendable: !1,
|
|
475
472
|
functionDetails: {
|
|
476
473
|
id: "",
|
|
477
474
|
name: t,
|
|
478
|
-
args:
|
|
475
|
+
args: o,
|
|
479
476
|
status: "Done",
|
|
480
477
|
isUi: !0
|
|
481
478
|
}
|
|
482
479
|
};
|
|
483
480
|
}
|
|
484
|
-
static createWaiting(t = !1,
|
|
481
|
+
static createWaiting(t = !1, o = !0, a, r, c) {
|
|
485
482
|
a || (a = "Waiting");
|
|
486
|
-
const d =
|
|
483
|
+
const d = N.fromText("...", void 0, "waitingpart");
|
|
487
484
|
return d.eventType = l.Waiting, d.waitingDetails = {
|
|
488
485
|
startingPoint: r,
|
|
489
486
|
addTimer: t,
|
|
490
|
-
isTimerRunning:
|
|
487
|
+
isTimerRunning: o,
|
|
491
488
|
status: a,
|
|
492
|
-
stopPoint:
|
|
489
|
+
stopPoint: c
|
|
493
490
|
}, d;
|
|
494
491
|
}
|
|
495
492
|
static createSuspended() {
|
|
496
|
-
const t =
|
|
493
|
+
const t = N.fromText("SUSPEND");
|
|
497
494
|
return t.eventType = l.Suspended, t;
|
|
498
495
|
}
|
|
499
496
|
static getPartTextContent(t) {
|
|
@@ -502,19 +499,19 @@ const we = /* @__PURE__ */ c((s, t) => {
|
|
|
502
499
|
static FlatParts(t) {
|
|
503
500
|
if (t.length === 0)
|
|
504
501
|
return;
|
|
505
|
-
const
|
|
506
|
-
r.length == 1 ? a.eventType = r[0] :
|
|
507
|
-
for (const
|
|
508
|
-
if (!a.codeExecutionResultDetails &&
|
|
509
|
-
const d = a.functionDetails, f =
|
|
502
|
+
const o = t.filter((c) => c.eventType == l.Text), a = o.length > 0 ? o[0] : t[0], r = [...new Set(t.map((c) => c.eventType))];
|
|
503
|
+
r.length == 1 ? a.eventType = r[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;
|
|
504
|
+
for (const c of t) {
|
|
505
|
+
if (!a.codeExecutionResultDetails && c.codeExecutionResultDetails && (a.codeExecutionResultDetails = c.codeExecutionResultDetails), !a.errorDetails && c.errorDetails && (a.errorDetails = c.errorDetails), !a.executableCodeDetails && c.executableCodeDetails && (a.executableCodeDetails = c.executableCodeDetails), !a.functionDetails && c.functionDetails && (a.functionDetails = c.functionDetails), a.functionDetails && c.functionDetails && c !== a) {
|
|
506
|
+
const d = a.functionDetails, f = c.functionDetails;
|
|
510
507
|
!d.askUserComponent && f.askUserComponent && (d.askUserComponent = f.askUserComponent), !d.isUi && f.isUi && (d.isUi = !0), !d.clientOutput && f.clientOutput && (d.clientOutput = f.clientOutput), d.isAskUser = d.isAskUser || f.isAskUser || !!d.askUserComponent;
|
|
511
508
|
}
|
|
512
|
-
!a.rawDetails &&
|
|
509
|
+
!a.rawDetails && c.rawDetails && (a.rawDetails = c.rawDetails), !a.thoughtDetails && c.thoughtDetails && (a.thoughtDetails = c.thoughtDetails), !a.errorDetails && c.errorDetails && (a.errorDetails = c.errorDetails);
|
|
513
510
|
}
|
|
514
511
|
return a;
|
|
515
512
|
}
|
|
516
513
|
static isCharArray(t) {
|
|
517
|
-
return Array.isArray(t) && t.length > 0 && t.every((
|
|
514
|
+
return Array.isArray(t) && t.length > 0 && t.every((o) => typeof o == "string" && o.length === 1);
|
|
518
515
|
}
|
|
519
516
|
/**
|
|
520
517
|
* Detects objects like `{0: "a", 1: "b", 2: "c", ...}` — a string that was
|
|
@@ -524,25 +521,25 @@ const we = /* @__PURE__ */ c((s, t) => {
|
|
|
524
521
|
*/
|
|
525
522
|
static tryCollapseCharIndexedObject(t) {
|
|
526
523
|
if (t == null || typeof t != "object" || Array.isArray(t)) return null;
|
|
527
|
-
const
|
|
528
|
-
if (
|
|
529
|
-
for (let a = 0; a <
|
|
530
|
-
if (
|
|
531
|
-
const r = t[
|
|
524
|
+
const o = Object.keys(t);
|
|
525
|
+
if (o.length === 0) return null;
|
|
526
|
+
for (let a = 0; a < o.length; a++) {
|
|
527
|
+
if (o[a] !== String(a)) return null;
|
|
528
|
+
const r = t[o[a]];
|
|
532
529
|
if (typeof r != "string" || r.length !== 1) return null;
|
|
533
530
|
}
|
|
534
|
-
return
|
|
531
|
+
return o.map((a) => t[a]).join("");
|
|
535
532
|
}
|
|
536
533
|
static isCodeExecution(t) {
|
|
537
534
|
return t.eventType === l.CodeExecutionResult || t.eventType === l.ExecutableCode;
|
|
538
535
|
}
|
|
539
536
|
};
|
|
540
|
-
|
|
541
|
-
let Ot =
|
|
542
|
-
var jt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, n = /* @__PURE__ */
|
|
543
|
-
for (var r = a > 1 ? void 0 : a ? te(t,
|
|
544
|
-
(d = s[
|
|
545
|
-
return a && r && jt(t,
|
|
537
|
+
p(N, "InteractionPartUtils");
|
|
538
|
+
let Ot = N;
|
|
539
|
+
var jt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, n = /* @__PURE__ */ p((s, t, o, a) => {
|
|
540
|
+
for (var r = a > 1 ? void 0 : a ? te(t, o) : t, c = s.length - 1, d; c >= 0; c--)
|
|
541
|
+
(d = s[c]) && (r = (a ? d(t, o, r) : d(r)) || r);
|
|
542
|
+
return a && r && jt(t, o, r), r;
|
|
546
543
|
}, "__decorateClass");
|
|
547
544
|
const C = {
|
|
548
545
|
// KernelContent derived types
|
|
@@ -562,34 +559,34 @@ const C = {
|
|
|
562
559
|
StreamingFinalFunctionResultContent: "StreamingFinalFunctionResultContent",
|
|
563
560
|
StreamingClientOutputContent: "StreamingClientOutputContent"
|
|
564
561
|
};
|
|
565
|
-
var
|
|
566
|
-
let
|
|
562
|
+
var z;
|
|
563
|
+
let Dt = (z = class {
|
|
567
564
|
constructor() {
|
|
568
565
|
e(this, "label");
|
|
569
566
|
}
|
|
570
|
-
},
|
|
567
|
+
}, p(z, "AuthorRole"), z);
|
|
571
568
|
n([
|
|
572
|
-
|
|
573
|
-
],
|
|
574
|
-
|
|
569
|
+
i(String)
|
|
570
|
+
], Dt.prototype, "label", 2);
|
|
571
|
+
Dt = n([
|
|
575
572
|
g({ name: "AuthorRole" })
|
|
576
|
-
],
|
|
573
|
+
], Dt);
|
|
577
574
|
var B;
|
|
578
|
-
let
|
|
575
|
+
let ht = (B = class {
|
|
579
576
|
constructor() {
|
|
580
577
|
e(this, "type");
|
|
581
578
|
e(this, "fullName");
|
|
582
579
|
}
|
|
583
|
-
},
|
|
580
|
+
}, p(B, "EventTypeInformation"), B);
|
|
584
581
|
n([
|
|
585
|
-
|
|
586
|
-
],
|
|
582
|
+
i(String)
|
|
583
|
+
], ht.prototype, "type", 2);
|
|
587
584
|
n([
|
|
588
|
-
|
|
589
|
-
],
|
|
590
|
-
|
|
585
|
+
i(String)
|
|
586
|
+
], ht.prototype, "fullName", 2);
|
|
587
|
+
ht = n([
|
|
591
588
|
g({ name: "EventTypeInformation" })
|
|
592
|
-
],
|
|
589
|
+
], ht);
|
|
593
590
|
var K;
|
|
594
591
|
let O = (K = class {
|
|
595
592
|
constructor() {
|
|
@@ -608,24 +605,24 @@ let O = (K = class {
|
|
|
608
605
|
id: this.id
|
|
609
606
|
};
|
|
610
607
|
}
|
|
611
|
-
},
|
|
608
|
+
}, p(K, "LlmArtifact"), K);
|
|
612
609
|
n([
|
|
613
|
-
|
|
610
|
+
i(String)
|
|
614
611
|
], O.prototype, "id", 2);
|
|
615
612
|
n([
|
|
616
|
-
|
|
613
|
+
i(String)
|
|
617
614
|
], O.prototype, "name", 2);
|
|
618
615
|
n([
|
|
619
|
-
|
|
616
|
+
i(String)
|
|
620
617
|
], O.prototype, "mimeType", 2);
|
|
621
618
|
n([
|
|
622
|
-
|
|
619
|
+
i(String)
|
|
623
620
|
], O.prototype, "description", 2);
|
|
624
621
|
O = n([
|
|
625
622
|
g({ name: "LlmArtifact" })
|
|
626
623
|
], O);
|
|
627
624
|
var J;
|
|
628
|
-
let
|
|
625
|
+
let D = (J = class {
|
|
629
626
|
constructor() {
|
|
630
627
|
e(this, "mimeType");
|
|
631
628
|
// InnerContent is ignored (JsonIgnore in C#)
|
|
@@ -634,21 +631,21 @@ let _ = (J = class {
|
|
|
634
631
|
e(this, "modelId");
|
|
635
632
|
e(this, "metadata");
|
|
636
633
|
}
|
|
637
|
-
},
|
|
634
|
+
}, p(J, "KernelContent"), J);
|
|
638
635
|
n([
|
|
639
|
-
|
|
640
|
-
],
|
|
636
|
+
i(String)
|
|
637
|
+
], D.prototype, "mimeType", 2);
|
|
641
638
|
n([
|
|
642
|
-
|
|
643
|
-
],
|
|
639
|
+
i(String)
|
|
640
|
+
], D.prototype, "modelId", 2);
|
|
644
641
|
n([
|
|
645
|
-
|
|
646
|
-
],
|
|
647
|
-
|
|
642
|
+
i(q)
|
|
643
|
+
], D.prototype, "metadata", 2);
|
|
644
|
+
D = n([
|
|
648
645
|
g({ name: "KernelContent" })
|
|
649
|
-
],
|
|
650
|
-
var
|
|
651
|
-
let x = (
|
|
646
|
+
], D);
|
|
647
|
+
var V;
|
|
648
|
+
let x = (V = class {
|
|
652
649
|
constructor() {
|
|
653
650
|
e(this, "choiceIndex", 0);
|
|
654
651
|
// InnerContent is ignored (JsonIgnore in C#)
|
|
@@ -657,21 +654,21 @@ let x = ($ = class {
|
|
|
657
654
|
e(this, "modelId");
|
|
658
655
|
e(this, "metadata");
|
|
659
656
|
}
|
|
660
|
-
},
|
|
657
|
+
}, p(V, "StreamingKernelContent"), V);
|
|
661
658
|
n([
|
|
662
|
-
|
|
659
|
+
i(Number)
|
|
663
660
|
], x.prototype, "choiceIndex", 2);
|
|
664
661
|
n([
|
|
665
|
-
|
|
662
|
+
i(String)
|
|
666
663
|
], x.prototype, "modelId", 2);
|
|
667
664
|
n([
|
|
668
|
-
|
|
665
|
+
i(Object)
|
|
669
666
|
], x.prototype, "metadata", 2);
|
|
670
667
|
x = n([
|
|
671
668
|
g({ name: "StreamingKernelContent" })
|
|
672
669
|
], x);
|
|
673
|
-
var
|
|
674
|
-
let Ft = (
|
|
670
|
+
var $;
|
|
671
|
+
let Ft = ($ = class extends D {
|
|
675
672
|
constructor() {
|
|
676
673
|
super();
|
|
677
674
|
e(this, "text");
|
|
@@ -683,74 +680,74 @@ let Ft = (V = class extends _ {
|
|
|
683
680
|
toString() {
|
|
684
681
|
return this.text ?? "";
|
|
685
682
|
}
|
|
686
|
-
},
|
|
683
|
+
}, p($, "TextContent"), $);
|
|
687
684
|
n([
|
|
688
|
-
|
|
685
|
+
i(String)
|
|
689
686
|
], Ft.prototype, "text", 2);
|
|
690
687
|
Ft = n([
|
|
691
688
|
g({ name: "TextContent" })
|
|
692
689
|
], Ft);
|
|
693
690
|
var Q;
|
|
694
|
-
let
|
|
691
|
+
let U = (Q = class extends x {
|
|
695
692
|
constructor() {
|
|
696
693
|
super();
|
|
697
694
|
e(this, "eventName");
|
|
698
695
|
e(this, "eventData");
|
|
699
696
|
e(this, "sessionId");
|
|
700
697
|
}
|
|
701
|
-
},
|
|
698
|
+
}, p(Q, "StreamingToolEventContent"), Q);
|
|
702
699
|
n([
|
|
703
|
-
|
|
704
|
-
],
|
|
700
|
+
i(String)
|
|
701
|
+
], U.prototype, "eventName", 2);
|
|
705
702
|
n([
|
|
706
|
-
|
|
707
|
-
],
|
|
703
|
+
i(String)
|
|
704
|
+
], U.prototype, "eventData", 2);
|
|
708
705
|
n([
|
|
709
|
-
|
|
710
|
-
],
|
|
711
|
-
|
|
706
|
+
i(String)
|
|
707
|
+
], U.prototype, "sessionId", 2);
|
|
708
|
+
U = n([
|
|
712
709
|
g({ name: "StreamingToolEventContent" })
|
|
713
|
-
],
|
|
710
|
+
], U);
|
|
714
711
|
var Z;
|
|
715
|
-
let P = (Z = class extends
|
|
712
|
+
let P = (Z = class extends D {
|
|
716
713
|
constructor() {
|
|
717
714
|
super();
|
|
718
715
|
e(this, "eventName");
|
|
719
716
|
e(this, "eventData");
|
|
720
717
|
e(this, "sessionId");
|
|
721
718
|
}
|
|
722
|
-
},
|
|
719
|
+
}, p(Z, "ToolEventContent"), Z);
|
|
723
720
|
n([
|
|
724
|
-
|
|
721
|
+
i(String)
|
|
725
722
|
], P.prototype, "eventName", 2);
|
|
726
723
|
n([
|
|
727
|
-
|
|
724
|
+
i(String)
|
|
728
725
|
], P.prototype, "eventData", 2);
|
|
729
726
|
n([
|
|
730
|
-
|
|
727
|
+
i(String)
|
|
731
728
|
], P.prototype, "sessionId", 2);
|
|
732
729
|
P = n([
|
|
733
730
|
g({ name: "ToolEventContent" })
|
|
734
731
|
], P);
|
|
735
732
|
var Y;
|
|
736
|
-
let wt = (Y = class extends
|
|
733
|
+
let wt = (Y = class extends D {
|
|
737
734
|
constructor() {
|
|
738
735
|
super(...arguments);
|
|
739
736
|
e(this, "url");
|
|
740
737
|
e(this, "dataUri");
|
|
741
738
|
}
|
|
742
|
-
},
|
|
739
|
+
}, p(Y, "ImageContent"), Y);
|
|
743
740
|
n([
|
|
744
|
-
|
|
741
|
+
i(String)
|
|
745
742
|
], wt.prototype, "url", 2);
|
|
746
743
|
n([
|
|
747
|
-
|
|
744
|
+
i(String)
|
|
748
745
|
], wt.prototype, "dataUri", 2);
|
|
749
746
|
wt = n([
|
|
750
747
|
g({ name: "ImageContent" })
|
|
751
748
|
], wt);
|
|
752
749
|
var X;
|
|
753
|
-
let
|
|
750
|
+
let v = (X = class extends D {
|
|
754
751
|
constructor() {
|
|
755
752
|
super(...arguments);
|
|
756
753
|
e(this, "id");
|
|
@@ -760,22 +757,22 @@ let E = (X = class extends _ {
|
|
|
760
757
|
// Exception is not serializable - omit jsonMember decorator
|
|
761
758
|
e(this, "exception");
|
|
762
759
|
}
|
|
763
|
-
},
|
|
760
|
+
}, p(X, "FunctionCallContent"), X);
|
|
764
761
|
n([
|
|
765
|
-
|
|
766
|
-
],
|
|
762
|
+
i(String)
|
|
763
|
+
], v.prototype, "id", 2);
|
|
767
764
|
n([
|
|
768
|
-
|
|
769
|
-
],
|
|
765
|
+
i(String)
|
|
766
|
+
], v.prototype, "pluginName", 2);
|
|
770
767
|
n([
|
|
771
|
-
|
|
772
|
-
],
|
|
768
|
+
i(String)
|
|
769
|
+
], v.prototype, "functionName", 2);
|
|
773
770
|
n([
|
|
774
|
-
|
|
775
|
-
],
|
|
776
|
-
|
|
771
|
+
i(q)
|
|
772
|
+
], v.prototype, "arguments", 2);
|
|
773
|
+
v = n([
|
|
777
774
|
g({ name: "FunctionCallContent" })
|
|
778
|
-
],
|
|
775
|
+
], v);
|
|
779
776
|
var j;
|
|
780
777
|
let k = (j = class {
|
|
781
778
|
constructor() {
|
|
@@ -785,28 +782,28 @@ let k = (j = class {
|
|
|
785
782
|
e(this, "cancelUi");
|
|
786
783
|
e(this, "parked");
|
|
787
784
|
}
|
|
788
|
-
},
|
|
785
|
+
}, p(j, "ToolCallPresentation"), j);
|
|
789
786
|
n([
|
|
790
|
-
|
|
787
|
+
i(Boolean)
|
|
791
788
|
], k.prototype, "isUi", 2);
|
|
792
789
|
n([
|
|
793
|
-
|
|
790
|
+
i(String)
|
|
794
791
|
], k.prototype, "askUserComponent", 2);
|
|
795
792
|
n([
|
|
796
|
-
|
|
793
|
+
i(String)
|
|
797
794
|
], k.prototype, "argsDescription", 2);
|
|
798
795
|
n([
|
|
799
|
-
|
|
796
|
+
i(Boolean)
|
|
800
797
|
], k.prototype, "cancelUi", 2);
|
|
801
798
|
n([
|
|
802
|
-
|
|
799
|
+
i(Boolean)
|
|
803
800
|
], k.prototype, "parked", 2);
|
|
804
801
|
k = n([
|
|
805
802
|
g({ name: "ToolCallPresentation" })
|
|
806
803
|
], k);
|
|
807
804
|
const ee = "aia:presentation";
|
|
808
805
|
var tt;
|
|
809
|
-
let
|
|
806
|
+
let I = (tt = class extends x {
|
|
810
807
|
constructor() {
|
|
811
808
|
super(...arguments);
|
|
812
809
|
e(this, "id");
|
|
@@ -814,24 +811,24 @@ let b = (tt = class extends x {
|
|
|
814
811
|
e(this, "arguments");
|
|
815
812
|
e(this, "presentation");
|
|
816
813
|
}
|
|
817
|
-
},
|
|
814
|
+
}, p(tt, "StreamingFinalFunctionCallContent"), tt);
|
|
818
815
|
n([
|
|
819
|
-
|
|
820
|
-
],
|
|
816
|
+
i(String, { name: "callId" })
|
|
817
|
+
], I.prototype, "id", 2);
|
|
821
818
|
n([
|
|
822
|
-
|
|
823
|
-
],
|
|
819
|
+
i(String, { name: "name" })
|
|
820
|
+
], I.prototype, "functionName", 2);
|
|
824
821
|
n([
|
|
825
|
-
|
|
826
|
-
],
|
|
822
|
+
i(String)
|
|
823
|
+
], I.prototype, "arguments", 2);
|
|
827
824
|
n([
|
|
828
|
-
|
|
829
|
-
],
|
|
830
|
-
|
|
825
|
+
i(k)
|
|
826
|
+
], I.prototype, "presentation", 2);
|
|
827
|
+
I = n([
|
|
831
828
|
g({ name: "StreamingFinalFunctionCallContent" })
|
|
832
|
-
],
|
|
829
|
+
], I);
|
|
833
830
|
var et;
|
|
834
|
-
let
|
|
831
|
+
let b = (et = class extends D {
|
|
835
832
|
constructor() {
|
|
836
833
|
super(...arguments);
|
|
837
834
|
e(this, "id");
|
|
@@ -839,24 +836,24 @@ let I = (et = class extends _ {
|
|
|
839
836
|
e(this, "functionName");
|
|
840
837
|
e(this, "result");
|
|
841
838
|
}
|
|
842
|
-
},
|
|
839
|
+
}, p(et, "FunctionResultContent"), et);
|
|
843
840
|
n([
|
|
844
|
-
|
|
845
|
-
],
|
|
841
|
+
i(String, { name: "callId" })
|
|
842
|
+
], b.prototype, "id", 2);
|
|
846
843
|
n([
|
|
847
|
-
|
|
848
|
-
],
|
|
844
|
+
i(String)
|
|
845
|
+
], b.prototype, "pluginName", 2);
|
|
849
846
|
n([
|
|
850
|
-
|
|
851
|
-
],
|
|
847
|
+
i(String)
|
|
848
|
+
], b.prototype, "functionName", 2);
|
|
852
849
|
n([
|
|
853
|
-
|
|
854
|
-
],
|
|
855
|
-
|
|
850
|
+
i(q)
|
|
851
|
+
], b.prototype, "result", 2);
|
|
852
|
+
b = n([
|
|
856
853
|
g({ name: "FunctionResultContent" })
|
|
857
|
-
],
|
|
854
|
+
], b);
|
|
858
855
|
var nt;
|
|
859
|
-
let
|
|
856
|
+
let E = (nt = class extends x {
|
|
860
857
|
constructor() {
|
|
861
858
|
super(...arguments);
|
|
862
859
|
e(this, "id");
|
|
@@ -866,102 +863,102 @@ let A = (nt = class extends x {
|
|
|
866
863
|
e(this, "presentation");
|
|
867
864
|
e(this, "clientOutput");
|
|
868
865
|
}
|
|
869
|
-
},
|
|
866
|
+
}, p(nt, "StreamingFinalFunctionResultContent"), nt);
|
|
870
867
|
n([
|
|
871
|
-
|
|
872
|
-
],
|
|
868
|
+
i(String, { name: "callId" })
|
|
869
|
+
], E.prototype, "id", 2);
|
|
873
870
|
n([
|
|
874
|
-
|
|
875
|
-
],
|
|
871
|
+
i(String)
|
|
872
|
+
], E.prototype, "pluginName", 2);
|
|
876
873
|
n([
|
|
877
|
-
|
|
878
|
-
],
|
|
874
|
+
i(String)
|
|
875
|
+
], E.prototype, "functionName", 2);
|
|
879
876
|
n([
|
|
880
|
-
|
|
881
|
-
],
|
|
877
|
+
i(q)
|
|
878
|
+
], E.prototype, "result", 2);
|
|
882
879
|
n([
|
|
883
|
-
|
|
884
|
-
],
|
|
880
|
+
i(k)
|
|
881
|
+
], E.prototype, "presentation", 2);
|
|
885
882
|
n([
|
|
886
|
-
|
|
887
|
-
],
|
|
888
|
-
|
|
883
|
+
i(q)
|
|
884
|
+
], E.prototype, "clientOutput", 2);
|
|
885
|
+
E = n([
|
|
889
886
|
g({ name: "StreamingFinalFunctionResultContent" })
|
|
890
|
-
],
|
|
891
|
-
var
|
|
892
|
-
let Ct = (
|
|
887
|
+
], E);
|
|
888
|
+
var ot;
|
|
889
|
+
let Ct = (ot = class extends D {
|
|
893
890
|
constructor() {
|
|
894
891
|
super(...arguments);
|
|
895
892
|
e(this, "id");
|
|
896
893
|
e(this, "data");
|
|
897
894
|
}
|
|
898
|
-
},
|
|
895
|
+
}, p(ot, "FunctionClientOutputContent"), ot);
|
|
899
896
|
n([
|
|
900
|
-
|
|
897
|
+
i(String, { name: "callId" })
|
|
901
898
|
], Ct.prototype, "id", 2);
|
|
902
899
|
n([
|
|
903
|
-
|
|
900
|
+
i(q)
|
|
904
901
|
], Ct.prototype, "data", 2);
|
|
905
902
|
Ct = n([
|
|
906
903
|
g({ name: "FunctionClientOutputContent" })
|
|
907
904
|
], Ct);
|
|
908
|
-
var
|
|
909
|
-
let G = (
|
|
905
|
+
var it;
|
|
906
|
+
let G = (it = class extends x {
|
|
910
907
|
constructor() {
|
|
911
908
|
super(...arguments);
|
|
912
909
|
e(this, "id");
|
|
913
910
|
e(this, "clientOutput");
|
|
914
911
|
e(this, "presentation");
|
|
915
912
|
}
|
|
916
|
-
},
|
|
913
|
+
}, p(it, "StreamingClientOutputContent"), it);
|
|
917
914
|
n([
|
|
918
|
-
|
|
915
|
+
i(String, { name: "callId" })
|
|
919
916
|
], G.prototype, "id", 2);
|
|
920
917
|
n([
|
|
921
|
-
|
|
918
|
+
i(q)
|
|
922
919
|
], G.prototype, "clientOutput", 2);
|
|
923
920
|
n([
|
|
924
|
-
|
|
921
|
+
i(k)
|
|
925
922
|
], G.prototype, "presentation", 2);
|
|
926
923
|
G = n([
|
|
927
924
|
g({ name: "StreamingClientOutputContent" })
|
|
928
925
|
], G);
|
|
929
926
|
var at;
|
|
930
|
-
let St = (at = class extends
|
|
927
|
+
let St = (at = class extends D {
|
|
931
928
|
constructor() {
|
|
932
929
|
super(...arguments);
|
|
933
930
|
e(this, "name");
|
|
934
931
|
e(this, "args");
|
|
935
932
|
}
|
|
936
|
-
},
|
|
933
|
+
}, p(at, "UserUiContent"), at);
|
|
937
934
|
n([
|
|
938
|
-
|
|
935
|
+
i(String)
|
|
939
936
|
], St.prototype, "name", 2);
|
|
940
937
|
n([
|
|
941
|
-
|
|
938
|
+
i(String)
|
|
942
939
|
], St.prototype, "args", 2);
|
|
943
940
|
St = n([
|
|
944
941
|
g({ name: "UserUiContent" })
|
|
945
942
|
], St);
|
|
946
943
|
var rt;
|
|
947
|
-
let Tt = (rt = class extends
|
|
944
|
+
let Tt = (rt = class extends D {
|
|
948
945
|
constructor() {
|
|
949
946
|
super(...arguments);
|
|
950
947
|
e(this, "role");
|
|
951
948
|
e(this, "items");
|
|
952
949
|
}
|
|
953
|
-
},
|
|
950
|
+
}, p(rt, "ChatMessageContent"), rt);
|
|
954
951
|
n([
|
|
955
|
-
|
|
952
|
+
i(Dt)
|
|
956
953
|
], Tt.prototype, "role", 2);
|
|
957
954
|
n([
|
|
958
|
-
xt(() =>
|
|
955
|
+
xt(() => D)
|
|
959
956
|
], Tt.prototype, "items", 2);
|
|
960
957
|
Tt = n([
|
|
961
958
|
g({ name: "ChatMessageContent" })
|
|
962
959
|
], Tt);
|
|
963
960
|
var st;
|
|
964
|
-
let
|
|
961
|
+
let R = (st = class extends x {
|
|
965
962
|
constructor() {
|
|
966
963
|
super(...arguments);
|
|
967
964
|
e(this, "callId");
|
|
@@ -969,24 +966,24 @@ let N = (st = class extends x {
|
|
|
969
966
|
e(this, "arguments");
|
|
970
967
|
e(this, "functionCallIndex", 0);
|
|
971
968
|
}
|
|
972
|
-
},
|
|
969
|
+
}, p(st, "StreamingFunctionCallUpdateContent"), st);
|
|
973
970
|
n([
|
|
974
|
-
|
|
975
|
-
],
|
|
971
|
+
i(String)
|
|
972
|
+
], R.prototype, "callId", 2);
|
|
976
973
|
n([
|
|
977
|
-
|
|
978
|
-
],
|
|
974
|
+
i(String)
|
|
975
|
+
], R.prototype, "name", 2);
|
|
979
976
|
n([
|
|
980
|
-
|
|
981
|
-
],
|
|
977
|
+
i(String)
|
|
978
|
+
], R.prototype, "arguments", 2);
|
|
982
979
|
n([
|
|
983
|
-
|
|
984
|
-
],
|
|
985
|
-
|
|
980
|
+
i(Number)
|
|
981
|
+
], R.prototype, "functionCallIndex", 2);
|
|
982
|
+
R = n([
|
|
986
983
|
g({ name: "StreamingFunctionCallUpdateContent" })
|
|
987
|
-
],
|
|
984
|
+
], R);
|
|
988
985
|
var lt;
|
|
989
|
-
let
|
|
986
|
+
let At = (lt = class extends x {
|
|
990
987
|
constructor() {
|
|
991
988
|
super(...arguments);
|
|
992
989
|
e(this, "text");
|
|
@@ -994,15 +991,15 @@ let kt = (lt = class extends x {
|
|
|
994
991
|
// Not decorated with @jsonMember
|
|
995
992
|
e(this, "encoding");
|
|
996
993
|
}
|
|
997
|
-
},
|
|
994
|
+
}, p(lt, "StreamingTextContent"), lt);
|
|
998
995
|
n([
|
|
999
|
-
|
|
1000
|
-
],
|
|
1001
|
-
|
|
996
|
+
i(String)
|
|
997
|
+
], At.prototype, "text", 2);
|
|
998
|
+
At = n([
|
|
1002
999
|
g({ name: "StreamingTextContent" })
|
|
1003
|
-
],
|
|
1004
|
-
var
|
|
1005
|
-
let
|
|
1000
|
+
], At);
|
|
1001
|
+
var ct;
|
|
1002
|
+
let kt = (ct = class extends x {
|
|
1006
1003
|
constructor() {
|
|
1007
1004
|
super(...arguments);
|
|
1008
1005
|
e(this, "text");
|
|
@@ -1010,26 +1007,26 @@ let At = (pt = class extends x {
|
|
|
1010
1007
|
// Not decorated with @jsonMember
|
|
1011
1008
|
e(this, "encoding");
|
|
1012
1009
|
}
|
|
1013
|
-
},
|
|
1010
|
+
}, p(ct, "StreamingReasoningContent"), ct);
|
|
1014
1011
|
n([
|
|
1015
|
-
|
|
1016
|
-
],
|
|
1017
|
-
|
|
1012
|
+
i(String)
|
|
1013
|
+
], kt.prototype, "text", 2);
|
|
1014
|
+
kt = n([
|
|
1018
1015
|
g({ name: "StreamingReasoningContent" })
|
|
1019
|
-
],
|
|
1020
|
-
var
|
|
1021
|
-
let
|
|
1016
|
+
], kt);
|
|
1017
|
+
var pt;
|
|
1018
|
+
let Et = (pt = class extends x {
|
|
1022
1019
|
constructor() {
|
|
1023
1020
|
super(...arguments);
|
|
1024
1021
|
e(this, "headline");
|
|
1025
1022
|
}
|
|
1026
|
-
},
|
|
1023
|
+
}, p(pt, "StreamingThoughtHighlightContent"), pt);
|
|
1027
1024
|
n([
|
|
1028
|
-
|
|
1029
|
-
],
|
|
1030
|
-
|
|
1025
|
+
i(String)
|
|
1026
|
+
], Et.prototype, "headline", 2);
|
|
1027
|
+
Et = n([
|
|
1031
1028
|
g({ name: "StreamingThoughtHighlightContent" })
|
|
1032
|
-
],
|
|
1029
|
+
], Et);
|
|
1033
1030
|
var ut;
|
|
1034
1031
|
let M = (ut = class {
|
|
1035
1032
|
constructor() {
|
|
@@ -1037,21 +1034,21 @@ let M = (ut = class {
|
|
|
1037
1034
|
e(this, "description", "");
|
|
1038
1035
|
e(this, "interactionId", "");
|
|
1039
1036
|
}
|
|
1040
|
-
},
|
|
1037
|
+
}, p(ut, "InstructionSummary"), ut);
|
|
1041
1038
|
n([
|
|
1042
|
-
|
|
1039
|
+
i(String)
|
|
1043
1040
|
], M.prototype, "instructionCategory", 2);
|
|
1044
1041
|
n([
|
|
1045
|
-
|
|
1042
|
+
i(String)
|
|
1046
1043
|
], M.prototype, "description", 2);
|
|
1047
1044
|
n([
|
|
1048
|
-
|
|
1045
|
+
i(String)
|
|
1049
1046
|
], M.prototype, "interactionId", 2);
|
|
1050
1047
|
M = n([
|
|
1051
1048
|
g({ name: "InstructionSummary" })
|
|
1052
1049
|
], M);
|
|
1053
1050
|
var dt;
|
|
1054
|
-
let
|
|
1051
|
+
let _ = (dt = class {
|
|
1055
1052
|
constructor() {
|
|
1056
1053
|
e(this, "size", 0);
|
|
1057
1054
|
e(this, "originalSize", 0);
|
|
@@ -1066,46 +1063,46 @@ let D = (dt = class {
|
|
|
1066
1063
|
e(this, "compressionRatio");
|
|
1067
1064
|
e(this, "newOverallCount");
|
|
1068
1065
|
}
|
|
1069
|
-
},
|
|
1066
|
+
}, p(dt, "SessionInformation"), dt);
|
|
1070
1067
|
n([
|
|
1071
|
-
|
|
1072
|
-
],
|
|
1068
|
+
i(Number)
|
|
1069
|
+
], _.prototype, "size", 2);
|
|
1073
1070
|
n([
|
|
1074
|
-
|
|
1075
|
-
],
|
|
1071
|
+
i(Number)
|
|
1072
|
+
], _.prototype, "originalSize", 2);
|
|
1076
1073
|
n([
|
|
1077
|
-
|
|
1078
|
-
],
|
|
1074
|
+
i(Number)
|
|
1075
|
+
], _.prototype, "ratio", 2);
|
|
1079
1076
|
n([
|
|
1080
|
-
|
|
1081
|
-
],
|
|
1077
|
+
i(Number)
|
|
1078
|
+
], _.prototype, "previousRatio", 2);
|
|
1082
1079
|
n([
|
|
1083
|
-
|
|
1084
|
-
],
|
|
1080
|
+
i(Number)
|
|
1081
|
+
], _.prototype, "threshold", 2);
|
|
1085
1082
|
n([
|
|
1086
|
-
|
|
1087
|
-
],
|
|
1083
|
+
i(Number)
|
|
1084
|
+
], _.prototype, "maxSize", 2);
|
|
1088
1085
|
n([
|
|
1089
|
-
|
|
1090
|
-
],
|
|
1086
|
+
i(String)
|
|
1087
|
+
], _.prototype, "id", 2);
|
|
1091
1088
|
n([
|
|
1092
1089
|
xt(M)
|
|
1093
|
-
],
|
|
1090
|
+
], _.prototype, "instructionSummaries", 2);
|
|
1094
1091
|
n([
|
|
1095
|
-
|
|
1096
|
-
],
|
|
1092
|
+
i(Number)
|
|
1093
|
+
], _.prototype, "interactionsCompressed", 2);
|
|
1097
1094
|
n([
|
|
1098
|
-
|
|
1099
|
-
],
|
|
1095
|
+
i(Number)
|
|
1096
|
+
], _.prototype, "interactionsRemoved", 2);
|
|
1100
1097
|
n([
|
|
1101
|
-
|
|
1102
|
-
],
|
|
1098
|
+
i(Number)
|
|
1099
|
+
], _.prototype, "compressionRatio", 2);
|
|
1103
1100
|
n([
|
|
1104
|
-
|
|
1105
|
-
],
|
|
1106
|
-
|
|
1101
|
+
i(Number)
|
|
1102
|
+
], _.prototype, "newOverallCount", 2);
|
|
1103
|
+
_ = n([
|
|
1107
1104
|
g({ name: "SessionInformation" })
|
|
1108
|
-
],
|
|
1105
|
+
], _);
|
|
1109
1106
|
var mt;
|
|
1110
1107
|
let S = (mt = class {
|
|
1111
1108
|
constructor() {
|
|
@@ -1128,48 +1125,48 @@ let S = (mt = class {
|
|
|
1128
1125
|
e(this, "subAgentName");
|
|
1129
1126
|
e(this, "text");
|
|
1130
1127
|
}
|
|
1131
|
-
},
|
|
1128
|
+
}, p(mt, "LlmEvent"), mt);
|
|
1132
1129
|
n([
|
|
1133
|
-
|
|
1130
|
+
i(Number)
|
|
1134
1131
|
], S.prototype, "timestamp", 2);
|
|
1135
1132
|
n([
|
|
1136
|
-
|
|
1133
|
+
i(String)
|
|
1137
1134
|
], S.prototype, "mimeType", 2);
|
|
1138
1135
|
n([
|
|
1139
|
-
|
|
1136
|
+
i(Boolean)
|
|
1140
1137
|
], S.prototype, "partial", 2);
|
|
1141
1138
|
n([
|
|
1142
|
-
|
|
1139
|
+
i(Boolean)
|
|
1143
1140
|
], S.prototype, "turnComplete", 2);
|
|
1144
1141
|
n([
|
|
1145
|
-
|
|
1142
|
+
i(Boolean)
|
|
1146
1143
|
], S.prototype, "visible", 2);
|
|
1147
1144
|
n([
|
|
1148
|
-
|
|
1145
|
+
i(String)
|
|
1149
1146
|
], S.prototype, "serverError", 2);
|
|
1150
1147
|
n([
|
|
1151
|
-
|
|
1148
|
+
i(String)
|
|
1152
1149
|
], S.prototype, "interactionId", 2);
|
|
1153
1150
|
n([
|
|
1154
|
-
|
|
1151
|
+
i(_)
|
|
1155
1152
|
], S.prototype, "sessionInformation", 2);
|
|
1156
1153
|
n([
|
|
1157
|
-
|
|
1154
|
+
i(ht)
|
|
1158
1155
|
], S.prototype, "eventType", 2);
|
|
1159
1156
|
n([
|
|
1160
1157
|
xt(O)
|
|
1161
1158
|
], S.prototype, "artifactsGenerated", 2);
|
|
1162
1159
|
n([
|
|
1163
|
-
|
|
1160
|
+
i(String)
|
|
1164
1161
|
], S.prototype, "author", 2);
|
|
1165
1162
|
n([
|
|
1166
|
-
|
|
1163
|
+
i(Dt)
|
|
1167
1164
|
], S.prototype, "role", 2);
|
|
1168
1165
|
n([
|
|
1169
|
-
|
|
1166
|
+
i(String)
|
|
1170
1167
|
], S.prototype, "command", 2);
|
|
1171
1168
|
n([
|
|
1172
|
-
|
|
1169
|
+
i(Tt)
|
|
1173
1170
|
], S.prototype, "content", 2);
|
|
1174
1171
|
n([
|
|
1175
1172
|
xt(() => x)
|
|
@@ -1191,42 +1188,42 @@ let F = (gt = class {
|
|
|
1191
1188
|
e(this, "partialEventType");
|
|
1192
1189
|
e(this, "subAgentId");
|
|
1193
1190
|
}
|
|
1194
|
-
},
|
|
1191
|
+
}, p(gt, "PartialLlmEvent"), gt);
|
|
1195
1192
|
n([
|
|
1196
|
-
|
|
1193
|
+
i(Number, { name: "ts" })
|
|
1197
1194
|
], F.prototype, "timeStamp", 2);
|
|
1198
1195
|
n([
|
|
1199
|
-
|
|
1196
|
+
i(String, { name: "pt" })
|
|
1200
1197
|
], F.prototype, "partialText", 2);
|
|
1201
1198
|
n([
|
|
1202
|
-
|
|
1199
|
+
i(String, { name: "pr" })
|
|
1203
1200
|
], F.prototype, "partialReasoning", 2);
|
|
1204
1201
|
n([
|
|
1205
|
-
|
|
1202
|
+
i(String, { name: "fn" })
|
|
1206
1203
|
], F.prototype, "functionName", 2);
|
|
1207
1204
|
n([
|
|
1208
1205
|
xt(() => x)
|
|
1209
1206
|
], F.prototype, "streamingParts", 2);
|
|
1210
1207
|
n([
|
|
1211
|
-
|
|
1208
|
+
i(String, { name: "fid" })
|
|
1212
1209
|
], F.prototype, "functionCallId", 2);
|
|
1213
1210
|
n([
|
|
1214
|
-
|
|
1211
|
+
i(String, { name: "tp" })
|
|
1215
1212
|
], F.prototype, "type", 2);
|
|
1216
1213
|
n([
|
|
1217
|
-
|
|
1214
|
+
i(String, { name: "itid" })
|
|
1218
1215
|
], F.prototype, "iteractionId", 2);
|
|
1219
1216
|
n([
|
|
1220
|
-
|
|
1217
|
+
i(ht)
|
|
1221
1218
|
], F.prototype, "partialEventType", 2);
|
|
1222
1219
|
n([
|
|
1223
|
-
|
|
1220
|
+
i(String, { name: "said" })
|
|
1224
1221
|
], F.prototype, "subAgentId", 2);
|
|
1225
1222
|
F = n([
|
|
1226
1223
|
g({ name: "PartialLlmEvent" })
|
|
1227
1224
|
], F);
|
|
1228
1225
|
var ft;
|
|
1229
|
-
let
|
|
1226
|
+
let A = (ft = class {
|
|
1230
1227
|
constructor() {
|
|
1231
1228
|
e(this, "type");
|
|
1232
1229
|
e(this, "event");
|
|
@@ -1237,51 +1234,51 @@ let w = (ft = class {
|
|
|
1237
1234
|
e(this, "subAgentName");
|
|
1238
1235
|
e(this, "seq");
|
|
1239
1236
|
}
|
|
1240
|
-
},
|
|
1237
|
+
}, p(ft, "StreamingResponse"), ft);
|
|
1241
1238
|
n([
|
|
1242
|
-
|
|
1243
|
-
],
|
|
1239
|
+
i(String)
|
|
1240
|
+
], A.prototype, "type", 2);
|
|
1244
1241
|
n([
|
|
1245
|
-
|
|
1246
|
-
],
|
|
1242
|
+
i(S)
|
|
1243
|
+
], A.prototype, "event", 2);
|
|
1247
1244
|
n([
|
|
1248
|
-
|
|
1249
|
-
],
|
|
1245
|
+
i(String)
|
|
1246
|
+
], A.prototype, "sessionId", 2);
|
|
1250
1247
|
n([
|
|
1251
|
-
|
|
1252
|
-
],
|
|
1248
|
+
i(String)
|
|
1249
|
+
], A.prototype, "accessToken", 2);
|
|
1253
1250
|
n([
|
|
1254
|
-
|
|
1255
|
-
],
|
|
1251
|
+
i(F, { name: "pe" })
|
|
1252
|
+
], A.prototype, "partialEvent", 2);
|
|
1256
1253
|
n([
|
|
1257
|
-
|
|
1258
|
-
],
|
|
1254
|
+
i(String)
|
|
1255
|
+
], A.prototype, "subAgentId", 2);
|
|
1259
1256
|
n([
|
|
1260
|
-
|
|
1261
|
-
],
|
|
1257
|
+
i(String)
|
|
1258
|
+
], A.prototype, "subAgentName", 2);
|
|
1262
1259
|
n([
|
|
1263
|
-
|
|
1264
|
-
],
|
|
1265
|
-
|
|
1260
|
+
i(Number)
|
|
1261
|
+
], A.prototype, "seq", 2);
|
|
1262
|
+
A = n([
|
|
1266
1263
|
g({ name: "StreamingResponse" })
|
|
1267
|
-
],
|
|
1268
|
-
var
|
|
1269
|
-
let
|
|
1264
|
+
], A);
|
|
1265
|
+
var yt;
|
|
1266
|
+
let Ut = (yt = class {
|
|
1270
1267
|
constructor() {
|
|
1271
1268
|
e(this, "events");
|
|
1272
1269
|
}
|
|
1273
|
-
},
|
|
1270
|
+
}, p(yt, "Payload"), yt);
|
|
1274
1271
|
n([
|
|
1275
1272
|
xt(S)
|
|
1276
|
-
],
|
|
1277
|
-
|
|
1273
|
+
], Ut.prototype, "events", 2);
|
|
1274
|
+
Ut = n([
|
|
1278
1275
|
g({ name: "Payload" })
|
|
1279
|
-
],
|
|
1280
|
-
function
|
|
1276
|
+
], Ut);
|
|
1277
|
+
function Wt(s) {
|
|
1281
1278
|
var r;
|
|
1282
1279
|
const t = (s == null ? void 0 : s.presentation) ?? ((r = s == null ? void 0 : s.metadata) == null ? void 0 : r[ee]);
|
|
1283
1280
|
if (!t || typeof t != "object") return { isUi: !1 };
|
|
1284
|
-
const
|
|
1281
|
+
const o = t, a = /* @__PURE__ */ p((c, d) => o[c] ?? o[d], "pick");
|
|
1285
1282
|
return {
|
|
1286
1283
|
isUi: a("isUi", "IsUi") === !0,
|
|
1287
1284
|
askUserComponent: a("askUserComponent", "AskUserComponent") || void 0,
|
|
@@ -1292,8 +1289,8 @@ function Ht(s) {
|
|
|
1292
1289
|
parked: a("parked", "Parked") === !0 || void 0
|
|
1293
1290
|
};
|
|
1294
1291
|
}
|
|
1295
|
-
|
|
1296
|
-
const
|
|
1292
|
+
p(Wt, "readPresentation");
|
|
1293
|
+
const w = class w {
|
|
1297
1294
|
constructor(t) {
|
|
1298
1295
|
e(this, "uniqueId");
|
|
1299
1296
|
e(this, "mimeType");
|
|
@@ -1328,8 +1325,8 @@ const v = class v {
|
|
|
1328
1325
|
e(this, "visible", !0);
|
|
1329
1326
|
this.interactionId = t, this.author = "main";
|
|
1330
1327
|
}
|
|
1331
|
-
static createErrorEvent(t,
|
|
1332
|
-
const a = new
|
|
1328
|
+
static createErrorEvent(t, o) {
|
|
1329
|
+
const a = new w(o);
|
|
1333
1330
|
a.turn_complete = !0, a.partial = !1, a.parts = [];
|
|
1334
1331
|
const r = {
|
|
1335
1332
|
eventType: l.ServerError,
|
|
@@ -1340,85 +1337,88 @@ const v = class v {
|
|
|
1340
1337
|
author: "main",
|
|
1341
1338
|
created: /* @__PURE__ */ new Date(),
|
|
1342
1339
|
partial: !1,
|
|
1343
|
-
isStillWriting: !1,
|
|
1344
1340
|
mustPush: !1,
|
|
1345
1341
|
textAppendable: !1
|
|
1346
1342
|
};
|
|
1347
1343
|
return a.parts.push(r), a;
|
|
1348
1344
|
}
|
|
1349
1345
|
static parseFlatPropertiesTypedEvent(t) {
|
|
1350
|
-
var a, r,
|
|
1351
|
-
const
|
|
1352
|
-
if (
|
|
1346
|
+
var a, r, c;
|
|
1347
|
+
const o = new w(t.interactionId);
|
|
1348
|
+
if (o.serverError = t.serverError, !t.interactionId && !w.carriesServerError(t))
|
|
1353
1349
|
throw new Error("Interaction ID is required");
|
|
1354
|
-
switch (
|
|
1350
|
+
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"', {
|
|
1355
1351
|
interactionId: t.interactionId,
|
|
1356
1352
|
turnComplete: t.turnComplete
|
|
1357
1353
|
}), t == null ? void 0 : t.author) {
|
|
1358
1354
|
case Yt:
|
|
1359
|
-
|
|
1355
|
+
o.author = "tool";
|
|
1360
1356
|
break;
|
|
1361
1357
|
case "system":
|
|
1362
|
-
|
|
1358
|
+
o.author = "system";
|
|
1363
1359
|
break;
|
|
1364
1360
|
default:
|
|
1365
|
-
|
|
1361
|
+
o.author = "main";
|
|
1366
1362
|
}
|
|
1367
|
-
return
|
|
1363
|
+
return o.mimeType = t.mimeType, o.created = new Date(t.timestamp), o.eventType = l.NotDefined, o.partial = ((c = (r = t.partial) == null ? void 0 : r.toString()) == null ? void 0 : c.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;
|
|
1368
1364
|
}
|
|
1369
1365
|
static getPartType(t) {
|
|
1370
|
-
return t instanceof Ft ? "TextContent" : t instanceof
|
|
1366
|
+
return t instanceof Ft ? "TextContent" : t instanceof v ? "FunctionCallContent" : t instanceof b ? "FunctionResultContent" : t instanceof R ? "StreamingFunctionCallUpdateContent" : t instanceof I ? "StreamingFinalFunctionCallContent" : t instanceof E ? "StreamingFinalFunctionResultContent" : t instanceof Ct ? "FunctionClientOutputContent" : t instanceof G ? "StreamingClientOutputContent" : t instanceof St ? "UserUiContent" : t instanceof At ? "StreamingTextContent" : t instanceof kt ? "StreamingReasoningContent" : t instanceof Et ? "StreamingThoughtHighlightContent" : t instanceof P ? "ToolEventContent" : t instanceof U ? "StreamingToolEventContent" : "Unknown";
|
|
1367
|
+
}
|
|
1368
|
+
/** True when the event holds the SDK's "Server Error" sentinel call (`Event.GetErrorEvent`). */
|
|
1369
|
+
static carriesServerError(t) {
|
|
1370
|
+
var a;
|
|
1371
|
+
return (((a = t.content) == null ? void 0 : a.items) ?? []).some((r) => (r == null ? void 0 : r.id) === w.SERVER_ERROR_CALL_ID);
|
|
1371
1372
|
}
|
|
1372
1373
|
static parseFromTypedEvent(t) {
|
|
1373
|
-
var
|
|
1374
|
-
const
|
|
1375
|
-
if (
|
|
1376
|
-
return
|
|
1374
|
+
var c, d, f, H, Pt, Gt, Mt;
|
|
1375
|
+
const o = w.parseFlatPropertiesTypedEvent(t);
|
|
1376
|
+
if (o.serverError)
|
|
1377
|
+
return o.parts.push(Ot.fromError(o.serverError)), o;
|
|
1377
1378
|
if (!t.content && !t.streamingParts)
|
|
1378
|
-
return
|
|
1379
|
-
|
|
1380
|
-
const a = [...((
|
|
1381
|
-
|
|
1382
|
-
for (const
|
|
1379
|
+
return o;
|
|
1380
|
+
o.parts = [];
|
|
1381
|
+
const a = [...((c = t.content) == null ? void 0 : c.items) ?? [], ...t.streamingParts ?? []];
|
|
1382
|
+
o.eventType = Xt(((d = t.eventType) == null ? void 0 : d.type) ?? "");
|
|
1383
|
+
for (const y of a) {
|
|
1383
1384
|
let u = {
|
|
1384
1385
|
id: "",
|
|
1385
|
-
author:
|
|
1386
|
-
eventType:
|
|
1386
|
+
author: o.author,
|
|
1387
|
+
eventType: o.eventType,
|
|
1387
1388
|
created: /* @__PURE__ */ new Date(),
|
|
1388
|
-
visible:
|
|
1389
|
-
partial:
|
|
1390
|
-
isStillWriting: !1,
|
|
1389
|
+
visible: o.visible,
|
|
1390
|
+
partial: o.partial,
|
|
1391
1391
|
mustPush: !1,
|
|
1392
1392
|
textAppendable: !1
|
|
1393
1393
|
};
|
|
1394
|
-
const
|
|
1395
|
-
if (
|
|
1396
|
-
var r =
|
|
1397
|
-
if (r.id ==
|
|
1398
|
-
const m = r.arguments ?? {},
|
|
1394
|
+
const h = w.getPartType(y);
|
|
1395
|
+
if (h == C.FunctionCallContent || h == C.FunctionResultContent || h == C.StreamingFinalFunctionCallContent || h == C.StreamingFinalFunctionResultContent) {
|
|
1396
|
+
var r = y;
|
|
1397
|
+
if (r.id == w.SERVER_ERROR_CALL_ID) {
|
|
1398
|
+
const m = r.arguments ?? {}, W = typeof m.error == "string" && m.error.trim().length > 0 ? m.error : JSON.stringify(r.arguments);
|
|
1399
1399
|
u.eventType = l.ServerError, u.errorDetails = {
|
|
1400
|
-
errorMessage:
|
|
1400
|
+
errorMessage: W,
|
|
1401
1401
|
stackTrace: typeof m.stackTrace == "string" ? m.stackTrace : void 0
|
|
1402
1402
|
}, u.functionDetails = void 0;
|
|
1403
1403
|
} else {
|
|
1404
|
-
u.eventType =
|
|
1404
|
+
u.eventType = h == C.FunctionCallContent || h == C.StreamingFinalFunctionCallContent ? l.FunctionCall : l.FunctionResponse;
|
|
1405
1405
|
let m;
|
|
1406
1406
|
try {
|
|
1407
1407
|
if (r != null && r.result)
|
|
1408
1408
|
if (typeof r.result == "object")
|
|
1409
1409
|
m = r.result;
|
|
1410
1410
|
else if (typeof r.result == "string") {
|
|
1411
|
-
const
|
|
1412
|
-
m = typeof
|
|
1411
|
+
const _t = JSON.parse(r.result);
|
|
1412
|
+
m = typeof _t == "object" && _t !== null ? _t : r.result;
|
|
1413
1413
|
} else
|
|
1414
1414
|
m = r.result;
|
|
1415
|
-
} catch (
|
|
1416
|
-
console.warn("Parse function error",
|
|
1415
|
+
} catch (_t) {
|
|
1416
|
+
console.warn("Parse function error", _t), m = r == null ? void 0 : r.result;
|
|
1417
1417
|
}
|
|
1418
1418
|
u.thoughtDetails = {
|
|
1419
1419
|
text: ""
|
|
1420
1420
|
};
|
|
1421
|
-
const
|
|
1421
|
+
const W = Wt(r);
|
|
1422
1422
|
u.functionDetails = {
|
|
1423
1423
|
id: (r == null ? void 0 : r.id) ?? "",
|
|
1424
1424
|
args: r == null ? void 0 : r.arguments,
|
|
@@ -1427,40 +1427,40 @@ const v = class v {
|
|
|
1427
1427
|
// `start`. Keying on the persisted type alone left every LIVE call `Executing` with no
|
|
1428
1428
|
// start, and a renderer gating its elapsed timer on `status === 'Executing' && start`
|
|
1429
1429
|
// showed "running" with no stopwatch (AIA issue 1022). Same for `end` on the result.
|
|
1430
|
-
start:
|
|
1431
|
-
end:
|
|
1430
|
+
start: h == C.FunctionCallContent || h == C.StreamingFinalFunctionCallContent ? o.created : void 0,
|
|
1431
|
+
end: h == C.FunctionResultContent || h == C.StreamingFinalFunctionResultContent ? o.created : void 0,
|
|
1432
1432
|
text: JSON.stringify(r == null ? void 0 : r.arguments) ?? "",
|
|
1433
1433
|
name: (r == null ? void 0 : r.functionName) ?? "",
|
|
1434
1434
|
status: u.eventType == l.FunctionCall ? "Executing" : "Done",
|
|
1435
1435
|
response: m,
|
|
1436
|
-
isUi:
|
|
1437
|
-
argsDescription:
|
|
1436
|
+
isUi: W.isUi,
|
|
1437
|
+
argsDescription: W.argsDescription,
|
|
1438
1438
|
// Client-only payload riding the RESULT event: live top-level `clientOutput`, or
|
|
1439
1439
|
// metadata.clientOutput on the collapsed/persisted result. Calls leave it undefined.
|
|
1440
1440
|
// The persisted-replay form also folds in via FunctionClientOutputContent.
|
|
1441
1441
|
clientOutput: (r == null ? void 0 : r.clientOutput) ?? ((f = r == null ? void 0 : r.metadata) == null ? void 0 : f.clientOutput),
|
|
1442
|
-
askUserComponent:
|
|
1442
|
+
askUserComponent: W.askUserComponent,
|
|
1443
1443
|
// Runtime "don't render" override on a RESULT (CallContext.CancelUiRender).
|
|
1444
|
-
cancelUi:
|
|
1444
|
+
cancelUi: W.cancelUi
|
|
1445
1445
|
}, u.functionDetails.isAskUser = !!u.functionDetails.askUserComponent, t.text = r == null ? void 0 : r.arguments;
|
|
1446
1446
|
}
|
|
1447
|
-
} else if (
|
|
1448
|
-
u.eventType = l.Text, u.text = (
|
|
1449
|
-
`),
|
|
1450
|
-
else if (
|
|
1451
|
-
u.eventType = l.Text, u.text = (Pt =
|
|
1452
|
-
`),
|
|
1453
|
-
else if (
|
|
1447
|
+
} else if (h == C.StreamingTextContent)
|
|
1448
|
+
u.eventType = l.Text, u.text = (H = y == null ? void 0 : y.text) == null ? void 0 : H.replaceAll("\\n", `
|
|
1449
|
+
`), t.text = u.text;
|
|
1450
|
+
else if (h == C.TextContent)
|
|
1451
|
+
u.eventType = l.Text, u.text = (Pt = y == null ? void 0 : y.text) == null ? void 0 : Pt.replaceAll("\\n", `
|
|
1452
|
+
`), t.text = u.text;
|
|
1453
|
+
else if (h == C.StreamingReasoningContent)
|
|
1454
1454
|
u.eventType = l.Thought, u.thoughtDetails = {
|
|
1455
|
-
text: ((Gt =
|
|
1455
|
+
text: ((Gt = y == null ? void 0 : y.text) == null ? void 0 : Gt.replaceAll("\\n", `
|
|
1456
1456
|
`)) ?? ""
|
|
1457
|
-
}, u.text = (Mt =
|
|
1458
|
-
`),
|
|
1459
|
-
else if (
|
|
1460
|
-
const m = (
|
|
1457
|
+
}, u.text = (Mt = y == null ? void 0 : y.text) == null ? void 0 : Mt.replaceAll("\\n", `
|
|
1458
|
+
`), t.text = u.text;
|
|
1459
|
+
else if (h == C.StreamingThoughtHighlightContent) {
|
|
1460
|
+
const m = (y == null ? void 0 : y.headline) ?? "";
|
|
1461
1461
|
u.eventType = l.ThoughtHighlight, u.thoughtDetails = { text: "", headlines: m ? [m] : [] };
|
|
1462
|
-
} else if (
|
|
1463
|
-
const m =
|
|
1462
|
+
} else if (h == C.StreamingFunctionCallUpdateContent) {
|
|
1463
|
+
const m = y;
|
|
1464
1464
|
u.eventType = l.PartialFunctionCall, u.text = m.arguments, u.thoughtDetails = {
|
|
1465
1465
|
text: ""
|
|
1466
1466
|
}, u.functionDetails = {
|
|
@@ -1469,24 +1469,24 @@ const v = class v {
|
|
|
1469
1469
|
status: "Composing",
|
|
1470
1470
|
name: (m == null ? void 0 : m.name) ?? "Unknown"
|
|
1471
1471
|
}, t.text = u.text;
|
|
1472
|
-
} else if (
|
|
1472
|
+
} else if (h == C.ToolEventContent || h == C.StreamingToolEventContent) {
|
|
1473
1473
|
u.eventType = l.ToolEvent;
|
|
1474
|
-
const m =
|
|
1474
|
+
const m = y;
|
|
1475
1475
|
u.toolDetails = {
|
|
1476
1476
|
eventName: m.eventName ?? "",
|
|
1477
1477
|
eventData: m.eventData ?? "",
|
|
1478
1478
|
sessionId: m.sessionId ?? void 0
|
|
1479
1479
|
};
|
|
1480
|
-
} else if (
|
|
1481
|
-
const m =
|
|
1480
|
+
} else if (h == C.FunctionClientOutputContent) {
|
|
1481
|
+
const m = y;
|
|
1482
1482
|
u.eventType = l.FunctionClientOutput, u.functionDetails = {
|
|
1483
1483
|
id: m.id ?? "",
|
|
1484
1484
|
name: "",
|
|
1485
1485
|
status: "Done",
|
|
1486
1486
|
clientOutput: m.data
|
|
1487
1487
|
};
|
|
1488
|
-
} else if (
|
|
1489
|
-
const m =
|
|
1488
|
+
} else if (h == C.StreamingClientOutputContent) {
|
|
1489
|
+
const m = y;
|
|
1490
1490
|
u.eventType = l.FunctionClientOutput, u.functionDetails = {
|
|
1491
1491
|
id: m.id ?? "",
|
|
1492
1492
|
name: "",
|
|
@@ -1495,10 +1495,10 @@ const v = class v {
|
|
|
1495
1495
|
status: "Executing",
|
|
1496
1496
|
clientOutput: m.clientOutput,
|
|
1497
1497
|
// The park signal itself (the reason this event fires even with no prefill).
|
|
1498
|
-
parked:
|
|
1498
|
+
parked: Wt(m).parked
|
|
1499
1499
|
};
|
|
1500
|
-
} else if (
|
|
1501
|
-
const m =
|
|
1500
|
+
} else if (h == C.UserUiContent) {
|
|
1501
|
+
const m = y;
|
|
1502
1502
|
u.eventType = l.UserAnswer, u.author = "user", u.functionDetails = {
|
|
1503
1503
|
id: "",
|
|
1504
1504
|
name: m.name ?? "",
|
|
@@ -1507,14 +1507,14 @@ const v = class v {
|
|
|
1507
1507
|
isUi: !0
|
|
1508
1508
|
};
|
|
1509
1509
|
} else {
|
|
1510
|
-
u.eventType = l.NotDefined, console.warn(`Got a unmapped event_type:${
|
|
1510
|
+
u.eventType = l.NotDefined, console.warn(`Got a unmapped event_type:${o.eventType}, data:`, h, y);
|
|
1511
1511
|
continue;
|
|
1512
1512
|
}
|
|
1513
|
-
|
|
1513
|
+
o.parts.push(u);
|
|
1514
1514
|
}
|
|
1515
|
-
return
|
|
1515
|
+
return o;
|
|
1516
1516
|
}
|
|
1517
|
-
static createFromThought(t,
|
|
1517
|
+
static createFromThought(t, o) {
|
|
1518
1518
|
return {
|
|
1519
1519
|
author: "main",
|
|
1520
1520
|
visible: !0,
|
|
@@ -1532,7 +1532,7 @@ const v = class v {
|
|
|
1532
1532
|
parts: [
|
|
1533
1533
|
{
|
|
1534
1534
|
thoughtDetails: {
|
|
1535
|
-
text:
|
|
1535
|
+
text: o
|
|
1536
1536
|
},
|
|
1537
1537
|
// ThoughtPart renders `part.text` (via getPartTextContent), so a
|
|
1538
1538
|
// thought built here with only `thoughtDetails` rendered as an
|
|
@@ -1540,12 +1540,11 @@ const v = class v {
|
|
|
1540
1540
|
// StreamingReasoningContent — match it, or this factory produces
|
|
1541
1541
|
// a part the UI cannot show. Only the demo's fake gateway builds
|
|
1542
1542
|
// thoughts this way, which is why it went unnoticed.
|
|
1543
|
-
text:
|
|
1544
|
-
id:
|
|
1543
|
+
text: o,
|
|
1544
|
+
id: bt(),
|
|
1545
1545
|
created: /* @__PURE__ */ new Date(),
|
|
1546
1546
|
eventType: l.Thought,
|
|
1547
1547
|
author: "main",
|
|
1548
|
-
isStillWriting: !1,
|
|
1549
1548
|
textAppendable: !0,
|
|
1550
1549
|
partial: !0,
|
|
1551
1550
|
mustPush: !0
|
|
@@ -1553,8 +1552,8 @@ const v = class v {
|
|
|
1553
1552
|
]
|
|
1554
1553
|
};
|
|
1555
1554
|
}
|
|
1556
|
-
static createFromFunctionName(t,
|
|
1557
|
-
const r =
|
|
1555
|
+
static createFromFunctionName(t, o, a) {
|
|
1556
|
+
const r = w.createFromText("", o);
|
|
1558
1557
|
return r.parts[0].text = void 0, r.parts[0].thoughtDetails = void 0, r.parts[0].textAppendable = !1, r.parts[0].mustPush = !0, r.parts[0].functionDetails = {
|
|
1559
1558
|
name: t,
|
|
1560
1559
|
id: "callId",
|
|
@@ -1565,13 +1564,13 @@ const v = class v {
|
|
|
1565
1564
|
args: a
|
|
1566
1565
|
}, r;
|
|
1567
1566
|
}
|
|
1568
|
-
static createFromText(t,
|
|
1567
|
+
static createFromText(t, o, a) {
|
|
1569
1568
|
return {
|
|
1570
1569
|
author: "main",
|
|
1571
1570
|
visible: !0,
|
|
1572
1571
|
eventType: l.Text,
|
|
1573
1572
|
uniqueId: (/* @__PURE__ */ new Date()).getTime().toString(),
|
|
1574
|
-
interactionId:
|
|
1573
|
+
interactionId: o,
|
|
1575
1574
|
allEventTypes: [l.Text],
|
|
1576
1575
|
artifactsDelta: [""],
|
|
1577
1576
|
model_session_id: "",
|
|
@@ -1589,7 +1588,7 @@ const v = class v {
|
|
|
1589
1588
|
thoughtDetails: a ? {
|
|
1590
1589
|
text: a
|
|
1591
1590
|
} : void 0,
|
|
1592
|
-
id:
|
|
1591
|
+
id: bt(),
|
|
1593
1592
|
created: /* @__PURE__ */ new Date(),
|
|
1594
1593
|
// Part eventType MUST match the outer event's eventType.
|
|
1595
1594
|
// Was previously `Thought` here, which made the merger
|
|
@@ -1599,7 +1598,6 @@ const v = class v {
|
|
|
1599
1598
|
// then "disappear" once the part was reclassified.
|
|
1600
1599
|
eventType: l.Text,
|
|
1601
1600
|
author: "main",
|
|
1602
|
-
isStillWriting: !1,
|
|
1603
1601
|
textAppendable: !0,
|
|
1604
1602
|
partial: !0,
|
|
1605
1603
|
mustPush: !0,
|
|
@@ -1609,166 +1607,167 @@ const v = class v {
|
|
|
1609
1607
|
};
|
|
1610
1608
|
}
|
|
1611
1609
|
};
|
|
1612
|
-
|
|
1613
|
-
|
|
1610
|
+
p(w, "ServerEvent"), /** The call id the SDK puts on its error sentinel (`Event.ServerErrorIdentification`). */
|
|
1611
|
+
e(w, "SERVER_ERROR_CALL_ID", "Server Error");
|
|
1612
|
+
let Lt = w;
|
|
1614
1613
|
const Bt = [
|
|
1615
1614
|
// KernelContent derived types
|
|
1616
1615
|
Ft,
|
|
1617
1616
|
wt,
|
|
1618
|
-
|
|
1617
|
+
v,
|
|
1619
1618
|
P,
|
|
1620
|
-
|
|
1619
|
+
b,
|
|
1621
1620
|
Ct,
|
|
1622
1621
|
St,
|
|
1623
1622
|
Tt,
|
|
1624
1623
|
// StreamingKernelContent derived types
|
|
1625
|
-
kt,
|
|
1626
|
-
N,
|
|
1627
1624
|
At,
|
|
1628
|
-
vt,
|
|
1629
1625
|
R,
|
|
1630
|
-
|
|
1631
|
-
|
|
1626
|
+
kt,
|
|
1627
|
+
Et,
|
|
1628
|
+
U,
|
|
1629
|
+
I,
|
|
1630
|
+
E,
|
|
1632
1631
|
G,
|
|
1633
1632
|
M
|
|
1634
1633
|
];
|
|
1635
1634
|
function ne(s) {
|
|
1636
1635
|
return s.name;
|
|
1637
1636
|
}
|
|
1638
|
-
|
|
1639
|
-
function Kt(s, t,
|
|
1640
|
-
t.constructor !==
|
|
1637
|
+
p(ne, "getConstructorName");
|
|
1638
|
+
function Kt(s, t, o, a) {
|
|
1639
|
+
t.constructor !== o && (s.$type = (a == null ? void 0 : a.name) ?? ne(t.constructor));
|
|
1641
1640
|
}
|
|
1642
|
-
|
|
1641
|
+
p(Kt, "dotNetTypeEmitter");
|
|
1643
1642
|
function Jt(s, t) {
|
|
1644
1643
|
if (s.$type != null)
|
|
1645
1644
|
return t.get(s.$type);
|
|
1646
1645
|
}
|
|
1647
|
-
|
|
1648
|
-
function
|
|
1649
|
-
const s = new
|
|
1646
|
+
p(Jt, "dotnetTypeResolver");
|
|
1647
|
+
function Vt() {
|
|
1648
|
+
const s = new zt(S);
|
|
1650
1649
|
return s.config({
|
|
1651
1650
|
knownTypes: Bt,
|
|
1652
1651
|
typeHintEmitter: Kt,
|
|
1653
1652
|
typeResolver: Jt
|
|
1654
1653
|
}), s;
|
|
1655
1654
|
}
|
|
1656
|
-
|
|
1657
|
-
function
|
|
1658
|
-
const s = new
|
|
1655
|
+
p(Vt, "createEventSerializer");
|
|
1656
|
+
function oe() {
|
|
1657
|
+
const s = new zt(A);
|
|
1659
1658
|
return s.config({
|
|
1660
1659
|
knownTypes: Bt,
|
|
1661
1660
|
typeHintEmitter: Kt,
|
|
1662
1661
|
typeResolver: Jt
|
|
1663
1662
|
}), s;
|
|
1664
1663
|
}
|
|
1665
|
-
|
|
1666
|
-
function
|
|
1664
|
+
p(oe, "createStreamingResponseSerializer");
|
|
1665
|
+
function $t(s) {
|
|
1667
1666
|
try {
|
|
1668
1667
|
return JSON.parse(s), s;
|
|
1669
1668
|
} catch {
|
|
1670
|
-
let
|
|
1669
|
+
let o = "", a = !1;
|
|
1671
1670
|
for (let r = 0; r < s.length; r++) {
|
|
1672
|
-
const
|
|
1673
|
-
if (
|
|
1671
|
+
const c = s[r], d = c.charCodeAt(0);
|
|
1672
|
+
if (c === "\\" && a && r + 1 < s.length) {
|
|
1674
1673
|
const f = s[r + 1];
|
|
1675
1674
|
if (f === '"' || f === "\\" || f === "/" || f === "b" || f === "f" || f === "n" || f === "r" || f === "t") {
|
|
1676
|
-
|
|
1675
|
+
o += c + f, r++;
|
|
1677
1676
|
continue;
|
|
1678
1677
|
} else if (f === "u" && r + 5 < s.length) {
|
|
1679
|
-
|
|
1678
|
+
o += s.substring(r, r + 6), r += 5;
|
|
1680
1679
|
continue;
|
|
1681
1680
|
} else {
|
|
1682
|
-
|
|
1681
|
+
o += c;
|
|
1683
1682
|
continue;
|
|
1684
1683
|
}
|
|
1685
1684
|
}
|
|
1686
|
-
if (
|
|
1685
|
+
if (c === '"') {
|
|
1687
1686
|
let f = 0;
|
|
1688
|
-
for (let
|
|
1687
|
+
for (let H = r - 1; H >= 0 && s[H] === "\\"; H--)
|
|
1689
1688
|
f++;
|
|
1690
|
-
f % 2 === 0 && (a = !a),
|
|
1689
|
+
f % 2 === 0 && (a = !a), o += c;
|
|
1691
1690
|
continue;
|
|
1692
1691
|
}
|
|
1693
1692
|
if (a && d < 32)
|
|
1694
|
-
switch (
|
|
1693
|
+
switch (c) {
|
|
1695
1694
|
case `
|
|
1696
1695
|
`:
|
|
1697
|
-
|
|
1696
|
+
o += "\\n";
|
|
1698
1697
|
break;
|
|
1699
1698
|
case "\r":
|
|
1700
|
-
|
|
1699
|
+
o += "\\r";
|
|
1701
1700
|
break;
|
|
1702
1701
|
case " ":
|
|
1703
|
-
|
|
1702
|
+
o += "\\t";
|
|
1704
1703
|
break;
|
|
1705
1704
|
case "\f":
|
|
1706
|
-
|
|
1705
|
+
o += "\\f";
|
|
1707
1706
|
break;
|
|
1708
1707
|
case "\b":
|
|
1709
|
-
|
|
1708
|
+
o += "\\b";
|
|
1710
1709
|
break;
|
|
1711
1710
|
default:
|
|
1712
1711
|
const f = d.toString(16).padStart(4, "0");
|
|
1713
|
-
|
|
1712
|
+
o += `\\u${f}`;
|
|
1714
1713
|
break;
|
|
1715
1714
|
}
|
|
1716
1715
|
else
|
|
1717
|
-
|
|
1716
|
+
o += c;
|
|
1718
1717
|
}
|
|
1719
|
-
return
|
|
1718
|
+
return o;
|
|
1720
1719
|
}
|
|
1721
1720
|
}
|
|
1722
|
-
|
|
1723
|
-
function ke(s) {
|
|
1724
|
-
const t = Vt(s);
|
|
1725
|
-
return ie().parse(t);
|
|
1726
|
-
}
|
|
1727
|
-
c(ke, "deserializePayload");
|
|
1721
|
+
p($t, "sanitizeJsonString");
|
|
1728
1722
|
function Ae(s) {
|
|
1729
|
-
const t =
|
|
1730
|
-
return
|
|
1723
|
+
const t = $t(s);
|
|
1724
|
+
return oe().parse(t);
|
|
1725
|
+
}
|
|
1726
|
+
p(Ae, "deserializePayload");
|
|
1727
|
+
function ke(s) {
|
|
1728
|
+
const t = $t(s);
|
|
1729
|
+
return Vt().parse(t);
|
|
1731
1730
|
}
|
|
1732
|
-
|
|
1733
|
-
function
|
|
1734
|
-
return
|
|
1731
|
+
p(ke, "deserializeEvent");
|
|
1732
|
+
function Ee(s) {
|
|
1733
|
+
return Vt().stringify(s);
|
|
1735
1734
|
}
|
|
1736
|
-
|
|
1735
|
+
p(Ee, "serializeEvent");
|
|
1737
1736
|
export {
|
|
1738
1737
|
xe as A,
|
|
1739
1738
|
fe as C,
|
|
1740
1739
|
l as E,
|
|
1741
|
-
|
|
1740
|
+
v as F,
|
|
1742
1741
|
Xt as G,
|
|
1743
1742
|
Ot as I,
|
|
1744
1743
|
S as L,
|
|
1745
|
-
|
|
1744
|
+
De as M,
|
|
1746
1745
|
C as P,
|
|
1747
|
-
|
|
1748
|
-
|
|
1746
|
+
he as R,
|
|
1747
|
+
Lt as S,
|
|
1749
1748
|
Ft as T,
|
|
1750
1749
|
Te as a,
|
|
1751
|
-
|
|
1750
|
+
It as b,
|
|
1752
1751
|
Se as c,
|
|
1753
1752
|
Ce as d,
|
|
1754
1753
|
me as e,
|
|
1755
1754
|
Tt as f,
|
|
1756
|
-
|
|
1757
|
-
|
|
1755
|
+
ye as g,
|
|
1756
|
+
b as h,
|
|
1758
1757
|
T as i,
|
|
1759
1758
|
ge as j,
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1759
|
+
_e as k,
|
|
1760
|
+
R as l,
|
|
1761
|
+
kt as m,
|
|
1762
|
+
A as n,
|
|
1763
|
+
At as o,
|
|
1764
|
+
Vt as p,
|
|
1765
|
+
oe as q,
|
|
1766
|
+
ke as r,
|
|
1767
|
+
Ae as s,
|
|
1769
1768
|
we as t,
|
|
1770
1769
|
Fe as u,
|
|
1771
|
-
|
|
1772
|
-
|
|
1770
|
+
$t as v,
|
|
1771
|
+
Ee as w
|
|
1773
1772
|
};
|
|
1774
|
-
//# sourceMappingURL=serializer-
|
|
1773
|
+
//# sourceMappingURL=serializer-CC-nM3ig.js.map
|