@llmnative/agentico 0.29.0 → 0.30.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.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +306 -223
- package/dist/index.mjs.map +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +39 -11
- package/dist/server.mjs.map +1 -1
- package/dist/types/backend/agenticoBackend.d.ts +10 -0
- package/dist/types/i18n/types.d.ts +7 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/presentation/AgenticoConnectionsSettings.d.ts +1 -1
- package/dist/types/presentation/hostName.d.ts +1 -0
- package/dist/types/server/connections.d.ts +2 -0
- package/dist/types/server/memories.d.ts +14 -1
- package/dist/types/server/server.d.ts +3 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -463,8 +463,6 @@ var Ke = {
|
|
|
463
463
|
runnerDraining: "Draining",
|
|
464
464
|
runnerAdd: "Add a runner",
|
|
465
465
|
runnerAddDescription: "Install one on your VPS, or connect one already installed.",
|
|
466
|
-
runnerName: "Name",
|
|
467
|
-
runnerRename: "Rename",
|
|
468
466
|
runnerVersion: "Version",
|
|
469
467
|
runnerLoad: "Chats",
|
|
470
468
|
runnerLoadValue: "{chats} of {max}",
|
|
@@ -481,6 +479,13 @@ var Ke = {
|
|
|
481
479
|
memoryName: "Name",
|
|
482
480
|
memoryApiUrl: "API address",
|
|
483
481
|
memoryMcpUrl: "MCP server",
|
|
482
|
+
memoryMcpUrlHint: "Optional: the MCP server the agents and the IDE use, when the memory has one.",
|
|
483
|
+
memoryKeySaved: "•••••••••••• saved",
|
|
484
|
+
memoryNamespaces: "Namespaces ({count})",
|
|
485
|
+
memoryNamespacesLoading: "Reading the namespaces…",
|
|
486
|
+
memoryNamespacesNone: "The memory has no namespaces yet.",
|
|
487
|
+
memoryDocuments: "{count} documents",
|
|
488
|
+
memoryMemories: "{count} memories",
|
|
484
489
|
memoryKey: "Key",
|
|
485
490
|
memoryKeyKeep: "Empty: the saved key stays.",
|
|
486
491
|
memoryCheck: "Check",
|
|
@@ -691,8 +696,6 @@ var Ke = {
|
|
|
691
696
|
runnerDraining: "In svuotamento",
|
|
692
697
|
runnerAdd: "Aggiungi un runner",
|
|
693
698
|
runnerAddDescription: "Installane uno sulla tua VPS, o collegane uno già installato.",
|
|
694
|
-
runnerName: "Nome",
|
|
695
|
-
runnerRename: "Rinomina",
|
|
696
699
|
runnerVersion: "Versione",
|
|
697
700
|
runnerLoad: "Chat",
|
|
698
701
|
runnerLoadValue: "{chats} su {max}",
|
|
@@ -709,6 +712,13 @@ var Ke = {
|
|
|
709
712
|
memoryName: "Nome",
|
|
710
713
|
memoryApiUrl: "Indirizzo API",
|
|
711
714
|
memoryMcpUrl: "Server MCP",
|
|
715
|
+
memoryMcpUrlHint: "Facoltativo: il server MCP che gli agenti e l'IDE usano, se la memoria ne ha uno.",
|
|
716
|
+
memoryKeySaved: "•••••••••••• salvata",
|
|
717
|
+
memoryNamespaces: "Namespace ({count})",
|
|
718
|
+
memoryNamespacesLoading: "Leggo i namespace…",
|
|
719
|
+
memoryNamespacesNone: "La memoria non ha ancora namespace.",
|
|
720
|
+
memoryDocuments: "{count} documenti",
|
|
721
|
+
memoryMemories: "{count} memorie",
|
|
712
722
|
memoryKey: "Chiave",
|
|
713
723
|
memoryKeyKeep: "Vuota: resta la chiave salvata.",
|
|
714
724
|
memoryCheck: "Verifica",
|
|
@@ -919,8 +929,6 @@ var Ke = {
|
|
|
919
929
|
runnerDraining: "Wird geleert",
|
|
920
930
|
runnerAdd: "Runner hinzufügen",
|
|
921
931
|
runnerAddDescription: "Installieren Sie einen auf Ihrem VPS oder verbinden Sie einen bereits installierten.",
|
|
922
|
-
runnerName: "Name",
|
|
923
|
-
runnerRename: "Umbenennen",
|
|
924
932
|
runnerVersion: "Version",
|
|
925
933
|
runnerLoad: "Chats",
|
|
926
934
|
runnerLoadValue: "{chats} von {max}",
|
|
@@ -937,6 +945,13 @@ var Ke = {
|
|
|
937
945
|
memoryName: "Name",
|
|
938
946
|
memoryApiUrl: "API-Adresse",
|
|
939
947
|
memoryMcpUrl: "MCP-Server",
|
|
948
|
+
memoryMcpUrlHint: "Optional: der MCP-Server, den die Agenten und die IDE nutzen, wenn der Speicher einen hat.",
|
|
949
|
+
memoryKeySaved: "•••••••••••• gespeichert",
|
|
950
|
+
memoryNamespaces: "Namespaces ({count})",
|
|
951
|
+
memoryNamespacesLoading: "Lese die Namespaces…",
|
|
952
|
+
memoryNamespacesNone: "Der Speicher hat noch keine Namespaces.",
|
|
953
|
+
memoryDocuments: "{count} Dokumente",
|
|
954
|
+
memoryMemories: "{count} Erinnerungen",
|
|
940
955
|
memoryKey: "Schlüssel",
|
|
941
956
|
memoryKeyKeep: "Leer: der gespeicherte Schlüssel bleibt.",
|
|
942
957
|
memoryCheck: "Prüfen",
|
|
@@ -5095,9 +5110,33 @@ function _i({ onStack: e }) {
|
|
|
5095
5110
|
});
|
|
5096
5111
|
}
|
|
5097
5112
|
//#endregion
|
|
5098
|
-
//#region src/presentation/
|
|
5099
|
-
var vi =
|
|
5113
|
+
//#region src/presentation/hostName.ts
|
|
5114
|
+
var vi = /* @__PURE__ */ new Set([
|
|
5115
|
+
"co",
|
|
5116
|
+
"com",
|
|
5117
|
+
"net",
|
|
5118
|
+
"org",
|
|
5119
|
+
"gov",
|
|
5120
|
+
"edu",
|
|
5121
|
+
"ac"
|
|
5122
|
+
]);
|
|
5100
5123
|
function yi(e) {
|
|
5124
|
+
let t = String(e ?? "").trim();
|
|
5125
|
+
try {
|
|
5126
|
+
t = new URL(/^[a-z]+:\/\//i.test(t) ? t : `https://${t}`).hostname;
|
|
5127
|
+
} catch {}
|
|
5128
|
+
if (t = t.toLowerCase().replace(/\.$/, ""), /^\d{1,3}(\.\d{1,3}){3}$/.test(t)) return t;
|
|
5129
|
+
let n = /(?:^|[.-])(\d{1,3})[-.](\d{1,3})[-.](\d{1,3})[-.](\d{1,3})\.(?:sslip|nip)\.io$/.exec(t);
|
|
5130
|
+
if (n) return n.slice(1, 5).join(".");
|
|
5131
|
+
let r = t.split(".").filter(Boolean);
|
|
5132
|
+
if (r.length < 2) return t;
|
|
5133
|
+
let i = r.length - 1;
|
|
5134
|
+
return r[r.length > 2 && vi.has(r[i - 1]) && r[i].length === 2 ? i - 2 : i - 1] ?? t;
|
|
5135
|
+
}
|
|
5136
|
+
//#endregion
|
|
5137
|
+
//#region src/presentation/AgenticoConnectionsSettings.tsx
|
|
5138
|
+
var bi = (e) => e instanceof Error ? e.message : String(e);
|
|
5139
|
+
function xi(e) {
|
|
5101
5140
|
let [t, n] = l(null), [r, i] = l(null);
|
|
5102
5141
|
return a(() => {
|
|
5103
5142
|
if (!e) return;
|
|
@@ -5105,7 +5144,7 @@ function yi(e) {
|
|
|
5105
5144
|
return e.me().then((e) => {
|
|
5106
5145
|
t && n(e);
|
|
5107
5146
|
}, (e) => {
|
|
5108
|
-
t && i(
|
|
5147
|
+
t && i(bi(e));
|
|
5109
5148
|
}), () => {
|
|
5110
5149
|
t = !1;
|
|
5111
5150
|
};
|
|
@@ -5114,14 +5153,14 @@ function yi(e) {
|
|
|
5114
5153
|
error: r
|
|
5115
5154
|
};
|
|
5116
5155
|
}
|
|
5117
|
-
function
|
|
5156
|
+
function Si({ backend: e, me: t, cloud: n, onStack: i }) {
|
|
5118
5157
|
let o = Q(), { locale: c } = H(), m = t.role === "platform", h = t.administers?.runners ?? m, g = s(() => n?.store ?? e.connections(), [e, n?.store]), [_, v] = l(null), [y, b] = l(null), [x, S] = l(null), [C, w] = l(null), [T, E] = l(!1), D = (e) => {
|
|
5119
5158
|
w(e), i?.(e !== null);
|
|
5120
5159
|
}, O = r(async () => {
|
|
5121
5160
|
try {
|
|
5122
5161
|
v((await g.load()).providers.length), h && b(await e.fleet.list()), S(null);
|
|
5123
5162
|
} catch (e) {
|
|
5124
|
-
S(
|
|
5163
|
+
S(bi(e));
|
|
5125
5164
|
}
|
|
5126
5165
|
}, [
|
|
5127
5166
|
e,
|
|
@@ -5163,7 +5202,7 @@ function bi({ backend: e, me: t, cloud: n, onStack: i }) {
|
|
|
5163
5202
|
}),
|
|
5164
5203
|
h && y?.map((e) => /* @__PURE__ */ W(k, {
|
|
5165
5204
|
icon: "server",
|
|
5166
|
-
title: e.
|
|
5205
|
+
title: yi(e.url),
|
|
5167
5206
|
description: e.url,
|
|
5168
5207
|
badge: e.draining ? /* @__PURE__ */ W(p, {
|
|
5169
5208
|
variant: "warning",
|
|
@@ -5231,7 +5270,7 @@ function bi({ backend: e, me: t, cloud: n, onStack: i }) {
|
|
|
5231
5270
|
onClose: A,
|
|
5232
5271
|
onAdded: A
|
|
5233
5272
|
}),
|
|
5234
|
-
C && typeof C == "object" && /* @__PURE__ */ W(
|
|
5273
|
+
C && typeof C == "object" && /* @__PURE__ */ W(Ci, {
|
|
5235
5274
|
backend: e,
|
|
5236
5275
|
runner: C.runner,
|
|
5237
5276
|
platform: m,
|
|
@@ -5240,21 +5279,21 @@ function bi({ backend: e, me: t, cloud: n, onStack: i }) {
|
|
|
5240
5279
|
]
|
|
5241
5280
|
});
|
|
5242
5281
|
}
|
|
5243
|
-
function
|
|
5244
|
-
let i = Q(), { locale: o } = H(), [c, u] = l(null), [p, m] = l(null), [h, g] = l(!1), [_, v] = l(!1), y =
|
|
5282
|
+
function Ci({ backend: e, runner: t, platform: n, onClose: r }) {
|
|
5283
|
+
let i = Q(), { locale: o } = H(), [c, u] = l(null), [p, m] = l(null), [h, g] = l(!1), [_, v] = l(!1), y = wi(e);
|
|
5245
5284
|
a(() => {
|
|
5246
5285
|
let n = !0;
|
|
5247
5286
|
return e.fleet.status(t.id).then((e) => {
|
|
5248
5287
|
n && u(e);
|
|
5249
5288
|
}, (e) => {
|
|
5250
|
-
n && m(
|
|
5289
|
+
n && m(bi(e));
|
|
5251
5290
|
}), () => {
|
|
5252
5291
|
n = !1;
|
|
5253
5292
|
};
|
|
5254
5293
|
}, [e, t.id]);
|
|
5255
|
-
let b = (n) => e.fleet.update(t.id, n).catch((e) => m(
|
|
5294
|
+
let b = (n) => e.fleet.update(t.id, n).catch((e) => m(bi(e))), S = s(() => e.runnerOfNamespace(), [e]);
|
|
5256
5295
|
return /* @__PURE__ */ G(j, {
|
|
5257
|
-
title:
|
|
5296
|
+
title: yi(t.url),
|
|
5258
5297
|
position: "right",
|
|
5259
5298
|
size: "lg",
|
|
5260
5299
|
stackedBehind: _,
|
|
@@ -5299,39 +5338,17 @@ function xi({ backend: e, runner: t, platform: n, onClose: r }) {
|
|
|
5299
5338
|
onSubmit: () => !1,
|
|
5300
5339
|
children: /* @__PURE__ */ G("div", {
|
|
5301
5340
|
className: "flex flex-col gap-2",
|
|
5302
|
-
children: [
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
let n = E.trim();
|
|
5314
|
-
if (n && n !== C) try {
|
|
5315
|
-
await e.fleet.update(t.id, { name: n }), T(n), m(null);
|
|
5316
|
-
} catch (e) {
|
|
5317
|
-
m(vi(e));
|
|
5318
|
-
}
|
|
5319
|
-
}
|
|
5320
|
-
})
|
|
5321
|
-
}),
|
|
5322
|
-
n && !t.owners?.length && /* @__PURE__ */ W(F, {
|
|
5323
|
-
name: "isDefault",
|
|
5324
|
-
label: i.runnerSetDefault,
|
|
5325
|
-
defaultValue: t.isDefault ? "on" : "",
|
|
5326
|
-
onChange: ({ value: e }) => void b({ isDefault: !!e })
|
|
5327
|
-
}),
|
|
5328
|
-
/* @__PURE__ */ W(F, {
|
|
5329
|
-
name: "draining",
|
|
5330
|
-
label: i.runnerSetDraining,
|
|
5331
|
-
defaultValue: t.draining ? "on" : "",
|
|
5332
|
-
onChange: ({ value: e }) => void b({ draining: !!e })
|
|
5333
|
-
})
|
|
5334
|
-
]
|
|
5341
|
+
children: [n && !t.owners?.length && /* @__PURE__ */ W(F, {
|
|
5342
|
+
name: "isDefault",
|
|
5343
|
+
label: i.runnerSetDefault,
|
|
5344
|
+
defaultValue: t.isDefault ? "on" : "",
|
|
5345
|
+
onChange: ({ value: e }) => void b({ isDefault: !!e })
|
|
5346
|
+
}), /* @__PURE__ */ W(F, {
|
|
5347
|
+
name: "draining",
|
|
5348
|
+
label: i.runnerSetDraining,
|
|
5349
|
+
defaultValue: t.draining ? "on" : "",
|
|
5350
|
+
onChange: ({ value: e }) => void b({ draining: !!e })
|
|
5351
|
+
})]
|
|
5335
5352
|
})
|
|
5336
5353
|
}),
|
|
5337
5354
|
/* @__PURE__ */ W(q, {
|
|
@@ -5340,7 +5357,7 @@ function xi({ backend: e, runner: t, platform: n, onClose: r }) {
|
|
|
5340
5357
|
locale: o,
|
|
5341
5358
|
onStack: v,
|
|
5342
5359
|
onChange: () => void y.reload(),
|
|
5343
|
-
renderProvider: (e, t) => t.length ? /* @__PURE__ */ W(
|
|
5360
|
+
renderProvider: (e, t) => t.length ? /* @__PURE__ */ W(Ti, {
|
|
5344
5361
|
provider: e,
|
|
5345
5362
|
defaults: y
|
|
5346
5363
|
}) : null
|
|
@@ -5354,7 +5371,7 @@ function xi({ backend: e, runner: t, platform: n, onClose: r }) {
|
|
|
5354
5371
|
try {
|
|
5355
5372
|
await e.fleet.remove(t.id), r();
|
|
5356
5373
|
} catch (e) {
|
|
5357
|
-
m(
|
|
5374
|
+
m(bi(e));
|
|
5358
5375
|
}
|
|
5359
5376
|
return g(!1), !0;
|
|
5360
5377
|
},
|
|
@@ -5362,13 +5379,13 @@ function xi({ backend: e, runner: t, platform: n, onClose: r }) {
|
|
|
5362
5379
|
})]
|
|
5363
5380
|
});
|
|
5364
5381
|
}
|
|
5365
|
-
function
|
|
5382
|
+
function wi(e) {
|
|
5366
5383
|
let [t, n] = l({}), [i, o] = l({}), [s, c] = l(null), u = r(async () => {
|
|
5367
5384
|
try {
|
|
5368
5385
|
let [t, r] = await Promise.all([e.runnerDefaults.get(), e.runner().models()]);
|
|
5369
5386
|
n(t), o(Object.fromEntries(r.providers.map((e) => [e.id, e.models]))), c(null);
|
|
5370
5387
|
} catch (e) {
|
|
5371
|
-
c(
|
|
5388
|
+
c(bi(e));
|
|
5372
5389
|
}
|
|
5373
5390
|
}, [e]);
|
|
5374
5391
|
return a(() => {
|
|
@@ -5382,12 +5399,12 @@ function Si(e) {
|
|
|
5382
5399
|
try {
|
|
5383
5400
|
n(await e.runnerDefaults.set(t, r)), c(null);
|
|
5384
5401
|
} catch (e) {
|
|
5385
|
-
c(
|
|
5402
|
+
c(bi(e));
|
|
5386
5403
|
}
|
|
5387
5404
|
}
|
|
5388
5405
|
};
|
|
5389
5406
|
}
|
|
5390
|
-
function
|
|
5407
|
+
function Ti({ provider: e, defaults: t }) {
|
|
5391
5408
|
let n = Q(), r = t.values[e] ?? {}, i = t.models[e] ?? [], a = {
|
|
5392
5409
|
low: n.settingsReasoningLow,
|
|
5393
5410
|
medium: n.settingsReasoningMedium,
|
|
@@ -5458,15 +5475,15 @@ function Ci({ provider: e, defaults: t }) {
|
|
|
5458
5475
|
]
|
|
5459
5476
|
});
|
|
5460
5477
|
}
|
|
5461
|
-
var
|
|
5462
|
-
function
|
|
5478
|
+
var Ei = (e, t) => t.ok ? e.memoryOk : t.error === "rejected" ? e.memoryRejected : t.error === "unreachable" ? e.memoryUnreachable : e.memoryInvalid;
|
|
5479
|
+
function Di({ backend: e, onStack: t }) {
|
|
5463
5480
|
let n = Q(), [i, o] = l(null), [s, c] = l(null), [u, d] = l(null), p = (e) => {
|
|
5464
5481
|
d(e), t?.(e !== null);
|
|
5465
5482
|
}, m = r(async () => {
|
|
5466
5483
|
try {
|
|
5467
5484
|
o(await e.memories.list()), c(null);
|
|
5468
5485
|
} catch (e) {
|
|
5469
|
-
c(
|
|
5486
|
+
c(bi(e));
|
|
5470
5487
|
}
|
|
5471
5488
|
}, [e]);
|
|
5472
5489
|
return a(() => {
|
|
@@ -5490,7 +5507,7 @@ function Ti({ backend: e, onStack: t }) {
|
|
|
5490
5507
|
className: "grid gap-3 sm:grid-cols-2",
|
|
5491
5508
|
children: [i?.map((e) => /* @__PURE__ */ W(k, {
|
|
5492
5509
|
icon: "database",
|
|
5493
|
-
title: e.
|
|
5510
|
+
title: yi(e.apiUrl),
|
|
5494
5511
|
description: e.apiUrl,
|
|
5495
5512
|
meta: e.mcpUrl,
|
|
5496
5513
|
onClick: () => p(e)
|
|
@@ -5502,7 +5519,7 @@ function Ti({ backend: e, onStack: t }) {
|
|
|
5502
5519
|
onClick: () => p("add")
|
|
5503
5520
|
})]
|
|
5504
5521
|
}),
|
|
5505
|
-
u && /* @__PURE__ */ W(
|
|
5522
|
+
u && /* @__PURE__ */ W(Oi, {
|
|
5506
5523
|
backend: e,
|
|
5507
5524
|
memory: u === "add" ? null : u,
|
|
5508
5525
|
onClose: () => {
|
|
@@ -5512,21 +5529,32 @@ function Ti({ backend: e, onStack: t }) {
|
|
|
5512
5529
|
]
|
|
5513
5530
|
});
|
|
5514
5531
|
}
|
|
5515
|
-
function
|
|
5516
|
-
let r = Q(), [i,
|
|
5517
|
-
name: t?.name ?? "",
|
|
5532
|
+
function Oi({ backend: e, memory: t, onClose: n }) {
|
|
5533
|
+
let r = Q(), [i, o] = l({
|
|
5518
5534
|
apiUrl: t?.apiUrl ?? "",
|
|
5519
5535
|
mcpUrl: t?.mcpUrl ?? "",
|
|
5520
5536
|
key: ""
|
|
5521
|
-
}), [
|
|
5537
|
+
}), [s, c] = l(null), [u, m] = l(!1), [h, g] = l(null), [_, v] = l(null), y = (e) => ({ value: t }) => o((n) => ({
|
|
5522
5538
|
...n,
|
|
5523
5539
|
[e]: String(t ?? "")
|
|
5524
|
-
})),
|
|
5540
|
+
})), b = (e) => c({
|
|
5525
5541
|
variant: "danger",
|
|
5526
|
-
text: R(r.connectionsError, { error:
|
|
5542
|
+
text: R(r.connectionsError, { error: bi(e) })
|
|
5527
5543
|
});
|
|
5544
|
+
a(() => {
|
|
5545
|
+
if (!t) return;
|
|
5546
|
+
let n = !0;
|
|
5547
|
+
return e.memories.namespaces(t.id).then((e) => {
|
|
5548
|
+
n && g(e);
|
|
5549
|
+
}, (e) => {
|
|
5550
|
+
n && v(bi(e));
|
|
5551
|
+
}), () => {
|
|
5552
|
+
n = !1;
|
|
5553
|
+
};
|
|
5554
|
+
}, [e, t]);
|
|
5555
|
+
let x = i.apiUrl.trim() ? yi(i.apiUrl) : r.memoryAdd, S = !!i.apiUrl.trim() && (!!i.key.trim() || !!t);
|
|
5528
5556
|
return /* @__PURE__ */ G(j, {
|
|
5529
|
-
title: t
|
|
5557
|
+
title: t ? yi(t.apiUrl) : x,
|
|
5530
5558
|
position: "right",
|
|
5531
5559
|
size: "lg",
|
|
5532
5560
|
onClose: n,
|
|
@@ -5535,12 +5563,12 @@ function Ei({ backend: e, memory: t, onClose: n }) {
|
|
|
5535
5563
|
variant: "outline-danger",
|
|
5536
5564
|
icon: "trash",
|
|
5537
5565
|
label: r.memoryRemove,
|
|
5538
|
-
onClick: () =>
|
|
5566
|
+
onClick: () => m(!0)
|
|
5539
5567
|
}),
|
|
5540
5568
|
/* @__PURE__ */ W(A, {
|
|
5541
5569
|
variant: "outline-primary",
|
|
5542
5570
|
label: r.memoryCheck,
|
|
5543
|
-
disabled: !
|
|
5571
|
+
disabled: !S || !t && !i.key.trim(),
|
|
5544
5572
|
onClick: async () => {
|
|
5545
5573
|
let t = await e.memories.check({
|
|
5546
5574
|
apiUrl: i.apiUrl,
|
|
@@ -5550,117 +5578,171 @@ function Ei({ backend: e, memory: t, onClose: n }) {
|
|
|
5550
5578
|
error: "unreachable",
|
|
5551
5579
|
failure: e
|
|
5552
5580
|
}));
|
|
5553
|
-
|
|
5581
|
+
c({
|
|
5554
5582
|
variant: t.ok ? "success" : "danger",
|
|
5555
|
-
text:
|
|
5583
|
+
text: Ei(r, t)
|
|
5556
5584
|
});
|
|
5557
5585
|
}
|
|
5558
5586
|
}),
|
|
5559
5587
|
/* @__PURE__ */ W(A, {
|
|
5560
5588
|
variant: "primary",
|
|
5561
5589
|
label: r.memorySave,
|
|
5562
|
-
disabled: t ? !
|
|
5590
|
+
disabled: t ? !i.apiUrl.trim() : !i.apiUrl.trim() || !i.key.trim(),
|
|
5563
5591
|
onClick: async () => {
|
|
5564
5592
|
try {
|
|
5593
|
+
let r = yi(i.apiUrl);
|
|
5565
5594
|
t ? await e.memories.update(t.id, {
|
|
5566
|
-
name:
|
|
5567
|
-
mcpUrl: i.mcpUrl || null,
|
|
5595
|
+
name: r,
|
|
5596
|
+
mcpUrl: i.mcpUrl.trim() || null,
|
|
5597
|
+
...i.apiUrl.trim() === t.apiUrl ? {} : { apiUrl: i.apiUrl.trim() },
|
|
5568
5598
|
...i.key.trim() ? { key: i.key } : {}
|
|
5569
5599
|
}) : await e.memories.add({
|
|
5570
|
-
name:
|
|
5600
|
+
name: r,
|
|
5571
5601
|
apiUrl: i.apiUrl,
|
|
5572
|
-
mcpUrl: i.mcpUrl || void 0,
|
|
5602
|
+
mcpUrl: i.mcpUrl.trim() || void 0,
|
|
5573
5603
|
key: i.key
|
|
5574
5604
|
}), n();
|
|
5575
5605
|
} catch (e) {
|
|
5576
|
-
|
|
5606
|
+
b(e);
|
|
5577
5607
|
}
|
|
5578
5608
|
}
|
|
5579
5609
|
})
|
|
5580
5610
|
] }),
|
|
5581
|
-
children: [/* @__PURE__ */
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5611
|
+
children: [/* @__PURE__ */ G("div", {
|
|
5612
|
+
className: "flex flex-col gap-5",
|
|
5613
|
+
children: [/* @__PURE__ */ W(w, {
|
|
5614
|
+
appearance: "empty",
|
|
5615
|
+
showNotice: !1,
|
|
5616
|
+
onSubmit: () => !1,
|
|
5617
|
+
children: /* @__PURE__ */ G("div", {
|
|
5618
|
+
className: "flex flex-col gap-3",
|
|
5619
|
+
children: [
|
|
5620
|
+
s && /* @__PURE__ */ W(f, {
|
|
5621
|
+
variant: s.variant,
|
|
5622
|
+
children: s.text
|
|
5623
|
+
}),
|
|
5624
|
+
/* @__PURE__ */ W(P, {
|
|
5625
|
+
name: "mcpUrl",
|
|
5626
|
+
label: r.memoryMcpUrl,
|
|
5627
|
+
feedback: r.memoryMcpUrlHint,
|
|
5628
|
+
placeholder: "https://memory.example.com/mcp",
|
|
5629
|
+
defaultValue: i.mcpUrl,
|
|
5630
|
+
onChange: y("mcpUrl")
|
|
5631
|
+
}),
|
|
5632
|
+
/* @__PURE__ */ W(P, {
|
|
5633
|
+
name: "apiUrl",
|
|
5634
|
+
label: r.memoryApiUrl,
|
|
5635
|
+
placeholder: "https://memory.example.com",
|
|
5636
|
+
defaultValue: i.apiUrl,
|
|
5637
|
+
onChange: y("apiUrl")
|
|
5638
|
+
}),
|
|
5639
|
+
/* @__PURE__ */ W(te, {
|
|
5640
|
+
name: "key",
|
|
5641
|
+
label: r.memoryKey,
|
|
5642
|
+
autoComplete: "off",
|
|
5643
|
+
placeholder: t ? r.memoryKeySaved : void 0,
|
|
5644
|
+
feedback: t ? r.memoryKeyKeep : void 0,
|
|
5645
|
+
onChange: y("key")
|
|
5646
|
+
})
|
|
5647
|
+
]
|
|
5648
|
+
})
|
|
5649
|
+
}), t && /* @__PURE__ */ G("section", {
|
|
5650
|
+
className: "flex flex-col gap-2",
|
|
5587
5651
|
children: [
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
children:
|
|
5652
|
+
/* @__PURE__ */ W("h5", {
|
|
5653
|
+
className: "text-sm font-semibold",
|
|
5654
|
+
children: R(r.memoryNamespaces, { count: h?.length ?? 0 })
|
|
5591
5655
|
}),
|
|
5592
|
-
/* @__PURE__ */ W(
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
defaultValue: i.name,
|
|
5596
|
-
onChange: p("name")
|
|
5656
|
+
_ && /* @__PURE__ */ W(f, {
|
|
5657
|
+
variant: "warning",
|
|
5658
|
+
children: R(r.connectionsError, { error: _ })
|
|
5597
5659
|
}),
|
|
5598
|
-
/* @__PURE__ */ W(
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
placeholder: "https://memory.example.com",
|
|
5602
|
-
defaultValue: i.apiUrl,
|
|
5603
|
-
disabled: !!t,
|
|
5604
|
-
onChange: p("apiUrl")
|
|
5605
|
-
}),
|
|
5606
|
-
/* @__PURE__ */ W(P, {
|
|
5607
|
-
name: "mcpUrl",
|
|
5608
|
-
label: r.memoryMcpUrl,
|
|
5609
|
-
placeholder: "https://memory.example.com/mcp",
|
|
5610
|
-
defaultValue: i.mcpUrl,
|
|
5611
|
-
onChange: p("mcpUrl")
|
|
5612
|
-
}),
|
|
5613
|
-
/* @__PURE__ */ W(te, {
|
|
5614
|
-
name: "key",
|
|
5615
|
-
label: r.memoryKey,
|
|
5616
|
-
autoComplete: "off",
|
|
5617
|
-
onChange: p("key")
|
|
5660
|
+
!h && !_ && /* @__PURE__ */ W("p", {
|
|
5661
|
+
className: "text-xs text-muted-foreground",
|
|
5662
|
+
children: r.memoryNamespacesLoading
|
|
5618
5663
|
}),
|
|
5619
|
-
|
|
5664
|
+
h && !h.length && /* @__PURE__ */ W("p", {
|
|
5620
5665
|
className: "text-xs text-muted-foreground",
|
|
5621
|
-
children: r.
|
|
5666
|
+
children: r.memoryNamespacesNone
|
|
5667
|
+
}),
|
|
5668
|
+
h && h.length > 0 && /* @__PURE__ */ W("ul", {
|
|
5669
|
+
className: "divide-y divide-border rounded-md border border-border text-sm",
|
|
5670
|
+
children: h.map((e) => /* @__PURE__ */ G("li", {
|
|
5671
|
+
className: "flex flex-wrap items-center justify-between gap-2 px-3 py-2",
|
|
5672
|
+
children: [/* @__PURE__ */ W("span", {
|
|
5673
|
+
className: "font-mono text-xs",
|
|
5674
|
+
children: e.namespace
|
|
5675
|
+
}), /* @__PURE__ */ G("span", {
|
|
5676
|
+
className: "flex flex-wrap items-center gap-1",
|
|
5677
|
+
children: [/* @__PURE__ */ W(p, {
|
|
5678
|
+
variant: "light",
|
|
5679
|
+
children: R(r.memoryDocuments, { count: e.documents })
|
|
5680
|
+
}), /* @__PURE__ */ W(p, {
|
|
5681
|
+
variant: "light",
|
|
5682
|
+
children: R(r.memoryMemories, { count: e.memories })
|
|
5683
|
+
})]
|
|
5684
|
+
})]
|
|
5685
|
+
}, e.namespace))
|
|
5622
5686
|
})
|
|
5623
5687
|
]
|
|
5624
|
-
})
|
|
5625
|
-
}),
|
|
5688
|
+
})]
|
|
5689
|
+
}), u && t && /* @__PURE__ */ W(ee, {
|
|
5626
5690
|
title: r.memoryRemove,
|
|
5627
5691
|
danger: !0,
|
|
5628
|
-
onClose: () =>
|
|
5692
|
+
onClose: () => m(!1),
|
|
5629
5693
|
onYes: async () => {
|
|
5630
5694
|
try {
|
|
5631
5695
|
await e.memories.remove(t.id), n();
|
|
5632
5696
|
} catch (e) {
|
|
5633
|
-
|
|
5697
|
+
b(e);
|
|
5634
5698
|
}
|
|
5635
|
-
return
|
|
5699
|
+
return m(!1), !0;
|
|
5636
5700
|
},
|
|
5637
|
-
children: R(r.memoryRemoveConfirm, { name: t.
|
|
5701
|
+
children: R(r.memoryRemoveConfirm, { name: yi(t.apiUrl) })
|
|
5638
5702
|
})]
|
|
5639
5703
|
});
|
|
5640
5704
|
}
|
|
5641
|
-
function
|
|
5642
|
-
let n = Q(), i = t.role === "platform", [o, s] = l(null), [c, u] = l([]), [d,
|
|
5705
|
+
function ki({ backend: e, me: t }) {
|
|
5706
|
+
let n = Q(), i = t.role === "platform", [o, s] = l(null), [c, u] = l([]), [d, h] = l([]), [g, _] = l(null), v = r(async () => {
|
|
5643
5707
|
try {
|
|
5644
5708
|
let [t, n, r] = await Promise.all([
|
|
5645
5709
|
e.projects.list(),
|
|
5646
5710
|
e.fleet.list(),
|
|
5647
5711
|
e.memories.list()
|
|
5648
5712
|
]);
|
|
5649
|
-
s(t.namespaces), u(n),
|
|
5713
|
+
s(t.namespaces), u(n), h(r), _(null);
|
|
5650
5714
|
} catch (e) {
|
|
5651
|
-
|
|
5715
|
+
_(bi(e));
|
|
5652
5716
|
}
|
|
5653
5717
|
}, [e, i]);
|
|
5654
5718
|
a(() => {
|
|
5655
|
-
|
|
5656
|
-
}, [
|
|
5657
|
-
let
|
|
5719
|
+
v();
|
|
5720
|
+
}, [v]);
|
|
5721
|
+
let y = async (t, n) => {
|
|
5658
5722
|
try {
|
|
5659
|
-
await e.projects.set(t, n), await
|
|
5723
|
+
await e.projects.set(t, n), await v();
|
|
5660
5724
|
} catch (e) {
|
|
5661
|
-
|
|
5725
|
+
_(bi(e));
|
|
5662
5726
|
}
|
|
5663
|
-
}
|
|
5727
|
+
}, b = (e) => {
|
|
5728
|
+
let t = c.find((t) => t.id === e.runner?.id);
|
|
5729
|
+
return t ? yi(t.url) : e.runner?.name ?? n.projectsDefaultRunner;
|
|
5730
|
+
}, x = (e) => {
|
|
5731
|
+
let t = d.find((t) => t.id === e.memory?.id);
|
|
5732
|
+
return t ? yi(t.apiUrl) : e.memory?.name ?? n.projectsNoMemory;
|
|
5733
|
+
}, S = (e, t, n) => /* @__PURE__ */ G("div", {
|
|
5734
|
+
className: "flex items-start gap-3",
|
|
5735
|
+
children: [/* @__PURE__ */ W("span", {
|
|
5736
|
+
className: "mt-6 flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary",
|
|
5737
|
+
children: /* @__PURE__ */ W(T, { name: e })
|
|
5738
|
+
}), /* @__PURE__ */ W("div", {
|
|
5739
|
+
className: "min-w-0 flex-1",
|
|
5740
|
+
children: n ?? /* @__PURE__ */ W("span", {
|
|
5741
|
+
className: "text-sm",
|
|
5742
|
+
children: t
|
|
5743
|
+
})
|
|
5744
|
+
})]
|
|
5745
|
+
});
|
|
5664
5746
|
return /* @__PURE__ */ G("div", {
|
|
5665
5747
|
className: "flex flex-col gap-3",
|
|
5666
5748
|
children: [
|
|
@@ -5672,83 +5754,80 @@ function Di({ backend: e, me: t }) {
|
|
|
5672
5754
|
className: "text-xs text-muted-foreground",
|
|
5673
5755
|
children: n.projectsReadOnly
|
|
5674
5756
|
}),
|
|
5675
|
-
|
|
5757
|
+
g && /* @__PURE__ */ W(f, {
|
|
5676
5758
|
variant: "danger",
|
|
5677
|
-
children: R(n.connectionsError, { error:
|
|
5759
|
+
children: R(n.connectionsError, { error: g })
|
|
5678
5760
|
}),
|
|
5679
|
-
o?.map((e) =>
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
children: [/* @__PURE__ */ W("span", {
|
|
5761
|
+
o?.map((e) => {
|
|
5762
|
+
let r = i || e.namespace === t.namespace;
|
|
5763
|
+
return /* @__PURE__ */ W(m, {
|
|
5764
|
+
headerClassName: "justify-between",
|
|
5765
|
+
header: /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("span", {
|
|
5684
5766
|
className: "font-medium",
|
|
5685
5767
|
children: e.name ?? e.tenant ?? e.namespace
|
|
5686
|
-
}), /* @__PURE__ */ W(
|
|
5687
|
-
|
|
5688
|
-
children:
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
}
|
|
5731
|
-
|
|
5732
|
-
children: e.memory?.name ?? n.projectsNoMemory
|
|
5733
|
-
})] })]
|
|
5734
|
-
}, e.namespace))
|
|
5768
|
+
}), /* @__PURE__ */ W(p, {
|
|
5769
|
+
variant: "light",
|
|
5770
|
+
children: /* @__PURE__ */ W("span", {
|
|
5771
|
+
className: "font-mono",
|
|
5772
|
+
children: e.namespace
|
|
5773
|
+
})
|
|
5774
|
+
})] }),
|
|
5775
|
+
children: /* @__PURE__ */ W(w, {
|
|
5776
|
+
appearance: "empty",
|
|
5777
|
+
showNotice: !1,
|
|
5778
|
+
onSubmit: () => !1,
|
|
5779
|
+
children: /* @__PURE__ */ G("div", {
|
|
5780
|
+
className: "grid gap-4 sm:grid-cols-2",
|
|
5781
|
+
children: [S("server", b(e), r && (i || c.length > 0) ? /* @__PURE__ */ W(N, {
|
|
5782
|
+
name: `runner-${e.namespace}`,
|
|
5783
|
+
label: n.projectsRunner,
|
|
5784
|
+
defaultValue: e.runner?.id ?? "",
|
|
5785
|
+
placeholderOption: {
|
|
5786
|
+
label: n.projectsDefaultRunner,
|
|
5787
|
+
value: ""
|
|
5788
|
+
},
|
|
5789
|
+
options: c.map((e) => ({
|
|
5790
|
+
label: yi(e.url),
|
|
5791
|
+
value: e.id
|
|
5792
|
+
})),
|
|
5793
|
+
onChange: ({ value: t }) => {
|
|
5794
|
+
t && y(e.namespace, { runnerId: String(t) });
|
|
5795
|
+
}
|
|
5796
|
+
}) : null), S("database", x(e), r ? /* @__PURE__ */ W(N, {
|
|
5797
|
+
name: `memory-${e.namespace}`,
|
|
5798
|
+
label: n.projectsMemory,
|
|
5799
|
+
defaultValue: e.memory?.id ?? "",
|
|
5800
|
+
placeholderOption: {
|
|
5801
|
+
label: n.projectsNoMemory,
|
|
5802
|
+
value: ""
|
|
5803
|
+
},
|
|
5804
|
+
options: d.map((e) => ({
|
|
5805
|
+
label: yi(e.apiUrl),
|
|
5806
|
+
value: e.id
|
|
5807
|
+
})),
|
|
5808
|
+
onChange: ({ value: t }) => void y(e.namespace, { memoryId: t ? String(t) : null })
|
|
5809
|
+
}) : null)]
|
|
5810
|
+
})
|
|
5811
|
+
})
|
|
5812
|
+
}, e.namespace);
|
|
5813
|
+
})
|
|
5735
5814
|
]
|
|
5736
5815
|
});
|
|
5737
5816
|
}
|
|
5738
5817
|
//#endregion
|
|
5739
5818
|
//#region src/presentation/AgenticoSettingsModal.tsx
|
|
5740
|
-
var
|
|
5819
|
+
var Ai = [
|
|
5741
5820
|
"low",
|
|
5742
5821
|
"medium",
|
|
5743
5822
|
"high",
|
|
5744
5823
|
"max"
|
|
5745
5824
|
];
|
|
5746
|
-
function
|
|
5825
|
+
function ji() {
|
|
5747
5826
|
let { shown: e, connections: t, backend: n } = $t();
|
|
5748
5827
|
return e.length > 0 || !!t || !!n || J().length > 0;
|
|
5749
5828
|
}
|
|
5750
|
-
function
|
|
5751
|
-
let e = Q(), { settings: t, shown: n, connections: r, models: i, tabs: a, backend: o, save: s, isOpen: c, close: f } = $t(), { me: p } =
|
|
5829
|
+
function Mi() {
|
|
5830
|
+
let e = Q(), { settings: t, shown: n, connections: r, models: i, tabs: a, backend: o, save: s, isOpen: c, close: f } = $t(), { me: p } = xi(c ? o : void 0), m = V(), h = ae()?.registry ?? {}, { modelsByProvider: g } = hr({ unfiltered: !0 }), [_, v] = l(0), [y, b] = l(!1);
|
|
5752
5831
|
if (!c) return null;
|
|
5753
5832
|
let x = J().length > 0, S = Object.keys(h), C = (e) => h[e]?.label ?? e, T = i ? i.map((e) => ({
|
|
5754
5833
|
label: e.group ? `${e.group} / ${e.label}` : e.label,
|
|
@@ -5824,7 +5903,7 @@ function Ai() {
|
|
|
5824
5903
|
label: e.settingsReasoningDefault,
|
|
5825
5904
|
value: ""
|
|
5826
5905
|
},
|
|
5827
|
-
options:
|
|
5906
|
+
options: Ai.map((e) => ({
|
|
5828
5907
|
label: E[e],
|
|
5829
5908
|
value: e
|
|
5830
5909
|
}))
|
|
@@ -5865,7 +5944,7 @@ function Ai() {
|
|
|
5865
5944
|
}, "pages"),
|
|
5866
5945
|
o && p && /* @__PURE__ */ W(I, {
|
|
5867
5946
|
label: e.connectionsTab,
|
|
5868
|
-
children: /* @__PURE__ */ W(
|
|
5947
|
+
children: /* @__PURE__ */ W(Si, {
|
|
5869
5948
|
backend: o,
|
|
5870
5949
|
me: p,
|
|
5871
5950
|
onStack: b,
|
|
@@ -5874,14 +5953,14 @@ function Ai() {
|
|
|
5874
5953
|
}, "connections"),
|
|
5875
5954
|
o && p && (p.administers?.memories ?? p.role === "platform") && /* @__PURE__ */ W(I, {
|
|
5876
5955
|
label: e.memoryTab,
|
|
5877
|
-
children: /* @__PURE__ */ W(
|
|
5956
|
+
children: /* @__PURE__ */ W(Di, {
|
|
5878
5957
|
backend: o,
|
|
5879
5958
|
onStack: b
|
|
5880
5959
|
})
|
|
5881
5960
|
}, "memory"),
|
|
5882
5961
|
o && p && p.role !== "member" && /* @__PURE__ */ W(I, {
|
|
5883
5962
|
label: e.projectsTab,
|
|
5884
|
-
children: /* @__PURE__ */ W(
|
|
5963
|
+
children: /* @__PURE__ */ W(ki, {
|
|
5885
5964
|
backend: o,
|
|
5886
5965
|
me: p
|
|
5887
5966
|
})
|
|
@@ -5900,7 +5979,7 @@ function Ai() {
|
|
|
5900
5979
|
}
|
|
5901
5980
|
//#endregion
|
|
5902
5981
|
//#region src/presentation/Agentico.tsx
|
|
5903
|
-
function
|
|
5982
|
+
function Ni(e, t) {
|
|
5904
5983
|
return Object.values(e).flat().map((e) => {
|
|
5905
5984
|
let n = t?.(e.provider, e.providerLabel ?? e.provider);
|
|
5906
5985
|
return {
|
|
@@ -5912,7 +5991,7 @@ function ji(e, t) {
|
|
|
5912
5991
|
};
|
|
5913
5992
|
});
|
|
5914
5993
|
}
|
|
5915
|
-
function
|
|
5994
|
+
function Pi({ task: e, editing: t, onCancelEdit: n, onSendEdit: r }) {
|
|
5916
5995
|
let i = Q(), [o, s] = l(""), { agent: u, onApplied: f, manualEntry: p } = e, m = u.running;
|
|
5917
5996
|
a(() => {
|
|
5918
5997
|
t && s(t.detail ?? "");
|
|
@@ -5936,7 +6015,7 @@ function Mi({ task: e, editing: t, onCancelEdit: n, onSendEdit: r }) {
|
|
|
5936
6015
|
}).then((e) => {
|
|
5937
6016
|
e && f(e);
|
|
5938
6017
|
});
|
|
5939
|
-
}, y = !!p || u.remote && u.remoteModels.length === 0, b = u.alongside && u.remoteModels.some((e) => e.value === u.selectedModel), x = !y && !u.remote && !b && u.hasProviders && !u.selectedModel, S = y ? [] : u.remote ? u.remoteModels : u.alongside ? [...u.remoteModels, ...
|
|
6018
|
+
}, y = !!p || u.remote && u.remoteModels.length === 0, b = u.alongside && u.remoteModels.some((e) => e.value === u.selectedModel), x = !y && !u.remote && !b && u.hasProviders && !u.selectedModel, S = y ? [] : u.remote ? u.remoteModels : u.alongside ? [...u.remoteModels, ...Ni(u.modelsByProvider, u.catalogGroup)] : Ni(u.modelsByProvider);
|
|
5940
6019
|
return /* @__PURE__ */ G(U, { children: [t && /* @__PURE__ */ G("div", {
|
|
5941
6020
|
className: "mb-2 flex items-center gap-2 text-xs text-muted-foreground",
|
|
5942
6021
|
children: [
|
|
@@ -5977,7 +6056,7 @@ function Mi({ task: e, editing: t, onCancelEdit: n, onSendEdit: r }) {
|
|
|
5977
6056
|
maxHeight: 220
|
|
5978
6057
|
})] });
|
|
5979
6058
|
}
|
|
5980
|
-
function
|
|
6059
|
+
function Fi() {
|
|
5981
6060
|
let { startOrchestrator: e } = $(), t = Q(), [n, r] = l(""), { hasProviders: i, modelsByProvider: a, selectedModel: o, setSelectedModel: s } = hr(), c = tn(), u = (t) => {
|
|
5982
6061
|
t.text.trim() && (e(t.text.trim(), {
|
|
5983
6062
|
attachments: t.files.length > 0 ? t.files : void 0,
|
|
@@ -5991,7 +6070,7 @@ function Ni() {
|
|
|
5991
6070
|
disabled: !n.trim() || d,
|
|
5992
6071
|
onSubmit: u,
|
|
5993
6072
|
attachments: !0,
|
|
5994
|
-
models: [...c?.models() ?? [], ...
|
|
6073
|
+
models: [...c?.models() ?? [], ...Ni(a)],
|
|
5995
6074
|
selectedModel: o,
|
|
5996
6075
|
onModelChange: s,
|
|
5997
6076
|
modelPlaceholder: t.selectModelPlaceholder,
|
|
@@ -5999,7 +6078,7 @@ function Ni() {
|
|
|
5999
6078
|
maxHeight: 220
|
|
6000
6079
|
});
|
|
6001
6080
|
}
|
|
6002
|
-
function
|
|
6081
|
+
function Ii({ chat: e, onClose: t }) {
|
|
6003
6082
|
let n = Q(), r = V();
|
|
6004
6083
|
return /* @__PURE__ */ W(j, {
|
|
6005
6084
|
title: n.renameChat,
|
|
@@ -6022,7 +6101,7 @@ function Pi({ chat: e, onClose: t }) {
|
|
|
6022
6101
|
})
|
|
6023
6102
|
});
|
|
6024
6103
|
}
|
|
6025
|
-
function
|
|
6104
|
+
function Li(e, t, n = Date.now()) {
|
|
6026
6105
|
let r = Math.round((e - n) / 1e3), i = new Intl.RelativeTimeFormat(t, {
|
|
6027
6106
|
numeric: "auto",
|
|
6028
6107
|
style: "short"
|
|
@@ -6034,7 +6113,7 @@ function Fi(e, t, n = Date.now()) {
|
|
|
6034
6113
|
]) if (Math.abs(r) >= t) return i.format(Math.round(r / t), e);
|
|
6035
6114
|
return i.format(0, "minute");
|
|
6036
6115
|
}
|
|
6037
|
-
function
|
|
6116
|
+
function Ri({ card: e }) {
|
|
6038
6117
|
let t = Q();
|
|
6039
6118
|
return e.humanSummaryOnly ? /* @__PURE__ */ G("div", {
|
|
6040
6119
|
className: "space-y-2 rounded-lg border border-border/60 p-3",
|
|
@@ -6090,7 +6169,7 @@ function Ii({ card: e }) {
|
|
|
6090
6169
|
]
|
|
6091
6170
|
});
|
|
6092
6171
|
}
|
|
6093
|
-
function
|
|
6172
|
+
function zi({ messages: e }) {
|
|
6094
6173
|
return /* @__PURE__ */ W("div", {
|
|
6095
6174
|
className: "space-y-2 rounded-lg border border-border/60 p-3",
|
|
6096
6175
|
children: e.map((e, t) => /* @__PURE__ */ W("p", {
|
|
@@ -6099,7 +6178,7 @@ function Li({ messages: e }) {
|
|
|
6099
6178
|
}, t))
|
|
6100
6179
|
});
|
|
6101
6180
|
}
|
|
6102
|
-
function
|
|
6181
|
+
function Bi({ scopeId: e, currentTaskId: t, open: n, onOpenChange: r, onSelect: i, onNewChat: o, onArchivedCurrent: c }) {
|
|
6103
6182
|
let u = Q(), { locale: f } = H(), [p, m] = l(""), [h, g] = l(0);
|
|
6104
6183
|
a(() => at(() => g((e) => e + 1)), []);
|
|
6105
6184
|
let _ = s(() => n ? vt(e) : [], [
|
|
@@ -6188,17 +6267,17 @@ function Ri({ scopeId: e, currentTaskId: t, open: n, onOpenChange: r, onSelect:
|
|
|
6188
6267
|
}), /* @__PURE__ */ W("span", {
|
|
6189
6268
|
className: "shrink-0 text-xs text-muted-foreground",
|
|
6190
6269
|
title: `${u.chatStarted.replace("{at}", new Date(gt(e)).toLocaleString(f))} · ${u.chatLastMessage.replace("{at}", new Date(e.savedAt).toLocaleString(f))}`,
|
|
6191
|
-
children:
|
|
6270
|
+
children: Li(gt(e), f)
|
|
6192
6271
|
})]
|
|
6193
6272
|
})
|
|
6194
6273
|
}, `${e.subagentId}:${e.entityId}`);
|
|
6195
6274
|
})
|
|
6196
|
-
}), v && /* @__PURE__ */ W(
|
|
6275
|
+
}), v && /* @__PURE__ */ W(Ii, {
|
|
6197
6276
|
chat: v,
|
|
6198
6277
|
onClose: () => y(null)
|
|
6199
6278
|
})] });
|
|
6200
6279
|
}
|
|
6201
|
-
function
|
|
6280
|
+
function Vi({ defaultWidth: e, minWidth: t, maxWidth: n, onWidthChange: r } = {}) {
|
|
6202
6281
|
let { task: i, isOpen: o, pendingGoal: u, orchestratorRunId: f, pageContext: p, pageContextCard: m, anchoredUserMessages: h, pendingResume: g, resumeRunId: _, dismissForeignTask: v, resumeEntityChat: y, pendingManualEntry: b, manualEntryRunId: x, startManualEntry: S, pendingExtraDestinations: C, pendingResumeWithAI: w, resumeWithAIRunId: T, pendingStart: E, startRunId: D, scope: O, threadEvents: k } = $(), A = Q(), j = c(null), [te, M] = l(!1), [N, P] = l(null), [F, ne] = l(null);
|
|
6203
6282
|
a(() => {
|
|
6204
6283
|
P(null), ne(null);
|
|
@@ -6210,7 +6289,7 @@ function zi({ defaultWidth: e, minWidth: t, maxWidth: n, onWidthChange: r } = {}
|
|
|
6210
6289
|
onWidthChange: r
|
|
6211
6290
|
}), re = () => {
|
|
6212
6291
|
(!i || i.agent.running || i.savedToDisk || window.confirm(A.unsavedConversationConfirm)) && (v(), M(!1));
|
|
6213
|
-
}, L = i ? [...i.precedingActivity ?? [], ...i.agent.activity] : [], ie = L.length, R = Math.max(0, Math.min(i?.panelExtraAnchorIndex ?? ie, ie)), z = L.slice(0, R), B = L.slice(R), ae = !!(i && !i.agent.running && i.agent.error), [V, H, oe] = vn(), se = $t(), ce =
|
|
6292
|
+
}, L = i ? [...i.precedingActivity ?? [], ...i.agent.activity] : [], ie = L.length, R = Math.max(0, Math.min(i?.panelExtraAnchorIndex ?? ie, ie)), z = L.slice(0, R), B = L.slice(R), ae = !!(i && !i.agent.running && i.agent.error), [V, H, oe] = vn(), se = $t(), ce = ji(), K = c({ at: Date.now() });
|
|
6214
6293
|
K.current.id !== i?.id && (K.current = {
|
|
6215
6294
|
id: i?.id,
|
|
6216
6295
|
at: Date.now()
|
|
@@ -6335,7 +6414,7 @@ function zi({ defaultWidth: e, minWidth: t, maxWidth: n, onWidthChange: r } = {}
|
|
|
6335
6414
|
className: `p-1 ${V ? "text-primary" : "text-muted-foreground"}`,
|
|
6336
6415
|
onClick: () => H(!V)
|
|
6337
6416
|
}),
|
|
6338
|
-
O && /* @__PURE__ */ W(
|
|
6417
|
+
O && /* @__PURE__ */ W(Bi, {
|
|
6339
6418
|
scopeId: O.id,
|
|
6340
6419
|
currentTaskId: i?.id ?? null,
|
|
6341
6420
|
open: te,
|
|
@@ -6355,7 +6434,7 @@ function zi({ defaultWidth: e, minWidth: t, maxWidth: n, onWidthChange: r } = {}
|
|
|
6355
6434
|
/* @__PURE__ */ W(rr, {})
|
|
6356
6435
|
]
|
|
6357
6436
|
}),
|
|
6358
|
-
/* @__PURE__ */ W(
|
|
6437
|
+
/* @__PURE__ */ W(Mi, {}),
|
|
6359
6438
|
/* @__PURE__ */ W("div", {
|
|
6360
6439
|
ref: j,
|
|
6361
6440
|
className: `flex-1 overflow-y-auto px-3 pb-2 ${J ? "min-h-24" : "min-h-0"}`,
|
|
@@ -6438,7 +6517,7 @@ function zi({ defaultWidth: e, minWidth: t, maxWidth: n, onWidthChange: r } = {}
|
|
|
6438
6517
|
})
|
|
6439
6518
|
]
|
|
6440
6519
|
})
|
|
6441
|
-
] }) : h.length > 0 ? /* @__PURE__ */ W(
|
|
6520
|
+
] }) : h.length > 0 ? /* @__PURE__ */ W(zi, { messages: h }) : m ? /* @__PURE__ */ W(Ri, { card: m }) : /* @__PURE__ */ W("p", {
|
|
6442
6521
|
className: "text-xs text-muted-foreground",
|
|
6443
6522
|
children: p ?? A.orchestratorStarterHint
|
|
6444
6523
|
})
|
|
@@ -6476,12 +6555,12 @@ function zi({ defaultWidth: e, minWidth: t, maxWidth: n, onWidthChange: r } = {}
|
|
|
6476
6555
|
children: [i?.panelActions && /* @__PURE__ */ W("div", {
|
|
6477
6556
|
className: "mb-2",
|
|
6478
6557
|
children: i.panelActions
|
|
6479
|
-
}), i ? /* @__PURE__ */ W(
|
|
6558
|
+
}), i ? /* @__PURE__ */ W(Pi, {
|
|
6480
6559
|
task: i,
|
|
6481
6560
|
editing: N,
|
|
6482
6561
|
onCancelEdit: () => P(null),
|
|
6483
6562
|
onSendEdit: (e, t) => he(e, t)
|
|
6484
|
-
}, i.id) : /* @__PURE__ */ W(
|
|
6563
|
+
}, i.id) : /* @__PURE__ */ W(Fi, {})]
|
|
6485
6564
|
}),
|
|
6486
6565
|
F && /* @__PURE__ */ G(ee, {
|
|
6487
6566
|
title: A.rewindTitle,
|
|
@@ -6507,13 +6586,13 @@ function zi({ defaultWidth: e, minWidth: t, maxWidth: n, onWidthChange: r } = {}
|
|
|
6507
6586
|
}
|
|
6508
6587
|
//#endregion
|
|
6509
6588
|
//#region src/presentation/useAgenticoPageContext.ts
|
|
6510
|
-
function
|
|
6589
|
+
function Hi(e, t) {
|
|
6511
6590
|
let { setPageContext: n } = $(), r = c(crypto.randomUUID()).current;
|
|
6512
6591
|
a(() => (n(r, e, t ?? null), () => n(r, null)), [e, t]);
|
|
6513
6592
|
}
|
|
6514
6593
|
//#endregion
|
|
6515
6594
|
//#region src/presentation/useSubagentComponentContext.ts
|
|
6516
|
-
function
|
|
6595
|
+
function Ui(e, t, n, r, i = !0, o) {
|
|
6517
6596
|
let { registerComponentAnchor: s } = $(), l = c(crypto.randomUUID()).current, u = c(n);
|
|
6518
6597
|
u.current = n, a(() => {
|
|
6519
6598
|
if (i) return s(l, {
|
|
@@ -6533,14 +6612,14 @@ function Vi(e, t, n, r, i = !0, o) {
|
|
|
6533
6612
|
}
|
|
6534
6613
|
//#endregion
|
|
6535
6614
|
//#region src/backend/agenticoBackend.ts
|
|
6536
|
-
var
|
|
6615
|
+
var Wi = class extends Error {
|
|
6537
6616
|
status;
|
|
6538
6617
|
code;
|
|
6539
6618
|
constructor(e, t) {
|
|
6540
6619
|
super(t), this.name = "AgenticoBackendError", this.status = e, this.code = t;
|
|
6541
6620
|
}
|
|
6542
|
-
},
|
|
6543
|
-
function
|
|
6621
|
+
}, Gi = (e) => new Promise((t) => setTimeout(t, e));
|
|
6622
|
+
function Ki(e) {
|
|
6544
6623
|
let t = e.baseUrl.replace(/\/+$/, ""), n = (...t) => (e.fetch ?? fetch)(...t), r = e.pollMs ?? 1500;
|
|
6545
6624
|
async function i(r, i, a) {
|
|
6546
6625
|
let o = await n(`${t}${i}`, {
|
|
@@ -6559,7 +6638,7 @@ function Wi(e) {
|
|
|
6559
6638
|
if (!o.ok) {
|
|
6560
6639
|
let e = c && typeof c == "object" && "error" in c ? String(c.error) : `http-${o.status}`;
|
|
6561
6640
|
if (o.status === 422 && c && typeof c == "object" && "ok" in c) return c;
|
|
6562
|
-
throw new
|
|
6641
|
+
throw new Wi(o.status, e);
|
|
6563
6642
|
}
|
|
6564
6643
|
return c;
|
|
6565
6644
|
}
|
|
@@ -6578,6 +6657,9 @@ function Wi(e) {
|
|
|
6578
6657
|
orderAccounts: async (e, r) => {
|
|
6579
6658
|
await i("PUT", `${n(e)}/accounts/order${t}`, { ids: r });
|
|
6580
6659
|
},
|
|
6660
|
+
renameAccount: async (e, r, a) => {
|
|
6661
|
+
await i("PATCH", `${n(e)}/accounts/${encodeURIComponent(r)}${t}`, { label: a });
|
|
6662
|
+
},
|
|
6581
6663
|
setOrder: async (e) => {
|
|
6582
6664
|
await i("PUT", `/connections/order${t}`, { order: e });
|
|
6583
6665
|
},
|
|
@@ -6601,7 +6683,7 @@ function Wi(e) {
|
|
|
6601
6683
|
install: async (e, t) => {
|
|
6602
6684
|
let { installId: n } = await i("POST", "/runners/installs", e), a = 0;
|
|
6603
6685
|
for (;;) {
|
|
6604
|
-
await
|
|
6686
|
+
await Gi(r);
|
|
6605
6687
|
let e = await i("GET", `/runners/installs/${encodeURIComponent(n)}?from=${a}`);
|
|
6606
6688
|
for (let n of e.lines) t({ line: n });
|
|
6607
6689
|
if (a = e.next, e.status === "error") throw Error(e.error ?? "installation failed");
|
|
@@ -6647,7 +6729,8 @@ function Wi(e) {
|
|
|
6647
6729
|
update: async (e, t) => (await i("PATCH", `/memories/${encodeURIComponent(e)}`, t)).memory,
|
|
6648
6730
|
remove: async (e) => {
|
|
6649
6731
|
await i("DELETE", `/memories/${encodeURIComponent(e)}`);
|
|
6650
|
-
}
|
|
6732
|
+
},
|
|
6733
|
+
namespaces: async (e) => (await i("GET", `/memories/${encodeURIComponent(e)}/namespaces`)).namespaces
|
|
6651
6734
|
},
|
|
6652
6735
|
memory: {
|
|
6653
6736
|
get: () => i("GET", "/memory"),
|
|
@@ -6666,6 +6749,6 @@ function Wi(e) {
|
|
|
6666
6749
|
};
|
|
6667
6750
|
}
|
|
6668
6751
|
//#endregion
|
|
6669
|
-
export { Jn as AGENTICO_MAX_WIDTH, qn as AGENTICO_MIN_WIDTH, Wt as AGENTICO_SETTING_KEYS, Kn as AGENTICO_WIDTH, Yn as AGENTICO_WIDTH_STORAGE_KEY,
|
|
6752
|
+
export { Jn as AGENTICO_MAX_WIDTH, qn as AGENTICO_MIN_WIDTH, Wt as AGENTICO_SETTING_KEYS, Kn as AGENTICO_WIDTH, Yn as AGENTICO_WIDTH_STORAGE_KEY, Vi as Agentico, Wi as AgenticoBackendError, gn as AgenticoProvider, Mi as AgenticoSettingsModal, rr as AgenticoToggle, Gt as DEFAULT_AGENTICO_SETTINGS, fe as DEFAULT_REASONING_PART_ID, de as DEFAULT_TEXT_PART_ID, Ve as JSON_EXPORT_DESTINATION_ID, Ie as MICRO_PROMPT_REGISTRY, pn as ORCHESTRATOR_TASK_ID, wt as PREVIEW_LIMIT, Ct as PREVIEW_MAX, Fe as SUMMARY_MICRO_PROMPT, Je as agenticoDe, Ke as agenticoEn, qe as agenticoIt, Te as agenticoPromptsEn, Ee as agenticoPromptsIt, Dt as agenticoTranslations, Le as applyMicroPrompts, Yt as browserSettingsStore, pt as chatHasPersonMessage, gt as chatStartedAt, bt as chatThreadOf, ft as chatTitle, At as compileRoutePattern, Oe as configureAgenticoPrompts, Ze as configureEntityChatStore, Ki as createAgenticoBackend, xe as createCrossAgentTools, dr as createHarnessExecutor, ge as defineSubagent, Ht as diffAgenticoRouting, xt as earlierSessions, Kt as effectiveSettings, yt as entityChatTaskId, Re as extractErrorMessage, ze as extractJsonBlock, Y as findSubagentManifest, he as formatQuestionAnswers, X as getAgenticoPrompts, Ge as getDestinationRegistry, st as getEntityChat, Fr as getSubagentControls, J as getSubagentRegistry, Ar as getSubagentReport, lr as harnessTranscript, Qe as hasEntityChatBackend, Et as imagePreviews, He as jsonExportDestination, vt as listEntityChats, Nt as matchAgenticoPage, jt as matchesAnyPath, It as mergeAgenticoPageRules, Lt as mergeAgenticoRouting, me as messagePartsText, at as onEntityChatsChange, St as placeEvents, be as registerCrossAgentTools, We as registerDestinations, Pr as registerSubagentControls, kr as registerSubagentReports, ve as registerSubagents, _t as removeEntityChat, ht as renameEntityChat, Pe as renderRegistryCli, Ne as renderSubagentCli, ke as resetAgenticoPrompts, Ft as resolveAgenticoRoute, Ot as routePathOf, cr as runHostTool, ct as saveEntityChat, qt as shownSettings, Pt as subagentToolsOf, tt as syncEntityChats, Se as toJsonSchema, Ce as toMcpTool, pe as upsertMessagePart, br as useAgent, $ as useAgentico, tn as useAgenticoHarness, Q as useAgenticoI18n, Hi as useAgenticoPageContext, $t as useAgenticoSettings, Ui as useSubagentComponentContext, Ut as validateAgenticoRouting };
|
|
6670
6753
|
|
|
6671
6754
|
//# sourceMappingURL=index.mjs.map
|