@llmnative/agentico 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -328,15 +328,18 @@ function Ae(e) {
328
328
  a.push({
329
329
  ...e,
330
330
  savedAt: i,
331
- startedAt: r ? Pe(r) : i,
331
+ startedAt: r ? Fe(r) : i,
332
332
  ...r?.name ? {
333
333
  name: r.name,
334
334
  namedBy: r.namedBy
335
335
  } : {}
336
336
  }), De(a);
337
337
  }
338
- var je = (e) => e.name || e.title || e.entityId, Me = (e) => e.activity.some((e) => e.kind === "user" && !!e.detail?.trim());
339
- function Ne(e, t, n, r, i = "person") {
338
+ var je = (e) => {
339
+ let t = (e.activity.find((e) => e.kind === "user" && e.detail?.trim())?.detail ?? "").trim().split("\n")[0].trim();
340
+ return t.length > 80 ? `${t.slice(0, 80).trimEnd()}…` : t;
341
+ }, Me = (e) => e.name || je(e) || e.title || e.entityId, Ne = (e) => e.activity.some((e) => e.kind === "user" && !!e.detail?.trim());
342
+ function Pe(e, t, n, r, i = "person") {
340
343
  let a = Oe(e, t, n), o = we(), s = o.find((e) => Oe(e.scopeId, e.subagentId, e.entityId) === a);
341
344
  if (!s || i === "model" && s.namedBy === "person") return !1;
342
345
  let c = r.trim().replace(/\s+/g, " ").slice(0, 120), { name: l, namedBy: u, ...d } = s, f = c ? {
@@ -346,15 +349,15 @@ function Ne(e, t, n, r, i = "person") {
346
349
  } : d;
347
350
  return De(o.map((e) => e === s ? f : e)), !0;
348
351
  }
349
- var Pe = (e) => e.startedAt ?? e.savedAt;
350
- function Fe(e, t, n) {
352
+ var Fe = (e) => e.startedAt ?? e.savedAt;
353
+ function Ie(e, t, n) {
351
354
  let r = Oe(e, t, n);
352
355
  De(we().filter((e) => Oe(e.scopeId, e.subagentId, e.entityId) !== r));
353
356
  }
354
- function Ie(e) {
355
- return we().filter((t) => t.scopeId === e).sort((e, t) => Pe(t) - Pe(e));
357
+ function Le(e) {
358
+ return we().filter((t) => t.scopeId === e).sort((e, t) => Fe(t) - Fe(e));
356
359
  }
357
- var Le = (e, t) => `entitychat-${e}-${t}`, Re = {
360
+ var Re = (e, t) => `entitychat-${e}-${t}`, ze = {
358
361
  modelLabel: "Modell",
359
362
  modelsLoading: "Wird geladen…",
360
363
  noModelsAvailable: "Keine Modelle verfügbar",
@@ -415,7 +418,7 @@ var Le = (e, t) => `entitychat-${e}-${t}`, Re = {
415
418
  resizePanelHint: "Ziehen zum Ändern der Größe, Doppelklick zum Zurücksetzen",
416
419
  pendingQuestions: "Fragen des Agenten",
417
420
  stop: "Stoppen"
418
- }, ze = {
421
+ }, Be = {
419
422
  modelLabel: "Model",
420
423
  modelsLoading: "Loading…",
421
424
  noModelsAvailable: "No models available",
@@ -476,7 +479,7 @@ var Le = (e, t) => `entitychat-${e}-${t}`, Re = {
476
479
  resizePanelHint: "Drag to resize, double-click to reset",
477
480
  pendingQuestions: "Questions of the agent",
478
481
  stop: "Stop"
479
- }, Be = {
482
+ }, Ve = {
480
483
  modelLabel: "Modello",
481
484
  modelsLoading: "Caricamento…",
482
485
  noModelsAvailable: "Nessun modello disponibile",
@@ -537,22 +540,22 @@ var Le = (e, t) => `entitychat-${e}-${t}`, Re = {
537
540
  resizePanelHint: "Trascina per ridimensionare, doppio clic per ripristinare",
538
541
  pendingQuestions: "Domande dell'agente",
539
542
  stop: "Ferma"
540
- }, Ve = {
541
- en: { agentico: ze },
542
- it: { agentico: Be },
543
- de: { agentico: Re }
543
+ }, He = {
544
+ en: { agentico: Be },
545
+ it: { agentico: Ve },
546
+ de: { agentico: ze }
544
547
  };
545
548
  function Q() {
546
549
  let { dict: e } = S(), t = e.agentico;
547
550
  return t ? {
548
- ...ze,
551
+ ...Be,
549
552
  ...t
550
- } : ze;
553
+ } : Be;
551
554
  }
552
555
  //#endregion
553
556
  //#region src/presentation/AgenticoContext.tsx
554
- var He = "agentico-orchestrator", Ue = w(null);
555
- function We({ children: e, scope: t = null }) {
557
+ var Ue = "agentico-orchestrator", We = w(null);
558
+ function Ge({ children: e, scope: t = null }) {
556
559
  let [n, r] = j(null), i = A(null);
557
560
  D(() => {
558
561
  i.current = n;
@@ -645,7 +648,7 @@ function We({ children: e, scope: t = null }) {
645
648
  snapshot: n
646
649
  }), Y(crypto.randomUUID());
647
650
  }, [u]), [ie, ae] = j(null), [oe, se] = j(null), Z = T((e, t) => {
648
- u(), c(He), ae({
651
+ u(), c(Ue), ae({
649
652
  subagentId: e,
650
653
  extraDestinations: t
651
654
  }), se(crypto.randomUUID());
@@ -739,19 +742,19 @@ function We({ children: e, scope: t = null }) {
739
742
  pe,
740
743
  he
741
744
  ]);
742
- return /* @__PURE__ */ N(Ue.Provider, {
745
+ return /* @__PURE__ */ N(We.Provider, {
743
746
  value: ye,
744
747
  children: e
745
748
  });
746
749
  }
747
750
  function $() {
748
- let e = E(Ue);
751
+ let e = E(We);
749
752
  if (!e) throw Error("useAgentico must be used inside AgenticoProvider");
750
753
  return e;
751
754
  }
752
755
  //#endregion
753
756
  //#region src/presentation/AgentActivityLog.tsx
754
- function Ge(e) {
757
+ function Ke(e) {
755
758
  let t = e.search(/[{[]/);
756
759
  if (t === -1) return [{
757
760
  type: "text",
@@ -797,18 +800,18 @@ function Ge(e) {
797
800
  language: "json"
798
801
  });
799
802
  let u = e.slice(s + 1);
800
- return u.trim() && l.push(...Ge(u)), l;
803
+ return u.trim() && l.push(...Ke(u)), l;
801
804
  }
802
- function Ke(e) {
805
+ function qe(e) {
803
806
  let t = [], n = /```(\w+)?\n?([\s\S]*?)```/g, r = 0, i;
804
- for (; i = n.exec(e);) i.index > r && t.push(...Ge(e.slice(r, i.index))), t.push({
807
+ for (; i = n.exec(e);) i.index > r && t.push(...Ke(e.slice(r, i.index))), t.push({
805
808
  type: "code",
806
809
  content: i[2].replace(/\n$/, ""),
807
810
  language: i[1]
808
811
  }), r = n.lastIndex;
809
- return r < e.length && t.push(...Ge(e.slice(r))), t;
812
+ return r < e.length && t.push(...Ke(e.slice(r))), t;
810
813
  }
811
- function qe({ content: e, language: t }) {
814
+ function Je({ content: e, language: t }) {
812
815
  let [n, r] = j(!1);
813
816
  return /* @__PURE__ */ P("div", {
814
817
  className: `relative cursor-pointer rounded-md ${n ? "max-h-80 overflow-y-auto" : "max-h-28 overflow-hidden"}`,
@@ -823,9 +826,9 @@ function qe({ content: e, language: t }) {
823
826
  }), !n && /* @__PURE__ */ N("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 h-6 bg-gradient-to-t from-muted/30 to-transparent" })]
824
827
  });
825
828
  }
826
- function Je({ text: e, tone: t }) {
827
- let n = Ke(e);
828
- return /* @__PURE__ */ N(M, { children: n.map((e, n) => e.type === "code" ? /* @__PURE__ */ N(qe, {
829
+ function Ye({ text: e, tone: t }) {
830
+ let n = qe(e);
831
+ return /* @__PURE__ */ N(M, { children: n.map((e, n) => e.type === "code" ? /* @__PURE__ */ N(Je, {
829
832
  content: e.content,
830
833
  language: e.language
831
834
  }, n) : e.content.trim() && /* @__PURE__ */ N(r, {
@@ -834,7 +837,7 @@ function Je({ text: e, tone: t }) {
834
837
  className: "break-words text-xs leading-relaxed"
835
838
  }, n)) });
836
839
  }
837
- function Ye({ status: e }) {
840
+ function Xe({ status: e }) {
838
841
  return e === "running" ? /* @__PURE__ */ N("span", { className: "inline-block h-3 w-3 shrink-0 animate-spin rounded-full border-2 border-current border-t-transparent" }) : e === "done" ? /* @__PURE__ */ N(d, {
839
842
  name: "check",
840
843
  size: 12,
@@ -849,11 +852,11 @@ function Ye({ status: e }) {
849
852
  className: "shrink-0 text-destructive"
850
853
  });
851
854
  }
852
- function Xe(e, t) {
855
+ function Ze(e, t) {
853
856
  return e.status === "running" ? t.thinking : e.status === "error" ? t.modelRequestError : e.status === "stopped" ? t.stopped : e.detail ? t.responseReceived : e.toolNames && e.toolNames.length > 0 ? e.toolNames.join(" · ") : t.toolRequest;
854
857
  }
855
- var Ze = 96;
856
- function Qe({ entry: e, pinned: t = !0 }) {
858
+ var Qe = 96;
859
+ function $e({ entry: e, pinned: t = !0 }) {
857
860
  let n = A(null), [r, i] = j(!1), [a, o] = j(!1);
858
861
  O(() => {
859
862
  let e = n.current;
@@ -867,7 +870,7 @@ function Qe({ entry: e, pinned: t = !0 }) {
867
870
  children: [/* @__PURE__ */ P("div", {
868
871
  ref: n,
869
872
  className: `space-y-1 px-2.5 pt-1.5 ${s ? "overflow-hidden" : ""}`,
870
- style: s ? { maxHeight: Ze } : void 0,
873
+ style: s ? { maxHeight: Qe } : void 0,
871
874
  children: [e.attachmentNames && e.attachmentNames.length > 0 && /* @__PURE__ */ N("div", {
872
875
  className: "flex flex-wrap gap-1",
873
876
  children: e.attachmentNames.map((e, t) => /* @__PURE__ */ P("span", {
@@ -881,7 +884,7 @@ function Qe({ entry: e, pinned: t = !0 }) {
881
884
  children: e
882
885
  })]
883
886
  }, t))
884
- }), /* @__PURE__ */ N(Je, { text: e.detail ?? "" })]
887
+ }), /* @__PURE__ */ N(Ye, { text: e.detail ?? "" })]
885
888
  }), a && /* @__PURE__ */ P("button", {
886
889
  type: "button",
887
890
  onClick: () => i((e) => !e),
@@ -895,13 +898,13 @@ function Qe({ entry: e, pinned: t = !0 }) {
895
898
  })
896
899
  });
897
900
  }
898
- var $e = {
901
+ var et = {
899
902
  running: "loader-circle",
900
903
  done: "check",
901
904
  error: "x",
902
905
  stopped: "circle-slash"
903
906
  };
904
- function et({ steps: e }) {
907
+ function tt({ steps: e }) {
905
908
  let t = Q(), n = e.filter((e) => e.status === "running").at(-1), r = e.some((e) => e.status === "error"), i = n?.label ?? (e.length === 1 ? t.oneStep : _(t.steps, { count: e.length }));
906
909
  return /* @__PURE__ */ N(h, {
907
910
  ariaLabel: t.stepsLabel,
@@ -917,12 +920,12 @@ function et({ steps: e }) {
917
920
  className: e.status === "error" ? "text-destructive" : void 0,
918
921
  children: e.label
919
922
  }),
920
- icon: $e[e.status]
923
+ icon: et[e.status]
921
924
  }))
922
925
  }]
923
926
  });
924
927
  }
925
- function tt(e, t) {
928
+ function nt(e, t) {
926
929
  let n = e.at(-1);
927
930
  if (!n || n.kind !== "thinking" || !n.parts || n.status === "stopped" || n.status === "error") return null;
928
931
  let r = [...n.parts].reverse().find((e) => e.type === "questions");
@@ -931,7 +934,7 @@ function tt(e, t) {
931
934
  part: r
932
935
  };
933
936
  }
934
- function nt({ entry: e, part: t, questions: n, autoFocus: r, className: a }) {
937
+ function rt({ entry: e, part: t, questions: n, autoFocus: r, className: a }) {
935
938
  let o = !!n?.canAnswer(e.id);
936
939
  return /* @__PURE__ */ N(i, {
937
940
  questions: t.questions,
@@ -942,7 +945,7 @@ function nt({ entry: e, part: t, questions: n, autoFocus: r, className: a }) {
942
945
  className: a ?? "text-xs"
943
946
  });
944
947
  }
945
- function rt({ entry: e, questions: t, hiddenPartId: n }) {
948
+ function it({ entry: e, questions: t, hiddenPartId: n }) {
946
949
  let i = (e.parts ?? []).filter((e) => e.type !== "questions" || e.id !== n), o = [];
947
950
  for (let e of i) {
948
951
  let t = o.at(-1);
@@ -957,7 +960,7 @@ function rt({ entry: e, questions: t, hiddenPartId: n }) {
957
960
  return /* @__PURE__ */ N("div", {
958
961
  className: "space-y-2",
959
962
  children: o.map((n) => {
960
- if ("steps" in n) return /* @__PURE__ */ N(et, { steps: n.steps }, n.key);
963
+ if ("steps" in n) return /* @__PURE__ */ N(tt, { steps: n.steps }, n.key);
961
964
  let { part: i } = n;
962
965
  return i.type === "text" ? i.text.trim() ? /* @__PURE__ */ N(r, {
963
966
  content: i.text,
@@ -968,7 +971,7 @@ function rt({ entry: e, questions: t, hiddenPartId: n }) {
968
971
  streaming: i.streaming,
969
972
  duration: i.duration,
970
973
  className: "my-0"
971
- }, n.key) : /* @__PURE__ */ N(nt, {
974
+ }, n.key) : /* @__PURE__ */ N(rt, {
972
975
  entry: e,
973
976
  part: i,
974
977
  questions: t
@@ -976,13 +979,13 @@ function rt({ entry: e, questions: t, hiddenPartId: n }) {
976
979
  })
977
980
  });
978
981
  }
979
- function it({ entry: e, questions: t, hiddenPartId: n }) {
982
+ function at({ entry: e, questions: t, hiddenPartId: n }) {
980
983
  let i = Q();
981
984
  if (e.kind === "thinking" && e.parts) {
982
985
  let r = e.status === "error" || e.status === "stopped" || e.status === "running" && e.parts.length === 0;
983
986
  return /* @__PURE__ */ P("li", {
984
987
  className: "text-xs text-muted-foreground",
985
- children: [e.parts.length > 0 && /* @__PURE__ */ N(rt, {
988
+ children: [e.parts.length > 0 && /* @__PURE__ */ N(it, {
986
989
  entry: e,
987
990
  questions: t,
988
991
  hiddenPartId: n
@@ -990,15 +993,15 @@ function it({ entry: e, questions: t, hiddenPartId: n }) {
990
993
  className: `flex items-start gap-1.5 ${e.parts.length > 0 ? "mt-1" : ""}`,
991
994
  children: [/* @__PURE__ */ N("span", {
992
995
  className: "pt-px",
993
- children: /* @__PURE__ */ N(Ye, { status: e.status })
996
+ children: /* @__PURE__ */ N(Xe, { status: e.status })
994
997
  }), /* @__PURE__ */ N("span", {
995
998
  className: "min-w-0 flex-1 whitespace-pre-wrap break-words",
996
- children: Xe(e, i)
999
+ children: Ze(e, i)
997
1000
  })]
998
1001
  })]
999
1002
  });
1000
1003
  }
1001
- let a = e.kind === "thinking" && e.detail ? Ke(e.detail) : [], o = a.filter((e) => e.type === "code"), s = a.filter((e) => e.type === "text" && e.content.trim()), c = e.kind === "thinking" ? Xe(e, i) : e.label;
1004
+ let a = e.kind === "thinking" && e.detail ? qe(e.detail) : [], o = a.filter((e) => e.type === "code"), s = a.filter((e) => e.type === "text" && e.content.trim()), c = e.kind === "thinking" ? Ze(e, i) : e.label;
1002
1005
  return /* @__PURE__ */ P("li", {
1003
1006
  className: "text-xs text-muted-foreground",
1004
1007
  children: [
@@ -1006,7 +1009,7 @@ function it({ entry: e, questions: t, hiddenPartId: n }) {
1006
1009
  className: "flex items-start gap-1.5",
1007
1010
  children: [/* @__PURE__ */ N("span", {
1008
1011
  className: "pt-px",
1009
- children: /* @__PURE__ */ N(Ye, { status: e.status })
1012
+ children: /* @__PURE__ */ N(Xe, { status: e.status })
1010
1013
  }), /* @__PURE__ */ N("span", {
1011
1014
  className: "min-w-0 flex-1 whitespace-pre-wrap break-words",
1012
1015
  children: c
@@ -1014,7 +1017,7 @@ function it({ entry: e, questions: t, hiddenPartId: n }) {
1014
1017
  }),
1015
1018
  o.length > 0 && /* @__PURE__ */ N("div", {
1016
1019
  className: "mt-1 ml-[18px] space-y-1",
1017
- children: o.map((e, t) => /* @__PURE__ */ N(qe, {
1020
+ children: o.map((e, t) => /* @__PURE__ */ N(Je, {
1018
1021
  content: e.content,
1019
1022
  language: e.language
1020
1023
  }, t))
@@ -1030,7 +1033,7 @@ function it({ entry: e, questions: t, hiddenPartId: n }) {
1030
1033
  ]
1031
1034
  });
1032
1035
  }
1033
- function at({ activity: e, questions: t, docked: n, pinUserMessages: r = !0 }) {
1036
+ function ot({ activity: e, questions: t, docked: n, pinUserMessages: r = !0 }) {
1034
1037
  if (e.length === 0) return null;
1035
1038
  let i = [];
1036
1039
  for (let t of e) t.kind === "user" || i.length === 0 ? i.push(t.kind === "user" ? {
@@ -1039,12 +1042,12 @@ function at({ activity: e, questions: t, docked: n, pinUserMessages: r = !0 }) {
1039
1042
  } : { entries: [t] }) : i[i.length - 1].entries.push(t);
1040
1043
  return /* @__PURE__ */ N("ul", {
1041
1044
  className: "space-y-0.5",
1042
- children: i.map((e) => /* @__PURE__ */ P("li", { children: [e.user && /* @__PURE__ */ N(Qe, {
1045
+ children: i.map((e) => /* @__PURE__ */ P("li", { children: [e.user && /* @__PURE__ */ N($e, {
1043
1046
  entry: e.user,
1044
1047
  pinned: r
1045
1048
  }), e.entries.length > 0 && /* @__PURE__ */ N("ul", {
1046
1049
  className: "space-y-0.5",
1047
- children: e.entries.map((e) => /* @__PURE__ */ N(it, {
1050
+ children: e.entries.map((e) => /* @__PURE__ */ N(at, {
1048
1051
  entry: e,
1049
1052
  questions: t,
1050
1053
  hiddenPartId: n?.entry.id === e.id ? n.part.id : void 0
@@ -1054,55 +1057,55 @@ function at({ activity: e, questions: t, docked: n, pinUserMessages: r = !0 }) {
1054
1057
  }
1055
1058
  //#endregion
1056
1059
  //#region src/presentation/panelWidth.ts
1057
- var ot = 420, st = 320, ct = "60vw", lt = "agentico:panel-width";
1058
- function ut(e, t) {
1060
+ var st = 420, ct = 320, lt = "60vw", ut = "agentico:panel-width";
1061
+ function dt(e, t) {
1059
1062
  if (typeof e == "number") return e;
1060
1063
  let n = Number.parseFloat(e);
1061
1064
  return Number.isFinite(n) ? Math.round(n / 100 * t) : Infinity;
1062
1065
  }
1063
- function dt(e, t, n) {
1066
+ function ft(e, t, n) {
1064
1067
  return Math.round(Math.min(Math.max(e, t), Math.max(t, n)));
1065
1068
  }
1066
- function ft() {
1069
+ function pt() {
1067
1070
  try {
1068
- let e = window.localStorage.getItem(lt), t = e === null ? NaN : Number(e);
1071
+ let e = window.localStorage.getItem(ut), t = e === null ? NaN : Number(e);
1069
1072
  return Number.isFinite(t) && t > 0 ? t : null;
1070
1073
  } catch {
1071
1074
  return null;
1072
1075
  }
1073
1076
  }
1074
- function pt(e) {
1077
+ function mt(e) {
1075
1078
  try {
1076
- e === null ? window.localStorage.removeItem(lt) : window.localStorage.setItem(lt, String(e));
1079
+ e === null ? window.localStorage.removeItem(ut) : window.localStorage.setItem(ut, String(e));
1077
1080
  } catch {}
1078
1081
  }
1079
- function mt() {
1082
+ function ht() {
1080
1083
  return typeof window > "u" ? Infinity : window.innerWidth;
1081
1084
  }
1082
- function ht({ defaultWidth: e = 420, minWidth: t = 320, maxWidth: n = ct, onWidthChange: r }) {
1083
- let [i, a] = j(mt), [o, s] = j(() => ft() ?? e);
1085
+ function gt({ defaultWidth: e = 420, minWidth: t = 320, maxWidth: n = lt, onWidthChange: r }) {
1086
+ let [i, a] = j(ht), [o, s] = j(() => pt() ?? e);
1084
1087
  D(() => {
1085
1088
  if (typeof window > "u") return;
1086
1089
  let e = () => a(window.innerWidth);
1087
1090
  return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
1088
1091
  }, []);
1089
- let c = t, l = Math.max(c, ut(n, i)), u = dt(o, c, l);
1092
+ let c = t, l = Math.max(c, dt(n, i)), u = ft(o, c, l);
1090
1093
  return D(() => {
1091
1094
  r?.(u);
1092
1095
  }, [u]), {
1093
1096
  width: u,
1094
1097
  min: c,
1095
1098
  max: l,
1096
- set: T((e) => s(dt(e, c, l)), [c, l]),
1097
- commit: T((e) => pt(dt(e, c, l)), [c, l]),
1099
+ set: T((e) => s(ft(e, c, l)), [c, l]),
1100
+ commit: T((e) => mt(ft(e, c, l)), [c, l]),
1098
1101
  reset: T(() => {
1099
- s(e), pt(null);
1102
+ s(e), mt(null);
1100
1103
  }, [e])
1101
1104
  };
1102
1105
  }
1103
1106
  //#endregion
1104
1107
  //#region src/presentation/AgenticoResizeHandle.tsx
1105
- function gt({ width: e, min: t, max: n, onResize: r, onCommit: i, onReset: a }) {
1108
+ function _t({ width: e, min: t, max: n, onResize: r, onCommit: i, onReset: a }) {
1106
1109
  let o = Q(), s = A(null), [c, l] = j(!1), u = (e) => Math.round(Math.min(Math.max(e, t), Math.max(t, n))), d = (e) => {
1107
1110
  let t = s.current;
1108
1111
  if (t && t.pointerId === e.pointerId) {
@@ -1160,7 +1163,7 @@ function gt({ width: e, min: t, max: n, onResize: r, onCommit: i, onReset: a })
1160
1163
  }
1161
1164
  //#endregion
1162
1165
  //#region src/presentation/AgenticoToggle.tsx
1163
- function _t({ className: e = "" }) {
1166
+ function vt({ className: e = "" }) {
1164
1167
  let { isOpen: n, toggleOpen: r, task: i } = $(), a = Q(), o = i?.agent.running ?? !1;
1165
1168
  return /* @__PURE__ */ N(t, {
1166
1169
  icon: "bot",
@@ -1173,21 +1176,21 @@ function _t({ className: e = "" }) {
1173
1176
  }
1174
1177
  //#endregion
1175
1178
  //#region src/presentation/useAIModelCatalog.ts
1176
- var vt = "llmnative-cms.selectedAIModel";
1177
- function yt() {
1179
+ var yt = "llmnative-cms.selectedAIModel";
1180
+ function bt() {
1178
1181
  try {
1179
- return localStorage.getItem(vt) ?? "";
1182
+ return localStorage.getItem(yt) ?? "";
1180
1183
  } catch {
1181
1184
  return "";
1182
1185
  }
1183
1186
  }
1184
- function bt(e) {
1187
+ function xt(e) {
1185
1188
  try {
1186
- e ? localStorage.setItem(vt, e) : localStorage.removeItem(vt);
1189
+ e ? localStorage.setItem(yt, e) : localStorage.removeItem(yt);
1187
1190
  } catch {}
1188
1191
  }
1189
- function xt() {
1190
- let e = b()?.registry ?? {}, t = Object.keys(e).length > 0, [n, r] = j({}), [i, a] = j(!1), [o, s] = j(yt);
1192
+ function St() {
1193
+ let e = b()?.registry ?? {}, t = Object.keys(e).length > 0, [n, r] = j({}), [i, a] = j(!1), [o, s] = j(bt);
1191
1194
  return D(() => {
1192
1195
  if (!t) {
1193
1196
  r({});
@@ -1198,7 +1201,7 @@ function xt() {
1198
1201
  if (n) return;
1199
1202
  r(e.modelsByProvider);
1200
1203
  let t = Object.values(e.modelsByProvider).flat();
1201
- s((e) => t.some((t) => t.id === e) ? e : (bt(""), ""));
1204
+ s((e) => t.some((t) => t.id === e) ? e : (xt(""), ""));
1202
1205
  }).catch((e) => {
1203
1206
  console.error("useAIModelCatalog: getAIModelCatalog failed", e), n || r({});
1204
1207
  }).finally(() => {
@@ -1212,17 +1215,17 @@ function xt() {
1212
1215
  modelsLoading: i,
1213
1216
  selectedModel: o,
1214
1217
  setSelectedModel: (e) => {
1215
- bt(e), s(e);
1218
+ xt(e), s(e);
1216
1219
  }
1217
1220
  };
1218
1221
  }
1219
1222
  //#endregion
1220
1223
  //#region src/domain/approval.ts
1221
- var St = "approval";
1222
- function Ct(e, t) {
1224
+ var Ct = "approval";
1225
+ function wt(e, t) {
1223
1226
  return typeof e.needsApproval == "function" ? e.needsApproval(t) : e.needsApproval === !0;
1224
1227
  }
1225
- function wt(e, t, n) {
1228
+ function Tt(e, t, n) {
1226
1229
  let r = e[0]?.values ?? [], i = r.filter((e) => e !== t && e !== n).join(" ").trim();
1227
1230
  return {
1228
1231
  approved: r.includes(t) && !r.includes(n),
@@ -1231,12 +1234,12 @@ function wt(e, t, n) {
1231
1234
  }
1232
1235
  //#endregion
1233
1236
  //#region src/presentation/useAgent.ts
1234
- var Tt = 20, Et = 26e4;
1235
- function Dt(e) {
1236
- return e.filter((e) => !m.isTextAttachment(e.mimeType) || e.base64.length <= Et);
1237
+ var Et = 20, Dt = 26e4;
1238
+ function Ot(e) {
1239
+ return e.filter((e) => !m.isTextAttachment(e.mimeType) || e.base64.length <= Dt);
1237
1240
  }
1238
- function Ot(e, t = {}) {
1239
- let { defaultEnabled: n = !1 } = t, [r, i] = j(n), { hasProviders: a, modelsByProvider: o, modelsLoading: s, selectedModel: c, setSelectedModel: l } = xt(), [u, d] = j(!1), [f, p] = j(null), [h, g] = j(!1), [_, y] = j([]), x = A([]), S = (e) => {
1241
+ function kt(e, t = {}) {
1242
+ let { defaultEnabled: n = !1 } = t, [r, i] = j(n), { hasProviders: a, modelsByProvider: o, modelsLoading: s, selectedModel: c, setSelectedModel: l } = St(), [u, d] = j(!1), [f, p] = j(null), [h, g] = j(!1), [_, y] = j([]), x = A([]), S = (e) => {
1240
1243
  y((t) => {
1241
1244
  let n = typeof e == "function" ? e(t) : e;
1242
1245
  return x.current = n, n;
@@ -1410,7 +1413,7 @@ function Ot(e, t = {}) {
1410
1413
  let l = s ? v(s) : H, u = l ? N[l.provider] : null;
1411
1414
  if (!u || !l) return p(T.current.noProviderAvailable), null;
1412
1415
  n?.length && (c.attachmentsRef.current = [...c.attachmentsRef.current ?? [], ...n]);
1413
- let d = (n ?? []).filter((e) => m.isTextAttachment(e.mimeType)).map((e) => e.base64.length <= Et ? `\n\n[File allegato: ${e.name}]\n${m.decodeBase64Text(e.base64)}` : `\n\n[File allegato: ${e.name} — troppo grande per essere incollato qui. Usa uno dei tool di lettura file disponibili (es. list_csv_columns/extract_csv_column) per leggerne il contenuto prima di chiedere altro all'utente.]`).join(""), f = Dt(n ?? []), h = c.tools.map((e) => ({
1416
+ let d = (n ?? []).filter((e) => m.isTextAttachment(e.mimeType)).map((e) => e.base64.length <= Dt ? `\n\n[File allegato: ${e.name}]\n${m.decodeBase64Text(e.base64)}` : `\n\n[File allegato: ${e.name} — troppo grande per essere incollato qui. Usa uno dei tool di lettura file disponibili (es. list_csv_columns/extract_csv_column) per leggerne il contenuto prima di chiedere altro all'utente.]`).join(""), f = Ot(n ?? []), h = c.tools.map((e) => ({
1414
1417
  name: e.name,
1415
1418
  description: e.description,
1416
1419
  inputSchema: K(e.inputSchema)
@@ -1423,7 +1426,7 @@ function Ot(e, t = {}) {
1423
1426
  status: "running",
1424
1427
  parts: [{
1425
1428
  type: "questions",
1426
- id: St,
1429
+ id: Ct,
1427
1430
  questions: [{
1428
1431
  header: i.approvalHeader,
1429
1432
  question: i.approveQuestion.replace("{action}", o),
@@ -1432,7 +1435,7 @@ function Ot(e, t = {}) {
1432
1435
  }]
1433
1436
  }]
1434
1437
  }]);
1435
- let s = `${a}:${St}`;
1438
+ let s = `${a}:${Ct}`;
1436
1439
  return new Promise((e, t) => {
1437
1440
  let n = () => {
1438
1441
  C.current.delete(s), b(a, "stopped"), t(new DOMException("The turn was stopped.", "AbortError"));
@@ -1443,7 +1446,7 @@ function Ot(e, t = {}) {
1443
1446
  }
1444
1447
  r.addEventListener("abort", n, { once: !0 }), C.current.set(s, {
1445
1448
  resolve: (t) => {
1446
- r.removeEventListener("abort", n), b(a, "done"), e(wt(t, i.approve, i.reject));
1449
+ r.removeEventListener("abort", n), b(a, "done"), e(Tt(t, i.approve, i.reject));
1447
1450
  },
1448
1451
  reject: t
1449
1452
  });
@@ -1458,7 +1461,7 @@ function Ot(e, t = {}) {
1458
1461
  } : i));
1459
1462
  try {
1460
1463
  let n = c.history, r = t;
1461
- for (let t = 0; t < Tt; t++) {
1464
+ for (let t = 0; t < Et; t++) {
1462
1465
  let i = crypto.randomUUID();
1463
1466
  S((e) => [...e, {
1464
1467
  id: i,
@@ -1517,7 +1520,7 @@ function Ot(e, t = {}) {
1517
1520
  let s = /* @__PURE__ */ new Map();
1518
1521
  for (let t of a.toolCalls) {
1519
1522
  let n = _.get(t.name);
1520
- if (n && Ct(n, t.input)) try {
1523
+ if (n && wt(n, t.input)) try {
1521
1524
  s.set(t.id, await g(t.id, n, t.input, y.signal));
1522
1525
  } catch {
1523
1526
  return e.fallback(c.params, c.context);
@@ -1751,23 +1754,23 @@ function Ot(e, t = {}) {
1751
1754
  }
1752
1755
  //#endregion
1753
1756
  //#region src/domain/orchestrator/prompt.ts
1754
- function kt() {
1757
+ function At() {
1755
1758
  let e = X();
1756
1759
  return [e.responseRulesHeading, ...e.responseRules.map((e) => `- ${e}`)].join("\n");
1757
1760
  }
1758
- function At(e, t, n) {
1761
+ function jt(e, t, n) {
1759
1762
  let r = X(), i = n ? `\n${r.pageContextHeading}\n${r.pageContextIntro}\n${n}\n` : "";
1760
1763
  return `${r.orchestratorIntro}
1761
1764
 
1762
1765
  ${r.toolsHeading}
1763
1766
  ${t}
1764
1767
  ${i}
1765
- ${kt()}
1768
+ ${At()}
1766
1769
 
1767
1770
  ${r.userRequestHeading}
1768
1771
  ${e}`;
1769
1772
  }
1770
- function jt(e, t) {
1773
+ function Mt(e, t) {
1771
1774
  return t ? {
1772
1775
  kind: "handoff",
1773
1776
  ...t
@@ -1778,27 +1781,27 @@ function jt(e, t) {
1778
1781
  }
1779
1782
  //#endregion
1780
1783
  //#region src/domain/orchestrator/agenticoOrchestratorAgent.ts
1781
- function Mt(e) {
1784
+ function Nt(e) {
1782
1785
  return V().filter((t) => !t.onlyWhenAnchored || e === t.id);
1783
1786
  }
1784
- function Nt(e) {
1787
+ function Pt(e) {
1785
1788
  return {
1786
1789
  buildContext(e) {
1787
1790
  return {
1788
- cliCatalog: le(Mt(e.scopedSubagentId)),
1791
+ cliCatalog: le(Nt(e.scopedSubagentId)),
1789
1792
  handoff: { current: null },
1790
1793
  collected: {}
1791
1794
  };
1792
1795
  },
1793
1796
  buildPrompt({ userGoal: e, pageContext: t }, { cliCatalog: n }) {
1794
- return At(e, n, t);
1797
+ return jt(e, n, t);
1795
1798
  },
1796
1799
  buildFollowUpPrompt(e, t, { cliCatalog: n }) {
1797
- return `${e}\n\n${kt()}\n\n${X().toolsHeading}\n${n}`;
1800
+ return `${e}\n\n${At()}\n\n${X().toolsHeading}\n${n}`;
1798
1801
  },
1799
1802
  parseResponse(e, t, n) {
1800
1803
  let r = n.handoff.current;
1801
- return n.handoff.current = null, jt(e, r);
1804
+ return n.handoff.current = null, Mt(e, r);
1802
1805
  },
1803
1806
  fallback() {
1804
1807
  return {
@@ -1814,7 +1817,7 @@ function Nt(e) {
1814
1817
  attachmentsRef: r,
1815
1818
  collected: n.collected,
1816
1819
  proxyFetch: y
1817
- }), a = t.scopedSubagentId ? H(t.scopedSubagentId) : null, o = a ? i.filter((e) => (a.crossAgentToolIds ?? []).includes(e.name)) : i, s = Mt(t.scopedSubagentId).flatMap((t) => t.commands.map((r) => ({
1820
+ }), a = t.scopedSubagentId ? H(t.scopedSubagentId) : null, o = a ? i.filter((e) => (a.crossAgentToolIds ?? []).includes(e.name)) : i, s = Nt(t.scopedSubagentId).flatMap((t) => t.commands.map((r) => ({
1818
1821
  name: `${t.id}_${r.name}`,
1819
1822
  description: `${t.label}: ${r.summary}`,
1820
1823
  inputSchema: r.inputSchema,
@@ -1838,12 +1841,12 @@ function Nt(e) {
1838
1841
  }
1839
1842
  //#endregion
1840
1843
  //#region src/presentation/deriveHistoryTitle.ts
1841
- function Pt(e, t) {
1844
+ function Ft(e, t) {
1842
1845
  return e.deriveHistoryTitle?.(t) ?? e.label;
1843
1846
  }
1844
1847
  //#endregion
1845
1848
  //#region src/presentation/ResultDestinationPicker.tsx
1846
- function Ft({ manifest: e, result: t, meta: n, taskId: r, initiallyApplied: i, onApplied: a, extraDestinations: o }) {
1849
+ function It({ manifest: e, result: t, meta: n, taskId: r, initiallyApplied: i, onApplied: a, extraDestinations: o }) {
1847
1850
  let s = Q(), c = $(), l = c.scope, u = C(), [d, f] = j(null), [p, m] = j(new Set(i ?? [])), [h, g] = j(null), v = be(), y = /* @__PURE__ */ new Map();
1848
1851
  e.destinationIds.forEach((e) => {
1849
1852
  let t = v[e];
@@ -1861,7 +1864,7 @@ function Ft({ manifest: e, result: t, meta: n, taskId: r, initiallyApplied: i, o
1861
1864
  storageProvider: l?.storageProvider ?? null,
1862
1865
  proxyFetch: u
1863
1866
  }, n);
1864
- m((e) => new Set(e).add(i)), a?.(i), d?.id && c.commitEntityChat(e.id, d.id, r, l?.id, n, Pt(e, n));
1867
+ m((e) => new Set(e).add(i)), a?.(i), d?.id && c.commitEntityChat(e.id, d.id, r, l?.id, n, Ft(e, n));
1865
1868
  } catch (e) {
1866
1869
  g(e instanceof Error ? e.message : String(e));
1867
1870
  } finally {
@@ -1894,16 +1897,16 @@ function Ft({ manifest: e, result: t, meta: n, taskId: r, initiallyApplied: i, o
1894
1897
  }
1895
1898
  //#endregion
1896
1899
  //#region src/presentation/reports/subagentReportRegistry.tsx
1897
- var It = {};
1898
- function Lt(e) {
1899
- Object.assign(It, e);
1900
- }
1900
+ var Lt = {};
1901
1901
  function Rt(e) {
1902
- return It[e];
1902
+ Object.assign(Lt, e);
1903
+ }
1904
+ function zt(e) {
1905
+ return Lt[e];
1903
1906
  }
1904
1907
  //#endregion
1905
1908
  //#region src/presentation/reports/GenericResultPreview.tsx
1906
- function zt({ result: e }) {
1909
+ function Bt({ result: e }) {
1907
1910
  let [t, n] = j(!1);
1908
1911
  return /* @__PURE__ */ P("div", {
1909
1912
  className: `relative cursor-pointer rounded-md border border-border/60 ${t ? "max-h-80 overflow-y-auto" : "max-h-28 overflow-hidden"}`,
@@ -1920,7 +1923,7 @@ function zt({ result: e }) {
1920
1923
  }
1921
1924
  //#endregion
1922
1925
  //#region src/presentation/liveAnchorDestination.ts
1923
- function Bt(e, t, n) {
1926
+ function Vt(e, t, n) {
1924
1927
  return e.length === 0 ? null : {
1925
1928
  id: "live-component",
1926
1929
  label: "Applica al componente aperto",
@@ -1931,38 +1934,38 @@ function Bt(e, t, n) {
1931
1934
  }
1932
1935
  //#endregion
1933
1936
  //#region src/presentation/subagentControls.ts
1934
- var Vt = {};
1935
- function Ht(e) {
1936
- Object.assign(Vt, e);
1937
- }
1937
+ var Ht = {};
1938
1938
  function Ut(e) {
1939
- return Vt[e];
1939
+ Object.assign(Ht, e);
1940
+ }
1941
+ function Wt(e) {
1942
+ return Ht[e];
1940
1943
  }
1941
1944
  //#endregion
1942
1945
  //#region src/presentation/chatTitles.ts
1943
- function Wt(e, t = 6e3) {
1946
+ function Gt(e, t = 6e3) {
1944
1947
  let n = e.filter((e) => (e.kind === "user" || e.kind === "thinking") && e.detail?.trim()).map((e) => `${e.kind === "user" ? "Person" : "Agent"}: ${e.detail.trim()}`).join("\n\n");
1945
1948
  return n.length > t ? `${n.slice(0, t * .7)}\n\n[…]\n\n${n.slice(-t * .3)}` : n;
1946
1949
  }
1947
- function Gt(e) {
1950
+ function Kt(e) {
1948
1951
  return (e.trim().split("\n").map((e) => e.trim()).find(Boolean) ?? "").replace(/^(title|titolo)\s*:\s*/i, "").replace(/^#+\s*/, "").replace(/^["'«“]+|["'»”]+$/g, "").replace(/[.。]+$/, "").trim().slice(0, 80);
1949
1952
  }
1950
- function Kt(e, t) {
1953
+ function qt(e, t) {
1951
1954
  try {
1952
1955
  return e.definition.executor?.catalogProviders?.(e.toParams(t));
1953
1956
  } catch {
1954
1957
  return;
1955
1958
  }
1956
1959
  }
1957
- function qt(e, t, n, r, i) {
1958
- let a = Kt(e, t), o = (e) => {
1960
+ function Jt(e, t, n, r, i) {
1961
+ let a = qt(e, t), o = (e) => {
1959
1962
  let t = e ? v(e) : null;
1960
1963
  return !(!t || !i[t.provider] || a && !a.includes(t.provider));
1961
1964
  };
1962
1965
  return o(n) ? n : Object.values(r).flat().map((e) => e.id).find(o);
1963
1966
  }
1964
- function Jt(e) {
1965
- let t = b()?.registry ?? {}, { modelsByProvider: n, selectedModel: r } = xt(), i = A({
1967
+ function Yt(e) {
1968
+ let t = b()?.registry ?? {}, { modelsByProvider: n, selectedModel: r } = St(), i = A({
1966
1969
  registry: t,
1967
1970
  modelsByProvider: n,
1968
1971
  selectedModel: r
@@ -1975,17 +1978,17 @@ function Jt(e) {
1975
1978
  let a = A(/* @__PURE__ */ new Set()), o = T(async (t, n, r) => {
1976
1979
  if (!e) return !1;
1977
1980
  let o = ke(e, t, n), s = H(t), c = `${e}:${t}:${n}`;
1978
- if (!o || !s?.autoTitle || o.name || !Me(o) || a.current.has(c)) return !1;
1979
- let { registry: l, modelsByProvider: u, selectedModel: d } = i.current, f = qt(s, o.params, r ?? d, u, l), p = f ? v(f) : null;
1981
+ if (!o || !s?.autoTitle || o.name || !Ne(o) || a.current.has(c)) return !1;
1982
+ let { registry: l, modelsByProvider: u, selectedModel: d } = i.current, f = Jt(s, o.params, r ?? d, u, l), p = f ? v(f) : null;
1980
1983
  if (!p) return !1;
1981
1984
  a.current.add(c);
1982
1985
  try {
1983
1986
  let r = await l[p.provider].complete({
1984
- prompt: X().chatTitle.replace("{chat}", Wt(o.activity)),
1987
+ prompt: X().chatTitle.replace("{chat}", Gt(o.activity)),
1985
1988
  model: p.model,
1986
1989
  history: []
1987
- }), i = r && r.type === "text" ? Gt(r.text) : "";
1988
- return i ? Ne(e, t, n, i, "model") : !1;
1990
+ }), i = r && r.type === "text" ? Kt(r.text) : "";
1991
+ return i ? Pe(e, t, n, i, "model") : !1;
1989
1992
  } catch {
1990
1993
  return !1;
1991
1994
  } finally {
@@ -1993,12 +1996,12 @@ function Jt(e) {
1993
1996
  }
1994
1997
  }, [e]), s = Object.keys(n).length > 0;
1995
1998
  return D(() => {
1996
- e && s && !Yt.has(e) && (Yt.add(e), (async () => {
1997
- for (let t of Ie(e)) {
1999
+ e && s && !Xt.has(e) && (Xt.add(e), (async () => {
2000
+ for (let t of Le(e)) {
1998
2001
  let n = H(t.subagentId);
1999
2002
  if (n?.autoTitle) {
2000
- if (n.definition.conversational && !Me(t)) {
2001
- Fe(e, t.subagentId, t.entityId);
2003
+ if (n.definition.conversational && !Ne(t)) {
2004
+ Ie(e, t.subagentId, t.entityId);
2002
2005
  continue;
2003
2006
  }
2004
2007
  t.name || await o(t.subagentId, t.entityId);
@@ -2011,15 +2014,15 @@ function Jt(e) {
2011
2014
  o
2012
2015
  ]), o;
2013
2016
  }
2014
- var Yt = /* @__PURE__ */ new Set(), Xt = () => ({});
2015
- function Zt({ manifest: e, params: t, extraDestinations: n, precedingActivity: r, taskId: i, resumeSeed: a, model: o, openingMessage: s }) {
2016
- let c = Ot(e.definition, { defaultEnabled: !0 }), l = $(), u = l.scope, d = C(), f = A(i ?? `subagent-${e.id}-${crypto.randomUUID()}`).current, [p, m] = j(null), h = (t) => {
2017
+ var Xt = /* @__PURE__ */ new Set(), Zt = () => ({});
2018
+ function Qt({ manifest: e, params: t, extraDestinations: n, precedingActivity: r, taskId: i, resumeSeed: a, model: o, openingMessage: s }) {
2019
+ let c = kt(e.definition, { defaultEnabled: !0 }), l = $(), u = l.scope, d = C(), f = A(i ?? `subagent-${e.id}-${crypto.randomUUID()}`).current, [p, m] = j(null), h = (t) => {
2017
2020
  e.definition.conversational || m(t);
2018
- }, [g, _] = j([]), [v, y] = j(null), b = Rt(e.id), x = b?.kind === "selection" ? b : null, [S, w] = j(null), T = A(!1), E = A(0), O = A(null);
2021
+ }, [g, _] = j([]), [v, y] = j(null), b = zt(e.id), x = b?.kind === "selection" ? b : null, [S, w] = j(null), T = A(!1), E = A(0), O = A(null);
2019
2022
  p && p !== O.current && (O.current = p, E.current = (r?.length ?? 0) + c.activity.length);
2020
2023
  let F = A(!1), ee = c.remote || !c.hasProviders || c.selectedModel !== "";
2021
2024
  D(() => {
2022
- !T.current && ee && (T.current = !0, a ? c.resume(e.toParams(t), a) : (o && c.setSelectedModel(o), c.run(e.toParams(t), {
2025
+ !T.current && ee && (T.current = !0, a ? (W.current = !0, c.resume(e.toParams(t), a)) : (o && c.setSelectedModel(o), c.run(e.toParams(t), {
2023
2026
  model: o,
2024
2027
  openingMessage: s
2025
2028
  }).then((e) => {
@@ -2039,7 +2042,7 @@ function Zt({ manifest: e, params: t, extraDestinations: n, precedingActivity: r
2039
2042
  ...t,
2040
2043
  pinnedEntityId: r
2041
2044
  }).then((n) => {
2042
- n?.id && l.commitEntityChat(e.id, n.id, f, u.id, t, Pt(e, t));
2045
+ n?.id && l.commitEntityChat(e.id, n.id, f, u.id, t, Ft(e, t));
2043
2046
  }).catch((e) => y(e instanceof Error ? e.message : String(e))));
2044
2047
  });
2045
2048
  }, [
@@ -2058,51 +2061,55 @@ function Zt({ manifest: e, params: t, extraDestinations: n, precedingActivity: r
2058
2061
  p,
2059
2062
  x,
2060
2063
  S
2061
- ]), z = k(() => l.componentAnchors.filter((t) => t.subagentId === e.id && t.onResult), [l.componentAnchors, e.id]), B = k(() => Bt(z, t, f), [
2064
+ ]), z = k(() => l.componentAnchors.filter((t) => t.subagentId === e.id && t.onResult), [l.componentAnchors, e.id]), B = k(() => Vt(z, t, f), [
2062
2065
  z,
2063
2066
  t,
2064
2067
  f
2065
- ]), te = k(() => B ? [B, ...n ?? []] : n, [B, n]), V = e.chatEntityId?.(t), H = Jt(u?.id), U = A(!1);
2068
+ ]), te = k(() => B ? [B, ...n ?? []] : n, [B, n]), V = e.chatEntityId?.(t), H = Yt(u?.id), U = A(!1), W = A(!1);
2066
2069
  D(() => {
2067
2070
  let n = U.current && !c.running;
2068
2071
  if (U.current = c.running, !n || !V || !u) return;
2072
+ if (W.current) {
2073
+ W.current = !1;
2074
+ return;
2075
+ }
2069
2076
  let i = c.snapshot();
2070
2077
  if (!i) return;
2071
2078
  let a = [...r ?? [], ...i.activity];
2072
- e.autoTitle && e.definition.conversational && !Me({ activity: a }) || (Ae({
2079
+ e.autoTitle && e.definition.conversational && !Ne({ activity: a }) || (Ae({
2073
2080
  scopeId: u.id,
2074
2081
  subagentId: e.id,
2075
2082
  entityId: V,
2076
2083
  params: t,
2077
- title: Pt(e, t),
2084
+ title: Ft(e, t),
2078
2085
  history: i.history,
2079
2086
  activity: a
2080
2087
  }), e.autoTitle && H(e.id, V, c.selectedModel));
2081
2088
  }, [c.running]);
2082
- let W = () => {
2089
+ let G = () => {
2083
2090
  F.current = !0, c.running && c.stop(), l.closeTask(f);
2084
- }, G = A(Ut(e.id) ?? Xt).current, K = G({
2091
+ }, K = A(Wt(e.id) ?? Zt).current, q = K({
2085
2092
  params: t,
2086
2093
  taskId: f,
2087
2094
  running: c.running,
2088
- close: W
2089
- }), q = (e) => {
2095
+ close: G
2096
+ }), ne = (e) => {
2090
2097
  _((t) => t.includes(e) ? t : [...t, e]);
2091
2098
  };
2092
2099
  return D(() => {
2093
2100
  F.current || l.openTask({
2094
2101
  id: f,
2095
- title: Pt(e, t),
2102
+ title: Ft(e, t),
2096
2103
  icon: e.icon,
2097
2104
  agent: c,
2098
2105
  onApplied: (e) => h(e),
2099
2106
  precedingActivity: r,
2100
2107
  panelExtraAnchorIndex: E.current,
2101
- onDismiss: W,
2108
+ onDismiss: G,
2102
2109
  ...V ? { savedToDisk: !0 } : {},
2103
- panelActions: K.content,
2104
- composerActions: K.actions,
2105
- composerCommands: K.commands,
2110
+ panelActions: q.content,
2111
+ composerActions: q.actions,
2112
+ composerCommands: q.commands,
2106
2113
  panelExtra: p ? /* @__PURE__ */ P(M, { children: [
2107
2114
  x && S ? /* @__PURE__ */ N(x.Report, {
2108
2115
  result: p,
@@ -2111,18 +2118,18 @@ function Zt({ manifest: e, params: t, extraDestinations: n, precedingActivity: r
2111
2118
  }) : b?.kind === "editable" ? /* @__PURE__ */ N(b.Report, {
2112
2119
  result: p,
2113
2120
  onResultChange: L
2114
- }) : /* @__PURE__ */ N(zt, { result: R }),
2121
+ }) : /* @__PURE__ */ N(Bt, { result: R }),
2115
2122
  v && /* @__PURE__ */ P("p", {
2116
2123
  className: "text-xs text-destructive",
2117
2124
  children: ["Salvataggio automatico non riuscito: ", v]
2118
2125
  }),
2119
- /* @__PURE__ */ N(Ft, {
2126
+ /* @__PURE__ */ N(It, {
2120
2127
  manifest: e,
2121
2128
  result: R,
2122
2129
  meta: t,
2123
2130
  taskId: f,
2124
2131
  initiallyApplied: g,
2125
- onApplied: q,
2132
+ onApplied: ne,
2126
2133
  extraDestinations: te
2127
2134
  })
2128
2135
  ] }) : void 0
@@ -2148,23 +2155,23 @@ function Zt({ manifest: e, params: t, extraDestinations: n, precedingActivity: r
2148
2155
  n,
2149
2156
  r,
2150
2157
  v,
2151
- K.content,
2152
- K.actions,
2153
- K.commands
2158
+ q.content,
2159
+ q.actions,
2160
+ q.commands
2154
2161
  ]), D(() => () => {
2155
2162
  l.closeTask(f);
2156
2163
  }, [l.closeTask, f]), null;
2157
2164
  }
2158
2165
  //#endregion
2159
2166
  //#region src/presentation/OrchestratorRunner.tsx
2160
- function Qt({ userGoal: e }) {
2161
- let t = Q(), n = Ot(k(() => Nt({
2167
+ function $t({ userGoal: e }) {
2168
+ let t = Q(), n = kt(k(() => Pt({
2162
2169
  unavailable: t.orchestratorUnavailable,
2163
2170
  continueWithoutAi: t.orchestratorContinueWithoutAi,
2164
2171
  preparing: t.orchestratorPreparing,
2165
2172
  collecting: t.orchestratorCollecting
2166
2173
  }), []), { defaultEnabled: !0 }), r = $(), [i, a] = j(null), o = A(!1), s = !n.hasProviders || n.selectedModel !== "", c = A(r.pendingExtraDestinations), l = A(r.pendingAttachments), u = A(r.pendingModel), d = A(r.pendingScopedSubagentId ?? r.scopedSubagentId ?? void 0), f = A(r.pendingCarryOver), p = A(!1), m = (e) => {
2167
- e && typeof e == "object" && e.kind === "handoff" && (a(e), r.closeTask(He));
2174
+ e && typeof e == "object" && e.kind === "handoff" && (a(e), r.closeTask(Ue));
2168
2175
  };
2169
2176
  D(() => {
2170
2177
  !o.current && s && (o.current = !0, u.current && n.setSelectedModel(u.current), n.run({
@@ -2180,7 +2187,7 @@ function Qt({ userGoal: e }) {
2180
2187
  }));
2181
2188
  }, [s]), D(() => {
2182
2189
  p.current || r.openTask({
2183
- id: He,
2190
+ id: Ue,
2184
2191
  title: "Agentico",
2185
2192
  icon: "bot",
2186
2193
  agent: n,
@@ -2188,7 +2195,7 @@ function Qt({ userGoal: e }) {
2188
2195
  scopedSubagentId: d.current,
2189
2196
  precedingActivity: f.current?.activity,
2190
2197
  onDismiss: () => {
2191
- p.current = !0, n.running && n.stop(), r.closeTask(He);
2198
+ p.current = !0, n.running && n.stop(), r.closeTask(Ue);
2192
2199
  }
2193
2200
  });
2194
2201
  }, [
@@ -2201,12 +2208,12 @@ function Qt({ userGoal: e }) {
2201
2208
  n.hasProviders,
2202
2209
  r.openTask
2203
2210
  ]), D(() => () => {
2204
- r.closeTask(He);
2211
+ r.closeTask(Ue);
2205
2212
  }, [r.closeTask]);
2206
2213
  let h = k(() => [...f.current?.activity ?? [], ...n.activity], [n.activity]);
2207
2214
  if (!i) return null;
2208
2215
  let g = H(i.subagentId);
2209
- return g ? /* @__PURE__ */ N(Zt, {
2216
+ return g ? /* @__PURE__ */ N(Qt, {
2210
2217
  manifest: g,
2211
2218
  params: i.params,
2212
2219
  extraDestinations: c.current,
@@ -2217,8 +2224,8 @@ function Qt({ userGoal: e }) {
2217
2224
  }
2218
2225
  //#endregion
2219
2226
  //#region src/presentation/ManualEntryRunner.tsx
2220
- function $t({ manifest: e, extraDestinations: n }) {
2221
- let r = Ot(e.definition, { defaultEnabled: !1 }), i = Q(), a = $(), o = A(`manual-${e.id}-${crypto.randomUUID()}`).current, [s, c] = j(null), [l, u] = j([]), d = Rt(e.id), f = d?.kind === "selection" ? d : null, [p, m] = j(null), [h, g] = j(null), _ = A(!1), v = (t) => {
2227
+ function en({ manifest: e, extraDestinations: n }) {
2228
+ let r = kt(e.definition, { defaultEnabled: !1 }), i = Q(), a = $(), o = A(`manual-${e.id}-${crypto.randomUUID()}`).current, [s, c] = j(null), [l, u] = j([]), d = zt(e.id), f = d?.kind === "selection" ? d : null, [p, m] = j(null), [h, g] = j(null), _ = A(!1), v = (t) => {
2222
2229
  if (!e.manualEntry) return;
2223
2230
  let n;
2224
2231
  try {
@@ -2245,7 +2252,7 @@ function $t({ manifest: e, extraDestinations: n }) {
2245
2252
  p
2246
2253
  ]), S = (e) => {
2247
2254
  u((t) => t.includes(e) ? t : [...t, e]);
2248
- }, C = k(() => a.componentAnchors.filter((t) => t.subagentId === e.id && t.onResult), [a.componentAnchors, e.id]), w = k(() => h ? Bt(C, h, o) : null, [
2255
+ }, C = k(() => a.componentAnchors.filter((t) => t.subagentId === e.id && t.onResult), [a.componentAnchors, e.id]), w = k(() => h ? Vt(C, h, o) : null, [
2249
2256
  C,
2250
2257
  h,
2251
2258
  o
@@ -2274,8 +2281,8 @@ function $t({ manifest: e, extraDestinations: n }) {
2274
2281
  }) : d?.kind === "editable" ? /* @__PURE__ */ N(d.Report, {
2275
2282
  result: s,
2276
2283
  onResultChange: b
2277
- }) : /* @__PURE__ */ N(zt, { result: x }),
2278
- /* @__PURE__ */ N(Ft, {
2284
+ }) : /* @__PURE__ */ N(Bt, { result: x }),
2285
+ /* @__PURE__ */ N(It, {
2279
2286
  manifest: e,
2280
2287
  result: x,
2281
2288
  meta: h ?? {},
@@ -2312,7 +2319,7 @@ function $t({ manifest: e, extraDestinations: n }) {
2312
2319
  }
2313
2320
  //#endregion
2314
2321
  //#region src/presentation/Agentico.tsx
2315
- function en(e, t) {
2322
+ function tn(e, t) {
2316
2323
  return Object.values(e).flat().map((e) => {
2317
2324
  let n = t?.(e.provider, e.providerLabel ?? e.provider);
2318
2325
  return {
@@ -2324,7 +2331,7 @@ function en(e, t) {
2324
2331
  };
2325
2332
  });
2326
2333
  }
2327
- function tn({ task: e }) {
2334
+ function nn({ task: e }) {
2328
2335
  let t = Q(), [n, r] = j(""), { agent: i, onApplied: a, manualEntry: s } = e, c = i.running, l = (e) => {
2329
2336
  if (r(""), s) {
2330
2337
  s.onSubmit(e.text);
@@ -2336,7 +2343,7 @@ function tn({ task: e }) {
2336
2343
  }).then((e) => {
2337
2344
  e && a(e);
2338
2345
  });
2339
- }, u = !!s || i.remote && i.remoteModels.length === 0, d = i.alongside && i.remoteModels.some((e) => e.value === i.selectedModel), f = !u && !i.remote && !d && i.hasProviders && !i.selectedModel, p = u ? [] : i.remote ? i.remoteModels : i.alongside ? [...i.remoteModels, ...en(i.modelsByProvider, i.catalogGroup)] : en(i.modelsByProvider);
2346
+ }, u = !!s || i.remote && i.remoteModels.length === 0, d = i.alongside && i.remoteModels.some((e) => e.value === i.selectedModel), f = !u && !i.remote && !d && i.hasProviders && !i.selectedModel, p = u ? [] : i.remote ? i.remoteModels : i.alongside ? [...i.remoteModels, ...tn(i.modelsByProvider, i.catalogGroup)] : tn(i.modelsByProvider);
2340
2347
  return /* @__PURE__ */ N(o, {
2341
2348
  value: n,
2342
2349
  onChange: r,
@@ -2356,8 +2363,8 @@ function tn({ task: e }) {
2356
2363
  maxHeight: 220
2357
2364
  });
2358
2365
  }
2359
- function nn() {
2360
- let { startOrchestrator: e } = $(), t = Q(), [n, r] = j(""), { hasProviders: i, modelsByProvider: a, selectedModel: s, setSelectedModel: c } = xt(), l = (t) => {
2366
+ function rn() {
2367
+ let { startOrchestrator: e } = $(), t = Q(), [n, r] = j(""), { hasProviders: i, modelsByProvider: a, selectedModel: s, setSelectedModel: c } = St(), l = (t) => {
2361
2368
  t.text.trim() && (e(t.text.trim(), {
2362
2369
  attachments: t.files.length > 0 ? t.files : void 0,
2363
2370
  model: t.model || void 0
@@ -2370,7 +2377,7 @@ function nn() {
2370
2377
  disabled: !n.trim() || u,
2371
2378
  onSubmit: l,
2372
2379
  attachments: !0,
2373
- models: en(a),
2380
+ models: tn(a),
2374
2381
  selectedModel: s,
2375
2382
  onModelChange: c,
2376
2383
  modelPlaceholder: t.selectModelPlaceholder,
@@ -2378,17 +2385,17 @@ function nn() {
2378
2385
  maxHeight: 220
2379
2386
  });
2380
2387
  }
2381
- function rn({ chat: e, onClose: t }) {
2388
+ function an({ chat: e, onClose: t }) {
2382
2389
  let n = Q(), r = x();
2383
2390
  return /* @__PURE__ */ N(p, {
2384
2391
  title: n.renameChat,
2385
2392
  size: "sm",
2386
2393
  onClose: t,
2387
- onSave: () => (Ne(e.scopeId, e.subagentId, e.entityId, String(r.record?.title ?? je(e)), "person"), t(), Promise.resolve(!0)),
2394
+ onSave: () => (Pe(e.scopeId, e.subagentId, e.entityId, String(r.record?.title ?? Me(e)), "person"), t(), Promise.resolve(!0)),
2388
2395
  children: /* @__PURE__ */ P(u, {
2389
2396
  appearance: "empty",
2390
2397
  controller: r,
2391
- defaultValues: { title: je(e) },
2398
+ defaultValues: { title: Me(e) },
2392
2399
  footer: !1,
2393
2400
  children: [/* @__PURE__ */ N(f, {
2394
2401
  name: "title",
@@ -2401,7 +2408,7 @@ function rn({ chat: e, onClose: t }) {
2401
2408
  })
2402
2409
  });
2403
2410
  }
2404
- function an(e, t, n = Date.now()) {
2411
+ function on(e, t, n = Date.now()) {
2405
2412
  let r = Math.round((e - n) / 1e3), i = new Intl.RelativeTimeFormat(t, {
2406
2413
  numeric: "auto",
2407
2414
  style: "short"
@@ -2413,7 +2420,7 @@ function an(e, t, n = Date.now()) {
2413
2420
  ]) if (Math.abs(r) >= t) return i.format(Math.round(r / t), e);
2414
2421
  return i.format(0, "minute");
2415
2422
  }
2416
- function on({ card: e }) {
2423
+ function sn({ card: e }) {
2417
2424
  let t = Q();
2418
2425
  return e.humanSummaryOnly ? /* @__PURE__ */ P("div", {
2419
2426
  className: "space-y-2 rounded-lg border border-border/60 p-3",
@@ -2469,7 +2476,7 @@ function on({ card: e }) {
2469
2476
  ]
2470
2477
  });
2471
2478
  }
2472
- function sn({ messages: e }) {
2479
+ function cn({ messages: e }) {
2473
2480
  return /* @__PURE__ */ N("div", {
2474
2481
  className: "space-y-2 rounded-lg border border-border/60 p-3",
2475
2482
  children: e.map((e, t) => /* @__PURE__ */ N("p", {
@@ -2478,10 +2485,10 @@ function sn({ messages: e }) {
2478
2485
  }, t))
2479
2486
  });
2480
2487
  }
2481
- function cn({ scopeId: e, currentTaskId: n, open: r, onOpenChange: i, onSelect: a, onNewChat: o, onArchivedCurrent: s }) {
2488
+ function ln({ scopeId: e, currentTaskId: n, open: r, onOpenChange: i, onSelect: a, onNewChat: o, onArchivedCurrent: s }) {
2482
2489
  let u = Q(), { locale: f } = S(), [p, m] = j(""), [h, g] = j(0);
2483
2490
  D(() => Ee(() => g((e) => e + 1)), []);
2484
- let _ = k(() => r ? Ie(e) : [], [
2491
+ let _ = k(() => r ? Le(e) : [], [
2485
2492
  e,
2486
2493
  r,
2487
2494
  h
@@ -2493,13 +2500,13 @@ function cn({ scopeId: e, currentTaskId: n, open: r, onOpenChange: i, onSelect:
2493
2500
  } catch {
2494
2501
  return;
2495
2502
  }
2496
- Fe(e, t.subagentId, t.entityId), n === Le(t.subagentId, t.entityId) && s(), g((e) => e + 1);
2503
+ Ie(e, t.subagentId, t.entityId), n === Re(t.subagentId, t.entityId) && s(), g((e) => e + 1);
2497
2504
  }
2498
2505
  }, x = k(() => {
2499
2506
  let e = p.trim().toLowerCase();
2500
2507
  return e ? _.filter((t) => {
2501
2508
  let n = H(t.subagentId)?.label ?? t.subagentId;
2502
- return je(t).toLowerCase().includes(e) || n.toLowerCase().includes(e);
2509
+ return Me(t).toLowerCase().includes(e) || n.toLowerCase().includes(e);
2503
2510
  }) : _;
2504
2511
  }, [_, p]);
2505
2512
  return /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(c, {
@@ -2542,10 +2549,10 @@ function cn({ scopeId: e, currentTaskId: n, open: r, onOpenChange: i, onSelect:
2542
2549
  className: "px-2 py-3 text-center text-xs text-muted-foreground",
2543
2550
  children: _.length === 0 ? u.noSavedChats : u.noResults
2544
2551
  }) : x.map((e) => {
2545
- let t = H(e.subagentId), r = n === Le(e.subagentId, e.entityId);
2552
+ let t = H(e.subagentId), r = n === Re(e.subagentId, e.entityId);
2546
2553
  return /* @__PURE__ */ N(l, {
2547
2554
  icon: r ? "check" : t?.icon ?? "bot",
2548
- className: r ? "bg-accent font-medium" : void 0,
2555
+ className: r ? "bg-accent font-semibold text-primary" : void 0,
2549
2556
  actions: [{
2550
2557
  icon: "pencil",
2551
2558
  label: u.renameChat,
@@ -2560,33 +2567,27 @@ function cn({ scopeId: e, currentTaskId: n, open: r, onOpenChange: i, onSelect:
2560
2567
  onClick: () => a(e.subagentId, e.entityId, e),
2561
2568
  children: /* @__PURE__ */ P("span", {
2562
2569
  className: "flex min-w-0 flex-1 items-center justify-between gap-2",
2563
- children: [/* @__PURE__ */ P("span", {
2570
+ children: [/* @__PURE__ */ N("span", {
2564
2571
  className: "min-w-0 truncate",
2565
- children: [
2566
- /* @__PURE__ */ N("span", {
2567
- className: "text-muted-foreground",
2568
- children: t?.label ?? e.subagentId
2569
- }),
2570
- " · ",
2571
- je(e)
2572
- ]
2572
+ title: `${t?.label ?? e.subagentId} · ${Me(e)}`,
2573
+ children: Me(e)
2573
2574
  }), /* @__PURE__ */ N("span", {
2574
2575
  className: "shrink-0 text-xs text-muted-foreground",
2575
- title: `${u.chatStarted.replace("{at}", new Date(Pe(e)).toLocaleString(f))} · ${u.chatLastMessage.replace("{at}", new Date(e.savedAt).toLocaleString(f))}`,
2576
- children: an(Pe(e), f)
2576
+ title: `${u.chatStarted.replace("{at}", new Date(Fe(e)).toLocaleString(f))} · ${u.chatLastMessage.replace("{at}", new Date(e.savedAt).toLocaleString(f))}`,
2577
+ children: on(Fe(e), f)
2577
2578
  })]
2578
2579
  })
2579
2580
  }, `${e.subagentId}:${e.entityId}`);
2580
2581
  })
2581
- }), v && /* @__PURE__ */ N(rn, {
2582
+ }), v && /* @__PURE__ */ N(an, {
2582
2583
  chat: v,
2583
2584
  onClose: () => y(null)
2584
2585
  })] });
2585
2586
  }
2586
- function ln({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}) {
2587
+ function un({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}) {
2587
2588
  let { task: a, isOpen: o, pendingGoal: s, orchestratorRunId: c, pageContext: l, pageContextCard: u, anchoredUserMessages: d, pendingResume: f, resumeRunId: p, dismissForeignTask: m, resumeEntityChat: h, pendingManualEntry: g, manualEntryRunId: _, startManualEntry: v, pendingExtraDestinations: y, pendingResumeWithAI: b, resumeWithAIRunId: x, pendingStart: S, startRunId: C, scope: w } = $(), T = Q(), E = A(null), [O, k] = j(!1);
2588
- Jt(w?.id);
2589
- let F = ht({
2589
+ Yt(w?.id);
2590
+ let F = gt({
2590
2591
  defaultWidth: e,
2591
2592
  minWidth: n,
2592
2593
  maxWidth: r,
@@ -2598,7 +2599,7 @@ function ln({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}
2598
2599
  onAnswer: (e, t, n) => a.agent.answerQuestions(e, t, n).then((e) => {
2599
2600
  e && a.onApplied(e);
2600
2601
  })
2601
- } : void 0, W = U ? tt(I, U.canAnswer) : null, G = a?.id === "agentico-orchestrator" && a.scopedSubagentId ? H(a.scopedSubagentId) : void 0, K = G?.manualEntry ? G : null, q = A(!0);
2602
+ } : void 0, W = U ? nt(I, U.canAnswer) : null, G = a?.id === "agentico-orchestrator" && a.scopedSubagentId ? H(a.scopedSubagentId) : void 0, K = G?.manualEntry ? G : null, q = A(!0);
2602
2603
  D(() => {
2603
2604
  let e = E.current;
2604
2605
  if (!e) return;
@@ -2628,22 +2629,22 @@ function ln({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}
2628
2629
  });
2629
2630
  return n.observe(t), () => n.disconnect();
2630
2631
  }, [a?.id, o]);
2631
- let Y = s ? /* @__PURE__ */ N(Qt, { userGoal: s }, c) : null, re = f ? H(f.subagentId) : void 0, ie = f && re ? /* @__PURE__ */ N(Zt, {
2632
+ let Y = s ? /* @__PURE__ */ N($t, { userGoal: s }, c) : null, re = f ? H(f.subagentId) : void 0, ie = f && re ? /* @__PURE__ */ N(Qt, {
2632
2633
  manifest: re,
2633
2634
  params: f.snapshot.params,
2634
- taskId: Le(f.subagentId, f.entityId),
2635
+ taskId: Re(f.subagentId, f.entityId),
2635
2636
  resumeSeed: {
2636
2637
  history: f.snapshot.history,
2637
2638
  activity: f.snapshot.activity
2638
2639
  }
2639
- }, p) : null, X = g ? H(g.subagentId) : void 0, ae = g && X ? /* @__PURE__ */ N($t, {
2640
+ }, p) : null, X = g ? H(g.subagentId) : void 0, ae = g && X ? /* @__PURE__ */ N(en, {
2640
2641
  manifest: X,
2641
2642
  extraDestinations: g.extraDestinations
2642
- }, _) : null, oe = b ? H(b.subagentId) : void 0, se = b && oe ? /* @__PURE__ */ N(Zt, {
2643
+ }, _) : null, oe = b ? H(b.subagentId) : void 0, se = b && oe ? /* @__PURE__ */ N(Qt, {
2643
2644
  manifest: oe,
2644
2645
  params: b.params,
2645
2646
  extraDestinations: b.extraDestinations
2646
- }, x) : null, Z = S ? H(S.subagentId) : void 0, ce = S && Z ? /* @__PURE__ */ N(Zt, {
2647
+ }, x) : null, Z = S ? H(S.subagentId) : void 0, ce = S && Z ? /* @__PURE__ */ N(Qt, {
2647
2648
  manifest: Z,
2648
2649
  params: S.params,
2649
2650
  taskId: S.taskId,
@@ -2659,7 +2660,7 @@ function ln({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}
2659
2660
  style: { width: F.width },
2660
2661
  className: "relative flex h-full shrink-0 flex-col border-l border-border bg-background",
2661
2662
  children: [
2662
- /* @__PURE__ */ N(gt, {
2663
+ /* @__PURE__ */ N(_t, {
2663
2664
  width: F.width,
2664
2665
  min: F.min,
2665
2666
  max: F.max,
@@ -2674,7 +2675,7 @@ function ln({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}
2674
2675
  className: "min-w-0 flex-1 truncate text-lg font-semibold leading-tight",
2675
2676
  children: a ? a.title : "Agentico"
2676
2677
  }),
2677
- w && /* @__PURE__ */ N(cn, {
2678
+ w && /* @__PURE__ */ N(ln, {
2678
2679
  scopeId: w.id,
2679
2680
  currentTaskId: a?.id ?? null,
2680
2681
  open: O,
@@ -2683,7 +2684,7 @@ function ln({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}
2683
2684
  onSelect: (e, t, n) => h(e, t, n),
2684
2685
  onArchivedCurrent: m
2685
2686
  }),
2686
- /* @__PURE__ */ N(_t, {})
2687
+ /* @__PURE__ */ N(vt, {})
2687
2688
  ]
2688
2689
  }),
2689
2690
  /* @__PURE__ */ N("div", {
@@ -2697,7 +2698,7 @@ function ln({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}
2697
2698
  className: "text-xs text-muted-foreground",
2698
2699
  children: a.manualEntry.prompt
2699
2700
  }),
2700
- /* @__PURE__ */ N(at, {
2701
+ /* @__PURE__ */ N(ot, {
2701
2702
  activity: z,
2702
2703
  questions: U,
2703
2704
  docked: W,
@@ -2707,7 +2708,7 @@ function ln({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}
2707
2708
  className: "mt-3",
2708
2709
  children: a.panelExtra
2709
2710
  }),
2710
- B.length > 0 && /* @__PURE__ */ N(at, {
2711
+ B.length > 0 && /* @__PURE__ */ N(ot, {
2711
2712
  activity: B,
2712
2713
  questions: U,
2713
2714
  docked: W,
@@ -2745,7 +2746,7 @@ function ln({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}
2745
2746
  })
2746
2747
  ]
2747
2748
  })
2748
- ] }) : d.length > 0 ? /* @__PURE__ */ N(sn, { messages: d }) : u ? /* @__PURE__ */ N(on, { card: u }) : /* @__PURE__ */ N("p", {
2749
+ ] }) : d.length > 0 ? /* @__PURE__ */ N(cn, { messages: d }) : u ? /* @__PURE__ */ N(sn, { card: u }) : /* @__PURE__ */ N("p", {
2749
2750
  className: "text-xs text-muted-foreground",
2750
2751
  children: l ?? T.orchestratorStarterHint
2751
2752
  })
@@ -2761,7 +2762,7 @@ function ln({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}
2761
2762
  }),
2762
2763
  /* @__PURE__ */ N("div", {
2763
2764
  className: "min-h-0 overflow-y-auto px-4 py-3",
2764
- children: /* @__PURE__ */ N(nt, {
2765
+ children: /* @__PURE__ */ N(rt, {
2765
2766
  entry: W.entry,
2766
2767
  part: W.part,
2767
2768
  questions: U,
@@ -2783,7 +2784,7 @@ function ln({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}
2783
2784
  children: [a?.panelActions && /* @__PURE__ */ N("div", {
2784
2785
  className: "mb-2",
2785
2786
  children: a.panelActions
2786
- }), a ? /* @__PURE__ */ N(tn, { task: a }, a.id) : /* @__PURE__ */ N(nn, {})]
2787
+ }), a ? /* @__PURE__ */ N(nn, { task: a }, a.id) : /* @__PURE__ */ N(rn, {})]
2787
2788
  })
2788
2789
  ]
2789
2790
  })
@@ -2797,13 +2798,13 @@ function ln({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}
2797
2798
  }
2798
2799
  //#endregion
2799
2800
  //#region src/presentation/useAgenticoPageContext.ts
2800
- function un(e, t) {
2801
+ function dn(e, t) {
2801
2802
  let { setPageContext: n } = $(), r = A(crypto.randomUUID()).current;
2802
2803
  D(() => (n(r, e, t ?? null), () => n(r, null)), [e, t]);
2803
2804
  }
2804
2805
  //#endregion
2805
2806
  //#region src/presentation/useSubagentComponentContext.ts
2806
- function dn(e, t, n, r, i = !0, a) {
2807
+ function fn(e, t, n, r, i = !0, a) {
2807
2808
  let { registerComponentAnchor: o } = $(), s = A(crypto.randomUUID()).current, c = A(n);
2808
2809
  c.current = n, D(() => {
2809
2810
  if (i) return o(s, {
@@ -2822,6 +2823,6 @@ function dn(e, t, n, r, i = !0, a) {
2822
2823
  ]);
2823
2824
  }
2824
2825
  //#endregion
2825
- export { ct as AGENTICO_MAX_WIDTH, st as AGENTICO_MIN_WIDTH, ot as AGENTICO_WIDTH, lt as AGENTICO_WIDTH_STORAGE_KEY, ln as Agentico, We as AgenticoProvider, _t as AgenticoToggle, ee as DEFAULT_REASONING_PART_ID, F as DEFAULT_TEXT_PART_ID, ge as JSON_EXPORT_DESTINATION_ID, de as MICRO_PROMPT_REGISTRY, He as ORCHESTRATOR_TASK_ID, ue as SUMMARY_MICRO_PROMPT, Re as agenticoDe, ze as agenticoEn, Be as agenticoIt, J as agenticoPromptsEn, Y as agenticoPromptsIt, Ve as agenticoTranslations, fe as applyMicroPrompts, Me as chatHasPersonMessage, Pe as chatStartedAt, je as chatTitle, ie as configureAgenticoPrompts, Se as configureEntityChatStore, G as createCrossAgentTools, z as defineSubagent, Le as entityChatTaskId, pe as extractErrorMessage, me as extractJsonBlock, H as findSubagentManifest, R as formatQuestionAnswers, X as getAgenticoPrompts, be as getDestinationRegistry, ke as getEntityChat, Ut as getSubagentControls, V as getSubagentRegistry, Rt as getSubagentReport, _e as jsonExportDestination, Ie as listEntityChats, L as messagePartsText, Ee as onEntityChatsChange, W as registerCrossAgentTools, ye as registerDestinations, Ht as registerSubagentControls, Lt as registerSubagentReports, te as registerSubagents, Fe as removeEntityChat, Ne as renameEntityChat, le as renderRegistryCli, ce as renderSubagentCli, ae as resetAgenticoPrompts, Ae as saveEntityChat, K as toJsonSchema, q as toMcpTool, I as upsertMessagePart, Ot as useAgent, $ as useAgentico, Q as useAgenticoI18n, un as useAgenticoPageContext, dn as useSubagentComponentContext };
2826
+ export { lt as AGENTICO_MAX_WIDTH, ct as AGENTICO_MIN_WIDTH, st as AGENTICO_WIDTH, ut as AGENTICO_WIDTH_STORAGE_KEY, un as Agentico, Ge as AgenticoProvider, vt as AgenticoToggle, ee as DEFAULT_REASONING_PART_ID, F as DEFAULT_TEXT_PART_ID, ge as JSON_EXPORT_DESTINATION_ID, de as MICRO_PROMPT_REGISTRY, Ue as ORCHESTRATOR_TASK_ID, ue as SUMMARY_MICRO_PROMPT, ze as agenticoDe, Be as agenticoEn, Ve as agenticoIt, J as agenticoPromptsEn, Y as agenticoPromptsIt, He as agenticoTranslations, fe as applyMicroPrompts, Ne as chatHasPersonMessage, Fe as chatStartedAt, Me as chatTitle, ie as configureAgenticoPrompts, Se as configureEntityChatStore, G as createCrossAgentTools, z as defineSubagent, Re as entityChatTaskId, pe as extractErrorMessage, me as extractJsonBlock, H as findSubagentManifest, R as formatQuestionAnswers, X as getAgenticoPrompts, be as getDestinationRegistry, ke as getEntityChat, Wt as getSubagentControls, V as getSubagentRegistry, zt as getSubagentReport, _e as jsonExportDestination, Le as listEntityChats, L as messagePartsText, Ee as onEntityChatsChange, W as registerCrossAgentTools, ye as registerDestinations, Ut as registerSubagentControls, Rt as registerSubagentReports, te as registerSubagents, Ie as removeEntityChat, Pe as renameEntityChat, le as renderRegistryCli, ce as renderSubagentCli, ae as resetAgenticoPrompts, Ae as saveEntityChat, K as toJsonSchema, q as toMcpTool, I as upsertMessagePart, kt as useAgent, $ as useAgentico, Q as useAgenticoI18n, dn as useAgenticoPageContext, fn as useSubagentComponentContext };
2826
2827
 
2827
2828
  //# sourceMappingURL=index.mjs.map