bazilion 0.52.0 → 0.54.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/cli.js +3 -3
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +296 -232
- package/dist/daemon.js.map +1 -1
- package/dist/web/client/assets/AddProviderDialog-CkwSq3C7.js +1 -0
- package/dist/web/client/assets/AgentTemplateParts-CEn_4qVs.js +1 -0
- package/dist/web/client/assets/Button-UiegBKOK.js +1 -0
- package/dist/web/client/assets/ConfigPage-CUbHBhzx.js +1 -0
- package/dist/web/client/assets/ConfirmDialog-VqBOFZEp.js +1 -0
- package/dist/web/client/assets/ConnectionsView-ByARMcWP.js +1 -0
- package/dist/web/client/assets/ManagePage-BJWZd1ts.js +1 -0
- package/dist/web/client/assets/SectionTabs-ViZKm3-B.js +1 -0
- package/dist/web/client/assets/Segmented-MYKKTuZO.js +1 -0
- package/dist/web/client/assets/SkillsParts-UvNK5SYP.js +1 -0
- package/dist/web/client/assets/SpawnTeamModal-DG5UbJNK.js +1 -0
- package/dist/web/client/assets/TeamForm-DGlxWv4e.js +1 -0
- package/dist/web/client/assets/TeamThread-mkwODO0S.js +1 -0
- package/dist/web/client/assets/UnsavedChangesGuard-BmdwLH99.js +1 -0
- package/dist/web/client/assets/_id-CvcxNmBH.js +1 -0
- package/dist/web/client/assets/_id-UyBk7gRl.js +1 -0
- package/dist/web/client/assets/access-C8d8vaQ6.js +1 -0
- package/dist/web/client/assets/agent-actions-BgE9fKHH.js +1 -0
- package/dist/web/client/assets/agents-CgtzqBpD.js +1 -0
- package/dist/web/client/assets/agents-D7W4BT8r.js +1 -0
- package/dist/web/client/assets/arrow-right-D0HKRb7U.js +1 -0
- package/dist/web/client/assets/attention-D9mQWoKt.js +1 -0
- package/dist/web/client/assets/bot-Bb--PFVU.js +1 -0
- package/dist/web/client/assets/chevron-right-bs0TUSl2.js +1 -0
- package/dist/web/client/assets/config-Dw6GWf38.js +1 -0
- package/dist/web/client/assets/createLucideIcon-DkniuEtD.js +1 -0
- package/dist/web/client/assets/download-C4t9l5wR.js +1 -0
- package/dist/web/client/assets/file-text-DzbjpYrV.js +1 -0
- package/dist/web/client/assets/images-DSYgPKM7.js +1 -0
- package/dist/web/client/assets/index-YW0gXPfk.js +14 -0
- package/dist/web/client/assets/key-round-BpK4-E3T.js +1 -0
- package/dist/web/client/assets/list-checks-JNXcmws9.js +1 -0
- package/dist/web/client/assets/login-DcQJk5-U.js +1 -0
- package/dist/web/client/assets/manage-SRGSx8n2.js +1 -0
- package/dist/web/client/assets/mcp-BUWu4TvS.js +1 -0
- package/dist/web/client/assets/message-square-DM2MP9vF.js +1 -0
- package/dist/web/client/assets/network-BJ4iPjQO.js +1 -0
- package/dist/web/client/assets/parts-LZxl9Gvc.js +41 -0
- package/dist/web/client/assets/plus-CLGNN5QX.js +1 -0
- package/dist/web/client/assets/routes-BxIIyGho.js +85 -0
- package/dist/web/client/assets/skills-C7DzIwFJ.js +1 -0
- package/dist/web/client/assets/square-terminal-Dmm6cV-G.js +1 -0
- package/dist/web/client/assets/style-CA2GAk9b.js +7 -0
- package/dist/web/client/assets/styles-C3CDSGAr.css +2 -0
- package/dist/web/client/assets/system-zQ0NnQML.js +1 -0
- package/dist/web/client/assets/teams-BEIJHObN.js +1 -0
- package/dist/web/client/assets/teams-DlOc7Ods.js +1 -0
- package/dist/web/client/assets/telegram-DKHq5DpE.js +1 -0
- package/dist/web/client/assets/tools-BKIpLaiC.js +1 -0
- package/dist/web/client/assets/use-resource-CQaIZbpy.js +1 -0
- package/dist/web/client/assets/users-round-BJrym3FG.js +1 -0
- package/dist/web/client/assets/welcome-CyS4Hrd-.js +1 -0
- package/dist/web/client/assets/wrench-GbE1M1RJ.js +1 -0
- package/dist/web/server/assets/{AddProviderDialog-Tn4AskPm.js → AddProviderDialog-Nc5mc_P6.js} +106 -8
- package/dist/web/server/assets/AgentTemplateParts-DZK_r3nQ.js +266 -0
- package/dist/web/server/assets/{ConfigPage-DqDUujmt.js → ConfigPage-CxzL-gTm.js} +2 -2
- package/dist/web/server/assets/{ConfirmDialog-DfaJ--A6.js → ConfirmDialog-4xeCXKHe.js} +1 -2
- package/dist/web/server/assets/{ConnectionsView-DAG-zNBz.js → ConnectionsView-B02FjNsM.js} +9 -9
- package/dist/web/server/assets/ManagePage-BfCWE8Lj.js +29 -0
- package/dist/web/server/assets/ModelMenu-D-hTgYOO.js +278 -0
- package/dist/web/server/assets/{Rail-BIC_4ptO.js → Rail-3gbidhyv.js} +17 -110
- package/dist/web/server/assets/{SectionTabs-BGsrf-UQ.js → SectionTabs-CWQ5orUW.js} +9 -2
- package/dist/web/server/assets/SkillsParts-D58l8voo.js +199 -0
- package/dist/web/server/assets/SpawnDialog-MJWwppgC.js +1648 -0
- package/dist/web/server/assets/SpawnTeamModal-RjzAeX_Q.js +124 -0
- package/dist/web/server/assets/TeamForm-DdOgIMiV.js +138 -0
- package/dist/web/server/assets/{TeamThread-DuLlGDcw.js → TeamThread-D-PvO3fu.js} +9 -9
- package/dist/web/server/assets/{UnsavedChangesGuard-DrOvPV14.js → UnsavedChangesGuard-Bb5frygQ.js} +1 -1
- package/dist/web/server/assets/{_id-TVruGcOd.js → _id-BKzOw78O.js} +11 -3
- package/dist/web/server/assets/_id-BPjVkcNb.js +396 -0
- package/dist/web/server/assets/_id-BUfy-GwH.js +16 -0
- package/dist/web/server/assets/{_id-yN0z7VqE.js → _id-C1_l6oSR.js} +257 -207
- package/dist/web/server/assets/{_id-DJnYgisy.js → _id-CHvYQhWt.js} +8 -4
- package/dist/web/server/assets/_id-De3Bm0SG.js +39 -0
- package/dist/web/server/assets/_tanstack-start-manifest_v-CR3jm1nY.js +256 -0
- package/dist/web/server/assets/access-CNfvQ3NB.js +295 -0
- package/dist/web/server/assets/{access-GMGed5O8.js → access-Cm_izIIC.js} +2 -2
- package/dist/web/server/assets/{access-C_pupPks.js → access-WWspT0v4.js} +2 -1
- package/dist/web/server/assets/agent-actions-COnfW5AU.js +20 -0
- package/dist/web/server/assets/agents-C7UmTjfO.js +13 -0
- package/dist/web/server/assets/{agents-BnWgFo6o.js → agents-CRtMfKqX.js} +9 -6
- package/dist/web/server/assets/agents-D0hfGIMK.js +134 -0
- package/dist/web/server/assets/agents-DQowl6Ly.js +31 -0
- package/dist/web/server/assets/agents-DzpqlIuJ.js +12 -0
- package/dist/web/server/assets/agents-NOkh61dV.js +323 -0
- package/dist/web/server/assets/attention-CRvxt22X.js +232 -0
- package/dist/web/server/assets/{attention-Cr7puThv.js → attention-CgWhXjX7.js} +4 -1
- package/dist/web/server/assets/{attention-DS3O9UmJ.js → attention-Cx9ZWPOO.js} +4 -2
- package/dist/web/server/assets/{config-DjTGA4iZ.js → config-B5CS8juO.js} +2 -2
- package/dist/web/server/assets/{config-Q7livfa3.js → config-D117117T.js} +51 -102
- package/dist/web/server/assets/createSsrRpc-CwTd0zrB.js +72 -0
- package/dist/web/server/assets/{login-VV10kZBl.js → login-IF0Gbsuq.js} +36 -2
- package/dist/web/server/assets/{login-JoIjlcmu.js → login-va4EtvA8.js} +34 -45
- package/dist/web/server/assets/manage-Ce6cI4eW.js +240 -0
- package/dist/web/server/assets/{mcp-ZARSOxZW.js → mcp-Bm9U6x7N.js} +2 -2
- package/dist/web/server/assets/mcp-C96PBxpb.js +376 -0
- package/dist/web/server/assets/page-title-CwcbXMhx.js +95 -0
- package/dist/web/server/assets/{router-Dh2-IvLL.js → router-8Iq19GOz.js} +366 -203
- package/dist/web/server/assets/{routes-C9NawqcV.js → routes-BLo-fWbQ.js} +2681 -1667
- package/dist/web/server/assets/{routes-CDskMy5C.js → routes-BXvYYFrN.js} +2 -2
- package/dist/web/server/assets/routes-Kwam6JmS.js +89 -0
- package/dist/web/server/assets/{skills-StN15QhC.js → skills-BqCnA-74.js} +2 -2
- package/dist/web/server/assets/skills-DSezIdDc.js +157 -0
- package/dist/web/server/assets/{skills-h5aHa7Q8.js → skills-DWzlT_hC.js} +9 -1
- package/dist/web/server/assets/{style-GYDODk2F.js → style-C2hIPY_Y.js} +2 -2
- package/dist/web/server/assets/{system-Dl-1RhoP.js → system-CcLCmkIC.js} +2 -2
- package/dist/web/server/assets/{system-DtswhLW6.js → system-D3th6n2E.js} +4 -2
- package/dist/web/server/assets/system-E0VePdzO.js +145 -0
- package/dist/web/server/assets/{teams-BxnvFTyn.js → teams-70u1XQTr.js} +1 -3
- package/dist/web/server/assets/{teams-YrmyutM4.js → teams-BopOP4x7.js} +8 -1
- package/dist/web/server/assets/teams-CQVV18D3.js +216 -0
- package/dist/web/server/assets/teams-CdCmBJIj.js +174 -0
- package/dist/web/server/assets/{teams-5PMGvHuM.js → teams-DScFp8mK.js} +2 -2
- package/dist/web/server/assets/{teams-CbIPKf99.js → teams-DxA-vnzY.js} +4 -2
- package/dist/web/server/assets/telegram-DJ8s_91Y.js +1057 -0
- package/dist/web/server/assets/{telegram-Cv0D4gyz.js → telegram-DR7xijeS.js} +2 -2
- package/dist/web/server/assets/{tools-ioJcPzMW.js → tools-CsH9DI-4.js} +2 -2
- package/dist/web/server/assets/{tools-OfD22R-C.js → tools-V6kezUpL.js} +55 -218
- package/dist/web/server/assets/{use-resource-DVzK0toP.js → use-resource-CjcJwn7F.js} +1 -1
- package/dist/web/server/assets/{welcome-jxmpE_Jb.js → welcome-BpmcD-ia.js} +2 -2
- package/dist/web/server/assets/{welcome-FFEbrNT1.js → welcome-Ya8TkL4v.js} +10 -10
- package/dist/web/server/server.js +19 -19
- package/dist/worker.js +17 -0
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
- package/dist/web/client/assets/AddProviderDialog-BiGLKnu2.js +0 -1
- package/dist/web/client/assets/ConfigPage-DvBzy2MN.js +0 -1
- package/dist/web/client/assets/ConfirmDialog-CiZ5tk9R.js +0 -1
- package/dist/web/client/assets/ConnectionsView-Czkpm2JY.js +0 -1
- package/dist/web/client/assets/Dialog-s_kPtI-W.js +0 -1
- package/dist/web/client/assets/ModelMenu-BfUPoRjV.js +0 -1
- package/dist/web/client/assets/SectionTabs-DENNb6Nw.js +0 -1
- package/dist/web/client/assets/Segmented-Dh77vmpp.js +0 -1
- package/dist/web/client/assets/SkillFindings-Xng11qqx.js +0 -1
- package/dist/web/client/assets/SkillsPicker-hI3YXvib.js +0 -1
- package/dist/web/client/assets/SpawnDialog-CKWFQ6jk.js +0 -1
- package/dist/web/client/assets/Tabs-f6bHvCGn.js +0 -1
- package/dist/web/client/assets/TeamForm-kda1HYZG.js +0 -1
- package/dist/web/client/assets/TeamThread-2rm1JGSk.js +0 -1
- package/dist/web/client/assets/UnsavedChangesGuard-nx6dv2Yw.js +0 -1
- package/dist/web/client/assets/_id-B72mIpcE.js +0 -1
- package/dist/web/client/assets/_id-Bzavnza1.js +0 -1
- package/dist/web/client/assets/access-Yw9jODuk.js +0 -1
- package/dist/web/client/assets/agents-C9xoyL7o.js +0 -1
- package/dist/web/client/assets/agents-TviG16wx.js +0 -1
- package/dist/web/client/assets/api-HC_YzjBy.js +0 -1
- package/dist/web/client/assets/arrow-right-Gm_FDWJ_.js +0 -1
- package/dist/web/client/assets/attention-DmURtlJm.js +0 -1
- package/dist/web/client/assets/check-BjgKoGvU.js +0 -1
- package/dist/web/client/assets/chevron-right-CUZiA2aG.js +0 -1
- package/dist/web/client/assets/config-UZz_mjO5.js +0 -1
- package/dist/web/client/assets/createLucideIcon-C6gOo8sD.js +0 -1
- package/dist/web/client/assets/dist-BWppw70N.js +0 -41
- package/dist/web/client/assets/dist-D2dwY7MR.js +0 -1
- package/dist/web/client/assets/entities-xVoB-p2j.js +0 -1
- package/dist/web/client/assets/index-Df1oUtAP.js +0 -14
- package/dist/web/client/assets/link-Cbztlp_R.js +0 -1
- package/dist/web/client/assets/login-CPfdaqsV.js +0 -1
- package/dist/web/client/assets/mcp-FlYnNon0.js +0 -1
- package/dist/web/client/assets/model-facts-DoB6QD5y.js +0 -1
- package/dist/web/client/assets/parts-tIDBNsYA.js +0 -1
- package/dist/web/client/assets/plus-CWrKMtvA.js +0 -1
- package/dist/web/client/assets/routes-BZaWCoQj.js +0 -76
- package/dist/web/client/assets/save-f9O-CQia.js +0 -1
- package/dist/web/client/assets/skills-C7yDPC8s.js +0 -1
- package/dist/web/client/assets/style-DDuTFJUu.js +0 -7
- package/dist/web/client/assets/styles-BviXU81u.css +0 -2
- package/dist/web/client/assets/system-CL3Kz36L.js +0 -1
- package/dist/web/client/assets/teams-CQTEF5gV.js +0 -1
- package/dist/web/client/assets/teams-DQ7SqVyF.js +0 -1
- package/dist/web/client/assets/telegram-BLgxtGhZ.js +0 -1
- package/dist/web/client/assets/tools-pOQyGVYo.js +0 -1
- package/dist/web/client/assets/use-resource-C3MBZJop.js +0 -1
- package/dist/web/client/assets/welcome-Hr6JpMef.js +0 -1
- package/dist/web/client/assets/wrench-6BEIqKDn.js +0 -1
- package/dist/web/server/assets/Dialog-aup_yJv5.js +0 -85
- package/dist/web/server/assets/ModelMenu-DUY9aHkE.js +0 -138
- package/dist/web/server/assets/SkillFindings-BdATze1A.js +0 -46
- package/dist/web/server/assets/SkillsPicker-DlqEfRWh.js +0 -67
- package/dist/web/server/assets/SpawnDialog-D_SMPCG_.js +0 -132
- package/dist/web/server/assets/Tabs-BhF41MfQ.js +0 -20
- package/dist/web/server/assets/TeamForm-ilBaeLI4.js +0 -96
- package/dist/web/server/assets/_id-BsZcsabI.js +0 -383
- package/dist/web/server/assets/_id-D8Kj0F30.js +0 -18
- package/dist/web/server/assets/_id-QYifTM9w.js +0 -28
- package/dist/web/server/assets/_tanstack-start-manifest_v-D6zrzUC7.js +0 -223
- package/dist/web/server/assets/access-DKOpcHIJ.js +0 -232
- package/dist/web/server/assets/agents-B6OR3x99.js +0 -327
- package/dist/web/server/assets/agents-B7642eRO.js +0 -130
- package/dist/web/server/assets/agents-BJ-_oC2e.js +0 -14
- package/dist/web/server/assets/agents-CjV0w-Zy.js +0 -12
- package/dist/web/server/assets/agents-Dy_Q-9lG.js +0 -27
- package/dist/web/server/assets/attention-CLP4HYBz.js +0 -216
- package/dist/web/server/assets/createSsrRpc-GCCF14VW.js +0 -169
- package/dist/web/server/assets/entities-Dn2xzKIw.js +0 -16
- package/dist/web/server/assets/mcp-BI-FD-JI.js +0 -250
- package/dist/web/server/assets/model-facts-mrfrWQne.js +0 -136
- package/dist/web/server/assets/parts-B31PJkhi.js +0 -190
- package/dist/web/server/assets/routes-BJIJWCIE.js +0 -16
- package/dist/web/server/assets/skills-BqLq3ZXq.js +0 -275
- package/dist/web/server/assets/system-BtRA2HUs.js +0 -138
- package/dist/web/server/assets/teams-COaU0wN9.js +0 -108
- package/dist/web/server/assets/teams-Ca8W4mvl.js +0 -88
- package/dist/web/server/assets/telegram-Yx8nm6Ei.js +0 -984
- package/dist/web/server/assets/utils-C_uf36nf.js +0 -8
- package/dist/web/server/assets/workspace-DaitCM0t.js +0 -651
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { n as createServerFn } from "../server.js";
|
|
2
|
+
import { t as MODELS_PATH } from "./ModelMenu-D-hTgYOO.js";
|
|
2
3
|
import { t as createServerRpc } from "./createServerRpc-B7Yr1K8i.js";
|
|
3
4
|
import { n as daemonClient } from "./daemon-client-B_ZRIIrT.js";
|
|
4
5
|
//#region src/routes/agents/index.tsx?tss-serverfn-split
|
|
@@ -7,17 +8,19 @@ var fetchAgents_createServerFn_handler = createServerRpc({
|
|
|
7
8
|
name: "fetchAgents",
|
|
8
9
|
filename: "src/routes/agents/index.tsx"
|
|
9
10
|
}, (opts) => fetchAgents.__executeServer(opts));
|
|
10
|
-
var fetchAgents = createServerFn({ method: "GET" }).
|
|
11
|
+
var fetchAgents = createServerFn({ method: "GET" }).handler(fetchAgents_createServerFn_handler, async () => {
|
|
11
12
|
const client = daemonClient();
|
|
12
|
-
const [agents,
|
|
13
|
-
client.get(
|
|
13
|
+
const [agents, templates, teams, models] = await Promise.all([
|
|
14
|
+
client.get("/api/agents?includeArchived=true"),
|
|
14
15
|
client.get("/api/profiles"),
|
|
15
|
-
client.get("/api/teams")
|
|
16
|
+
client.get("/api/teams"),
|
|
17
|
+
client.get(MODELS_PATH)
|
|
16
18
|
]);
|
|
17
19
|
return {
|
|
18
20
|
agents,
|
|
19
|
-
|
|
20
|
-
teams
|
|
21
|
+
templates,
|
|
22
|
+
teams,
|
|
23
|
+
chat: models.chat
|
|
21
24
|
};
|
|
22
25
|
});
|
|
23
26
|
//#endregion
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { A as RowMenu, K as Button, M as SetupCard, O as ListRow, _ as CardEmpty, lt as api, t as SpawnDialog, w as Chip, y as CardList } from "./SpawnDialog-MJWwppgC.js";
|
|
2
|
+
import { t as ConfirmDialog } from "./ConfirmDialog-4xeCXKHe.js";
|
|
3
|
+
import { E as templateUseLine, T as templateName, d as modelLine, s as count, w as templateDeleteBlocker, y as skillsLine } from "./manage-Ce6cI4eW.js";
|
|
4
|
+
import { t as Route } from "./agents-C7UmTjfO.js";
|
|
5
|
+
import { t as ManagePage } from "./ManagePage-BfCWE8Lj.js";
|
|
6
|
+
import { t as CreateAgentTemplateDialog } from "./AgentTemplateParts-DZK_r3nQ.js";
|
|
7
|
+
import { useState } from "react";
|
|
8
|
+
import { useNavigate, useRouter } from "@tanstack/react-router";
|
|
9
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { FileText } from "lucide-react";
|
|
11
|
+
//#region src/routes/templates/agents/index.tsx?tsr-split=component
|
|
12
|
+
function AgentTemplatesPage() {
|
|
13
|
+
const { templates, teamTemplates, chat, skills, starter, teams } = Route.useLoaderData();
|
|
14
|
+
const search = Route.useSearch();
|
|
15
|
+
const navigate = useNavigate();
|
|
16
|
+
const router = useRouter();
|
|
17
|
+
const [creating, setCreating] = useState(search.new === 1);
|
|
18
|
+
const [spawnFrom, setSpawnFrom] = useState(null);
|
|
19
|
+
const [deleting, setDeleting] = useState(null);
|
|
20
|
+
const closeCreate = () => {
|
|
21
|
+
setCreating(false);
|
|
22
|
+
if (search.new) navigate({
|
|
23
|
+
to: "/templates/agents",
|
|
24
|
+
search: {},
|
|
25
|
+
replace: true
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
return /* @__PURE__ */ jsxs(ManagePage, {
|
|
29
|
+
title: "Agent templates",
|
|
30
|
+
description: "What a new Agent starts with: its files, its model and its skills. Agents already spawned keep their own copies.",
|
|
31
|
+
actions: /* @__PURE__ */ jsx(Button, {
|
|
32
|
+
variant: "primary",
|
|
33
|
+
onClick: () => setCreating(true),
|
|
34
|
+
children: "New Agent template"
|
|
35
|
+
}),
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsx(SetupCard, {
|
|
38
|
+
labelledBy: "manage-agent-templates",
|
|
39
|
+
icon: /* @__PURE__ */ jsx(FileText, { className: "size-5" }),
|
|
40
|
+
title: "Agent templates",
|
|
41
|
+
description: "Open one to edit its files, model and skills.",
|
|
42
|
+
action: /* @__PURE__ */ jsx(Chip, {
|
|
43
|
+
tone: "neutral",
|
|
44
|
+
children: count(templates.length, "template")
|
|
45
|
+
}),
|
|
46
|
+
children: templates.length === 0 ? /* @__PURE__ */ jsx(CardEmpty, {
|
|
47
|
+
icon: /* @__PURE__ */ jsx(FileText, { className: "size-5" }),
|
|
48
|
+
title: "No Agent templates yet",
|
|
49
|
+
action: /* @__PURE__ */ jsx(Button, {
|
|
50
|
+
variant: "primary",
|
|
51
|
+
onClick: () => setCreating(true),
|
|
52
|
+
children: "New Agent template"
|
|
53
|
+
}),
|
|
54
|
+
children: "Every Agent is spawned from a template."
|
|
55
|
+
}) : /* @__PURE__ */ jsx(CardList, { children: templates.map((template) => {
|
|
56
|
+
const model = modelLine(template.defaultModel, chat);
|
|
57
|
+
const blocker = templateDeleteBlocker(template, teamTemplates);
|
|
58
|
+
const href = `/templates/agents/${encodeURIComponent(template.id)}`;
|
|
59
|
+
return /* @__PURE__ */ jsx(ListRow, {
|
|
60
|
+
inline: true,
|
|
61
|
+
title: /* @__PURE__ */ jsx("a", {
|
|
62
|
+
href,
|
|
63
|
+
className: "text-foreground hover:text-primary",
|
|
64
|
+
children: templateName(template)
|
|
65
|
+
}),
|
|
66
|
+
chip: model.missing && /* @__PURE__ */ jsx(Chip, {
|
|
67
|
+
tone: "warning",
|
|
68
|
+
children: "Model not in Chat"
|
|
69
|
+
}),
|
|
70
|
+
meta: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
71
|
+
/* @__PURE__ */ jsx("span", {
|
|
72
|
+
className: model.missing ? "font-semibold text-warning" : "",
|
|
73
|
+
children: model.name
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ jsx("span", { children: skillsLine(template) }),
|
|
76
|
+
/* @__PURE__ */ jsx("span", { children: templateUseLine(template, teamTemplates) }),
|
|
77
|
+
/* @__PURE__ */ jsx("code", { children: template.id })
|
|
78
|
+
] }),
|
|
79
|
+
actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
|
|
80
|
+
variant: "ghost",
|
|
81
|
+
"aria-label": `Spawn an agent from ${templateName(template)}`,
|
|
82
|
+
onClick: () => setSpawnFrom(template.id),
|
|
83
|
+
children: "Spawn"
|
|
84
|
+
}), /* @__PURE__ */ jsx(RowMenu, {
|
|
85
|
+
label: `More for ${templateName(template)}`,
|
|
86
|
+
items: [{
|
|
87
|
+
label: "Edit files and settings",
|
|
88
|
+
onSelect: () => {
|
|
89
|
+
window.location.assign(href);
|
|
90
|
+
}
|
|
91
|
+
}, {
|
|
92
|
+
label: "Delete…",
|
|
93
|
+
danger: true,
|
|
94
|
+
disabledReason: blocker,
|
|
95
|
+
onSelect: () => setDeleting(template)
|
|
96
|
+
}]
|
|
97
|
+
})] })
|
|
98
|
+
}, template.id);
|
|
99
|
+
}) })
|
|
100
|
+
}),
|
|
101
|
+
creating && /* @__PURE__ */ jsx(CreateAgentTemplateDialog, {
|
|
102
|
+
chat,
|
|
103
|
+
skills,
|
|
104
|
+
starter,
|
|
105
|
+
onClose: closeCreate
|
|
106
|
+
}),
|
|
107
|
+
spawnFrom && /* @__PURE__ */ jsx(SpawnDialog, {
|
|
108
|
+
profiles: templates,
|
|
109
|
+
teams,
|
|
110
|
+
profileId: spawnFrom,
|
|
111
|
+
onClose: () => setSpawnFrom(null)
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ jsx(ConfirmDialog, {
|
|
114
|
+
open: deleting !== null,
|
|
115
|
+
onOpenChange: (open) => {
|
|
116
|
+
if (!open) setDeleting(null);
|
|
117
|
+
},
|
|
118
|
+
title: `Delete the ${deleting ? templateName(deleting) : ""} template?`,
|
|
119
|
+
description: /* @__PURE__ */ jsx("p", {
|
|
120
|
+
className: "m-0",
|
|
121
|
+
children: "This deletes the template and its files. No Agent and no Team template uses it."
|
|
122
|
+
}),
|
|
123
|
+
confirmLabel: "Delete template",
|
|
124
|
+
onConfirm: async () => {
|
|
125
|
+
if (!deleting) return;
|
|
126
|
+
await api(`/api/profiles/${encodeURIComponent(deleting.id)}`, { method: "DELETE" });
|
|
127
|
+
await router.invalidate({ sync: true });
|
|
128
|
+
}
|
|
129
|
+
})
|
|
130
|
+
]
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
134
|
+
export { AgentTemplatesPage as component };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { n as createServerFn } from "../server.js";
|
|
2
|
+
import { t as MODELS_PATH } from "./ModelMenu-D-hTgYOO.js";
|
|
3
|
+
import { t as createServerRpc } from "./createServerRpc-B7Yr1K8i.js";
|
|
4
|
+
import { n as daemonClient } from "./daemon-client-B_ZRIIrT.js";
|
|
5
|
+
//#region src/routes/templates/agents/index.tsx?tss-serverfn-split
|
|
6
|
+
var fetchTemplates_createServerFn_handler = createServerRpc({
|
|
7
|
+
id: "7bc7f3b145d10e7a733fbe068ce367dda04ec2f1cdb53f0d6dcba3838eb2deeb",
|
|
8
|
+
name: "fetchTemplates",
|
|
9
|
+
filename: "src/routes/templates/agents/index.tsx"
|
|
10
|
+
}, (opts) => fetchTemplates.__executeServer(opts));
|
|
11
|
+
var fetchTemplates = createServerFn({ method: "GET" }).handler(fetchTemplates_createServerFn_handler, async () => {
|
|
12
|
+
const client = daemonClient();
|
|
13
|
+
const [templates, teamTemplates, models, skills, starter, teams] = await Promise.all([
|
|
14
|
+
client.get("/api/profiles"),
|
|
15
|
+
client.get("/api/team-templates"),
|
|
16
|
+
client.get(MODELS_PATH),
|
|
17
|
+
client.get("/api/skills"),
|
|
18
|
+
client.get("/api/profiles/_/templates"),
|
|
19
|
+
client.get("/api/teams")
|
|
20
|
+
]);
|
|
21
|
+
return {
|
|
22
|
+
templates,
|
|
23
|
+
teamTemplates,
|
|
24
|
+
chat: models.chat,
|
|
25
|
+
skills,
|
|
26
|
+
starter,
|
|
27
|
+
teams
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
//#endregion
|
|
31
|
+
export { fetchTemplates_createServerFn_handler };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { n as createServerFn } from "../server.js";
|
|
2
|
+
import { t as createSsrRpc } from "./createSsrRpc-CwTd0zrB.js";
|
|
3
|
+
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
|
+
//#region src/routes/agents/index.tsx
|
|
5
|
+
var $$splitComponentImporter = () => import("./agents-NOkh61dV.js");
|
|
6
|
+
var fetchAgents = createServerFn({ method: "GET" }).handler(createSsrRpc("f715bab0037380aa3db7e237e7cf1e74168c363f48a960bb1ddfa5560de3a74e"));
|
|
7
|
+
var Route = createFileRoute("/agents/")({
|
|
8
|
+
loader: () => fetchAgents(),
|
|
9
|
+
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Route as t };
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
import { A as RowMenu, D as GroupHeader, G as DialogActions, K as Button, M as SetupCard, O as ListRow, W as Dialog, _ as CardEmpty, c as SelectField, dt as errorMessage, g as CardBody, j as SearchField, k as Notice, lt as api, q as AgentAvatar, t as SpawnDialog, w as Chip, x as CardToolbar, y as CardList } from "./SpawnDialog-MJWwppgC.js";
|
|
2
|
+
import { t as ConfirmDialog } from "./ConfirmDialog-4xeCXKHe.js";
|
|
3
|
+
import { t as Segmented } from "./Segmented-3ZLdqa5U.js";
|
|
4
|
+
import { i as unarchiveAgent, n as deleteAgent, t as archiveAgent } from "./agent-actions-COnfW5AU.js";
|
|
5
|
+
import { T as templateName, c as groupAgents, n as agentCounts, r as agentModel, s as count } from "./manage-Ce6cI4eW.js";
|
|
6
|
+
import { t as Route } from "./agents-DzpqlIuJ.js";
|
|
7
|
+
import { t as ManagePage } from "./ManagePage-BfCWE8Lj.js";
|
|
8
|
+
import { useEffect, useRef, useState } from "react";
|
|
9
|
+
import { Link, useRouter } from "@tanstack/react-router";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { Bot } from "lucide-react";
|
|
12
|
+
//#region src/components/manage/MoveAgentDialog.tsx
|
|
13
|
+
/** Move an Agent to another Team: it joins with no connections. */
|
|
14
|
+
function MoveAgentDialog({ agent, teams, onClose, onMoved }) {
|
|
15
|
+
const others = teams.filter((team) => team.id !== agent.teamId);
|
|
16
|
+
const [teamId, setTeamId] = useState(others[0]?.id ?? "");
|
|
17
|
+
const [busy, setBusy] = useState(false);
|
|
18
|
+
const [error, setError] = useState(null);
|
|
19
|
+
const from = teams.find((team) => team.id === agent.teamId)?.name ?? agent.teamId;
|
|
20
|
+
async function move(event) {
|
|
21
|
+
event.preventDefault();
|
|
22
|
+
if (!teamId || busy) return;
|
|
23
|
+
setBusy(true);
|
|
24
|
+
setError(null);
|
|
25
|
+
try {
|
|
26
|
+
await api(`/api/agents/${encodeURIComponent(agent.id)}/team`, {
|
|
27
|
+
method: "PATCH",
|
|
28
|
+
body: { teamId }
|
|
29
|
+
});
|
|
30
|
+
await onMoved();
|
|
31
|
+
} catch (cause) {
|
|
32
|
+
setError(errorMessage(cause));
|
|
33
|
+
setBusy(false);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return /* @__PURE__ */ jsx(Dialog, {
|
|
37
|
+
title: `Move ${agent.name}`,
|
|
38
|
+
description: `From ${from} to another Team. Its conversations and files go with it; its connections stay behind, so it joins the other Team with none.`,
|
|
39
|
+
busy,
|
|
40
|
+
onClose,
|
|
41
|
+
children: /* @__PURE__ */ jsxs("form", {
|
|
42
|
+
onSubmit: (event) => void move(event),
|
|
43
|
+
className: "grid gap-4",
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsx(SelectField, {
|
|
46
|
+
label: "Team",
|
|
47
|
+
value: teamId,
|
|
48
|
+
options: others.map((team) => ({
|
|
49
|
+
value: team.id,
|
|
50
|
+
label: team.name
|
|
51
|
+
})),
|
|
52
|
+
disabled: busy,
|
|
53
|
+
className: "max-w-none",
|
|
54
|
+
onChange: setTeamId
|
|
55
|
+
}),
|
|
56
|
+
error && /* @__PURE__ */ jsx(Notice, {
|
|
57
|
+
tone: "warning",
|
|
58
|
+
role: "alert",
|
|
59
|
+
title: "It was not moved.",
|
|
60
|
+
children: error
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ jsxs(DialogActions, { children: [/* @__PURE__ */ jsx(Button, {
|
|
63
|
+
variant: "ghost",
|
|
64
|
+
disabled: busy,
|
|
65
|
+
onClick: onClose,
|
|
66
|
+
children: "Cancel"
|
|
67
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
68
|
+
variant: "primary",
|
|
69
|
+
type: "submit",
|
|
70
|
+
disabled: busy || !teamId,
|
|
71
|
+
children: busy ? "Moving…" : `Move to ${teams.find((team) => team.id === teamId)?.name ?? "Team"}`
|
|
72
|
+
})] })
|
|
73
|
+
]
|
|
74
|
+
})
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/components/manage/AgentsCard.tsx
|
|
79
|
+
function AgentsCard({ agents, teams, templates, chat, onSpawn, onChanged }) {
|
|
80
|
+
const [query, setQuery] = useState("");
|
|
81
|
+
const [filter, setFilter] = useState("current");
|
|
82
|
+
const [busy, setBusy] = useState(null);
|
|
83
|
+
const [error, setError] = useState(null);
|
|
84
|
+
const [archived, setArchived] = useState(null);
|
|
85
|
+
const [moving, setMoving] = useState(null);
|
|
86
|
+
const [deleting, setDeleting] = useState(null);
|
|
87
|
+
const counts = agentCounts(agents);
|
|
88
|
+
const restoreButton = useRef(null);
|
|
89
|
+
const [focusRestore, setFocusRestore] = useState(false);
|
|
90
|
+
useEffect(() => {
|
|
91
|
+
if (!focusRestore || busy !== null) return;
|
|
92
|
+
restoreButton.current?.focus();
|
|
93
|
+
setFocusRestore(false);
|
|
94
|
+
}, [focusRestore, busy]);
|
|
95
|
+
const groups = groupAgents(agents, teams, filter, query);
|
|
96
|
+
async function run(agent, work) {
|
|
97
|
+
setBusy(agent.id);
|
|
98
|
+
setError(null);
|
|
99
|
+
try {
|
|
100
|
+
await work();
|
|
101
|
+
await onChanged();
|
|
102
|
+
} catch (cause) {
|
|
103
|
+
setError(errorMessage(cause));
|
|
104
|
+
} finally {
|
|
105
|
+
setBusy(null);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
const archive = (agent) => run(agent, async () => {
|
|
109
|
+
await archiveAgent(agent.id);
|
|
110
|
+
setArchived(agent);
|
|
111
|
+
setFocusRestore(true);
|
|
112
|
+
});
|
|
113
|
+
const restore = (agent) => run(agent, async () => {
|
|
114
|
+
await unarchiveAgent(agent.id);
|
|
115
|
+
setArchived(null);
|
|
116
|
+
});
|
|
117
|
+
return /* @__PURE__ */ jsxs(SetupCard, {
|
|
118
|
+
labelledBy: "manage-agents",
|
|
119
|
+
icon: /* @__PURE__ */ jsx(Bot, { className: "size-5" }),
|
|
120
|
+
title: "Agents",
|
|
121
|
+
description: "Grouped by Team. An archived Agent keeps its files and conversations, takes no work, and can be restored.",
|
|
122
|
+
children: [
|
|
123
|
+
/* @__PURE__ */ jsxs(CardToolbar, { children: [/* @__PURE__ */ jsx(SearchField, {
|
|
124
|
+
label: "Find an Agent",
|
|
125
|
+
placeholder: "Find by name, creature or vibe",
|
|
126
|
+
value: query,
|
|
127
|
+
onChange: setQuery,
|
|
128
|
+
className: "min-w-0 flex-1 basis-60"
|
|
129
|
+
}), /* @__PURE__ */ jsx(Segmented, {
|
|
130
|
+
label: "Which Agents",
|
|
131
|
+
value: filter,
|
|
132
|
+
onChange: setFilter,
|
|
133
|
+
options: [
|
|
134
|
+
{
|
|
135
|
+
id: "current",
|
|
136
|
+
label: `Current ${counts.current}`
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
id: "archived",
|
|
140
|
+
label: `Archived ${counts.archived}`
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: "all",
|
|
144
|
+
label: "All"
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
})] }),
|
|
148
|
+
archived && /* @__PURE__ */ jsx(CardBody, {
|
|
149
|
+
className: "py-3",
|
|
150
|
+
children: /* @__PURE__ */ jsxs(Notice, {
|
|
151
|
+
tone: "neutral",
|
|
152
|
+
actions: /* @__PURE__ */ jsxs(Button, {
|
|
153
|
+
ref: restoreButton,
|
|
154
|
+
variant: "ghost",
|
|
155
|
+
disabled: busy !== null,
|
|
156
|
+
onClick: () => void restore(archived),
|
|
157
|
+
children: ["Restore ", archived.name]
|
|
158
|
+
}),
|
|
159
|
+
children: [archived.name, " is archived. It keeps its files and conversations and takes no work until it is restored."]
|
|
160
|
+
})
|
|
161
|
+
}),
|
|
162
|
+
error && /* @__PURE__ */ jsx(CardBody, {
|
|
163
|
+
className: "py-3",
|
|
164
|
+
children: /* @__PURE__ */ jsx(Notice, {
|
|
165
|
+
tone: "warning",
|
|
166
|
+
role: "alert",
|
|
167
|
+
title: "That did not work.",
|
|
168
|
+
children: error
|
|
169
|
+
})
|
|
170
|
+
}),
|
|
171
|
+
agents.length === 0 ? /* @__PURE__ */ jsx(CardEmpty, {
|
|
172
|
+
icon: /* @__PURE__ */ jsx(Bot, { className: "size-5" }),
|
|
173
|
+
title: "No Agents yet",
|
|
174
|
+
action: /* @__PURE__ */ jsx(Button, {
|
|
175
|
+
variant: "primary",
|
|
176
|
+
disabled: templates.length === 0 || teams.length === 0,
|
|
177
|
+
onClick: onSpawn,
|
|
178
|
+
children: "Spawn an agent"
|
|
179
|
+
}),
|
|
180
|
+
children: "An Agent is spawned from a template into a Team, and starts talking as soon as it is."
|
|
181
|
+
}) : groups.length === 0 ? /* @__PURE__ */ jsx(CardEmpty, {
|
|
182
|
+
title: query.trim() ? `No Agent matches “${query.trim()}”` : emptyFilter(filter),
|
|
183
|
+
children: query.trim() ? "Try another name, or look in all of them." : "Archived Agents appear here when there are any."
|
|
184
|
+
}) : groups.map(({ team, agents: members }) => /* @__PURE__ */ jsxs("section", {
|
|
185
|
+
"aria-label": team.name,
|
|
186
|
+
children: [/* @__PURE__ */ jsx(GroupHeader, {
|
|
187
|
+
title: team.name,
|
|
188
|
+
meta: `${count(members.length, "Agent")} · ${team.policyMode === "restricted" ? "Restricted" : "Open"}`,
|
|
189
|
+
action: /* @__PURE__ */ jsx(Link, {
|
|
190
|
+
to: "/",
|
|
191
|
+
search: {
|
|
192
|
+
team: team.id,
|
|
193
|
+
panel: "team"
|
|
194
|
+
},
|
|
195
|
+
children: "Open Team"
|
|
196
|
+
})
|
|
197
|
+
}), /* @__PURE__ */ jsx(CardList, { children: members.map((agent) => {
|
|
198
|
+
const template = templates.find((entry) => entry.id === agent.profileId);
|
|
199
|
+
const model = agentModel(agent, templates, chat);
|
|
200
|
+
const isArchived = agent.status === "archived";
|
|
201
|
+
const identity = [agent.identity?.creature, agent.identity?.vibe].filter(Boolean).join(" · ");
|
|
202
|
+
return /* @__PURE__ */ jsx(ListRow, {
|
|
203
|
+
inline: true,
|
|
204
|
+
leading: /* @__PURE__ */ jsx(AgentAvatar, {
|
|
205
|
+
identity: agent.identity,
|
|
206
|
+
size: 32
|
|
207
|
+
}),
|
|
208
|
+
title: /* @__PURE__ */ jsx(Link, {
|
|
209
|
+
to: "/",
|
|
210
|
+
search: { agent: agent.id },
|
|
211
|
+
className: "text-foreground hover:text-primary",
|
|
212
|
+
children: agent.name
|
|
213
|
+
}),
|
|
214
|
+
chip: isArchived && /* @__PURE__ */ jsx(Chip, {
|
|
215
|
+
tone: "neutral",
|
|
216
|
+
children: "Archived"
|
|
217
|
+
}),
|
|
218
|
+
meta: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
219
|
+
identity && /* @__PURE__ */ jsx("span", { children: identity }),
|
|
220
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
221
|
+
template ? /* @__PURE__ */ jsx("a", {
|
|
222
|
+
href: `/templates/agents/${encodeURIComponent(template.id)}`,
|
|
223
|
+
children: templateName(template)
|
|
224
|
+
}) : agent.profileId,
|
|
225
|
+
" ",
|
|
226
|
+
"template"
|
|
227
|
+
] }),
|
|
228
|
+
model && /* @__PURE__ */ jsxs("span", {
|
|
229
|
+
className: model.missing ? "font-semibold text-warning" : "",
|
|
230
|
+
children: [model.name, model.missing ? ", not in Chat" : model.inherited ? "" : ", its own"]
|
|
231
|
+
})
|
|
232
|
+
] }),
|
|
233
|
+
actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [isArchived && /* @__PURE__ */ jsx(Button, {
|
|
234
|
+
variant: "ghost",
|
|
235
|
+
disabled: busy === agent.id,
|
|
236
|
+
onClick: () => void restore(agent),
|
|
237
|
+
children: "Restore"
|
|
238
|
+
}), /* @__PURE__ */ jsx(RowMenu, {
|
|
239
|
+
label: `More for ${agent.name}`,
|
|
240
|
+
disabled: busy === agent.id,
|
|
241
|
+
items: [
|
|
242
|
+
teams.length > 1 && {
|
|
243
|
+
label: "Move to another Team…",
|
|
244
|
+
onSelect: () => setMoving(agent)
|
|
245
|
+
},
|
|
246
|
+
!isArchived && {
|
|
247
|
+
label: "Archive",
|
|
248
|
+
onSelect: () => void archive(agent)
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
label: "Delete permanently…",
|
|
252
|
+
danger: true,
|
|
253
|
+
onSelect: () => setDeleting(agent)
|
|
254
|
+
}
|
|
255
|
+
]
|
|
256
|
+
})] })
|
|
257
|
+
}, agent.id);
|
|
258
|
+
}) })]
|
|
259
|
+
}, team.id)),
|
|
260
|
+
moving && /* @__PURE__ */ jsx(MoveAgentDialog, {
|
|
261
|
+
agent: moving,
|
|
262
|
+
teams,
|
|
263
|
+
onClose: () => setMoving(null),
|
|
264
|
+
onMoved: async () => {
|
|
265
|
+
setMoving(null);
|
|
266
|
+
await onChanged();
|
|
267
|
+
}
|
|
268
|
+
}),
|
|
269
|
+
/* @__PURE__ */ jsx(ConfirmDialog, {
|
|
270
|
+
open: deleting !== null,
|
|
271
|
+
onOpenChange: (open) => {
|
|
272
|
+
if (!open) setDeleting(null);
|
|
273
|
+
},
|
|
274
|
+
title: `Delete ${deleting?.name ?? "this Agent"} permanently?`,
|
|
275
|
+
description: /* @__PURE__ */ jsx("p", {
|
|
276
|
+
className: "m-0",
|
|
277
|
+
children: "This removes the Agent, its conversations, messages, schedules, skill attachments and its folder. It cannot be undone. To keep them, archive it instead."
|
|
278
|
+
}),
|
|
279
|
+
confirmLabel: "Delete permanently",
|
|
280
|
+
onConfirm: async () => {
|
|
281
|
+
if (!deleting) return;
|
|
282
|
+
await deleteAgent(deleting.id);
|
|
283
|
+
if (archived?.id === deleting.id) setArchived(null);
|
|
284
|
+
await onChanged();
|
|
285
|
+
}
|
|
286
|
+
})
|
|
287
|
+
]
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
function emptyFilter(filter) {
|
|
291
|
+
return filter === "archived" ? "No archived Agents" : "No current Agents";
|
|
292
|
+
}
|
|
293
|
+
//#endregion
|
|
294
|
+
//#region src/routes/agents/index.tsx?tsr-split=component
|
|
295
|
+
function AgentsPage() {
|
|
296
|
+
const { agents, templates, teams, chat } = Route.useLoaderData();
|
|
297
|
+
const router = useRouter();
|
|
298
|
+
const [spawning, setSpawning] = useState(false);
|
|
299
|
+
return /* @__PURE__ */ jsxs(ManagePage, {
|
|
300
|
+
title: "Agents",
|
|
301
|
+
description: "Every Agent in every Team. Open one to talk to it; its model, skills and schedules are in its side panel.",
|
|
302
|
+
actions: /* @__PURE__ */ jsx(Button, {
|
|
303
|
+
variant: "primary",
|
|
304
|
+
disabled: templates.length === 0 || teams.length === 0,
|
|
305
|
+
onClick: () => setSpawning(true),
|
|
306
|
+
children: "Spawn an agent"
|
|
307
|
+
}),
|
|
308
|
+
children: [/* @__PURE__ */ jsx(AgentsCard, {
|
|
309
|
+
agents,
|
|
310
|
+
teams,
|
|
311
|
+
templates,
|
|
312
|
+
chat,
|
|
313
|
+
onSpawn: () => setSpawning(true),
|
|
314
|
+
onChanged: () => router.invalidate({ sync: true })
|
|
315
|
+
}), spawning && /* @__PURE__ */ jsx(SpawnDialog, {
|
|
316
|
+
profiles: templates,
|
|
317
|
+
teams,
|
|
318
|
+
onClose: () => setSpawning(false)
|
|
319
|
+
})]
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
//#endregion
|
|
323
|
+
export { AgentsPage as component };
|