@agentuity/workbench 0.0.55 → 0.0.57
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/components/ui/button.d.ts +12 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +34 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +22 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +9 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +4 -6
- package/dist/components.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +6 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/styles.css +822 -0
- package/package.json +22 -8
- package/src/components/ui/button.tsx +53 -0
- package/src/components/ui/card.tsx +38 -0
- package/src/components/ui/input.tsx +23 -0
- package/src/components.tsx +28 -23
- package/src/index.ts +16 -0
- package/src/lib/utils.ts +6 -0
- package/src/styles.css +80 -0
- package/dist/app/workbench.d.ts +0 -8
- package/dist/app/workbench.d.ts.map +0 -1
- package/dist/app/workbench.js +0 -26
- package/dist/app/workbench.js.map +0 -1
- package/src/app/index.html +0 -12
- package/src/app/workbench.tsx +0 -36
package/package.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentuity/workbench",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.57",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"author": "Agentuity employees and contributors",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"main": "./
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
}
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./styles": "./dist/styles.css"
|
|
14
15
|
},
|
|
15
16
|
"files": [
|
|
16
17
|
"README.md",
|
|
@@ -19,17 +20,30 @@
|
|
|
19
20
|
],
|
|
20
21
|
"scripts": {
|
|
21
22
|
"clean": "rm -rf dist",
|
|
22
|
-
"build": "
|
|
23
|
+
"build": "bun run build:ts && bun run build:css",
|
|
24
|
+
"build:ts": "bunx tsc --build --force",
|
|
25
|
+
"build:css": "bun x tailwindcss -i ./src/styles.css -o ./dist/styles.css",
|
|
26
|
+
"dev": "bun run build && bun run dev:watch",
|
|
27
|
+
"dev:watch": "bunx tsc --watch",
|
|
23
28
|
"typecheck": "bunx tsc --noEmit",
|
|
24
29
|
"prepublishOnly": "bun run clean && bun run build"
|
|
25
30
|
},
|
|
26
31
|
"dependencies": {
|
|
27
|
-
"@agentuity/core": "0.0.
|
|
28
|
-
"@agentuity/react": "0.0.
|
|
32
|
+
"@agentuity/core": "0.0.57",
|
|
33
|
+
"@agentuity/react": "0.0.57",
|
|
34
|
+
"@radix-ui/react-label": "^2.1.7",
|
|
35
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
36
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
37
|
+
"class-variance-authority": "^0.7.1",
|
|
38
|
+
"clsx": "^2.1.1",
|
|
39
|
+
"lucide-react": "^0.545.0",
|
|
40
|
+
"tailwind-merge": "^3.3.1"
|
|
29
41
|
},
|
|
30
42
|
"devDependencies": {
|
|
43
|
+
"@tailwindcss/cli": "^4.1.17",
|
|
31
44
|
"@types/bun": "latest",
|
|
32
45
|
"bun-types": "latest",
|
|
46
|
+
"tailwindcss": "^4.1.11",
|
|
33
47
|
"typescript": "^5.9.0"
|
|
34
48
|
},
|
|
35
49
|
"peerDependencies": {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
2
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
|
|
6
|
+
const buttonVariants = cva(
|
|
7
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
12
|
+
destructive:
|
|
13
|
+
'bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
|
|
14
|
+
outline:
|
|
15
|
+
'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
|
|
16
|
+
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
17
|
+
ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
|
|
18
|
+
link: 'text-primary underline-offset-4 hover:underline',
|
|
19
|
+
},
|
|
20
|
+
size: {
|
|
21
|
+
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
|
|
22
|
+
sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
|
|
23
|
+
lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
|
|
24
|
+
icon: 'size-9',
|
|
25
|
+
'icon-sm': 'size-8',
|
|
26
|
+
'icon-lg': 'size-10',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: 'default',
|
|
31
|
+
size: 'default',
|
|
32
|
+
},
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
export type ButtonProps = React.ComponentProps<'button'> &
|
|
37
|
+
VariantProps<typeof buttonVariants> & {
|
|
38
|
+
asChild?: boolean;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
function Button({ className, variant, size, asChild = false, ...props }: ButtonProps) {
|
|
42
|
+
const Comp = asChild ? Slot : 'button';
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<Comp
|
|
46
|
+
data-slot="button"
|
|
47
|
+
className={cn(buttonVariants({ variant, size, className }))}
|
|
48
|
+
{...props}
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { cn } from '../../lib/utils';
|
|
3
|
+
|
|
4
|
+
function Card({ className, ...props }: React.ComponentProps<'div'>) {
|
|
5
|
+
return (
|
|
6
|
+
<div
|
|
7
|
+
className={cn('rounded-lg border bg-card text-card-foreground shadow-sm', className)}
|
|
8
|
+
{...props}
|
|
9
|
+
/>
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function CardHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
14
|
+
return <div className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function CardTitle({ className, ...props }: React.ComponentProps<'h3'>) {
|
|
18
|
+
return (
|
|
19
|
+
<h3
|
|
20
|
+
className={cn('text-2xl font-semibold leading-none tracking-tight', className)}
|
|
21
|
+
{...props}
|
|
22
|
+
/>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function CardDescription({ className, ...props }: React.ComponentProps<'p'>) {
|
|
27
|
+
return <p className={cn('text-sm text-muted-foreground', className)} {...props} />;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function CardContent({ className, ...props }: React.ComponentProps<'div'>) {
|
|
31
|
+
return <div className={cn('p-6 pt-0', className)} {...props} />;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function CardFooter({ className, ...props }: React.ComponentProps<'div'>) {
|
|
35
|
+
return <div className={cn('flex items-center p-6 pt-0', className)} {...props} />;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { cn } from '../../lib/utils';
|
|
3
|
+
|
|
4
|
+
export type InputProps = React.ComponentProps<'input'>;
|
|
5
|
+
|
|
6
|
+
const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
7
|
+
({ className, type, ...props }, ref) => {
|
|
8
|
+
return (
|
|
9
|
+
<input
|
|
10
|
+
type={type}
|
|
11
|
+
className={cn(
|
|
12
|
+
'flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
|
|
13
|
+
className
|
|
14
|
+
)}
|
|
15
|
+
ref={ref}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
Input.displayName = 'Input';
|
|
22
|
+
|
|
23
|
+
export { Input };
|
package/src/components.tsx
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import React, { useState, useContext } from 'react';
|
|
2
2
|
import { AgentuityContext } from '@agentuity/react';
|
|
3
3
|
import type { WorkbenchInstance } from './types';
|
|
4
|
+
import { Button } from './components/ui/button';
|
|
5
|
+
import {
|
|
6
|
+
Card,
|
|
7
|
+
CardContent,
|
|
8
|
+
CardDescription,
|
|
9
|
+
CardFooter,
|
|
10
|
+
CardHeader,
|
|
11
|
+
CardTitle,
|
|
12
|
+
} from './components/ui/card';
|
|
13
|
+
import { cn } from './lib/utils';
|
|
4
14
|
|
|
5
15
|
export interface WorkbenchProps {
|
|
6
16
|
workbench: WorkbenchInstance;
|
|
@@ -39,31 +49,26 @@ export function Workbench({ workbench, className }: WorkbenchProps) {
|
|
|
39
49
|
};
|
|
40
50
|
|
|
41
51
|
return (
|
|
42
|
-
<div className={
|
|
43
|
-
<
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
52
|
+
<div className={cn('p-8', className)}>
|
|
53
|
+
<Card>
|
|
54
|
+
<CardHeader>
|
|
55
|
+
<CardTitle>Workbench</CardTitle>
|
|
56
|
+
<CardDescription>Route: {workbench.config.route}</CardDescription>
|
|
57
|
+
</CardHeader>
|
|
47
58
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
59
|
+
<CardContent className="space-y-4">
|
|
60
|
+
<Button onClick={handleApiCall} disabled={status === 'loading'}>
|
|
61
|
+
{status === 'loading' ? 'Loading...' : 'Hit API'}
|
|
62
|
+
</Button>
|
|
63
|
+
</CardContent>
|
|
53
64
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
overflow: 'auto',
|
|
62
|
-
}}
|
|
63
|
-
>
|
|
64
|
-
{response ? JSON.stringify(response, null, 2) : 'No response yet'}
|
|
65
|
-
</pre>
|
|
66
|
-
</div>
|
|
65
|
+
<CardFooter className="flex-col items-start space-y-2">
|
|
66
|
+
<h4 className="font-semibold">Response:</h4>
|
|
67
|
+
<pre className="bg-muted p-4 rounded-md overflow-auto w-full text-sm">
|
|
68
|
+
{response ? JSON.stringify(response, null, 2) : 'No response yet'}
|
|
69
|
+
</pre>
|
|
70
|
+
</CardFooter>
|
|
71
|
+
</Card>
|
|
67
72
|
</div>
|
|
68
73
|
);
|
|
69
74
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
export { createWorkbench, Workbench } from './workbench';
|
|
2
2
|
export type { WorkbenchInstance } from './types';
|
|
3
|
+
|
|
4
|
+
// Export UI components
|
|
5
|
+
export { Button } from './components/ui/button';
|
|
6
|
+
export {
|
|
7
|
+
Card,
|
|
8
|
+
CardHeader,
|
|
9
|
+
CardTitle,
|
|
10
|
+
CardDescription,
|
|
11
|
+
CardContent,
|
|
12
|
+
CardFooter,
|
|
13
|
+
} from './components/ui/card';
|
|
14
|
+
export { Input } from './components/ui/input';
|
|
15
|
+
|
|
16
|
+
// Export utilities
|
|
17
|
+
export { cn } from './lib/utils';
|
|
18
|
+
|
|
3
19
|
// Re-export workbench config utilities from core
|
|
4
20
|
export {
|
|
5
21
|
encodeWorkbenchConfig,
|
package/src/lib/utils.ts
ADDED
package/src/styles.css
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
@import 'tailwindcss';
|
|
2
|
+
|
|
3
|
+
@custom-variant dark (&:is(.dark *));
|
|
4
|
+
|
|
5
|
+
@theme inline {
|
|
6
|
+
--color-background: var(--background);
|
|
7
|
+
--color-foreground: var(--foreground);
|
|
8
|
+
--color-ring: var(--ring);
|
|
9
|
+
--color-input: var(--input);
|
|
10
|
+
--color-border: var(--border);
|
|
11
|
+
--color-destructive: var(--destructive);
|
|
12
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
13
|
+
--color-accent: var(--accent);
|
|
14
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
15
|
+
--color-muted: var(--muted);
|
|
16
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
17
|
+
--color-secondary: var(--secondary);
|
|
18
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
19
|
+
--color-primary: var(--primary);
|
|
20
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
21
|
+
--color-popover: var(--popover);
|
|
22
|
+
--color-card-foreground: var(--card-foreground);
|
|
23
|
+
--color-card: var(--card);
|
|
24
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
25
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
26
|
+
--radius-lg: var(--radius);
|
|
27
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:root {
|
|
31
|
+
--radius: 0.625rem;
|
|
32
|
+
--background: oklch(1 0 0);
|
|
33
|
+
--foreground: oklch(0.145 0 0);
|
|
34
|
+
--card: oklch(1 0 0);
|
|
35
|
+
--card-foreground: oklch(0.145 0 0);
|
|
36
|
+
--popover: oklch(1 0 0);
|
|
37
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
38
|
+
--primary: oklch(0.205 0 0);
|
|
39
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
40
|
+
--secondary: oklch(0.97 0 0);
|
|
41
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
42
|
+
--muted: oklch(0.97 0 0);
|
|
43
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
44
|
+
--accent: oklch(0.97 0 0);
|
|
45
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
46
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
47
|
+
--border: oklch(0.922 0 0);
|
|
48
|
+
--input: oklch(0.922 0 0);
|
|
49
|
+
--ring: oklch(0.708 0 0);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.dark {
|
|
53
|
+
--background: oklch(0.145 0 0);
|
|
54
|
+
--foreground: oklch(0.985 0 0);
|
|
55
|
+
--card: oklch(0.205 0 0);
|
|
56
|
+
--card-foreground: oklch(0.985 0 0);
|
|
57
|
+
--popover: oklch(0.205 0 0);
|
|
58
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
59
|
+
--primary: oklch(0.922 0 0);
|
|
60
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
61
|
+
--secondary: oklch(0.269 0 0);
|
|
62
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
63
|
+
--muted: oklch(0.269 0 0);
|
|
64
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
65
|
+
--accent: oklch(0.269 0 0);
|
|
66
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
67
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
68
|
+
--border: oklch(1 0 0 / 10%);
|
|
69
|
+
--input: oklch(1 0 0 / 15%);
|
|
70
|
+
--ring: oklch(0.556 0 0);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@layer base {
|
|
74
|
+
* {
|
|
75
|
+
@apply border-border outline-ring/50;
|
|
76
|
+
}
|
|
77
|
+
body {
|
|
78
|
+
@apply bg-background text-foreground;
|
|
79
|
+
}
|
|
80
|
+
}
|
package/dist/app/workbench.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workbench.d.ts","sourceRoot":"","sources":["../../src/app/workbench.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
package/dist/app/workbench.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* This file is the entry point for the Workbench app, it sets up the root
|
|
4
|
-
* element and renders the Workbench component to the DOM.
|
|
5
|
-
*
|
|
6
|
-
* It is included in `src/app/index.html`.
|
|
7
|
-
*/
|
|
8
|
-
import { StrictMode } from 'react';
|
|
9
|
-
import { createRoot } from 'react-dom/client';
|
|
10
|
-
import { AgentuityContext } from '@agentuity/react';
|
|
11
|
-
import { Workbench } from '../components';
|
|
12
|
-
import { getWorkbenchConfig } from '@agentuity/core';
|
|
13
|
-
// Get workbench config from environment variable (set during build)
|
|
14
|
-
const workbenchConfig = getWorkbenchConfig();
|
|
15
|
-
const workbenchInstance = { config: workbenchConfig };
|
|
16
|
-
// Use the port from config to set the base URL
|
|
17
|
-
const baseUrl = `http://localhost:${workbenchConfig.port}`;
|
|
18
|
-
const elem = document.getElementById('workbench-root');
|
|
19
|
-
if (!elem) {
|
|
20
|
-
console.error('workbench-root element not found');
|
|
21
|
-
throw new Error('Failed to mount workbench: root element not found');
|
|
22
|
-
}
|
|
23
|
-
const app = (_jsx(StrictMode, { children: _jsxs(AgentuityContext.Provider, { value: { baseUrl }, children: [baseUrl, _jsx(Workbench, { workbench: workbenchInstance })] }) }));
|
|
24
|
-
// Simple rendering without hot module reloading for compatibility
|
|
25
|
-
createRoot(elem).render(app);
|
|
26
|
-
//# sourceMappingURL=workbench.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workbench.js","sourceRoot":"","sources":["../../src/app/workbench.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AAEH,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,oEAAoE;AACpE,MAAM,eAAe,GAAG,kBAAkB,EAAE,CAAC;AAC7C,MAAM,iBAAiB,GAAG,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;AAEtD,+CAA+C;AAC/C,MAAM,OAAO,GAAG,oBAAoB,eAAe,CAAC,IAAI,EAAE,CAAC;AAE3D,MAAM,IAAI,GAAG,QAAQ,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;AACvD,IAAI,CAAC,IAAI,EAAE,CAAC;IACX,OAAO,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;IAClD,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;AACtE,CAAC;AACD,MAAM,GAAG,GAAG,CACX,KAAC,UAAU,cACV,MAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,aAC3C,OAAO,EACR,KAAC,SAAS,IAAC,SAAS,EAAE,iBAAiB,GAAI,IAChB,GAChB,CACb,CAAC;AAEF,kEAAkE;AAClE,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC"}
|
package/src/app/index.html
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>Workbench</title>
|
|
7
|
-
<script type="module" src="./workbench.tsx" async></script>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div id="workbench-root"></div>
|
|
11
|
-
</body>
|
|
12
|
-
</html>
|
package/src/app/workbench.tsx
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is the entry point for the Workbench app, it sets up the root
|
|
3
|
-
* element and renders the Workbench component to the DOM.
|
|
4
|
-
*
|
|
5
|
-
* It is included in `src/app/index.html`.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import React, { StrictMode } from 'react';
|
|
9
|
-
import { createRoot } from 'react-dom/client';
|
|
10
|
-
import { AgentuityContext } from '@agentuity/react';
|
|
11
|
-
import { Workbench } from '../components';
|
|
12
|
-
import { getWorkbenchConfig } from '@agentuity/core';
|
|
13
|
-
|
|
14
|
-
// Get workbench config from environment variable (set during build)
|
|
15
|
-
const workbenchConfig = getWorkbenchConfig();
|
|
16
|
-
const workbenchInstance = { config: workbenchConfig };
|
|
17
|
-
|
|
18
|
-
// Use the port from config to set the base URL
|
|
19
|
-
const baseUrl = `http://localhost:${workbenchConfig.port}`;
|
|
20
|
-
|
|
21
|
-
const elem = document.getElementById('workbench-root');
|
|
22
|
-
if (!elem) {
|
|
23
|
-
console.error('workbench-root element not found');
|
|
24
|
-
throw new Error('Failed to mount workbench: root element not found');
|
|
25
|
-
}
|
|
26
|
-
const app = (
|
|
27
|
-
<StrictMode>
|
|
28
|
-
<AgentuityContext.Provider value={{ baseUrl }}>
|
|
29
|
-
{baseUrl}
|
|
30
|
-
<Workbench workbench={workbenchInstance} />
|
|
31
|
-
</AgentuityContext.Provider>
|
|
32
|
-
</StrictMode>
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
// Simple rendering without hot module reloading for compatibility
|
|
36
|
-
createRoot(elem).render(app);
|