bazilion 0.51.0 → 0.53.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 +74 -28
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +547 -187
- package/dist/daemon.js.map +1 -1
- package/dist/web/client/assets/AddProviderDialog-CO_uijWF.js +1 -0
- package/dist/web/client/assets/AgentTemplateParts-Dl35c-Ux.js +1 -0
- package/dist/web/client/assets/ConfigPage-DiQiJXP6.js +1 -0
- package/dist/web/client/assets/ConfirmDialog-BVytx3kN.js +1 -0
- package/dist/web/client/assets/ConnectionsView-DDrBaiLg.js +1 -0
- package/dist/web/client/assets/Dialog-BTDzv3J5.js +1 -0
- package/dist/web/client/assets/ManagePage-xlePXXx5.js +1 -0
- package/dist/web/client/assets/SectionTabs-BMiRKFfb.js +1 -0
- package/dist/web/client/assets/Segmented-Co4n2C5X.js +1 -0
- package/dist/web/client/assets/SpawnDialog-ejwXnyxy.js +1 -0
- package/dist/web/client/assets/SpawnTeamModal-Cp-nAvIC.js +1 -0
- package/dist/web/client/assets/TeamForm-Cz9uDVvb.js +1 -0
- package/dist/web/client/assets/TeamThread-D8xqE_gb.js +1 -0
- package/dist/web/client/assets/UnsavedChangesGuard-DmT4nBQU.js +1 -0
- package/dist/web/client/assets/_id-DEQxwq2v.js +1 -0
- package/dist/web/client/assets/_id-DSRgpxEc.js +1 -0
- package/dist/web/client/assets/access-34_ShgHU.js +1 -0
- package/dist/web/client/assets/agent-actions--EO4yJ4Q.js +1 -0
- package/dist/web/client/assets/agents-C87yBHaR.js +1 -0
- package/dist/web/client/assets/agents-DvCSl1Ro.js +1 -0
- package/dist/web/client/assets/api-CoLs57oO.js +1 -0
- package/dist/web/client/assets/arrow-right-BhTWtC9z.js +1 -0
- package/dist/web/client/assets/attention-CteEeRvX.js +1 -0
- package/dist/web/client/assets/chevron-right-BqOIX9UM.js +1 -0
- package/dist/web/client/assets/config-XJuQeEP4.js +1 -0
- package/dist/web/client/assets/createLucideIcon-dN8ooBD1.js +1 -0
- package/dist/web/client/assets/download-Dj-1ltZb.js +1 -0
- package/dist/web/client/assets/file-text-DiP-LaEg.js +1 -0
- package/dist/web/client/assets/form-Bvr_f9lR.js +1 -0
- package/dist/web/client/assets/images-BKjyhYUc.js +1 -0
- package/dist/web/client/assets/index-J_Uqj4md.js +54 -0
- package/dist/web/client/assets/key-round-QpqZklz6.js +1 -0
- package/dist/web/client/assets/list-checks-BeyG5SVQ.js +1 -0
- package/dist/web/client/assets/login-076Bc601.js +1 -0
- package/dist/web/client/assets/manage-CsrV2hhK.js +1 -0
- package/dist/web/client/assets/mcp-8N0BqZ0G.js +1 -0
- package/dist/web/client/assets/message-square-DnpSOYv4.js +1 -0
- package/dist/web/client/assets/model-facts-DoB6QD5y.js +1 -0
- package/dist/web/client/assets/network-BC7rNaOC.js +1 -0
- package/dist/web/client/assets/parts-B0JBolvG.js +1 -0
- package/dist/web/client/assets/plus-DZ3KVo7E.js +1 -0
- package/dist/web/client/assets/routes-3HkZZOOe.js +76 -0
- package/dist/web/client/assets/skills-DiaqZRXT.js +1 -0
- package/dist/web/client/assets/square-terminal-hQZ6pexU.js +1 -0
- package/dist/web/client/assets/style-BtcFIkOS.js +7 -0
- package/dist/web/client/assets/styles-C7Ztw15K.css +2 -0
- package/dist/web/client/assets/system-YWlJ8ogO.js +1 -0
- package/dist/web/client/assets/teams-DQwceMvk.js +1 -0
- package/dist/web/client/assets/teams-DTC3plIH.js +1 -0
- package/dist/web/client/assets/telegram-D4wINntt.js +1 -0
- package/dist/web/client/assets/tools-CZeQ9pDx.js +1 -0
- package/dist/web/client/assets/use-resource-BaTkTGvG.js +1 -0
- package/dist/web/client/assets/welcome-CnxP_RCk.js +1 -0
- package/dist/web/client/assets/wrench-BrwBswfo.js +1 -0
- package/dist/web/server/assets/{AddProviderDialog-CR6TRYdZ.js → AddProviderDialog-Di5crZUB.js} +9 -205
- package/dist/web/server/assets/AgentTemplateParts-Cqy7kSzx.js +269 -0
- package/dist/web/server/assets/{ConfigPage-CIh3ohea.js → ConfigPage-oXM3wyOU.js} +2 -2
- package/dist/web/server/assets/{ConfirmDialog-B79K2KEW.js → ConfirmDialog-DfaJ--A6.js} +2 -2
- package/dist/web/server/assets/{ConnectionsView-BIMYdp9C.js → ConnectionsView-DZrLoNoW.js} +7 -7
- package/dist/web/server/assets/{Dialog-CVqpXxuN.js → Dialog-aup_yJv5.js} +1 -1
- package/dist/web/server/assets/ManagePage-0LKHEcT_.js +29 -0
- package/dist/web/server/assets/ModelMenu-BAZeARx6.js +138 -0
- package/dist/web/server/assets/{Rail-Cg-efcpA.js → Rail-7JU6ly2O.js} +17 -107
- package/dist/web/server/assets/{SectionTabs-DrcgVeZd.js → SectionTabs-CWQ5orUW.js} +12 -5
- package/dist/web/server/assets/SpawnDialog-CYkwzETs.js +124 -0
- package/dist/web/server/assets/SpawnTeamModal-CCe6P82H.js +127 -0
- package/dist/web/server/assets/TeamForm-BzQmdhVi.js +141 -0
- package/dist/web/server/assets/{TeamThread-5CjVPcDr.js → TeamThread-SyQpUvz5.js} +3 -3
- package/dist/web/server/assets/{UnsavedChangesGuard-CyF2Z9p1.js → UnsavedChangesGuard-DrOvPV14.js} +1 -1
- package/dist/web/server/assets/_id-AcyGvFrE.js +400 -0
- package/dist/web/server/assets/{_id-8bsYEcGg.js → _id-BGTgqsWm.js} +8 -4
- package/dist/web/server/assets/{_id-TVruGcOd.js → _id-BKzOw78O.js} +11 -3
- package/dist/web/server/assets/{_id-0fEWiVZX.js → _id-DPGzfmjG.js} +258 -206
- package/dist/web/server/assets/_id-DXm9W55C.js +16 -0
- package/dist/web/server/assets/_id-DojvxRZn.js +39 -0
- package/dist/web/server/assets/_tanstack-start-manifest_v-D7RvKGRH.js +285 -0
- package/dist/web/server/assets/{tokens-C-oDTqnp.js → access-BJe-NduL.js} +5 -5
- package/dist/web/server/assets/access-CKSW7MFH.js +297 -0
- package/dist/web/server/assets/{tokens-CEdl8puR.js → access-WWspT0v4.js} +5 -4
- package/dist/web/server/assets/agent-actions-CUDMCG0F.js +20 -0
- package/dist/web/server/assets/agents-1sjSvp5p.js +12 -0
- package/dist/web/server/assets/{agents-BnWgFo6o.js → agents-6d9WxbYF.js} +9 -6
- package/dist/web/server/assets/agents-DKVGUwD1.js +31 -0
- package/dist/web/server/assets/agents-DUI4Yjtg.js +13 -0
- package/dist/web/server/assets/agents-DsHeRaLq.js +327 -0
- package/dist/web/server/assets/agents-DtLDoZ_u.js +136 -0
- package/dist/web/server/assets/{attention-Cr7puThv.js → attention-B6sSDR_4.js} +2 -1
- package/dist/web/server/assets/{attention-CHQEQiZl.js → attention-DefKwvgm.js} +2 -2
- package/dist/web/server/assets/attention-johfkM0_.js +203 -0
- package/dist/web/server/assets/{config-DOp28gcy.js → config-Clz57LuN.js} +186 -87
- package/dist/web/server/assets/{config-DzgkbBoD.js → config-DYAaaE9Z.js} +2 -2
- package/dist/web/server/assets/{createSsrRpc-CcLbajrF.js → createSsrRpc-BijMHgqE.js} +2 -46
- package/dist/web/server/assets/form-BRQAsKKq.js +319 -0
- package/dist/web/server/assets/manage-Ppyi3Y5y.js +230 -0
- package/dist/web/server/assets/mcp-Ce6O8Qs2.js +378 -0
- package/dist/web/server/assets/{mcp-D3OCoHtO.js → mcp-DB38leWS.js} +2 -2
- package/dist/web/server/assets/model-facts-mrfrWQne.js +136 -0
- package/dist/web/server/assets/parts-mabERIJZ.js +380 -0
- package/dist/web/server/assets/{router-Cs2Ak4II.js → router-C97bwlXi.js} +55 -50
- package/dist/web/server/assets/{routes-BSNOKE-C.js → routes-C4aGqXfr.js} +65 -17
- package/dist/web/server/assets/{routes-CO4l-GJ0.js → routes-DuOShl4q.js} +2 -2
- package/dist/web/server/assets/{routes-BVwqgZGI.js → routes-IHMVKpDK.js} +3 -3
- package/dist/web/server/assets/{skills-CggQJk6a.js → skills-B7sg0QKS.js} +2 -2
- package/dist/web/server/assets/{skills-h5aHa7Q8.js → skills-DWzlT_hC.js} +9 -1
- package/dist/web/server/assets/skills-hfTSwqsG.js +353 -0
- package/dist/web/server/assets/{style-GYDODk2F.js → style-BR7ufS6Z.js} +1 -1
- package/dist/web/server/assets/system-CNQpt3JB.js +145 -0
- package/dist/web/server/assets/{system-DtswhLW62.js → system-D3th6n2E.js} +4 -2
- package/dist/web/server/assets/{system-DsJfpBPl.js → system-DaP0ol67.js} +2 -2
- package/dist/web/server/assets/{teams-B6lBhvdL.js → teams-4cEZ4_rw.js} +4 -2
- package/dist/web/server/assets/{teams-BxnvFTyn.js → teams-70u1XQTr.js} +1 -3
- package/dist/web/server/assets/teams-BKHe67f3.js +176 -0
- package/dist/web/server/assets/{teams-YrmyutM4.js → teams-BopOP4x7.js} +8 -1
- package/dist/web/server/assets/teams-C3xwTz8-.js +219 -0
- package/dist/web/server/assets/{teams-Bp2tERZe.js → teams-CuKE5iAK.js} +2 -2
- package/dist/web/server/assets/{telegram-D2RZriz_.js → telegram-BnQADwnj.js} +5 -5
- package/dist/web/server/assets/telegram-BpmK-HHV.js +1059 -0
- package/dist/web/server/assets/{telegram-Gy7_9yih.js → telegram-CGol0CKX.js} +3 -3
- package/dist/web/server/assets/tools-BQeWn7Tj.js +12 -0
- package/dist/web/server/assets/tools-C-wwWjLI.js +12 -0
- package/dist/web/server/assets/tools-CURTfG2q.js +341 -0
- package/dist/web/server/assets/{use-resource-ChQozXVI.js → use-resource-DVzK0toP.js} +1 -1
- package/dist/web/server/assets/utils-C_uf36nf.js +8 -0
- package/dist/web/server/assets/{welcome-BLw1G6SS.js → welcome-OiZCAIHZ.js} +5 -5
- package/dist/web/server/assets/{welcome-ByAkvHSP.js → welcome-SNsE49JO.js} +2 -2
- package/dist/web/server/assets/{workspace-DeEYMPDX.js → workspace-DaitCM0t.js} +1 -8
- package/dist/web/server/server.js +30 -30
- package/dist/worker.js +202 -120
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
- package/dist/web/client/assets/AddProviderDialog-Diic36c_.js +0 -1
- package/dist/web/client/assets/ConfigPage-pupvtSCX.js +0 -1
- package/dist/web/client/assets/ConfirmDialog-GFDcHI1L.js +0 -1
- package/dist/web/client/assets/ConnectionsView-y1CeY-6U.js +0 -1
- package/dist/web/client/assets/Dialog-bg86_x4v.js +0 -1
- package/dist/web/client/assets/FieldRow-B8eIni5r.js +0 -1
- package/dist/web/client/assets/ModelSelect-DvCLUmkW.js +0 -1
- package/dist/web/client/assets/SectionTabs-D4ezA6U4.js +0 -1
- package/dist/web/client/assets/Segmented-Dh77vmpp.js +0 -1
- package/dist/web/client/assets/SkillFindings-BzLO1lNA.js +0 -1
- package/dist/web/client/assets/SkillsPicker-hI3YXvib.js +0 -1
- package/dist/web/client/assets/SpawnDialog-YJX6UMBC.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-DFvbakHo.js +0 -1
- package/dist/web/client/assets/UnsavedChangesGuard-DBJikVgc.js +0 -1
- package/dist/web/client/assets/_id-BjNtLwak.js +0 -1
- package/dist/web/client/assets/_id-BklaQf3z.js +0 -1
- package/dist/web/client/assets/agents-D9cUF2d9.js +0 -1
- package/dist/web/client/assets/agents-wuBlzx4e.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-8ZkSLl2e.js +0 -1
- package/dist/web/client/assets/check-BjgKoGvU.js +0 -1
- package/dist/web/client/assets/config-Con_BbSh.js +0 -1
- package/dist/web/client/assets/createLucideIcon-C6gOo8sD.js +0 -1
- package/dist/web/client/assets/index-Br9qkGM-.js +0 -54
- package/dist/web/client/assets/link-Cbztlp_R.js +0 -1
- package/dist/web/client/assets/login-llnOKSJc.js +0 -1
- package/dist/web/client/assets/mcp-zIUguMSI.js +0 -1
- package/dist/web/client/assets/plus-CWrKMtvA.js +0 -1
- package/dist/web/client/assets/routes-BY5uqJ2n.js +0 -76
- package/dist/web/client/assets/save-f9O-CQia.js +0 -1
- package/dist/web/client/assets/services-esLrcTwe.js +0 -1
- package/dist/web/client/assets/skills-DzYXksM0.js +0 -1
- package/dist/web/client/assets/style-Cdzqt_TJ.js +0 -7
- package/dist/web/client/assets/styles-BRSS6yrm.css +0 -2
- package/dist/web/client/assets/system-CsI66nyZ.js +0 -1
- package/dist/web/client/assets/teams-CHE_zpxS.js +0 -1
- package/dist/web/client/assets/teams-dxG9OESG.js +0 -1
- package/dist/web/client/assets/telegram-C3dGndJV.js +0 -1
- package/dist/web/client/assets/tokens-CNNH-Wr9.js +0 -1
- package/dist/web/client/assets/use-resource-BjnxgGvh.js +0 -1
- package/dist/web/client/assets/welcome-C8EOtc8P.js +0 -1
- package/dist/web/server/assets/FieldRow-CHVhX2rS.js +0 -173
- package/dist/web/server/assets/ModelSelect-DrZrdndo.js +0 -43
- package/dist/web/server/assets/SkillFindings-DSDiL6hn.js +0 -46
- package/dist/web/server/assets/SkillsPicker-DlqEfRWh.js +0 -67
- package/dist/web/server/assets/SpawnDialog-BUUlLxE9.js +0 -129
- package/dist/web/server/assets/Tabs-BhF41MfQ.js +0 -20
- package/dist/web/server/assets/TeamForm-CvQAs2FA.js +0 -96
- package/dist/web/server/assets/_id-BvAaRSUW.js +0 -18
- package/dist/web/server/assets/_id-Dg6M_qfr.js +0 -383
- package/dist/web/server/assets/_id-Dji7xr9C.js +0 -28
- package/dist/web/server/assets/_tanstack-start-manifest_v-sxiIH4M7.js +0 -214
- package/dist/web/server/assets/agents-BDA5yYZ2.js +0 -130
- package/dist/web/server/assets/agents-BTDxmp-F.js +0 -12
- package/dist/web/server/assets/agents-DM7guWF2.js +0 -14
- package/dist/web/server/assets/agents-DktqUffG.js +0 -327
- package/dist/web/server/assets/agents-xgZ9rsac.js +0 -27
- package/dist/web/server/assets/attention-De3-ehuf.js +0 -216
- package/dist/web/server/assets/mcp-CO_tycXU.js +0 -250
- package/dist/web/server/assets/services-DZLxUSG8.js +0 -13
- package/dist/web/server/assets/services-DsHRLL8q.js +0 -12
- package/dist/web/server/assets/services-DsvpaF3L.js +0 -74
- package/dist/web/server/assets/skills-DKYV7PTk.js +0 -275
- package/dist/web/server/assets/system-CZ2qzBz3.js +0 -138
- package/dist/web/server/assets/teams-B6PzNcoy.js +0 -88
- package/dist/web/server/assets/teams-C-8iz-uV.js +0 -108
- package/dist/web/server/assets/telegram-CXrP3hMp.js +0 -984
- package/dist/web/server/assets/tokens-DSLwQ1Pw.js +0 -232
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { n as createServerFn } from "../server.js";
|
|
2
|
+
import { t as createSsrRpc } from "./createSsrRpc-BijMHgqE.js";
|
|
3
|
+
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
|
+
//#region src/routes/agents/index.tsx
|
|
5
|
+
var $$splitComponentImporter = () => import("./agents-DsHeRaLq.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 };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { n as createServerFn } from "../server.js";
|
|
2
|
+
import { t as MODELS_PATH } from "./ModelMenu-BAZeARx6.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,31 @@
|
|
|
1
|
+
import { n as createServerFn } from "../server.js";
|
|
2
|
+
import { t as MODELS_PATH } from "./ModelMenu-BAZeARx6.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,13 @@
|
|
|
1
|
+
import { n as createServerFn } from "../server.js";
|
|
2
|
+
import { t as createSsrRpc } from "./createSsrRpc-BijMHgqE.js";
|
|
3
|
+
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
|
+
//#region src/routes/templates/agents/index.tsx
|
|
5
|
+
var $$splitComponentImporter = () => import("./agents-DtLDoZ_u.js");
|
|
6
|
+
var fetchTemplates = createServerFn({ method: "GET" }).handler(createSsrRpc("7bc7f3b145d10e7a733fbe068ce367dda04ec2f1cdb53f0d6dcba3838eb2deeb"));
|
|
7
|
+
var Route = createFileRoute("/templates/agents/")({
|
|
8
|
+
validateSearch: (search) => ({ new: search.new === 1 || search.new === "1" ? 1 : void 0 }),
|
|
9
|
+
loader: () => fetchTemplates(),
|
|
10
|
+
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
11
|
+
});
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Route as t };
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import { C as api, T as errorMessage, d as AgentAvatar, u as Button } from "./workspace-DaitCM0t.js";
|
|
2
|
+
import { n as DialogActions, t as Dialog } from "./Dialog-aup_yJv5.js";
|
|
3
|
+
import { t as ConfirmDialog } from "./ConfirmDialog-DfaJ--A6.js";
|
|
4
|
+
import { t as Segmented } from "./Segmented-3ZLdqa5U.js";
|
|
5
|
+
import { i as unarchiveAgent, n as deleteAgent, t as archiveAgent } from "./agent-actions-CUDMCG0F.js";
|
|
6
|
+
import { _ as RowMenu, c as CardToolbar, d as Chip, g as Notice, h as ListRow, i as CardEmpty, m as GroupHeader, o as CardList, r as CardBody, v as SearchField, y as SetupCard } from "./parts-mabERIJZ.js";
|
|
7
|
+
import { s as SelectField } from "./form-BRQAsKKq.js";
|
|
8
|
+
import { t as SpawnDialog } from "./SpawnDialog-CYkwzETs.js";
|
|
9
|
+
import { T as templateName, c as groupAgents, n as agentCounts, r as agentModel, s as count } from "./manage-Ppyi3Y5y.js";
|
|
10
|
+
import { t as Route } from "./agents-1sjSvp5p.js";
|
|
11
|
+
import { t as ManagePage } from "./ManagePage-0LKHEcT_.js";
|
|
12
|
+
import { useEffect, useRef, useState } from "react";
|
|
13
|
+
import { Link, useRouter } from "@tanstack/react-router";
|
|
14
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
import { Bot } from "lucide-react";
|
|
16
|
+
//#region src/components/manage/MoveAgentDialog.tsx
|
|
17
|
+
/** Move an Agent to another Team: it joins with no connections. */
|
|
18
|
+
function MoveAgentDialog({ agent, teams, onClose, onMoved }) {
|
|
19
|
+
const others = teams.filter((team) => team.id !== agent.teamId);
|
|
20
|
+
const [teamId, setTeamId] = useState(others[0]?.id ?? "");
|
|
21
|
+
const [busy, setBusy] = useState(false);
|
|
22
|
+
const [error, setError] = useState(null);
|
|
23
|
+
const from = teams.find((team) => team.id === agent.teamId)?.name ?? agent.teamId;
|
|
24
|
+
async function move(event) {
|
|
25
|
+
event.preventDefault();
|
|
26
|
+
if (!teamId || busy) return;
|
|
27
|
+
setBusy(true);
|
|
28
|
+
setError(null);
|
|
29
|
+
try {
|
|
30
|
+
await api(`/api/agents/${encodeURIComponent(agent.id)}/team`, {
|
|
31
|
+
method: "PATCH",
|
|
32
|
+
body: { teamId }
|
|
33
|
+
});
|
|
34
|
+
await onMoved();
|
|
35
|
+
} catch (cause) {
|
|
36
|
+
setError(errorMessage(cause));
|
|
37
|
+
setBusy(false);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return /* @__PURE__ */ jsx(Dialog, {
|
|
41
|
+
title: `Move ${agent.name}`,
|
|
42
|
+
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.`,
|
|
43
|
+
busy,
|
|
44
|
+
onClose,
|
|
45
|
+
children: /* @__PURE__ */ jsxs("form", {
|
|
46
|
+
onSubmit: (event) => void move(event),
|
|
47
|
+
className: "grid gap-4",
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsx(SelectField, {
|
|
50
|
+
label: "Team",
|
|
51
|
+
value: teamId,
|
|
52
|
+
options: others.map((team) => ({
|
|
53
|
+
value: team.id,
|
|
54
|
+
label: team.name
|
|
55
|
+
})),
|
|
56
|
+
disabled: busy,
|
|
57
|
+
className: "max-w-none",
|
|
58
|
+
onChange: setTeamId
|
|
59
|
+
}),
|
|
60
|
+
error && /* @__PURE__ */ jsx(Notice, {
|
|
61
|
+
tone: "warning",
|
|
62
|
+
role: "alert",
|
|
63
|
+
title: "It was not moved.",
|
|
64
|
+
children: error
|
|
65
|
+
}),
|
|
66
|
+
/* @__PURE__ */ jsxs(DialogActions, { children: [/* @__PURE__ */ jsx(Button, {
|
|
67
|
+
variant: "ghost",
|
|
68
|
+
disabled: busy,
|
|
69
|
+
onClick: onClose,
|
|
70
|
+
children: "Cancel"
|
|
71
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
72
|
+
variant: "primary",
|
|
73
|
+
type: "submit",
|
|
74
|
+
disabled: busy || !teamId,
|
|
75
|
+
children: busy ? "Moving…" : `Move to ${teams.find((team) => team.id === teamId)?.name ?? "Team"}`
|
|
76
|
+
})] })
|
|
77
|
+
]
|
|
78
|
+
})
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region src/components/manage/AgentsCard.tsx
|
|
83
|
+
function AgentsCard({ agents, teams, templates, chat, onSpawn, onChanged }) {
|
|
84
|
+
const [query, setQuery] = useState("");
|
|
85
|
+
const [filter, setFilter] = useState("current");
|
|
86
|
+
const [busy, setBusy] = useState(null);
|
|
87
|
+
const [error, setError] = useState(null);
|
|
88
|
+
const [archived, setArchived] = useState(null);
|
|
89
|
+
const [moving, setMoving] = useState(null);
|
|
90
|
+
const [deleting, setDeleting] = useState(null);
|
|
91
|
+
const counts = agentCounts(agents);
|
|
92
|
+
const restoreButton = useRef(null);
|
|
93
|
+
const [focusRestore, setFocusRestore] = useState(false);
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
if (!focusRestore || busy !== null) return;
|
|
96
|
+
restoreButton.current?.focus();
|
|
97
|
+
setFocusRestore(false);
|
|
98
|
+
}, [focusRestore, busy]);
|
|
99
|
+
const groups = groupAgents(agents, teams, filter, query);
|
|
100
|
+
async function run(agent, work) {
|
|
101
|
+
setBusy(agent.id);
|
|
102
|
+
setError(null);
|
|
103
|
+
try {
|
|
104
|
+
await work();
|
|
105
|
+
await onChanged();
|
|
106
|
+
} catch (cause) {
|
|
107
|
+
setError(errorMessage(cause));
|
|
108
|
+
} finally {
|
|
109
|
+
setBusy(null);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
const archive = (agent) => run(agent, async () => {
|
|
113
|
+
await archiveAgent(agent.id);
|
|
114
|
+
setArchived(agent);
|
|
115
|
+
setFocusRestore(true);
|
|
116
|
+
});
|
|
117
|
+
const restore = (agent) => run(agent, async () => {
|
|
118
|
+
await unarchiveAgent(agent.id);
|
|
119
|
+
setArchived(null);
|
|
120
|
+
});
|
|
121
|
+
return /* @__PURE__ */ jsxs(SetupCard, {
|
|
122
|
+
labelledBy: "manage-agents",
|
|
123
|
+
icon: /* @__PURE__ */ jsx(Bot, { className: "size-5" }),
|
|
124
|
+
title: "Agents",
|
|
125
|
+
description: "Grouped by Team. An archived Agent keeps its files and conversations, takes no work, and can be restored.",
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ jsxs(CardToolbar, { children: [/* @__PURE__ */ jsx(SearchField, {
|
|
128
|
+
label: "Find an Agent",
|
|
129
|
+
placeholder: "Find by name, creature or vibe",
|
|
130
|
+
value: query,
|
|
131
|
+
onChange: setQuery,
|
|
132
|
+
className: "min-w-0 flex-1 basis-60"
|
|
133
|
+
}), /* @__PURE__ */ jsx(Segmented, {
|
|
134
|
+
label: "Which Agents",
|
|
135
|
+
value: filter,
|
|
136
|
+
onChange: setFilter,
|
|
137
|
+
options: [
|
|
138
|
+
{
|
|
139
|
+
id: "current",
|
|
140
|
+
label: `Current ${counts.current}`
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: "archived",
|
|
144
|
+
label: `Archived ${counts.archived}`
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
id: "all",
|
|
148
|
+
label: "All"
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
})] }),
|
|
152
|
+
archived && /* @__PURE__ */ jsx(CardBody, {
|
|
153
|
+
className: "py-3",
|
|
154
|
+
children: /* @__PURE__ */ jsxs(Notice, {
|
|
155
|
+
tone: "neutral",
|
|
156
|
+
actions: /* @__PURE__ */ jsxs(Button, {
|
|
157
|
+
ref: restoreButton,
|
|
158
|
+
variant: "ghost",
|
|
159
|
+
disabled: busy !== null,
|
|
160
|
+
onClick: () => void restore(archived),
|
|
161
|
+
children: ["Restore ", archived.name]
|
|
162
|
+
}),
|
|
163
|
+
children: [archived.name, " is archived. It keeps its files and conversations and takes no work until it is restored."]
|
|
164
|
+
})
|
|
165
|
+
}),
|
|
166
|
+
error && /* @__PURE__ */ jsx(CardBody, {
|
|
167
|
+
className: "py-3",
|
|
168
|
+
children: /* @__PURE__ */ jsx(Notice, {
|
|
169
|
+
tone: "warning",
|
|
170
|
+
role: "alert",
|
|
171
|
+
title: "That did not work.",
|
|
172
|
+
children: error
|
|
173
|
+
})
|
|
174
|
+
}),
|
|
175
|
+
agents.length === 0 ? /* @__PURE__ */ jsx(CardEmpty, {
|
|
176
|
+
icon: /* @__PURE__ */ jsx(Bot, { className: "size-5" }),
|
|
177
|
+
title: "No Agents yet",
|
|
178
|
+
action: /* @__PURE__ */ jsx(Button, {
|
|
179
|
+
variant: "primary",
|
|
180
|
+
disabled: templates.length === 0 || teams.length === 0,
|
|
181
|
+
onClick: onSpawn,
|
|
182
|
+
children: "Spawn an agent"
|
|
183
|
+
}),
|
|
184
|
+
children: "An Agent is spawned from a template into a Team, and starts talking as soon as it is."
|
|
185
|
+
}) : groups.length === 0 ? /* @__PURE__ */ jsx(CardEmpty, {
|
|
186
|
+
title: query.trim() ? `No Agent matches “${query.trim()}”` : emptyFilter(filter),
|
|
187
|
+
children: query.trim() ? "Try another name, or look in all of them." : "Archived Agents appear here when there are any."
|
|
188
|
+
}) : groups.map(({ team, agents: members }) => /* @__PURE__ */ jsxs("section", {
|
|
189
|
+
"aria-label": team.name,
|
|
190
|
+
children: [/* @__PURE__ */ jsx(GroupHeader, {
|
|
191
|
+
title: team.name,
|
|
192
|
+
meta: `${count(members.length, "Agent")} · ${team.policyMode === "restricted" ? "Restricted" : "Open"}`,
|
|
193
|
+
action: /* @__PURE__ */ jsx(Link, {
|
|
194
|
+
to: "/",
|
|
195
|
+
search: {
|
|
196
|
+
team: team.id,
|
|
197
|
+
panel: "team"
|
|
198
|
+
},
|
|
199
|
+
children: "Open Team"
|
|
200
|
+
})
|
|
201
|
+
}), /* @__PURE__ */ jsx(CardList, { children: members.map((agent) => {
|
|
202
|
+
const template = templates.find((entry) => entry.id === agent.profileId);
|
|
203
|
+
const model = agentModel(agent, templates, chat);
|
|
204
|
+
const isArchived = agent.status === "archived";
|
|
205
|
+
const identity = [agent.identity?.creature, agent.identity?.vibe].filter(Boolean).join(" · ");
|
|
206
|
+
return /* @__PURE__ */ jsx(ListRow, {
|
|
207
|
+
inline: true,
|
|
208
|
+
leading: /* @__PURE__ */ jsx(AgentAvatar, {
|
|
209
|
+
identity: agent.identity,
|
|
210
|
+
size: 32
|
|
211
|
+
}),
|
|
212
|
+
title: /* @__PURE__ */ jsx(Link, {
|
|
213
|
+
to: "/",
|
|
214
|
+
search: { agent: agent.id },
|
|
215
|
+
className: "text-foreground hover:text-primary",
|
|
216
|
+
children: agent.name
|
|
217
|
+
}),
|
|
218
|
+
chip: isArchived && /* @__PURE__ */ jsx(Chip, {
|
|
219
|
+
tone: "neutral",
|
|
220
|
+
children: "Archived"
|
|
221
|
+
}),
|
|
222
|
+
meta: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
223
|
+
identity && /* @__PURE__ */ jsx("span", { children: identity }),
|
|
224
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
225
|
+
template ? /* @__PURE__ */ jsx("a", {
|
|
226
|
+
href: `/templates/agents/${encodeURIComponent(template.id)}`,
|
|
227
|
+
children: templateName(template)
|
|
228
|
+
}) : agent.profileId,
|
|
229
|
+
" ",
|
|
230
|
+
"template"
|
|
231
|
+
] }),
|
|
232
|
+
model && /* @__PURE__ */ jsxs("span", {
|
|
233
|
+
className: model.missing ? "font-semibold text-warning" : "",
|
|
234
|
+
children: [model.name, model.missing ? ", not in Chat" : model.inherited ? "" : ", its own"]
|
|
235
|
+
})
|
|
236
|
+
] }),
|
|
237
|
+
actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [isArchived && /* @__PURE__ */ jsx(Button, {
|
|
238
|
+
variant: "ghost",
|
|
239
|
+
disabled: busy === agent.id,
|
|
240
|
+
onClick: () => void restore(agent),
|
|
241
|
+
children: "Restore"
|
|
242
|
+
}), /* @__PURE__ */ jsx(RowMenu, {
|
|
243
|
+
label: `More for ${agent.name}`,
|
|
244
|
+
disabled: busy === agent.id,
|
|
245
|
+
items: [
|
|
246
|
+
teams.length > 1 && {
|
|
247
|
+
label: "Move to another Team…",
|
|
248
|
+
onSelect: () => setMoving(agent)
|
|
249
|
+
},
|
|
250
|
+
!isArchived && {
|
|
251
|
+
label: "Archive",
|
|
252
|
+
onSelect: () => void archive(agent)
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
label: "Delete permanently…",
|
|
256
|
+
danger: true,
|
|
257
|
+
onSelect: () => setDeleting(agent)
|
|
258
|
+
}
|
|
259
|
+
]
|
|
260
|
+
})] })
|
|
261
|
+
}, agent.id);
|
|
262
|
+
}) })]
|
|
263
|
+
}, team.id)),
|
|
264
|
+
moving && /* @__PURE__ */ jsx(MoveAgentDialog, {
|
|
265
|
+
agent: moving,
|
|
266
|
+
teams,
|
|
267
|
+
onClose: () => setMoving(null),
|
|
268
|
+
onMoved: async () => {
|
|
269
|
+
setMoving(null);
|
|
270
|
+
await onChanged();
|
|
271
|
+
}
|
|
272
|
+
}),
|
|
273
|
+
/* @__PURE__ */ jsx(ConfirmDialog, {
|
|
274
|
+
open: deleting !== null,
|
|
275
|
+
onOpenChange: (open) => {
|
|
276
|
+
if (!open) setDeleting(null);
|
|
277
|
+
},
|
|
278
|
+
title: `Delete ${deleting?.name ?? "this Agent"} permanently?`,
|
|
279
|
+
description: /* @__PURE__ */ jsx("p", {
|
|
280
|
+
className: "m-0",
|
|
281
|
+
children: "This removes the Agent, its conversations, messages, schedules, skill attachments and its folder. It cannot be undone. To keep them, archive it instead."
|
|
282
|
+
}),
|
|
283
|
+
confirmLabel: "Delete permanently",
|
|
284
|
+
onConfirm: async () => {
|
|
285
|
+
if (!deleting) return;
|
|
286
|
+
await deleteAgent(deleting.id);
|
|
287
|
+
if (archived?.id === deleting.id) setArchived(null);
|
|
288
|
+
await onChanged();
|
|
289
|
+
}
|
|
290
|
+
})
|
|
291
|
+
]
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
function emptyFilter(filter) {
|
|
295
|
+
return filter === "archived" ? "No archived Agents" : "No current Agents";
|
|
296
|
+
}
|
|
297
|
+
//#endregion
|
|
298
|
+
//#region src/routes/agents/index.tsx?tsr-split=component
|
|
299
|
+
function AgentsPage() {
|
|
300
|
+
const { agents, templates, teams, chat } = Route.useLoaderData();
|
|
301
|
+
const router = useRouter();
|
|
302
|
+
const [spawning, setSpawning] = useState(false);
|
|
303
|
+
return /* @__PURE__ */ jsxs(ManagePage, {
|
|
304
|
+
title: "Agents",
|
|
305
|
+
description: "Every Agent in every Team. Open one to talk to it; its model, skills and schedules are in its side panel.",
|
|
306
|
+
actions: /* @__PURE__ */ jsx(Button, {
|
|
307
|
+
variant: "primary",
|
|
308
|
+
disabled: templates.length === 0 || teams.length === 0,
|
|
309
|
+
onClick: () => setSpawning(true),
|
|
310
|
+
children: "Spawn an agent"
|
|
311
|
+
}),
|
|
312
|
+
children: [/* @__PURE__ */ jsx(AgentsCard, {
|
|
313
|
+
agents,
|
|
314
|
+
teams,
|
|
315
|
+
templates,
|
|
316
|
+
chat,
|
|
317
|
+
onSpawn: () => setSpawning(true),
|
|
318
|
+
onChanged: () => router.invalidate({ sync: true })
|
|
319
|
+
}), spawning && /* @__PURE__ */ jsx(SpawnDialog, {
|
|
320
|
+
profiles: templates,
|
|
321
|
+
teams,
|
|
322
|
+
onClose: () => setSpawning(false)
|
|
323
|
+
})]
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
//#endregion
|
|
327
|
+
export { AgentsPage as component };
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { C as api, u as Button } from "./workspace-DaitCM0t.js";
|
|
2
|
+
import { t as ConfirmDialog } from "./ConfirmDialog-DfaJ--A6.js";
|
|
3
|
+
import { _ as RowMenu, d as Chip, h as ListRow, i as CardEmpty, o as CardList, y as SetupCard } from "./parts-mabERIJZ.js";
|
|
4
|
+
import { t as SpawnDialog } from "./SpawnDialog-CYkwzETs.js";
|
|
5
|
+
import { E as templateUseLine, T as templateName, d as modelLine, s as count, w as templateDeleteBlocker, y as skillsLine } from "./manage-Ppyi3Y5y.js";
|
|
6
|
+
import { t as Route } from "./agents-DUI4Yjtg.js";
|
|
7
|
+
import { t as ManagePage } from "./ManagePage-0LKHEcT_.js";
|
|
8
|
+
import { t as CreateAgentTemplateDialog } from "./AgentTemplateParts-Cqy7kSzx.js";
|
|
9
|
+
import { useState } from "react";
|
|
10
|
+
import { useNavigate, useRouter } from "@tanstack/react-router";
|
|
11
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { FileText } from "lucide-react";
|
|
13
|
+
//#region src/routes/templates/agents/index.tsx?tsr-split=component
|
|
14
|
+
function AgentTemplatesPage() {
|
|
15
|
+
const { templates, teamTemplates, chat, skills, starter, teams } = Route.useLoaderData();
|
|
16
|
+
const search = Route.useSearch();
|
|
17
|
+
const navigate = useNavigate();
|
|
18
|
+
const router = useRouter();
|
|
19
|
+
const [creating, setCreating] = useState(search.new === 1);
|
|
20
|
+
const [spawnFrom, setSpawnFrom] = useState(null);
|
|
21
|
+
const [deleting, setDeleting] = useState(null);
|
|
22
|
+
const closeCreate = () => {
|
|
23
|
+
setCreating(false);
|
|
24
|
+
if (search.new) navigate({
|
|
25
|
+
to: "/templates/agents",
|
|
26
|
+
search: {},
|
|
27
|
+
replace: true
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ jsxs(ManagePage, {
|
|
31
|
+
title: "Agent templates",
|
|
32
|
+
description: "What a new Agent starts with: its files, its model and its skills. Agents already spawned keep their own copies.",
|
|
33
|
+
actions: /* @__PURE__ */ jsx(Button, {
|
|
34
|
+
variant: "primary",
|
|
35
|
+
onClick: () => setCreating(true),
|
|
36
|
+
children: "New Agent template"
|
|
37
|
+
}),
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ jsx(SetupCard, {
|
|
40
|
+
labelledBy: "manage-agent-templates",
|
|
41
|
+
icon: /* @__PURE__ */ jsx(FileText, { className: "size-5" }),
|
|
42
|
+
title: "Agent templates",
|
|
43
|
+
description: "Open one to edit its files, model and skills.",
|
|
44
|
+
action: /* @__PURE__ */ jsx(Chip, {
|
|
45
|
+
tone: "neutral",
|
|
46
|
+
children: count(templates.length, "template")
|
|
47
|
+
}),
|
|
48
|
+
children: templates.length === 0 ? /* @__PURE__ */ jsx(CardEmpty, {
|
|
49
|
+
icon: /* @__PURE__ */ jsx(FileText, { className: "size-5" }),
|
|
50
|
+
title: "No Agent templates yet",
|
|
51
|
+
action: /* @__PURE__ */ jsx(Button, {
|
|
52
|
+
variant: "primary",
|
|
53
|
+
onClick: () => setCreating(true),
|
|
54
|
+
children: "New Agent template"
|
|
55
|
+
}),
|
|
56
|
+
children: "Every Agent is spawned from a template."
|
|
57
|
+
}) : /* @__PURE__ */ jsx(CardList, { children: templates.map((template) => {
|
|
58
|
+
const model = modelLine(template.defaultModel, chat);
|
|
59
|
+
const blocker = templateDeleteBlocker(template, teamTemplates);
|
|
60
|
+
const href = `/templates/agents/${encodeURIComponent(template.id)}`;
|
|
61
|
+
return /* @__PURE__ */ jsx(ListRow, {
|
|
62
|
+
inline: true,
|
|
63
|
+
title: /* @__PURE__ */ jsx("a", {
|
|
64
|
+
href,
|
|
65
|
+
className: "text-foreground hover:text-primary",
|
|
66
|
+
children: templateName(template)
|
|
67
|
+
}),
|
|
68
|
+
chip: model.missing && /* @__PURE__ */ jsx(Chip, {
|
|
69
|
+
tone: "warning",
|
|
70
|
+
children: "Model not in Chat"
|
|
71
|
+
}),
|
|
72
|
+
meta: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
73
|
+
/* @__PURE__ */ jsx("span", {
|
|
74
|
+
className: model.missing ? "font-semibold text-warning" : "",
|
|
75
|
+
children: model.name
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ jsx("span", { children: skillsLine(template) }),
|
|
78
|
+
/* @__PURE__ */ jsx("span", { children: templateUseLine(template, teamTemplates) }),
|
|
79
|
+
/* @__PURE__ */ jsx("code", { children: template.id })
|
|
80
|
+
] }),
|
|
81
|
+
actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
|
|
82
|
+
variant: "ghost",
|
|
83
|
+
"aria-label": `Spawn an agent from ${templateName(template)}`,
|
|
84
|
+
onClick: () => setSpawnFrom(template.id),
|
|
85
|
+
children: "Spawn"
|
|
86
|
+
}), /* @__PURE__ */ jsx(RowMenu, {
|
|
87
|
+
label: `More for ${templateName(template)}`,
|
|
88
|
+
items: [{
|
|
89
|
+
label: "Edit files and settings",
|
|
90
|
+
onSelect: () => {
|
|
91
|
+
window.location.assign(href);
|
|
92
|
+
}
|
|
93
|
+
}, {
|
|
94
|
+
label: "Delete…",
|
|
95
|
+
danger: true,
|
|
96
|
+
disabledReason: blocker,
|
|
97
|
+
onSelect: () => setDeleting(template)
|
|
98
|
+
}]
|
|
99
|
+
})] })
|
|
100
|
+
}, template.id);
|
|
101
|
+
}) })
|
|
102
|
+
}),
|
|
103
|
+
creating && /* @__PURE__ */ jsx(CreateAgentTemplateDialog, {
|
|
104
|
+
chat,
|
|
105
|
+
skills,
|
|
106
|
+
starter,
|
|
107
|
+
onClose: closeCreate
|
|
108
|
+
}),
|
|
109
|
+
spawnFrom && /* @__PURE__ */ jsx(SpawnDialog, {
|
|
110
|
+
profiles: templates,
|
|
111
|
+
teams,
|
|
112
|
+
profileId: spawnFrom,
|
|
113
|
+
onClose: () => setSpawnFrom(null)
|
|
114
|
+
}),
|
|
115
|
+
/* @__PURE__ */ jsx(ConfirmDialog, {
|
|
116
|
+
open: deleting !== null,
|
|
117
|
+
onOpenChange: (open) => {
|
|
118
|
+
if (!open) setDeleting(null);
|
|
119
|
+
},
|
|
120
|
+
title: `Delete the ${deleting ? templateName(deleting) : ""} template?`,
|
|
121
|
+
description: /* @__PURE__ */ jsx("p", {
|
|
122
|
+
className: "m-0",
|
|
123
|
+
children: "This deletes the template and its files. No Agent and no Team template uses it."
|
|
124
|
+
}),
|
|
125
|
+
confirmLabel: "Delete template",
|
|
126
|
+
onConfirm: async () => {
|
|
127
|
+
if (!deleting) return;
|
|
128
|
+
await api(`/api/profiles/${encodeURIComponent(deleting.id)}`, { method: "DELETE" });
|
|
129
|
+
await router.invalidate({ sync: true });
|
|
130
|
+
}
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
//#endregion
|
|
136
|
+
export { AgentTemplatesPage as component };
|
|
@@ -14,7 +14,8 @@ var loadAttention = createServerFn({ method: "GET" }).handler(loadAttention_crea
|
|
|
14
14
|
const [list, summary] = await Promise.all([client.get(LIST_PATH), client.get(SUMMARY_PATH)]);
|
|
15
15
|
return {
|
|
16
16
|
list,
|
|
17
|
-
summary
|
|
17
|
+
summary,
|
|
18
|
+
now: Date.now()
|
|
18
19
|
};
|
|
19
20
|
});
|
|
20
21
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as createServerFn } from "../server.js";
|
|
2
|
-
import { t as createSsrRpc } from "./createSsrRpc-
|
|
2
|
+
import { t as createSsrRpc } from "./createSsrRpc-BijMHgqE.js";
|
|
3
3
|
import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
|
|
4
4
|
//#region src/routes/attention/index.tsx
|
|
5
|
-
var $$splitComponentImporter = () => import("./attention-
|
|
5
|
+
var $$splitComponentImporter = () => import("./attention-johfkM0_.js");
|
|
6
6
|
var loadAttention = createServerFn({ method: "GET" }).handler(createSsrRpc("883b401299422096ee31ee824f9a24b49d06bdcedce398789778c4c549a92f3a"));
|
|
7
7
|
var Route = createFileRoute("/attention/")({
|
|
8
8
|
loader: () => loadAttention(),
|