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