@aintela/chat 0.4.35 → 0.4.37

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