@llmnative/agentico 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +108 -99
- package/dist/index.mjs.map +1 -1
- package/dist/types/domain/agentDefinition.d.ts +5 -0
- package/llms.txt +3 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -40,33 +40,33 @@ function B(e) {
|
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/domain/crossAgentTools.ts
|
|
42
42
|
var V = [];
|
|
43
|
-
function
|
|
43
|
+
function ee(...e) {
|
|
44
44
|
V = e;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function H(e) {
|
|
47
47
|
return V.flatMap((t) => t(e));
|
|
48
48
|
}
|
|
49
49
|
//#endregion
|
|
50
50
|
//#region src/domain/mcpTool.ts
|
|
51
|
-
function
|
|
51
|
+
function U(t) {
|
|
52
52
|
let { $schema: n, ...r } = e(t, {
|
|
53
53
|
target: "jsonSchema7",
|
|
54
54
|
$refStrategy: "none"
|
|
55
55
|
});
|
|
56
56
|
return r;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function W(e, t, n, r) {
|
|
59
59
|
return {
|
|
60
60
|
name: e,
|
|
61
61
|
description: t,
|
|
62
|
-
inputSchema:
|
|
63
|
-
...r ? { outputSchema:
|
|
62
|
+
inputSchema: U(n),
|
|
63
|
+
...r ? { outputSchema: U(r) } : {}
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
//#endregion
|
|
67
67
|
//#region src/domain/subagentUsageCard.ts
|
|
68
|
-
function
|
|
69
|
-
let t =
|
|
68
|
+
function G(e) {
|
|
69
|
+
let t = U(e.inputSchema), n = t.properties ?? {}, r = new Set(t.required ?? []);
|
|
70
70
|
return Object.entries(n).map(([t, n]) => {
|
|
71
71
|
let i = typeof n.description == "string" ? n.description : "";
|
|
72
72
|
return {
|
|
@@ -80,7 +80,7 @@ function K(e) {
|
|
|
80
80
|
}
|
|
81
81
|
//#endregion
|
|
82
82
|
//#region src/domain/prompts.ts
|
|
83
|
-
var
|
|
83
|
+
var K = {
|
|
84
84
|
orchestratorIntro: "You are Agentico, the orchestrator of this application's tools. Your job is to understand what the user wants to achieve and, once every required parameter is collected, start the right tool among those listed below — do not carry it out yourself \"in words\", invoke it as a tool.",
|
|
85
85
|
responseRules: [
|
|
86
86
|
"BEFORE asking for any parameter, check the \"Page context\" below (if present): if a parameter required by the command is already there or can be deduced from it with reasonable certainty, USE it directly — do not ask the user again. Only ask for parameters that cannot be derived from the context.",
|
|
@@ -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
|
-
},
|
|
111
|
+
}, q = {
|
|
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,7 +136,7 @@ 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
|
-
}, J =
|
|
139
|
+
}, J = K;
|
|
140
140
|
function te(e) {
|
|
141
141
|
J = {
|
|
142
142
|
...J,
|
|
@@ -147,7 +147,7 @@ function Y() {
|
|
|
147
147
|
return J;
|
|
148
148
|
}
|
|
149
149
|
function ne() {
|
|
150
|
-
J =
|
|
150
|
+
J = K;
|
|
151
151
|
}
|
|
152
152
|
//#endregion
|
|
153
153
|
//#region src/domain/cli/renderManifestCli.ts
|
|
@@ -155,7 +155,7 @@ 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
157
|
function ie(e, t) {
|
|
158
|
-
let n =
|
|
158
|
+
let n = G(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}`,
|
|
@@ -552,21 +552,21 @@ function Pe({ children: e, scope: t = null }) {
|
|
|
552
552
|
agenticoHint: n,
|
|
553
553
|
userMessage: t.userMessage
|
|
554
554
|
};
|
|
555
|
-
}).filter((e) => e !== null), [z]),
|
|
555
|
+
}).filter((e) => e !== null), [z]), ee = T(() => V.map((e) => e.userMessage), [V]), H = T(() => {
|
|
556
556
|
if (V.length === 0) return null;
|
|
557
557
|
if (V.length === 1) return V[0].agenticoHint;
|
|
558
558
|
let e = V.map((e, t) => `${t + 1}. ${e.agenticoHint}`).join("\n");
|
|
559
559
|
return `${Y().multipleCandidates}\n\n${e}`;
|
|
560
|
-
}, [V]) ?? P?.text ?? null,
|
|
560
|
+
}, [V]) ?? P?.text ?? null, U = V.length > 0 ? null : P?.card ?? null, W = T(() => [...new Set(R.map((e) => e.subagentId))], [R]), G = W.length === 1 ? W[0] : W.length === 0 ? P?.card?.subagentId ?? null : null, K = x((e, t) => {
|
|
561
561
|
u();
|
|
562
562
|
let n = i.current;
|
|
563
563
|
if (n?.id === "agentico-orchestrator") return;
|
|
564
|
-
let r =
|
|
564
|
+
let r = G && n?.id.startsWith(`subagent-${G}-`) ? n : void 0;
|
|
565
565
|
w(r ? {
|
|
566
566
|
taskId: r.id,
|
|
567
567
|
activity: [...r.precedingActivity ?? [], ...r.agent.activity]
|
|
568
568
|
} : null), f(e), m(t?.extraDestinations), g(t?.attachments), v(t?.model), A(t?.scopedSubagentId), b(crypto.randomUUID());
|
|
569
|
-
}, [u,
|
|
569
|
+
}, [u, G]), q = x((e, t, n, a, o, s) => {
|
|
570
570
|
if (!n || !a) return;
|
|
571
571
|
let c = i.current;
|
|
572
572
|
if (!c || c.id !== n) return;
|
|
@@ -617,14 +617,14 @@ function Pe({ children: e, scope: t = null }) {
|
|
|
617
617
|
closeTask: c,
|
|
618
618
|
toggleOpen: l,
|
|
619
619
|
pendingGoal: d,
|
|
620
|
-
startOrchestrator:
|
|
621
|
-
pageContext:
|
|
622
|
-
pageContextCard:
|
|
620
|
+
startOrchestrator: K,
|
|
621
|
+
pageContext: H,
|
|
622
|
+
pageContextCard: U,
|
|
623
623
|
setPageContext: N,
|
|
624
|
-
scopedSubagentId:
|
|
624
|
+
scopedSubagentId: G,
|
|
625
625
|
pendingScopedSubagentId: O,
|
|
626
626
|
componentAnchors: R,
|
|
627
|
-
anchoredUserMessages:
|
|
627
|
+
anchoredUserMessages: ee,
|
|
628
628
|
registerComponentAnchor: L,
|
|
629
629
|
openPanel: u,
|
|
630
630
|
pendingExtraDestinations: p,
|
|
@@ -632,7 +632,7 @@ function Pe({ children: e, scope: t = null }) {
|
|
|
632
632
|
pendingModel: _,
|
|
633
633
|
orchestratorRunId: y,
|
|
634
634
|
pendingCarryOver: S,
|
|
635
|
-
commitEntityChat:
|
|
635
|
+
commitEntityChat: q,
|
|
636
636
|
resumeEntityChat: ie,
|
|
637
637
|
pendingResume: J,
|
|
638
638
|
resumeRunId: ne,
|
|
@@ -654,14 +654,14 @@ function Pe({ children: e, scope: t = null }) {
|
|
|
654
654
|
c,
|
|
655
655
|
l,
|
|
656
656
|
d,
|
|
657
|
-
|
|
657
|
+
K,
|
|
658
|
+
H,
|
|
658
659
|
U,
|
|
659
|
-
W,
|
|
660
660
|
N,
|
|
661
|
-
|
|
661
|
+
G,
|
|
662
662
|
O,
|
|
663
663
|
R,
|
|
664
|
-
|
|
664
|
+
ee,
|
|
665
665
|
L,
|
|
666
666
|
u,
|
|
667
667
|
p,
|
|
@@ -669,7 +669,7 @@ function Pe({ children: e, scope: t = null }) {
|
|
|
669
669
|
_,
|
|
670
670
|
y,
|
|
671
671
|
S,
|
|
672
|
-
|
|
672
|
+
q,
|
|
673
673
|
ie,
|
|
674
674
|
J,
|
|
675
675
|
ne,
|
|
@@ -1177,10 +1177,10 @@ function ht(e, t = {}) {
|
|
|
1177
1177
|
T.current = w;
|
|
1178
1178
|
let O = E(null), k = E(!1), A = E(null), M = () => {
|
|
1179
1179
|
A.current?.abort();
|
|
1180
|
-
}, I = _()?.registry ?? {}, L = r && c ? h(c) : null, R = L ? I[L.provider] : null, z = e.executor, B = !!z, [V,
|
|
1181
|
-
|
|
1182
|
-
},
|
|
1183
|
-
|
|
1180
|
+
}, I = _()?.registry ?? {}, L = r && c ? h(c) : null, R = L ? I[L.provider] : null, z = e.executor, B = !!z, [V, ee] = D([]), [H, W] = D(""), G = E(""), K = (e) => {
|
|
1181
|
+
G.current = e, W(e);
|
|
1182
|
+
}, q = (e) => {
|
|
1183
|
+
ee(z?.models?.(e) ?? []), K(z?.defaultModel?.(e) ?? "");
|
|
1184
1184
|
}, J = async (e, t, n, r) => {
|
|
1185
1185
|
let i = O.current;
|
|
1186
1186
|
if (!i || !z) return m(T.current.noActiveSession), null;
|
|
@@ -1274,7 +1274,7 @@ function ht(e, t = {}) {
|
|
|
1274
1274
|
text: e,
|
|
1275
1275
|
first: t,
|
|
1276
1276
|
signal: a.signal,
|
|
1277
|
-
...n ||
|
|
1277
|
+
...n || G.current ? { model: n || G.current } : {},
|
|
1278
1278
|
...r ? { answers: {
|
|
1279
1279
|
id: r.id,
|
|
1280
1280
|
answers: r.answers
|
|
@@ -1335,7 +1335,7 @@ function ht(e, t = {}) {
|
|
|
1335
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) => ({
|
|
1336
1336
|
name: e.name,
|
|
1337
1337
|
description: e.description,
|
|
1338
|
-
inputSchema:
|
|
1338
|
+
inputSchema: U(e.inputSchema)
|
|
1339
1339
|
})), u = new Map(i.tools.map((e) => [e.name, e])), f = new AbortController();
|
|
1340
1340
|
A.current = f;
|
|
1341
1341
|
let p = (e, t, n, r) => S((i) => i.map((i) => i.id === e ? {
|
|
@@ -1375,7 +1375,14 @@ function ht(e, t = {}) {
|
|
|
1375
1375
|
role: "user",
|
|
1376
1376
|
content: r + s
|
|
1377
1377
|
}] : []], !h) return f.signal.aborted ? (p(d, "stopped"), e.fallback(i.params, i.context)) : (p(d, "error"), m(T.current.noProviderResponse), null);
|
|
1378
|
-
if (h.type === "text") return p(d, "done", h.text),
|
|
1378
|
+
if (h.type === "text") return p(d, "done", h.text), e.conversational && h.text.trim() && S((e) => e.map((e) => e.id === d ? {
|
|
1379
|
+
...e,
|
|
1380
|
+
parts: [{
|
|
1381
|
+
type: "text",
|
|
1382
|
+
id: "text",
|
|
1383
|
+
text: h.text
|
|
1384
|
+
}]
|
|
1385
|
+
} : e)), i.history = [
|
|
1379
1386
|
...n,
|
|
1380
1387
|
...r ? [{
|
|
1381
1388
|
role: "user",
|
|
@@ -1477,8 +1484,8 @@ function ht(e, t = {}) {
|
|
|
1477
1484
|
enabled: r,
|
|
1478
1485
|
setEnabled: i,
|
|
1479
1486
|
hasProviders: a,
|
|
1480
|
-
selectedModel: B ?
|
|
1481
|
-
setSelectedModel: B ?
|
|
1487
|
+
selectedModel: B ? H : c,
|
|
1488
|
+
setSelectedModel: B ? K : l,
|
|
1482
1489
|
modelsByProvider: o,
|
|
1483
1490
|
modelsLoading: s,
|
|
1484
1491
|
running: u,
|
|
@@ -1506,7 +1513,7 @@ function ht(e, t = {}) {
|
|
|
1506
1513
|
history: [],
|
|
1507
1514
|
logId: crypto.randomUUID(),
|
|
1508
1515
|
attachmentsRef: a
|
|
1509
|
-
}, B) return v(!0),
|
|
1516
|
+
}, B) return v(!0), q(t), await J(n?.openingMessage ?? "", !0);
|
|
1510
1517
|
let s = n?.model || void 0, c = s ? !!I[h(s)?.provider ?? ""] : !!R;
|
|
1511
1518
|
if (!r || !c) {
|
|
1512
1519
|
v(!1);
|
|
@@ -1542,7 +1549,7 @@ function ht(e, t = {}) {
|
|
|
1542
1549
|
history: n.history,
|
|
1543
1550
|
logId: crypto.randomUUID(),
|
|
1544
1551
|
attachmentsRef: a
|
|
1545
|
-
}, B &&
|
|
1552
|
+
}, B && q(t), v(B || r && !!R);
|
|
1546
1553
|
} catch (e) {
|
|
1547
1554
|
m(Z(e));
|
|
1548
1555
|
} finally {
|
|
@@ -1653,7 +1660,7 @@ function bt(e) {
|
|
|
1653
1660
|
return t.kind === "chat" ? t.message : e.continueWithoutAi;
|
|
1654
1661
|
},
|
|
1655
1662
|
getTools(t, n, r) {
|
|
1656
|
-
let i =
|
|
1663
|
+
let i = H({
|
|
1657
1664
|
attachmentsRef: r,
|
|
1658
1665
|
collected: n.collected,
|
|
1659
1666
|
proxyFetch: g
|
|
@@ -1785,22 +1792,24 @@ function At(e) {
|
|
|
1785
1792
|
//#region src/presentation/SubagentRunner.tsx
|
|
1786
1793
|
var jt = () => ({});
|
|
1787
1794
|
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),
|
|
1789
|
-
|
|
1790
|
-
|
|
1795
|
+
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 = (t) => {
|
|
1796
|
+
e.definition.conversational || m(t);
|
|
1797
|
+
}, [g, _] = D([]), [v, b] = D(null), x = Tt(e.id), S = x?.kind === "selection" ? x : null, [w, j] = D(null), M = E(!1), N = E(0), P = E(null);
|
|
1798
|
+
p && p !== P.current && (P.current = p, N.current = (r?.length ?? 0) + c.activity.length);
|
|
1799
|
+
let F = E(!1), I = c.remote || !c.hasProviders || c.selectedModel !== "";
|
|
1791
1800
|
C(() => {
|
|
1792
|
-
!
|
|
1801
|
+
!M.current && I && (M.current = !0, a ? c.resume(e.toParams(t), a) : (o && c.setSelectedModel(o), c.run(e.toParams(t), {
|
|
1793
1802
|
model: o,
|
|
1794
1803
|
openingMessage: s
|
|
1795
1804
|
}).then((e) => {
|
|
1796
|
-
e &&
|
|
1805
|
+
e && h(e);
|
|
1797
1806
|
})));
|
|
1798
|
-
}, [
|
|
1807
|
+
}, [I]), C(() => {
|
|
1799
1808
|
if (!p || !u) return;
|
|
1800
1809
|
let n = e.autoApplyDestinationIds ?? [], r = l.componentAnchors.find((t) => t.subagentId === e.id && t.pinnedEntityId)?.pinnedEntityId, i = ge();
|
|
1801
1810
|
n.forEach((n) => {
|
|
1802
1811
|
let a = i[n];
|
|
1803
|
-
a && (
|
|
1812
|
+
a && (b(null), a.apply(p, {
|
|
1804
1813
|
scopeId: u.id,
|
|
1805
1814
|
dataProvider: u.dataProvider,
|
|
1806
1815
|
storageProvider: u.storageProvider,
|
|
@@ -1810,29 +1819,29 @@ function Mt({ manifest: e, params: t, extraDestinations: n, precedingActivity: r
|
|
|
1810
1819
|
pinnedEntityId: r
|
|
1811
1820
|
}).then((n) => {
|
|
1812
1821
|
n?.id && l.commitEntityChat(e.id, n.id, f, u.id, t, xt(e, t));
|
|
1813
|
-
}).catch((e) =>
|
|
1822
|
+
}).catch((e) => b(e instanceof Error ? e.message : String(e))));
|
|
1814
1823
|
});
|
|
1815
1824
|
}, [
|
|
1816
1825
|
p,
|
|
1817
1826
|
c.activity,
|
|
1818
1827
|
u
|
|
1819
1828
|
]), C(() => {
|
|
1820
|
-
p &&
|
|
1821
|
-
}, [p,
|
|
1822
|
-
let
|
|
1823
|
-
|
|
1829
|
+
p && S && j(S.defaultSelection(p));
|
|
1830
|
+
}, [p, S]);
|
|
1831
|
+
let L = (e, t) => {
|
|
1832
|
+
j((n) => n && {
|
|
1824
1833
|
...n,
|
|
1825
1834
|
[e]: t
|
|
1826
1835
|
});
|
|
1827
|
-
},
|
|
1836
|
+
}, R = (e) => h(e), z = T(() => p && S && w ? S.applySelection(p, w) : p, [
|
|
1828
1837
|
p,
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
]),
|
|
1832
|
-
|
|
1838
|
+
S,
|
|
1839
|
+
w
|
|
1840
|
+
]), B = T(() => l.componentAnchors.filter((t) => t.subagentId === e.id && t.onResult), [l.componentAnchors, e.id]), V = T(() => Dt(B, t, f), [
|
|
1841
|
+
B,
|
|
1833
1842
|
t,
|
|
1834
1843
|
f
|
|
1835
|
-
]),
|
|
1844
|
+
]), ee = T(() => V ? [V, ...n ?? []] : n, [V, n]), H = e.chatEntityId?.(t), U = E(!1);
|
|
1836
1845
|
C(() => {
|
|
1837
1846
|
let n = U.current && !c.running;
|
|
1838
1847
|
if (U.current = c.running, !n || !H || !u) return;
|
|
@@ -1848,50 +1857,50 @@ function Mt({ manifest: e, params: t, extraDestinations: n, precedingActivity: r
|
|
|
1848
1857
|
});
|
|
1849
1858
|
}, [c.running]);
|
|
1850
1859
|
let W = () => {
|
|
1851
|
-
|
|
1860
|
+
F.current = !0, c.running && c.stop(), l.closeTask(f);
|
|
1852
1861
|
}, G = E(At(e.id) ?? jt).current, K = G({
|
|
1853
1862
|
params: t,
|
|
1854
1863
|
taskId: f,
|
|
1855
1864
|
running: c.running,
|
|
1856
1865
|
close: W
|
|
1857
1866
|
}), q = (e) => {
|
|
1858
|
-
|
|
1867
|
+
_((t) => t.includes(e) ? t : [...t, e]);
|
|
1859
1868
|
};
|
|
1860
1869
|
return C(() => {
|
|
1861
|
-
|
|
1870
|
+
F.current || l.openTask({
|
|
1862
1871
|
id: f,
|
|
1863
1872
|
title: xt(e, t),
|
|
1864
1873
|
icon: e.icon,
|
|
1865
1874
|
agent: c,
|
|
1866
|
-
onApplied: (e) =>
|
|
1875
|
+
onApplied: (e) => h(e),
|
|
1867
1876
|
precedingActivity: r,
|
|
1868
|
-
panelExtraAnchorIndex:
|
|
1877
|
+
panelExtraAnchorIndex: N.current,
|
|
1869
1878
|
onDismiss: W,
|
|
1870
1879
|
...H ? { savedToDisk: !0 } : {},
|
|
1871
1880
|
panelActions: K.content,
|
|
1872
1881
|
composerActions: K.actions,
|
|
1873
1882
|
composerCommands: K.commands,
|
|
1874
1883
|
panelExtra: p ? /* @__PURE__ */ A(O, { children: [
|
|
1875
|
-
|
|
1884
|
+
S && w ? /* @__PURE__ */ k(S.Report, {
|
|
1876
1885
|
result: p,
|
|
1877
|
-
selection:
|
|
1878
|
-
onChange:
|
|
1879
|
-
}) :
|
|
1886
|
+
selection: w,
|
|
1887
|
+
onChange: L
|
|
1888
|
+
}) : x?.kind === "editable" ? /* @__PURE__ */ k(x.Report, {
|
|
1880
1889
|
result: p,
|
|
1881
|
-
onResultChange:
|
|
1882
|
-
}) : /* @__PURE__ */ k(Et, { result:
|
|
1883
|
-
|
|
1890
|
+
onResultChange: R
|
|
1891
|
+
}) : /* @__PURE__ */ k(Et, { result: z }),
|
|
1892
|
+
v && /* @__PURE__ */ A("p", {
|
|
1884
1893
|
className: "text-xs text-destructive",
|
|
1885
|
-
children: ["Salvataggio automatico non riuscito: ",
|
|
1894
|
+
children: ["Salvataggio automatico non riuscito: ", v]
|
|
1886
1895
|
}),
|
|
1887
1896
|
/* @__PURE__ */ k(St, {
|
|
1888
1897
|
manifest: e,
|
|
1889
|
-
result:
|
|
1898
|
+
result: z,
|
|
1890
1899
|
meta: t,
|
|
1891
1900
|
taskId: f,
|
|
1892
|
-
initiallyApplied:
|
|
1901
|
+
initiallyApplied: g,
|
|
1893
1902
|
onApplied: q,
|
|
1894
|
-
extraDestinations:
|
|
1903
|
+
extraDestinations: ee
|
|
1895
1904
|
})
|
|
1896
1905
|
] }) : void 0
|
|
1897
1906
|
});
|
|
@@ -1910,12 +1919,12 @@ function Mt({ manifest: e, params: t, extraDestinations: n, precedingActivity: r
|
|
|
1910
1919
|
e,
|
|
1911
1920
|
t,
|
|
1912
1921
|
p,
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1922
|
+
z,
|
|
1923
|
+
w,
|
|
1924
|
+
g,
|
|
1916
1925
|
n,
|
|
1917
1926
|
r,
|
|
1918
|
-
|
|
1927
|
+
v,
|
|
1919
1928
|
K.content,
|
|
1920
1929
|
K.actions,
|
|
1921
1930
|
K.commands
|
|
@@ -2321,12 +2330,12 @@ function Ht({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}
|
|
|
2321
2330
|
onWidthChange: i
|
|
2322
2331
|
}), I = () => {
|
|
2323
2332
|
(!a || a.agent.running || a.savedToDisk || window.confirm(j.unsavedConversationConfirm)) && (m(), P(!1));
|
|
2324
|
-
}, 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),
|
|
2325
|
-
canAnswer: (e) =>
|
|
2333
|
+
}, 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), ee = L.slice(z), H = !!(a && !a.agent.running && a.agent.error), U = new Set(a?.agent.activity.map((e) => e.id) ?? []), W = a ? {
|
|
2334
|
+
canAnswer: (e) => U.has(e),
|
|
2326
2335
|
onAnswer: (e, t, n) => a.agent.answerQuestions(e, t, n).then((e) => {
|
|
2327
2336
|
e && a.onApplied(e);
|
|
2328
2337
|
})
|
|
2329
|
-
} : void 0,
|
|
2338
|
+
} : void 0, G = W ? Ge(L, W.canAnswer) : null, K = a?.id === "agentico-orchestrator" && a.scopedSubagentId ? B(a.scopedSubagentId) : void 0, q = K?.manualEntry ? K : null, J = E(!0);
|
|
2330
2339
|
C(() => {
|
|
2331
2340
|
let e = M.current;
|
|
2332
2341
|
if (!e) return;
|
|
@@ -2344,7 +2353,7 @@ function Ht({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}
|
|
|
2344
2353
|
e && J.current && (e.scrollTop = e.scrollHeight);
|
|
2345
2354
|
}, [
|
|
2346
2355
|
R,
|
|
2347
|
-
|
|
2356
|
+
H,
|
|
2348
2357
|
te
|
|
2349
2358
|
]);
|
|
2350
2359
|
let Y = E(null);
|
|
@@ -2416,7 +2425,7 @@ function Ht({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}
|
|
|
2416
2425
|
}),
|
|
2417
2426
|
/* @__PURE__ */ k("div", {
|
|
2418
2427
|
ref: M,
|
|
2419
|
-
className: `flex-1 overflow-y-auto px-3 pb-2 ${
|
|
2428
|
+
className: `flex-1 overflow-y-auto px-3 pb-2 ${G ? "min-h-24" : "min-h-0"}`,
|
|
2420
2429
|
children: /* @__PURE__ */ k("div", {
|
|
2421
2430
|
ref: Y,
|
|
2422
2431
|
className: "pt-2",
|
|
@@ -2427,19 +2436,19 @@ function Ht({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}
|
|
|
2427
2436
|
}),
|
|
2428
2437
|
/* @__PURE__ */ k(Ye, {
|
|
2429
2438
|
activity: V,
|
|
2430
|
-
questions:
|
|
2431
|
-
docked:
|
|
2432
|
-
pinUserMessages: !
|
|
2439
|
+
questions: W,
|
|
2440
|
+
docked: G,
|
|
2441
|
+
pinUserMessages: !G
|
|
2433
2442
|
}),
|
|
2434
2443
|
a.panelExtra && /* @__PURE__ */ k("div", {
|
|
2435
2444
|
className: "mt-3",
|
|
2436
2445
|
children: a.panelExtra
|
|
2437
2446
|
}),
|
|
2438
|
-
|
|
2439
|
-
activity:
|
|
2440
|
-
questions:
|
|
2441
|
-
docked:
|
|
2442
|
-
pinUserMessages: !
|
|
2447
|
+
ee.length > 0 && /* @__PURE__ */ k(Ye, {
|
|
2448
|
+
activity: ee,
|
|
2449
|
+
questions: W,
|
|
2450
|
+
docked: G,
|
|
2451
|
+
pinUserMessages: !G
|
|
2443
2452
|
}),
|
|
2444
2453
|
!a.agent.running && a.agent.error && /* @__PURE__ */ A("div", {
|
|
2445
2454
|
className: "mt-2 flex items-center gap-2",
|
|
@@ -2463,8 +2472,8 @@ function Ht({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}
|
|
|
2463
2472
|
variant: "secondary",
|
|
2464
2473
|
className: "shrink-0",
|
|
2465
2474
|
onClick: () => {
|
|
2466
|
-
if (
|
|
2467
|
-
v(
|
|
2475
|
+
if (q) {
|
|
2476
|
+
v(q.id, y);
|
|
2468
2477
|
return;
|
|
2469
2478
|
}
|
|
2470
2479
|
let e = a.agent.runFallback();
|
|
@@ -2479,7 +2488,7 @@ function Ht({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}
|
|
|
2479
2488
|
})
|
|
2480
2489
|
})
|
|
2481
2490
|
}),
|
|
2482
|
-
a &&
|
|
2491
|
+
a && G ? /* @__PURE__ */ A("section", {
|
|
2483
2492
|
"aria-label": j.pendingQuestions,
|
|
2484
2493
|
className: "flex min-h-0 shrink flex-col border-t border-border/60",
|
|
2485
2494
|
children: [
|
|
@@ -2490,11 +2499,11 @@ function Ht({ defaultWidth: e, minWidth: n, maxWidth: r, onWidthChange: i } = {}
|
|
|
2490
2499
|
/* @__PURE__ */ k("div", {
|
|
2491
2500
|
className: "min-h-0 overflow-y-auto px-4 py-3",
|
|
2492
2501
|
children: /* @__PURE__ */ k(Ke, {
|
|
2493
|
-
entry:
|
|
2494
|
-
part:
|
|
2495
|
-
questions:
|
|
2502
|
+
entry: G.entry,
|
|
2503
|
+
part: G.part,
|
|
2504
|
+
questions: W,
|
|
2496
2505
|
autoFocus: !0
|
|
2497
|
-
}, `${
|
|
2506
|
+
}, `${G.entry.id}:${G.part.id}`)
|
|
2498
2507
|
}),
|
|
2499
2508
|
a.agent.running && /* @__PURE__ */ k("div", {
|
|
2500
2509
|
className: "flex shrink-0 justify-end px-4 pb-3",
|
|
@@ -2550,6 +2559,6 @@ function Wt(e, t, n, r, i = !0, a) {
|
|
|
2550
2559
|
]);
|
|
2551
2560
|
}
|
|
2552
2561
|
//#endregion
|
|
2553
|
-
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,
|
|
2562
|
+
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, K as agenticoPromptsEn, q as agenticoPromptsIt, je as agenticoTranslations, X as applyMicroPrompts, te as configureAgenticoPrompts, ve as configureEntityChatStore, H 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, ee 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, U as toJsonSchema, W as toMcpTool, N as upsertMessagePart, ht as useAgent, $ as useAgentico, Q as useAgenticoI18n, Ut as useAgenticoPageContext, Wt as useSubagentComponentContext };
|
|
2554
2563
|
|
|
2555
2564
|
//# sourceMappingURL=index.mjs.map
|