bazilion 0.53.0 → 0.55.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 +12 -7
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +705 -354
- package/dist/daemon.js.map +1 -1
- package/dist/web/client/assets/AddProviderDialog-DfFOaCjC.js +1 -0
- package/dist/web/client/assets/AgentTemplateParts-IMJmAQjN.js +1 -0
- package/dist/web/client/assets/Button-bTJUy9Qf.js +1 -0
- package/dist/web/client/assets/{ConfigPage-DiQiJXP6.js → ConfigPage-CzLHZa5o.js} +1 -1
- package/dist/web/client/assets/ConfirmDialog-Cu_evkgc.js +1 -0
- package/dist/web/client/assets/ConnectionsView-D7Fmutl2.js +1 -0
- package/dist/web/client/assets/{ManagePage-xlePXXx5.js → ManagePage-BfvlCrmz.js} +1 -1
- package/dist/web/client/assets/{SectionTabs-BMiRKFfb.js → SectionTabs-D7kPQGoh.js} +1 -1
- package/dist/web/client/assets/{Segmented-Co4n2C5X.js → Segmented-oPkAHPO1.js} +1 -1
- package/dist/web/client/assets/SkillsParts-BuTxcCam.js +1 -0
- package/dist/web/client/assets/SpawnTeamModal-B1UnOvtp.js +1 -0
- package/dist/web/client/assets/TeamForm-DbzxtRjj.js +1 -0
- package/dist/web/client/assets/TeamThread-jpsWq6vI.js +1 -0
- package/dist/web/client/assets/UnsavedChangesGuard-BfyU9v9i.js +1 -0
- package/dist/web/client/assets/_id-BCNBLF-2.js +1 -0
- package/dist/web/client/assets/{_id-DSRgpxEc.js → _id-D8_H79U2.js} +1 -1
- package/dist/web/client/assets/access-CDWe1Kwy.js +1 -0
- package/dist/web/client/assets/agent-actions-CUee6aJq.js +1 -0
- package/dist/web/client/assets/agents-sE686DTf.js +1 -0
- package/dist/web/client/assets/agents-yrur1NDa.js +1 -0
- package/dist/web/client/assets/arrow-right-U66krZnr.js +1 -0
- package/dist/web/client/assets/attention-DYEHDfmx.js +1 -0
- package/dist/web/client/assets/bot-BCone8es.js +1 -0
- package/dist/web/client/assets/chevron-right-CuqJFXTe.js +1 -0
- package/dist/web/client/assets/config-BHv886pr.js +1 -0
- package/dist/web/client/assets/createLucideIcon-jxSFpY0Q.js +1 -0
- package/dist/web/client/assets/{download-Dj-1ltZb.js → download-Dy88XavQ.js} +1 -1
- package/dist/web/client/assets/{file-text-DiP-LaEg.js → file-text-DPsZ8-h9.js} +1 -1
- package/dist/web/client/assets/{images-BKjyhYUc.js → images-QBh_rL8b.js} +1 -1
- package/dist/web/client/assets/index-GOthyyE-.js +14 -0
- package/dist/web/client/assets/{key-round-QpqZklz6.js → key-round-C-I8fAG0.js} +1 -1
- package/dist/web/client/assets/{list-checks-BeyG5SVQ.js → list-checks-C9Q-bjEi.js} +1 -1
- package/dist/web/client/assets/login-Dhe15Uuc.js +1 -0
- package/dist/web/client/assets/manage-BaIU5zKy.js +1 -0
- package/dist/web/client/assets/mcp-A_Eo7x3q.js +1 -0
- package/dist/web/client/assets/{message-square-DnpSOYv4.js → message-square-Bwf9cHOx.js} +1 -1
- package/dist/web/client/assets/{network-BC7rNaOC.js → network-B3FA93gC.js} +1 -1
- package/dist/web/client/assets/parts-CpIfn_BH.js +41 -0
- package/dist/web/client/assets/plus-CQPjc8uR.js +1 -0
- package/dist/web/client/assets/routes-CTg_yjbY.js +85 -0
- package/dist/web/client/assets/skills-CLjtYtkA.js +1 -0
- package/dist/web/client/assets/{square-terminal-hQZ6pexU.js → square-terminal-DaNLwvEs.js} +1 -1
- package/dist/web/client/assets/{style-BtcFIkOS.js → style-mjEbxhf5.js} +1 -1
- package/dist/web/client/assets/styles-DzcEC3Rd.css +2 -0
- package/dist/web/client/assets/system-CrTSr5_t.js +1 -0
- package/dist/web/client/assets/teams-Bhje5n2h.js +1 -0
- package/dist/web/client/assets/teams-Cbgw0Qhv.js +1 -0
- package/dist/web/client/assets/telegram-HtUczmaA.js +1 -0
- package/dist/web/client/assets/tools-BpjFvmoX.js +1 -0
- package/dist/web/client/assets/use-resource-BnvgCpBi.js +1 -0
- package/dist/web/client/assets/users-round-BElBVSnw.js +1 -0
- package/dist/web/client/assets/welcome-D47LKWYO.js +1 -0
- package/dist/web/client/assets/wrench-DotqSqSm.js +1 -0
- package/dist/web/server/assets/{AddProviderDialog-Di5crZUB.js → AddProviderDialog-BbpuvC2a.js} +7 -10
- package/dist/web/server/assets/{AgentTemplateParts-Cqy7kSzx.js → AgentTemplateParts-Ce7snK3m.js} +3 -6
- package/dist/web/server/assets/{ConfigPage-oXM3wyOU.js → ConfigPage-qP9ejjuw.js} +1 -1
- package/dist/web/server/assets/{ConfirmDialog-DfaJ--A6.js → ConfirmDialog-Z-uYbE9B.js} +1 -2
- package/dist/web/server/assets/{ConnectionsView-DZrLoNoW.js → ConnectionsView-CLIV7V5D.js} +9 -9
- package/dist/web/server/assets/{ManagePage-0LKHEcT_.js → ManagePage-BR9FwVZM.js} +1 -1
- package/dist/web/server/assets/ModelMenu-D-hTgYOO.js +278 -0
- package/dist/web/server/assets/{Rail-7JU6ly2O.js → Rail-b6EbjBB-.js} +9 -12
- package/dist/web/server/assets/SkillsParts-DWpdydCJ.js +199 -0
- package/dist/web/server/assets/SpawnDialog-3wNx0W1R.js +1851 -0
- package/dist/web/server/assets/{SpawnTeamModal-CCe6P82H.js → SpawnTeamModal-C-YMvoaB.js} +3 -6
- package/dist/web/server/assets/{TeamForm-BzQmdhVi.js → TeamForm-CL45gBdt.js} +2 -5
- package/dist/web/server/assets/{TeamThread-SyQpUvz5.js → TeamThread-CVVH6kKj.js} +9 -9
- package/dist/web/server/assets/{UnsavedChangesGuard-DrOvPV14.js → UnsavedChangesGuard-CXK75QQp.js} +1 -1
- package/dist/web/server/assets/{_id-AcyGvFrE.js → _id-2I4CSMQj.js} +10 -14
- package/dist/web/server/assets/{_id-DPGzfmjG.js → _id-8zsImuGa.js} +9 -11
- package/dist/web/server/assets/{_id-DXm9W55C.js → _id-BpfoPuTv.js} +2 -2
- package/dist/web/server/assets/{_id-DojvxRZn.js → _id-De3Bm0SG.js} +1 -1
- package/dist/web/server/assets/{_id-BGTgqsWm.js → _id-d2OwovYV.js} +2 -2
- package/dist/web/server/assets/_tanstack-start-manifest_v-kkY_s_uR.js +256 -0
- package/dist/web/server/assets/{access-CKSW7MFH.js → access-CwZ27Wsl.js} +4 -6
- package/dist/web/server/assets/{access-BJe-NduL.js → access-CyUoElTP.js} +2 -2
- package/dist/web/server/assets/{agent-actions-CUDMCG0F.js → agent-actions-C07Cp5Ue.js} +1 -1
- package/dist/web/server/assets/{agents-6d9WxbYF.js → agents-CRtMfKqX.js} +1 -1
- package/dist/web/server/assets/{agents-DtLDoZ_u.js → agents-CwzhpDPm.js} +6 -8
- package/dist/web/server/assets/{agents-1sjSvp5p.js → agents-DCWEoaxY.js} +2 -2
- package/dist/web/server/assets/{agents-DKVGUwD1.js → agents-DQowl6Ly.js} +1 -1
- package/dist/web/server/assets/{agents-DUI4Yjtg.js → agents-DTub-rJk.js} +2 -2
- package/dist/web/server/assets/{agents-DsHeRaLq.js → agents-vuXrAv1j.js} +6 -10
- package/dist/web/server/assets/{attention-DefKwvgm.js → attention-BqCnJ1hg.js} +5 -2
- package/dist/web/server/assets/{attention-B6sSDR_4.js → attention-Dki8rmGZ.js} +3 -0
- package/dist/web/server/assets/{attention-johfkM0_.js → attention-DwGaur_w.js} +53 -11
- package/dist/web/server/assets/{config-DYAaaE9Z.js → config-B9dJiji_.js} +2 -2
- package/dist/web/server/assets/{config-Clz57LuN.js → config-D3MR2VjE.js} +24 -26
- package/dist/web/server/assets/{createSsrRpc-BijMHgqE.js → createSsrRpc-qesavJv-.js} +4 -57
- package/dist/web/server/assets/{login-JoIjlcmu.js → login-CRd1yTH5.js} +34 -45
- package/dist/web/server/assets/{login-VV10kZBl.js → login-ZN6KV8n-.js} +36 -2
- package/dist/web/server/assets/{manage-Ppyi3Y5y.js → manage-Ce6cI4eW.js} +14 -4
- package/dist/web/server/assets/{mcp-Ce6O8Qs2.js → mcp-BQ15a9dG.js} +4 -6
- package/dist/web/server/assets/{mcp-DB38leWS.js → mcp-CYQuYWGX.js} +2 -2
- package/dist/web/server/assets/page-title-CVY-c2Pd.js +98 -0
- package/dist/web/server/assets/{router-C97bwlXi.js → router-CPdWGKQ5.js} +500 -210
- package/dist/web/server/assets/routes-BPloBDc8.js +92 -0
- package/dist/web/server/assets/{routes-C4aGqXfr.js → routes-Dw1K3TQw.js} +2815 -1744
- package/dist/web/server/assets/{routes-DuOShl4q.js → routes-xDPesCQu.js} +2 -2
- package/dist/web/server/assets/{skills-B7sg0QKS.js → skills-6VSpEORe.js} +2 -2
- package/dist/web/server/assets/skills-D0xrNc2_.js +157 -0
- package/dist/web/server/assets/{style-BR7ufS6Z.js → style-aMybyKzc.js} +1 -1
- package/dist/web/server/assets/{system-DaP0ol67.js → system-B5sPgdQW.js} +2 -2
- package/dist/web/server/assets/{system-CNQpt3JB.js → system-CXmiWyDG.js} +4 -4
- package/dist/web/server/assets/{teams-CuKE5iAK.js → teams-ClRBVSYU.js} +2 -2
- package/dist/web/server/assets/{teams-4cEZ4_rw.js → teams-Dq4RCxis.js} +2 -2
- package/dist/web/server/assets/{teams-C3xwTz8-.js → teams-iXiCnN2i.js} +6 -9
- package/dist/web/server/assets/{teams-BKHe67f3.js → teams-yF3I_Zjq.js} +7 -9
- package/dist/web/server/assets/{telegram-BnQADwnj.js → telegram-D9U9c1MN.js} +2 -2
- package/dist/web/server/assets/{telegram-BpmK-HHV.js → telegram-DwEgyR1x.js} +7 -9
- package/dist/web/server/assets/{tools-BQeWn7Tj.js → tools-DflVIdDd.js} +2 -2
- package/dist/web/server/assets/{tools-CURTfG2q.js → tools-VPIKjr3y.js} +4 -6
- package/dist/web/server/assets/{use-resource-DVzK0toP.js → use-resource-CbHGYti0.js} +1 -1
- package/dist/web/server/assets/{welcome-SNsE49JO.js → welcome-7DrYZVs6.js} +2 -2
- package/dist/web/server/assets/{welcome-OiZCAIHZ.js → welcome-966nOyyK.js} +10 -9
- package/dist/web/server/server.js +8 -8
- package/dist/web-server.js +4 -0
- package/dist/web-server.js.map +1 -1
- package/dist/worker.js +34 -13
- package/dist/worker.js.map +1 -1
- package/package.json +4 -4
- package/dist/web/client/assets/AddProviderDialog-CO_uijWF.js +0 -1
- package/dist/web/client/assets/AgentTemplateParts-Dl35c-Ux.js +0 -1
- package/dist/web/client/assets/ConfirmDialog-BVytx3kN.js +0 -1
- package/dist/web/client/assets/ConnectionsView-DDrBaiLg.js +0 -1
- package/dist/web/client/assets/Dialog-BTDzv3J5.js +0 -1
- package/dist/web/client/assets/SpawnDialog-ejwXnyxy.js +0 -1
- package/dist/web/client/assets/SpawnTeamModal-Cp-nAvIC.js +0 -1
- package/dist/web/client/assets/TeamForm-Cz9uDVvb.js +0 -1
- package/dist/web/client/assets/TeamThread-D8xqE_gb.js +0 -1
- package/dist/web/client/assets/UnsavedChangesGuard-DmT4nBQU.js +0 -1
- package/dist/web/client/assets/_id-DEQxwq2v.js +0 -1
- package/dist/web/client/assets/access-34_ShgHU.js +0 -1
- package/dist/web/client/assets/agent-actions--EO4yJ4Q.js +0 -1
- package/dist/web/client/assets/agents-C87yBHaR.js +0 -1
- package/dist/web/client/assets/agents-DvCSl1Ro.js +0 -1
- package/dist/web/client/assets/api-CoLs57oO.js +0 -1
- package/dist/web/client/assets/arrow-right-BhTWtC9z.js +0 -1
- package/dist/web/client/assets/attention-CteEeRvX.js +0 -1
- package/dist/web/client/assets/chevron-right-BqOIX9UM.js +0 -1
- package/dist/web/client/assets/config-XJuQeEP4.js +0 -1
- package/dist/web/client/assets/createLucideIcon-dN8ooBD1.js +0 -1
- package/dist/web/client/assets/entities-xVoB-p2j.js +0 -1
- package/dist/web/client/assets/form-Bvr_f9lR.js +0 -1
- package/dist/web/client/assets/index-J_Uqj4md.js +0 -54
- package/dist/web/client/assets/login-076Bc601.js +0 -1
- package/dist/web/client/assets/manage-CsrV2hhK.js +0 -1
- package/dist/web/client/assets/mcp-8N0BqZ0G.js +0 -1
- package/dist/web/client/assets/model-facts-DoB6QD5y.js +0 -1
- package/dist/web/client/assets/parts-B0JBolvG.js +0 -1
- package/dist/web/client/assets/plus-DZ3KVo7E.js +0 -1
- package/dist/web/client/assets/routes-3HkZZOOe.js +0 -76
- package/dist/web/client/assets/skills-DiaqZRXT.js +0 -1
- package/dist/web/client/assets/styles-C7Ztw15K.css +0 -2
- package/dist/web/client/assets/system-YWlJ8ogO.js +0 -1
- package/dist/web/client/assets/teams-DQwceMvk.js +0 -1
- package/dist/web/client/assets/teams-DTC3plIH.js +0 -1
- package/dist/web/client/assets/telegram-D4wINntt.js +0 -1
- package/dist/web/client/assets/tools-CZeQ9pDx.js +0 -1
- package/dist/web/client/assets/use-resource-BaTkTGvG.js +0 -1
- package/dist/web/client/assets/welcome-CnxP_RCk.js +0 -1
- package/dist/web/client/assets/wrench-BrwBswfo.js +0 -1
- package/dist/web/server/assets/Dialog-aup_yJv5.js +0 -85
- package/dist/web/server/assets/ModelMenu-BAZeARx6.js +0 -138
- package/dist/web/server/assets/SpawnDialog-CYkwzETs.js +0 -124
- package/dist/web/server/assets/_tanstack-start-manifest_v-D7RvKGRH.js +0 -285
- package/dist/web/server/assets/entities-Dn2xzKIw.js +0 -16
- package/dist/web/server/assets/form-BRQAsKKq.js +0 -319
- package/dist/web/server/assets/model-facts-mrfrWQne.js +0 -136
- package/dist/web/server/assets/parts-mabERIJZ.js +0 -380
- package/dist/web/server/assets/routes-IHMVKpDK.js +0 -16
- package/dist/web/server/assets/skills-hfTSwqsG.js +0 -353
- package/dist/web/server/assets/utils-C_uf36nf.js +0 -8
- package/dist/web/server/assets/workspace-DaitCM0t.js +0 -651
- /package/dist/web/server/assets/{telegram-CGol0CKX.js → telegram-CGol0CKX2.js} +0 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { useId } from "react";
|
|
2
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Check, ChevronDown } from "lucide-react";
|
|
4
|
+
import { Select } from "radix-ui";
|
|
5
|
+
import { clsx } from "clsx";
|
|
6
|
+
import { twMerge } from "tailwind-merge";
|
|
7
|
+
//#region src/lib/utils.ts
|
|
8
|
+
function cn(...inputs) {
|
|
9
|
+
return twMerge(clsx(inputs));
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/lib/model-facts.ts
|
|
13
|
+
function modelName(model) {
|
|
14
|
+
return model.name ?? model.id;
|
|
15
|
+
}
|
|
16
|
+
/** A context window in the units people say: `1M`, `272K`. */
|
|
17
|
+
function formatContext(tokens) {
|
|
18
|
+
if (!tokens || tokens <= 0) return null;
|
|
19
|
+
if (tokens >= 1e6) return `${(tokens / 1e6).toFixed(1).replace(/\.0$/, "")}M`;
|
|
20
|
+
return `${Math.round(tokens / 1e3)}K`;
|
|
21
|
+
}
|
|
22
|
+
/** A dollar amount with cents, and the third decimal only when it carries something. */
|
|
23
|
+
function formatUsd(value) {
|
|
24
|
+
if (Number.isInteger(value)) return `$${value}`;
|
|
25
|
+
const fixed = value.toFixed(3);
|
|
26
|
+
return `$${fixed.endsWith("0") ? fixed.slice(0, -1) : fixed}`;
|
|
27
|
+
}
|
|
28
|
+
/** What a model can do, in one line. A model the catalog does not know has nothing to say. */
|
|
29
|
+
function factsLine(model, connect) {
|
|
30
|
+
const context = formatContext(model.contextWindow);
|
|
31
|
+
if (!model.name && !context) return connect === "local" ? "Loaded on the server" : "Not in the bundled catalog";
|
|
32
|
+
return [
|
|
33
|
+
context ? `${context} context` : null,
|
|
34
|
+
model.images ? "sees images" : "text only",
|
|
35
|
+
model.reasoning ? "reasoning" : null
|
|
36
|
+
].filter(Boolean).join(" · ");
|
|
37
|
+
}
|
|
38
|
+
/** What a model costs: the list price per million tokens, or who pays instead. */
|
|
39
|
+
function priceLine(model, connect) {
|
|
40
|
+
if (connect === "signin") return "Included in your plan";
|
|
41
|
+
if (connect === "local") return "Runs on your hardware";
|
|
42
|
+
if (!model.price) return "No list price";
|
|
43
|
+
return `${formatUsd(model.price.input)} in · ${formatUsd(model.price.output)} out`;
|
|
44
|
+
}
|
|
45
|
+
function usedByLine(usedBy) {
|
|
46
|
+
const parts = [...usedBy.templates.map((name) => `${name} template`), usedBy.agents === 1 ? "1 Agent" : usedBy.agents > 1 ? `${usedBy.agents} Agents` : null].filter(Boolean);
|
|
47
|
+
return parts.length > 0 ? parts.join(", ") : "Not used yet";
|
|
48
|
+
}
|
|
49
|
+
/** The two facts that matter when choosing a model: how much it reads, whether it sees images. */
|
|
50
|
+
function menuFacts(model) {
|
|
51
|
+
const context = formatContext(model.contextWindow);
|
|
52
|
+
if (!context) return model.providerConnect === "local" ? "on this computer" : "";
|
|
53
|
+
return `${context} · ${model.images ? "sees images" : "text only"}`;
|
|
54
|
+
}
|
|
55
|
+
/** Chat models by provider, in the order the Models page lists them. */
|
|
56
|
+
function menuGroups(models) {
|
|
57
|
+
const groups = /* @__PURE__ */ new Map();
|
|
58
|
+
for (const model of models) {
|
|
59
|
+
const group = groups.get(model.provider) ?? {
|
|
60
|
+
provider: model.provider,
|
|
61
|
+
name: model.providerName,
|
|
62
|
+
trouble: model.providerState === "failing" || model.providerState === "incomplete" ? "not working" : null,
|
|
63
|
+
models: []
|
|
64
|
+
};
|
|
65
|
+
group.models.push(model);
|
|
66
|
+
groups.set(model.provider, group);
|
|
67
|
+
}
|
|
68
|
+
return [...groups.values()];
|
|
69
|
+
}
|
|
70
|
+
/** Whether a model matches what was typed: every word, in its name or id. */
|
|
71
|
+
function matchesModel(model, query) {
|
|
72
|
+
const haystack = `${model.name ?? ""} ${model.id}`.toLowerCase();
|
|
73
|
+
return query.toLowerCase().split(/\s+/).filter(Boolean).every((word) => haystack.includes(word));
|
|
74
|
+
}
|
|
75
|
+
/** "2 minutes ago", for something that happened at `at`. */
|
|
76
|
+
function ago(at, now) {
|
|
77
|
+
const seconds = Math.max(0, Math.round((now - at) / 1e3));
|
|
78
|
+
if (seconds < 45) return "just now";
|
|
79
|
+
const minutes = Math.round(seconds / 60);
|
|
80
|
+
if (minutes < 60) return minutes === 1 ? "1 minute ago" : `${minutes} minutes ago`;
|
|
81
|
+
const hours = Math.round(minutes / 60);
|
|
82
|
+
if (hours < 24) return hours === 1 ? "1 hour ago" : `${hours} hours ago`;
|
|
83
|
+
const days = Math.round(hours / 24);
|
|
84
|
+
if (days < 30) return days === 1 ? "yesterday" : `${days} days ago`;
|
|
85
|
+
return `on ${new Date(at).toISOString().slice(0, 10)}`;
|
|
86
|
+
}
|
|
87
|
+
var FAILURE_LABEL = {
|
|
88
|
+
credentials: "Key rejected",
|
|
89
|
+
unreachable: "Not answering",
|
|
90
|
+
model: "Model unavailable",
|
|
91
|
+
limit: "Limit reached",
|
|
92
|
+
other: "Failing"
|
|
93
|
+
};
|
|
94
|
+
/** A provider's state as a chip: a few words and how loud they are. */
|
|
95
|
+
function providerStatus(provider, now) {
|
|
96
|
+
switch (provider.state) {
|
|
97
|
+
case "working": return {
|
|
98
|
+
label: provider.check ? `Working · tested ${ago(provider.check.at, now)}` : "Working",
|
|
99
|
+
tone: "success"
|
|
100
|
+
};
|
|
101
|
+
case "failing": {
|
|
102
|
+
const kind = provider.check?.failure?.kind ?? "other";
|
|
103
|
+
const label = kind === "credentials" && provider.connect === "signin" ? "Sign-in rejected" : FAILURE_LABEL[kind];
|
|
104
|
+
return {
|
|
105
|
+
label: provider.check ? `${label} · tried ${ago(provider.check.at, now)}` : label,
|
|
106
|
+
tone: "warning"
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
case "incomplete": return {
|
|
110
|
+
label: provider.connect === "signin" ? "Not signed in" : provider.fields.some((field) => field.kind === "secret") ? "Needs a key" : "Needs credentials",
|
|
111
|
+
tone: "warning"
|
|
112
|
+
};
|
|
113
|
+
case "off": return {
|
|
114
|
+
label: provider.models.length === 0 ? "Saved, not in use" : "Turned off",
|
|
115
|
+
tone: "neutral"
|
|
116
|
+
};
|
|
117
|
+
default: return {
|
|
118
|
+
label: "Not tested yet",
|
|
119
|
+
tone: "neutral"
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/** How a provider is connected, in a few words, for its row. */
|
|
124
|
+
function credentialLine(provider) {
|
|
125
|
+
if (provider.connect === "signin") return provider.configured ? "Signed in with your ChatGPT account" : "Not signed in";
|
|
126
|
+
if (provider.connect === "local") return provider.address ?? "A model server on this network";
|
|
127
|
+
const key = provider.fields.find((field) => field.kind === "secret" && field.set);
|
|
128
|
+
if (key) return `${key.label} ${key.preview ?? "saved"}`;
|
|
129
|
+
if (provider.configured) return "Credentials from the daemon’s environment";
|
|
130
|
+
return "No credentials saved";
|
|
131
|
+
}
|
|
132
|
+
/** The models to ask first: suggested ones, then the ones already in use. */
|
|
133
|
+
function initialPicks(models) {
|
|
134
|
+
const selected = models.filter((model) => model.selected).map((model) => model.id);
|
|
135
|
+
if (selected.length > 0) return selected;
|
|
136
|
+
return models.filter((model) => model.suggested).map((model) => model.id);
|
|
137
|
+
}
|
|
138
|
+
/** The cheapest of the given models by list price; unpriced ones come last, in order. */
|
|
139
|
+
function cheapest(models) {
|
|
140
|
+
const cost = (model) => model.price ? model.price.input + model.price.output : Number.POSITIVE_INFINITY;
|
|
141
|
+
return models.map((model, index) => ({
|
|
142
|
+
model,
|
|
143
|
+
index
|
|
144
|
+
})).sort((a, b) => cost(a.model) - cost(b.model) || a.index - b.index)[0]?.model;
|
|
145
|
+
}
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region src/components/ModelMenu.tsx
|
|
148
|
+
/** The Models overview, whose `chat` list the menu shows. */
|
|
149
|
+
var MODELS_PATH = "/api/config/models";
|
|
150
|
+
var INHERITED = ":inherited";
|
|
151
|
+
var ITEM = "relative flex cursor-pointer select-none items-baseline gap-x-3 rounded-lg py-2 pl-8 pr-3 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground";
|
|
152
|
+
function ModelMenu({ label, value, onChange, models, inherited, required, disabled = false, kit = false }) {
|
|
153
|
+
const id = useId();
|
|
154
|
+
const find = (candidate) => models.find((model) => model.value === candidate);
|
|
155
|
+
const named = (candidate) => {
|
|
156
|
+
const model = find(candidate);
|
|
157
|
+
return model ? modelName(model) : candidate;
|
|
158
|
+
};
|
|
159
|
+
const chosen = find(value);
|
|
160
|
+
const unlisted = value !== "" && !chosen;
|
|
161
|
+
const groups = menuGroups(models);
|
|
162
|
+
const empty = models.length === 0 && !inherited;
|
|
163
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
164
|
+
className: kit ? "min-w-0" : "my-[0.6rem]",
|
|
165
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
166
|
+
id: `${id}-label`,
|
|
167
|
+
className: kit ? "mb-1.5 block text-sm font-semibold text-foreground" : "block text-[0.9em] text-mocha",
|
|
168
|
+
children: label
|
|
169
|
+
}), /* @__PURE__ */ jsxs(Select.Root, {
|
|
170
|
+
value: value === "" ? inherited ? INHERITED : "" : value,
|
|
171
|
+
onValueChange: (next) => onChange(next === INHERITED ? "" : next),
|
|
172
|
+
required,
|
|
173
|
+
disabled: empty || disabled,
|
|
174
|
+
children: [/* @__PURE__ */ jsxs(Select.Trigger, {
|
|
175
|
+
"aria-labelledby": `${id}-label ${id}-value`,
|
|
176
|
+
className: "flex min-h-[2.65rem] w-full items-center justify-between gap-2 rounded-[var(--radius-md)] border border-frost bg-[color-mix(in_srgb,var(--color-snow)_82%,var(--color-ivory))] px-[0.8rem] py-[0.5rem] text-left text-[0.95em] text-chocolate transition-all focus-visible:border-sapphire focus-visible:bg-snow focus-visible:shadow-[0_0_0_3px_var(--color-sapphire-glow)] disabled:opacity-60 data-[state=open]:border-sapphire",
|
|
177
|
+
style: { outline: "none" },
|
|
178
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
179
|
+
id: `${id}-value`,
|
|
180
|
+
className: "min-w-0 flex-1 truncate",
|
|
181
|
+
children: value === "" ? inherited ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
182
|
+
inherited.model ? named(inherited.model) : inherited.label,
|
|
183
|
+
" ",
|
|
184
|
+
inherited.model && /* @__PURE__ */ jsx("span", {
|
|
185
|
+
className: "ml-1 text-[0.9em] text-mocha-light",
|
|
186
|
+
children: inherited.label.toLowerCase()
|
|
187
|
+
})
|
|
188
|
+
] }) : /* @__PURE__ */ jsx("span", {
|
|
189
|
+
className: "text-mocha-light",
|
|
190
|
+
children: empty ? "No chat model yet" : "Pick a model"
|
|
191
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
192
|
+
named(value),
|
|
193
|
+
" ",
|
|
194
|
+
/* @__PURE__ */ jsx("span", {
|
|
195
|
+
className: "ml-1 text-[0.9em] text-mocha-light",
|
|
196
|
+
children: chosen ? chosen.providerName : "not in Chat"
|
|
197
|
+
})
|
|
198
|
+
] })
|
|
199
|
+
}), /* @__PURE__ */ jsx(Select.Icon, {
|
|
200
|
+
asChild: true,
|
|
201
|
+
children: /* @__PURE__ */ jsx(ChevronDown, {
|
|
202
|
+
className: "size-4 shrink-0 text-mocha-light",
|
|
203
|
+
"aria-hidden": "true"
|
|
204
|
+
})
|
|
205
|
+
})]
|
|
206
|
+
}), /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsxs(Select.Content, {
|
|
207
|
+
position: "popper",
|
|
208
|
+
sideOffset: 6,
|
|
209
|
+
className: "z-50 max-h-[min(26rem,var(--radix-select-content-available-height))] w-[max(var(--radix-select-trigger-width),18rem)] max-w-[calc(100vw-1.5rem)] overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-baziu-lg",
|
|
210
|
+
children: [/* @__PURE__ */ jsxs(Select.Viewport, {
|
|
211
|
+
className: "p-1.5",
|
|
212
|
+
children: [
|
|
213
|
+
inherited && /* @__PURE__ */ jsx(Option, {
|
|
214
|
+
value: INHERITED,
|
|
215
|
+
name: inherited.label,
|
|
216
|
+
children: inherited.model ? named(inherited.model) : ""
|
|
217
|
+
}),
|
|
218
|
+
unlisted && /* @__PURE__ */ jsx(Option, {
|
|
219
|
+
value,
|
|
220
|
+
name: value,
|
|
221
|
+
mono: true,
|
|
222
|
+
children: "not in Chat"
|
|
223
|
+
}),
|
|
224
|
+
groups.map((group) => /* @__PURE__ */ jsxs(Select.Group, { children: [/* @__PURE__ */ jsxs(Select.Label, {
|
|
225
|
+
className: "flex items-baseline gap-2 px-3 pb-1 pt-2.5 text-xs font-bold uppercase tracking-[0.08em] text-muted-foreground",
|
|
226
|
+
children: [group.name, group.trouble && /* @__PURE__ */ jsx("span", {
|
|
227
|
+
className: "font-semibold normal-case tracking-normal text-warning",
|
|
228
|
+
children: group.trouble
|
|
229
|
+
})]
|
|
230
|
+
}), group.models.map((model) => /* @__PURE__ */ jsx(Option, {
|
|
231
|
+
value: model.value,
|
|
232
|
+
name: modelName(model),
|
|
233
|
+
mono: !model.name,
|
|
234
|
+
children: menuFacts(model)
|
|
235
|
+
}, model.value))] }, group.provider)),
|
|
236
|
+
models.length === 0 && /* @__PURE__ */ jsx("p", {
|
|
237
|
+
className: "m-0 px-3 py-2 text-sm text-muted-foreground",
|
|
238
|
+
children: "No chat model is in use yet."
|
|
239
|
+
})
|
|
240
|
+
]
|
|
241
|
+
}), /* @__PURE__ */ jsx("a", {
|
|
242
|
+
href: "/config?pick=true",
|
|
243
|
+
className: "block border-t border-border px-4 py-2.5 text-sm font-semibold text-primary hover:bg-muted/50",
|
|
244
|
+
children: "Add models in Setup"
|
|
245
|
+
})]
|
|
246
|
+
}) })]
|
|
247
|
+
})]
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
function Option({ value, name, mono = false, children }) {
|
|
251
|
+
return /* @__PURE__ */ jsxs(Select.Item, {
|
|
252
|
+
value,
|
|
253
|
+
className: ITEM,
|
|
254
|
+
style: { outline: "none" },
|
|
255
|
+
children: [
|
|
256
|
+
/* @__PURE__ */ jsx(Select.ItemIndicator, {
|
|
257
|
+
className: "absolute left-2.5 top-1/2 -translate-y-1/2",
|
|
258
|
+
children: /* @__PURE__ */ jsx(Check, {
|
|
259
|
+
className: "size-4 text-primary",
|
|
260
|
+
"aria-hidden": "true"
|
|
261
|
+
})
|
|
262
|
+
}),
|
|
263
|
+
/* @__PURE__ */ jsx(Select.ItemText, {
|
|
264
|
+
asChild: true,
|
|
265
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
266
|
+
className: cn("min-w-0 flex-1 break-words", mono ? "font-mono text-[0.85em] font-medium" : "font-semibold"),
|
|
267
|
+
children: name
|
|
268
|
+
})
|
|
269
|
+
}),
|
|
270
|
+
children && /* @__PURE__ */ jsx("span", {
|
|
271
|
+
className: "shrink-0 text-xs text-muted-foreground",
|
|
272
|
+
children
|
|
273
|
+
})
|
|
274
|
+
]
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
//#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 };
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import {
|
|
7
|
-
import { t as SpawnDialog } from "./SpawnDialog-CYkwzETs.js";
|
|
8
|
-
import { t as SpawnTeamModal } from "./SpawnTeamModal-CCe6P82H.js";
|
|
9
|
-
import { t as TeamForm } from "./TeamForm-BzQmdhVi.js";
|
|
1
|
+
import { G as DialogActions, J as DEFAULT_PROFILE_ID, K as Button, W as Dialog$1, Y as DEFAULT_TEAM_ID, et as shortTime, nt as useActivity, pt as errorMessage, q as AgentAvatar, t as SpawnDialog, tt as teamSummary } from "./SpawnDialog-3wNx0W1R.js";
|
|
2
|
+
import { t as useHydrated } from "./use-resource-CbHGYti0.js";
|
|
3
|
+
import { t as ConfirmDialog } from "./ConfirmDialog-Z-uYbE9B.js";
|
|
4
|
+
import { r as renameAgent, t as archiveAgent } from "./agent-actions-C07Cp5Ue.js";
|
|
5
|
+
import { t as SpawnTeamModal } from "./SpawnTeamModal-C-YMvoaB.js";
|
|
6
|
+
import { t as TeamForm } from "./TeamForm-CL45gBdt.js";
|
|
10
7
|
import { createContext, useContext, useMemo, useRef, useState } from "react";
|
|
11
8
|
import { Link, useRouter } from "@tanstack/react-router";
|
|
12
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -421,7 +418,7 @@ function AgentRow({ agent, selected, state, lastActivityAt, panel, onRename, onA
|
|
|
421
418
|
}),
|
|
422
419
|
hydrated && lastActivityAt !== null && /* @__PURE__ */ jsx("time", {
|
|
423
420
|
dateTime: new Date(lastActivityAt).toISOString(),
|
|
424
|
-
className: "ml-auto shrink-0 text-
|
|
421
|
+
className: "ml-auto shrink-0 text-xs font-normal text-muted-foreground",
|
|
425
422
|
children: shortTime(lastActivityAt)
|
|
426
423
|
})
|
|
427
424
|
]
|
|
@@ -519,7 +516,7 @@ function SlimRail() {
|
|
|
519
516
|
children: [
|
|
520
517
|
/* @__PURE__ */ jsx("div", { className: "h-px w-8 bg-border" }),
|
|
521
518
|
/* @__PURE__ */ jsx("span", {
|
|
522
|
-
className: `max-w-14 truncate text-
|
|
519
|
+
className: `max-w-14 truncate text-xs font-bold uppercase tracking-[0.06em] ${team.id === inView?.id ? "text-accent-foreground" : "text-muted-foreground"}`,
|
|
523
520
|
title: team.name,
|
|
524
521
|
children: team.name
|
|
525
522
|
}),
|
|
@@ -605,4 +602,4 @@ function RenameAgentDialog({ agent, onClose, onRenamed }) {
|
|
|
605
602
|
});
|
|
606
603
|
}
|
|
607
604
|
//#endregion
|
|
608
|
-
export {
|
|
605
|
+
export { STATE_TEXT as a, useWorkspace as c, STATE_DOT as i, useWorkspaceOptional as l, RenameAgentDialog as n, SlimRail as o, SIDEBAR_OPEN_GROUPS_COOKIE as r, WorkspaceProvider as s, Rail as t };
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { G as DialogActions, K as Button, W as Dialog, dt as api, f as TextField, k as Notice, n as CheckboxRow, pt as errorMessage, r as ChoiceCards, ut as ApiError } from "./SpawnDialog-3wNx0W1R.js";
|
|
2
|
+
import { p as cn } from "./ModelMenu-D-hTgYOO.js";
|
|
3
|
+
import { s as count } from "./manage-Ce6cI4eW.js";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/manage/SkillsParts.tsx
|
|
7
|
+
/** A scan's findings, one to a line: what it found, and where. */
|
|
8
|
+
function FindingLines({ findings }) {
|
|
9
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
10
|
+
className: "m-0 mt-1 grid list-none gap-1 p-0",
|
|
11
|
+
children: findings.map((finding, index) => /* @__PURE__ */ jsxs("li", {
|
|
12
|
+
className: "min-w-0",
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ jsxs("span", {
|
|
15
|
+
className: finding.severity === "danger" ? "font-semibold" : "",
|
|
16
|
+
children: [finding.severity === "danger" ? "Risky" : "Check", ":"]
|
|
17
|
+
}),
|
|
18
|
+
" ",
|
|
19
|
+
finding.message,
|
|
20
|
+
" ",
|
|
21
|
+
/* @__PURE__ */ jsxs("span", {
|
|
22
|
+
className: "text-muted-foreground",
|
|
23
|
+
children: [
|
|
24
|
+
"(",
|
|
25
|
+
finding.code,
|
|
26
|
+
finding.line ? `, line ${finding.line}` : "",
|
|
27
|
+
")"
|
|
28
|
+
]
|
|
29
|
+
})
|
|
30
|
+
]
|
|
31
|
+
}, index))
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/** What the scan found in one skill, or in what was imported. */
|
|
35
|
+
function FindingsNotice({ findings, title }) {
|
|
36
|
+
const danger = findings.some((finding) => finding.severity === "danger");
|
|
37
|
+
return /* @__PURE__ */ jsx(Notice, {
|
|
38
|
+
tone: danger ? "warning" : "neutral",
|
|
39
|
+
title: title ?? (danger ? "Read it before an Agent uses it: its text goes into the system prompt." : "Worth a look."),
|
|
40
|
+
children: /* @__PURE__ */ jsx(FindingLines, { findings })
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
var SOURCES = [
|
|
44
|
+
{
|
|
45
|
+
value: "openclaw",
|
|
46
|
+
label: "OpenClaw",
|
|
47
|
+
hint: "Every skill in ~/.openclaw/skills on the computer Bazilion runs on."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
value: "path",
|
|
51
|
+
label: "A folder",
|
|
52
|
+
hint: "One skill folder with a SKILL.md, or a folder of them, on that computer."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
value: "zip",
|
|
56
|
+
label: "A ZIP file",
|
|
57
|
+
hint: "Uploaded from here: one folder per skill at its top level."
|
|
58
|
+
}
|
|
59
|
+
];
|
|
60
|
+
/** Import skills from OpenClaw, a folder or a ZIP file; the scan's findings are shown here. */
|
|
61
|
+
function ImportSkillsDialog({ onClose, onImported }) {
|
|
62
|
+
const [source, setSource] = useState("openclaw");
|
|
63
|
+
const [path, setPath] = useState("");
|
|
64
|
+
const [zip, setZip] = useState(null);
|
|
65
|
+
const [dragOver, setDragOver] = useState(false);
|
|
66
|
+
const [force, setForce] = useState(false);
|
|
67
|
+
const [busy, setBusy] = useState(false);
|
|
68
|
+
const [error, setError] = useState(null);
|
|
69
|
+
const [findings, setFindings] = useState([]);
|
|
70
|
+
const pathProblem = source === "path" && path.trim() && !path.trim().startsWith("/") ? "The full path of the folder, starting with /." : void 0;
|
|
71
|
+
const ready = source === "openclaw" || source === "path" && path.trim() !== "" && !pathProblem || source === "zip" && zip !== null;
|
|
72
|
+
function chooseZip(file) {
|
|
73
|
+
if (!file) return;
|
|
74
|
+
setError(null);
|
|
75
|
+
if (!/\.zip$/i.test(file.name)) {
|
|
76
|
+
setError("Only ZIP archives can be imported.");
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
setZip(file);
|
|
80
|
+
}
|
|
81
|
+
async function submit(event) {
|
|
82
|
+
event.preventDefault();
|
|
83
|
+
if (!ready || busy) return;
|
|
84
|
+
setBusy(true);
|
|
85
|
+
setError(null);
|
|
86
|
+
setFindings([]);
|
|
87
|
+
let body;
|
|
88
|
+
if (source === "zip" && zip) {
|
|
89
|
+
const form = new FormData();
|
|
90
|
+
form.set("file", zip);
|
|
91
|
+
if (force) form.set("force", "true");
|
|
92
|
+
body = form;
|
|
93
|
+
} else body = {
|
|
94
|
+
source: source === "openclaw" ? "openclaw" : path.trim(),
|
|
95
|
+
force
|
|
96
|
+
};
|
|
97
|
+
try {
|
|
98
|
+
await onImported(await api("/api/skills/import", { body }));
|
|
99
|
+
} catch (cause) {
|
|
100
|
+
if (cause instanceof ApiError) setFindings(cause.body?.findings ?? []);
|
|
101
|
+
setError(errorMessage(cause));
|
|
102
|
+
setBusy(false);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return /* @__PURE__ */ jsx(Dialog, {
|
|
106
|
+
title: "Import skills",
|
|
107
|
+
description: "A skill's SKILL.md is added to the system prompt of every Agent it is attached to. Each one is scanned before it is installed.",
|
|
108
|
+
busy,
|
|
109
|
+
onClose,
|
|
110
|
+
className: "max-w-2xl",
|
|
111
|
+
children: /* @__PURE__ */ jsxs("form", {
|
|
112
|
+
onSubmit: (event) => void submit(event),
|
|
113
|
+
className: "grid gap-4",
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ jsx(ChoiceCards, {
|
|
116
|
+
legend: "From",
|
|
117
|
+
name: "skills-source",
|
|
118
|
+
value: source,
|
|
119
|
+
options: SOURCES,
|
|
120
|
+
columns: 3,
|
|
121
|
+
disabled: busy,
|
|
122
|
+
onChange: (next) => {
|
|
123
|
+
setSource(next);
|
|
124
|
+
setError(null);
|
|
125
|
+
setFindings([]);
|
|
126
|
+
}
|
|
127
|
+
}),
|
|
128
|
+
source === "path" && /* @__PURE__ */ jsx(TextField, {
|
|
129
|
+
label: "Folder",
|
|
130
|
+
value: path,
|
|
131
|
+
disabled: busy,
|
|
132
|
+
placeholder: "/home/you/my-skills",
|
|
133
|
+
mono: true,
|
|
134
|
+
className: "max-w-none",
|
|
135
|
+
problem: pathProblem,
|
|
136
|
+
onChange: setPath
|
|
137
|
+
}),
|
|
138
|
+
source === "zip" && /* @__PURE__ */ jsxs("label", {
|
|
139
|
+
onDragOver: (event) => {
|
|
140
|
+
event.preventDefault();
|
|
141
|
+
setDragOver(true);
|
|
142
|
+
},
|
|
143
|
+
onDragLeave: () => setDragOver(false),
|
|
144
|
+
onDrop: (event) => {
|
|
145
|
+
event.preventDefault();
|
|
146
|
+
setDragOver(false);
|
|
147
|
+
chooseZip(event.dataTransfer.files[0]);
|
|
148
|
+
},
|
|
149
|
+
className: cn("relative m-0 block cursor-pointer rounded-xl border-2 border-dashed px-6 py-7 text-center text-sm transition-colors", dragOver ? "border-primary bg-accent text-accent-foreground" : zip ? "border-solid border-primary/40 bg-card text-foreground" : "border-border bg-muted/30 text-muted-foreground hover:border-primary hover:bg-accent/60"),
|
|
150
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
151
|
+
type: "file",
|
|
152
|
+
accept: ".zip,application/zip",
|
|
153
|
+
disabled: busy,
|
|
154
|
+
onChange: (event) => chooseZip(event.target.files?.[0]),
|
|
155
|
+
className: "absolute h-px w-px overflow-hidden opacity-0"
|
|
156
|
+
}), zip ? /* @__PURE__ */ jsx("span", {
|
|
157
|
+
className: "block break-all font-mono text-foreground",
|
|
158
|
+
children: zip.name
|
|
159
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
160
|
+
className: "block font-semibold text-foreground",
|
|
161
|
+
children: "Choose a ZIP file"
|
|
162
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
163
|
+
className: "text-xs",
|
|
164
|
+
children: "or drop it here"
|
|
165
|
+
})] })]
|
|
166
|
+
}),
|
|
167
|
+
/* @__PURE__ */ jsx(CheckboxRow, {
|
|
168
|
+
checked: force,
|
|
169
|
+
disabled: busy,
|
|
170
|
+
label: "Replace skills that are already installed, and import despite scan findings",
|
|
171
|
+
onChange: setForce
|
|
172
|
+
}),
|
|
173
|
+
findings.length > 0 && /* @__PURE__ */ jsx(FindingsNotice, {
|
|
174
|
+
findings,
|
|
175
|
+
title: `The scan found ${count(findings.length, "thing")} to check. Read them; to import anyway, tick the box above.`
|
|
176
|
+
}),
|
|
177
|
+
error && findings.length === 0 && /* @__PURE__ */ jsx(Notice, {
|
|
178
|
+
tone: "warning",
|
|
179
|
+
role: "alert",
|
|
180
|
+
title: "Nothing was imported.",
|
|
181
|
+
children: error
|
|
182
|
+
}),
|
|
183
|
+
/* @__PURE__ */ jsxs(DialogActions, { children: [/* @__PURE__ */ jsx(Button, {
|
|
184
|
+
variant: "ghost",
|
|
185
|
+
disabled: busy,
|
|
186
|
+
onClick: onClose,
|
|
187
|
+
children: "Cancel"
|
|
188
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
189
|
+
variant: "primary",
|
|
190
|
+
type: "submit",
|
|
191
|
+
disabled: busy || !ready,
|
|
192
|
+
children: busy ? "Importing…" : source === "openclaw" ? "Import from OpenClaw" : source === "zip" ? "Upload and import" : "Import"
|
|
193
|
+
})] })
|
|
194
|
+
]
|
|
195
|
+
})
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
//#endregion
|
|
199
|
+
export { FindingsNotice as n, ImportSkillsDialog as r, FindingLines as t };
|