bazilion 0.55.0 → 0.57.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 +193 -37
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +1821 -788
- package/dist/daemon.js.map +1 -1
- package/dist/web/client/assets/AddProviderDialog-DwUu2FGE.js +1 -0
- package/dist/web/client/assets/AgentTemplateParts-C3BasVck.js +1 -0
- package/dist/web/client/assets/{Button-bTJUy9Qf.js → Button-CoKQRO-s.js} +1 -1
- package/dist/web/client/assets/ConfigPage-DFmHgEaL.js +1 -0
- package/dist/web/client/assets/ConfirmDialog-BCOfW63x.js +1 -0
- package/dist/web/client/assets/ConnectionsView-BbpY5YbI.js +1 -0
- package/dist/web/client/assets/ManagePage-BzyMHGqs.js +1 -0
- package/dist/web/client/assets/SectionTabs-C8H_LunZ.js +1 -0
- package/dist/web/client/assets/{Segmented-oPkAHPO1.js → Segmented-iylzLwE6.js} +1 -1
- package/dist/web/client/assets/SkillsParts-DoygBgF2.js +1 -0
- package/dist/web/client/assets/SpawnTeamModal-BVf4yN9X.js +1 -0
- package/dist/web/client/assets/TeamForm-Bfb5hVUX.js +1 -0
- package/dist/web/client/assets/TeamThread-BFmaBj82.js +1 -0
- package/dist/web/client/assets/UnsavedChangesGuard-BUsIHSxO.js +1 -0
- package/dist/web/client/assets/_id-BRD3kxrX.js +1 -0
- package/dist/web/client/assets/_id-BapVoTMJ.js +1 -0
- package/dist/web/client/assets/access-CqcKius1.js +1 -0
- package/dist/web/client/assets/{agent-actions-CUee6aJq.js → agent-actions-B-9KIwn6.js} +1 -1
- package/dist/web/client/assets/agents-BC_ITk28.js +1 -0
- package/dist/web/client/assets/agents-DQ8nQnD6.js +1 -0
- package/dist/web/client/assets/arrow-right-BqqfPqVi.js +1 -0
- package/dist/web/client/assets/attention-BnCihfi0.js +1 -0
- package/dist/web/client/assets/{bot-BCone8es.js → bot-BHky7KAX.js} +1 -1
- package/dist/web/client/assets/chart-column-DTsDbzL0.js +1 -0
- package/dist/web/client/assets/chevron-right-D1shxvdo.js +1 -0
- package/dist/web/client/assets/config-DYS8bkQl.js +1 -0
- package/dist/web/client/assets/{createLucideIcon-jxSFpY0Q.js → createLucideIcon-CZHSSDYA.js} +1 -1
- package/dist/web/client/assets/{download-Dy88XavQ.js → download-Dr0PgyMr.js} +1 -1
- package/dist/web/client/assets/es2015-DZDOQ3kj.js +41 -0
- package/dist/web/client/assets/{file-text-DPsZ8-h9.js → file-text-D6OTHixJ.js} +1 -1
- package/dist/web/client/assets/{images-QBh_rL8b.js → images-BULrW-FC.js} +1 -1
- package/dist/web/client/assets/index-CxXsZzDC.js +14 -0
- package/dist/web/client/assets/{key-round-C-I8fAG0.js → key-round-DmSZN0Kq.js} +1 -1
- package/dist/web/client/assets/{list-checks-C9Q-bjEi.js → list-checks-DdTdAQXS.js} +1 -1
- package/dist/web/client/assets/login-DFVsVP0s.js +1 -0
- package/dist/web/client/assets/{manage-BaIU5zKy.js → manage-CpXaObuS.js} +1 -1
- package/dist/web/client/assets/mcp-DslGDHmN.js +1 -0
- package/dist/web/client/assets/{message-square-Bwf9cHOx.js → message-square-B_pULba_.js} +1 -1
- package/dist/web/client/assets/{network-B3FA93gC.js → network-BqmVqC4_.js} +1 -1
- package/dist/web/client/assets/parts-C104qEuC.js +1 -0
- package/dist/web/client/assets/plus-CEKaHPBw.js +1 -0
- package/dist/web/client/assets/preload-helper-CZOd_z6l.js +1 -0
- package/dist/web/client/assets/routes-D1wFPm0n.js +85 -0
- package/dist/web/client/assets/skills-DmIo3vN3.js +1 -0
- package/dist/web/client/assets/{square-terminal-DaNLwvEs.js → square-terminal-CYfGBHPC.js} +1 -1
- package/dist/web/client/assets/style-CqkCFvvz.js +7 -0
- package/dist/web/client/assets/styles-C7NsCHeU.css +2 -0
- package/dist/web/client/assets/{system-CrTSr5_t.js → system-CUW9JZ9c.js} +1 -1
- package/dist/web/client/assets/teams-DJzYsuh9.js +1 -0
- package/dist/web/client/assets/teams-DrhG8KiS.js +1 -0
- package/dist/web/client/assets/telegram-Bk_kg8hb.js +1 -0
- package/dist/web/client/assets/tools-z9Ixmuu2.js +1 -0
- package/dist/web/client/assets/usage-DGe3x1m7.js +1 -0
- package/dist/web/client/assets/use-resource-qjIkNQDY.js +1 -0
- package/dist/web/client/assets/{users-round-BElBVSnw.js → users-round-cxQ5HF-C.js} +1 -1
- package/dist/web/client/assets/welcome-DDKqxHkF.js +1 -0
- package/dist/web/client/assets/{wrench-DotqSqSm.js → wrench-BLEJjETg.js} +1 -1
- package/dist/web/server/assets/{AddProviderDialog-BbpuvC2a.js → AddProviderDialog-CpLDHOcA.js} +6 -3
- package/dist/web/server/assets/AgentAvatar-8gTAy_tP.js +37 -0
- package/dist/web/server/assets/{AgentTemplateParts-Ce7snK3m.js → AgentTemplateParts-Dh9F_-T_.js} +7 -3
- package/dist/web/server/assets/Button-Dsnw22OF.js +17 -0
- package/dist/web/server/assets/{ConfigPage-qP9ejjuw.js → ConfigPage-CrxctbtN.js} +2 -2
- package/dist/web/server/assets/{ConfirmDialog-Z-uYbE9B.js → ConfirmDialog-C89B8qKM.js} +3 -1
- package/dist/web/server/assets/{ConnectionsView-CLIV7V5D.js → ConnectionsView-DslcKQmA.js} +9 -7
- package/dist/web/server/assets/Dialog-_Gt_Nt86.js +85 -0
- package/dist/web/server/assets/{ManagePage-BR9FwVZM.js → ManagePage-DGYNJ6XG.js} +2 -2
- package/dist/web/server/assets/{ModelMenu-D-hTgYOO.js → ModelMenu-DEJoYASj.js} +13 -1
- package/dist/web/server/assets/{SectionTabs-CWQ5orUW.js → SectionTabs--vMBvaUz.js} +9 -2
- package/dist/web/server/assets/{SkillsParts-DWpdydCJ.js → SkillsParts-CqS2B45v.js} +7 -3
- package/dist/web/server/assets/SpawnDialog-BNKj2Lup.js +127 -0
- package/dist/web/server/assets/{SpawnTeamModal-C-YMvoaB.js → SpawnTeamModal-zcLxtFOO.js} +6 -2
- package/dist/web/server/assets/{TeamForm-CL45gBdt.js → TeamForm-XFP0l2TB.js} +11 -5
- package/dist/web/server/assets/{TeamThread-CVVH6kKj.js → TeamThread-gYV_ToRM.js} +59 -12
- package/dist/web/server/assets/{UnsavedChangesGuard-CXK75QQp.js → UnsavedChangesGuard-CB_TugFF.js} +1 -1
- package/dist/web/server/assets/{_id-d2OwovYV.js → _id-517adSuB.js} +2 -2
- package/dist/web/server/assets/{_id-BKzOw78O.js → _id-BTyd2i5U.js} +1 -1
- package/dist/web/server/assets/{_id-8zsImuGa.js → _id-BsQnL9LV.js} +14 -9
- package/dist/web/server/assets/{_id-2I4CSMQj.js → _id-CyinHJam.js} +17 -11
- package/dist/web/server/assets/{_id-De3Bm0SG.js → _id-D4RFNqaJ.js} +2 -2
- package/dist/web/server/assets/{_id-BpfoPuTv.js → _id-josYXBx3.js} +2 -2
- package/dist/web/server/assets/_tanstack-start-manifest_v-w2xn07aY.js +275 -0
- package/dist/web/server/assets/{access-WWspT0v4.js → access-B97-94Wt.js} +1 -1
- package/dist/web/server/assets/{access-CyUoElTP.js → access-BdQmjMJV.js} +2 -2
- package/dist/web/server/assets/{access-CwZ27Wsl.js → access-Cc7fMMod.js} +7 -4
- package/dist/web/server/assets/activity-Czfq-5_F.js +471 -0
- package/dist/web/server/assets/{agent-actions-C07Cp5Ue.js → agent-actions-ChH7Mne4.js} +1 -1
- package/dist/web/server/assets/{agents-DCWEoaxY.js → agents-BL918wVc.js} +2 -2
- package/dist/web/server/assets/{agents-vuXrAv1j.js → agents-BlUZqqJn.js} +14 -8
- package/dist/web/server/assets/{agents-CRtMfKqX.js → agents-BzJFjA2i.js} +2 -2
- package/dist/web/server/assets/{agents-CwzhpDPm.js → agents-CjrkaEz8.js} +11 -8
- package/dist/web/server/assets/{agents-DQowl6Ly.js → agents-Tg3zkmQv.js} +2 -2
- package/dist/web/server/assets/{agents-DTub-rJk.js → agents-uw32jPWx.js} +2 -2
- package/dist/web/server/assets/{attention-Dki8rmGZ.js → attention-2unmuO-q.js} +1 -1
- package/dist/web/server/assets/{attention-BqCnJ1hg.js → attention-C94WWwQe.js} +2 -2
- package/dist/web/server/assets/{attention-DwGaur_w.js → attention-a_OmC6L3.js} +9 -7
- package/dist/web/server/assets/{auth-dJnrFW6y.js → auth-DuIqEAed.js} +1 -1
- package/dist/web/server/assets/{config-B9dJiji_.js → config-BG1KOtwA.js} +2 -2
- package/dist/web/server/assets/{config-D3MR2VjE.js → config-Bhem9XER.js} +10 -7
- package/dist/web/server/assets/{config-X7qWbbpH.js → config-D1Li_7Yt2.js} +1 -1
- package/dist/web/server/assets/createSsrRpc-6LHNEsSK.js +16 -0
- package/dist/web/server/assets/{daemon-client-B_ZRIIrT.js → daemon-client-D-NWKQto.js} +1 -1
- package/dist/web/server/assets/form-Bwsyt9OY.js +416 -0
- package/dist/web/server/assets/live-DbJeq6KP.js +263 -0
- package/dist/web/server/assets/{login-CRd1yTH5.js → login-BJdJ219n.js} +1 -1
- package/dist/web/server/assets/{login-ZN6KV8n-.js → login-C4lL4AxI.js} +2 -2
- package/dist/web/server/assets/{manage-Ce6cI4eW.js → manage-C7ReF2ZZ.js} +3 -2
- package/dist/web/server/assets/{mcp-CYQuYWGX.js → mcp-BFixpBQk.js} +2 -2
- package/dist/web/server/assets/{mcp-BQ15a9dG.js → mcp-BTZkDvdc.js} +7 -4
- package/dist/web/server/assets/{mcp-C97uAZe1.js → mcp-Ceg9gzKE.js} +1 -1
- package/dist/web/server/assets/open-groups-C89TEK85.js +12 -0
- package/dist/web/server/assets/{page-title-CVY-c2Pd.js → page-title-PTpFHXWo.js} +1 -1
- package/dist/web/server/assets/parts-B0wbj_yK.js +436 -0
- package/dist/web/server/assets/{router-CPdWGKQ5.js → router-Ci_9VxDk.js} +244 -104
- package/dist/web/server/assets/{routes-BPloBDc8.js → routes-CVrH9qgo.js} +3 -3
- package/dist/web/server/assets/{routes-Dw1K3TQw.js → routes-D9Mw1_VV.js} +1453 -403
- package/dist/web/server/assets/{routes-xDPesCQu.js → routes-DsuaDPTO.js} +3 -3
- package/dist/web/server/assets/{skills-DWzlT_hC.js → skills-BNbZ75am.js} +1 -1
- package/dist/web/server/assets/{skills-6VSpEORe.js → skills-BWwEFc4a.js} +2 -2
- package/dist/web/server/assets/{skills-D0xrNc2_.js → skills-D5rnOmKJ.js} +9 -7
- package/dist/web/server/assets/src-BeMh8Fze.js +113 -0
- package/dist/web/server/assets/{start-DhW7sy23.js → start-2MvkBRdC.js} +1 -1
- package/dist/web/server/assets/{style-aMybyKzc.js → style-B3l0Wtlf.js} +1 -1
- package/dist/web/server/assets/{system-B5sPgdQW.js → system-Cr4C-YRw.js} +2 -2
- package/dist/web/server/assets/{system-CXmiWyDG.js → system-DT7AU0e6.js} +3 -3
- package/dist/web/server/assets/{system-D3th6n2E.js → system-DsmXkgqn.js} +1 -1
- package/dist/web/server/assets/{teams-ClRBVSYU.js → teams-BeStcDvQ.js} +2 -2
- package/dist/web/server/assets/{teams-yF3I_Zjq.js → teams-CsEBLW8-.js} +14 -8
- package/dist/web/server/assets/{teams-Dq4RCxis.js → teams-Dix5XVIx.js} +2 -2
- package/dist/web/server/assets/{teams-iXiCnN2i.js → teams-DjE0swAZ.js} +10 -6
- package/dist/web/server/assets/{teams-70u1XQTr.js → teams-Rk_RED7X.js} +1 -1
- package/dist/web/server/assets/{teams-BopOP4x7.js → teams-u6m6JzuU.js} +1 -1
- package/dist/web/server/assets/{telegram-DwEgyR1x.js → telegram-BjqABrl-.js} +287 -273
- package/dist/web/server/assets/{telegram-CGol0CKX2.js → telegram-CQpF3EHA.js} +1 -1
- package/dist/web/server/assets/{telegram-D9U9c1MN.js → telegram-DhzHgDfg.js} +2 -2
- package/dist/web/server/assets/{tools-C-wwWjLI.js → tools-DC69leH7.js} +1 -1
- package/dist/web/server/assets/{tools-DflVIdDd.js → tools-Dn6RnOFu.js} +2 -2
- package/dist/web/server/assets/{tools-VPIKjr3y.js → tools-x_DQTQtE.js} +6 -4
- package/dist/web/server/assets/usage-4zMG0sab.js +465 -0
- package/dist/web/server/assets/usage-mvQegG4l.js +46 -0
- package/dist/web/server/assets/{use-resource-CbHGYti0.js → use-resource-BjN1uJoL.js} +10 -2
- package/dist/web/server/assets/{welcome-7DrYZVs6.js → welcome-BuE9FRf4.js} +2 -2
- package/dist/web/server/assets/{welcome-CxXMI4HI.js → welcome-DYw35wl5.js} +1 -1
- package/dist/web/server/assets/{welcome-966nOyyK.js → welcome-DrYbWGd_.js} +8 -6
- package/dist/web/server/assets/workspace-0XPILV1W.js +82 -0
- package/dist/web/server/server.js +20 -20
- package/dist/worker.js +143 -18
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
- package/dist/web/client/assets/AddProviderDialog-DfFOaCjC.js +0 -1
- package/dist/web/client/assets/AgentTemplateParts-IMJmAQjN.js +0 -1
- package/dist/web/client/assets/ConfigPage-CzLHZa5o.js +0 -1
- package/dist/web/client/assets/ConfirmDialog-Cu_evkgc.js +0 -1
- package/dist/web/client/assets/ConnectionsView-D7Fmutl2.js +0 -1
- package/dist/web/client/assets/ManagePage-BfvlCrmz.js +0 -1
- package/dist/web/client/assets/SectionTabs-D7kPQGoh.js +0 -1
- package/dist/web/client/assets/SkillsParts-BuTxcCam.js +0 -1
- package/dist/web/client/assets/SpawnTeamModal-B1UnOvtp.js +0 -1
- package/dist/web/client/assets/TeamForm-DbzxtRjj.js +0 -1
- package/dist/web/client/assets/TeamThread-jpsWq6vI.js +0 -1
- package/dist/web/client/assets/UnsavedChangesGuard-BfyU9v9i.js +0 -1
- package/dist/web/client/assets/_id-BCNBLF-2.js +0 -1
- package/dist/web/client/assets/_id-D8_H79U2.js +0 -1
- package/dist/web/client/assets/access-CDWe1Kwy.js +0 -1
- package/dist/web/client/assets/agents-sE686DTf.js +0 -1
- package/dist/web/client/assets/agents-yrur1NDa.js +0 -1
- package/dist/web/client/assets/arrow-right-U66krZnr.js +0 -1
- package/dist/web/client/assets/attention-DYEHDfmx.js +0 -1
- package/dist/web/client/assets/chevron-right-CuqJFXTe.js +0 -1
- package/dist/web/client/assets/config-BHv886pr.js +0 -1
- package/dist/web/client/assets/index-GOthyyE-.js +0 -14
- package/dist/web/client/assets/login-Dhe15Uuc.js +0 -1
- package/dist/web/client/assets/mcp-A_Eo7x3q.js +0 -1
- package/dist/web/client/assets/parts-CpIfn_BH.js +0 -41
- package/dist/web/client/assets/plus-CQPjc8uR.js +0 -1
- package/dist/web/client/assets/routes-CTg_yjbY.js +0 -85
- package/dist/web/client/assets/skills-CLjtYtkA.js +0 -1
- package/dist/web/client/assets/style-mjEbxhf5.js +0 -7
- package/dist/web/client/assets/styles-DzcEC3Rd.css +0 -2
- package/dist/web/client/assets/teams-Bhje5n2h.js +0 -1
- package/dist/web/client/assets/teams-Cbgw0Qhv.js +0 -1
- package/dist/web/client/assets/telegram-HtUczmaA.js +0 -1
- package/dist/web/client/assets/tools-BpjFvmoX.js +0 -1
- package/dist/web/client/assets/use-resource-BnvgCpBi.js +0 -1
- package/dist/web/client/assets/welcome-D47LKWYO.js +0 -1
- package/dist/web/server/assets/Rail-b6EbjBB-.js +0 -605
- package/dist/web/server/assets/SpawnDialog-3wNx0W1R.js +0 -1851
- package/dist/web/server/assets/_tanstack-start-manifest_v-kkY_s_uR.js +0 -256
- package/dist/web/server/assets/createSsrRpc-qesavJv-.js +0 -72
- package/dist/web/server/assets/public-origin-BpDkdS5Q.js +0 -34
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { p as cn } from "./ModelMenu-DEJoYASj.js";
|
|
2
|
+
import { useEffect, useLayoutEffect, useRef } from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { X } from "lucide-react";
|
|
5
|
+
import { Dialog } from "radix-ui";
|
|
6
|
+
//#region src/components/Dialog.tsx
|
|
7
|
+
var useBrowserLayoutEffect = typeof document === "undefined" ? useEffect : useLayoutEffect;
|
|
8
|
+
/** The element to refocus when a dialog closes: whatever had focus when it opened. */
|
|
9
|
+
function getDialogFocusRestoreTarget(doc) {
|
|
10
|
+
const target = doc.activeElement;
|
|
11
|
+
if (!target || target === doc.body || target === doc.documentElement || !("focus" in target) || typeof target.focus !== "function") return null;
|
|
12
|
+
return target;
|
|
13
|
+
}
|
|
14
|
+
function restoreDialogFocus(target, doc) {
|
|
15
|
+
if (!target?.isConnected || target.ownerDocument !== doc) return;
|
|
16
|
+
target.focus({ preventScroll: true });
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The app's one modal. While `busy`, it cannot be dismissed. Radix refocuses a DialogTrigger on
|
|
20
|
+
* close; these dialogs open from state, so the element focused at opening is restored instead.
|
|
21
|
+
*/
|
|
22
|
+
function Dialog$1({ open = true, onClose, busy = false, title, description, className, children }) {
|
|
23
|
+
const opener = useRef(null);
|
|
24
|
+
const wasOpen = useRef(false);
|
|
25
|
+
useBrowserLayoutEffect(() => {
|
|
26
|
+
if (open && !wasOpen.current) opener.current = getDialogFocusRestoreTarget(document);
|
|
27
|
+
wasOpen.current = open;
|
|
28
|
+
}, [open]);
|
|
29
|
+
return /* @__PURE__ */ jsx(Dialog.Root, {
|
|
30
|
+
open,
|
|
31
|
+
onOpenChange: (next) => {
|
|
32
|
+
if (!next && !busy) onClose();
|
|
33
|
+
},
|
|
34
|
+
children: /* @__PURE__ */ jsxs(Dialog.Portal, { children: [/* @__PURE__ */ jsx(Dialog.Overlay, { className: "fixed inset-0 z-50 bg-chocolate/35 backdrop-blur-[2px] data-[state=open]:animate-in data-[state=open]:fade-in-0" }), /* @__PURE__ */ jsxs(Dialog.Content, {
|
|
35
|
+
className: cn("fixed left-1/2 top-1/2 z-50 grid max-h-[calc(100dvh-2rem)] w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-[16px] border border-frost bg-snow p-5 text-chocolate shadow-baziu-lg outline-none data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:p-6", className),
|
|
36
|
+
onCloseAutoFocus: (event) => {
|
|
37
|
+
event.preventDefault();
|
|
38
|
+
restoreDialogFocus(opener.current, document);
|
|
39
|
+
opener.current = null;
|
|
40
|
+
},
|
|
41
|
+
onEscapeKeyDown: (event) => {
|
|
42
|
+
if (busy) event.preventDefault();
|
|
43
|
+
},
|
|
44
|
+
onPointerDownOutside: (event) => {
|
|
45
|
+
if (busy) event.preventDefault();
|
|
46
|
+
},
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ jsxs("div", {
|
|
49
|
+
className: "flex flex-col gap-2 pr-6",
|
|
50
|
+
children: [/* @__PURE__ */ jsx(Dialog.Title, {
|
|
51
|
+
className: "font-serif text-xl text-chocolate",
|
|
52
|
+
children: title
|
|
53
|
+
}), description ? /* @__PURE__ */ jsx(Dialog.Description, {
|
|
54
|
+
asChild: true,
|
|
55
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
56
|
+
className: "text-sm leading-6 text-mocha",
|
|
57
|
+
children: description
|
|
58
|
+
})
|
|
59
|
+
}) : /* @__PURE__ */ jsx(Dialog.Description, {
|
|
60
|
+
className: "sr-only",
|
|
61
|
+
children: title
|
|
62
|
+
})]
|
|
63
|
+
}),
|
|
64
|
+
children,
|
|
65
|
+
!busy && /* @__PURE__ */ jsx(Dialog.Close, {
|
|
66
|
+
"aria-label": "Close",
|
|
67
|
+
className: "absolute right-3 top-3 inline-flex size-8 items-center justify-center rounded-lg text-mocha hover:bg-ivory hover:text-sapphire",
|
|
68
|
+
children: /* @__PURE__ */ jsx(X, {
|
|
69
|
+
className: "size-4",
|
|
70
|
+
"aria-hidden": "true"
|
|
71
|
+
})
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
})] })
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/** The button row at the bottom of a dialog. */
|
|
78
|
+
function DialogActions({ children }) {
|
|
79
|
+
return /* @__PURE__ */ jsx("div", {
|
|
80
|
+
className: "flex flex-col-reverse gap-2 border-t border-frost pt-4 sm:flex-row sm:justify-end",
|
|
81
|
+
children
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
export { restoreDialogFocus as i, DialogActions as n, getDialogFocusRestoreTarget as r, Dialog$1 as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as MANAGE_TABS, r as SectionTabs } from "./SectionTabs
|
|
1
|
+
import { C as PageShell, S as PageHeader } from "./parts-B0wbj_yK.js";
|
|
2
|
+
import { n as MANAGE_TABS, r as SectionTabs } from "./SectionTabs--vMBvaUz.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/ManagePage.tsx
|
|
5
5
|
/** A page of Manage: Agents, Teams, their templates and the skills, under one tab bar. */
|
|
@@ -8,6 +8,18 @@ import { twMerge } from "tailwind-merge";
|
|
|
8
8
|
function cn(...inputs) {
|
|
9
9
|
return twMerge(clsx(inputs));
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Scroll a strip of tabs sideways so its selected tab (`selector`) is in view, as on a phone
|
|
13
|
+
* where the strip is wider than the screen. Only the strip moves, never the page.
|
|
14
|
+
*/
|
|
15
|
+
function revealInStrip(strip, selector) {
|
|
16
|
+
const item = strip?.querySelector(selector);
|
|
17
|
+
if (!strip || !item) return;
|
|
18
|
+
const box = strip.getBoundingClientRect();
|
|
19
|
+
const tab = item.getBoundingClientRect();
|
|
20
|
+
if (tab.left < box.left) strip.scrollLeft -= box.left - tab.left + 8;
|
|
21
|
+
else if (tab.right > box.right) strip.scrollLeft += tab.right - box.right + 8;
|
|
22
|
+
}
|
|
11
23
|
//#endregion
|
|
12
24
|
//#region src/lib/model-facts.ts
|
|
13
25
|
function modelName(model) {
|
|
@@ -275,4 +287,4 @@ function Option({ value, name, mono = false, children }) {
|
|
|
275
287
|
});
|
|
276
288
|
}
|
|
277
289
|
//#endregion
|
|
278
|
-
export { credentialLine as a, matchesModel as c, providerStatus as d, usedByLine as f, cheapest as i, modelName as l, ModelMenu as n, factsLine as o, cn as p, ago as r, initialPicks as s, MODELS_PATH as t, priceLine as u };
|
|
290
|
+
export { credentialLine as a, matchesModel as c, providerStatus as d, usedByLine as f, cheapest as i, modelName as l, revealInStrip as m, ModelMenu as n, factsLine as o, cn as p, ago as r, initialPicks as s, MODELS_PATH as t, priceLine as u };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as revealInStrip } from "./ModelMenu-DEJoYASj.js";
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
3
|
+
import { Link, useRouterState } from "@tanstack/react-router";
|
|
2
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
5
|
//#region src/components/SectionTabs.tsx
|
|
4
6
|
/**
|
|
@@ -7,7 +9,11 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
7
9
|
* current tab (`aria-current="page"`, active props), whatever the search string.
|
|
8
10
|
*/
|
|
9
11
|
function SectionTabs({ label, base, tabs, children }) {
|
|
12
|
+
const pathname = useRouterState({ select: (state) => state.location.pathname });
|
|
13
|
+
const strip = useRef(null);
|
|
14
|
+
useEffect(() => revealInStrip(strip.current, "[aria-current=\"page\"]"), [pathname]);
|
|
10
15
|
return /* @__PURE__ */ jsxs("nav", {
|
|
16
|
+
ref: strip,
|
|
11
17
|
"aria-label": label,
|
|
12
18
|
className: "mb-6 flex max-w-full gap-1 overflow-x-auto rounded-xl border border-border bg-muted/50 p-1",
|
|
13
19
|
children: [tabs.map(([suffix, text]) => {
|
|
@@ -32,7 +38,8 @@ var MANAGE_TABS = [
|
|
|
32
38
|
["/teams", "Teams"],
|
|
33
39
|
["/templates/agents", "Agent templates"],
|
|
34
40
|
["/templates/teams", "Team templates"],
|
|
35
|
-
["/skills", "Skills"]
|
|
41
|
+
["/skills", "Skills"],
|
|
42
|
+
["/usage", "Usage"]
|
|
36
43
|
];
|
|
37
44
|
var CONFIG_TABS = [
|
|
38
45
|
["", "Models"],
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { i as api, o as errorMessage, r as ApiError } from "./live-DbJeq6KP.js";
|
|
2
|
+
import { t as Button } from "./Button-Dsnw22OF.js";
|
|
3
|
+
import { p as cn } from "./ModelMenu-DEJoYASj.js";
|
|
4
|
+
import { n as DialogActions, t as Dialog } from "./Dialog-_Gt_Nt86.js";
|
|
5
|
+
import { g as Notice } from "./parts-B0wbj_yK.js";
|
|
6
|
+
import { d as TextField, n as ChoiceCards, t as CheckboxRow } from "./form-Bwsyt9OY.js";
|
|
7
|
+
import { s as count } from "./manage-C7ReF2ZZ.js";
|
|
4
8
|
import { useState } from "react";
|
|
5
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
10
|
//#region src/components/manage/SkillsParts.tsx
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { i as api, o as errorMessage } from "./live-DbJeq6KP.js";
|
|
2
|
+
import { d as agentNameProblem } from "./src-BeMh8Fze.js";
|
|
3
|
+
import { t as Button } from "./Button-Dsnw22OF.js";
|
|
4
|
+
import { n as ModelMenu, t as MODELS_PATH } from "./ModelMenu-DEJoYASj.js";
|
|
5
|
+
import { n as DialogActions, t as Dialog } from "./Dialog-_Gt_Nt86.js";
|
|
6
|
+
import { g as Notice } from "./parts-B0wbj_yK.js";
|
|
7
|
+
import { d as TextField, s as SelectField } from "./form-Bwsyt9OY.js";
|
|
8
|
+
import { useEffect, useState } from "react";
|
|
9
|
+
import { useNavigate } from "@tanstack/react-router";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
//#region src/components/SpawnDialog.tsx
|
|
12
|
+
/** The one way to spawn an Agent; opens its chat afterwards. */
|
|
13
|
+
function SpawnDialog({ profiles, teams, profileId: initialProfileId, teamId: initialTeamId, onClose }) {
|
|
14
|
+
const navigate = useNavigate();
|
|
15
|
+
const [profileId, setProfileId] = useState(initialProfileId ?? profiles.find((profile) => profile.id === "default")?.id ?? profiles[0]?.id ?? "");
|
|
16
|
+
const [name, setName] = useState("");
|
|
17
|
+
const nameProblem = name.trim() ? agentNameProblem(name.trim()) : null;
|
|
18
|
+
const [model, setModel] = useState("");
|
|
19
|
+
const [chatModels, setChatModels] = useState([]);
|
|
20
|
+
const [teamId, setTeamId] = useState(teams.find((team) => team.id === initialTeamId)?.id ?? teams.find((team) => team.id === "default")?.id ?? teams[0]?.id ?? "");
|
|
21
|
+
const [busy, setBusy] = useState(false);
|
|
22
|
+
const [error, setError] = useState(null);
|
|
23
|
+
const restricted = teams.find((team) => team.id === teamId)?.policyMode === "restricted";
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
const controller = new AbortController();
|
|
26
|
+
api(MODELS_PATH, { signal: controller.signal }).then((response) => setChatModels(response.chat)).catch(() => {});
|
|
27
|
+
return () => controller.abort();
|
|
28
|
+
}, []);
|
|
29
|
+
async function submit(event) {
|
|
30
|
+
event.preventDefault();
|
|
31
|
+
setError(null);
|
|
32
|
+
setBusy(true);
|
|
33
|
+
try {
|
|
34
|
+
const request = {
|
|
35
|
+
profileId,
|
|
36
|
+
teamId
|
|
37
|
+
};
|
|
38
|
+
if (name.trim()) request.name = name.trim();
|
|
39
|
+
if (model) request.model = model;
|
|
40
|
+
const { agent } = await api("/api/agents", { body: request });
|
|
41
|
+
onClose();
|
|
42
|
+
await navigate({
|
|
43
|
+
to: "/",
|
|
44
|
+
search: { agent: agent.id }
|
|
45
|
+
});
|
|
46
|
+
} catch (cause) {
|
|
47
|
+
setError(errorMessage(cause));
|
|
48
|
+
setBusy(false);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const template = profiles.find((profile) => profile.id === profileId);
|
|
52
|
+
return /* @__PURE__ */ jsx(Dialog, {
|
|
53
|
+
title: "Add an Agent",
|
|
54
|
+
description: "It starts with its template's files, model and skills, in the Team you choose.",
|
|
55
|
+
busy,
|
|
56
|
+
onClose,
|
|
57
|
+
children: /* @__PURE__ */ jsxs("form", {
|
|
58
|
+
onSubmit: (event) => void submit(event),
|
|
59
|
+
className: "grid gap-4",
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsx(SelectField, {
|
|
62
|
+
label: "Agent template",
|
|
63
|
+
value: profileId,
|
|
64
|
+
options: profiles.map((profile) => ({
|
|
65
|
+
value: profile.id,
|
|
66
|
+
label: profile.name || profile.id
|
|
67
|
+
})),
|
|
68
|
+
disabled: busy,
|
|
69
|
+
className: "max-w-none",
|
|
70
|
+
onChange: setProfileId
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ jsx(TextField, {
|
|
73
|
+
label: "Name",
|
|
74
|
+
value: name,
|
|
75
|
+
disabled: busy,
|
|
76
|
+
placeholder: template?.name || template?.id || "The template’s name",
|
|
77
|
+
hint: "Leave it empty to use the template’s name.",
|
|
78
|
+
problem: nameProblem ?? void 0,
|
|
79
|
+
className: "max-w-none",
|
|
80
|
+
onChange: setName
|
|
81
|
+
}),
|
|
82
|
+
/* @__PURE__ */ jsx(ModelMenu, {
|
|
83
|
+
kit: true,
|
|
84
|
+
label: "Model",
|
|
85
|
+
value: model,
|
|
86
|
+
onChange: setModel,
|
|
87
|
+
models: chatModels,
|
|
88
|
+
inherited: {
|
|
89
|
+
label: "The template’s model",
|
|
90
|
+
model: template?.defaultModel
|
|
91
|
+
}
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ jsx(SelectField, {
|
|
94
|
+
label: "Team",
|
|
95
|
+
value: teamId,
|
|
96
|
+
options: teams.map((team) => ({
|
|
97
|
+
value: team.id,
|
|
98
|
+
label: team.id === "default" ? `${team.name} (default)` : team.name
|
|
99
|
+
})),
|
|
100
|
+
disabled: busy,
|
|
101
|
+
className: "max-w-none",
|
|
102
|
+
hint: restricted ? "This Team is restricted: the new Agent starts with no connections. Add them under Connections." : void 0,
|
|
103
|
+
onChange: setTeamId
|
|
104
|
+
}),
|
|
105
|
+
error && /* @__PURE__ */ jsx(Notice, {
|
|
106
|
+
tone: "warning",
|
|
107
|
+
role: "alert",
|
|
108
|
+
title: "It was not spawned.",
|
|
109
|
+
children: error
|
|
110
|
+
}),
|
|
111
|
+
/* @__PURE__ */ jsxs(DialogActions, { children: [/* @__PURE__ */ jsx(Button, {
|
|
112
|
+
variant: "ghost",
|
|
113
|
+
disabled: busy,
|
|
114
|
+
onClick: onClose,
|
|
115
|
+
children: "Cancel"
|
|
116
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
117
|
+
variant: "primary",
|
|
118
|
+
type: "submit",
|
|
119
|
+
disabled: busy || !profileId || !teamId || nameProblem !== null,
|
|
120
|
+
children: busy ? "Adding…" : "Add the Agent"
|
|
121
|
+
})] })
|
|
122
|
+
]
|
|
123
|
+
})
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
//#endregion
|
|
127
|
+
export { SpawnDialog as t };
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { i as api, o as errorMessage } from "./live-DbJeq6KP.js";
|
|
2
|
+
import { t as Button } from "./Button-Dsnw22OF.js";
|
|
3
|
+
import { n as DialogActions, t as Dialog } from "./Dialog-_Gt_Nt86.js";
|
|
4
|
+
import { g as Notice } from "./parts-B0wbj_yK.js";
|
|
5
|
+
import { d as TextField, n as ChoiceCards, s as SelectField } from "./form-Bwsyt9OY.js";
|
|
6
|
+
import { S as slugify, s as count, x as slugProblem } from "./manage-C7ReF2ZZ.js";
|
|
3
7
|
import { useState } from "react";
|
|
4
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
9
|
//#region src/components/SpawnTeamModal.tsx
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { i as api, o as errorMessage } from "./live-DbJeq6KP.js";
|
|
2
|
+
import { t as Button } from "./Button-Dsnw22OF.js";
|
|
3
|
+
import { n as DialogActions } from "./Dialog-_Gt_Nt86.js";
|
|
4
|
+
import { g as Notice } from "./parts-B0wbj_yK.js";
|
|
5
|
+
import { d as TextField, n as ChoiceCards } from "./form-Bwsyt9OY.js";
|
|
6
|
+
import { S as slugify, x as slugProblem } from "./manage-C7ReF2ZZ.js";
|
|
3
7
|
import { useState } from "react";
|
|
4
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
9
|
//#region src/components/TeamForm.tsx
|
|
6
10
|
/** What creating a Team sends, or what is still wrong with the form. */
|
|
7
|
-
function teamRequest(draft) {
|
|
11
|
+
function teamRequest(draft, taken = []) {
|
|
8
12
|
const id = draft.id.trim();
|
|
9
13
|
const folder = draft.folder.trim();
|
|
10
14
|
const problems = {};
|
|
11
15
|
const idProblem = slugProblem(id);
|
|
12
16
|
if (idProblem) problems.id = idProblem;
|
|
17
|
+
else if (taken.includes(id)) problems.id = "A Team already has this ID: choose another.";
|
|
18
|
+
else if (!id && draft.name.trim()) problems.id = "The name has no letters or digits to make an ID from: type one.";
|
|
13
19
|
if (draft.place === "link" && folder && !folder.startsWith("/")) problems.folder = "The full path of the folder, starting with /.";
|
|
14
20
|
if (!(id !== "" && (draft.place === "new" || folder !== "")) || problems.id || problems.folder) return {
|
|
15
21
|
body: null,
|
|
@@ -28,7 +34,7 @@ function teamRequest(draft) {
|
|
|
28
34
|
* Create a Team: its name, the id made from it, and where its files are: a new folder in the
|
|
29
35
|
* Bazilion home, or an existing project folder it links to.
|
|
30
36
|
*/
|
|
31
|
-
function TeamForm({ onCreated, onBusyChange, extraActions }) {
|
|
37
|
+
function TeamForm({ onCreated, onBusyChange, extraActions, taken = [] }) {
|
|
32
38
|
const [name, setName] = useState("");
|
|
33
39
|
const [id, setId] = useState("");
|
|
34
40
|
const [idTouched, setIdTouched] = useState(false);
|
|
@@ -42,7 +48,7 @@ function TeamForm({ onCreated, onBusyChange, extraActions }) {
|
|
|
42
48
|
id: shownId,
|
|
43
49
|
place,
|
|
44
50
|
folder
|
|
45
|
-
});
|
|
51
|
+
}, taken);
|
|
46
52
|
function changeBusy(next) {
|
|
47
53
|
setBusy(next);
|
|
48
54
|
onBusyChange?.(next);
|
|
@@ -1,9 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { i as api } from "./live-DbJeq6KP.js";
|
|
2
|
+
import { a as useActivity, r as shortTime } from "./activity-Czfq-5_F.js";
|
|
3
|
+
import { r as useResource, t as useHydrated } from "./use-resource-BjN1uJoL.js";
|
|
4
|
+
import { t as AgentAvatar } from "./AgentAvatar-8gTAy_tP.js";
|
|
5
|
+
import { t as FOCUS_VIEWS } from "./workspace-0XPILV1W.js";
|
|
6
|
+
import { createContext, useContext, useMemo } from "react";
|
|
4
7
|
import { Link } from "@tanstack/react-router";
|
|
5
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
9
|
import { ArrowLeft, ArrowRight, Code2, Images, Network } from "lucide-react";
|
|
10
|
+
//#region src/components/workspace/context.tsx
|
|
11
|
+
var WorkspaceContext = createContext(null);
|
|
12
|
+
function WorkspaceProvider({ value, children }) {
|
|
13
|
+
const full = useMemo(() => {
|
|
14
|
+
const byId = new Map(value.agents.map((agent) => [agent.id, agent]));
|
|
15
|
+
return {
|
|
16
|
+
...value,
|
|
17
|
+
agentById: (id) => byId.get(id),
|
|
18
|
+
to: (patch) => ({
|
|
19
|
+
...value.search,
|
|
20
|
+
...patch
|
|
21
|
+
})
|
|
22
|
+
};
|
|
23
|
+
}, [value]);
|
|
24
|
+
return /* @__PURE__ */ jsx(WorkspaceContext.Provider, {
|
|
25
|
+
value: full,
|
|
26
|
+
children
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function useWorkspace() {
|
|
30
|
+
const value = useContext(WorkspaceContext);
|
|
31
|
+
if (!value) throw new Error("useWorkspace needs a WorkspaceProvider");
|
|
32
|
+
return value;
|
|
33
|
+
}
|
|
34
|
+
/** The workspace when there is one: a conversation can also render on its own. */
|
|
35
|
+
function useWorkspaceOptional() {
|
|
36
|
+
return useContext(WorkspaceContext);
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
7
39
|
//#region src/components/workspace/FocusFrame.tsx
|
|
8
40
|
var VIEW = {
|
|
9
41
|
connections: {
|
|
@@ -34,11 +66,14 @@ function FocusFrame({ view, actions, children }) {
|
|
|
34
66
|
result: void 0,
|
|
35
67
|
panel: view
|
|
36
68
|
}),
|
|
37
|
-
className: "inline-flex h-8
|
|
69
|
+
className: "inline-flex h-8 min-w-0 max-w-[14rem] items-center gap-1.5 rounded-[10px] border border-border bg-card px-2.5 text-sm font-semibold text-foreground hover:border-sapphire-light hover:text-sapphire",
|
|
38
70
|
children: [/* @__PURE__ */ jsx(ArrowLeft, {
|
|
39
|
-
className: "size-3.5",
|
|
71
|
+
className: "size-3.5 shrink-0",
|
|
40
72
|
"aria-hidden": "true"
|
|
41
|
-
}),
|
|
73
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
74
|
+
className: "min-w-0 truncate",
|
|
75
|
+
children: agent ? agent.agent.name : "Back"
|
|
76
|
+
})]
|
|
42
77
|
}),
|
|
43
78
|
/* @__PURE__ */ jsx("h1", {
|
|
44
79
|
className: "m-0 min-w-0 truncate font-display text-xl leading-tight text-charcoal",
|
|
@@ -77,6 +112,22 @@ function FocusFrame({ view, actions, children }) {
|
|
|
77
112
|
});
|
|
78
113
|
}
|
|
79
114
|
//#endregion
|
|
115
|
+
//#region src/components/workspace/state-style.ts
|
|
116
|
+
var STATE_TEXT = {
|
|
117
|
+
needs: "text-warning",
|
|
118
|
+
working: "text-success",
|
|
119
|
+
paused: "text-warning",
|
|
120
|
+
fresh: "text-accent-foreground",
|
|
121
|
+
idle: "text-muted-foreground"
|
|
122
|
+
};
|
|
123
|
+
var STATE_DOT = {
|
|
124
|
+
needs: "bg-warning",
|
|
125
|
+
working: "bg-success animate-pulse",
|
|
126
|
+
paused: "bg-fawn",
|
|
127
|
+
fresh: "bg-primary",
|
|
128
|
+
idle: "bg-fawn"
|
|
129
|
+
};
|
|
130
|
+
//#endregion
|
|
80
131
|
//#region src/lib/messages.ts
|
|
81
132
|
/** The text of a message between Agents: its payload is JSON `{ text }`, or plain text. */
|
|
82
133
|
function messageText(payload) {
|
|
@@ -110,11 +161,7 @@ function trafficByPair(messages) {
|
|
|
110
161
|
/** The Team's recent messages; loaded again whenever a turn ends. */
|
|
111
162
|
function useTeamMessages(teamId, limit = 100) {
|
|
112
163
|
const { turnsEnded } = useActivity();
|
|
113
|
-
return useResource((signal) => api(`/api/teams/${encodeURIComponent(teamId)}/messages?limit=${limit}`, { signal }).then((body) => body.messages), [
|
|
114
|
-
teamId,
|
|
115
|
-
limit,
|
|
116
|
-
turnsEnded
|
|
117
|
-
]);
|
|
164
|
+
return useResource((signal) => api(`/api/teams/${encodeURIComponent(teamId)}/messages?limit=${limit}`, { signal }).then((body) => body.messages), [teamId, limit], { refreshOn: turnsEnded });
|
|
118
165
|
}
|
|
119
166
|
function TeamThread({ messages, limit = 20, empty = "No messages between Agents yet." }) {
|
|
120
167
|
const { agentById } = useWorkspace();
|
|
@@ -187,4 +234,4 @@ function TeamThread({ messages, limit = 20, empty = "No messages between Agents
|
|
|
187
234
|
});
|
|
188
235
|
}
|
|
189
236
|
//#endregion
|
|
190
|
-
export { trafficByPair as a, pairKey as i, useTeamMessages as n,
|
|
237
|
+
export { trafficByPair as a, FocusFrame as c, useWorkspaceOptional as d, pairKey as i, WorkspaceProvider as l, useTeamMessages as n, STATE_DOT as o, messageText as r, STATE_TEXT as s, TeamThread as t, useWorkspace as u };
|
package/dist/web/server/assets/{UnsavedChangesGuard-CXK75QQp.js → UnsavedChangesGuard-CB_TugFF.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ConfirmDialog } from "./ConfirmDialog-
|
|
1
|
+
import { t as ConfirmDialog } from "./ConfirmDialog-C89B8qKM.js";
|
|
2
2
|
import { useCallback, useRef } from "react";
|
|
3
3
|
import { useBlocker } from "@tanstack/react-router";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -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-6LHNEsSK.js";
|
|
3
3
|
import { createFileRoute, lazyRouteComponent, redirect } from "@tanstack/react-router";
|
|
4
4
|
//#region src/routes/templates/teams/$id/index.tsx
|
|
5
|
-
var $$splitComponentImporter = () => import("./_id-
|
|
5
|
+
var $$splitComponentImporter = () => import("./_id-BsQnL9LV.js");
|
|
6
6
|
var fetchTemplate = createServerFn({ method: "GET" }).validator((data) => data).handler(createSsrRpc("c13d90cf82cd448c86427091165d0361b92843852a3f73a5bf4412dd2adc6bae"));
|
|
7
7
|
var Route = createFileRoute("/templates/teams/$id/")({
|
|
8
8
|
loader: async ({ params }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as createServerFn } from "../server.js";
|
|
2
2
|
import { t as createServerRpc } from "./createServerRpc-B7Yr1K8i.js";
|
|
3
|
-
import { n as daemonClient, r as ApiClientError } from "./daemon-client-
|
|
3
|
+
import { n as daemonClient, r as ApiClientError } from "./daemon-client-D-NWKQto.js";
|
|
4
4
|
//#region src/routes/templates/teams/$id/index.tsx?tss-serverfn-split
|
|
5
5
|
var fetchTemplate_createServerFn_handler = createServerRpc({
|
|
6
6
|
id: "c13d90cf82cd448c86427091165d0361b92843852a3f73a5bf4412dd2adc6bae",
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as endpointLabel, d as templateDocument, f as templateInput, i as edgeKey, l as sameDocument, n as OUTSIDE, o as hasEdge, r as defaultPosition, t as TeamPolicyMatrix, u as setEdge } from "./style-
|
|
3
|
-
import { t as
|
|
1
|
+
import { i as api, o as errorMessage } from "./live-DbJeq6KP.js";
|
|
2
|
+
import { a as endpointLabel, d as templateDocument, f as templateInput, i as edgeKey, l as sameDocument, n as OUTSIDE, o as hasEdge, r as defaultPosition, t as TeamPolicyMatrix, u as setEdge } from "./style-B3l0Wtlf.js";
|
|
3
|
+
import { t as Button } from "./Button-Dsnw22OF.js";
|
|
4
|
+
import { t as ConfirmDialog } from "./ConfirmDialog-C89B8qKM.js";
|
|
4
5
|
import { t as Segmented } from "./Segmented-3ZLdqa5U.js";
|
|
5
|
-
import { t as UnsavedChangesGuard } from "./UnsavedChangesGuard-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { t as Route } from "./_id-
|
|
9
|
-
import { t as ManagePage } from "./ManagePage-
|
|
6
|
+
import { t as UnsavedChangesGuard } from "./UnsavedChangesGuard-CB_TugFF.js";
|
|
7
|
+
import { _ as RowMenu, g as Notice } from "./parts-B0wbj_yK.js";
|
|
8
|
+
import { d as TextField, l as SwitchRow, s as SelectField } from "./form-Bwsyt9OY.js";
|
|
9
|
+
import { t as Route } from "./_id-517adSuB.js";
|
|
10
|
+
import { t as ManagePage } from "./ManagePage-DGYNJ6XG.js";
|
|
11
|
+
import { s as count } from "./manage-C7ReF2ZZ.js";
|
|
12
|
+
import { t as SpawnTeamModal } from "./SpawnTeamModal-zcLxtFOO.js";
|
|
10
13
|
import { useEffect, useMemo, useState } from "react";
|
|
11
14
|
import { useNavigate, useRouter } from "@tanstack/react-router";
|
|
12
15
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -280,7 +283,9 @@ function TeamPolicyEditor({ template, profiles, onSaved, onDirtyChange }) {
|
|
|
280
283
|
label: "Name",
|
|
281
284
|
value: draft.name,
|
|
282
285
|
disabled: saving,
|
|
286
|
+
required: true,
|
|
283
287
|
className: "max-w-none",
|
|
288
|
+
problem: draft.name.trim() ? void 0 : "A template needs a name.",
|
|
284
289
|
onChange: (name) => setDraft((current) => ({
|
|
285
290
|
...current,
|
|
286
291
|
name
|
|
@@ -375,7 +380,7 @@ function TeamPolicyEditor({ template, profiles, onSaved, onDirtyChange }) {
|
|
|
375
380
|
children: [
|
|
376
381
|
/* @__PURE__ */ jsx(Button, {
|
|
377
382
|
variant: "primary",
|
|
378
|
-
disabled: !dirty || saving,
|
|
383
|
+
disabled: !dirty || saving || !draft.name.trim(),
|
|
379
384
|
onClick: () => void save(),
|
|
380
385
|
children: saving ? "Saving…" : "Save"
|
|
381
386
|
}),
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { i as api, o as errorMessage } from "./live-DbJeq6KP.js";
|
|
2
|
+
import { t as Button } from "./Button-Dsnw22OF.js";
|
|
3
|
+
import { n as ModelMenu, p as cn } from "./ModelMenu-DEJoYASj.js";
|
|
4
|
+
import { t as ConfirmDialog } from "./ConfirmDialog-C89B8qKM.js";
|
|
5
|
+
import { t as UnsavedChangesGuard } from "./UnsavedChangesGuard-CB_TugFF.js";
|
|
6
|
+
import { _ as RowMenu, a as CardForm, c as CardToolbar, t as Banner, y as SetupCard } from "./parts-B0wbj_yK.js";
|
|
7
|
+
import { a as SaveBar, d as TextField, f as saveStatus } from "./form-Bwsyt9OY.js";
|
|
8
|
+
import { t as SpawnDialog } from "./SpawnDialog-BNKj2Lup.js";
|
|
9
|
+
import { t as Route } from "./_id-josYXBx3.js";
|
|
10
|
+
import { t as ManagePage } from "./ManagePage-DGYNJ6XG.js";
|
|
11
|
+
import { E as templateUseLine, T as templateName, d as modelLine, w as templateDeleteBlocker } from "./manage-C7ReF2ZZ.js";
|
|
12
|
+
import { n as SkillsChoice, r as TEMPLATE_FILES } from "./AgentTemplateParts-Dh9F_-T_.js";
|
|
9
13
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
10
14
|
import { useNavigate, useRouter } from "@tanstack/react-router";
|
|
11
15
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -39,7 +43,7 @@ function TemplateSettingsCard({ loaded, chat, skills, onDirtyChange, onSaved })
|
|
|
39
43
|
};
|
|
40
44
|
async function save(event) {
|
|
41
45
|
event.preventDefault();
|
|
42
|
-
if (!dirty || busy || !model) return;
|
|
46
|
+
if (!dirty || busy || !model || !name.trim()) return;
|
|
43
47
|
setBusy(true);
|
|
44
48
|
setError(null);
|
|
45
49
|
try {
|
|
@@ -86,8 +90,10 @@ function TemplateSettingsCard({ loaded, chat, skills, onDirtyChange, onSaved })
|
|
|
86
90
|
label: "Name",
|
|
87
91
|
value: name,
|
|
88
92
|
disabled: busy,
|
|
93
|
+
required: true,
|
|
89
94
|
placeholder: profile.id,
|
|
90
95
|
className: "max-w-none",
|
|
96
|
+
problem: name.trim() ? void 0 : "A template needs a name.",
|
|
91
97
|
onChange: (value) => {
|
|
92
98
|
touched();
|
|
93
99
|
setName(value);
|
|
@@ -120,7 +126,7 @@ function TemplateSettingsCard({ loaded, chat, skills, onDirtyChange, onSaved })
|
|
|
120
126
|
}),
|
|
121
127
|
/* @__PURE__ */ jsx(SaveBar, {
|
|
122
128
|
busy,
|
|
123
|
-
disabled: !dirty || !model,
|
|
129
|
+
disabled: !dirty || !model || !name.trim(),
|
|
124
130
|
status: saveStatus({
|
|
125
131
|
error,
|
|
126
132
|
dirty,
|
|
@@ -332,7 +338,7 @@ function AgentTemplatePage() {
|
|
|
332
338
|
actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
|
|
333
339
|
variant: "primary",
|
|
334
340
|
onClick: () => setSpawning(true),
|
|
335
|
-
children: "
|
|
341
|
+
children: "Add an Agent"
|
|
336
342
|
}), /* @__PURE__ */ jsx(RowMenu, {
|
|
337
343
|
label: `More for ${name}`,
|
|
338
344
|
items: [{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as createServerFn } from "../server.js";
|
|
2
|
-
import { t as MODELS_PATH } from "./ModelMenu-
|
|
2
|
+
import { t as MODELS_PATH } from "./ModelMenu-DEJoYASj.js";
|
|
3
3
|
import { t as createServerRpc } from "./createServerRpc-B7Yr1K8i.js";
|
|
4
|
-
import { n as daemonClient, r as ApiClientError } from "./daemon-client-
|
|
4
|
+
import { n as daemonClient, r as ApiClientError } from "./daemon-client-D-NWKQto.js";
|
|
5
5
|
//#region src/routes/templates/agents/$id/index.tsx?tss-serverfn-split
|
|
6
6
|
var fetchTemplate_createServerFn_handler = createServerRpc({
|
|
7
7
|
id: "a3ce4c3b27c4c69828cf8a81d1f5312a9f8e2c82de6c7e6e2846eb5c2fc322ea",
|
|
@@ -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-6LHNEsSK.js";
|
|
3
3
|
import { createFileRoute, lazyRouteComponent, redirect } from "@tanstack/react-router";
|
|
4
4
|
//#region src/routes/templates/agents/$id/index.tsx
|
|
5
|
-
var $$splitComponentImporter = () => import("./_id-
|
|
5
|
+
var $$splitComponentImporter = () => import("./_id-CyinHJam.js");
|
|
6
6
|
var fetchTemplate = createServerFn({ method: "GET" }).validator((data) => data).handler(createSsrRpc("a3ce4c3b27c4c69828cf8a81d1f5312a9f8e2c82de6c7e6e2846eb5c2fc322ea"));
|
|
7
7
|
var Route = createFileRoute("/templates/agents/$id/")({
|
|
8
8
|
loader: async ({ params }) => {
|