@aintela/chat 0.4.7 → 0.4.9

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.
@@ -141,7 +141,7 @@ para sua organização`
141
141
  BALANCED: "BALANCED",
142
142
  PRO: "PRO",
143
143
  LIVE: "LIVE"
144
- }, C = {
144
+ }, S = {
145
145
  gemini_3_5_flash: "gemini-3.5-flash",
146
146
  gemini_3_1_pro_preview: "gemini-3.1-pro-preview",
147
147
  gemini_3_1_flash_lite_preview: "gemini-3.1-flash-lite-preview",
@@ -166,7 +166,7 @@ para sua organização`
166
166
  uiToolShowcase: "uiToolShowcase",
167
167
  AUTO: "AUTO"
168
168
  }, Te = {
169
- [C.Claude_Opus_4_6]: {
169
+ [S.Claude_Opus_4_6]: {
170
170
  name: "Claude Opus 4.6",
171
171
  description: "Modelo mais avançado da anthropic, no entanto, não tão rápido como o Sonnet",
172
172
  icon: Mt,
@@ -174,7 +174,7 @@ para sua organização`
174
174
  speed: "Moderate",
175
175
  quality: "Highest"
176
176
  },
177
- [C.Claude_Sonnet_4_6]: {
177
+ [S.Claude_Sonnet_4_6]: {
178
178
  name: "Claude Sonnet 4.6",
179
179
  description: "Ótima relação velocidade/qualidade",
180
180
  icon: Mt,
@@ -182,7 +182,7 @@ para sua organização`
182
182
  speed: "Fast",
183
183
  quality: "High"
184
184
  },
185
- [C.gemini_3_1_pro_preview]: {
185
+ [S.gemini_3_1_pro_preview]: {
186
186
  name: "Gemini 3.1 Pro",
187
187
  description: `Modelo mais avançado
188
188
  Melhor qualidade para tarefas complexas
@@ -192,7 +192,7 @@ Contexto: 2M tokens`,
192
192
  speed: "Moderate",
193
193
  quality: "Highest"
194
194
  },
195
- [C.gemini_3_5_flash]: {
195
+ [S.gemini_3_5_flash]: {
196
196
  name: "Gemini 3.5 Flash",
197
197
  description: `Equilibrio ideal entre velocidade e qualidade
198
198
  Ótimo para a maioria das tarefas
@@ -202,7 +202,7 @@ Contexto: 1M tokens`,
202
202
  speed: "Fast",
203
203
  quality: "High"
204
204
  },
205
- [C.gemini_3_1_flash_lite_preview]: {
205
+ [S.gemini_3_1_flash_lite_preview]: {
206
206
  name: "Gemini 3 Lite Flash",
207
207
  description: `NOVO: Equilibrio ideal entre velocidade e qualidade
208
208
  Ótimo para a maioria das tarefas
@@ -212,7 +212,7 @@ Contexto: 1M tokens`,
212
212
  speed: "Fast",
213
213
  quality: "High"
214
214
  },
215
- [C.Gpt_5_1]: {
215
+ [S.Gpt_5_1]: {
216
216
  name: "Chat GPT 5.1",
217
217
  description: "Chat GPT 5.1",
218
218
  icon: At,
@@ -220,7 +220,7 @@ Contexto: 1M tokens`,
220
220
  speed: "Good",
221
221
  quality: "High"
222
222
  },
223
- [C.Gpt_5_2]: {
223
+ [S.Gpt_5_2]: {
224
224
  name: "Chat GPT 5.2",
225
225
  description: "Chat GPT 5.2",
226
226
  icon: At,
@@ -228,7 +228,7 @@ Contexto: 1M tokens`,
228
228
  speed: "Good",
229
229
  quality: "Highest"
230
230
  },
231
- [C.Gpt_5_5]: {
231
+ [S.Gpt_5_5]: {
232
232
  name: "Chat GPT 5.5",
233
233
  description: "A melhor inteligência em escala para fluxos de trabalho de agentes, codificação e profissionais.",
234
234
  icon: At,
@@ -236,7 +236,7 @@ Contexto: 1M tokens`,
236
236
  speed: "Good",
237
237
  quality: "Highest"
238
238
  },
239
- [C.Gpt_5_4_mini]: {
239
+ [S.Gpt_5_4_mini]: {
240
240
  name: "Chat GPT 5.4 Mini",
241
241
  description: "Modelo compacto mais robusto da OpenAi até momento para codificação, uso de computadores e subagentes.",
242
242
  icon: At,
@@ -244,7 +244,7 @@ Contexto: 1M tokens`,
244
244
  speed: "Fast",
245
245
  quality: "Highest"
246
246
  },
247
- [C["Glm-5_2"]]: {
247
+ [S["Glm-5_2"]]: {
248
248
  name: "Z.ai Glm-5",
249
249
  description: "Modelo open weights bem competente da Z.Ai. Apesar de gerar respostas mais longas o modelo é muito capaz.",
250
250
  icon: It,
@@ -252,7 +252,7 @@ Contexto: 1M tokens`,
252
252
  speed: "Good",
253
253
  quality: "Highest"
254
254
  },
255
- [C["Glm_4.7"]]: {
255
+ [S["Glm_4.7"]]: {
256
256
  name: "Z.ai Glm-4.7",
257
257
  description: "",
258
258
  icon: It,
@@ -260,7 +260,7 @@ Contexto: 1M tokens`,
260
260
  speed: "Fast",
261
261
  quality: "High"
262
262
  },
263
- [C["Glm_4.7_flash"]]: {
263
+ [S["Glm_4.7_flash"]]: {
264
264
  name: "Z.ai Glm-4.7",
265
265
  description: "",
266
266
  icon: It,
@@ -268,7 +268,7 @@ Contexto: 1M tokens`,
268
268
  speed: "Good",
269
269
  quality: "High"
270
270
  },
271
- [C.DeepSeek_v4_Pro]: {
271
+ [S.DeepSeek_v4_Pro]: {
272
272
  name: "DeepSeek Reasoner",
273
273
  description: `Modelo da DeepSeek com modo de raciocínio profundo (thinking mode).
274
274
  Ideal para tarefas complexas que se beneficiam de cadeia de pensamento extensa.`,
@@ -277,7 +277,7 @@ Ideal para tarefas complexas que se beneficiam de cadeia de pensamento extensa.`
277
277
  speed: "Moderate",
278
278
  quality: "Highest"
279
279
  },
280
- [C["DeepSeek_v4-Flash"]]: {
280
+ [S["DeepSeek_v4-Flash"]]: {
281
281
  name: "DeepSeek Chat",
282
282
  description: `Modelo de chat rápido da DeepSeek, sem modo de raciocínio.
283
283
  Ótimo equilíbrio entre velocidade e qualidade para uso geral.`,
@@ -286,7 +286,7 @@ Ideal para tarefas complexas que se beneficiam de cadeia de pensamento extensa.`
286
286
  speed: "Fast",
287
287
  quality: "High"
288
288
  },
289
- [C.Kimi_K26]: {
289
+ [S.Kimi_K26]: {
290
290
  name: "Kimi K2.6 Pro",
291
291
  description: `Modelo híbrido da Moonshot com modo de raciocínio (thinking) ativado por padrão.
292
292
  Melhor capacidade da família K2 para tarefas complexas.`,
@@ -295,7 +295,7 @@ Melhor capacidade da família K2 para tarefas complexas.`,
295
295
  speed: "Moderate",
296
296
  quality: "Highest"
297
297
  },
298
- [C.Kimi_Turbo]: {
298
+ [S.Kimi_Turbo]: {
299
299
  name: "Kimi K2 Turbo",
300
300
  description: `Variante rápida (não-thinking) da Moonshot.
301
301
  Ótima relação velocidade/qualidade para uso geral.`,
@@ -304,7 +304,7 @@ Melhor capacidade da família K2 para tarefas complexas.`,
304
304
  speed: "Fast",
305
305
  quality: "High"
306
306
  },
307
- [C["Qwen3_6-plus"]]: {
307
+ [S["Qwen3_6-plus"]]: {
308
308
  name: "Qwen 3.6 Plus - Alibaba",
309
309
  description: "Multimodal nativo, context window - 1 milhão de tokens, codificação agentiva",
310
310
  icon: L,
@@ -312,7 +312,7 @@ Melhor capacidade da família K2 para tarefas complexas.`,
312
312
  speed: "Moderate",
313
313
  quality: "Highest"
314
314
  },
315
- [C["Qwen3_7-max"]]: {
315
+ [S["Qwen3_7-max"]]: {
316
316
  name: "Qwen 3.7 Max - Alibaba",
317
317
  description: "Multimodal nativo, context window - 1 milhão de tokens, codificação agentiva",
318
318
  icon: L,
@@ -320,7 +320,7 @@ Melhor capacidade da família K2 para tarefas complexas.`,
320
320
  speed: "Moderate",
321
321
  quality: "Highest"
322
322
  },
323
- [C.uiToolShowcase]: {
323
+ [S.uiToolShowcase]: {
324
324
  name: "UiToolShowcase - Testing",
325
325
  description: "Cria um stream de testes.",
326
326
  icon: Vt,
@@ -727,7 +727,7 @@ P = n([
727
727
  f({ name: "ToolEventContent" })
728
728
  ], P);
729
729
  var Y;
730
- let wt = (Y = class extends D {
730
+ let Ft = (Y = class extends D {
731
731
  constructor() {
732
732
  super(...arguments);
733
733
  e(this, "url");
@@ -736,13 +736,13 @@ let wt = (Y = class extends D {
736
736
  }, c(Y, "ImageContent"), Y);
737
737
  n([
738
738
  i(String)
739
- ], wt.prototype, "url", 2);
739
+ ], Ft.prototype, "url", 2);
740
740
  n([
741
741
  i(String)
742
- ], wt.prototype, "dataUri", 2);
743
- wt = n([
742
+ ], Ft.prototype, "dataUri", 2);
743
+ Ft = n([
744
744
  f({ name: "ImageContent" })
745
- ], wt);
745
+ ], Ft);
746
746
  var X;
747
747
  let E = (X = class extends D {
748
748
  constructor() {
@@ -771,7 +771,7 @@ E = n([
771
771
  f({ name: "FunctionCallContent" })
772
772
  ], E);
773
773
  var j;
774
- let F = (j = class {
774
+ let k = (j = class {
775
775
  constructor() {
776
776
  e(this, "isUi");
777
777
  e(this, "askUserComponent");
@@ -782,22 +782,22 @@ let F = (j = class {
782
782
  }, c(j, "ToolCallPresentation"), j);
783
783
  n([
784
784
  i(Boolean)
785
- ], F.prototype, "isUi", 2);
785
+ ], k.prototype, "isUi", 2);
786
786
  n([
787
787
  i(String)
788
- ], F.prototype, "askUserComponent", 2);
788
+ ], k.prototype, "askUserComponent", 2);
789
789
  n([
790
790
  i(String)
791
- ], F.prototype, "argsDescription", 2);
791
+ ], k.prototype, "argsDescription", 2);
792
792
  n([
793
793
  i(Boolean)
794
- ], F.prototype, "cancelUi", 2);
794
+ ], k.prototype, "cancelUi", 2);
795
795
  n([
796
796
  i(Boolean)
797
- ], F.prototype, "parked", 2);
798
- F = n([
797
+ ], k.prototype, "parked", 2);
798
+ k = n([
799
799
  f({ name: "ToolCallPresentation" })
800
- ], F);
800
+ ], k);
801
801
  const jt = "aia:presentation";
802
802
  var tt;
803
803
  let b = (tt = class extends _ {
@@ -819,7 +819,7 @@ n([
819
819
  i(String)
820
820
  ], b.prototype, "arguments", 2);
821
821
  n([
822
- i(F)
822
+ i(k)
823
823
  ], b.prototype, "presentation", 2);
824
824
  b = n([
825
825
  f({ name: "StreamingFinalFunctionCallContent" })
@@ -874,7 +874,7 @@ n([
874
874
  i(q)
875
875
  ], A.prototype, "result", 2);
876
876
  n([
877
- i(F)
877
+ i(k)
878
878
  ], A.prototype, "presentation", 2);
879
879
  n([
880
880
  i(q)
@@ -915,7 +915,7 @@ n([
915
915
  i(q)
916
916
  ], G.prototype, "clientOutput", 2);
917
917
  n([
918
- i(F)
918
+ i(k)
919
919
  ], G.prototype, "presentation", 2);
920
920
  G = n([
921
921
  f({ name: "StreamingClientOutputContent" })
@@ -980,7 +980,7 @@ N = n([
980
980
  f({ name: "StreamingFunctionCallUpdateContent" })
981
981
  ], N);
982
982
  var lt;
983
- let kt = (lt = class extends _ {
983
+ let wt = (lt = class extends _ {
984
984
  constructor() {
985
985
  super(...arguments);
986
986
  e(this, "text");
@@ -991,12 +991,12 @@ let kt = (lt = class extends _ {
991
991
  }, c(lt, "StreamingTextContent"), lt);
992
992
  n([
993
993
  i(String)
994
- ], kt.prototype, "text", 2);
995
- kt = n([
994
+ ], wt.prototype, "text", 2);
995
+ wt = n([
996
996
  f({ name: "StreamingTextContent" })
997
- ], kt);
997
+ ], wt);
998
998
  var pt;
999
- let Ft = (pt = class extends _ {
999
+ let kt = (pt = class extends _ {
1000
1000
  constructor() {
1001
1001
  super(...arguments);
1002
1002
  e(this, "text");
@@ -1007,10 +1007,10 @@ let Ft = (pt = class extends _ {
1007
1007
  }, c(pt, "StreamingReasoningContent"), pt);
1008
1008
  n([
1009
1009
  i(String)
1010
- ], Ft.prototype, "text", 2);
1011
- Ft = n([
1010
+ ], kt.prototype, "text", 2);
1011
+ kt = n([
1012
1012
  f({ name: "StreamingReasoningContent" })
1013
- ], Ft);
1013
+ ], kt);
1014
1014
  var ct;
1015
1015
  let M = (ct = class {
1016
1016
  constructor() {
@@ -1088,7 +1088,7 @@ T = n([
1088
1088
  f({ name: "SessionInformation" })
1089
1089
  ], T);
1090
1090
  var dt;
1091
- let h = (dt = class {
1091
+ let C = (dt = class {
1092
1092
  constructor() {
1093
1093
  e(this, "timestamp");
1094
1094
  e(this, "mimeType");
@@ -1112,54 +1112,54 @@ let h = (dt = class {
1112
1112
  }, c(dt, "LlmEvent"), dt);
1113
1113
  n([
1114
1114
  i(Number)
1115
- ], h.prototype, "timestamp", 2);
1115
+ ], C.prototype, "timestamp", 2);
1116
1116
  n([
1117
1117
  i(String)
1118
- ], h.prototype, "mimeType", 2);
1118
+ ], C.prototype, "mimeType", 2);
1119
1119
  n([
1120
1120
  i(Boolean)
1121
- ], h.prototype, "partial", 2);
1121
+ ], C.prototype, "partial", 2);
1122
1122
  n([
1123
1123
  i(Boolean)
1124
- ], h.prototype, "turnComplete", 2);
1124
+ ], C.prototype, "turnComplete", 2);
1125
1125
  n([
1126
1126
  i(Boolean)
1127
- ], h.prototype, "visible", 2);
1127
+ ], C.prototype, "visible", 2);
1128
1128
  n([
1129
1129
  i(String)
1130
- ], h.prototype, "serverError", 2);
1130
+ ], C.prototype, "serverError", 2);
1131
1131
  n([
1132
1132
  i(String)
1133
- ], h.prototype, "interactionId", 2);
1133
+ ], C.prototype, "interactionId", 2);
1134
1134
  n([
1135
1135
  i(T)
1136
- ], h.prototype, "sessionInformation", 2);
1136
+ ], C.prototype, "sessionInformation", 2);
1137
1137
  n([
1138
1138
  i(yt)
1139
- ], h.prototype, "eventType", 2);
1139
+ ], C.prototype, "eventType", 2);
1140
1140
  n([
1141
1141
  xt(O)
1142
- ], h.prototype, "artifactsGenerated", 2);
1142
+ ], C.prototype, "artifactsGenerated", 2);
1143
1143
  n([
1144
1144
  i(String)
1145
- ], h.prototype, "author", 2);
1145
+ ], C.prototype, "author", 2);
1146
1146
  n([
1147
1147
  i(Dt)
1148
- ], h.prototype, "role", 2);
1148
+ ], C.prototype, "role", 2);
1149
1149
  n([
1150
1150
  i(String)
1151
- ], h.prototype, "command", 2);
1151
+ ], C.prototype, "command", 2);
1152
1152
  n([
1153
1153
  i(St)
1154
- ], h.prototype, "content", 2);
1154
+ ], C.prototype, "content", 2);
1155
1155
  n([
1156
1156
  xt(() => _)
1157
- ], h.prototype, "streamingParts", 2);
1158
- h = n([
1157
+ ], C.prototype, "streamingParts", 2);
1158
+ C = n([
1159
1159
  f({ name: "LlmEvent" })
1160
- ], h);
1160
+ ], C);
1161
1161
  var mt;
1162
- let w = (mt = class {
1162
+ let F = (mt = class {
1163
1163
  constructor() {
1164
1164
  e(this, "timeStamp");
1165
1165
  e(this, "partialText");
@@ -1175,39 +1175,39 @@ let w = (mt = class {
1175
1175
  }, c(mt, "PartialLlmEvent"), mt);
1176
1176
  n([
1177
1177
  i(Number, { name: "ts" })
1178
- ], w.prototype, "timeStamp", 2);
1178
+ ], F.prototype, "timeStamp", 2);
1179
1179
  n([
1180
1180
  i(String, { name: "pt" })
1181
- ], w.prototype, "partialText", 2);
1181
+ ], F.prototype, "partialText", 2);
1182
1182
  n([
1183
1183
  i(String, { name: "pr" })
1184
- ], w.prototype, "partialReasoning", 2);
1184
+ ], F.prototype, "partialReasoning", 2);
1185
1185
  n([
1186
1186
  i(String, { name: "fn" })
1187
- ], w.prototype, "functionName", 2);
1187
+ ], F.prototype, "functionName", 2);
1188
1188
  n([
1189
1189
  xt(() => _)
1190
- ], w.prototype, "streamingParts", 2);
1190
+ ], F.prototype, "streamingParts", 2);
1191
1191
  n([
1192
1192
  i(String, { name: "fid" })
1193
- ], w.prototype, "functionCallId", 2);
1193
+ ], F.prototype, "functionCallId", 2);
1194
1194
  n([
1195
1195
  i(String, { name: "tp" })
1196
- ], w.prototype, "type", 2);
1196
+ ], F.prototype, "type", 2);
1197
1197
  n([
1198
1198
  i(String, { name: "itid" })
1199
- ], w.prototype, "iteractionId", 2);
1199
+ ], F.prototype, "iteractionId", 2);
1200
1200
  n([
1201
1201
  i(yt)
1202
- ], w.prototype, "partialEventType", 2);
1202
+ ], F.prototype, "partialEventType", 2);
1203
1203
  n([
1204
1204
  i(String, { name: "said" })
1205
- ], w.prototype, "subAgentId", 2);
1206
- w = n([
1205
+ ], F.prototype, "subAgentId", 2);
1206
+ F = n([
1207
1207
  f({ name: "PartialLlmEvent" })
1208
- ], w);
1208
+ ], F);
1209
1209
  var gt;
1210
- let k = (gt = class {
1210
+ let w = (gt = class {
1211
1211
  constructor() {
1212
1212
  e(this, "type");
1213
1213
  e(this, "event");
@@ -1221,31 +1221,31 @@ let k = (gt = class {
1221
1221
  }, c(gt, "StreamingResponse"), gt);
1222
1222
  n([
1223
1223
  i(String)
1224
- ], k.prototype, "type", 2);
1224
+ ], w.prototype, "type", 2);
1225
1225
  n([
1226
- i(h)
1227
- ], k.prototype, "event", 2);
1226
+ i(C)
1227
+ ], w.prototype, "event", 2);
1228
1228
  n([
1229
1229
  i(String)
1230
- ], k.prototype, "sessionId", 2);
1230
+ ], w.prototype, "sessionId", 2);
1231
1231
  n([
1232
1232
  i(String)
1233
- ], k.prototype, "accessToken", 2);
1233
+ ], w.prototype, "accessToken", 2);
1234
1234
  n([
1235
- i(w, { name: "pe" })
1236
- ], k.prototype, "partialEvent", 2);
1235
+ i(F, { name: "pe" })
1236
+ ], w.prototype, "partialEvent", 2);
1237
1237
  n([
1238
1238
  i(String)
1239
- ], k.prototype, "subAgentId", 2);
1239
+ ], w.prototype, "subAgentId", 2);
1240
1240
  n([
1241
1241
  i(String)
1242
- ], k.prototype, "subAgentName", 2);
1242
+ ], w.prototype, "subAgentName", 2);
1243
1243
  n([
1244
1244
  i(Number)
1245
- ], k.prototype, "seq", 2);
1246
- k = n([
1245
+ ], w.prototype, "seq", 2);
1246
+ w = n([
1247
1247
  f({ name: "StreamingResponse" })
1248
- ], k);
1248
+ ], w);
1249
1249
  var ft;
1250
1250
  let Ut = (ft = class {
1251
1251
  constructor() {
@@ -1253,7 +1253,7 @@ let Ut = (ft = class {
1253
1253
  }
1254
1254
  }, c(ft, "Payload"), ft);
1255
1255
  n([
1256
- xt(h)
1256
+ xt(C)
1257
1257
  ], Ut.prototype, "events", 2);
1258
1258
  Ut = n([
1259
1259
  f({ name: "Payload" })
@@ -1348,7 +1348,7 @@ const v = class v {
1348
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;
1349
1349
  }
1350
1350
  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 kt ? "StreamingTextContent" : t instanceof Ft ? "StreamingReasoningContent" : t instanceof P ? "ToolEventContent" : t instanceof R ? "StreamingToolEventContent" : "Unknown";
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";
1352
1352
  }
1353
1353
  static parseFromTypedEvent(t) {
1354
1354
  var p, d, g, W, Ot, Rt, Pt;
@@ -1372,8 +1372,8 @@ const v = class v {
1372
1372
  mustPush: !1,
1373
1373
  textAppendable: !1
1374
1374
  };
1375
- const S = v.getPartType(y);
1376
- if (S == x.FunctionCallContent || S == x.FunctionResultContent || S == x.StreamingFinalFunctionCallContent || S == x.StreamingFinalFunctionResultContent) {
1375
+ const h = v.getPartType(y);
1376
+ if (h == x.FunctionCallContent || h == x.FunctionResultContent || h == x.StreamingFinalFunctionCallContent || h == x.StreamingFinalFunctionResultContent) {
1377
1377
  var r = y;
1378
1378
  if (r.id == "Server Error") {
1379
1379
  const m = r.arguments ?? {}, z = typeof m.error == "string" && m.error.trim().length > 0 ? m.error : JSON.stringify(r.arguments);
@@ -1382,7 +1382,7 @@ const v = class v {
1382
1382
  stackTrace: typeof m.stackTrace == "string" ? m.stackTrace : void 0
1383
1383
  }, u.functionDetails = void 0;
1384
1384
  } else {
1385
- u.eventType = S == x.FunctionCallContent || S == x.StreamingFinalFunctionCallContent ? l.FunctionCall : l.FunctionResponse;
1385
+ u.eventType = h == x.FunctionCallContent || h == x.StreamingFinalFunctionCallContent ? l.FunctionCall : l.FunctionResponse;
1386
1386
  let m;
1387
1387
  try {
1388
1388
  if (r != null && r.result)
@@ -1403,8 +1403,13 @@ const v = class v {
1403
1403
  u.functionDetails = {
1404
1404
  id: (r == null ? void 0 : r.id) ?? "",
1405
1405
  args: r == null ? void 0 : r.arguments,
1406
- start: S == x.FunctionCallContent ? o.created : void 0,
1407
- end: S == x.FunctionResultContent ? o.created : void 0,
1406
+ // The SETTLED call arrives as FunctionCallContent on the persisted/replay path and as
1407
+ // StreamingFinalFunctionCallContent on the live one — both open the call, so both stamp
1408
+ // `start`. Keying on the persisted type alone left every LIVE call `Executing` with no
1409
+ // start, and a renderer gating its elapsed timer on `status === 'Executing' && start`
1410
+ // 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,
1408
1413
  text: JSON.stringify(r == null ? void 0 : r.arguments) ?? "",
1409
1414
  name: (r == null ? void 0 : r.functionName) ?? "",
1410
1415
  status: u.eventType == l.FunctionCall ? "Executing" : "Done",
@@ -1420,19 +1425,19 @@ const v = class v {
1420
1425
  cancelUi: z.cancelUi
1421
1426
  }, u.functionDetails.isAskUser = !!u.functionDetails.askUserComponent, t.text = r == null ? void 0 : r.arguments;
1422
1427
  }
1423
- } else if (S == x.StreamingTextContent)
1428
+ } else if (h == x.StreamingTextContent)
1424
1429
  u.eventType = l.Text, u.text = (W = y == null ? void 0 : y.text) == null ? void 0 : W.replaceAll("\\n", `
1425
1430
  `), u.textLastChunk = y.text, t.text = u.text;
1426
- else if (S == x.TextContent)
1431
+ else if (h == x.TextContent)
1427
1432
  u.eventType = l.Text, u.text = (Ot = y == null ? void 0 : y.text) == null ? void 0 : Ot.replaceAll("\\n", `
1428
1433
  `), u.textLastChunk = y.text, t.text = u.text;
1429
- else if (S == x.StreamingReasoningContent)
1434
+ else if (h == x.StreamingReasoningContent)
1430
1435
  u.eventType = l.Thought, u.thoughtDetails = {
1431
1436
  text: ((Rt = y == null ? void 0 : y.text) == null ? void 0 : Rt.replaceAll("\\n", `
1432
1437
  `)) ?? ""
1433
1438
  }, u.text = (Pt = y == null ? void 0 : y.text) == null ? void 0 : Pt.replaceAll("\\n", `
1434
1439
  `), u.textLastChunk = y.text, t.text = u.text;
1435
- else if (S == x.StreamingFunctionCallUpdateContent) {
1440
+ else if (h == x.StreamingFunctionCallUpdateContent) {
1436
1441
  const m = y;
1437
1442
  u.eventType = l.PartialFunctionCall, u.text = m.arguments, u.thoughtDetails = {
1438
1443
  text: ""
@@ -1442,7 +1447,7 @@ const v = class v {
1442
1447
  status: "Composing",
1443
1448
  name: (m == null ? void 0 : m.name) ?? "Unknown"
1444
1449
  }, t.text = u.text;
1445
- } else if (S == x.ToolEventContent || S == x.StreamingToolEventContent) {
1450
+ } else if (h == x.ToolEventContent || h == x.StreamingToolEventContent) {
1446
1451
  u.eventType = l.ToolEvent;
1447
1452
  const m = y;
1448
1453
  u.toolDetails = {
@@ -1450,7 +1455,7 @@ const v = class v {
1450
1455
  eventData: m.eventData ?? "",
1451
1456
  sessionId: m.sessionId ?? void 0
1452
1457
  };
1453
- } else if (S == x.FunctionClientOutputContent) {
1458
+ } else if (h == x.FunctionClientOutputContent) {
1454
1459
  const m = y;
1455
1460
  u.eventType = l.FunctionClientOutput, u.functionDetails = {
1456
1461
  id: m.id ?? "",
@@ -1458,7 +1463,7 @@ const v = class v {
1458
1463
  status: "Done",
1459
1464
  clientOutput: m.data
1460
1465
  };
1461
- } else if (S == x.StreamingClientOutputContent) {
1466
+ } else if (h == x.StreamingClientOutputContent) {
1462
1467
  const m = y;
1463
1468
  u.eventType = l.FunctionClientOutput, u.functionDetails = {
1464
1469
  id: m.id ?? "",
@@ -1470,7 +1475,7 @@ const v = class v {
1470
1475
  // The park signal itself (the reason this event fires even with no prefill).
1471
1476
  parked: qt(m).parked
1472
1477
  };
1473
- } else if (S == x.UserUiContent) {
1478
+ } else if (h == x.UserUiContent) {
1474
1479
  const m = y;
1475
1480
  u.eventType = l.UserAnswer, u.author = "user", u.functionDetails = {
1476
1481
  id: "",
@@ -1480,7 +1485,7 @@ const v = class v {
1480
1485
  isUi: !0
1481
1486
  };
1482
1487
  } else {
1483
- u.eventType = l.NotDefined, console.warn(`Got a unmapped event_type:${o.eventType}, data:`, S, y);
1488
+ u.eventType = l.NotDefined, console.warn(`Got a unmapped event_type:${o.eventType}, data:`, h, y);
1484
1489
  continue;
1485
1490
  }
1486
1491
  o.parts.push(u);
@@ -1587,7 +1592,7 @@ let Wt = v;
1587
1592
  const Lt = [
1588
1593
  // KernelContent derived types
1589
1594
  _t,
1590
- wt,
1595
+ Ft,
1591
1596
  E,
1592
1597
  P,
1593
1598
  I,
@@ -1595,9 +1600,9 @@ const Lt = [
1595
1600
  Ct,
1596
1601
  St,
1597
1602
  // StreamingKernelContent derived types
1598
- kt,
1603
+ wt,
1599
1604
  N,
1600
- Ft,
1605
+ kt,
1601
1606
  R,
1602
1607
  b,
1603
1608
  A,
@@ -1618,7 +1623,7 @@ function Bt(s, t) {
1618
1623
  }
1619
1624
  c(Bt, "dotnetTypeResolver");
1620
1625
  function Kt() {
1621
- const s = new zt(h);
1626
+ const s = new zt(C);
1622
1627
  return s.config({
1623
1628
  knownTypes: Lt,
1624
1629
  typeHintEmitter: Ht,
@@ -1627,7 +1632,7 @@ function Kt() {
1627
1632
  }
1628
1633
  c(Kt, "createEventSerializer");
1629
1634
  function ee() {
1630
- const s = new zt(k);
1635
+ const s = new zt(w);
1631
1636
  return s.config({
1632
1637
  knownTypes: Lt,
1633
1638
  typeHintEmitter: Ht,
@@ -1692,20 +1697,20 @@ function Jt(s) {
1692
1697
  }
1693
1698
  }
1694
1699
  c(Jt, "sanitizeJsonString");
1695
- function we(s) {
1700
+ function Fe(s) {
1696
1701
  const t = Jt(s);
1697
1702
  return ee().parse(t);
1698
1703
  }
1699
- c(we, "deserializePayload");
1700
- function ke(s) {
1704
+ c(Fe, "deserializePayload");
1705
+ function we(s) {
1701
1706
  const t = Jt(s);
1702
1707
  return Kt().parse(t);
1703
1708
  }
1704
- c(ke, "deserializeEvent");
1705
- function Fe(s) {
1709
+ c(we, "deserializeEvent");
1710
+ function ke(s) {
1706
1711
  return Kt().stringify(s);
1707
1712
  }
1708
- c(Fe, "serializeEvent");
1713
+ c(ke, "serializeEvent");
1709
1714
  export {
1710
1715
  Se as A,
1711
1716
  me as C,
@@ -1713,7 +1718,7 @@ export {
1713
1718
  E as F,
1714
1719
  Zt as G,
1715
1720
  Nt as I,
1716
- h as L,
1721
+ C as L,
1717
1722
  Te as M,
1718
1723
  x as P,
1719
1724
  fe as R,
@@ -1727,20 +1732,20 @@ export {
1727
1732
  St as f,
1728
1733
  ge as g,
1729
1734
  I as h,
1730
- C as i,
1735
+ S as i,
1731
1736
  de as j,
1732
1737
  xe as k,
1733
1738
  N as l,
1734
- Ft as m,
1735
- k as n,
1736
- kt as o,
1739
+ kt as m,
1740
+ w as n,
1741
+ wt as o,
1737
1742
  Kt as p,
1738
1743
  ee as q,
1739
- ke as r,
1740
- we as s,
1744
+ we as r,
1745
+ Fe as s,
1741
1746
  _e as t,
1742
1747
  De as u,
1743
1748
  Jt as v,
1744
- Fe as w
1749
+ ke as w
1745
1750
  };
1746
- //# sourceMappingURL=serializer-CdUT_OO2.js.map
1751
+ //# sourceMappingURL=serializer-BB8Cz7YD.js.map