@agentuity/workbench 0.0.87 → 0.0.88
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/App.d.ts.map +1 -1
- package/dist/components/App.js +18 -2
- package/dist/components/App.js.map +1 -1
- package/dist/components/ai-elements/code-block.d.ts +3 -3
- package/dist/components/ai-elements/code-block.d.ts.map +1 -1
- package/dist/components/ai-elements/code-block.js +29 -7
- package/dist/components/ai-elements/code-block.js.map +1 -1
- package/dist/components/internal/Chat.d.ts +3 -2
- package/dist/components/internal/Chat.d.ts.map +1 -1
- package/dist/components/internal/Chat.js +23 -24
- package/dist/components/internal/Chat.js.map +1 -1
- package/dist/components/internal/MonacoJsonEditor.d.ts.map +1 -1
- package/dist/components/internal/MonacoJsonEditor.js +10 -53
- package/dist/components/internal/MonacoJsonEditor.js.map +1 -1
- package/dist/components/internal/Schema.d.ts +1 -2
- package/dist/components/internal/Schema.d.ts.map +1 -1
- package/dist/components/internal/Schema.js +2 -3
- package/dist/components/internal/Schema.js.map +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/input.js.map +1 -1
- package/dist/index.d.ts +3 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -6
- package/dist/index.js.map +1 -1
- package/dist/{styles.css → standalone.css} +207 -1537
- package/package.json +29 -29
- package/src/{styles.css → base.css} +36 -52
- package/src/components/App.tsx +41 -5
- package/src/components/ai-elements/code-block.tsx +42 -10
- package/src/components/internal/Chat.tsx +112 -120
- package/src/components/internal/MonacoJsonEditor.tsx +15 -63
- package/src/components/internal/Schema.tsx +74 -86
- package/src/components/ui/input.tsx +2 -3
- package/src/index.ts +5 -14
- package/src/integration.css +15 -0
- package/src/standalone.css +25 -0
- package/dist/components/ConnectionStatus.d.ts +0 -7
- package/dist/components/ConnectionStatus.d.ts.map +0 -1
- package/dist/components/ConnectionStatus.js +0 -52
- package/dist/components/ConnectionStatus.js.map +0 -1
- package/dist/components/Inline.d.ts +0 -10
- package/dist/components/Inline.d.ts.map +0 -1
- package/dist/components/Inline.js +0 -11
- package/dist/components/Inline.js.map +0 -1
- package/dist/components/ai-elements/artifact.d.ts +0 -24
- package/dist/components/ai-elements/artifact.d.ts.map +0 -1
- package/dist/components/ai-elements/artifact.js +0 -21
- package/dist/components/ai-elements/artifact.js.map +0 -1
- package/dist/components/ai-elements/branch.d.ts +0 -21
- package/dist/components/ai-elements/branch.d.ts.map +0 -1
- package/dist/components/ai-elements/branch.js +0 -71
- package/dist/components/ai-elements/branch.js.map +0 -1
- package/dist/components/ai-elements/canvas.d.ts +0 -9
- package/dist/components/ai-elements/canvas.d.ts.map +0 -1
- package/dist/components/ai-elements/canvas.js +0 -6
- package/dist/components/ai-elements/canvas.js.map +0 -1
- package/dist/components/ai-elements/chain-of-thought.d.ts +0 -30
- package/dist/components/ai-elements/chain-of-thought.d.ts.map +0 -1
- package/dist/components/ai-elements/chain-of-thought.js +0 -52
- package/dist/components/ai-elements/chain-of-thought.js.map +0 -1
- package/dist/components/ai-elements/confirmation.d.ts +0 -27
- package/dist/components/ai-elements/confirmation.d.ts.map +0 -1
- package/dist/components/ai-elements/confirmation.js +0 -57
- package/dist/components/ai-elements/confirmation.js.map +0 -1
- package/dist/components/ai-elements/connection.d.ts +0 -3
- package/dist/components/ai-elements/connection.d.ts.map +0 -1
- package/dist/components/ai-elements/connection.js +0 -4
- package/dist/components/ai-elements/connection.js.map +0 -1
- package/dist/components/ai-elements/context.d.ts +0 -33
- package/dist/components/ai-elements/context.d.ts.map +0 -1
- package/dist/components/ai-elements/context.js +0 -167
- package/dist/components/ai-elements/context.js.map +0 -1
- package/dist/components/ai-elements/controls.d.ts +0 -5
- package/dist/components/ai-elements/controls.d.ts.map +0 -1
- package/dist/components/ai-elements/controls.js +0 -6
- package/dist/components/ai-elements/controls.js.map +0 -1
- package/dist/components/ai-elements/edge.d.ts +0 -6
- package/dist/components/ai-elements/edge.d.ts.map +0 -1
- package/dist/components/ai-elements/edge.js +0 -83
- package/dist/components/ai-elements/edge.js.map +0 -1
- package/dist/components/ai-elements/image.d.ts +0 -7
- package/dist/components/ai-elements/image.d.ts.map +0 -1
- package/dist/components/ai-elements/image.js +0 -4
- package/dist/components/ai-elements/image.js.map +0 -1
- package/dist/components/ai-elements/inline-citation.d.ts +0 -39
- package/dist/components/ai-elements/inline-citation.d.ts.map +0 -1
- package/dist/components/ai-elements/inline-citation.js +0 -62
- package/dist/components/ai-elements/inline-citation.js.map +0 -1
- package/dist/components/ai-elements/loader.d.ts +0 -6
- package/dist/components/ai-elements/loader.d.ts.map +0 -1
- package/dist/components/ai-elements/loader.js +0 -5
- package/dist/components/ai-elements/loader.js.map +0 -1
- package/dist/components/ai-elements/node.d.ts +0 -22
- package/dist/components/ai-elements/node.d.ts.map +0 -1
- package/dist/components/ai-elements/node.js +0 -12
- package/dist/components/ai-elements/node.js.map +0 -1
- package/dist/components/ai-elements/open-in-chat.d.ts +0 -29
- package/dist/components/ai-elements/open-in-chat.d.ts.map +0 -1
- package/dist/components/ai-elements/open-in-chat.js +0 -97
- package/dist/components/ai-elements/open-in-chat.js.map +0 -1
- package/dist/components/ai-elements/panel.d.ts +0 -6
- package/dist/components/ai-elements/panel.d.ts.map +0 -1
- package/dist/components/ai-elements/panel.js +0 -5
- package/dist/components/ai-elements/panel.js.map +0 -1
- package/dist/components/ai-elements/plan.d.ts +0 -26
- package/dist/components/ai-elements/plan.d.ts.map +0 -1
- package/dist/components/ai-elements/plan.js +0 -32
- package/dist/components/ai-elements/plan.js.map +0 -1
- package/dist/components/ai-elements/queue.d.ts +0 -62
- package/dist/components/ai-elements/queue.d.ts.map +0 -1
- package/dist/components/ai-elements/queue.js +0 -25
- package/dist/components/ai-elements/queue.js.map +0 -1
- package/dist/components/ai-elements/reasoning.d.ts +0 -17
- package/dist/components/ai-elements/reasoning.d.ts.map +0 -1
- package/dist/components/ai-elements/reasoning.js +0 -77
- package/dist/components/ai-elements/reasoning.js.map +0 -1
- package/dist/components/ai-elements/response.d.ts +0 -6
- package/dist/components/ai-elements/response.d.ts.map +0 -1
- package/dist/components/ai-elements/response.js +0 -8
- package/dist/components/ai-elements/response.js.map +0 -1
- package/dist/components/ai-elements/sources.d.ts +0 -13
- package/dist/components/ai-elements/sources.d.ts.map +0 -1
- package/dist/components/ai-elements/sources.js +0 -10
- package/dist/components/ai-elements/sources.js.map +0 -1
- package/dist/components/ai-elements/suggestion.d.ts +0 -11
- package/dist/components/ai-elements/suggestion.d.ts.map +0 -1
- package/dist/components/ai-elements/suggestion.js +0 -13
- package/dist/components/ai-elements/suggestion.js.map +0 -1
- package/dist/components/ai-elements/task.d.ts +0 -15
- package/dist/components/ai-elements/task.d.ts.map +0 -1
- package/dist/components/ai-elements/task.js +0 -11
- package/dist/components/ai-elements/task.js.map +0 -1
- package/dist/components/ai-elements/tool.d.ts +0 -24
- package/dist/components/ai-elements/tool.d.ts.map +0 -1
- package/dist/components/ai-elements/tool.js +0 -47
- package/dist/components/ai-elements/tool.js.map +0 -1
- package/dist/components/ai-elements/toolbar.d.ts +0 -6
- package/dist/components/ai-elements/toolbar.d.ts.map +0 -1
- package/dist/components/ai-elements/toolbar.js +0 -5
- package/dist/components/ai-elements/toolbar.js.map +0 -1
- package/dist/components/ai-elements/web-preview.d.ts +0 -35
- package/dist/components/ai-elements/web-preview.d.ts.map +0 -1
- package/dist/components/ai-elements/web-preview.js +0 -63
- package/dist/components/ai-elements/web-preview.js.map +0 -1
- package/dist/components/ui/alert.d.ts +0 -10
- package/dist/components/ui/alert.d.ts.map +0 -1
- package/dist/components/ui/alert.js +0 -25
- package/dist/components/ui/alert.js.map +0 -1
- package/dist/components/ui/badge.d.ts +0 -10
- package/dist/components/ui/badge.d.ts.map +0 -1
- package/dist/components/ui/badge.js +0 -23
- package/dist/components/ui/badge.js.map +0 -1
- package/dist/components/ui/card.d.ts +0 -10
- package/dist/components/ui/card.d.ts.map +0 -1
- package/dist/components/ui/card.js +0 -25
- package/dist/components/ui/card.js.map +0 -1
- package/dist/components/ui/carousel.d.ts +0 -20
- package/dist/components/ui/carousel.d.ts.map +0 -1
- package/dist/components/ui/carousel.js +0 -92
- package/dist/components/ui/carousel.js.map +0 -1
- package/dist/components/ui/checkbox.d.ts +0 -5
- package/dist/components/ui/checkbox.d.ts.map +0 -1
- package/dist/components/ui/checkbox.js +0 -9
- package/dist/components/ui/checkbox.js.map +0 -1
- package/dist/components/ui/collapsible.d.ts +0 -6
- package/dist/components/ui/collapsible.d.ts.map +0 -1
- package/dist/components/ui/collapsible.js +0 -14
- package/dist/components/ui/collapsible.js.map +0 -1
- package/dist/components/ui/field.d.ts +0 -25
- package/dist/components/ui/field.d.ts.map +0 -1
- package/dist/components/ui/field.js +0 -74
- package/dist/components/ui/field.js.map +0 -1
- package/dist/components/ui/form.d.ts +0 -25
- package/dist/components/ui/form.d.ts.map +0 -1
- package/dist/components/ui/form.js +0 -58
- package/dist/components/ui/form.js.map +0 -1
- package/dist/components/ui/label.d.ts +0 -5
- package/dist/components/ui/label.d.ts.map +0 -1
- package/dist/components/ui/label.js +0 -9
- package/dist/components/ui/label.js.map +0 -1
- package/dist/components/ui/progress.d.ts +0 -5
- package/dist/components/ui/progress.d.ts.map +0 -1
- package/dist/components/ui/progress.js +0 -9
- package/dist/components/ui/progress.js.map +0 -1
- package/dist/components/ui/separator.d.ts +0 -5
- package/dist/components/ui/separator.d.ts.map +0 -1
- package/dist/components/ui/separator.js +0 -9
- package/dist/components/ui/separator.js.map +0 -1
- package/dist/components/ui/switch.d.ts +0 -5
- package/dist/components/ui/switch.d.ts.map +0 -1
- package/dist/components/ui/switch.js +0 -8
- package/dist/components/ui/switch.js.map +0 -1
- package/dist/components/ui/tabs.d.ts +0 -8
- package/dist/components/ui/tabs.d.ts.map +0 -1
- package/dist/components/ui/tabs.js +0 -17
- package/dist/components/ui/tabs.js.map +0 -1
- package/dist/components/ui/toggle.d.ts +0 -10
- package/dist/components/ui/toggle.d.ts.map +0 -1
- package/dist/components/ui/toggle.js +0 -26
- package/dist/components/ui/toggle.js.map +0 -1
- package/dist/components.d.ts +0 -12
- package/dist/components.d.ts.map +0 -1
- package/dist/components.js +0 -13
- package/dist/components.js.map +0 -1
- package/dist/hooks/index.d.ts +0 -7
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.js +0 -5
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/useWorkbenchSchemas.d.ts +0 -56
- package/dist/hooks/useWorkbenchSchemas.d.ts.map +0 -1
- package/dist/hooks/useWorkbenchSchemas.js +0 -63
- package/dist/hooks/useWorkbenchSchemas.js.map +0 -1
- package/src/components/ConnectionStatus.tsx +0 -67
- package/src/components/Inline.tsx +0 -16
- package/src/components/ai-elements/artifact.tsx +0 -118
- package/src/components/ai-elements/branch.tsx +0 -187
- package/src/components/ai-elements/canvas.tsx +0 -24
- package/src/components/ai-elements/chain-of-thought.tsx +0 -198
- package/src/components/ai-elements/confirmation.tsx +0 -119
- package/src/components/ai-elements/connection.tsx +0 -16
- package/src/components/ai-elements/context.tsx +0 -357
- package/src/components/ai-elements/controls.tsx +0 -18
- package/src/components/ai-elements/edge.tsx +0 -131
- package/src/components/ai-elements/image.tsx +0 -16
- package/src/components/ai-elements/inline-citation.tsx +0 -246
- package/src/components/ai-elements/loader.tsx +0 -88
- package/src/components/ai-elements/node.tsx +0 -66
- package/src/components/ai-elements/open-in-chat.tsx +0 -333
- package/src/components/ai-elements/panel.tsx +0 -12
- package/src/components/ai-elements/plan.tsx +0 -123
- package/src/components/ai-elements/queue.tsx +0 -231
- package/src/components/ai-elements/reasoning.tsx +0 -163
- package/src/components/ai-elements/response.tsx +0 -19
- package/src/components/ai-elements/sources.tsx +0 -53
- package/src/components/ai-elements/suggestion.tsx +0 -47
- package/src/components/ai-elements/task.tsx +0 -64
- package/src/components/ai-elements/tool.tsx +0 -136
- package/src/components/ai-elements/toolbar.tsx +0 -13
- package/src/components/ai-elements/web-preview.tsx +0 -238
- package/src/components/ui/alert.tsx +0 -60
- package/src/components/ui/badge.tsx +0 -40
- package/src/components/ui/card.tsx +0 -41
- package/src/components/ui/carousel.tsx +0 -234
- package/src/components/ui/checkbox.tsx +0 -27
- package/src/components/ui/collapsible.tsx +0 -21
- package/src/components/ui/field.tsx +0 -234
- package/src/components/ui/form.tsx +0 -154
- package/src/components/ui/label.tsx +0 -21
- package/src/components/ui/progress.tsx +0 -28
- package/src/components/ui/separator.tsx +0 -28
- package/src/components/ui/switch.tsx +0 -26
- package/src/components/ui/tabs.tsx +0 -52
- package/src/components/ui/toggle.tsx +0 -44
- package/src/components.tsx +0 -29
- package/src/hooks/index.ts +0 -20
- package/src/hooks/useWorkbenchSchemas.ts +0 -69
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
|
-
declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
8
|
-
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/components/ui/tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAItD,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,2CAQrF;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,2CAWzF;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,2CAW/F;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,2CAQ/F;AAED,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
|
-
import { cn } from '../../lib/utils';
|
|
4
|
-
function Tabs({ className, ...props }) {
|
|
5
|
-
return (_jsx(TabsPrimitive.Root, { "data-slot": "tabs", className: cn('flex flex-col gap-2', className), ...props }));
|
|
6
|
-
}
|
|
7
|
-
function TabsList({ className, ...props }) {
|
|
8
|
-
return (_jsx(TabsPrimitive.List, { "data-slot": "tabs-list", className: cn('bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]', className), ...props }));
|
|
9
|
-
}
|
|
10
|
-
function TabsTrigger({ className, ...props }) {
|
|
11
|
-
return (_jsx(TabsPrimitive.Trigger, { "data-slot": "tabs-trigger", className: cn("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
|
|
12
|
-
}
|
|
13
|
-
function TabsContent({ className, ...props }) {
|
|
14
|
-
return (_jsx(TabsPrimitive.Content, { "data-slot": "tabs-content", className: cn('flex-1 outline-none', className), ...props }));
|
|
15
|
-
}
|
|
16
|
-
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
17
|
-
//# sourceMappingURL=tabs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../../src/components/ui/tabs.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,SAAS,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAmD;IACrF,OAAO,CACN,KAAC,aAAa,CAAC,IAAI,iBACR,MAAM,EAChB,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,KAC3C,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAmD;IACzF,OAAO,CACN,KAAC,aAAa,CAAC,IAAI,iBACR,WAAW,EACrB,SAAS,EAAE,EAAE,CACZ,qGAAqG,EACrG,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAsD;IAC/F,OAAO,CACN,KAAC,aAAa,CAAC,OAAO,iBACX,cAAc,EACxB,SAAS,EAAE,EAAE,CACZ,iqBAAiqB,EACjqB,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAsD;IAC/F,OAAO,CACN,KAAC,aAAa,CAAC,OAAO,iBACX,cAAc,EACxB,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,KAC3C,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAED,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
3
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
-
declare const toggleVariants: (props?: ({
|
|
5
|
-
variant?: "default" | "outline" | null | undefined;
|
|
6
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
-
declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export { Toggle, toggleVariants };
|
|
10
|
-
//# sourceMappingURL=toggle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../src/components/ui/toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,cAAc;;;8EAoBnB,CAAC;AAEF,iBAAS,MAAM,CAAC,EACf,SAAS,EACT,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,2CAQzF;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
3
|
-
import { cva } from 'class-variance-authority';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
5
|
-
const toggleVariants = cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap", {
|
|
6
|
-
variants: {
|
|
7
|
-
variant: {
|
|
8
|
-
default: 'bg-transparent',
|
|
9
|
-
outline: 'border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground',
|
|
10
|
-
},
|
|
11
|
-
size: {
|
|
12
|
-
default: 'h-9 px-2 min-w-9',
|
|
13
|
-
sm: 'h-8 px-1.5 min-w-8',
|
|
14
|
-
lg: 'h-10 px-2.5 min-w-10',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
defaultVariants: {
|
|
18
|
-
variant: 'default',
|
|
19
|
-
size: 'default',
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
function Toggle({ className, variant, size, ...props }) {
|
|
23
|
-
return (_jsx(TogglePrimitive.Root, { "data-slot": "toggle", className: cn(toggleVariants({ variant, size, className })), ...props }));
|
|
24
|
-
}
|
|
25
|
-
export { Toggle, toggleVariants };
|
|
26
|
-
//# sourceMappingURL=toggle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.js","sourceRoot":"","sources":["../../../src/components/ui/toggle.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,cAAc,GAAG,GAAG,CACzB,+iBAA+iB,EAC/iB;IACC,QAAQ,EAAE;QACT,OAAO,EAAE;YACR,OAAO,EAAE,gBAAgB;YACzB,OAAO,EACN,2FAA2F;SAC5F;QACD,IAAI,EAAE;YACL,OAAO,EAAE,kBAAkB;YAC3B,EAAE,EAAE,oBAAoB;YACxB,EAAE,EAAE,sBAAsB;SAC1B;KACD;IACD,eAAe,EAAE;QAChB,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KACf;CACD,CACD,CAAC;AAEF,SAAS,MAAM,CAAC,EACf,SAAS,EACT,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACiF;IACzF,OAAO,CACN,KAAC,eAAe,CAAC,IAAI,iBACV,QAAQ,EAClB,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,KACvD,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
package/dist/components.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { Chat } from './components/internal/Chat';
|
|
2
|
-
export { Header } from './components/internal/Header';
|
|
3
|
-
export { App } from './components/App';
|
|
4
|
-
export { Inline } from './components/Inline';
|
|
5
|
-
export { ConnectionStatus } from './components/ConnectionStatus';
|
|
6
|
-
export { WorkbenchProvider } from './components/internal/WorkbenchProvider';
|
|
7
|
-
export { useAgentSchemas, useAgentSchema } from './hooks/useAgentSchemas';
|
|
8
|
-
export { useWorkbenchSchemas, useWorkbenchAgentSchema, useWorkbenchAllAgentSchemas, } from './hooks/useWorkbenchSchemas';
|
|
9
|
-
export { useLogger } from './hooks/useLogger';
|
|
10
|
-
export type { AgentSchema, AgentMetadata, AgentSchemaData, AgentSchemasResponse, UseAgentSchemasOptions, UseAgentSchemasResult, } from './hooks/useAgentSchemas';
|
|
11
|
-
export type { ConnectionStatus as ConnectionStatusType } from './types/config';
|
|
12
|
-
//# sourceMappingURL=components.d.ts.map
|
package/dist/components.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAG5E,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EACN,mBAAmB,EACnB,uBAAuB,EACvB,2BAA2B,GAC3B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,YAAY,EACX,WAAW,EACX,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,GACrB,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/components.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Export 4 main AI elements/components
|
|
2
|
-
export { Chat } from './components/internal/Chat';
|
|
3
|
-
export { Header } from './components/internal/Header';
|
|
4
|
-
export { App } from './components/App';
|
|
5
|
-
export { Inline } from './components/Inline';
|
|
6
|
-
export { ConnectionStatus } from './components/ConnectionStatus';
|
|
7
|
-
// Export provider
|
|
8
|
-
export { WorkbenchProvider } from './components/internal/WorkbenchProvider';
|
|
9
|
-
// Export hooks
|
|
10
|
-
export { useAgentSchemas, useAgentSchema } from './hooks/useAgentSchemas';
|
|
11
|
-
export { useWorkbenchSchemas, useWorkbenchAgentSchema, useWorkbenchAllAgentSchemas, } from './hooks/useWorkbenchSchemas';
|
|
12
|
-
export { useLogger } from './hooks/useLogger';
|
|
13
|
-
//# sourceMappingURL=components.js.map
|
package/dist/components.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,kBAAkB;AAClB,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAE5E,eAAe;AACf,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EACN,mBAAmB,EACnB,uBAAuB,EACvB,2BAA2B,GAC3B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/hooks/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { useAgentSchemas, useAgentSchema } from './useAgentSchemas';
|
|
2
|
-
export { useWorkbenchSchemas, useWorkbenchAgentSchema, useWorkbenchAllAgentSchemas, } from './useWorkbenchSchemas';
|
|
3
|
-
export { useWorkbenchWebsocket } from './useWorkbenchWebsocket';
|
|
4
|
-
export { useLogger } from './useLogger';
|
|
5
|
-
export type { AgentSchema, AgentMetadata, AgentSchemaData, AgentSchemasResponse, UseAgentSchemasOptions, UseAgentSchemasResult, } from './useAgentSchemas';
|
|
6
|
-
export type { UseWorkbenchWebsocketOptions, UseWorkbenchWebsocketResult, } from './useWorkbenchWebsocket';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EACN,mBAAmB,EACnB,uBAAuB,EACvB,2BAA2B,GAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EACX,WAAW,EACX,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACX,4BAA4B,EAC5B,2BAA2B,GAC3B,MAAM,yBAAyB,CAAC"}
|
package/dist/hooks/index.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { useAgentSchemas, useAgentSchema } from './useAgentSchemas';
|
|
2
|
-
export { useWorkbenchSchemas, useWorkbenchAgentSchema, useWorkbenchAllAgentSchemas, } from './useWorkbenchSchemas';
|
|
3
|
-
export { useWorkbenchWebsocket } from './useWorkbenchWebsocket';
|
|
4
|
-
export { useLogger } from './useLogger';
|
|
5
|
-
//# sourceMappingURL=index.js.map
|
package/dist/hooks/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EACN,mBAAmB,EACnB,uBAAuB,EACvB,2BAA2B,GAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hook to access agent schemas from the WorkbenchProvider context
|
|
3
|
-
* This is preferred over using useAgentSchemas directly in components
|
|
4
|
-
* since the provider manages the schema data centrally
|
|
5
|
-
*/
|
|
6
|
-
export declare function useWorkbenchSchemas(): {
|
|
7
|
-
/** Raw schema data from the API */
|
|
8
|
-
schemas: import("./useAgentSchemas").AgentSchemasResponse | null;
|
|
9
|
-
/** Whether schemas are currently loading */
|
|
10
|
-
isLoading: boolean;
|
|
11
|
-
/** Any error that occurred while fetching schemas */
|
|
12
|
-
error: Error | null;
|
|
13
|
-
/** Function to refetch schemas from the API */
|
|
14
|
-
refetch: () => void;
|
|
15
|
-
/** Array of agent names available in schemas */
|
|
16
|
-
agentNames: string[];
|
|
17
|
-
/** Number of agents available */
|
|
18
|
-
agentCount: number;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Hook to get a specific agent's schema by name
|
|
22
|
-
*/
|
|
23
|
-
export declare function useWorkbenchAgentSchema(agentName: string): {
|
|
24
|
-
/** Agent schema data if found */
|
|
25
|
-
data: import("./useAgentSchemas").AgentSchemaData | null;
|
|
26
|
-
/** Input schema for the agent */
|
|
27
|
-
inputSchema: {
|
|
28
|
-
code?: string;
|
|
29
|
-
json?: import("json-schema").JSONSchema7;
|
|
30
|
-
} | null;
|
|
31
|
-
/** Output schema for the agent */
|
|
32
|
-
outputSchema: {
|
|
33
|
-
code?: string;
|
|
34
|
-
json?: string;
|
|
35
|
-
} | null;
|
|
36
|
-
/** Agent metadata */
|
|
37
|
-
metadata: import("./useAgentSchemas").AgentMetadata | null;
|
|
38
|
-
/** Whether the agent exists in the current schemas */
|
|
39
|
-
exists: boolean;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Hook to get all agent schemas as an array
|
|
43
|
-
*/
|
|
44
|
-
export declare function useWorkbenchAllAgentSchemas(): {
|
|
45
|
-
/** Array of all agent schema data */
|
|
46
|
-
agents: {
|
|
47
|
-
schema: import("./useAgentSchemas").AgentSchema;
|
|
48
|
-
metadata: import("./useAgentSchemas").AgentMetadata;
|
|
49
|
-
name: string;
|
|
50
|
-
}[];
|
|
51
|
-
/** Whether any schemas are available */
|
|
52
|
-
hasSchemas: boolean;
|
|
53
|
-
/** Count of available schemas */
|
|
54
|
-
count: number;
|
|
55
|
-
};
|
|
56
|
-
//# sourceMappingURL=useWorkbenchSchemas.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useWorkbenchSchemas.d.ts","sourceRoot":"","sources":["../../src/hooks/useWorkbenchSchemas.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,wBAAgB,mBAAmB;IAIjC,mCAAmC;;IAEnC,4CAA4C;;IAE5C,qDAAqD;;IAErD,+CAA+C;;IAE/C,gDAAgD;;IAEhD,iCAAiC;;EAGlC;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM;IAMvD,iCAAiC;;IAEjC,iCAAiC;;;;;IAEjC,kCAAkC;;;;;IAElC,qBAAqB;;IAErB,sDAAsD;;EAGvD;AAED;;GAEG;AACH,wBAAgB,2BAA2B;IAWzC,qCAAqC;;;;;;IAErC,wCAAwC;;IAExC,iCAAiC;;EAGlC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { useWorkbench } from '../components/internal/WorkbenchProvider';
|
|
2
|
-
/**
|
|
3
|
-
* Hook to access agent schemas from the WorkbenchProvider context
|
|
4
|
-
* This is preferred over using useAgentSchemas directly in components
|
|
5
|
-
* since the provider manages the schema data centrally
|
|
6
|
-
*/
|
|
7
|
-
export function useWorkbenchSchemas() {
|
|
8
|
-
const { schemas, schemasLoading, schemasError, refetchSchemas } = useWorkbench();
|
|
9
|
-
return {
|
|
10
|
-
/** Raw schema data from the API */
|
|
11
|
-
schemas,
|
|
12
|
-
/** Whether schemas are currently loading */
|
|
13
|
-
isLoading: schemasLoading,
|
|
14
|
-
/** Any error that occurred while fetching schemas */
|
|
15
|
-
error: schemasError,
|
|
16
|
-
/** Function to refetch schemas from the API */
|
|
17
|
-
refetch: refetchSchemas,
|
|
18
|
-
/** Array of agent names available in schemas */
|
|
19
|
-
agentNames: schemas ? Object.keys(schemas.agents) : [],
|
|
20
|
-
/** Number of agents available */
|
|
21
|
-
agentCount: schemas ? Object.keys(schemas.agents).length : 0,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Hook to get a specific agent's schema by name
|
|
26
|
-
*/
|
|
27
|
-
export function useWorkbenchAgentSchema(agentName) {
|
|
28
|
-
const { schemas } = useWorkbench();
|
|
29
|
-
const agentData = schemas?.agents[agentName] || null;
|
|
30
|
-
return {
|
|
31
|
-
/** Agent schema data if found */
|
|
32
|
-
data: agentData,
|
|
33
|
-
/** Input schema for the agent */
|
|
34
|
-
inputSchema: agentData?.schema.input || null,
|
|
35
|
-
/** Output schema for the agent */
|
|
36
|
-
outputSchema: agentData?.schema.output || null,
|
|
37
|
-
/** Agent metadata */
|
|
38
|
-
metadata: agentData?.metadata || null,
|
|
39
|
-
/** Whether the agent exists in the current schemas */
|
|
40
|
-
exists: !!agentData,
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Hook to get all agent schemas as an array
|
|
45
|
-
*/
|
|
46
|
-
export function useWorkbenchAllAgentSchemas() {
|
|
47
|
-
const { schemas } = useWorkbench();
|
|
48
|
-
const allAgents = schemas
|
|
49
|
-
? Object.entries(schemas.agents).map(([name, agentData]) => ({
|
|
50
|
-
name,
|
|
51
|
-
...agentData,
|
|
52
|
-
}))
|
|
53
|
-
: [];
|
|
54
|
-
return {
|
|
55
|
-
/** Array of all agent schema data */
|
|
56
|
-
agents: allAgents,
|
|
57
|
-
/** Whether any schemas are available */
|
|
58
|
-
hasSchemas: allAgents.length > 0,
|
|
59
|
-
/** Count of available schemas */
|
|
60
|
-
count: allAgents.length,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=useWorkbenchSchemas.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useWorkbenchSchemas.js","sourceRoot":"","sources":["../../src/hooks/useWorkbenchSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE;;;;GAIG;AACH,MAAM,UAAU,mBAAmB;IAClC,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,YAAY,EAAE,CAAC;IAEjF,OAAO;QACN,mCAAmC;QACnC,OAAO;QACP,4CAA4C;QAC5C,SAAS,EAAE,cAAc;QACzB,qDAAqD;QACrD,KAAK,EAAE,YAAY;QACnB,+CAA+C;QAC/C,OAAO,EAAE,cAAc;QACvB,gDAAgD;QAChD,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;QACtD,iCAAiC;QACjC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KAC5D,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,SAAiB;IACxD,MAAM,EAAE,OAAO,EAAE,GAAG,YAAY,EAAE,CAAC;IAEnC,MAAM,SAAS,GAAG,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC;IAErD,OAAO;QACN,iCAAiC;QACjC,IAAI,EAAE,SAAS;QACf,iCAAiC;QACjC,WAAW,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK,IAAI,IAAI;QAC5C,kCAAkC;QAClC,YAAY,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,IAAI,IAAI;QAC9C,qBAAqB;QACrB,QAAQ,EAAE,SAAS,EAAE,QAAQ,IAAI,IAAI;QACrC,sDAAsD;QACtD,MAAM,EAAE,CAAC,CAAC,SAAS;KACnB,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,2BAA2B;IAC1C,MAAM,EAAE,OAAO,EAAE,GAAG,YAAY,EAAE,CAAC;IAEnC,MAAM,SAAS,GAAG,OAAO;QACxB,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC;YAC3D,IAAI;YACJ,GAAG,SAAS;SACZ,CAAC,CAAC;QACJ,CAAC,CAAC,EAAE,CAAC;IAEN,OAAO;QACN,qCAAqC;QACrC,MAAM,EAAE,SAAS;QACjB,wCAAwC;QACxC,UAAU,EAAE,SAAS,CAAC,MAAM,GAAG,CAAC;QAChC,iCAAiC;QACjC,KAAK,EAAE,SAAS,CAAC,MAAM;KACvB,CAAC;AACH,CAAC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ConnectionStatus as ConnectionStatusType } from '../types/config';
|
|
3
|
-
|
|
4
|
-
interface ConnectionStatusProps {
|
|
5
|
-
status: ConnectionStatusType;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export function ConnectionStatus({ status }: ConnectionStatusProps) {
|
|
9
|
-
if (status === 'connected') {
|
|
10
|
-
return null; // Don't show anything when connected normally
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const getStatusConfig = (status: ConnectionStatusType) => {
|
|
14
|
-
switch (status) {
|
|
15
|
-
case 'restarting':
|
|
16
|
-
return {
|
|
17
|
-
text: 'Server restarting...',
|
|
18
|
-
bgColor: 'bg-amber-100',
|
|
19
|
-
textColor: 'text-amber-800',
|
|
20
|
-
borderColor: 'border-amber-200',
|
|
21
|
-
icon: '🔄',
|
|
22
|
-
};
|
|
23
|
-
case 'disconnected':
|
|
24
|
-
return {
|
|
25
|
-
text: 'Disconnected from server',
|
|
26
|
-
bgColor: 'bg-red-100',
|
|
27
|
-
textColor: 'text-red-800',
|
|
28
|
-
borderColor: 'border-red-200',
|
|
29
|
-
icon: '⚠️',
|
|
30
|
-
};
|
|
31
|
-
case 'connected':
|
|
32
|
-
return {
|
|
33
|
-
text: 'Connected',
|
|
34
|
-
bgColor: 'bg-green-100',
|
|
35
|
-
textColor: 'text-green-800',
|
|
36
|
-
borderColor: 'border-green-200',
|
|
37
|
-
icon: '✅',
|
|
38
|
-
};
|
|
39
|
-
default:
|
|
40
|
-
return {
|
|
41
|
-
text: 'Unknown status',
|
|
42
|
-
bgColor: 'bg-gray-100',
|
|
43
|
-
textColor: 'text-gray-800',
|
|
44
|
-
borderColor: 'border-gray-200',
|
|
45
|
-
icon: '❓',
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const config = getStatusConfig(status);
|
|
51
|
-
|
|
52
|
-
return (
|
|
53
|
-
<div
|
|
54
|
-
className={`
|
|
55
|
-
fixed top-0 left-0 right-0 z-50
|
|
56
|
-
px-4 py-2
|
|
57
|
-
${config.bgColor} ${config.textColor} ${config.borderColor}
|
|
58
|
-
border-b
|
|
59
|
-
text-center text-sm font-medium
|
|
60
|
-
transition-all duration-200 ease-in-out
|
|
61
|
-
`}
|
|
62
|
-
>
|
|
63
|
-
<span className="mr-2">{config.icon}</span>
|
|
64
|
-
{config.text}
|
|
65
|
-
</div>
|
|
66
|
-
);
|
|
67
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Chat } from './internal/Chat';
|
|
3
|
-
|
|
4
|
-
export interface InlineProps {
|
|
5
|
-
className?: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Inline component - just the chat area
|
|
10
|
-
* Must be used within WorkbenchProvider
|
|
11
|
-
*/
|
|
12
|
-
export function Inline({ className }: InlineProps) {
|
|
13
|
-
return <Chat className={className} />;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default Inline;
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { Button } from '../ui/button';
|
|
4
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../ui/tooltip';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
6
|
-
import { type LucideIcon, XIcon } from 'lucide-react';
|
|
7
|
-
import type { ComponentProps, HTMLAttributes } from 'react';
|
|
8
|
-
|
|
9
|
-
export type ArtifactProps = HTMLAttributes<HTMLDivElement>;
|
|
10
|
-
|
|
11
|
-
export const Artifact = ({ className, ...props }: ArtifactProps) => (
|
|
12
|
-
<div
|
|
13
|
-
className={cn(
|
|
14
|
-
'flex flex-col overflow-hidden rounded-lg border bg-background shadow-sm',
|
|
15
|
-
className
|
|
16
|
-
)}
|
|
17
|
-
{...props}
|
|
18
|
-
/>
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
export type ArtifactHeaderProps = HTMLAttributes<HTMLDivElement>;
|
|
22
|
-
|
|
23
|
-
export const ArtifactHeader = ({ className, ...props }: ArtifactHeaderProps) => (
|
|
24
|
-
<div
|
|
25
|
-
className={cn('flex items-center justify-between border-b bg-muted/50 px-4 py-3', className)}
|
|
26
|
-
{...props}
|
|
27
|
-
/>
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
export type ArtifactCloseProps = ComponentProps<typeof Button>;
|
|
31
|
-
|
|
32
|
-
export const ArtifactClose = ({
|
|
33
|
-
className,
|
|
34
|
-
children,
|
|
35
|
-
size = 'sm',
|
|
36
|
-
variant = 'ghost',
|
|
37
|
-
...props
|
|
38
|
-
}: ArtifactCloseProps) => (
|
|
39
|
-
<Button
|
|
40
|
-
className={cn('size-8 p-0 text-muted-foreground hover:text-foreground', className)}
|
|
41
|
-
size={size}
|
|
42
|
-
type="button"
|
|
43
|
-
variant={variant}
|
|
44
|
-
{...props}
|
|
45
|
-
>
|
|
46
|
-
{children ?? <XIcon className="size-4" />}
|
|
47
|
-
<span className="sr-only">Close</span>
|
|
48
|
-
</Button>
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
export type ArtifactTitleProps = HTMLAttributes<HTMLParagraphElement>;
|
|
52
|
-
|
|
53
|
-
export const ArtifactTitle = ({ className, ...props }: ArtifactTitleProps) => (
|
|
54
|
-
<p className={cn('font-medium text-foreground text-sm', className)} {...props} />
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
export type ArtifactDescriptionProps = HTMLAttributes<HTMLParagraphElement>;
|
|
58
|
-
|
|
59
|
-
export const ArtifactDescription = ({ className, ...props }: ArtifactDescriptionProps) => (
|
|
60
|
-
<p className={cn('text-muted-foreground text-sm', className)} {...props} />
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
export type ArtifactActionsProps = HTMLAttributes<HTMLDivElement>;
|
|
64
|
-
|
|
65
|
-
export const ArtifactActions = ({ className, ...props }: ArtifactActionsProps) => (
|
|
66
|
-
<div className={cn('flex items-center gap-1', className)} {...props} />
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
export type ArtifactActionProps = ComponentProps<typeof Button> & {
|
|
70
|
-
tooltip?: string;
|
|
71
|
-
label?: string;
|
|
72
|
-
icon?: LucideIcon;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export const ArtifactAction = ({
|
|
76
|
-
tooltip,
|
|
77
|
-
label,
|
|
78
|
-
icon: Icon,
|
|
79
|
-
children,
|
|
80
|
-
className,
|
|
81
|
-
size = 'sm',
|
|
82
|
-
variant = 'ghost',
|
|
83
|
-
...props
|
|
84
|
-
}: ArtifactActionProps) => {
|
|
85
|
-
const button = (
|
|
86
|
-
<Button
|
|
87
|
-
className={cn('size-8 p-0 text-muted-foreground hover:text-foreground', className)}
|
|
88
|
-
size={size}
|
|
89
|
-
type="button"
|
|
90
|
-
variant={variant}
|
|
91
|
-
{...props}
|
|
92
|
-
>
|
|
93
|
-
{Icon ? <Icon className="size-4" /> : children}
|
|
94
|
-
<span className="sr-only">{label || tooltip}</span>
|
|
95
|
-
</Button>
|
|
96
|
-
);
|
|
97
|
-
|
|
98
|
-
if (tooltip) {
|
|
99
|
-
return (
|
|
100
|
-
<TooltipProvider>
|
|
101
|
-
<Tooltip>
|
|
102
|
-
<TooltipTrigger asChild>{button}</TooltipTrigger>
|
|
103
|
-
<TooltipContent>
|
|
104
|
-
<p>{tooltip}</p>
|
|
105
|
-
</TooltipContent>
|
|
106
|
-
</Tooltip>
|
|
107
|
-
</TooltipProvider>
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return button;
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
export type ArtifactContentProps = HTMLAttributes<HTMLDivElement>;
|
|
115
|
-
|
|
116
|
-
export const ArtifactContent = ({ className, ...props }: ArtifactContentProps) => (
|
|
117
|
-
<div className={cn('flex-1 overflow-auto p-4', className)} {...props} />
|
|
118
|
-
);
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { Button } from '../ui/button';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
5
|
-
import type { UIMessage } from 'ai';
|
|
6
|
-
import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
|
|
7
|
-
import type { ComponentProps, HTMLAttributes, ReactElement } from 'react';
|
|
8
|
-
import { createContext, useContext, useEffect, useState } from 'react';
|
|
9
|
-
|
|
10
|
-
type BranchContextType = {
|
|
11
|
-
currentBranch: number;
|
|
12
|
-
totalBranches: number;
|
|
13
|
-
goToPrevious: () => void;
|
|
14
|
-
goToNext: () => void;
|
|
15
|
-
branches: ReactElement[];
|
|
16
|
-
setBranches: (branches: ReactElement[]) => void;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const BranchContext = createContext<BranchContextType | null>(null);
|
|
20
|
-
|
|
21
|
-
const useBranch = () => {
|
|
22
|
-
const context = useContext(BranchContext);
|
|
23
|
-
|
|
24
|
-
if (!context) {
|
|
25
|
-
throw new Error('Branch components must be used within Branch');
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return context;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export type BranchProps = HTMLAttributes<HTMLDivElement> & {
|
|
32
|
-
defaultBranch?: number;
|
|
33
|
-
onBranchChange?: (branchIndex: number) => void;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export const Branch = ({ defaultBranch = 0, onBranchChange, className, ...props }: BranchProps) => {
|
|
37
|
-
const [currentBranch, setCurrentBranch] = useState(defaultBranch);
|
|
38
|
-
const [branches, setBranches] = useState<ReactElement[]>([]);
|
|
39
|
-
|
|
40
|
-
const handleBranchChange = (newBranch: number) => {
|
|
41
|
-
setCurrentBranch(newBranch);
|
|
42
|
-
onBranchChange?.(newBranch);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const goToPrevious = () => {
|
|
46
|
-
const newBranch = currentBranch > 0 ? currentBranch - 1 : branches.length - 1;
|
|
47
|
-
handleBranchChange(newBranch);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const goToNext = () => {
|
|
51
|
-
const newBranch = currentBranch < branches.length - 1 ? currentBranch + 1 : 0;
|
|
52
|
-
handleBranchChange(newBranch);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const contextValue: BranchContextType = {
|
|
56
|
-
currentBranch,
|
|
57
|
-
totalBranches: branches.length,
|
|
58
|
-
goToPrevious,
|
|
59
|
-
goToNext,
|
|
60
|
-
branches,
|
|
61
|
-
setBranches,
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
return (
|
|
65
|
-
<BranchContext.Provider value={contextValue}>
|
|
66
|
-
<div className={cn('grid w-full gap-2 [&>div]:pb-0', className)} {...props} />
|
|
67
|
-
</BranchContext.Provider>
|
|
68
|
-
);
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export type BranchMessagesProps = HTMLAttributes<HTMLDivElement>;
|
|
72
|
-
|
|
73
|
-
export const BranchMessages = ({ children, ...props }: BranchMessagesProps) => {
|
|
74
|
-
const { currentBranch, setBranches, branches } = useBranch();
|
|
75
|
-
const childrenArray = Array.isArray(children) ? children : [children];
|
|
76
|
-
|
|
77
|
-
// Use useEffect to update branches when they change
|
|
78
|
-
useEffect(() => {
|
|
79
|
-
if (branches.length !== childrenArray.length) {
|
|
80
|
-
setBranches(childrenArray);
|
|
81
|
-
}
|
|
82
|
-
}, [childrenArray, branches, setBranches]);
|
|
83
|
-
|
|
84
|
-
return childrenArray.map((branch, index) => (
|
|
85
|
-
<div
|
|
86
|
-
className={cn(
|
|
87
|
-
'grid gap-2 overflow-hidden [&>div]:pb-0',
|
|
88
|
-
index === currentBranch ? 'block' : 'hidden'
|
|
89
|
-
)}
|
|
90
|
-
key={branch.key}
|
|
91
|
-
{...props}
|
|
92
|
-
>
|
|
93
|
-
{branch}
|
|
94
|
-
</div>
|
|
95
|
-
));
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export type BranchSelectorProps = HTMLAttributes<HTMLDivElement> & {
|
|
99
|
-
from: UIMessage['role'];
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export const BranchSelector = ({ className, from, ...props }: BranchSelectorProps) => {
|
|
103
|
-
const { totalBranches } = useBranch();
|
|
104
|
-
|
|
105
|
-
// Don't render if there's only one branch
|
|
106
|
-
if (totalBranches <= 1) {
|
|
107
|
-
return null;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
return (
|
|
111
|
-
<div
|
|
112
|
-
className={cn(
|
|
113
|
-
'flex items-center gap-2 self-end px-10',
|
|
114
|
-
from === 'assistant' ? 'justify-start' : 'justify-end',
|
|
115
|
-
className
|
|
116
|
-
)}
|
|
117
|
-
{...props}
|
|
118
|
-
/>
|
|
119
|
-
);
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
export type BranchPreviousProps = ComponentProps<typeof Button>;
|
|
123
|
-
|
|
124
|
-
export const BranchPrevious = ({ className, children, ...props }: BranchPreviousProps) => {
|
|
125
|
-
const { goToPrevious, totalBranches } = useBranch();
|
|
126
|
-
|
|
127
|
-
return (
|
|
128
|
-
<Button
|
|
129
|
-
aria-label="Previous branch"
|
|
130
|
-
className={cn(
|
|
131
|
-
'size-7 shrink-0 rounded-full text-muted-foreground transition-colors',
|
|
132
|
-
'hover:bg-accent hover:text-foreground',
|
|
133
|
-
'disabled:pointer-events-none disabled:opacity-50',
|
|
134
|
-
className
|
|
135
|
-
)}
|
|
136
|
-
disabled={totalBranches <= 1}
|
|
137
|
-
onClick={goToPrevious}
|
|
138
|
-
size="icon"
|
|
139
|
-
type="button"
|
|
140
|
-
variant="ghost"
|
|
141
|
-
{...props}
|
|
142
|
-
>
|
|
143
|
-
{children ?? <ChevronLeftIcon size={14} />}
|
|
144
|
-
</Button>
|
|
145
|
-
);
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
export type BranchNextProps = ComponentProps<typeof Button>;
|
|
149
|
-
|
|
150
|
-
export const BranchNext = ({ className, children, ...props }: BranchNextProps) => {
|
|
151
|
-
const { goToNext, totalBranches } = useBranch();
|
|
152
|
-
|
|
153
|
-
return (
|
|
154
|
-
<Button
|
|
155
|
-
aria-label="Next branch"
|
|
156
|
-
className={cn(
|
|
157
|
-
'size-7 shrink-0 rounded-full text-muted-foreground transition-colors',
|
|
158
|
-
'hover:bg-accent hover:text-foreground',
|
|
159
|
-
'disabled:pointer-events-none disabled:opacity-50',
|
|
160
|
-
className
|
|
161
|
-
)}
|
|
162
|
-
disabled={totalBranches <= 1}
|
|
163
|
-
onClick={goToNext}
|
|
164
|
-
size="icon"
|
|
165
|
-
type="button"
|
|
166
|
-
variant="ghost"
|
|
167
|
-
{...props}
|
|
168
|
-
>
|
|
169
|
-
{children ?? <ChevronRightIcon size={14} />}
|
|
170
|
-
</Button>
|
|
171
|
-
);
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
export type BranchPageProps = HTMLAttributes<HTMLSpanElement>;
|
|
175
|
-
|
|
176
|
-
export const BranchPage = ({ className, ...props }: BranchPageProps) => {
|
|
177
|
-
const { currentBranch, totalBranches } = useBranch();
|
|
178
|
-
|
|
179
|
-
return (
|
|
180
|
-
<span
|
|
181
|
-
className={cn('font-medium text-muted-foreground text-xs tabular-nums', className)}
|
|
182
|
-
{...props}
|
|
183
|
-
>
|
|
184
|
-
{currentBranch + 1} of {totalBranches}
|
|
185
|
-
</span>
|
|
186
|
-
);
|
|
187
|
-
};
|