bazilion 0.51.0 → 0.52.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-BiGLKnu2.js +1 -0
- package/dist/web/client/assets/{ConfigPage-pupvtSCX.js → ConfigPage-DvBzy2MN.js} +1 -1
- package/dist/web/client/assets/{ConfirmDialog-GFDcHI1L.js → ConfirmDialog-CiZ5tk9R.js} +1 -1
- package/dist/web/client/assets/{ConnectionsView-y1CeY-6U.js → ConnectionsView-Czkpm2JY.js} +1 -1
- package/dist/web/client/assets/Dialog-s_kPtI-W.js +1 -0
- package/dist/web/client/assets/ModelMenu-BfUPoRjV.js +1 -0
- package/dist/web/client/assets/{SectionTabs-D4ezA6U4.js → SectionTabs-DENNb6Nw.js} +1 -1
- package/dist/web/client/assets/{SkillFindings-BzLO1lNA.js → SkillFindings-Xng11qqx.js} +1 -1
- package/dist/web/client/assets/SpawnDialog-CKWFQ6jk.js +1 -0
- package/dist/web/client/assets/TeamThread-2rm1JGSk.js +1 -0
- package/dist/web/client/assets/{UnsavedChangesGuard-DBJikVgc.js → UnsavedChangesGuard-nx6dv2Yw.js} +1 -1
- package/dist/web/client/assets/_id-B72mIpcE.js +1 -0
- package/dist/web/client/assets/_id-Bzavnza1.js +1 -0
- package/dist/web/client/assets/access-Yw9jODuk.js +1 -0
- package/dist/web/client/assets/agents-C9xoyL7o.js +1 -0
- package/dist/web/client/assets/agents-TviG16wx.js +1 -0
- package/dist/web/client/assets/attention-DmURtlJm.js +1 -0
- package/dist/web/client/assets/chevron-right-CUZiA2aG.js +1 -0
- package/dist/web/client/assets/config-UZz_mjO5.js +1 -0
- package/dist/web/client/assets/dist-BWppw70N.js +41 -0
- package/dist/web/client/assets/dist-D2dwY7MR.js +1 -0
- package/dist/web/client/assets/index-Df1oUtAP.js +14 -0
- package/dist/web/client/assets/login-CPfdaqsV.js +1 -0
- package/dist/web/client/assets/mcp-FlYnNon0.js +1 -0
- package/dist/web/client/assets/model-facts-DoB6QD5y.js +1 -0
- package/dist/web/client/assets/parts-tIDBNsYA.js +1 -0
- package/dist/web/client/assets/routes-BZaWCoQj.js +76 -0
- package/dist/web/client/assets/skills-C7yDPC8s.js +1 -0
- package/dist/web/client/assets/{style-Cdzqt_TJ.js → style-DDuTFJUu.js} +1 -1
- package/dist/web/client/assets/styles-BviXU81u.css +2 -0
- package/dist/web/client/assets/{system-CsI66nyZ.js → system-CL3Kz36L.js} +1 -1
- package/dist/web/client/assets/teams-CQTEF5gV.js +1 -0
- package/dist/web/client/assets/teams-DQ7SqVyF.js +1 -0
- package/dist/web/client/assets/{telegram-C3dGndJV.js → telegram-BLgxtGhZ.js} +1 -1
- package/dist/web/client/assets/tools-pOQyGVYo.js +1 -0
- package/dist/web/client/assets/use-resource-C3MBZJop.js +1 -0
- package/dist/web/client/assets/welcome-Hr6JpMef.js +1 -0
- package/dist/web/client/assets/wrench-6BEIqKDn.js +1 -0
- package/dist/web/server/assets/{AddProviderDialog-CR6TRYdZ.js → AddProviderDialog-Tn4AskPm.js} +7 -304
- package/dist/web/server/assets/{ConfigPage-CIh3ohea.js → ConfigPage-DqDUujmt.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-DAG-zNBz.js} +6 -6
- package/dist/web/server/assets/{Dialog-CVqpXxuN.js → Dialog-aup_yJv5.js} +1 -1
- package/dist/web/server/assets/ModelMenu-DUY9aHkE.js +138 -0
- package/dist/web/server/assets/{Rail-Cg-efcpA.js → Rail-BIC_4ptO.js} +6 -6
- package/dist/web/server/assets/{SectionTabs-DrcgVeZd.js → SectionTabs-BGsrf-UQ.js} +3 -3
- package/dist/web/server/assets/{SkillFindings-DSDiL6hn.js → SkillFindings-BdATze1A.js} +1 -1
- package/dist/web/server/assets/{SpawnDialog-BUUlLxE9.js → SpawnDialog-D_SMPCG_.js} +11 -8
- package/dist/web/server/assets/{TeamForm-CvQAs2FA.js → TeamForm-ilBaeLI4.js} +1 -1
- package/dist/web/server/assets/{TeamThread-5CjVPcDr.js → TeamThread-DuLlGDcw.js} +3 -3
- package/dist/web/server/assets/{UnsavedChangesGuard-CyF2Z9p1.js → UnsavedChangesGuard-DrOvPV14.js} +1 -1
- package/dist/web/server/assets/{_id-Dg6M_qfr.js → _id-BsZcsabI.js} +11 -11
- package/dist/web/server/assets/{_id-BvAaRSUW.js → _id-D8Kj0F30.js} +2 -2
- package/dist/web/server/assets/{_id-8bsYEcGg.js → _id-DJnYgisy.js} +2 -2
- package/dist/web/server/assets/{_id-Dji7xr9C.js → _id-QYifTM9w.js} +3 -3
- package/dist/web/server/assets/{_id-0fEWiVZX.js → _id-yN0z7VqE.js} +6 -6
- package/dist/web/server/assets/{_tanstack-start-manifest_v-sxiIH4M7.js → _tanstack-start-manifest_v-D6zrzUC7.js} +84 -75
- package/dist/web/server/assets/{tokens-CEdl8puR.js → access-C_pupPks.js} +3 -3
- package/dist/web/server/assets/{tokens-DSLwQ1Pw.js → access-DKOpcHIJ.js} +10 -10
- package/dist/web/server/assets/{tokens-C-oDTqnp.js → access-GMGed5O8.js} +5 -5
- package/dist/web/server/assets/{agents-DktqUffG.js → agents-B6OR3x99.js} +13 -13
- package/dist/web/server/assets/{agents-BDA5yYZ2.js → agents-B7642eRO.js} +5 -5
- package/dist/web/server/assets/{agents-DM7guWF2.js → agents-BJ-_oC2e.js} +2 -2
- package/dist/web/server/assets/{agents-BTDxmp-F.js → agents-CjV0w-Zy.js} +2 -2
- package/dist/web/server/assets/{agents-xgZ9rsac.js → agents-Dy_Q-9lG.js} +3 -3
- package/dist/web/server/assets/{attention-De3-ehuf.js → attention-CLP4HYBz.js} +3 -3
- package/dist/web/server/assets/{attention-CHQEQiZl.js → attention-DS3O9UmJ.js} +2 -2
- package/dist/web/server/assets/{config-DzgkbBoD.js → config-DjTGA4iZ.js} +2 -2
- package/dist/web/server/assets/{config-DOp28gcy.js → config-Q7livfa3.js} +157 -9
- package/dist/web/server/assets/{createSsrRpc-CcLbajrF.js → createSsrRpc-GCCF14VW.js} +1 -1
- package/dist/web/server/assets/{mcp-CO_tycXU.js → mcp-BI-FD-JI.js} +5 -5
- package/dist/web/server/assets/{mcp-D3OCoHtO.js → mcp-ZARSOxZW.js} +2 -2
- package/dist/web/server/assets/model-facts-mrfrWQne.js +136 -0
- package/dist/web/server/assets/parts-B31PJkhi.js +190 -0
- package/dist/web/server/assets/{router-Cs2Ak4II.js → router-Dh2-IvLL.js} +39 -39
- package/dist/web/server/assets/{routes-BVwqgZGI.js → routes-BJIJWCIE.js} +3 -3
- package/dist/web/server/assets/{routes-BSNOKE-C.js → routes-C9NawqcV.js} +21 -17
- package/dist/web/server/assets/{routes-CO4l-GJ0.js → routes-CDskMy5C.js} +2 -2
- package/dist/web/server/assets/{skills-DKYV7PTk.js → skills-BqLq3ZXq.js} +5 -5
- package/dist/web/server/assets/{skills-CggQJk6a.js → skills-StN15QhC.js} +2 -2
- package/dist/web/server/assets/{system-CZ2qzBz3.js → system-BtRA2HUs.js} +2 -2
- package/dist/web/server/assets/{system-DsJfpBPl.js → system-Dl-1RhoP.js} +2 -2
- package/dist/web/server/assets/{teams-Bp2tERZe.js → teams-5PMGvHuM.js} +2 -2
- package/dist/web/server/assets/{teams-C-8iz-uV.js → teams-COaU0wN9.js} +4 -4
- package/dist/web/server/assets/{teams-B6PzNcoy.js → teams-Ca8W4mvl.js} +5 -5
- package/dist/web/server/assets/{teams-B6lBhvdL.js → teams-CbIPKf99.js} +2 -2
- package/dist/web/server/assets/{telegram-Gy7_9yih.js → telegram-CGol0CKX2.js} +3 -3
- package/dist/web/server/assets/{telegram-D2RZriz_.js → telegram-Cv0D4gyz.js} +5 -5
- package/dist/web/server/assets/{telegram-CXrP3hMp.js → telegram-Yx8nm6Ei.js} +5 -5
- package/dist/web/server/assets/tools-C-wwWjLI.js +12 -0
- package/dist/web/server/assets/tools-OfD22R-C.js +502 -0
- package/dist/web/server/assets/tools-ioJcPzMW.js +12 -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-FFEbrNT1.js} +6 -5
- package/dist/web/server/assets/{welcome-ByAkvHSP.js → welcome-jxmpE_Jb.js} +2 -2
- package/dist/web/server/assets/{workspace-DeEYMPDX.js → workspace-DaitCM0t.js} +1 -8
- package/dist/web/server/server.js +18 -18
- 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/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/SpawnDialog-YJX6UMBC.js +0 -1
- package/dist/web/client/assets/TeamThread-DFvbakHo.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/attention-8ZkSLl2e.js +0 -1
- package/dist/web/client/assets/config-Con_BbSh.js +0 -1
- package/dist/web/client/assets/index-Br9qkGM-.js +0 -54
- 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/routes-BY5uqJ2n.js +0 -76
- 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/styles-BRSS6yrm.css +0 -2
- 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/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/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/{system-DtswhLW62.js → system-DtswhLW6.js} +0 -0
package/dist/web/server/assets/{AddProviderDialog-CR6TRYdZ.js → AddProviderDialog-Tn4AskPm.js}
RENAMED
|
@@ -1,308 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as useResource } from "./use-resource-
|
|
3
|
-
import { n as DialogActions, t as Dialog } from "./Dialog-
|
|
1
|
+
import { C as api, T as errorMessage, u as Button } from "./workspace-DaitCM0t.js";
|
|
2
|
+
import { r as useResource } from "./use-resource-DVzK0toP.js";
|
|
3
|
+
import { n as DialogActions, t as Dialog } from "./Dialog-aup_yJv5.js";
|
|
4
|
+
import { a as initialPicks, d as providerStatus, l as modelName, n as cheapest, o as matchesModel } from "./model-facts-mrfrWQne.js";
|
|
5
|
+
import { a as SearchField, i as ProviderAvatar, l as Waiting, n as FailureBox, r as ModelRow } from "./parts-B31PJkhi.js";
|
|
4
6
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
5
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import {
|
|
7
|
-
//#region src/lib/model-facts.ts
|
|
8
|
-
function modelName(model) {
|
|
9
|
-
return model.name ?? model.id;
|
|
10
|
-
}
|
|
11
|
-
/** A context window in the units people say: `1M`, `272K`. */
|
|
12
|
-
function formatContext(tokens) {
|
|
13
|
-
if (!tokens || tokens <= 0) return null;
|
|
14
|
-
if (tokens >= 1e6) return `${(tokens / 1e6).toFixed(1).replace(/\.0$/, "")}M`;
|
|
15
|
-
return `${Math.round(tokens / 1e3)}K`;
|
|
16
|
-
}
|
|
17
|
-
/** A dollar amount with cents, and the third decimal only when it carries something. */
|
|
18
|
-
function formatUsd(value) {
|
|
19
|
-
if (Number.isInteger(value)) return `$${value}`;
|
|
20
|
-
const fixed = value.toFixed(3);
|
|
21
|
-
return `$${fixed.endsWith("0") ? fixed.slice(0, -1) : fixed}`;
|
|
22
|
-
}
|
|
23
|
-
/** What a model can do, in one line. A model the catalog does not know has nothing to say. */
|
|
24
|
-
function factsLine(model, connect) {
|
|
25
|
-
const context = formatContext(model.contextWindow);
|
|
26
|
-
if (!model.name && !context) return connect === "local" ? "Loaded on the server" : "Not in the bundled catalog";
|
|
27
|
-
return [
|
|
28
|
-
context ? `${context} context` : null,
|
|
29
|
-
model.images ? "sees images" : "text only",
|
|
30
|
-
model.reasoning ? "reasoning" : null
|
|
31
|
-
].filter(Boolean).join(" · ");
|
|
32
|
-
}
|
|
33
|
-
/** What a model costs: the list price per million tokens, or who pays instead. */
|
|
34
|
-
function priceLine(model, connect) {
|
|
35
|
-
if (connect === "signin") return "Included in your plan";
|
|
36
|
-
if (connect === "local") return "Runs on your hardware";
|
|
37
|
-
if (!model.price) return "No list price";
|
|
38
|
-
return `${formatUsd(model.price.input)} in · ${formatUsd(model.price.output)} out`;
|
|
39
|
-
}
|
|
40
|
-
function usedByLine(usedBy) {
|
|
41
|
-
const parts = [...usedBy.templates.map((name) => `${name} template`), usedBy.agents === 1 ? "1 Agent" : usedBy.agents > 1 ? `${usedBy.agents} Agents` : null].filter(Boolean);
|
|
42
|
-
return parts.length > 0 ? parts.join(", ") : "Not used yet";
|
|
43
|
-
}
|
|
44
|
-
/** Whether a model matches what was typed: every word, in its name or id. */
|
|
45
|
-
function matchesModel(model, query) {
|
|
46
|
-
const haystack = `${model.name ?? ""} ${model.id}`.toLowerCase();
|
|
47
|
-
return query.toLowerCase().split(/\s+/).filter(Boolean).every((word) => haystack.includes(word));
|
|
48
|
-
}
|
|
49
|
-
/** "2 minutes ago", for something that happened at `at`. */
|
|
50
|
-
function ago(at, now) {
|
|
51
|
-
const seconds = Math.max(0, Math.round((now - at) / 1e3));
|
|
52
|
-
if (seconds < 45) return "just now";
|
|
53
|
-
const minutes = Math.round(seconds / 60);
|
|
54
|
-
if (minutes < 60) return minutes === 1 ? "1 minute ago" : `${minutes} minutes ago`;
|
|
55
|
-
const hours = Math.round(minutes / 60);
|
|
56
|
-
if (hours < 24) return hours === 1 ? "1 hour ago" : `${hours} hours ago`;
|
|
57
|
-
const days = Math.round(hours / 24);
|
|
58
|
-
if (days < 30) return days === 1 ? "yesterday" : `${days} days ago`;
|
|
59
|
-
return `on ${new Date(at).toISOString().slice(0, 10)}`;
|
|
60
|
-
}
|
|
61
|
-
var FAILURE_LABEL = {
|
|
62
|
-
credentials: "Key rejected",
|
|
63
|
-
unreachable: "Not answering",
|
|
64
|
-
model: "Model unavailable",
|
|
65
|
-
limit: "Limit reached",
|
|
66
|
-
other: "Failing"
|
|
67
|
-
};
|
|
68
|
-
/** A provider's state as a chip: a few words and how loud they are. */
|
|
69
|
-
function providerStatus(provider, now) {
|
|
70
|
-
switch (provider.state) {
|
|
71
|
-
case "working": return {
|
|
72
|
-
label: provider.check ? `Working · tested ${ago(provider.check.at, now)}` : "Working",
|
|
73
|
-
tone: "success"
|
|
74
|
-
};
|
|
75
|
-
case "failing": {
|
|
76
|
-
const kind = provider.check?.failure?.kind ?? "other";
|
|
77
|
-
const label = kind === "credentials" && provider.connect === "signin" ? "Sign-in rejected" : FAILURE_LABEL[kind];
|
|
78
|
-
return {
|
|
79
|
-
label: provider.check ? `${label} · tried ${ago(provider.check.at, now)}` : label,
|
|
80
|
-
tone: "warning"
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
case "incomplete": return {
|
|
84
|
-
label: provider.connect === "signin" ? "Not signed in" : provider.fields.some((field) => field.kind === "secret") ? "Needs a key" : "Needs credentials",
|
|
85
|
-
tone: "warning"
|
|
86
|
-
};
|
|
87
|
-
case "off": return {
|
|
88
|
-
label: provider.models.length === 0 ? "Saved, not in use" : "Turned off",
|
|
89
|
-
tone: "neutral"
|
|
90
|
-
};
|
|
91
|
-
default: return {
|
|
92
|
-
label: "Not tested yet",
|
|
93
|
-
tone: "neutral"
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
/** How a provider is connected, in a few words, for its row. */
|
|
98
|
-
function credentialLine(provider) {
|
|
99
|
-
if (provider.connect === "signin") return provider.configured ? "Signed in with your ChatGPT account" : "Not signed in";
|
|
100
|
-
if (provider.connect === "local") return provider.address ?? "A model server on this network";
|
|
101
|
-
const key = provider.fields.find((field) => field.kind === "secret" && field.set);
|
|
102
|
-
if (key) return `${key.label} ${key.preview ?? "saved"}`;
|
|
103
|
-
if (provider.configured) return "Credentials from the daemon’s environment";
|
|
104
|
-
return "No credentials saved";
|
|
105
|
-
}
|
|
106
|
-
/** The models to ask first: suggested ones, then the ones already in use. */
|
|
107
|
-
function initialPicks(models) {
|
|
108
|
-
const selected = models.filter((model) => model.selected).map((model) => model.id);
|
|
109
|
-
if (selected.length > 0) return selected;
|
|
110
|
-
return models.filter((model) => model.suggested).map((model) => model.id);
|
|
111
|
-
}
|
|
112
|
-
/** The cheapest of the given models by list price; unpriced ones come last, in order. */
|
|
113
|
-
function cheapest(models) {
|
|
114
|
-
const cost = (model) => model.price ? model.price.input + model.price.output : Number.POSITIVE_INFINITY;
|
|
115
|
-
return models.map((model, index) => ({
|
|
116
|
-
model,
|
|
117
|
-
index
|
|
118
|
-
})).sort((a, b) => cost(a.model) - cost(b.model) || a.index - b.index)[0]?.model;
|
|
119
|
-
}
|
|
120
|
-
//#endregion
|
|
121
|
-
//#region src/components/setup/parts.tsx
|
|
122
|
-
/** A provider's initial on a tile: no logos, they are other companies' marks. */
|
|
123
|
-
function ProviderAvatar({ name, tone = "neutral", className }) {
|
|
124
|
-
return /* @__PURE__ */ jsx("span", {
|
|
125
|
-
"aria-hidden": "true",
|
|
126
|
-
className: cn("flex size-9 shrink-0 items-center justify-center rounded-xl text-[0.95rem] font-bold", tone === "success" && "bg-success/10 text-success", tone === "warning" && "bg-warning/10 text-warning", tone === "accent" && "bg-accent text-accent-foreground", tone === "neutral" && "bg-muted text-muted-foreground", className),
|
|
127
|
-
children: name.replace(/[^\p{L}\p{N}]/gu, "").slice(0, 1) || "?"
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
var CHIP = {
|
|
131
|
-
success: "bg-success/10 text-success",
|
|
132
|
-
warning: "bg-warning/10 text-warning",
|
|
133
|
-
neutral: "bg-muted text-muted-foreground"
|
|
134
|
-
};
|
|
135
|
-
function Chip({ tone, children }) {
|
|
136
|
-
return /* @__PURE__ */ jsxs("span", {
|
|
137
|
-
className: cn("inline-flex min-h-7 items-center gap-1.5 rounded-full px-3 text-xs font-semibold", CHIP[tone]),
|
|
138
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
139
|
-
"aria-hidden": "true",
|
|
140
|
-
className: "size-1.5 shrink-0 rounded-full bg-current"
|
|
141
|
-
}), children]
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
/** What a provider is doing for Agents, as a chip. */
|
|
145
|
-
function StateChip({ provider, now }) {
|
|
146
|
-
const status = providerStatus(provider, now);
|
|
147
|
-
return /* @__PURE__ */ jsx(Chip, {
|
|
148
|
-
tone: status.tone,
|
|
149
|
-
children: status.label
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
/** A failed test: what happened, what to do, and the provider's own words one click away. */
|
|
153
|
-
function FailureBox({ failure, children }) {
|
|
154
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
155
|
-
role: "alert",
|
|
156
|
-
className: "rounded-2xl border border-warning/35 bg-warning/10 p-4 text-sm",
|
|
157
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
158
|
-
className: "flex items-start gap-3",
|
|
159
|
-
children: [/* @__PURE__ */ jsx(AlertTriangle, {
|
|
160
|
-
className: "mt-0.5 size-5 shrink-0 text-warning",
|
|
161
|
-
"aria-hidden": "true"
|
|
162
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
163
|
-
className: "min-w-0 flex-1",
|
|
164
|
-
children: [
|
|
165
|
-
/* @__PURE__ */ jsx("div", {
|
|
166
|
-
className: "font-semibold text-foreground",
|
|
167
|
-
children: failure.title
|
|
168
|
-
}),
|
|
169
|
-
/* @__PURE__ */ jsx("div", {
|
|
170
|
-
className: "mt-0.5 text-muted-foreground",
|
|
171
|
-
children: failure.hint
|
|
172
|
-
}),
|
|
173
|
-
failure.detail && /* @__PURE__ */ jsxs("details", {
|
|
174
|
-
className: "mt-2 text-xs text-muted-foreground",
|
|
175
|
-
children: [/* @__PURE__ */ jsx("summary", {
|
|
176
|
-
className: "cursor-pointer font-semibold",
|
|
177
|
-
children: "Details"
|
|
178
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
179
|
-
className: "mt-1 break-words font-mono",
|
|
180
|
-
children: failure.detail
|
|
181
|
-
})]
|
|
182
|
-
})
|
|
183
|
-
]
|
|
184
|
-
})]
|
|
185
|
-
}), children && /* @__PURE__ */ jsx("div", {
|
|
186
|
-
className: "mt-3 flex flex-wrap justify-end gap-2",
|
|
187
|
-
children
|
|
188
|
-
})]
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
/** A search box: the magnifier and the input are one field, with one focus ring. */
|
|
192
|
-
function SearchField({ label, placeholder, value, onChange, className }) {
|
|
193
|
-
return /* @__PURE__ */ jsxs("label", {
|
|
194
|
-
className: cn("m-0 flex min-w-0 items-center gap-2 rounded-xl border border-border bg-muted/40 px-3 transition-shadow focus-within:border-primary focus-within:bg-card focus-within:shadow-[0_0_0_3px_var(--color-sapphire-glow)]", className),
|
|
195
|
-
children: [/* @__PURE__ */ jsx(Search, {
|
|
196
|
-
className: "size-4 shrink-0 text-muted-foreground",
|
|
197
|
-
"aria-hidden": "true"
|
|
198
|
-
}), /* @__PURE__ */ jsx("input", {
|
|
199
|
-
type: "search",
|
|
200
|
-
"aria-label": label,
|
|
201
|
-
placeholder,
|
|
202
|
-
value,
|
|
203
|
-
onChange: (event) => onChange(event.target.value),
|
|
204
|
-
className: "min-h-10 border-0 bg-transparent px-0 shadow-none focus:bg-transparent focus:shadow-none",
|
|
205
|
-
style: { outline: "none" }
|
|
206
|
-
})]
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* One model in a list to tick: its name and id, what it can do, what it costs. On a narrow screen
|
|
211
|
-
* the facts sit under the name instead of beside it.
|
|
212
|
-
*/
|
|
213
|
-
function ModelRow({ model, connect, checked, disabled, onToggle, className }) {
|
|
214
|
-
return /* @__PURE__ */ jsxs("label", {
|
|
215
|
-
className: cn("m-0 grid cursor-pointer grid-cols-[auto_minmax(0,1fr)] items-center gap-x-3 gap-y-0.5 border-b border-border py-2.5 sm:grid-cols-[auto_minmax(0,1.5fr)_minmax(0,1.2fr)_9.5rem]", className),
|
|
216
|
-
children: [
|
|
217
|
-
/* @__PURE__ */ jsx("input", {
|
|
218
|
-
type: "checkbox",
|
|
219
|
-
checked,
|
|
220
|
-
disabled,
|
|
221
|
-
onChange: onToggle,
|
|
222
|
-
className: "m-0 size-[18px]"
|
|
223
|
-
}),
|
|
224
|
-
/* @__PURE__ */ jsxs("span", {
|
|
225
|
-
className: "min-w-0",
|
|
226
|
-
children: [
|
|
227
|
-
/* @__PURE__ */ jsx("span", {
|
|
228
|
-
className: "text-sm font-semibold text-foreground",
|
|
229
|
-
children: modelName(model)
|
|
230
|
-
}),
|
|
231
|
-
model.suggested && /* @__PURE__ */ jsx("span", {
|
|
232
|
-
className: "ml-2 rounded-full bg-accent px-2 py-0.5 text-[0.7rem] font-semibold text-accent-foreground",
|
|
233
|
-
children: "Suggested"
|
|
234
|
-
}),
|
|
235
|
-
model.name && /* @__PURE__ */ jsx("span", {
|
|
236
|
-
className: "block break-all font-mono text-[0.72rem] text-muted-foreground",
|
|
237
|
-
children: model.id
|
|
238
|
-
})
|
|
239
|
-
]
|
|
240
|
-
}),
|
|
241
|
-
/* @__PURE__ */ jsx("span", {
|
|
242
|
-
className: "col-start-2 text-xs text-muted-foreground sm:col-start-auto",
|
|
243
|
-
children: factsLine(model, connect)
|
|
244
|
-
}),
|
|
245
|
-
/* @__PURE__ */ jsx("span", {
|
|
246
|
-
className: "col-start-2 text-xs text-foreground sm:col-start-auto sm:text-right",
|
|
247
|
-
children: priceLine(model, connect)
|
|
248
|
-
})
|
|
249
|
-
]
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
/** A yes/no setting. */
|
|
253
|
-
function Switch({ checked, label, disabled = false, onChange }) {
|
|
254
|
-
return /* @__PURE__ */ jsx("button", {
|
|
255
|
-
type: "button",
|
|
256
|
-
role: "switch",
|
|
257
|
-
"aria-checked": checked,
|
|
258
|
-
"aria-label": label,
|
|
259
|
-
disabled,
|
|
260
|
-
onClick: () => onChange(!checked),
|
|
261
|
-
className: cn("relative h-7 w-[46px] shrink-0 rounded-full transition-colors disabled:opacity-50", checked ? "bg-primary" : "bg-fawn"),
|
|
262
|
-
children: /* @__PURE__ */ jsx("span", { className: cn("absolute top-[3px] size-[22px] rounded-full bg-white shadow transition-[left]", checked ? "left-[21px]" : "left-[3px]") })
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
/** Something is being waited for. */
|
|
266
|
-
function Waiting({ children }) {
|
|
267
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
268
|
-
role: "status",
|
|
269
|
-
className: "flex items-center gap-3 text-sm font-semibold text-foreground",
|
|
270
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
271
|
-
"aria-hidden": "true",
|
|
272
|
-
className: "flex size-5 shrink-0 items-center justify-center",
|
|
273
|
-
children: /* @__PURE__ */ jsx("span", { className: "size-2.5 animate-pulse rounded-full bg-primary" })
|
|
274
|
-
}), /* @__PURE__ */ jsx("span", { children })]
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
/** A card of the Models page: an icon, what it holds, an action, then its rows. */
|
|
278
|
-
function SetupCard({ icon, title, description, action, labelledBy, children }) {
|
|
279
|
-
return /* @__PURE__ */ jsxs("section", {
|
|
280
|
-
"aria-labelledby": labelledBy,
|
|
281
|
-
className: "min-w-0 overflow-hidden rounded-2xl border border-border bg-card shadow-baziu-sm",
|
|
282
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
283
|
-
className: "flex flex-wrap items-center gap-x-4 gap-y-3 px-4 py-4 sm:px-5",
|
|
284
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
285
|
-
className: "flex min-w-0 flex-1 basis-64 items-center gap-4",
|
|
286
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
287
|
-
"aria-hidden": "true",
|
|
288
|
-
className: "flex size-10 shrink-0 items-center justify-center rounded-xl bg-accent text-accent-foreground",
|
|
289
|
-
children: icon
|
|
290
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
291
|
-
className: "min-w-0",
|
|
292
|
-
children: [/* @__PURE__ */ jsx("h2", {
|
|
293
|
-
id: labelledBy,
|
|
294
|
-
className: "m-0 font-body text-[1.05rem] font-semibold text-foreground",
|
|
295
|
-
children: title
|
|
296
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
297
|
-
className: "text-sm text-muted-foreground",
|
|
298
|
-
children: description
|
|
299
|
-
})]
|
|
300
|
-
})]
|
|
301
|
-
}), action]
|
|
302
|
-
}), children]
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
//#endregion
|
|
8
|
+
import { ArrowLeft, Check, ChevronRight, Images, X } from "lucide-react";
|
|
306
9
|
//#region src/components/setup/ProviderConnect.tsx
|
|
307
10
|
/** Rows of a long catalog shown at once; typing narrows it down. */
|
|
308
11
|
var MAX_ROWS = 60;
|
|
@@ -907,4 +610,4 @@ function AddProviderDialog({ providers, imageRoutes, start, onClose, onConnected
|
|
|
907
610
|
});
|
|
908
611
|
}
|
|
909
612
|
//#endregion
|
|
910
|
-
export {
|
|
613
|
+
export { ProviderConnect as a, hostOf as i, ConnectedSummary as n, ProviderChooser as r, AddProviderDialog as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as PageHeader, o as PageShell } from "./createSsrRpc-
|
|
2
|
-
import { n as SectionTabs, t as CONFIG_TABS } from "./SectionTabs-
|
|
1
|
+
import { a as PageHeader, o as PageShell } from "./createSsrRpc-GCCF14VW.js";
|
|
2
|
+
import { n as SectionTabs, t as CONFIG_TABS } from "./SectionTabs-BGsrf-UQ.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/ConfigPage.tsx
|
|
5
5
|
function ConfigPage({ title, description, children, actions, size = "default" }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as DialogActions, t as Dialog } from "./Dialog-
|
|
1
|
+
import { T as errorMessage, u as Button } from "./workspace-DaitCM0t.js";
|
|
2
|
+
import { n as DialogActions, t as Dialog } from "./Dialog-aup_yJv5.js";
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/ConfirmDialog.tsx
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as api, T as errorMessage, d as AgentAvatar, g as useActivity, u as Button } from "./workspace-DaitCM0t.js";
|
|
2
2
|
import { a as endpointLabel, c as liveEdges, l as sameDocument, n as OUTSIDE, o as hasEdge, s as liveDocument, t as TeamPolicyMatrix, u as setEdge } from "./style-GYDODk2F.js";
|
|
3
|
-
import { r as useResource } from "./use-resource-
|
|
4
|
-
import { t as ConfirmDialog } from "./ConfirmDialog-
|
|
3
|
+
import { r as useResource } from "./use-resource-DVzK0toP.js";
|
|
4
|
+
import { t as ConfirmDialog } from "./ConfirmDialog-DfaJ--A6.js";
|
|
5
5
|
import { t as Segmented } from "./Segmented-3ZLdqa5U.js";
|
|
6
|
-
import { t as UnsavedChangesGuard } from "./UnsavedChangesGuard-
|
|
7
|
-
import { c as useWorkspace, i as STATE_DOT } from "./Rail-
|
|
8
|
-
import { i as pairKey, n as useTeamMessages, o as FocusFrame, t as TeamThread } from "./TeamThread-
|
|
6
|
+
import { t as UnsavedChangesGuard } from "./UnsavedChangesGuard-DrOvPV14.js";
|
|
7
|
+
import { c as useWorkspace, i as STATE_DOT } from "./Rail-BIC_4ptO.js";
|
|
8
|
+
import { i as pairKey, n as useTeamMessages, o as FocusFrame, t as TeamThread } from "./TeamThread-DuLlGDcw.js";
|
|
9
9
|
import { useEffect, useMemo, useState } from "react";
|
|
10
10
|
import { Link, useRouter } from "@tanstack/react-router";
|
|
11
11
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { t as cn } from "./utils-C_uf36nf.js";
|
|
2
|
+
import { c as menuGroups, l as modelName, s as menuFacts } from "./model-facts-mrfrWQne.js";
|
|
3
|
+
import { useId } from "react";
|
|
4
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Check, ChevronDown } from "lucide-react";
|
|
6
|
+
import { Select } from "radix-ui";
|
|
7
|
+
//#region src/components/ModelMenu.tsx
|
|
8
|
+
/** The Models overview, whose `chat` list the menu shows. */
|
|
9
|
+
var MODELS_PATH = "/api/config/models";
|
|
10
|
+
var INHERITED = ":inherited";
|
|
11
|
+
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";
|
|
12
|
+
function ModelMenu({ label, value, onChange, models, inherited, required }) {
|
|
13
|
+
const id = useId();
|
|
14
|
+
const find = (candidate) => models.find((model) => model.value === candidate);
|
|
15
|
+
const named = (candidate) => {
|
|
16
|
+
const model = find(candidate);
|
|
17
|
+
return model ? modelName(model) : candidate;
|
|
18
|
+
};
|
|
19
|
+
const chosen = find(value);
|
|
20
|
+
const unlisted = value !== "" && !chosen;
|
|
21
|
+
const groups = menuGroups(models);
|
|
22
|
+
const empty = models.length === 0 && !inherited;
|
|
23
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
24
|
+
className: "my-[0.6rem]",
|
|
25
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
26
|
+
id: `${id}-label`,
|
|
27
|
+
className: "block text-[0.9em] text-mocha",
|
|
28
|
+
children: label
|
|
29
|
+
}), /* @__PURE__ */ jsxs(Select.Root, {
|
|
30
|
+
value: value === "" ? inherited ? INHERITED : "" : value,
|
|
31
|
+
onValueChange: (next) => onChange(next === INHERITED ? "" : next),
|
|
32
|
+
required,
|
|
33
|
+
disabled: empty,
|
|
34
|
+
children: [/* @__PURE__ */ jsxs(Select.Trigger, {
|
|
35
|
+
"aria-labelledby": `${id}-label ${id}-value`,
|
|
36
|
+
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",
|
|
37
|
+
style: { outline: "none" },
|
|
38
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
39
|
+
id: `${id}-value`,
|
|
40
|
+
className: "min-w-0 flex-1 truncate",
|
|
41
|
+
children: value === "" ? inherited ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
42
|
+
inherited.model ? named(inherited.model) : inherited.label,
|
|
43
|
+
" ",
|
|
44
|
+
inherited.model && /* @__PURE__ */ jsx("span", {
|
|
45
|
+
className: "ml-1 text-[0.9em] text-mocha-light",
|
|
46
|
+
children: inherited.label.toLowerCase()
|
|
47
|
+
})
|
|
48
|
+
] }) : /* @__PURE__ */ jsx("span", {
|
|
49
|
+
className: "text-mocha-light",
|
|
50
|
+
children: empty ? "No chat model yet" : "Pick a model"
|
|
51
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
52
|
+
named(value),
|
|
53
|
+
" ",
|
|
54
|
+
/* @__PURE__ */ jsx("span", {
|
|
55
|
+
className: "ml-1 text-[0.9em] text-mocha-light",
|
|
56
|
+
children: chosen ? chosen.providerName : "not in Chat"
|
|
57
|
+
})
|
|
58
|
+
] })
|
|
59
|
+
}), /* @__PURE__ */ jsx(Select.Icon, {
|
|
60
|
+
asChild: true,
|
|
61
|
+
children: /* @__PURE__ */ jsx(ChevronDown, {
|
|
62
|
+
className: "size-4 shrink-0 text-mocha-light",
|
|
63
|
+
"aria-hidden": "true"
|
|
64
|
+
})
|
|
65
|
+
})]
|
|
66
|
+
}), /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsxs(Select.Content, {
|
|
67
|
+
position: "popper",
|
|
68
|
+
sideOffset: 6,
|
|
69
|
+
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",
|
|
70
|
+
children: [/* @__PURE__ */ jsxs(Select.Viewport, {
|
|
71
|
+
className: "p-1.5",
|
|
72
|
+
children: [
|
|
73
|
+
inherited && /* @__PURE__ */ jsx(Option, {
|
|
74
|
+
value: INHERITED,
|
|
75
|
+
name: inherited.label,
|
|
76
|
+
children: inherited.model ? named(inherited.model) : ""
|
|
77
|
+
}),
|
|
78
|
+
unlisted && /* @__PURE__ */ jsx(Option, {
|
|
79
|
+
value,
|
|
80
|
+
name: value,
|
|
81
|
+
mono: true,
|
|
82
|
+
children: "not in Chat"
|
|
83
|
+
}),
|
|
84
|
+
groups.map((group) => /* @__PURE__ */ jsxs(Select.Group, { children: [/* @__PURE__ */ jsxs(Select.Label, {
|
|
85
|
+
className: "flex items-baseline gap-2 px-3 pb-1 pt-2.5 text-[0.68rem] font-bold uppercase tracking-[0.08em] text-muted-foreground",
|
|
86
|
+
children: [group.name, group.trouble && /* @__PURE__ */ jsx("span", {
|
|
87
|
+
className: "font-semibold normal-case tracking-normal text-warning",
|
|
88
|
+
children: group.trouble
|
|
89
|
+
})]
|
|
90
|
+
}), group.models.map((model) => /* @__PURE__ */ jsx(Option, {
|
|
91
|
+
value: model.value,
|
|
92
|
+
name: modelName(model),
|
|
93
|
+
mono: !model.name,
|
|
94
|
+
children: menuFacts(model)
|
|
95
|
+
}, model.value))] }, group.provider)),
|
|
96
|
+
models.length === 0 && /* @__PURE__ */ jsx("p", {
|
|
97
|
+
className: "m-0 px-3 py-2 text-sm text-muted-foreground",
|
|
98
|
+
children: "No chat model is in use yet."
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
}), /* @__PURE__ */ jsx("a", {
|
|
102
|
+
href: "/config?pick=true",
|
|
103
|
+
className: "block border-t border-border px-4 py-2.5 text-sm font-semibold text-primary hover:bg-muted/50",
|
|
104
|
+
children: "Add models in Setup"
|
|
105
|
+
})]
|
|
106
|
+
}) })]
|
|
107
|
+
})]
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function Option({ value, name, mono = false, children }) {
|
|
111
|
+
return /* @__PURE__ */ jsxs(Select.Item, {
|
|
112
|
+
value,
|
|
113
|
+
className: ITEM,
|
|
114
|
+
style: { outline: "none" },
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ jsx(Select.ItemIndicator, {
|
|
117
|
+
className: "absolute left-2.5 top-1/2 -translate-y-1/2",
|
|
118
|
+
children: /* @__PURE__ */ jsx(Check, {
|
|
119
|
+
className: "size-4 text-primary",
|
|
120
|
+
"aria-hidden": "true"
|
|
121
|
+
})
|
|
122
|
+
}),
|
|
123
|
+
/* @__PURE__ */ jsx(Select.ItemText, {
|
|
124
|
+
asChild: true,
|
|
125
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
126
|
+
className: cn("min-w-0 flex-1 break-words", mono ? "font-mono text-[0.85em] font-medium" : "font-semibold"),
|
|
127
|
+
children: name
|
|
128
|
+
})
|
|
129
|
+
}),
|
|
130
|
+
children && /* @__PURE__ */ jsx("span", {
|
|
131
|
+
className: "shrink-0 text-xs text-muted-foreground",
|
|
132
|
+
children
|
|
133
|
+
})
|
|
134
|
+
]
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
export { ModelMenu as n, MODELS_PATH as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as api, T as errorMessage, d as AgentAvatar, g as useActivity, h as teamSummary, m as shortTime, u as Button } from "./workspace-DaitCM0t.js";
|
|
2
2
|
import { n as DEFAULT_TEAM_ID, t as DEFAULT_PROFILE_ID } from "./entities-Dn2xzKIw.js";
|
|
3
|
-
import { t as useHydrated } from "./use-resource-
|
|
4
|
-
import { n as DialogActions, t as Dialog$1 } from "./Dialog-
|
|
5
|
-
import { t as ConfirmDialog } from "./ConfirmDialog-
|
|
6
|
-
import { i as renameAgent, n as archiveAgent, t as SpawnDialog } from "./SpawnDialog-
|
|
7
|
-
import { t as TeamForm } from "./TeamForm-
|
|
3
|
+
import { t as useHydrated } from "./use-resource-DVzK0toP.js";
|
|
4
|
+
import { n as DialogActions, t as Dialog$1 } from "./Dialog-aup_yJv5.js";
|
|
5
|
+
import { t as ConfirmDialog } from "./ConfirmDialog-DfaJ--A6.js";
|
|
6
|
+
import { i as renameAgent, n as archiveAgent, t as SpawnDialog } from "./SpawnDialog-D_SMPCG_.js";
|
|
7
|
+
import { t as TeamForm } from "./TeamForm-ilBaeLI4.js";
|
|
8
8
|
import { createContext, useContext, useMemo, useRef, useState } from "react";
|
|
9
9
|
import { Link, useRouter } from "@tanstack/react-router";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -29,10 +29,10 @@ function SectionTabs({ label, base, tabs, children }) {
|
|
|
29
29
|
var TEMPLATE_TABS = [["/agents", "Agent templates"], ["/teams", "Team templates"]];
|
|
30
30
|
var CONFIG_TABS = [
|
|
31
31
|
["", "Models"],
|
|
32
|
-
["/
|
|
32
|
+
["/tools", "Tools"],
|
|
33
33
|
["/mcp", "MCP"],
|
|
34
|
-
["/
|
|
35
|
-
["/
|
|
34
|
+
["/telegram", "Telegram"],
|
|
35
|
+
["/access", "Access"],
|
|
36
36
|
["/system", "System"]
|
|
37
37
|
];
|
|
38
38
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as StatusBadge } from "./createSsrRpc-
|
|
1
|
+
import { l as StatusBadge } from "./createSsrRpc-GCCF14VW.js";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/SkillFindings.tsx
|
|
4
4
|
/** A skill's static-scan result: a "Clean" badge, or a finding count that expands to the list. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as api, T as errorMessage, u as Button } from "./workspace-DaitCM0t.js";
|
|
2
2
|
import "./entities-Dn2xzKIw.js";
|
|
3
|
-
import { n as DialogActions, t as Dialog } from "./Dialog-
|
|
4
|
-
import { n as
|
|
3
|
+
import { n as DialogActions, t as Dialog } from "./Dialog-aup_yJv5.js";
|
|
4
|
+
import { n as ModelMenu, t as MODELS_PATH } from "./ModelMenu-DUY9aHkE.js";
|
|
5
5
|
import { useEffect, useState } from "react";
|
|
6
6
|
import { useNavigate } from "@tanstack/react-router";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -30,14 +30,14 @@ function SpawnDialog({ profiles, teams, profileId: initialProfileId, teamId: ini
|
|
|
30
30
|
const [profileId, setProfileId] = useState(initialProfileId ?? profiles.find((profile) => profile.id === "default")?.id ?? profiles[0]?.id ?? "");
|
|
31
31
|
const [name, setName] = useState("");
|
|
32
32
|
const [model, setModel] = useState("");
|
|
33
|
-
const [
|
|
33
|
+
const [chatModels, setChatModels] = useState([]);
|
|
34
34
|
const [teamId, setTeamId] = useState(teams.find((team) => team.id === initialTeamId)?.id ?? teams.find((team) => team.id === "default")?.id ?? teams[0]?.id ?? "");
|
|
35
35
|
const [busy, setBusy] = useState(false);
|
|
36
36
|
const [error, setError] = useState(null);
|
|
37
37
|
const restricted = teams.find((team) => team.id === teamId)?.policyMode === "restricted";
|
|
38
38
|
useEffect(() => {
|
|
39
39
|
const controller = new AbortController();
|
|
40
|
-
api(
|
|
40
|
+
api(MODELS_PATH, { signal: controller.signal }).then((response) => setChatModels(response.chat)).catch(() => {});
|
|
41
41
|
return () => controller.abort();
|
|
42
42
|
}, []);
|
|
43
43
|
async function submit(event) {
|
|
@@ -83,12 +83,15 @@ function SpawnDialog({ profiles, teams, profileId: initialProfileId, teamId: ini
|
|
|
83
83
|
onChange: (event) => setName(event.target.value),
|
|
84
84
|
autoComplete: "off"
|
|
85
85
|
})] }),
|
|
86
|
-
/* @__PURE__ */ jsx(
|
|
86
|
+
/* @__PURE__ */ jsx(ModelMenu, {
|
|
87
87
|
label: "Model",
|
|
88
88
|
value: model,
|
|
89
89
|
onChange: setModel,
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
models: chatModels,
|
|
91
|
+
inherited: {
|
|
92
|
+
label: "The template’s model",
|
|
93
|
+
model: profiles.find((profile) => profile.id === profileId)?.defaultModel
|
|
94
|
+
}
|
|
92
95
|
}),
|
|
93
96
|
/* @__PURE__ */ jsxs("label", { children: ["Team", /* @__PURE__ */ jsx("select", {
|
|
94
97
|
value: teamId,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as api, T as errorMessage, u as Button } from "./workspace-DaitCM0t.js";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/TeamForm.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as useResource, t as useHydrated } from "./use-resource-
|
|
3
|
-
import { c as useWorkspace } from "./Rail-
|
|
1
|
+
import { C as api, d as AgentAvatar, g as useActivity, m as shortTime, t as FOCUS_VIEWS } from "./workspace-DaitCM0t.js";
|
|
2
|
+
import { r as useResource, t as useHydrated } from "./use-resource-DVzK0toP.js";
|
|
3
|
+
import { c as useWorkspace } from "./Rail-BIC_4ptO.js";
|
|
4
4
|
import { Link } from "@tanstack/react-router";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { ArrowLeft, ArrowRight, Code2, Images, Network } from "lucide-react";
|
package/dist/web/server/assets/{UnsavedChangesGuard-CyF2Z9p1.js → UnsavedChangesGuard-DrOvPV14.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ConfirmDialog } from "./ConfirmDialog-
|
|
1
|
+
import { t as ConfirmDialog } from "./ConfirmDialog-DfaJ--A6.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";
|