@llmnative/agentico 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -108,7 +108,7 @@ var q = {
108
108
  "block requested above, never before it and never instead of it."
109
109
  ].join(" "),
110
110
  multipleCandidates: "Several subagents are candidates on this page — ask the user which one they mean if their message does not make it clear, before going on."
111
- }, J = {
111
+ }, ee = {
112
112
  orchestratorIntro: "Sei Agentico, l'orchestratore dei tool di questa applicazione. Il tuo compito è capire cosa vuole ottenere l'utente e, una volta raccolti tutti i parametri necessari, avviare il tool giusto tra quelli elencati sotto — non eseguirlo tu stesso \"a parole\", invocalo come strumento.",
113
113
  responseRules: [
114
114
  "PRIMA di chiedere qualunque parametro, controlla il \"Contesto pagina\" (se presente) qui sotto: se un parametro richiesto dal comando è già lì o si può dedurre da lì con ragionevole certezza (es. l'utente sta guardando lo storico di un tool specifico, o un'esecuzione passata con parametri simili), USALO direttamente — non chiederlo di nuovo all'utente. Chiedi solo i parametri che NON emergono in nessun modo dal contesto.",
@@ -136,26 +136,26 @@ var q = {
136
136
  "richiesto sopra, mai prima e mai al posto suo."
137
137
  ].join(" "),
138
138
  multipleCandidates: "Più subagent sono candidati su questa pagina — chiedi all'utente quale intende se non è chiaro dal suo messaggio, prima di procedere."
139
- }, Y = q;
140
- function ee(e) {
141
- Y = {
142
- ...Y,
139
+ }, J = q;
140
+ function te(e) {
141
+ J = {
142
+ ...J,
143
143
  ...e
144
144
  };
145
145
  }
146
- function X() {
147
- return Y;
146
+ function Y() {
147
+ return J;
148
148
  }
149
- function te() {
150
- Y = q;
149
+ function ne() {
150
+ J = q;
151
151
  }
152
152
  //#endregion
153
153
  //#region src/domain/cli/renderManifestCli.ts
154
- function ne(e, t) {
154
+ function re(e, t) {
155
155
  return `${e} ${t.map((e) => e.required ? `--${e.key} <${e.type}>` : `[--${e.key} <${e.type}>]`).join(" ")}`.trim();
156
156
  }
157
- function re(e, t) {
158
- let n = K(t), r = ne(t.name, n), i = n.map((e) => ` --${e.key} <${e.type}> (${e.required ? "required" : "optional"})${e.description ? ` — ${e.description}` : ""}`);
157
+ function ie(e, t) {
158
+ let n = K(t), r = re(t.name, n), i = n.map((e) => ` --${e.key} <${e.type}> (${e.required ? "required" : "optional"})${e.description ? ` — ${e.description}` : ""}`);
159
159
  return [
160
160
  `COMMAND: ${e} ${t.name}`,
161
161
  ` ${t.summary}`,
@@ -167,41 +167,41 @@ function re(e, t) {
167
167
  ...i,
168
168
  "",
169
169
  " OUTPUT",
170
- ie(t.describeOutput(), 4),
170
+ ae(t.describeOutput(), 4),
171
171
  (t.example, ""),
172
172
  t.example ? " EXAMPLE" : "",
173
173
  t.example ? ` ${t.example}` : ""
174
174
  ].filter((e) => e !== "").join("\n");
175
175
  }
176
- function ie(e, t) {
176
+ function ae(e, t) {
177
177
  let n = " ".repeat(t);
178
178
  return e.split("\n").map((e) => e && n + e).join("\n");
179
179
  }
180
- function ae(e) {
180
+ function oe(e) {
181
181
  return [
182
182
  "NAME",
183
183
  ` ${e.id} — ${e.label}`,
184
184
  "",
185
185
  "DESCRIPTION",
186
- ie(e.description, 2),
186
+ ae(e.description, 2),
187
187
  "",
188
- ...e.commands.map((t) => re(e.id, t))
188
+ ...e.commands.map((t) => ie(e.id, t))
189
189
  ].join("\n");
190
190
  }
191
- function oe(e) {
192
- return e.length === 0 ? X().noToolsAvailable : e.map((e) => `${e.id} [${e.commands.map((e) => e.name).join("|")}] — ${e.label}: ${e.commands.map((e) => e.summary).join(" / ")}`).join("\n");
191
+ function se(e) {
192
+ return e.length === 0 ? Y().noToolsAvailable : e.map((e) => `${e.id} [${e.commands.map((e) => e.name).join("|")}] — ${e.label}: ${e.commands.map((e) => e.summary).join(" / ")}`).join("\n");
193
193
  }
194
194
  //#endregion
195
195
  //#region src/domain/microPrompts.ts
196
- var se = {
196
+ var ce = {
197
197
  id: "closing-summary",
198
198
  get text() {
199
- return X().closingSummary;
199
+ return Y().closingSummary;
200
200
  }
201
- }, ce = { [se.id]: se };
202
- function le(e, t) {
201
+ }, le = { [ce.id]: ce };
202
+ function X(e, t) {
203
203
  if (!t || t.length === 0) return e;
204
- let n = t.map((e) => ce[e]?.text).filter((e) => !!e);
204
+ let n = t.map((e) => le[e]?.text).filter((e) => !!e);
205
205
  return n.length === 0 ? e : `${e}\n\n${n.join("\n")}`;
206
206
  }
207
207
  //#endregion
@@ -373,7 +373,11 @@ var De = (e, t) => `entitychat-${e}-${t}`, Oe = {
373
373
  continueWithoutAi: "Ohne AI fortfahren",
374
374
  resumeWithAi: "Mit AI fortsetzen",
375
375
  openPanel: "Agentenbereich öffnen",
376
- closePanel: "Agentenbereich schließen"
376
+ closePanel: "Agentenbereich schließen",
377
+ resizePanel: "Agent-Bereich in der Größe ändern",
378
+ resizePanelHint: "Ziehen zum Ändern der Größe, Doppelklick zum Zurücksetzen",
379
+ pendingQuestions: "Fragen des Agenten",
380
+ stop: "Stoppen"
377
381
  }, ke = {
378
382
  modelLabel: "Model",
379
383
  modelsLoading: "Loading…",
@@ -421,7 +425,11 @@ var De = (e, t) => `entitychat-${e}-${t}`, Oe = {
421
425
  continueWithoutAi: "Continue without AI",
422
426
  resumeWithAi: "Resume with AI",
423
427
  openPanel: "Open agent panel",
424
- closePanel: "Close agent panel"
428
+ closePanel: "Close agent panel",
429
+ resizePanel: "Resize the agent panel",
430
+ resizePanelHint: "Drag to resize, double-click to reset",
431
+ pendingQuestions: "Questions of the agent",
432
+ stop: "Stop"
425
433
  }, Ae = {
426
434
  modelLabel: "Modello",
427
435
  modelsLoading: "Caricamento…",
@@ -469,7 +477,11 @@ var De = (e, t) => `entitychat-${e}-${t}`, Oe = {
469
477
  continueWithoutAi: "Continua senza AI",
470
478
  resumeWithAi: "Riprendi con AI",
471
479
  openPanel: "Apri pannello agente",
472
- closePanel: "Chiudi pannello agente"
480
+ closePanel: "Chiudi pannello agente",
481
+ resizePanel: "Ridimensiona il pannello dell'agente",
482
+ resizePanelHint: "Trascina per ridimensionare, doppio clic per ripristinare",
483
+ pendingQuestions: "Domande dell'agente",
484
+ stop: "Ferma"
473
485
  }, je = {
474
486
  en: { agentico: ke },
475
487
  it: { agentico: Ae },
@@ -544,7 +556,7 @@ function Pe({ children: e, scope: t = null }) {
544
556
  if (V.length === 0) return null;
545
557
  if (V.length === 1) return V[0].agenticoHint;
546
558
  let e = V.map((e, t) => `${t + 1}. ${e.agenticoHint}`).join("\n");
547
- return `${X().multipleCandidates}\n\n${e}`;
559
+ return `${Y().multipleCandidates}\n\n${e}`;
548
560
  }, [V]) ?? P?.text ?? null, W = V.length > 0 ? null : P?.card ?? null, G = T(() => [...new Set(R.map((e) => e.subagentId))], [R]), K = G.length === 1 ? G[0] : G.length === 0 ? P?.card?.subagentId ?? null : null, q = x((e, t) => {
549
561
  u();
550
562
  let n = i.current;
@@ -554,7 +566,7 @@ function Pe({ children: e, scope: t = null }) {
554
566
  taskId: r.id,
555
567
  activity: [...r.precedingActivity ?? [], ...r.agent.activity]
556
568
  } : null), f(e), m(t?.extraDestinations), g(t?.attachments), v(t?.model), A(t?.scopedSubagentId), b(crypto.randomUUID());
557
- }, [u, K]), J = x((e, t, n, a, o, s) => {
569
+ }, [u, K]), ee = x((e, t, n, a, o, s) => {
558
570
  if (!n || !a) return;
559
571
  let c = i.current;
560
572
  if (!c || c.id !== n) return;
@@ -571,19 +583,19 @@ function Pe({ children: e, scope: t = null }) {
571
583
  ...e,
572
584
  savedToDisk: !0
573
585
  } : e));
574
- }, []), [Y, ee] = D(null), [te, ne] = D(null), re = x((e, t, n) => {
575
- u(), ee({
586
+ }, []), [J, te] = D(null), [ne, re] = D(null), ie = x((e, t, n) => {
587
+ u(), te({
576
588
  subagentId: e,
577
589
  entityId: t,
578
590
  snapshot: n
579
- }), ne(crypto.randomUUID());
580
- }, [u]), [ie, ae] = D(null), [oe, se] = D(null), ce = x((e, t) => {
581
- u(), c(Me), ae({
591
+ }), re(crypto.randomUUID());
592
+ }, [u]), [ae, oe] = D(null), [se, ce] = D(null), le = x((e, t) => {
593
+ u(), c(Me), oe({
582
594
  subagentId: e,
583
595
  extraDestinations: t
584
- }), se(crypto.randomUUID());
585
- }, [u, c]), [le, Z] = D(null), [ue, de] = D(null), fe = x((e, t, n) => {
586
- ae(null), Z({
596
+ }), ce(crypto.randomUUID());
597
+ }, [u, c]), [X, Z] = D(null), [ue, de] = D(null), fe = x((e, t, n) => {
598
+ oe(null), Z({
587
599
  subagentId: e,
588
600
  params: t,
589
601
  extraDestinations: n
@@ -620,15 +632,15 @@ function Pe({ children: e, scope: t = null }) {
620
632
  pendingModel: _,
621
633
  orchestratorRunId: y,
622
634
  pendingCarryOver: S,
623
- commitEntityChat: J,
624
- resumeEntityChat: re,
625
- pendingResume: Y,
626
- resumeRunId: te,
635
+ commitEntityChat: ee,
636
+ resumeEntityChat: ie,
637
+ pendingResume: J,
638
+ resumeRunId: ne,
627
639
  dismissForeignTask: ve,
628
- pendingManualEntry: ie,
629
- manualEntryRunId: oe,
630
- startManualEntry: ce,
631
- pendingResumeWithAI: le,
640
+ pendingManualEntry: ae,
641
+ manualEntryRunId: se,
642
+ startManualEntry: le,
643
+ pendingResumeWithAI: X,
632
644
  resumeWithAIRunId: ue,
633
645
  resumeWithAI: fe,
634
646
  startSubagent: _e,
@@ -657,15 +669,15 @@ function Pe({ children: e, scope: t = null }) {
657
669
  _,
658
670
  y,
659
671
  S,
672
+ ee,
673
+ ie,
660
674
  J,
661
- re,
662
- Y,
663
- te,
675
+ ne,
664
676
  ve,
665
- ie,
666
- oe,
667
- ce,
677
+ ae,
678
+ se,
668
679
  le,
680
+ X,
669
681
  ue,
670
682
  fe,
671
683
  _e,
@@ -786,21 +798,21 @@ function Be(e, t) {
786
798
  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;
787
799
  }
788
800
  var Ve = 96;
789
- function He({ entry: e }) {
790
- let t = E(null), [n, r] = D(!1), [i, a] = D(!1);
801
+ function He({ entry: e, pinned: t = !0 }) {
802
+ let n = E(null), [r, i] = D(!1), [a, o] = D(!1);
791
803
  w(() => {
792
- let e = t.current;
793
- e && a(e.scrollHeight > 97);
804
+ let e = n.current;
805
+ e && o(e.scrollHeight > 97);
794
806
  }, [e.detail, e.attachmentNames]);
795
- let o = i && !n;
807
+ let s = a && !r;
796
808
  return /* @__PURE__ */ k("div", {
797
- className: "sticky top-0 z-20 flex justify-end border-b border-border/40 bg-background py-1.5",
809
+ className: `${t ? "sticky top-0 z-20 border-b border-border/40" : ""} flex justify-end bg-background py-1.5`,
798
810
  children: /* @__PURE__ */ A("div", {
799
811
  className: "max-w-[85%] rounded-lg bg-primary/10 text-xs text-foreground",
800
812
  children: [/* @__PURE__ */ A("div", {
801
- ref: t,
802
- className: `space-y-1 px-2.5 pt-1.5 ${o ? "overflow-hidden" : ""}`,
803
- style: o ? { maxHeight: Ve } : void 0,
813
+ ref: n,
814
+ className: `space-y-1 px-2.5 pt-1.5 ${s ? "overflow-hidden" : ""}`,
815
+ style: s ? { maxHeight: Ve } : void 0,
804
816
  children: [e.attachmentNames && e.attachmentNames.length > 0 && /* @__PURE__ */ k("div", {
805
817
  className: "flex flex-wrap gap-1",
806
818
  children: e.attachmentNames.map((e, t) => /* @__PURE__ */ A("span", {
@@ -815,13 +827,13 @@ function He({ entry: e }) {
815
827
  })]
816
828
  }, t))
817
829
  }), /* @__PURE__ */ k(Re, { text: e.detail ?? "" })]
818
- }), i && /* @__PURE__ */ A("button", {
830
+ }), a && /* @__PURE__ */ A("button", {
819
831
  type: "button",
820
- onClick: () => r((e) => !e),
832
+ onClick: () => i((e) => !e),
821
833
  className: "relative flex w-full items-center justify-center rounded-b-lg py-1 text-muted-foreground hover:bg-primary/15",
822
- title: n ? "Comprimi" : "Espandi",
823
- children: [o && /* @__PURE__ */ k("div", { className: "pointer-events-none absolute inset-x-0 -top-4 h-4 bg-gradient-to-t from-primary/10 to-transparent" }), /* @__PURE__ */ k(u, {
824
- name: n ? "chevron-up" : "chevron-down",
834
+ title: r ? "Comprimi" : "Espandi",
835
+ children: [s && /* @__PURE__ */ k("div", { className: "pointer-events-none absolute inset-x-0 -top-4 h-4 bg-gradient-to-t from-primary/10 to-transparent" }), /* @__PURE__ */ k(u, {
836
+ name: r ? "chevron-up" : "chevron-down",
825
837
  size: 12
826
838
  })]
827
839
  })]
@@ -855,9 +867,29 @@ function We({ steps: e }) {
855
867
  }]
856
868
  });
857
869
  }
858
- function Ge({ entry: e, questions: t }) {
859
- let n = e.parts ?? [], o = [];
860
- for (let e of n) {
870
+ function Ge(e, t) {
871
+ let n = e.at(-1);
872
+ if (!n || n.kind !== "thinking" || !n.parts || n.status === "stopped" || n.status === "error") return null;
873
+ let r = [...n.parts].reverse().find((e) => e.type === "questions");
874
+ return !r || r.answers || !t(n.id) ? null : {
875
+ entry: n,
876
+ part: r
877
+ };
878
+ }
879
+ function Ke({ entry: e, part: t, questions: n, autoFocus: r, className: a }) {
880
+ let o = !!n?.canAnswer(e.id);
881
+ return /* @__PURE__ */ k(i, {
882
+ questions: t.questions,
883
+ ...t.answers ? { answers: t.answers } : {},
884
+ disabled: !t.answers && !o,
885
+ onSubmit: n && o ? (r) => n.onAnswer(e.id, t.id, r) : void 0,
886
+ autoFocus: r,
887
+ className: a ?? "text-xs"
888
+ });
889
+ }
890
+ function qe({ entry: e, questions: t, hiddenPartId: n }) {
891
+ let i = (e.parts ?? []).filter((e) => e.type !== "questions" || e.id !== n), o = [];
892
+ for (let e of i) {
861
893
  let t = o.at(-1);
862
894
  e.type === "tool" ? t && "steps" in t ? t.steps.push(e) : o.push({
863
895
  key: `tool-${e.id}`,
@@ -867,40 +899,38 @@ function Ge({ entry: e, questions: t }) {
867
899
  part: e
868
900
  });
869
901
  }
870
- let s = !!t?.canAnswer(e.id);
871
902
  return /* @__PURE__ */ k("div", {
872
903
  className: "space-y-2",
873
904
  children: o.map((n) => {
874
905
  if ("steps" in n) return /* @__PURE__ */ k(We, { steps: n.steps }, n.key);
875
- let { part: o } = n;
876
- return o.type === "text" ? o.text.trim() ? /* @__PURE__ */ k(r, {
877
- content: o.text,
878
- streaming: o.streaming,
906
+ let { part: i } = n;
907
+ return i.type === "text" ? i.text.trim() ? /* @__PURE__ */ k(r, {
908
+ content: i.text,
909
+ streaming: i.streaming,
879
910
  className: "break-words text-xs leading-relaxed text-foreground"
880
- }, n.key) : null : o.type === "reasoning" ? /* @__PURE__ */ k(a, {
881
- content: o.text,
882
- streaming: o.streaming,
883
- duration: o.duration,
911
+ }, n.key) : null : i.type === "reasoning" ? /* @__PURE__ */ k(a, {
912
+ content: i.text,
913
+ streaming: i.streaming,
914
+ duration: i.duration,
884
915
  className: "my-0"
885
- }, n.key) : /* @__PURE__ */ k(i, {
886
- questions: o.questions,
887
- ...o.answers ? { answers: o.answers } : {},
888
- disabled: !o.answers && !s,
889
- onSubmit: t && s ? (n) => t.onAnswer(e.id, o.id, n) : void 0,
890
- className: "text-xs"
916
+ }, n.key) : /* @__PURE__ */ k(Ke, {
917
+ entry: e,
918
+ part: i,
919
+ questions: t
891
920
  }, n.key);
892
921
  })
893
922
  });
894
923
  }
895
- function Ke({ entry: e, questions: t }) {
896
- let n = Q();
924
+ function Je({ entry: e, questions: t, hiddenPartId: n }) {
925
+ let i = Q();
897
926
  if (e.kind === "thinking" && e.parts) {
898
927
  let r = e.status === "error" || e.status === "stopped" || e.status === "running" && e.parts.length === 0;
899
928
  return /* @__PURE__ */ A("li", {
900
929
  className: "text-xs text-muted-foreground",
901
- children: [e.parts.length > 0 && /* @__PURE__ */ k(Ge, {
930
+ children: [e.parts.length > 0 && /* @__PURE__ */ k(qe, {
902
931
  entry: e,
903
- questions: t
932
+ questions: t,
933
+ hiddenPartId: n
904
934
  }), r && /* @__PURE__ */ A("div", {
905
935
  className: `flex items-start gap-1.5 ${e.parts.length > 0 ? "mt-1" : ""}`,
906
936
  children: [/* @__PURE__ */ k("span", {
@@ -908,12 +938,12 @@ function Ke({ entry: e, questions: t }) {
908
938
  children: /* @__PURE__ */ k(ze, { status: e.status })
909
939
  }), /* @__PURE__ */ k("span", {
910
940
  className: "min-w-0 flex-1 whitespace-pre-wrap break-words",
911
- children: Be(e, n)
941
+ children: Be(e, i)
912
942
  })]
913
943
  })]
914
944
  });
915
945
  }
916
- let i = e.kind === "thinking" && e.detail ? Ie(e.detail) : [], a = i.filter((e) => e.type === "code"), o = i.filter((e) => e.type === "text" && e.content.trim()), s = e.kind === "thinking" ? Be(e, n) : e.label;
946
+ let a = e.kind === "thinking" && e.detail ? Ie(e.detail) : [], o = a.filter((e) => e.type === "code"), s = a.filter((e) => e.type === "text" && e.content.trim()), c = e.kind === "thinking" ? Be(e, i) : e.label;
917
947
  return /* @__PURE__ */ A("li", {
918
948
  className: "text-xs text-muted-foreground",
919
949
  children: [
@@ -924,19 +954,19 @@ function Ke({ entry: e, questions: t }) {
924
954
  children: /* @__PURE__ */ k(ze, { status: e.status })
925
955
  }), /* @__PURE__ */ k("span", {
926
956
  className: "min-w-0 flex-1 whitespace-pre-wrap break-words",
927
- children: s
957
+ children: c
928
958
  })]
929
959
  }),
930
- a.length > 0 && /* @__PURE__ */ k("div", {
960
+ o.length > 0 && /* @__PURE__ */ k("div", {
931
961
  className: "mt-1 ml-[18px] space-y-1",
932
- children: a.map((e, t) => /* @__PURE__ */ k(Le, {
962
+ children: o.map((e, t) => /* @__PURE__ */ k(Le, {
933
963
  content: e.content,
934
964
  language: e.language
935
965
  }, t))
936
966
  }),
937
- o.length > 0 && /* @__PURE__ */ k("div", {
967
+ s.length > 0 && /* @__PURE__ */ k("div", {
938
968
  className: "mt-1 ml-[18px] space-y-2",
939
- children: o.map((e, t) => /* @__PURE__ */ k(r, {
969
+ children: s.map((e, t) => /* @__PURE__ */ k(r, {
940
970
  content: e.content.trim(),
941
971
  tone: "muted",
942
972
  className: "break-words text-xs leading-relaxed"
@@ -945,27 +975,137 @@ function Ke({ entry: e, questions: t }) {
945
975
  ]
946
976
  });
947
977
  }
948
- function qe({ activity: e, questions: t }) {
978
+ function Ye({ activity: e, questions: t, docked: n, pinUserMessages: r = !0 }) {
949
979
  if (e.length === 0) return null;
950
- let n = [];
951
- for (let t of e) t.kind === "user" || n.length === 0 ? n.push(t.kind === "user" ? {
980
+ let i = [];
981
+ for (let t of e) t.kind === "user" || i.length === 0 ? i.push(t.kind === "user" ? {
952
982
  user: t,
953
983
  entries: []
954
- } : { entries: [t] }) : n[n.length - 1].entries.push(t);
984
+ } : { entries: [t] }) : i[i.length - 1].entries.push(t);
955
985
  return /* @__PURE__ */ k("ul", {
956
986
  className: "space-y-0.5",
957
- children: n.map((e) => /* @__PURE__ */ A("li", { children: [e.user && /* @__PURE__ */ k(He, { entry: e.user }), e.entries.length > 0 && /* @__PURE__ */ k("ul", {
987
+ children: i.map((e) => /* @__PURE__ */ A("li", { children: [e.user && /* @__PURE__ */ k(He, {
988
+ entry: e.user,
989
+ pinned: r
990
+ }), e.entries.length > 0 && /* @__PURE__ */ k("ul", {
958
991
  className: "space-y-0.5",
959
- children: e.entries.map((e) => /* @__PURE__ */ k(Ke, {
992
+ children: e.entries.map((e) => /* @__PURE__ */ k(Je, {
960
993
  entry: e,
961
- questions: t
994
+ questions: t,
995
+ hiddenPartId: n?.entry.id === e.id ? n.part.id : void 0
962
996
  }, e.id))
963
997
  })] }, e.user?.id ?? e.entries[0]?.id))
964
998
  });
965
999
  }
966
1000
  //#endregion
1001
+ //#region src/presentation/panelWidth.ts
1002
+ var Xe = 420, Ze = 320, Qe = "60vw", $e = "agentico:panel-width";
1003
+ function et(e, t) {
1004
+ if (typeof e == "number") return e;
1005
+ let n = Number.parseFloat(e);
1006
+ return Number.isFinite(n) ? Math.round(n / 100 * t) : Infinity;
1007
+ }
1008
+ function tt(e, t, n) {
1009
+ return Math.round(Math.min(Math.max(e, t), Math.max(t, n)));
1010
+ }
1011
+ function nt() {
1012
+ try {
1013
+ let e = window.localStorage.getItem($e), t = e === null ? NaN : Number(e);
1014
+ return Number.isFinite(t) && t > 0 ? t : null;
1015
+ } catch {
1016
+ return null;
1017
+ }
1018
+ }
1019
+ function rt(e) {
1020
+ try {
1021
+ e === null ? window.localStorage.removeItem($e) : window.localStorage.setItem($e, String(e));
1022
+ } catch {}
1023
+ }
1024
+ function it() {
1025
+ return typeof window > "u" ? Infinity : window.innerWidth;
1026
+ }
1027
+ function at({ defaultWidth: e = 420, minWidth: t = 320, maxWidth: n = Qe, onWidthChange: r }) {
1028
+ let [i, a] = D(it), [o, s] = D(() => nt() ?? e);
1029
+ C(() => {
1030
+ if (typeof window > "u") return;
1031
+ let e = () => a(window.innerWidth);
1032
+ return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
1033
+ }, []);
1034
+ let c = t, l = Math.max(c, et(n, i)), u = tt(o, c, l);
1035
+ return C(() => {
1036
+ r?.(u);
1037
+ }, [u]), {
1038
+ width: u,
1039
+ min: c,
1040
+ max: l,
1041
+ set: x((e) => s(tt(e, c, l)), [c, l]),
1042
+ commit: x((e) => rt(tt(e, c, l)), [c, l]),
1043
+ reset: x(() => {
1044
+ s(e), rt(null);
1045
+ }, [e])
1046
+ };
1047
+ }
1048
+ //#endregion
1049
+ //#region src/presentation/AgenticoResizeHandle.tsx
1050
+ function ot({ width: e, min: t, max: n, onResize: r, onCommit: i, onReset: a }) {
1051
+ let o = Q(), s = E(null), [c, l] = D(!1), u = (e) => Math.round(Math.min(Math.max(e, t), Math.max(t, n))), d = (e) => {
1052
+ let t = s.current;
1053
+ if (t && t.pointerId === e.pointerId) {
1054
+ s.current = null, l(!1), document.body.style.removeProperty("cursor"), document.body.style.removeProperty("user-select");
1055
+ try {
1056
+ e.currentTarget.releasePointerCapture(e.pointerId);
1057
+ } catch {}
1058
+ i(t.last);
1059
+ }
1060
+ };
1061
+ return /* @__PURE__ */ k("div", {
1062
+ role: "separator",
1063
+ "aria-orientation": "vertical",
1064
+ "aria-label": o.resizePanel,
1065
+ "aria-valuenow": e,
1066
+ "aria-valuemin": t,
1067
+ "aria-valuemax": n,
1068
+ tabIndex: 0,
1069
+ title: o.resizePanelHint,
1070
+ "data-dragging": c || void 0,
1071
+ className: "group absolute inset-y-0 -left-1 z-30 flex w-2 cursor-col-resize touch-none select-none justify-center outline-none",
1072
+ onPointerDown: (t) => {
1073
+ if (t.button === 0) {
1074
+ t.preventDefault(), s.current = {
1075
+ pointerId: t.pointerId,
1076
+ startX: t.clientX,
1077
+ startWidth: e,
1078
+ last: e
1079
+ }, l(!0), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
1080
+ try {
1081
+ t.currentTarget.setPointerCapture(t.pointerId);
1082
+ } catch {}
1083
+ }
1084
+ },
1085
+ onPointerMove: (e) => {
1086
+ let t = s.current;
1087
+ t && t.pointerId === e.pointerId && (t.last = u(t.startWidth + (t.startX - e.clientX)), r(t.last));
1088
+ },
1089
+ onPointerUp: d,
1090
+ onPointerCancel: d,
1091
+ onLostPointerCapture: d,
1092
+ onDoubleClick: a,
1093
+ onKeyDown: (a) => {
1094
+ let o = a.shiftKey ? 64 : 16, s = null;
1095
+ if (a.key === "ArrowLeft" ? s = e + o : a.key === "ArrowRight" ? s = e - o : a.key === "Home" ? s = t : a.key === "End" && (s = n), s === null) return;
1096
+ a.preventDefault();
1097
+ let c = u(s);
1098
+ r(c), i(c);
1099
+ },
1100
+ children: /* @__PURE__ */ k("span", {
1101
+ "aria-hidden": !0,
1102
+ className: `h-full w-0.5 transition-colors ${c ? "bg-primary" : "bg-transparent group-hover:bg-primary/50 group-focus-visible:bg-primary"}`
1103
+ })
1104
+ });
1105
+ }
1106
+ //#endregion
967
1107
  //#region src/presentation/AgenticoToggle.tsx
968
- function Je({ className: e = "" }) {
1108
+ function st({ className: e = "" }) {
969
1109
  let { isOpen: n, toggleOpen: r, task: i } = $(), a = Q(), o = i?.agent.running ?? !1;
970
1110
  return /* @__PURE__ */ k(t, {
971
1111
  icon: "bot",
@@ -978,21 +1118,21 @@ function Je({ className: e = "" }) {
978
1118
  }
979
1119
  //#endregion
980
1120
  //#region src/presentation/useAIModelCatalog.ts
981
- var Ye = "llmnative-cms.selectedAIModel";
982
- function Xe() {
1121
+ var ct = "llmnative-cms.selectedAIModel";
1122
+ function lt() {
983
1123
  try {
984
- return localStorage.getItem(Ye) ?? "";
1124
+ return localStorage.getItem(ct) ?? "";
985
1125
  } catch {
986
1126
  return "";
987
1127
  }
988
1128
  }
989
- function Ze(e) {
1129
+ function ut(e) {
990
1130
  try {
991
- e ? localStorage.setItem(Ye, e) : localStorage.removeItem(Ye);
1131
+ e ? localStorage.setItem(ct, e) : localStorage.removeItem(ct);
992
1132
  } catch {}
993
1133
  }
994
- function Qe() {
995
- let e = _()?.registry ?? {}, t = Object.keys(e).length > 0, [n, r] = D({}), [i, a] = D(!1), [o, s] = D(Xe);
1134
+ function dt() {
1135
+ let e = _()?.registry ?? {}, t = Object.keys(e).length > 0, [n, r] = D({}), [i, a] = D(!1), [o, s] = D(lt);
996
1136
  return C(() => {
997
1137
  if (!t) {
998
1138
  r({});
@@ -1003,7 +1143,7 @@ function Qe() {
1003
1143
  if (n) return;
1004
1144
  r(e.modelsByProvider);
1005
1145
  let t = Object.values(e.modelsByProvider).flat();
1006
- s((e) => t.some((t) => t.id === e) ? e : (Ze(""), ""));
1146
+ s((e) => t.some((t) => t.id === e) ? e : (ut(""), ""));
1007
1147
  }).catch((e) => {
1008
1148
  console.error("useAIModelCatalog: getAIModelCatalog failed", e), n || r({});
1009
1149
  }).finally(() => {
@@ -1017,18 +1157,18 @@ function Qe() {
1017
1157
  modelsLoading: i,
1018
1158
  selectedModel: o,
1019
1159
  setSelectedModel: (e) => {
1020
- Ze(e), s(e);
1160
+ ut(e), s(e);
1021
1161
  }
1022
1162
  };
1023
1163
  }
1024
1164
  //#endregion
1025
1165
  //#region src/presentation/useAgent.ts
1026
- var $e = 20, et = 26e4;
1027
- function tt(e) {
1028
- return e.filter((e) => !d.isTextAttachment(e.mimeType) || e.base64.length <= et);
1166
+ var ft = 20, pt = 26e4;
1167
+ function mt(e) {
1168
+ return e.filter((e) => !d.isTextAttachment(e.mimeType) || e.base64.length <= pt);
1029
1169
  }
1030
- function nt(e, t = {}) {
1031
- let { defaultEnabled: n = !1 } = t, [r, i] = D(n), { hasProviders: a, modelsByProvider: o, modelsLoading: s, selectedModel: c, setSelectedModel: l } = Qe(), [u, f] = D(!1), [p, m] = D(null), [g, v] = D(!1), [y, b] = D([]), x = E([]), S = (e) => {
1170
+ function ht(e, t = {}) {
1171
+ let { defaultEnabled: n = !1 } = t, [r, i] = D(n), { hasProviders: a, modelsByProvider: o, modelsLoading: s, selectedModel: c, setSelectedModel: l } = dt(), [u, f] = D(!1), [p, m] = D(null), [g, v] = D(!1), [y, b] = D([]), x = E([]), S = (e) => {
1032
1172
  b((t) => {
1033
1173
  let n = typeof e == "function" ? e(t) : e;
1034
1174
  return x.current = n, n;
@@ -1039,9 +1179,9 @@ function nt(e, t = {}) {
1039
1179
  A.current?.abort();
1040
1180
  }, I = _()?.registry ?? {}, L = r && c ? h(c) : null, R = L ? I[L.provider] : null, z = e.executor, B = !!z, [V, H] = D([]), [U, G] = D(""), K = E(""), q = (e) => {
1041
1181
  K.current = e, G(e);
1042
- }, J = (e) => {
1182
+ }, ee = (e) => {
1043
1183
  H(z?.models?.(e) ?? []), q(z?.defaultModel?.(e) ?? "");
1044
- }, Y = async (e, t, n, r) => {
1184
+ }, J = async (e, t, n, r) => {
1045
1185
  let i = O.current;
1046
1186
  if (!i || !z) return m(T.current.noActiveSession), null;
1047
1187
  let a = new AbortController();
@@ -1163,7 +1303,7 @@ function nt(e, t = {}) {
1163
1303
  } finally {
1164
1304
  A.current = null;
1165
1305
  }
1166
- }, ee = async (e, t, n) => {
1306
+ }, te = async (e, t, n) => {
1167
1307
  let r = x.current.find((t) => t.id === e)?.parts?.find((e) => e.type === "questions" && e.id === t);
1168
1308
  if (!r || r.type !== "questions") throw m(T.current.noActiveSession), Error(T.current.noActiveSession);
1169
1309
  let i = () => S((r) => r.map((r) => r.id === e ? {
@@ -1178,7 +1318,7 @@ function nt(e, t = {}) {
1178
1318
  if (!B || !O.current) throw m(T.current.noActiveSession), Error(T.current.noActiveSession);
1179
1319
  k.current = !0, f(!0), m(null), i();
1180
1320
  try {
1181
- return await Y("", !1, void 0, {
1321
+ return await J("", !1, void 0, {
1182
1322
  id: t,
1183
1323
  answers: n,
1184
1324
  historyText: F(r.questions, n)
@@ -1186,13 +1326,13 @@ function nt(e, t = {}) {
1186
1326
  } finally {
1187
1327
  k.current = !1, f(!1);
1188
1328
  }
1189
- }, te = async (t, n, r) => {
1329
+ }, ne = async (t, n, r) => {
1190
1330
  let i = O.current;
1191
1331
  if (!i) return m(T.current.noActiveSession), null;
1192
1332
  let a = r ? h(r) : L, o = a ? I[a.provider] : null;
1193
1333
  if (!o || !a) return m(T.current.noProviderAvailable), null;
1194
1334
  n?.length && (i.attachmentsRef.current = [...i.attachmentsRef.current ?? [], ...n]);
1195
- let s = (n ?? []).filter((e) => d.isTextAttachment(e.mimeType)).map((e) => e.base64.length <= et ? `\n\n[File allegato: ${e.name}]\n${d.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(""), c = tt(n ?? []), l = i.tools.map((e) => ({
1335
+ let s = (n ?? []).filter((e) => d.isTextAttachment(e.mimeType)).map((e) => e.base64.length <= pt ? `\n\n[File allegato: ${e.name}]\n${d.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(""), c = mt(n ?? []), l = i.tools.map((e) => ({
1196
1336
  name: e.name,
1197
1337
  description: e.description,
1198
1338
  inputSchema: W(e.inputSchema)
@@ -1206,7 +1346,7 @@ function nt(e, t = {}) {
1206
1346
  } : i));
1207
1347
  try {
1208
1348
  let n = i.history, r = t;
1209
- for (let t = 0; t < $e; t++) {
1349
+ for (let t = 0; t < ft; t++) {
1210
1350
  let d = crypto.randomUUID();
1211
1351
  S((e) => [...e, {
1212
1352
  id: d,
@@ -1311,7 +1451,7 @@ function nt(e, t = {}) {
1311
1451
  let h;
1312
1452
  try {
1313
1453
  h = await o.complete({
1314
- prompt: le(X().stopCallingTools, e.microPromptIds),
1454
+ prompt: X(Y().stopCallingTools, e.microPromptIds),
1315
1455
  model: a.model,
1316
1456
  history: n,
1317
1457
  signal: f.signal,
@@ -1366,7 +1506,7 @@ function nt(e, t = {}) {
1366
1506
  history: [],
1367
1507
  logId: crypto.randomUUID(),
1368
1508
  attachmentsRef: a
1369
- }, B) return v(!0), J(t), await Y(n?.openingMessage ?? "", !0);
1509
+ }, B) return v(!0), ee(t), await J(n?.openingMessage ?? "", !0);
1370
1510
  let s = n?.model || void 0, c = s ? !!I[h(s)?.provider ?? ""] : !!R;
1371
1511
  if (!r || !c) {
1372
1512
  v(!1);
@@ -1379,8 +1519,8 @@ function nt(e, t = {}) {
1379
1519
  }]), n;
1380
1520
  }
1381
1521
  v(!0);
1382
- let l = n?.attachments?.length ? await Promise.all(n.attachments.map((e) => d.fileToAttachment(e))) : void 0, u = le(e.buildPrompt(t, i), e.microPromptIds);
1383
- return await te(u, l, s);
1522
+ let l = n?.attachments?.length ? await Promise.all(n.attachments.map((e) => d.fileToAttachment(e))) : void 0, u = X(e.buildPrompt(t, i), e.microPromptIds);
1523
+ return await ne(u, l, s);
1384
1524
  } catch (e) {
1385
1525
  return m(Z(e)), null;
1386
1526
  } finally {
@@ -1402,7 +1542,7 @@ function nt(e, t = {}) {
1402
1542
  history: n.history,
1403
1543
  logId: crypto.randomUUID(),
1404
1544
  attachmentsRef: a
1405
- }, B && J(t), v(B || r && !!R);
1545
+ }, B && ee(t), v(B || r && !!R);
1406
1546
  } catch (e) {
1407
1547
  m(Z(e));
1408
1548
  } finally {
@@ -1423,9 +1563,9 @@ function nt(e, t = {}) {
1423
1563
  ...n?.attachments?.length ? { attachmentNames: n.attachments.map((e) => e.name) } : {}
1424
1564
  }]);
1425
1565
  try {
1426
- if (B) return await Y(t, !1, n?.model || void 0);
1427
- let i = n?.attachments?.length ? await Promise.all(n.attachments.map((e) => d.fileToAttachment(e))) : void 0, a = le(e.buildFollowUpPrompt(t, r.params, r.context), e.microPromptIds);
1428
- return await te(a, i, n?.model || void 0);
1566
+ if (B) return await J(t, !1, n?.model || void 0);
1567
+ let i = n?.attachments?.length ? await Promise.all(n.attachments.map((e) => d.fileToAttachment(e))) : void 0, a = X(e.buildFollowUpPrompt(t, r.params, r.context), e.microPromptIds);
1568
+ return await ne(a, i, n?.model || void 0);
1429
1569
  } catch (e) {
1430
1570
  return m(Z(e)), null;
1431
1571
  } finally {
@@ -1449,28 +1589,28 @@ function nt(e, t = {}) {
1449
1589
  history: O.current.history,
1450
1590
  activity: y
1451
1591
  } : null,
1452
- answerQuestions: ee
1592
+ answerQuestions: te
1453
1593
  };
1454
1594
  }
1455
1595
  //#endregion
1456
1596
  //#region src/domain/orchestrator/prompt.ts
1457
- function rt() {
1458
- let e = X();
1597
+ function gt() {
1598
+ let e = Y();
1459
1599
  return [e.responseRulesHeading, ...e.responseRules.map((e) => `- ${e}`)].join("\n");
1460
1600
  }
1461
- function it(e, t, n) {
1462
- let r = X(), i = n ? `\n${r.pageContextHeading}\n${r.pageContextIntro}\n${n}\n` : "";
1601
+ function _t(e, t, n) {
1602
+ let r = Y(), i = n ? `\n${r.pageContextHeading}\n${r.pageContextIntro}\n${n}\n` : "";
1463
1603
  return `${r.orchestratorIntro}
1464
1604
 
1465
1605
  ${r.toolsHeading}
1466
1606
  ${t}
1467
1607
  ${i}
1468
- ${rt()}
1608
+ ${gt()}
1469
1609
 
1470
1610
  ${r.userRequestHeading}
1471
1611
  ${e}`;
1472
1612
  }
1473
- function at(e, t) {
1613
+ function vt(e, t) {
1474
1614
  return t ? {
1475
1615
  kind: "handoff",
1476
1616
  ...t
@@ -1481,27 +1621,27 @@ function at(e, t) {
1481
1621
  }
1482
1622
  //#endregion
1483
1623
  //#region src/domain/orchestrator/agenticoOrchestratorAgent.ts
1484
- function ot(e) {
1624
+ function yt(e) {
1485
1625
  return z().filter((t) => !t.onlyWhenAnchored || e === t.id);
1486
1626
  }
1487
- function st(e) {
1627
+ function bt(e) {
1488
1628
  return {
1489
1629
  buildContext(e) {
1490
1630
  return {
1491
- cliCatalog: oe(ot(e.scopedSubagentId)),
1631
+ cliCatalog: se(yt(e.scopedSubagentId)),
1492
1632
  handoff: { current: null },
1493
1633
  collected: {}
1494
1634
  };
1495
1635
  },
1496
1636
  buildPrompt({ userGoal: e, pageContext: t }, { cliCatalog: n }) {
1497
- return it(e, n, t);
1637
+ return _t(e, n, t);
1498
1638
  },
1499
1639
  buildFollowUpPrompt(e, t, { cliCatalog: n }) {
1500
- return `${e}\n\n${rt()}\n\n${X().toolsHeading}\n${n}`;
1640
+ return `${e}\n\n${gt()}\n\n${Y().toolsHeading}\n${n}`;
1501
1641
  },
1502
1642
  parseResponse(e, t, n) {
1503
1643
  let r = n.handoff.current;
1504
- return n.handoff.current = null, at(e, r);
1644
+ return n.handoff.current = null, vt(e, r);
1505
1645
  },
1506
1646
  fallback() {
1507
1647
  return {
@@ -1517,7 +1657,7 @@ function st(e) {
1517
1657
  attachmentsRef: r,
1518
1658
  collected: n.collected,
1519
1659
  proxyFetch: g
1520
- }), a = t.scopedSubagentId ? B(t.scopedSubagentId) : null, o = a ? i.filter((e) => (a.crossAgentToolIds ?? []).includes(e.name)) : i, s = ot(t.scopedSubagentId).flatMap((t) => t.commands.map((r) => ({
1660
+ }), a = t.scopedSubagentId ? B(t.scopedSubagentId) : null, o = a ? i.filter((e) => (a.crossAgentToolIds ?? []).includes(e.name)) : i, s = yt(t.scopedSubagentId).flatMap((t) => t.commands.map((r) => ({
1521
1661
  name: `${t.id}_${r.name}`,
1522
1662
  description: `${t.label}: ${r.summary}`,
1523
1663
  inputSchema: r.inputSchema,
@@ -1531,7 +1671,7 @@ function st(e) {
1531
1671
  params: i
1532
1672
  }, {
1533
1673
  status: "queued",
1534
- note: m(X().handoffQueued, { label: t.label })
1674
+ note: m(Y().handoffQueued, { label: t.label })
1535
1675
  };
1536
1676
  }
1537
1677
  })));
@@ -1541,12 +1681,12 @@ function st(e) {
1541
1681
  }
1542
1682
  //#endregion
1543
1683
  //#region src/presentation/deriveHistoryTitle.ts
1544
- function ct(e, t) {
1684
+ function xt(e, t) {
1545
1685
  return e.deriveHistoryTitle?.(t) ?? e.label;
1546
1686
  }
1547
1687
  //#endregion
1548
1688
  //#region src/presentation/ResultDestinationPicker.tsx
1549
- function lt({ manifest: e, result: t, meta: n, taskId: r, initiallyApplied: i, onApplied: a, extraDestinations: o }) {
1689
+ function St({ manifest: e, result: t, meta: n, taskId: r, initiallyApplied: i, onApplied: a, extraDestinations: o }) {
1550
1690
  let s = Q(), c = $(), l = c.scope, u = y(), [d, f] = D(null), [p, h] = D(new Set(i ?? [])), [g, _] = D(null), v = ge(), b = /* @__PURE__ */ new Map();
1551
1691
  e.destinationIds.forEach((e) => {
1552
1692
  let t = v[e];
@@ -1564,7 +1704,7 @@ function lt({ manifest: e, result: t, meta: n, taskId: r, initiallyApplied: i, o
1564
1704
  storageProvider: l?.storageProvider ?? null,
1565
1705
  proxyFetch: u
1566
1706
  }, n);
1567
- h((e) => new Set(e).add(i)), a?.(i), d?.id && c.commitEntityChat(e.id, d.id, r, l?.id, n, ct(e, n));
1707
+ h((e) => new Set(e).add(i)), a?.(i), d?.id && c.commitEntityChat(e.id, d.id, r, l?.id, n, xt(e, n));
1568
1708
  } catch (e) {
1569
1709
  _(e instanceof Error ? e.message : String(e));
1570
1710
  } finally {
@@ -1597,16 +1737,16 @@ function lt({ manifest: e, result: t, meta: n, taskId: r, initiallyApplied: i, o
1597
1737
  }
1598
1738
  //#endregion
1599
1739
  //#region src/presentation/reports/subagentReportRegistry.tsx
1600
- var ut = {};
1601
- function dt(e) {
1602
- Object.assign(ut, e);
1740
+ var Ct = {};
1741
+ function wt(e) {
1742
+ Object.assign(Ct, e);
1603
1743
  }
1604
- function ft(e) {
1605
- return ut[e];
1744
+ function Tt(e) {
1745
+ return Ct[e];
1606
1746
  }
1607
1747
  //#endregion
1608
1748
  //#region src/presentation/reports/GenericResultPreview.tsx
1609
- function pt({ result: e }) {
1749
+ function Et({ result: e }) {
1610
1750
  let [t, n] = D(!1);
1611
1751
  return /* @__PURE__ */ A("div", {
1612
1752
  className: `relative cursor-pointer rounded-md border border-border/60 ${t ? "max-h-80 overflow-y-auto" : "max-h-28 overflow-hidden"}`,
@@ -1623,7 +1763,7 @@ function pt({ result: e }) {
1623
1763
  }
1624
1764
  //#endregion
1625
1765
  //#region src/presentation/liveAnchorDestination.ts
1626
- function mt(e, t, n) {
1766
+ function Dt(e, t, n) {
1627
1767
  return e.length === 0 ? null : {
1628
1768
  id: "live-component",
1629
1769
  label: "Applica al componente aperto",
@@ -1634,18 +1774,18 @@ function mt(e, t, n) {
1634
1774
  }
1635
1775
  //#endregion
1636
1776
  //#region src/presentation/subagentControls.ts
1637
- var ht = {};
1638
- function gt(e) {
1639
- Object.assign(ht, e);
1777
+ var Ot = {};
1778
+ function kt(e) {
1779
+ Object.assign(Ot, e);
1640
1780
  }
1641
- function _t(e) {
1642
- return ht[e];
1781
+ function At(e) {
1782
+ return Ot[e];
1643
1783
  }
1644
1784
  //#endregion
1645
1785
  //#region src/presentation/SubagentRunner.tsx
1646
- var vt = () => ({});
1647
- function yt({ manifest: e, params: t, extraDestinations: n, precedingActivity: r, taskId: i, resumeSeed: a, model: o, openingMessage: s }) {
1648
- let c = nt(e.definition, { defaultEnabled: !0 }), l = $(), u = l.scope, d = y(), f = E(i ?? `subagent-${e.id}-${crypto.randomUUID()}`).current, [p, m] = D(null), [h, g] = D([]), [_, v] = D(null), b = ft(e.id), x = b?.kind === "selection" ? b : null, [S, w] = D(null), j = E(!1), M = E(0), N = E(null);
1786
+ var jt = () => ({});
1787
+ function Mt({ manifest: e, params: t, extraDestinations: n, precedingActivity: r, taskId: i, resumeSeed: a, model: o, openingMessage: s }) {
1788
+ let c = ht(e.definition, { defaultEnabled: !0 }), l = $(), u = l.scope, d = y(), f = E(i ?? `subagent-${e.id}-${crypto.randomUUID()}`).current, [p, m] = D(null), [h, g] = D([]), [_, v] = D(null), b = Tt(e.id), x = b?.kind === "selection" ? b : null, [S, w] = D(null), j = E(!1), M = E(0), N = E(null);
1649
1789
  p && p !== N.current && (N.current = p, M.current = (r?.length ?? 0) + c.activity.length);
1650
1790
  let P = E(!1), F = c.remote || !c.hasProviders || c.selectedModel !== "";
1651
1791
  C(() => {
@@ -1669,7 +1809,7 @@ function yt({ manifest: e, params: t, extraDestinations: n, precedingActivity: r
1669
1809
  ...t,
1670
1810
  pinnedEntityId: r
1671
1811
  }).then((n) => {
1672
- n?.id && l.commitEntityChat(e.id, n.id, f, u.id, t, ct(e, t));
1812
+ n?.id && l.commitEntityChat(e.id, n.id, f, u.id, t, xt(e, t));
1673
1813
  }).catch((e) => v(e instanceof Error ? e.message : String(e))));
1674
1814
  });
1675
1815
  }, [
@@ -1688,7 +1828,7 @@ function yt({ manifest: e, params: t, extraDestinations: n, precedingActivity: r
1688
1828
  p,
1689
1829
  x,
1690
1830
  S
1691
- ]), z = T(() => l.componentAnchors.filter((t) => t.subagentId === e.id && t.onResult), [l.componentAnchors, e.id]), B = T(() => mt(z, t, f), [
1831
+ ]), z = T(() => l.componentAnchors.filter((t) => t.subagentId === e.id && t.onResult), [l.componentAnchors, e.id]), B = T(() => Dt(z, t, f), [
1692
1832
  z,
1693
1833
  t,
1694
1834
  f
@@ -1702,14 +1842,14 @@ function yt({ manifest: e, params: t, extraDestinations: n, precedingActivity: r
1702
1842
  subagentId: e.id,
1703
1843
  entityId: H,
1704
1844
  params: t,
1705
- title: ct(e, t),
1845
+ title: xt(e, t),
1706
1846
  history: i.history,
1707
1847
  activity: [...r ?? [], ...i.activity]
1708
1848
  });
1709
1849
  }, [c.running]);
1710
1850
  let W = () => {
1711
1851
  P.current = !0, c.running && c.stop(), l.closeTask(f);
1712
- }, G = E(_t(e.id) ?? vt).current, K = G({
1852
+ }, G = E(At(e.id) ?? jt).current, K = G({
1713
1853
  params: t,
1714
1854
  taskId: f,
1715
1855
  running: c.running,
@@ -1720,7 +1860,7 @@ function yt({ manifest: e, params: t, extraDestinations: n, precedingActivity: r
1720
1860
  return C(() => {
1721
1861
  P.current || l.openTask({
1722
1862
  id: f,
1723
- title: ct(e, t),
1863
+ title: xt(e, t),
1724
1864
  icon: e.icon,
1725
1865
  agent: c,
1726
1866
  onApplied: (e) => m(e),
@@ -1738,12 +1878,12 @@ function yt({ manifest: e, params: t, extraDestinations: n, precedingActivity: r
1738
1878
  }) : b?.kind === "editable" ? /* @__PURE__ */ k(b.Report, {
1739
1879
  result: p,
1740
1880
  onResultChange: L
1741
- }) : /* @__PURE__ */ k(pt, { result: R }),
1881
+ }) : /* @__PURE__ */ k(Et, { result: R }),
1742
1882
  _ && /* @__PURE__ */ A("p", {
1743
1883
  className: "text-xs text-destructive",
1744
1884
  children: ["Salvataggio automatico non riuscito: ", _]
1745
1885
  }),
1746
- /* @__PURE__ */ k(lt, {
1886
+ /* @__PURE__ */ k(St, {
1747
1887
  manifest: e,
1748
1888
  result: R,
1749
1889
  meta: t,
@@ -1783,8 +1923,8 @@ function yt({ manifest: e, params: t, extraDestinations: n, precedingActivity: r
1783
1923
  }
1784
1924
  //#endregion
1785
1925
  //#region src/presentation/OrchestratorRunner.tsx
1786
- function bt({ userGoal: e }) {
1787
- let t = Q(), n = nt(T(() => st({
1926
+ function Nt({ userGoal: e }) {
1927
+ let t = Q(), n = ht(T(() => bt({
1788
1928
  unavailable: t.orchestratorUnavailable,
1789
1929
  continueWithoutAi: t.orchestratorContinueWithoutAi,
1790
1930
  preparing: t.orchestratorPreparing,
@@ -1832,7 +1972,7 @@ function bt({ userGoal: e }) {
1832
1972
  let h = T(() => [...f.current?.activity ?? [], ...n.activity], [n.activity]);
1833
1973
  if (!i) return null;
1834
1974
  let g = B(i.subagentId);
1835
- return g ? /* @__PURE__ */ k(yt, {
1975
+ return g ? /* @__PURE__ */ k(Mt, {
1836
1976
  manifest: g,
1837
1977
  params: i.params,
1838
1978
  extraDestinations: c.current,
@@ -1843,8 +1983,8 @@ function bt({ userGoal: e }) {
1843
1983
  }
1844
1984
  //#endregion
1845
1985
  //#region src/presentation/ManualEntryRunner.tsx
1846
- function xt({ manifest: e, extraDestinations: n }) {
1847
- let r = nt(e.definition, { defaultEnabled: !1 }), i = Q(), a = $(), o = E(`manual-${e.id}-${crypto.randomUUID()}`).current, [s, c] = D(null), [l, u] = D([]), d = ft(e.id), f = d?.kind === "selection" ? d : null, [p, m] = D(null), [h, g] = D(null), _ = E(!1), v = (t) => {
1986
+ function Pt({ manifest: e, extraDestinations: n }) {
1987
+ let r = ht(e.definition, { defaultEnabled: !1 }), i = Q(), a = $(), o = E(`manual-${e.id}-${crypto.randomUUID()}`).current, [s, c] = D(null), [l, u] = D([]), d = Tt(e.id), f = d?.kind === "selection" ? d : null, [p, m] = D(null), [h, g] = D(null), _ = E(!1), v = (t) => {
1848
1988
  if (!e.manualEntry) return;
1849
1989
  let n;
1850
1990
  try {
@@ -1871,7 +2011,7 @@ function xt({ manifest: e, extraDestinations: n }) {
1871
2011
  p
1872
2012
  ]), S = (e) => {
1873
2013
  u((t) => t.includes(e) ? t : [...t, e]);
1874
- }, w = T(() => a.componentAnchors.filter((t) => t.subagentId === e.id && t.onResult), [a.componentAnchors, e.id]), O = T(() => h ? mt(w, h, o) : null, [
2014
+ }, w = T(() => a.componentAnchors.filter((t) => t.subagentId === e.id && t.onResult), [a.componentAnchors, e.id]), O = T(() => h ? Dt(w, h, o) : null, [
1875
2015
  w,
1876
2016
  h,
1877
2017
  o
@@ -1900,8 +2040,8 @@ function xt({ manifest: e, extraDestinations: n }) {
1900
2040
  }) : d?.kind === "editable" ? /* @__PURE__ */ k(d.Report, {
1901
2041
  result: s,
1902
2042
  onResultChange: b
1903
- }) : /* @__PURE__ */ k(pt, { result: x }),
1904
- /* @__PURE__ */ k(lt, {
2043
+ }) : /* @__PURE__ */ k(Et, { result: x }),
2044
+ /* @__PURE__ */ k(St, {
1905
2045
  manifest: e,
1906
2046
  result: x,
1907
2047
  meta: h ?? {},
@@ -1938,8 +2078,7 @@ function xt({ manifest: e, extraDestinations: n }) {
1938
2078
  }
1939
2079
  //#endregion
1940
2080
  //#region src/presentation/Agentico.tsx
1941
- var St = 420;
1942
- function Ct(e) {
2081
+ function Ft(e) {
1943
2082
  return Object.values(e).flat().map((e) => ({
1944
2083
  label: e.model,
1945
2084
  value: e.id,
@@ -1947,7 +2086,7 @@ function Ct(e) {
1947
2086
  group: e.providerLabel ?? e.provider
1948
2087
  }));
1949
2088
  }
1950
- function wt({ task: e }) {
2089
+ function It({ task: e }) {
1951
2090
  let t = Q(), [n, r] = D(""), { agent: i, onApplied: a, manualEntry: s } = e, c = i.running, l = (e) => {
1952
2091
  if (r(""), s) {
1953
2092
  s.onSubmit(e.text);
@@ -1959,7 +2098,7 @@ function wt({ task: e }) {
1959
2098
  }).then((e) => {
1960
2099
  e && a(e);
1961
2100
  });
1962
- }, u = !!s || i.remote && i.remoteModels.length === 0, d = !u && !i.remote && i.hasProviders && !i.selectedModel, f = u ? [] : i.remote ? i.remoteModels : Ct(i.modelsByProvider);
2101
+ }, u = !!s || i.remote && i.remoteModels.length === 0, d = !u && !i.remote && i.hasProviders && !i.selectedModel, f = u ? [] : i.remote ? i.remoteModels : Ft(i.modelsByProvider);
1963
2102
  return /* @__PURE__ */ k(o, {
1964
2103
  value: n,
1965
2104
  onChange: r,
@@ -1978,8 +2117,8 @@ function wt({ task: e }) {
1978
2117
  maxHeight: 220
1979
2118
  });
1980
2119
  }
1981
- function Tt() {
1982
- let { startOrchestrator: e } = $(), t = Q(), [n, r] = D(""), { hasProviders: i, modelsByProvider: a, selectedModel: s, setSelectedModel: c } = Qe(), l = (t) => {
2120
+ function Lt() {
2121
+ let { startOrchestrator: e } = $(), t = Q(), [n, r] = D(""), { hasProviders: i, modelsByProvider: a, selectedModel: s, setSelectedModel: c } = dt(), l = (t) => {
1983
2122
  t.text.trim() && (e(t.text.trim(), {
1984
2123
  attachments: t.files.length > 0 ? t.files : void 0,
1985
2124
  model: t.model || void 0
@@ -1992,7 +2131,7 @@ function Tt() {
1992
2131
  disabled: !n.trim() || u,
1993
2132
  onSubmit: l,
1994
2133
  attachments: !0,
1995
- models: Ct(a),
2134
+ models: Ft(a),
1996
2135
  selectedModel: s,
1997
2136
  onModelChange: c,
1998
2137
  modelPlaceholder: t.selectModelPlaceholder,
@@ -2000,7 +2139,7 @@ function Tt() {
2000
2139
  maxHeight: 220
2001
2140
  });
2002
2141
  }
2003
- function Et(e, t, n = Date.now()) {
2142
+ function Rt(e, t, n = Date.now()) {
2004
2143
  let r = Math.round((e - n) / 1e3), i = new Intl.RelativeTimeFormat(t, {
2005
2144
  numeric: "auto",
2006
2145
  style: "short"
@@ -2012,7 +2151,7 @@ function Et(e, t, n = Date.now()) {
2012
2151
  ]) if (Math.abs(r) >= t) return i.format(Math.round(r / t), e);
2013
2152
  return i.format(0, "minute");
2014
2153
  }
2015
- function Dt({ card: e }) {
2154
+ function zt({ card: e }) {
2016
2155
  let t = Q();
2017
2156
  return e.humanSummaryOnly ? /* @__PURE__ */ A("div", {
2018
2157
  className: "space-y-2 rounded-lg border border-border/60 p-3",
@@ -2068,7 +2207,7 @@ function Dt({ card: e }) {
2068
2207
  ]
2069
2208
  });
2070
2209
  }
2071
- function Ot({ messages: e }) {
2210
+ function Bt({ messages: e }) {
2072
2211
  return /* @__PURE__ */ k("div", {
2073
2212
  className: "space-y-2 rounded-lg border border-border/60 p-3",
2074
2213
  children: e.map((e, t) => /* @__PURE__ */ k("p", {
@@ -2077,7 +2216,7 @@ function Ot({ messages: e }) {
2077
2216
  }, t))
2078
2217
  });
2079
2218
  }
2080
- function kt({ scopeId: e, currentTaskId: n, open: r, onOpenChange: i, onSelect: a, onNewChat: o, onArchivedCurrent: s }) {
2219
+ function Vt({ scopeId: e, currentTaskId: n, open: r, onOpenChange: i, onSelect: a, onNewChat: o, onArchivedCurrent: s }) {
2081
2220
  let d = Q(), { locale: f } = v(), [p, m] = D(""), [h, g] = D(0), _ = T(() => r ? Ee(e) : [], [
2082
2221
  e,
2083
2222
  r,
@@ -2164,188 +2303,232 @@ function kt({ scopeId: e, currentTaskId: n, open: r, onOpenChange: i, onSelect:
2164
2303
  }), /* @__PURE__ */ k("span", {
2165
2304
  className: "shrink-0 text-xs text-muted-foreground",
2166
2305
  title: new Date(e.savedAt).toLocaleString(f),
2167
- children: Et(e.savedAt, f)
2306
+ children: Rt(e.savedAt, f)
2168
2307
  })]
2169
2308
  })
2170
2309
  }, `${e.subagentId}:${e.entityId}`);
2171
2310
  })
2172
2311
  });
2173
2312
  }
2174
- function At() {
2175
- let { task: e, isOpen: n, pendingGoal: r, orchestratorRunId: i, pageContext: a, pageContextCard: o, anchoredUserMessages: s, pendingResume: c, resumeRunId: l, dismissForeignTask: u, resumeEntityChat: d, pendingManualEntry: f, manualEntryRunId: p, startManualEntry: m, pendingExtraDestinations: h, pendingResumeWithAI: g, resumeWithAIRunId: _, pendingStart: v, startRunId: y, scope: b } = $(), x = Q(), S = E(null), [w, T] = D(!1), j = () => {
2176
- (!e || e.agent.running || e.savedToDisk || window.confirm(x.unsavedConversationConfirm)) && (u(), T(!1));
2177
- }, M = e ? [...e.precedingActivity ?? [], ...e.agent.activity] : [], N = M.length, P = Math.max(0, Math.min(e?.panelExtraAnchorIndex ?? N, N)), F = M.slice(0, P), I = M.slice(P), L = !!(e && !e.agent.running && e.agent.error), R = new Set(e?.agent.activity.map((e) => e.id) ?? []), z = e ? {
2178
- canAnswer: (e) => R.has(e),
2179
- onAnswer: (t, n, r) => e.agent.answerQuestions(t, n, r).then((t) => {
2180
- t && e.onApplied(t);
2313
+ function Ht({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}) {
2314
+ 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: w, scope: T } = $(), j = Q(), M = E(null), [N, P] = D(!1), F = at({
2315
+ defaultWidth: e,
2316
+ minWidth: n,
2317
+ maxWidth: r,
2318
+ onWidthChange: i
2319
+ }), I = () => {
2320
+ (!a || a.agent.running || a.savedToDisk || window.confirm(j.unsavedConversationConfirm)) && (m(), P(!1));
2321
+ }, L = a ? [...a.precedingActivity ?? [], ...a.agent.activity] : [], R = L.length, z = Math.max(0, Math.min(a?.panelExtraAnchorIndex ?? R, R)), V = L.slice(0, z), H = L.slice(z), U = !!(a && !a.agent.running && a.agent.error), W = new Set(a?.agent.activity.map((e) => e.id) ?? []), G = a ? {
2322
+ canAnswer: (e) => W.has(e),
2323
+ onAnswer: (e, t, n) => a.agent.answerQuestions(e, t, n).then((e) => {
2324
+ e && a.onApplied(e);
2181
2325
  })
2182
- } : void 0, V = e?.id === "agentico-orchestrator" && e.scopedSubagentId ? B(e.scopedSubagentId) : void 0, H = V?.manualEntry ? V : null, U = E(!0);
2326
+ } : void 0, K = G ? Ge(L, G.canAnswer) : null, q = a?.id === "agentico-orchestrator" && a.scopedSubagentId ? B(a.scopedSubagentId) : void 0, ee = q?.manualEntry ? q : null, J = E(!0);
2183
2327
  C(() => {
2184
- let e = S.current;
2328
+ let e = M.current;
2185
2329
  if (!e) return;
2186
2330
  let t = () => {
2187
- U.current = e.scrollHeight - e.scrollTop - e.clientHeight < 80;
2331
+ J.current = e.scrollHeight - e.scrollTop - e.clientHeight < 80;
2188
2332
  };
2189
2333
  return e.addEventListener("scroll", t), () => e.removeEventListener("scroll", t);
2190
- }, [e?.id]), C(() => {
2191
- let e = S.current;
2192
- e && (U.current = !0, e.scrollTop = e.scrollHeight);
2193
- }, [e?.id]);
2194
- let W = M.at(-1)?.detail?.length ?? 0;
2334
+ }, [a?.id]), C(() => {
2335
+ let e = M.current;
2336
+ e && (J.current = !0, e.scrollTop = e.scrollHeight);
2337
+ }, [a?.id]);
2338
+ let te = L.at(-1)?.detail?.length ?? 0;
2195
2339
  C(() => {
2196
- let e = S.current;
2197
- e && U.current && (e.scrollTop = e.scrollHeight);
2340
+ let e = M.current;
2341
+ e && J.current && (e.scrollTop = e.scrollHeight);
2198
2342
  }, [
2199
- N,
2200
- L,
2201
- W
2343
+ R,
2344
+ U,
2345
+ te
2202
2346
  ]);
2203
- let G = E(null);
2347
+ let Y = E(null);
2204
2348
  C(() => {
2205
- let e = S.current, t = G.current;
2349
+ let e = M.current, t = Y.current;
2206
2350
  if (!e || !t || typeof ResizeObserver > "u") return;
2207
2351
  let n = new ResizeObserver(() => {
2208
- U.current && (e.scrollTop = e.scrollHeight);
2352
+ J.current && (e.scrollTop = e.scrollHeight);
2209
2353
  });
2210
2354
  return n.observe(t), () => n.disconnect();
2211
- }, [e?.id, n]);
2212
- let K = r ? /* @__PURE__ */ k(bt, { userGoal: r }, i) : null, q = c ? B(c.subagentId) : void 0, J = c && q ? /* @__PURE__ */ k(yt, {
2213
- manifest: q,
2214
- params: c.snapshot.params,
2215
- taskId: De(c.subagentId, c.entityId),
2355
+ }, [a?.id, o]);
2356
+ let ne = s ? /* @__PURE__ */ k(Nt, { userGoal: s }, c) : null, re = f ? B(f.subagentId) : void 0, ie = f && re ? /* @__PURE__ */ k(Mt, {
2357
+ manifest: re,
2358
+ params: f.snapshot.params,
2359
+ taskId: De(f.subagentId, f.entityId),
2216
2360
  resumeSeed: {
2217
- history: c.snapshot.history,
2218
- activity: c.snapshot.activity
2361
+ history: f.snapshot.history,
2362
+ activity: f.snapshot.activity
2219
2363
  }
2220
- }, l) : null, Y = f ? B(f.subagentId) : void 0, ee = f && Y ? /* @__PURE__ */ k(xt, {
2221
- manifest: Y,
2222
- extraDestinations: f.extraDestinations
2223
- }, p) : null, X = g ? B(g.subagentId) : void 0, te = g && X ? /* @__PURE__ */ k(yt, {
2224
- manifest: X,
2225
- params: g.params,
2364
+ }, p) : null, ae = g ? B(g.subagentId) : void 0, oe = g && ae ? /* @__PURE__ */ k(Pt, {
2365
+ manifest: ae,
2226
2366
  extraDestinations: g.extraDestinations
2227
- }, _) : null, ne = v ? B(v.subagentId) : void 0, re = v && ne ? /* @__PURE__ */ k(yt, {
2228
- manifest: ne,
2229
- params: v.params,
2230
- taskId: v.taskId,
2231
- openingMessage: v.openingMessage
2232
- }, y) : null;
2233
- return n ? /* @__PURE__ */ A(O, { children: [
2234
- K,
2235
- J,
2236
- ee,
2237
- te,
2238
- re,
2367
+ }, _) : null, se = b ? B(b.subagentId) : void 0, ce = b && se ? /* @__PURE__ */ k(Mt, {
2368
+ manifest: se,
2369
+ params: b.params,
2370
+ extraDestinations: b.extraDestinations
2371
+ }, x) : null, le = S ? B(S.subagentId) : void 0, X = S && le ? /* @__PURE__ */ k(Mt, {
2372
+ manifest: le,
2373
+ params: S.params,
2374
+ taskId: S.taskId,
2375
+ openingMessage: S.openingMessage
2376
+ }, w) : null;
2377
+ return o ? /* @__PURE__ */ A(O, { children: [
2378
+ ne,
2379
+ ie,
2380
+ oe,
2381
+ ce,
2382
+ X,
2239
2383
  /* @__PURE__ */ A("div", {
2240
- style: { width: 420 },
2384
+ style: { width: F.width },
2241
2385
  className: "relative flex h-full shrink-0 flex-col border-l border-border bg-background",
2242
2386
  children: [
2387
+ /* @__PURE__ */ k(ot, {
2388
+ width: F.width,
2389
+ min: F.min,
2390
+ max: F.max,
2391
+ onResize: F.set,
2392
+ onCommit: F.commit,
2393
+ onReset: F.reset
2394
+ }),
2243
2395
  /* @__PURE__ */ A("div", {
2244
2396
  className: "flex min-h-[60px] items-center gap-1 border-b border-border/60 px-4 py-3",
2245
2397
  children: [
2246
2398
  /* @__PURE__ */ k("span", {
2247
2399
  className: "min-w-0 flex-1 truncate text-lg font-semibold leading-tight",
2248
- children: e ? e.title : "Agentico"
2400
+ children: a ? a.title : "Agentico"
2249
2401
  }),
2250
- b && /* @__PURE__ */ k(kt, {
2251
- scopeId: b.id,
2252
- currentTaskId: e?.id ?? null,
2253
- open: w,
2254
- onOpenChange: T,
2255
- onNewChat: j,
2256
- onSelect: (e, t, n) => d(e, t, n),
2257
- onArchivedCurrent: u
2402
+ T && /* @__PURE__ */ k(Vt, {
2403
+ scopeId: T.id,
2404
+ currentTaskId: a?.id ?? null,
2405
+ open: N,
2406
+ onOpenChange: P,
2407
+ onNewChat: I,
2408
+ onSelect: (e, t, n) => h(e, t, n),
2409
+ onArchivedCurrent: m
2258
2410
  }),
2259
- /* @__PURE__ */ k(Je, {})
2411
+ /* @__PURE__ */ k(st, {})
2260
2412
  ]
2261
2413
  }),
2262
2414
  /* @__PURE__ */ k("div", {
2263
- ref: S,
2264
- className: "flex-1 overflow-y-auto px-3 pb-2",
2415
+ ref: M,
2416
+ className: `flex-1 overflow-y-auto px-3 pb-2 ${K ? "min-h-24" : "min-h-0"}`,
2265
2417
  children: /* @__PURE__ */ k("div", {
2266
- ref: G,
2418
+ ref: Y,
2267
2419
  className: "pt-2",
2268
- children: e ? /* @__PURE__ */ A(O, { children: [
2269
- e.manualEntry && M.length === 0 && /* @__PURE__ */ k("p", {
2420
+ children: a ? /* @__PURE__ */ A(O, { children: [
2421
+ a.manualEntry && L.length === 0 && /* @__PURE__ */ k("p", {
2270
2422
  className: "text-xs text-muted-foreground",
2271
- children: e.manualEntry.prompt
2423
+ children: a.manualEntry.prompt
2272
2424
  }),
2273
- /* @__PURE__ */ k(qe, {
2274
- activity: F,
2275
- questions: z
2425
+ /* @__PURE__ */ k(Ye, {
2426
+ activity: V,
2427
+ questions: G,
2428
+ docked: K,
2429
+ pinUserMessages: !K
2276
2430
  }),
2277
- e.panelExtra && /* @__PURE__ */ k("div", {
2431
+ a.panelExtra && /* @__PURE__ */ k("div", {
2278
2432
  className: "mt-3",
2279
- children: e.panelExtra
2433
+ children: a.panelExtra
2280
2434
  }),
2281
- I.length > 0 && /* @__PURE__ */ k(qe, {
2282
- activity: I,
2283
- questions: z
2435
+ H.length > 0 && /* @__PURE__ */ k(Ye, {
2436
+ activity: H,
2437
+ questions: G,
2438
+ docked: K,
2439
+ pinUserMessages: !K
2284
2440
  }),
2285
- !e.agent.running && e.agent.error && /* @__PURE__ */ A("div", {
2441
+ !a.agent.running && a.agent.error && /* @__PURE__ */ A("div", {
2286
2442
  className: "mt-2 flex items-center gap-2",
2287
2443
  children: [
2288
2444
  /* @__PURE__ */ k("p", {
2289
2445
  className: "flex-1 text-xs text-destructive",
2290
- children: e.agent.error
2446
+ children: a.agent.error
2291
2447
  }),
2292
2448
  /* @__PURE__ */ k(t, {
2293
- label: x.retry,
2449
+ label: j.retry,
2294
2450
  variant: "secondary",
2295
2451
  className: "shrink-0",
2296
2452
  onClick: () => {
2297
- e.agent.sendMessage(x.retryMessage).then((t) => {
2298
- t && e.onApplied(t);
2453
+ a.agent.sendMessage(j.retryMessage).then((e) => {
2454
+ e && a.onApplied(e);
2299
2455
  });
2300
2456
  }
2301
2457
  }),
2302
- !e.agent.remote && /* @__PURE__ */ k(t, {
2303
- label: x.continueWithoutAi,
2458
+ !a.agent.remote && /* @__PURE__ */ k(t, {
2459
+ label: j.continueWithoutAi,
2304
2460
  variant: "secondary",
2305
2461
  className: "shrink-0",
2306
2462
  onClick: () => {
2307
- if (H) {
2308
- m(H.id, h);
2463
+ if (ee) {
2464
+ v(ee.id, y);
2309
2465
  return;
2310
2466
  }
2311
- let t = e.agent.runFallback();
2312
- t && e.onApplied(t);
2467
+ let e = a.agent.runFallback();
2468
+ e && a.onApplied(e);
2313
2469
  }
2314
2470
  })
2315
2471
  ]
2316
2472
  })
2317
- ] }) : s.length > 0 ? /* @__PURE__ */ k(Ot, { messages: s }) : o ? /* @__PURE__ */ k(Dt, { card: o }) : /* @__PURE__ */ k("p", {
2473
+ ] }) : d.length > 0 ? /* @__PURE__ */ k(Bt, { messages: d }) : u ? /* @__PURE__ */ k(zt, { card: u }) : /* @__PURE__ */ k("p", {
2318
2474
  className: "text-xs text-muted-foreground",
2319
- children: a ?? x.orchestratorStarterHint
2475
+ children: l ?? j.orchestratorStarterHint
2320
2476
  })
2321
2477
  })
2322
2478
  }),
2323
- /* @__PURE__ */ A("div", {
2479
+ a && K ? /* @__PURE__ */ A("section", {
2480
+ "aria-label": j.pendingQuestions,
2481
+ className: "flex min-h-0 shrink flex-col border-t border-border/60",
2482
+ children: [
2483
+ a.panelActions && /* @__PURE__ */ k("div", {
2484
+ className: "shrink-0 px-4 pt-3",
2485
+ children: a.panelActions
2486
+ }),
2487
+ /* @__PURE__ */ k("div", {
2488
+ className: "min-h-0 overflow-y-auto px-4 py-3",
2489
+ children: /* @__PURE__ */ k(Ke, {
2490
+ entry: K.entry,
2491
+ part: K.part,
2492
+ questions: G,
2493
+ autoFocus: !0
2494
+ }, `${K.entry.id}:${K.part.id}`)
2495
+ }),
2496
+ a.agent.running && /* @__PURE__ */ k("div", {
2497
+ className: "flex shrink-0 justify-end px-4 pb-3",
2498
+ children: /* @__PURE__ */ k(t, {
2499
+ icon: "square",
2500
+ label: j.stop,
2501
+ variant: "secondary",
2502
+ onClick: a.agent.stop
2503
+ })
2504
+ })
2505
+ ]
2506
+ }) : /* @__PURE__ */ A("div", {
2324
2507
  className: "border-t border-border/60 px-4 py-3",
2325
- children: [e?.panelActions && /* @__PURE__ */ k("div", {
2508
+ children: [a?.panelActions && /* @__PURE__ */ k("div", {
2326
2509
  className: "mb-2",
2327
- children: e.panelActions
2328
- }), e ? /* @__PURE__ */ k(wt, { task: e }, e.id) : /* @__PURE__ */ k(Tt, {})]
2510
+ children: a.panelActions
2511
+ }), a ? /* @__PURE__ */ k(It, { task: a }, a.id) : /* @__PURE__ */ k(Lt, {})]
2329
2512
  })
2330
2513
  ]
2331
2514
  })
2332
2515
  ] }) : /* @__PURE__ */ A(O, { children: [
2333
- K,
2334
- J,
2335
- ee,
2336
- te,
2337
- re
2516
+ ne,
2517
+ ie,
2518
+ oe,
2519
+ ce,
2520
+ X
2338
2521
  ] });
2339
2522
  }
2340
2523
  //#endregion
2341
2524
  //#region src/presentation/useAgenticoPageContext.ts
2342
- function jt(e, t) {
2525
+ function Ut(e, t) {
2343
2526
  let { setPageContext: n } = $(), r = E(crypto.randomUUID()).current;
2344
2527
  C(() => (n(r, e, t ?? null), () => n(r, null)), [e, t]);
2345
2528
  }
2346
2529
  //#endregion
2347
2530
  //#region src/presentation/useSubagentComponentContext.ts
2348
- function Mt(e, t, n, r, i = !0, a) {
2531
+ function Wt(e, t, n, r, i = !0, a) {
2349
2532
  let { registerComponentAnchor: o } = $(), s = E(crypto.randomUUID()).current, c = E(n);
2350
2533
  c.current = n, C(() => {
2351
2534
  if (i) return o(s, {
@@ -2364,6 +2547,6 @@ function Mt(e, t, n, r, i = !0, a) {
2364
2547
  ]);
2365
2548
  }
2366
2549
  //#endregion
2367
- export { St as AGENTICO_WIDTH, At as Agentico, Pe as AgenticoProvider, Je as AgenticoToggle, M as DEFAULT_REASONING_PART_ID, j as DEFAULT_TEXT_PART_ID, fe as JSON_EXPORT_DESTINATION_ID, ce as MICRO_PROMPT_REGISTRY, Me as ORCHESTRATOR_TASK_ID, se as SUMMARY_MICRO_PROMPT, Oe as agenticoDe, ke as agenticoEn, Ae as agenticoIt, q as agenticoPromptsEn, J as agenticoPromptsIt, je as agenticoTranslations, le as applyMicroPrompts, ee as configureAgenticoPrompts, ve as configureEntityChatStore, U as createCrossAgentTools, I as defineSubagent, De as entityChatTaskId, Z as extractErrorMessage, ue as extractJsonBlock, B as findSubagentManifest, F as formatQuestionAnswers, X as getAgenticoPrompts, ge as getDestinationRegistry, Ce as getEntityChat, _t as getSubagentControls, z as getSubagentRegistry, ft as getSubagentReport, pe as jsonExportDestination, Ee as listEntityChats, P as messagePartsText, H as registerCrossAgentTools, he as registerDestinations, gt as registerSubagentControls, dt as registerSubagentReports, R as registerSubagents, Te as removeEntityChat, oe as renderRegistryCli, ae as renderSubagentCli, te as resetAgenticoPrompts, we as saveEntityChat, W as toJsonSchema, G as toMcpTool, N as upsertMessagePart, nt as useAgent, $ as useAgentico, Q as useAgenticoI18n, jt as useAgenticoPageContext, Mt as useSubagentComponentContext };
2550
+ export { Qe as AGENTICO_MAX_WIDTH, Ze as AGENTICO_MIN_WIDTH, Xe as AGENTICO_WIDTH, $e as AGENTICO_WIDTH_STORAGE_KEY, Ht as Agentico, Pe as AgenticoProvider, st as AgenticoToggle, M as DEFAULT_REASONING_PART_ID, j as DEFAULT_TEXT_PART_ID, fe as JSON_EXPORT_DESTINATION_ID, le as MICRO_PROMPT_REGISTRY, Me as ORCHESTRATOR_TASK_ID, ce as SUMMARY_MICRO_PROMPT, Oe as agenticoDe, ke as agenticoEn, Ae as agenticoIt, q as agenticoPromptsEn, ee as agenticoPromptsIt, je as agenticoTranslations, X as applyMicroPrompts, te as configureAgenticoPrompts, ve as configureEntityChatStore, U as createCrossAgentTools, I as defineSubagent, De as entityChatTaskId, Z as extractErrorMessage, ue as extractJsonBlock, B as findSubagentManifest, F as formatQuestionAnswers, Y as getAgenticoPrompts, ge as getDestinationRegistry, Ce as getEntityChat, At as getSubagentControls, z as getSubagentRegistry, Tt as getSubagentReport, pe as jsonExportDestination, Ee as listEntityChats, P as messagePartsText, H as registerCrossAgentTools, he as registerDestinations, kt as registerSubagentControls, wt as registerSubagentReports, R as registerSubagents, Te as removeEntityChat, se as renderRegistryCli, oe as renderSubagentCli, ne as resetAgenticoPrompts, we as saveEntityChat, W as toJsonSchema, G as toMcpTool, N as upsertMessagePart, ht as useAgent, $ as useAgentico, Q as useAgenticoI18n, Ut as useAgenticoPageContext, Wt as useSubagentComponentContext };
2368
2551
 
2369
2552
  //# sourceMappingURL=index.mjs.map