@vertesia/tools-admin-ui 1.5.0-dev.20260910.052912Z → 1.6.0-dev.20260912.110338Z
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/lib/AdminApp.d.ts.map +1 -1
- package/lib/components/AdminLoadingPage.d.ts +5 -0
- package/lib/components/AdminLoadingPage.d.ts.map +1 -0
- package/lib/pages/ActivityCollection.d.ts.map +1 -1
- package/lib/pages/InteractionCollection.d.ts.map +1 -1
- package/lib/pages/InteractionDetail.d.ts.map +1 -1
- package/lib/pages/SkillCollection.d.ts.map +1 -1
- package/lib/pages/SkillDetail.d.ts.map +1 -1
- package/lib/pages/TemplateCollection.d.ts.map +1 -1
- package/lib/pages/TemplateDetail.d.ts.map +1 -1
- package/lib/pages/ToolCollection.d.ts.map +1 -1
- package/lib/pages/TypeCollection.d.ts.map +1 -1
- package/lib/pages/TypeDetail.d.ts.map +1 -1
- package/lib/tools-admin-ui.js +47 -65
- package/lib/tools-admin-ui.js.map +1 -1
- package/package.json +14 -14
- package/src/AdminApp.tsx +6 -9
- package/src/components/AdminLoadingPage.tsx +12 -0
- package/src/components/DetailPage.tsx +2 -2
- package/src/components/EndpointPanel.tsx +1 -1
- package/src/components/HeroSection.tsx +2 -2
- package/src/pages/ActivityCollection.tsx +5 -10
- package/src/pages/InteractionCollection.tsx +3 -7
- package/src/pages/InteractionDetail.tsx +5 -9
- package/src/pages/SkillCollection.tsx +3 -8
- package/src/pages/SkillDetail.tsx +5 -10
- package/src/pages/TemplateCollection.tsx +3 -8
- package/src/pages/TemplateDetail.tsx +4 -9
- package/src/pages/ToolCollection.tsx +4 -9
- package/src/pages/TypeCollection.tsx +3 -8
- package/src/pages/TypeDetail.tsx +5 -10
package/lib/AdminApp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminApp.d.ts","sourceRoot":"","sources":["../src/AdminApp.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AdminApp.d.ts","sourceRoot":"","sources":["../src/AdminApp.tsx"],"names":[],"mappings":"AAgCA,MAAM,WAAW,aAAa;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EAAE,OAAgB,EAAE,EAAE,aAAa,sCA0C3D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdminLoadingPage.d.ts","sourceRoot":"","sources":["../../src/components/AdminLoadingPage.tsx"],"names":[],"mappings":"AAEA,kGAAkG;AAClG,wBAAgB,gBAAgB,CAAC,EAAE,QAAgB,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,+BAQ5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityCollection.d.ts","sourceRoot":"","sources":["../../src/pages/ActivityCollection.tsx"],"names":[],"mappings":"AAcA,wBAAgB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ActivityCollection.d.ts","sourceRoot":"","sources":["../../src/pages/ActivityCollection.tsx"],"names":[],"mappings":"AAcA,wBAAgB,kBAAkB,gCAiEjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InteractionCollection.d.ts","sourceRoot":"","sources":["../../src/pages/InteractionCollection.tsx"],"names":[],"mappings":"AAQA,wBAAgB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"InteractionCollection.d.ts","sourceRoot":"","sources":["../../src/pages/InteractionCollection.tsx"],"names":[],"mappings":"AAQA,wBAAgB,qBAAqB,gCAyDpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InteractionDetail.d.ts","sourceRoot":"","sources":["../../src/pages/InteractionDetail.tsx"],"names":[],"mappings":"AAWA,wBAAgB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"InteractionDetail.d.ts","sourceRoot":"","sources":["../../src/pages/InteractionDetail.tsx"],"names":[],"mappings":"AAWA,wBAAgB,iBAAiB,gCA0FhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkillCollection.d.ts","sourceRoot":"","sources":["../../src/pages/SkillCollection.tsx"],"names":[],"mappings":"AAmCA,wBAAgB,eAAe,
|
|
1
|
+
{"version":3,"file":"SkillCollection.d.ts","sourceRoot":"","sources":["../../src/pages/SkillCollection.tsx"],"names":[],"mappings":"AAmCA,wBAAgB,eAAe,gCAuF9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkillDetail.d.ts","sourceRoot":"","sources":["../../src/pages/SkillDetail.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,WAAW,
|
|
1
|
+
{"version":3,"file":"SkillDetail.d.ts","sourceRoot":"","sources":["../../src/pages/SkillDetail.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,WAAW,gCAkG1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateCollection.d.ts","sourceRoot":"","sources":["../../src/pages/TemplateCollection.tsx"],"names":[],"mappings":"AAQA,wBAAgB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"TemplateCollection.d.ts","sourceRoot":"","sources":["../../src/pages/TemplateCollection.tsx"],"names":[],"mappings":"AAQA,wBAAgB,kBAAkB,gCAqDjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateDetail.d.ts","sourceRoot":"","sources":["../../src/pages/TemplateDetail.tsx"],"names":[],"mappings":"AAgBA,wBAAgB,cAAc,
|
|
1
|
+
{"version":3,"file":"TemplateDetail.d.ts","sourceRoot":"","sources":["../../src/pages/TemplateDetail.tsx"],"names":[],"mappings":"AAgBA,wBAAgB,cAAc,gCAqD7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolCollection.d.ts","sourceRoot":"","sources":["../../src/pages/ToolCollection.tsx"],"names":[],"mappings":"AAmBA,wBAAgB,cAAc,
|
|
1
|
+
{"version":3,"file":"ToolCollection.d.ts","sourceRoot":"","sources":["../../src/pages/ToolCollection.tsx"],"names":[],"mappings":"AAmBA,wBAAgB,cAAc,gCA+C7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeCollection.d.ts","sourceRoot":"","sources":["../../src/pages/TypeCollection.tsx"],"names":[],"mappings":"AAQA,wBAAgB,cAAc,
|
|
1
|
+
{"version":3,"file":"TypeCollection.d.ts","sourceRoot":"","sources":["../../src/pages/TypeCollection.tsx"],"names":[],"mappings":"AAQA,wBAAgB,cAAc,gCA6D7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeDetail.d.ts","sourceRoot":"","sources":["../../src/pages/TypeDetail.tsx"],"names":[],"mappings":"AAOA,wBAAgB,UAAU,
|
|
1
|
+
{"version":3,"file":"TypeDetail.d.ts","sourceRoot":"","sources":["../../src/pages/TypeDetail.tsx"],"names":[],"mappings":"AAOA,wBAAgB,UAAU,gCAsDzB"}
|
package/lib/tools-admin-ui.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Avatar, Badge, Button, Card, CardContent, DotBadge, Input, ModeToggle, Separator, Spinner, useFetch } from "@vertesia/ui/core";
|
|
2
1
|
import { NavLink, NestedRouterProvider, RouteComponent, useParams } from "@vertesia/ui/router";
|
|
3
2
|
import { createContext, useContext, useMemo, useState } from "react";
|
|
3
|
+
import { BrandedLoadingIndicator } from "@vertesia/ui/shell";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Avatar, Badge, Button, Card, CardContent, DotBadge, Input, ModeToggle, Separator, useFetch } from "@vertesia/ui/core";
|
|
4
6
|
import { useUserSession } from "@vertesia/ui/session";
|
|
5
7
|
import { ArrowLeft, Check, Copy, Download, LayoutDashboard, LogOut } from "lucide-react";
|
|
6
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
//#region src/AdminContext.ts
|
|
8
9
|
var AdminContext = createContext(void 0);
|
|
9
10
|
function useAdminContext() {
|
|
@@ -12,6 +13,15 @@ function useAdminContext() {
|
|
|
12
13
|
return ctx;
|
|
13
14
|
}
|
|
14
15
|
//#endregion
|
|
16
|
+
//#region src/components/AdminLoadingPage.tsx
|
|
17
|
+
/** Shared placeholder for startup and resource-page loads; inherits the host shell's branding. */
|
|
18
|
+
function AdminLoadingPage({ fullPage = false }) {
|
|
19
|
+
return /* @__PURE__ */ jsx("div", {
|
|
20
|
+
className: `flex flex-1 items-center justify-center bg-background text-foreground ${fullPage ? "min-h-dvh" : "min-h-64"}`,
|
|
21
|
+
children: /* @__PURE__ */ jsx(BrandedLoadingIndicator, { delayMs: 200 })
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
15
25
|
//#region src/components/AdminTopBar.tsx
|
|
16
26
|
function AdminTopBar({ title }) {
|
|
17
27
|
const { user, logout } = useUserSession();
|
|
@@ -254,11 +264,11 @@ function DetailPage({ type, title, description, tags, backHref = "/", children }
|
|
|
254
264
|
className: "mb-5 flex items-center gap-4",
|
|
255
265
|
children: [backHref !== "/" && /* @__PURE__ */ jsx(NavLink, {
|
|
256
266
|
href: "/",
|
|
257
|
-
className: "text-sm text-
|
|
267
|
+
className: "text-sm text-info hover:opacity-75",
|
|
258
268
|
children: "Home"
|
|
259
269
|
}), /* @__PURE__ */ jsxs(NavLink, {
|
|
260
270
|
href: backHref,
|
|
261
|
-
className: "flex items-center gap-1 text-sm text-
|
|
271
|
+
className: "flex items-center gap-1 text-sm text-info hover:opacity-75",
|
|
262
272
|
children: [/* @__PURE__ */ jsx(ArrowLeft, { className: "size-3.5" }), "Back"]
|
|
263
273
|
})]
|
|
264
274
|
}),
|
|
@@ -307,10 +317,7 @@ function ActivityCollection() {
|
|
|
307
317
|
"”."
|
|
308
318
|
]
|
|
309
319
|
});
|
|
310
|
-
if (!data) return /* @__PURE__ */ jsx(
|
|
311
|
-
className: "flex h-64 items-center justify-center text-muted",
|
|
312
|
-
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
313
|
-
});
|
|
320
|
+
if (!data) return /* @__PURE__ */ jsx(AdminLoadingPage, {});
|
|
314
321
|
return /* @__PURE__ */ jsx(DetailPage, {
|
|
315
322
|
type: "activity",
|
|
316
323
|
title: data.title || collection,
|
|
@@ -340,7 +347,7 @@ function ActivityCollection() {
|
|
|
340
347
|
className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted",
|
|
341
348
|
children: "Input Schema"
|
|
342
349
|
}), /* @__PURE__ */ jsx("pre", {
|
|
343
|
-
className: "whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
350
|
+
className: "whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground",
|
|
344
351
|
children: JSON.stringify(activity.input_schema, null, 2)
|
|
345
352
|
})]
|
|
346
353
|
}),
|
|
@@ -350,7 +357,7 @@ function ActivityCollection() {
|
|
|
350
357
|
className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted",
|
|
351
358
|
children: "Output Schema"
|
|
352
359
|
}), /* @__PURE__ */ jsx("pre", {
|
|
353
|
-
className: "whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
360
|
+
className: "whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground",
|
|
354
361
|
children: JSON.stringify(activity.output_schema, null, 2)
|
|
355
362
|
})]
|
|
356
363
|
})
|
|
@@ -362,8 +369,9 @@ function ActivityCollection() {
|
|
|
362
369
|
//#endregion
|
|
363
370
|
//#region src/components/CollectionCard.tsx
|
|
364
371
|
function CollectionCard({ collection }) {
|
|
372
|
+
const href = `/${collection.type === "activity" ? "activities" : `${collection.type}s`}/${collection.name}`;
|
|
365
373
|
return /* @__PURE__ */ jsx(NavLink, {
|
|
366
|
-
href
|
|
374
|
+
href,
|
|
367
375
|
className: "block no-underline",
|
|
368
376
|
children: /* @__PURE__ */ jsx(Card, {
|
|
369
377
|
className: "cursor-pointer transition-all hover:-translate-y-0.5 hover:shadow-md",
|
|
@@ -408,7 +416,7 @@ function EndpointPanel({ label, path }) {
|
|
|
408
416
|
return /* @__PURE__ */ jsxs("div", {
|
|
409
417
|
className: "mb-3",
|
|
410
418
|
children: [/* @__PURE__ */ jsx("div", {
|
|
411
|
-
className: "mb-1 text-[0.7rem] font-medium uppercase tracking-widest text-
|
|
419
|
+
className: "mb-1 text-[0.7rem] font-medium uppercase tracking-widest text-info",
|
|
412
420
|
children: label
|
|
413
421
|
}), /* @__PURE__ */ jsxs("div", {
|
|
414
422
|
className: "flex items-center gap-2 rounded-lg border border-border bg-muted-background px-3 py-2",
|
|
@@ -482,7 +490,7 @@ var badgeLabels = [
|
|
|
482
490
|
function HeroSection({ title, version, resources }) {
|
|
483
491
|
const counts = countByType(resources);
|
|
484
492
|
return /* @__PURE__ */ jsx(Card, {
|
|
485
|
-
className: "mb-10 overflow-hidden border bg-linear-to-br from-card to-muted
|
|
493
|
+
className: "mb-10 overflow-hidden border bg-linear-to-br from-card to-muted",
|
|
486
494
|
children: /* @__PURE__ */ jsxs("div", {
|
|
487
495
|
className: "flex flex-col gap-6 p-6 md:flex-row md:items-start md:justify-between",
|
|
488
496
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -522,7 +530,7 @@ function HeroSection({ title, version, resources }) {
|
|
|
522
530
|
children: [/* @__PURE__ */ jsx(LayoutDashboard, { className: "size-4" }), "UI Plugin Dev"]
|
|
523
531
|
}), /* @__PURE__ */ jsxs("a", {
|
|
524
532
|
href: "/lib/plugin.js",
|
|
525
|
-
className: "inline-flex h-8 items-center gap-2 rounded bg-
|
|
533
|
+
className: "inline-flex h-8 items-center gap-2 rounded bg-info px-3 text-xs font-medium text-info shadow-xs hover:bg-info dark:bg-info dark:hover:bg-info",
|
|
526
534
|
children: [/* @__PURE__ */ jsx(Download, { className: "size-4" }), "Plugin Bundle"]
|
|
527
535
|
})]
|
|
528
536
|
})
|
|
@@ -792,10 +800,7 @@ function InteractionCollection() {
|
|
|
792
800
|
"”."
|
|
793
801
|
]
|
|
794
802
|
});
|
|
795
|
-
if (!interactions) return /* @__PURE__ */ jsx(
|
|
796
|
-
className: "flex h-64 items-center justify-center text-muted",
|
|
797
|
-
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
798
|
-
});
|
|
803
|
+
if (!interactions) return /* @__PURE__ */ jsx(AdminLoadingPage, {});
|
|
799
804
|
return /* @__PURE__ */ jsx(DetailPage, {
|
|
800
805
|
type: "interaction",
|
|
801
806
|
title: collection,
|
|
@@ -857,10 +862,7 @@ function InteractionDetail() {
|
|
|
857
862
|
"”."
|
|
858
863
|
]
|
|
859
864
|
});
|
|
860
|
-
if (!interaction) return /* @__PURE__ */ jsx(
|
|
861
|
-
className: "flex h-64 items-center justify-center text-muted",
|
|
862
|
-
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
863
|
-
});
|
|
865
|
+
if (!interaction) return /* @__PURE__ */ jsx(AdminLoadingPage, {});
|
|
864
866
|
const { agent_runner_options } = interaction;
|
|
865
867
|
const hasAgentFlags = agent_runner_options && (agent_runner_options.is_agent || agent_runner_options.is_tool || agent_runner_options.is_skill);
|
|
866
868
|
return /* @__PURE__ */ jsxs(DetailPage, {
|
|
@@ -889,7 +891,7 @@ function InteractionDetail() {
|
|
|
889
891
|
children: prompt.name
|
|
890
892
|
})]
|
|
891
893
|
}), /* @__PURE__ */ jsx("pre", {
|
|
892
|
-
className: "whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
894
|
+
className: "whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground",
|
|
893
895
|
children: prompt.content
|
|
894
896
|
})]
|
|
895
897
|
})
|
|
@@ -901,7 +903,7 @@ function InteractionDetail() {
|
|
|
901
903
|
className: "mb-3 text-lg font-semibold text-foreground",
|
|
902
904
|
children: "Result Schema"
|
|
903
905
|
}), /* @__PURE__ */ jsx("pre", {
|
|
904
|
-
className: "whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
906
|
+
className: "whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground",
|
|
905
907
|
children: JSON.stringify(interaction.result_schema, null, 2)
|
|
906
908
|
})]
|
|
907
909
|
}),
|
|
@@ -960,10 +962,7 @@ function SkillCollection() {
|
|
|
960
962
|
"”."
|
|
961
963
|
]
|
|
962
964
|
});
|
|
963
|
-
if (!data) return /* @__PURE__ */ jsx(
|
|
964
|
-
className: "flex h-64 items-center justify-center text-muted",
|
|
965
|
-
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
966
|
-
});
|
|
965
|
+
if (!data) return /* @__PURE__ */ jsx(AdminLoadingPage, {});
|
|
967
966
|
return /* @__PURE__ */ jsxs(DetailPage, {
|
|
968
967
|
type: "skill",
|
|
969
968
|
title: data.title || collection,
|
|
@@ -1046,10 +1045,7 @@ function SkillDetail() {
|
|
|
1046
1045
|
"”."
|
|
1047
1046
|
]
|
|
1048
1047
|
});
|
|
1049
|
-
if (!skill) return /* @__PURE__ */ jsx(
|
|
1050
|
-
className: "flex h-64 items-center justify-center text-muted",
|
|
1051
|
-
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
1052
|
-
});
|
|
1048
|
+
if (!skill) return /* @__PURE__ */ jsx(AdminLoadingPage, {});
|
|
1053
1049
|
return /* @__PURE__ */ jsxs(DetailPage, {
|
|
1054
1050
|
type: "skill",
|
|
1055
1051
|
title: skill.title || skill.name,
|
|
@@ -1120,7 +1116,7 @@ function SkillDetail() {
|
|
|
1120
1116
|
children: "JST template"
|
|
1121
1117
|
})]
|
|
1122
1118
|
}), /* @__PURE__ */ jsx("pre", {
|
|
1123
|
-
className: "whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
1119
|
+
className: "whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground",
|
|
1124
1120
|
children: skill.instructions
|
|
1125
1121
|
})]
|
|
1126
1122
|
}),
|
|
@@ -1130,7 +1126,7 @@ function SkillDetail() {
|
|
|
1130
1126
|
className: "mb-3 text-lg font-semibold text-foreground",
|
|
1131
1127
|
children: "Input Schema"
|
|
1132
1128
|
}), /* @__PURE__ */ jsx("pre", {
|
|
1133
|
-
className: "whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
1129
|
+
className: "whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground",
|
|
1134
1130
|
children: JSON.stringify(skill.input_schema, null, 2)
|
|
1135
1131
|
})]
|
|
1136
1132
|
})
|
|
@@ -1154,10 +1150,7 @@ function TemplateCollection() {
|
|
|
1154
1150
|
"”."
|
|
1155
1151
|
]
|
|
1156
1152
|
});
|
|
1157
|
-
if (!templates) return /* @__PURE__ */ jsx(
|
|
1158
|
-
className: "flex h-64 items-center justify-center text-muted",
|
|
1159
|
-
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
1160
|
-
});
|
|
1153
|
+
if (!templates) return /* @__PURE__ */ jsx(AdminLoadingPage, {});
|
|
1161
1154
|
return /* @__PURE__ */ jsx(DetailPage, {
|
|
1162
1155
|
type: "template",
|
|
1163
1156
|
title: collection,
|
|
@@ -1221,10 +1214,7 @@ function TemplateDetail() {
|
|
|
1221
1214
|
"”."
|
|
1222
1215
|
]
|
|
1223
1216
|
});
|
|
1224
|
-
if (!template) return /* @__PURE__ */ jsx(
|
|
1225
|
-
className: "flex h-64 items-center justify-center text-muted",
|
|
1226
|
-
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
1227
|
-
});
|
|
1217
|
+
if (!template) return /* @__PURE__ */ jsx(AdminLoadingPage, {});
|
|
1228
1218
|
return /* @__PURE__ */ jsxs(DetailPage, {
|
|
1229
1219
|
type: "template",
|
|
1230
1220
|
title: template.title || template.name,
|
|
@@ -1261,7 +1251,7 @@ function TemplateDetail() {
|
|
|
1261
1251
|
className: "mb-3 text-lg font-semibold text-foreground",
|
|
1262
1252
|
children: "Instructions"
|
|
1263
1253
|
}), /* @__PURE__ */ jsx("pre", {
|
|
1264
|
-
className: "whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
1254
|
+
className: "whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground",
|
|
1265
1255
|
children: template.instructions
|
|
1266
1256
|
})]
|
|
1267
1257
|
})
|
|
@@ -1285,10 +1275,7 @@ function ToolCollection() {
|
|
|
1285
1275
|
"”."
|
|
1286
1276
|
]
|
|
1287
1277
|
});
|
|
1288
|
-
if (!data) return /* @__PURE__ */ jsx(
|
|
1289
|
-
className: "flex h-64 items-center justify-center text-muted",
|
|
1290
|
-
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
1291
|
-
});
|
|
1278
|
+
if (!data) return /* @__PURE__ */ jsx(AdminLoadingPage, {});
|
|
1292
1279
|
return /* @__PURE__ */ jsx(DetailPage, {
|
|
1293
1280
|
type: "tool",
|
|
1294
1281
|
title: data.title || collection,
|
|
@@ -1313,7 +1300,7 @@ function ToolCollection() {
|
|
|
1313
1300
|
children: tool.description || "No description"
|
|
1314
1301
|
}),
|
|
1315
1302
|
tool.input_schema && /* @__PURE__ */ jsx("pre", {
|
|
1316
|
-
className: "mt-3 whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
1303
|
+
className: "mt-3 whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground",
|
|
1317
1304
|
children: JSON.stringify(tool.input_schema, null, 2)
|
|
1318
1305
|
})
|
|
1319
1306
|
]
|
|
@@ -1338,10 +1325,7 @@ function TypeCollection() {
|
|
|
1338
1325
|
"”."
|
|
1339
1326
|
]
|
|
1340
1327
|
});
|
|
1341
|
-
if (!types) return /* @__PURE__ */ jsx(
|
|
1342
|
-
className: "flex h-64 items-center justify-center text-muted",
|
|
1343
|
-
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
1344
|
-
});
|
|
1328
|
+
if (!types) return /* @__PURE__ */ jsx(AdminLoadingPage, {});
|
|
1345
1329
|
return /* @__PURE__ */ jsx(DetailPage, {
|
|
1346
1330
|
type: "type",
|
|
1347
1331
|
title: collection,
|
|
@@ -1416,10 +1400,7 @@ function TypeDetail() {
|
|
|
1416
1400
|
"”."
|
|
1417
1401
|
]
|
|
1418
1402
|
});
|
|
1419
|
-
if (!typeDef) return /* @__PURE__ */ jsx(
|
|
1420
|
-
className: "flex h-64 items-center justify-center text-muted",
|
|
1421
|
-
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
1422
|
-
});
|
|
1403
|
+
if (!typeDef) return /* @__PURE__ */ jsx(AdminLoadingPage, {});
|
|
1423
1404
|
return /* @__PURE__ */ jsxs(DetailPage, {
|
|
1424
1405
|
type: "type",
|
|
1425
1406
|
title: typeDef.name,
|
|
@@ -1446,7 +1427,7 @@ function TypeDetail() {
|
|
|
1446
1427
|
className: "mb-3 text-lg font-semibold text-foreground",
|
|
1447
1428
|
children: "Object Schema"
|
|
1448
1429
|
}), /* @__PURE__ */ jsx("pre", {
|
|
1449
|
-
className: "whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
1430
|
+
className: "whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground",
|
|
1450
1431
|
children: JSON.stringify(typeDef.object_schema, null, 2)
|
|
1451
1432
|
})]
|
|
1452
1433
|
}),
|
|
@@ -1456,7 +1437,7 @@ function TypeDetail() {
|
|
|
1456
1437
|
className: "mb-3 text-lg font-semibold text-foreground",
|
|
1457
1438
|
children: "Table Layout"
|
|
1458
1439
|
}), /* @__PURE__ */ jsx("pre", {
|
|
1459
|
-
className: "whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
1440
|
+
className: "whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground",
|
|
1460
1441
|
children: JSON.stringify(typeDef.table_layout, null, 2)
|
|
1461
1442
|
})]
|
|
1462
1443
|
})
|
|
@@ -1522,18 +1503,16 @@ function AdminApp({ baseUrl = "/api" }) {
|
|
|
1522
1503
|
const { data: resourceData, isLoading: loadingData, error: dataError } = useResourceData(baseUrl, serverInfo?.endpoints?.mcp);
|
|
1523
1504
|
const isLoading = loadingInfo || loadingData;
|
|
1524
1505
|
const error = infoError || dataError;
|
|
1525
|
-
if (isLoading) return /* @__PURE__ */ jsx(
|
|
1526
|
-
className: "flex h-64 items-center justify-center text-muted",
|
|
1527
|
-
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
1528
|
-
});
|
|
1506
|
+
if (isLoading) return /* @__PURE__ */ jsx(AdminLoadingPage, { fullPage: true });
|
|
1529
1507
|
if (error) return /* @__PURE__ */ jsx("div", {
|
|
1530
1508
|
className: "p-6 text-destructive",
|
|
1531
1509
|
children: "Failed to load server info. Is the API running?"
|
|
1532
1510
|
});
|
|
1533
1511
|
if (!serverInfo || !resourceData) return null;
|
|
1512
|
+
const title = serverInfo.message.replace("Vertesia Tools API", "Tools Server");
|
|
1534
1513
|
return /* @__PURE__ */ jsxs("div", {
|
|
1535
|
-
className: "min-h-
|
|
1536
|
-
children: [/* @__PURE__ */ jsx(AdminTopBar, { title
|
|
1514
|
+
className: "flex min-h-dvh flex-col bg-background text-foreground",
|
|
1515
|
+
children: [/* @__PURE__ */ jsx(AdminTopBar, { title }), /* @__PURE__ */ jsx(AdminContext.Provider, {
|
|
1537
1516
|
value: {
|
|
1538
1517
|
serverInfo,
|
|
1539
1518
|
collections: resourceData.collections,
|
|
@@ -1542,7 +1521,10 @@ function AdminApp({ baseUrl = "/api" }) {
|
|
|
1542
1521
|
},
|
|
1543
1522
|
children: /* @__PURE__ */ jsx(NestedRouterProvider, {
|
|
1544
1523
|
routes,
|
|
1545
|
-
children: /* @__PURE__ */ jsx(
|
|
1524
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1525
|
+
className: "flex flex-1 flex-col",
|
|
1526
|
+
children: /* @__PURE__ */ jsx(RouteComponent, {})
|
|
1527
|
+
})
|
|
1546
1528
|
})
|
|
1547
1529
|
})]
|
|
1548
1530
|
});
|