@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/src/AdminApp.tsx
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Spinner } from '@vertesia/ui/core';
|
|
2
1
|
import type { Route } from '@vertesia/ui/router';
|
|
3
2
|
import { NestedRouterProvider, RouteComponent } from '@vertesia/ui/router';
|
|
4
|
-
|
|
5
3
|
import { AdminContext } from './AdminContext.js';
|
|
4
|
+
import { AdminLoadingPage } from './components/AdminLoadingPage.js';
|
|
6
5
|
import { AdminTopBar } from './components/AdminTopBar.js';
|
|
7
6
|
import { useResourceData, useServerInfo } from './hooks.js';
|
|
8
7
|
import { ActivityCollection } from './pages/ActivityCollection.js';
|
|
@@ -57,11 +56,7 @@ export function AdminApp({ baseUrl = '/api' }: AdminAppProps) {
|
|
|
57
56
|
const error = infoError || dataError;
|
|
58
57
|
|
|
59
58
|
if (isLoading) {
|
|
60
|
-
return
|
|
61
|
-
<div className="flex h-64 items-center justify-center text-muted">
|
|
62
|
-
<Spinner />
|
|
63
|
-
</div>
|
|
64
|
-
);
|
|
59
|
+
return <AdminLoadingPage fullPage />;
|
|
65
60
|
}
|
|
66
61
|
|
|
67
62
|
if (error) {
|
|
@@ -73,7 +68,7 @@ export function AdminApp({ baseUrl = '/api' }: AdminAppProps) {
|
|
|
73
68
|
const title = serverInfo.message.replace('Vertesia Tools API', 'Tools Server');
|
|
74
69
|
|
|
75
70
|
return (
|
|
76
|
-
<div className="min-h-
|
|
71
|
+
<div className="flex min-h-dvh flex-col bg-background text-foreground">
|
|
77
72
|
<AdminTopBar title={title} />
|
|
78
73
|
<AdminContext.Provider
|
|
79
74
|
value={{
|
|
@@ -84,7 +79,9 @@ export function AdminApp({ baseUrl = '/api' }: AdminAppProps) {
|
|
|
84
79
|
}}
|
|
85
80
|
>
|
|
86
81
|
<NestedRouterProvider routes={routes}>
|
|
87
|
-
<
|
|
82
|
+
<div className="flex flex-1 flex-col">
|
|
83
|
+
<RouteComponent />
|
|
84
|
+
</div>
|
|
88
85
|
</NestedRouterProvider>
|
|
89
86
|
</AdminContext.Provider>
|
|
90
87
|
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BrandedLoadingIndicator } from '@vertesia/ui/shell';
|
|
2
|
+
|
|
3
|
+
/** Shared placeholder for startup and resource-page loads; inherits the host shell's branding. */
|
|
4
|
+
export function AdminLoadingPage({ fullPage = false }: { fullPage?: boolean }) {
|
|
5
|
+
return (
|
|
6
|
+
<div
|
|
7
|
+
className={`flex flex-1 items-center justify-center bg-background text-foreground ${fullPage ? 'min-h-dvh' : 'min-h-64'}`}
|
|
8
|
+
>
|
|
9
|
+
<BrandedLoadingIndicator delayMs={200} />
|
|
10
|
+
</div>
|
|
11
|
+
);
|
|
12
|
+
}
|
|
@@ -20,11 +20,11 @@ export function DetailPage({ type, title, description, tags, backHref = '/', chi
|
|
|
20
20
|
<div className="mx-auto max-w-5xl px-7 py-10">
|
|
21
21
|
<nav className="mb-5 flex items-center gap-4">
|
|
22
22
|
{backHref !== '/' && (
|
|
23
|
-
<NavLink href="/" className="text-sm text-
|
|
23
|
+
<NavLink href="/" className="text-sm text-info hover:opacity-75">
|
|
24
24
|
Home
|
|
25
25
|
</NavLink>
|
|
26
26
|
)}
|
|
27
|
-
<NavLink href={backHref} className="flex items-center gap-1 text-sm text-
|
|
27
|
+
<NavLink href={backHref} className="flex items-center gap-1 text-sm text-info hover:opacity-75">
|
|
28
28
|
<ArrowLeft className="size-3.5" />
|
|
29
29
|
Back
|
|
30
30
|
</NavLink>
|
|
@@ -14,7 +14,7 @@ export function EndpointPanel({ label, path }: { label: string; path: string })
|
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
16
|
<div className="mb-3">
|
|
17
|
-
<div className="mb-1 text-[0.7rem] font-medium uppercase tracking-widest text-
|
|
17
|
+
<div className="mb-1 text-[0.7rem] font-medium uppercase tracking-widest text-info">{label}</div>
|
|
18
18
|
<div className="flex items-center gap-2 rounded-lg border border-border bg-muted-background px-3 py-2">
|
|
19
19
|
<code className="flex-1 font-mono text-sm text-foreground">{path}</code>
|
|
20
20
|
<Button variant="ghost" size="xs" onClick={handleCopy} aria-label="Copy full URL">
|
|
@@ -43,7 +43,7 @@ export function HeroSection({ title, version, resources }: HeroSectionProps) {
|
|
|
43
43
|
const counts = countByType(resources);
|
|
44
44
|
|
|
45
45
|
return (
|
|
46
|
-
<Card className="mb-10 overflow-hidden border bg-linear-to-br from-card to-muted
|
|
46
|
+
<Card className="mb-10 overflow-hidden border bg-linear-to-br from-card to-muted">
|
|
47
47
|
<div className="flex flex-col gap-6 p-6 md:flex-row md:items-start md:justify-between">
|
|
48
48
|
<div className="flex flex-1 flex-col gap-3">
|
|
49
49
|
<div className="flex items-center gap-4">
|
|
@@ -78,7 +78,7 @@ export function HeroSection({ title, version, resources }: HeroSectionProps) {
|
|
|
78
78
|
</a>
|
|
79
79
|
<a
|
|
80
80
|
href="/lib/plugin.js"
|
|
81
|
-
className="inline-flex h-8 items-center gap-2 rounded bg-
|
|
81
|
+
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"
|
|
82
82
|
>
|
|
83
83
|
<Download className="size-4" />
|
|
84
84
|
Plugin Bundle
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { RemoteActivityDefinition } from '@vertesia/common';
|
|
2
|
-
import { Card, CardContent,
|
|
2
|
+
import { Card, CardContent, useFetch } from '@vertesia/ui/core';
|
|
3
3
|
import { useParams } from '@vertesia/ui/router';
|
|
4
|
-
|
|
5
4
|
import { useAdminContext } from '../AdminContext.js';
|
|
5
|
+
import { AdminLoadingPage } from '../components/AdminLoadingPage.js';
|
|
6
6
|
import { DetailPage } from '../components/DetailPage.js';
|
|
7
7
|
import { TYPE_VARIANTS } from '../components/typeVariants.js';
|
|
8
8
|
|
|
@@ -29,12 +29,7 @@ export function ActivityCollection() {
|
|
|
29
29
|
return (
|
|
30
30
|
<div className="p-6 text-destructive">Failed to load activity collection “{collection}”.</div>
|
|
31
31
|
);
|
|
32
|
-
if (!data)
|
|
33
|
-
return (
|
|
34
|
-
<div className="flex h-64 items-center justify-center text-muted">
|
|
35
|
-
<Spinner />
|
|
36
|
-
</div>
|
|
37
|
-
);
|
|
32
|
+
if (!data) return <AdminLoadingPage />;
|
|
38
33
|
|
|
39
34
|
return (
|
|
40
35
|
<DetailPage
|
|
@@ -62,7 +57,7 @@ export function ActivityCollection() {
|
|
|
62
57
|
<p className="mb-1 text-xs font-semibold uppercase tracking-wide text-muted">
|
|
63
58
|
Input Schema
|
|
64
59
|
</p>
|
|
65
|
-
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
60
|
+
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground">
|
|
66
61
|
{JSON.stringify(activity.input_schema, null, 2)}
|
|
67
62
|
</pre>
|
|
68
63
|
</div>
|
|
@@ -72,7 +67,7 @@ export function ActivityCollection() {
|
|
|
72
67
|
<p className="mb-1 text-xs font-semibold uppercase tracking-wide text-muted">
|
|
73
68
|
Output Schema
|
|
74
69
|
</p>
|
|
75
|
-
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
70
|
+
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground">
|
|
76
71
|
{JSON.stringify(activity.output_schema, null, 2)}
|
|
77
72
|
</pre>
|
|
78
73
|
</div>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CatalogInteractionRef } from '@vertesia/common';
|
|
2
|
-
import { Badge, Card, CardContent,
|
|
2
|
+
import { Badge, Card, CardContent, useFetch } from '@vertesia/ui/core';
|
|
3
3
|
import { NavLink, useParams } from '@vertesia/ui/router';
|
|
4
|
-
|
|
5
4
|
import { useAdminContext } from '../AdminContext.js';
|
|
5
|
+
import { AdminLoadingPage } from '../components/AdminLoadingPage.js';
|
|
6
6
|
import { DetailPage } from '../components/DetailPage.js';
|
|
7
7
|
import { TYPE_VARIANTS } from '../components/typeVariants.js';
|
|
8
8
|
|
|
@@ -24,11 +24,7 @@ export function InteractionCollection() {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
if (!interactions) {
|
|
27
|
-
return
|
|
28
|
-
<div className="flex h-64 items-center justify-center text-muted">
|
|
29
|
-
<Spinner />
|
|
30
|
-
</div>
|
|
31
|
-
);
|
|
27
|
+
return <AdminLoadingPage />;
|
|
32
28
|
}
|
|
33
29
|
|
|
34
30
|
return (
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { InteractionSpec } from '@vertesia/common';
|
|
2
|
-
import { Badge, Card, CardContent,
|
|
2
|
+
import { Badge, Card, CardContent, useFetch } from '@vertesia/ui/core';
|
|
3
3
|
import { useParams } from '@vertesia/ui/router';
|
|
4
4
|
import { useUserSession } from '@vertesia/ui/session';
|
|
5
|
-
|
|
6
5
|
import { useAdminContext } from '../AdminContext.js';
|
|
6
|
+
import { AdminLoadingPage } from '../components/AdminLoadingPage.js';
|
|
7
7
|
import { DetailPage } from '../components/DetailPage.js';
|
|
8
8
|
import { ROLE_VARIANTS } from '../components/typeVariants.js';
|
|
9
9
|
|
|
@@ -39,11 +39,7 @@ export function InteractionDetail() {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
if (!interaction) {
|
|
42
|
-
return
|
|
43
|
-
<div className="flex h-64 items-center justify-center text-muted">
|
|
44
|
-
<Spinner />
|
|
45
|
-
</div>
|
|
46
|
-
);
|
|
42
|
+
return <AdminLoadingPage />;
|
|
47
43
|
}
|
|
48
44
|
|
|
49
45
|
const { agent_runner_options } = interaction;
|
|
@@ -73,7 +69,7 @@ export function InteractionDetail() {
|
|
|
73
69
|
</span>
|
|
74
70
|
{prompt.name && <span className="text-sm italic text-muted">{prompt.name}</span>}
|
|
75
71
|
</div>
|
|
76
|
-
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
72
|
+
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground">
|
|
77
73
|
{prompt.content}
|
|
78
74
|
</pre>
|
|
79
75
|
</CardContent>
|
|
@@ -85,7 +81,7 @@ export function InteractionDetail() {
|
|
|
85
81
|
{interaction.result_schema && (
|
|
86
82
|
<div className="mb-8">
|
|
87
83
|
<h2 className="mb-3 text-lg font-semibold text-foreground">Result Schema</h2>
|
|
88
|
-
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
84
|
+
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground">
|
|
89
85
|
{JSON.stringify(interaction.result_schema, null, 2)}
|
|
90
86
|
</pre>
|
|
91
87
|
</div>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Badge, Card, CardContent,
|
|
1
|
+
import { Badge, Card, CardContent, useFetch } from '@vertesia/ui/core';
|
|
2
2
|
import { NavLink, useParams } from '@vertesia/ui/router';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
|
-
|
|
5
4
|
import { useAdminContext } from '../AdminContext.js';
|
|
5
|
+
import { AdminLoadingPage } from '../components/AdminLoadingPage.js';
|
|
6
6
|
import { DetailPage } from '../components/DetailPage.js';
|
|
7
7
|
import { TYPE_VARIANTS } from '../components/typeVariants.js';
|
|
8
8
|
|
|
@@ -60,12 +60,7 @@ export function SkillCollection() {
|
|
|
60
60
|
|
|
61
61
|
if (error)
|
|
62
62
|
return <div className="p-6 text-destructive">Failed to load skill collection “{collection}”.</div>;
|
|
63
|
-
if (!data)
|
|
64
|
-
return (
|
|
65
|
-
<div className="flex h-64 items-center justify-center text-muted">
|
|
66
|
-
<Spinner />
|
|
67
|
-
</div>
|
|
68
|
-
);
|
|
63
|
+
if (!data) return <AdminLoadingPage />;
|
|
69
64
|
|
|
70
65
|
return (
|
|
71
66
|
<DetailPage
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Badge,
|
|
1
|
+
import { Badge, useFetch } from '@vertesia/ui/core';
|
|
2
2
|
import { useParams } from '@vertesia/ui/router';
|
|
3
|
-
|
|
4
3
|
import { useAdminContext } from '../AdminContext.js';
|
|
4
|
+
import { AdminLoadingPage } from '../components/AdminLoadingPage.js';
|
|
5
5
|
import { DetailPage } from '../components/DetailPage.js';
|
|
6
6
|
|
|
7
7
|
interface SkillDefinitionResponse {
|
|
@@ -36,12 +36,7 @@ export function SkillDetail() {
|
|
|
36
36
|
);
|
|
37
37
|
|
|
38
38
|
if (error) return <div className="p-6 text-destructive">Failed to load skill “{name}”.</div>;
|
|
39
|
-
if (!skill)
|
|
40
|
-
return (
|
|
41
|
-
<div className="flex h-64 items-center justify-center text-muted">
|
|
42
|
-
<Spinner />
|
|
43
|
-
</div>
|
|
44
|
-
);
|
|
39
|
+
if (!skill) return <AdminLoadingPage />;
|
|
45
40
|
|
|
46
41
|
return (
|
|
47
42
|
<DetailPage
|
|
@@ -108,7 +103,7 @@ export function SkillDetail() {
|
|
|
108
103
|
Instructions
|
|
109
104
|
{skill.content_type === 'jst' && <Badge className="ml-2">JST template</Badge>}
|
|
110
105
|
</h2>
|
|
111
|
-
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
106
|
+
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground">
|
|
112
107
|
{skill.instructions}
|
|
113
108
|
</pre>
|
|
114
109
|
</div>
|
|
@@ -116,7 +111,7 @@ export function SkillDetail() {
|
|
|
116
111
|
{skill.input_schema && (
|
|
117
112
|
<div className="mb-8">
|
|
118
113
|
<h2 className="mb-3 text-lg font-semibold text-foreground">Input Schema</h2>
|
|
119
|
-
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
114
|
+
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground">
|
|
120
115
|
{JSON.stringify(skill.input_schema, null, 2)}
|
|
121
116
|
</pre>
|
|
122
117
|
</div>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { RenderingTemplateDefinitionRef } from '@vertesia/common';
|
|
2
|
-
import { Badge, Card, CardContent,
|
|
2
|
+
import { Badge, Card, CardContent, useFetch } from '@vertesia/ui/core';
|
|
3
3
|
import { NavLink, useParams } from '@vertesia/ui/router';
|
|
4
|
-
|
|
5
4
|
import { useAdminContext } from '../AdminContext.js';
|
|
5
|
+
import { AdminLoadingPage } from '../components/AdminLoadingPage.js';
|
|
6
6
|
import { DetailPage } from '../components/DetailPage.js';
|
|
7
7
|
import { TYPE_VARIANTS } from '../components/typeVariants.js';
|
|
8
8
|
|
|
@@ -23,12 +23,7 @@ export function TemplateCollection() {
|
|
|
23
23
|
return (
|
|
24
24
|
<div className="p-6 text-destructive">Failed to load template collection “{collection}”.</div>
|
|
25
25
|
);
|
|
26
|
-
if (!templates)
|
|
27
|
-
return (
|
|
28
|
-
<div className="flex h-64 items-center justify-center text-muted">
|
|
29
|
-
<Spinner />
|
|
30
|
-
</div>
|
|
31
|
-
);
|
|
26
|
+
if (!templates) return <AdminLoadingPage />;
|
|
32
27
|
|
|
33
28
|
return (
|
|
34
29
|
<DetailPage
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Badge,
|
|
1
|
+
import { Badge, useFetch } from '@vertesia/ui/core';
|
|
2
2
|
import { useParams } from '@vertesia/ui/router';
|
|
3
|
-
|
|
4
3
|
import { useAdminContext } from '../AdminContext.js';
|
|
4
|
+
import { AdminLoadingPage } from '../components/AdminLoadingPage.js';
|
|
5
5
|
import { DetailPage } from '../components/DetailPage.js';
|
|
6
6
|
|
|
7
7
|
interface TemplateDefinitionResponse {
|
|
@@ -30,12 +30,7 @@ export function TemplateDetail() {
|
|
|
30
30
|
);
|
|
31
31
|
|
|
32
32
|
if (error) return <div className="p-6 text-destructive">Failed to load template “{name}”.</div>;
|
|
33
|
-
if (!template)
|
|
34
|
-
return (
|
|
35
|
-
<div className="flex h-64 items-center justify-center text-muted">
|
|
36
|
-
<Spinner />
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
33
|
+
if (!template) return <AdminLoadingPage />;
|
|
39
34
|
|
|
40
35
|
return (
|
|
41
36
|
<DetailPage
|
|
@@ -66,7 +61,7 @@ export function TemplateDetail() {
|
|
|
66
61
|
|
|
67
62
|
<div className="mb-8">
|
|
68
63
|
<h2 className="mb-3 text-lg font-semibold text-foreground">Instructions</h2>
|
|
69
|
-
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
64
|
+
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground">
|
|
70
65
|
{template.instructions}
|
|
71
66
|
</pre>
|
|
72
67
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Card, CardContent,
|
|
1
|
+
import { Card, CardContent, useFetch } from '@vertesia/ui/core';
|
|
2
2
|
import { useParams } from '@vertesia/ui/router';
|
|
3
|
-
|
|
4
3
|
import { useAdminContext } from '../AdminContext.js';
|
|
4
|
+
import { AdminLoadingPage } from '../components/AdminLoadingPage.js';
|
|
5
5
|
import { DetailPage } from '../components/DetailPage.js';
|
|
6
6
|
import { TYPE_VARIANTS } from '../components/typeVariants.js';
|
|
7
7
|
|
|
@@ -32,12 +32,7 @@ export function ToolCollection() {
|
|
|
32
32
|
|
|
33
33
|
if (error)
|
|
34
34
|
return <div className="p-6 text-destructive">Failed to load tool collection “{collection}”.</div>;
|
|
35
|
-
if (!data)
|
|
36
|
-
return (
|
|
37
|
-
<div className="flex h-64 items-center justify-center text-muted">
|
|
38
|
-
<Spinner />
|
|
39
|
-
</div>
|
|
40
|
-
);
|
|
35
|
+
if (!data) return <AdminLoadingPage />;
|
|
41
36
|
|
|
42
37
|
return (
|
|
43
38
|
<DetailPage
|
|
@@ -60,7 +55,7 @@ export function ToolCollection() {
|
|
|
60
55
|
</div>
|
|
61
56
|
<div className="text-sm text-muted">{tool.description || 'No description'}</div>
|
|
62
57
|
{tool.input_schema && (
|
|
63
|
-
<pre className="mt-3 whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
58
|
+
<pre className="mt-3 whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground">
|
|
64
59
|
{JSON.stringify(tool.input_schema, null, 2)}
|
|
65
60
|
</pre>
|
|
66
61
|
)}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { InCodeTypeDefinition } from '@vertesia/common';
|
|
2
|
-
import { Badge, Card, CardContent,
|
|
2
|
+
import { Badge, Card, CardContent, useFetch } from '@vertesia/ui/core';
|
|
3
3
|
import { NavLink, useParams } from '@vertesia/ui/router';
|
|
4
|
-
|
|
5
4
|
import { useAdminContext } from '../AdminContext.js';
|
|
5
|
+
import { AdminLoadingPage } from '../components/AdminLoadingPage.js';
|
|
6
6
|
import { DetailPage } from '../components/DetailPage.js';
|
|
7
7
|
import { TYPE_VARIANTS } from '../components/typeVariants.js';
|
|
8
8
|
|
|
@@ -21,12 +21,7 @@ export function TypeCollection() {
|
|
|
21
21
|
|
|
22
22
|
if (error)
|
|
23
23
|
return <div className="p-6 text-destructive">Failed to load type collection “{collection}”.</div>;
|
|
24
|
-
if (!types)
|
|
25
|
-
return (
|
|
26
|
-
<div className="flex h-64 items-center justify-center text-muted">
|
|
27
|
-
<Spinner />
|
|
28
|
-
</div>
|
|
29
|
-
);
|
|
24
|
+
if (!types) return <AdminLoadingPage />;
|
|
30
25
|
|
|
31
26
|
return (
|
|
32
27
|
<DetailPage
|
package/src/pages/TypeDetail.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { InCodeTypeDefinition } from '@vertesia/common';
|
|
2
|
-
import { Badge,
|
|
2
|
+
import { Badge, useFetch } from '@vertesia/ui/core';
|
|
3
3
|
import { useParams } from '@vertesia/ui/router';
|
|
4
|
-
|
|
5
4
|
import { useAdminContext } from '../AdminContext.js';
|
|
5
|
+
import { AdminLoadingPage } from '../components/AdminLoadingPage.js';
|
|
6
6
|
import { DetailPage } from '../components/DetailPage.js';
|
|
7
7
|
|
|
8
8
|
export function TypeDetail() {
|
|
@@ -21,12 +21,7 @@ export function TypeDetail() {
|
|
|
21
21
|
);
|
|
22
22
|
|
|
23
23
|
if (error) return <div className="p-6 text-destructive">Failed to load type “{name}”.</div>;
|
|
24
|
-
if (!typeDef)
|
|
25
|
-
return (
|
|
26
|
-
<div className="flex h-64 items-center justify-center text-muted">
|
|
27
|
-
<Spinner />
|
|
28
|
-
</div>
|
|
29
|
-
);
|
|
24
|
+
if (!typeDef) return <AdminLoadingPage />;
|
|
30
25
|
|
|
31
26
|
return (
|
|
32
27
|
<DetailPage
|
|
@@ -48,7 +43,7 @@ export function TypeDetail() {
|
|
|
48
43
|
{typeDef.object_schema && (
|
|
49
44
|
<div className="mb-8">
|
|
50
45
|
<h2 className="mb-3 text-lg font-semibold text-foreground">Object Schema</h2>
|
|
51
|
-
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
46
|
+
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground">
|
|
52
47
|
{JSON.stringify(typeDef.object_schema, null, 2)}
|
|
53
48
|
</pre>
|
|
54
49
|
</div>
|
|
@@ -57,7 +52,7 @@ export function TypeDetail() {
|
|
|
57
52
|
{typeDef.table_layout && typeDef.table_layout.length > 0 && (
|
|
58
53
|
<div className="mb-8">
|
|
59
54
|
<h2 className="mb-3 text-lg font-semibold text-foreground">Table Layout</h2>
|
|
60
|
-
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted
|
|
55
|
+
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted p-4 font-mono text-sm text-foreground">
|
|
61
56
|
{JSON.stringify(typeDef.table_layout, null, 2)}
|
|
62
57
|
</pre>
|
|
63
58
|
</div>
|