@agentuity/workbench 0.0.86 → 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/InputSection.d.ts +3 -2
- package/dist/components/internal/InputSection.d.ts.map +1 -1
- package/dist/components/internal/InputSection.js +68 -6
- package/dist/components/internal/InputSection.js.map +1 -1
- package/dist/components/internal/MonacoJsonEditor.d.ts +3 -1
- package/dist/components/internal/MonacoJsonEditor.d.ts.map +1 -1
- package/dist/components/internal/MonacoJsonEditor.js +41 -57
- 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/internal/WorkbenchProvider.d.ts.map +1 -1
- package/dist/components/internal/WorkbenchProvider.js +55 -8
- package/dist/components/internal/WorkbenchProvider.js.map +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/input-group.js +2 -2
- package/dist/components/ui/input-group.js.map +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} +206 -1554
- 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 -119
- package/src/components/internal/InputSection.tsx +79 -9
- package/src/components/internal/MonacoJsonEditor.tsx +59 -65
- package/src/components/internal/Schema.tsx +74 -86
- package/src/components/internal/WorkbenchProvider.tsx +69 -10
- package/src/components/ui/input-group.tsx +2 -2
- 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,29 +0,0 @@
|
|
|
1
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from '../ui/dropdown-menu';
|
|
2
|
-
import { type ComponentProps } from 'react';
|
|
3
|
-
export type OpenInProps = ComponentProps<typeof DropdownMenu> & {
|
|
4
|
-
query: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const OpenIn: ({ query, ...props }: OpenInProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export type OpenInContentProps = ComponentProps<typeof DropdownMenuContent>;
|
|
8
|
-
export declare const OpenInContent: ({ className, ...props }: OpenInContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export type OpenInItemProps = ComponentProps<typeof DropdownMenuItem>;
|
|
10
|
-
export declare const OpenInItem: (props: OpenInItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export type OpenInLabelProps = ComponentProps<typeof DropdownMenuLabel>;
|
|
12
|
-
export declare const OpenInLabel: (props: OpenInLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export type OpenInSeparatorProps = ComponentProps<typeof DropdownMenuSeparator>;
|
|
14
|
-
export declare const OpenInSeparator: (props: OpenInSeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export type OpenInTriggerProps = ComponentProps<typeof DropdownMenuTrigger>;
|
|
16
|
-
export declare const OpenInTrigger: ({ children, ...props }: OpenInTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export type OpenInChatGPTProps = ComponentProps<typeof DropdownMenuItem>;
|
|
18
|
-
export declare const OpenInChatGPT: (props: OpenInChatGPTProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export type OpenInClaudeProps = ComponentProps<typeof DropdownMenuItem>;
|
|
20
|
-
export declare const OpenInClaude: (props: OpenInClaudeProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export type OpenInT3Props = ComponentProps<typeof DropdownMenuItem>;
|
|
22
|
-
export declare const OpenInT3: (props: OpenInT3Props) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
export type OpenInSciraProps = ComponentProps<typeof DropdownMenuItem>;
|
|
24
|
-
export declare const OpenInScira: (props: OpenInSciraProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export type OpenInv0Props = ComponentProps<typeof DropdownMenuItem>;
|
|
26
|
-
export declare const OpenInv0: (props: OpenInv0Props) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
export type OpenInCursorProps = ComponentProps<typeof DropdownMenuItem>;
|
|
28
|
-
export declare const OpenInCursor: (props: OpenInCursorProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
//# sourceMappingURL=open-in-chat.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"open-in-chat.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/open-in-chat.tsx"],"names":[],"mappings":"AACA,OAAO,EACN,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,KAAK,cAAc,EAA6B,MAAM,OAAO,CAAC;AAgKvE,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,YAAY,CAAC,GAAG;IAC/D,KAAK,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,qBAAqB,WAAW,4CAItD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE5E,eAAO,MAAM,aAAa,GAAI,yBAAyB,kBAAkB,4CAExE,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEtE,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,4CAAoC,CAAC;AAEtF,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAExE,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,4CAAqC,CAAC;AAEzF,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEhF,eAAO,MAAM,eAAe,GAAI,OAAO,oBAAoB,4CAE1D,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE5E,eAAO,MAAM,aAAa,GAAI,wBAAwB,kBAAkB,4CASvE,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEzE,eAAO,MAAM,aAAa,GAAI,OAAO,kBAAkB,4CAgBtD,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAExE,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,4CAgBpD,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEpE,eAAO,MAAM,QAAQ,GAAI,OAAO,aAAa,4CAgB5C,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEvE,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,4CAgBlD,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEpE,eAAO,MAAM,QAAQ,GAAI,OAAO,aAAa,4CAgB5C,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAExE,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,4CAgBpD,CAAC"}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button } from '../ui/button';
|
|
3
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from '../ui/dropdown-menu';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
5
|
-
import { ChevronDownIcon, ExternalLinkIcon, MessageCircleIcon } from 'lucide-react';
|
|
6
|
-
import { createContext, useContext } from 'react';
|
|
7
|
-
const providers = {
|
|
8
|
-
github: {
|
|
9
|
-
title: 'Open in GitHub',
|
|
10
|
-
createUrl: (url) => url,
|
|
11
|
-
icon: (_jsxs("svg", { fill: "currentColor", role: "img", viewBox: "0 0 24 24", children: [_jsx("title", { children: "GitHub" }), _jsx("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" })] })),
|
|
12
|
-
},
|
|
13
|
-
scira: {
|
|
14
|
-
title: 'Open in Scira',
|
|
15
|
-
createUrl: (q) => `https://scira.ai/?${new URLSearchParams({
|
|
16
|
-
q,
|
|
17
|
-
})}`,
|
|
18
|
-
icon: (_jsxs("svg", { fill: "none", height: "934", viewBox: "0 0 910 934", width: "910", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "Scira AI" }), _jsx("path", { d: "M647.664 197.775C569.13 189.049 525.5 145.419 516.774 66.8849C508.048 145.419 464.418 189.049 385.884 197.775C464.418 206.501 508.048 250.131 516.774 328.665C525.5 250.131 569.13 206.501 647.664 197.775Z", fill: "currentColor", stroke: "currentColor", strokeLinejoin: "round", strokeWidth: "8" }), _jsx("path", { d: "M516.774 304.217C510.299 275.491 498.208 252.087 480.335 234.214C462.462 216.341 439.058 204.251 410.333 197.775C439.059 191.3 462.462 179.209 480.335 161.336C498.208 143.463 510.299 120.06 516.774 91.334C523.25 120.059 535.34 143.463 553.213 161.336C571.086 179.209 594.49 191.3 623.216 197.775C594.49 204.251 571.086 216.341 553.213 234.214C535.34 252.087 523.25 275.491 516.774 304.217Z", fill: "currentColor", stroke: "currentColor", strokeLinejoin: "round", strokeWidth: "8" }), _jsx("path", { d: "M857.5 508.116C763.259 497.644 710.903 445.288 700.432 351.047C689.961 445.288 637.605 497.644 543.364 508.116C637.605 518.587 689.961 570.943 700.432 665.184C710.903 570.943 763.259 518.587 857.5 508.116Z", stroke: "currentColor", strokeLinejoin: "round", strokeWidth: "20" }), _jsx("path", { d: "M700.432 615.957C691.848 589.05 678.575 566.357 660.383 548.165C642.191 529.973 619.499 516.7 592.593 508.116C619.499 499.533 642.191 486.258 660.383 468.066C678.575 449.874 691.848 427.181 700.432 400.274C709.015 427.181 722.289 449.874 740.481 468.066C758.673 486.258 781.365 499.533 808.271 508.116C781.365 516.7 758.673 529.973 740.481 548.165C722.289 566.357 709.015 589.05 700.432 615.957Z", stroke: "currentColor", strokeLinejoin: "round", strokeWidth: "20" }), _jsx("path", { d: "M889.949 121.237C831.049 114.692 798.326 81.9698 791.782 23.0692C785.237 81.9698 752.515 114.692 693.614 121.237C752.515 127.781 785.237 160.504 791.782 219.404C798.326 160.504 831.049 127.781 889.949 121.237Z", fill: "currentColor", stroke: "currentColor", strokeLinejoin: "round", strokeWidth: "8" }), _jsx("path", { d: "M791.782 196.795C786.697 176.937 777.869 160.567 765.16 147.858C752.452 135.15 736.082 126.322 716.226 121.237C736.082 116.152 752.452 107.324 765.16 94.6152C777.869 81.9065 786.697 65.5368 791.782 45.6797C796.867 65.5367 805.695 81.9066 818.403 94.6152C831.112 107.324 847.481 116.152 867.338 121.237C847.481 126.322 831.112 135.15 818.403 147.858C805.694 160.567 796.867 176.937 791.782 196.795Z", fill: "currentColor", stroke: "currentColor", strokeLinejoin: "round", strokeWidth: "8" }), _jsx("path", { d: "M760.632 764.337C720.719 814.616 669.835 855.1 611.872 882.692C553.91 910.285 490.404 924.255 426.213 923.533C362.022 922.812 298.846 907.419 241.518 878.531C184.19 849.643 134.228 808.026 95.4548 756.863C56.6815 705.7 30.1238 646.346 17.8129 583.343C5.50207 520.339 7.76433 455.354 24.4266 393.359C41.089 331.364 71.7099 274.001 113.947 225.658C156.184 177.315 208.919 139.273 268.117 114.442", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "30" })] })),
|
|
19
|
-
},
|
|
20
|
-
chatgpt: {
|
|
21
|
-
title: 'Open in ChatGPT',
|
|
22
|
-
createUrl: (prompt) => `https://chatgpt.com/?${new URLSearchParams({
|
|
23
|
-
hints: 'search',
|
|
24
|
-
prompt,
|
|
25
|
-
})}`,
|
|
26
|
-
icon: (_jsxs("svg", { fill: "currentColor", role: "img", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "OpenAI" }), _jsx("path", { d: "M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z" })] })),
|
|
27
|
-
},
|
|
28
|
-
claude: {
|
|
29
|
-
title: 'Open in Claude',
|
|
30
|
-
createUrl: (q) => `https://claude.ai/new?${new URLSearchParams({
|
|
31
|
-
q,
|
|
32
|
-
})}`,
|
|
33
|
-
icon: (_jsxs("svg", { fill: "currentColor", role: "img", viewBox: "0 0 12 12", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "Claude" }), _jsx("path", { clipRule: "evenodd", d: "M2.3545 7.9775L4.7145 6.654L4.7545 6.539L4.7145 6.475H4.6L4.205 6.451L2.856 6.4145L1.6865 6.366L0.5535 6.305L0.268 6.2445L0 5.892L0.0275 5.716L0.2675 5.5555L0.6105 5.5855L1.3705 5.637L2.5095 5.716L3.3355 5.7645L4.56 5.892H4.7545L4.782 5.8135L4.715 5.7645L4.6635 5.716L3.4845 4.918L2.2085 4.074L1.5405 3.588L1.1785 3.3425L0.9965 3.1115L0.9175 2.6075L1.2455 2.2465L1.686 2.2765L1.7985 2.307L2.245 2.65L3.199 3.388L4.4445 4.3045L4.627 4.4565L4.6995 4.405L4.709 4.3685L4.627 4.2315L3.9495 3.0085L3.2265 1.7635L2.9045 1.2475L2.8195 0.938C2.78711 0.819128 2.76965 0.696687 2.7675 0.5735L3.1415 0.067L3.348 0L3.846 0.067L4.056 0.249L4.366 0.956L4.867 2.0705L5.6445 3.5855L5.8725 4.0345L5.994 4.4505L6.0395 4.578H6.1185V4.505L6.1825 3.652L6.301 2.6045L6.416 1.257L6.456 0.877L6.644 0.422L7.0175 0.176L7.3095 0.316L7.5495 0.6585L7.516 0.8805L7.373 1.806L7.0935 3.2575L6.9115 4.2285H7.0175L7.139 4.1075L7.6315 3.4545L8.4575 2.4225L8.8225 2.0125L9.2475 1.5605L9.521 1.345H10.0375L10.4175 1.9095L10.2475 2.4925L9.7155 3.166L9.275 3.737L8.643 4.587L8.248 5.267L8.2845 5.322L8.3785 5.312L9.8065 5.009L10.578 4.869L11.4985 4.7115L11.915 4.9055L11.9605 5.103L11.7965 5.5065L10.812 5.7495L9.6575 5.9805L7.938 6.387L7.917 6.402L7.9415 6.4325L8.716 6.5055L9.047 6.5235H9.858L11.368 6.636L11.763 6.897L12 7.216L11.9605 7.4585L11.353 7.7685L10.533 7.574L8.6185 7.119L7.9625 6.9545H7.8715V7.0095L8.418 7.5435L9.421 8.4485L10.6755 9.6135L10.739 9.9025L10.578 10.13L10.408 10.1055L9.3055 9.277L8.88 8.9035L7.917 8.0935H7.853V8.1785L8.075 8.503L9.2475 10.2635L9.3085 10.8035L9.2235 10.98L8.9195 11.0865L8.5855 11.0255L7.8985 10.063L7.191 8.9795L6.6195 8.008L6.5495 8.048L6.2125 11.675L6.0545 11.86L5.69 12L5.3865 11.7695L5.2255 11.396L5.3865 10.658L5.581 9.696L5.7385 8.931L5.8815 7.981L5.9665 7.665L5.9605 7.644L5.8905 7.653L5.1735 8.6365L4.0835 10.109L3.2205 11.0315L3.0135 11.1135L2.655 10.9285L2.6885 10.5975L2.889 10.303L4.083 8.785L4.803 7.844L5.268 7.301L5.265 7.222H5.2375L2.066 9.28L1.501 9.353L1.2575 9.125L1.288 8.752L1.4035 8.6305L2.3575 7.9745L2.3545 7.9775Z", fillRule: "evenodd" })] })),
|
|
34
|
-
},
|
|
35
|
-
t3: {
|
|
36
|
-
title: 'Open in T3 Chat',
|
|
37
|
-
createUrl: (q) => `https://t3.chat/new?${new URLSearchParams({
|
|
38
|
-
q,
|
|
39
|
-
})}`,
|
|
40
|
-
icon: _jsx(MessageCircleIcon, {}),
|
|
41
|
-
},
|
|
42
|
-
v0: {
|
|
43
|
-
title: 'Open in v0',
|
|
44
|
-
createUrl: (q) => `https://v0.app?${new URLSearchParams({
|
|
45
|
-
q,
|
|
46
|
-
})}`,
|
|
47
|
-
icon: (_jsxs("svg", { fill: "currentColor", viewBox: "0 0 147 70", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "v0" }), _jsx("path", { d: "M56 50.2031V14H70V60.1562C70 65.5928 65.5928 70 60.1562 70C57.5605 70 54.9982 68.9992 53.1562 67.1573L0 14H19.7969L56 50.2031Z" }), _jsx("path", { d: "M147 56H133V23.9531L100.953 56H133V70H96.6875C85.8144 70 77 61.1856 77 50.3125V14H91V46.1562L123.156 14H91V0H127.312C138.186 0 147 8.81439 147 19.6875V56Z" })] })),
|
|
48
|
-
},
|
|
49
|
-
cursor: {
|
|
50
|
-
title: 'Open in Cursor',
|
|
51
|
-
createUrl: (text) => {
|
|
52
|
-
const url = new URL('https://cursor.com/link/prompt');
|
|
53
|
-
url.searchParams.set('text', text);
|
|
54
|
-
return url.toString();
|
|
55
|
-
},
|
|
56
|
-
icon: (_jsxs("svg", { version: "1.1", viewBox: "0 0 466.73 532.09", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("title", { children: "Cursor" }), _jsx("path", { d: "M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z", fill: "currentColor" })] })),
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
const OpenInContext = createContext(undefined);
|
|
60
|
-
const useOpenInContext = () => {
|
|
61
|
-
const context = useContext(OpenInContext);
|
|
62
|
-
if (!context) {
|
|
63
|
-
throw new Error('OpenIn components must be used within an OpenIn provider');
|
|
64
|
-
}
|
|
65
|
-
return context;
|
|
66
|
-
};
|
|
67
|
-
export const OpenIn = ({ query, ...props }) => (_jsx(OpenInContext.Provider, { value: { query }, children: _jsx(DropdownMenu, { ...props }) }));
|
|
68
|
-
export const OpenInContent = ({ className, ...props }) => (_jsx(DropdownMenuContent, { align: "start", className: cn('w-[240px]', className), ...props }));
|
|
69
|
-
export const OpenInItem = (props) => _jsx(DropdownMenuItem, { ...props });
|
|
70
|
-
export const OpenInLabel = (props) => _jsx(DropdownMenuLabel, { ...props });
|
|
71
|
-
export const OpenInSeparator = (props) => (_jsx(DropdownMenuSeparator, { ...props }));
|
|
72
|
-
export const OpenInTrigger = ({ children, ...props }) => (_jsx(DropdownMenuTrigger, { ...props, asChild: true, children: children ?? (_jsxs(Button, { type: "button", variant: "outline", children: ["Open in chat", _jsx(ChevronDownIcon, { className: "ml-2 size-4" })] })) }));
|
|
73
|
-
export const OpenInChatGPT = (props) => {
|
|
74
|
-
const { query } = useOpenInContext();
|
|
75
|
-
return (_jsx(DropdownMenuItem, { asChild: true, ...props, children: _jsxs("a", { className: "flex items-center gap-2", href: providers.chatgpt.createUrl(query), rel: "noopener", target: "_blank", children: [_jsx("span", { className: "shrink-0", children: providers.chatgpt.icon }), _jsx("span", { className: "flex-1", children: providers.chatgpt.title }), _jsx(ExternalLinkIcon, { className: "size-4 shrink-0" })] }) }));
|
|
76
|
-
};
|
|
77
|
-
export const OpenInClaude = (props) => {
|
|
78
|
-
const { query } = useOpenInContext();
|
|
79
|
-
return (_jsx(DropdownMenuItem, { asChild: true, ...props, children: _jsxs("a", { className: "flex items-center gap-2", href: providers.claude.createUrl(query), rel: "noopener", target: "_blank", children: [_jsx("span", { className: "shrink-0", children: providers.claude.icon }), _jsx("span", { className: "flex-1", children: providers.claude.title }), _jsx(ExternalLinkIcon, { className: "size-4 shrink-0" })] }) }));
|
|
80
|
-
};
|
|
81
|
-
export const OpenInT3 = (props) => {
|
|
82
|
-
const { query } = useOpenInContext();
|
|
83
|
-
return (_jsx(DropdownMenuItem, { asChild: true, ...props, children: _jsxs("a", { className: "flex items-center gap-2", href: providers.t3.createUrl(query), rel: "noopener", target: "_blank", children: [_jsx("span", { className: "shrink-0", children: providers.t3.icon }), _jsx("span", { className: "flex-1", children: providers.t3.title }), _jsx(ExternalLinkIcon, { className: "size-4 shrink-0" })] }) }));
|
|
84
|
-
};
|
|
85
|
-
export const OpenInScira = (props) => {
|
|
86
|
-
const { query } = useOpenInContext();
|
|
87
|
-
return (_jsx(DropdownMenuItem, { asChild: true, ...props, children: _jsxs("a", { className: "flex items-center gap-2", href: providers.scira.createUrl(query), rel: "noopener", target: "_blank", children: [_jsx("span", { className: "shrink-0", children: providers.scira.icon }), _jsx("span", { className: "flex-1", children: providers.scira.title }), _jsx(ExternalLinkIcon, { className: "size-4 shrink-0" })] }) }));
|
|
88
|
-
};
|
|
89
|
-
export const OpenInv0 = (props) => {
|
|
90
|
-
const { query } = useOpenInContext();
|
|
91
|
-
return (_jsx(DropdownMenuItem, { asChild: true, ...props, children: _jsxs("a", { className: "flex items-center gap-2", href: providers.v0.createUrl(query), rel: "noopener", target: "_blank", children: [_jsx("span", { className: "shrink-0", children: providers.v0.icon }), _jsx("span", { className: "flex-1", children: providers.v0.title }), _jsx(ExternalLinkIcon, { className: "size-4 shrink-0" })] }) }));
|
|
92
|
-
};
|
|
93
|
-
export const OpenInCursor = (props) => {
|
|
94
|
-
const { query } = useOpenInContext();
|
|
95
|
-
return (_jsx(DropdownMenuItem, { asChild: true, ...props, children: _jsxs("a", { className: "flex items-center gap-2", href: providers.cursor.createUrl(query), rel: "noopener", target: "_blank", children: [_jsx("span", { className: "shrink-0", children: providers.cursor.icon }), _jsx("span", { className: "flex-1", children: providers.cursor.title }), _jsx(ExternalLinkIcon, { className: "size-4 shrink-0" })] }) }));
|
|
96
|
-
};
|
|
97
|
-
//# sourceMappingURL=open-in-chat.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"open-in-chat.js","sourceRoot":"","sources":["../../../src/components/ai-elements/open-in-chat.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EACN,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,EAAuB,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEvE,MAAM,SAAS,GAAG;IACjB,MAAM,EAAE;QACP,KAAK,EAAE,gBAAgB;QACvB,SAAS,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG;QAC/B,IAAI,EAAE,CACL,eAAK,IAAI,EAAC,cAAc,EAAC,IAAI,EAAC,KAAK,EAAC,OAAO,EAAC,WAAW,aACtD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AClC,aACC,SAAS,EAAC,yBAAyB,EACnC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EACvC,GAAG,EAAC,UAAU,EACd,MAAM,EAAC,QAAQ,aAEf,eAAM,SAAS,EAAC,UAAU,YAAE,SAAS,CAAC,MAAM,CAAC,IAAI,GAAQ,EACzD,eAAM,SAAS,EAAC,QAAQ,YAAE,SAAS,CAAC,MAAM,CAAC,KAAK,GAAQ,EACxD,KAAC,gBAAgB,IAAC,SAAS,EAAC,iBAAiB,GAAG,IAC7C,GACc,CACnB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Panel as PanelPrimitive } from '@xyflow/react';
|
|
2
|
-
import type { ComponentProps } from 'react';
|
|
3
|
-
type PanelProps = ComponentProps<typeof PanelPrimitive>;
|
|
4
|
-
export declare const Panel: ({ className, ...props }: PanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export {};
|
|
6
|
-
//# sourceMappingURL=panel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/panel.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,KAAK,UAAU,GAAG,cAAc,CAAC,OAAO,cAAc,CAAC,CAAC;AAExD,eAAO,MAAM,KAAK,GAAI,yBAAyB,UAAU,4CAKxD,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '../../lib/utils';
|
|
3
|
-
import { Panel as PanelPrimitive } from '@xyflow/react';
|
|
4
|
-
export const Panel = ({ className, ...props }) => (_jsx(PanelPrimitive, { className: cn('m-4 overflow-hidden rounded-md border bg-card p-1', className), ...props }));
|
|
5
|
-
//# sourceMappingURL=panel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"panel.js","sourceRoot":"","sources":["../../../src/components/ai-elements/panel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AAKxD,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAc,EAAE,EAAE,CAAC,CAC7D,KAAC,cAAc,IACd,SAAS,EAAE,EAAE,CAAC,mDAAmD,EAAE,SAAS,CAAC,KACzE,KAAK,GACR,CACF,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { CardAction, CardContent, CardDescription, CardHeader, CardTitle } from '../ui/card';
|
|
2
|
-
import { Collapsible, CollapsibleTrigger } from '../ui/collapsible';
|
|
3
|
-
import type { ComponentProps } from 'react';
|
|
4
|
-
export type PlanProps = ComponentProps<typeof Collapsible> & {
|
|
5
|
-
isStreaming?: boolean;
|
|
6
|
-
};
|
|
7
|
-
export declare const Plan: ({ className, isStreaming, children, ...props }: PlanProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export type PlanHeaderProps = ComponentProps<typeof CardHeader>;
|
|
9
|
-
export declare const PlanHeader: ({ className, ...props }: PlanHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export type PlanTitleProps = Omit<ComponentProps<typeof CardTitle>, 'children'> & {
|
|
11
|
-
children: string;
|
|
12
|
-
};
|
|
13
|
-
export declare const PlanTitle: ({ children, ...props }: PlanTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export type PlanDescriptionProps = Omit<ComponentProps<typeof CardDescription>, 'children'> & {
|
|
15
|
-
children: string;
|
|
16
|
-
};
|
|
17
|
-
export declare const PlanDescription: ({ className, children, ...props }: PlanDescriptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export type PlanActionProps = ComponentProps<typeof CardAction>;
|
|
19
|
-
export declare const PlanAction: (props: PlanActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export type PlanContentProps = ComponentProps<typeof CardContent>;
|
|
21
|
-
export declare const PlanContent: (props: PlanContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export type PlanFooterProps = ComponentProps<'div'>;
|
|
23
|
-
export declare const PlanFooter: (props: PlanFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export type PlanTriggerProps = ComponentProps<typeof CollapsibleTrigger>;
|
|
25
|
-
export declare const PlanTrigger: ({ className, ...props }: PlanTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/plan.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEN,UAAU,EACV,WAAW,EACX,eAAe,EAEf,UAAU,EACV,SAAS,EACT,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAsB,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAkB5C,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,GAAG;IAC5D,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,gDAAwD,SAAS,4CAMrF,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC;AAEhE,eAAO,MAAM,UAAU,GAAI,yBAAyB,eAAe,4CAMlE,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,EAAE,UAAU,CAAC,GAAG;IACjF,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,wBAAwB,cAAc,4CAQ/D,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,EAAE,UAAU,CAAC,GAAG;IAC7F,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,mCAAmC,oBAAoB,4CAYtF,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC;AAEhE,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,4CAEhD,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC;AAElE,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,4CAIlD,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEpD,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,4CAEhD,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEzE,eAAO,MAAM,WAAW,GAAI,yBAAyB,gBAAgB,4CAapE,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Button } from '../ui/button';
|
|
4
|
-
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from '../ui/card';
|
|
5
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible';
|
|
6
|
-
import { cn } from '../../lib/utils';
|
|
7
|
-
import { ChevronsUpDownIcon } from 'lucide-react';
|
|
8
|
-
import { createContext, useContext } from 'react';
|
|
9
|
-
import { Shimmer } from './shimmer';
|
|
10
|
-
const PlanContext = createContext(null);
|
|
11
|
-
const usePlan = () => {
|
|
12
|
-
const context = useContext(PlanContext);
|
|
13
|
-
if (!context) {
|
|
14
|
-
throw new Error('Plan components must be used within Plan');
|
|
15
|
-
}
|
|
16
|
-
return context;
|
|
17
|
-
};
|
|
18
|
-
export const Plan = ({ className, isStreaming = false, children, ...props }) => (_jsx(PlanContext.Provider, { value: { isStreaming }, children: _jsx(Collapsible, { asChild: true, "data-slot": "plan", ...props, children: _jsx(Card, { className: cn('shadow-none', className), children: children }) }) }));
|
|
19
|
-
export const PlanHeader = ({ className, ...props }) => (_jsx(CardHeader, { className: cn('flex items-start justify-between', className), "data-slot": "plan-header", ...props }));
|
|
20
|
-
export const PlanTitle = ({ children, ...props }) => {
|
|
21
|
-
const { isStreaming } = usePlan();
|
|
22
|
-
return (_jsx(CardTitle, { "data-slot": "plan-title", ...props, children: isStreaming ? _jsx(Shimmer, { children: children }) : children }));
|
|
23
|
-
};
|
|
24
|
-
export const PlanDescription = ({ className, children, ...props }) => {
|
|
25
|
-
const { isStreaming } = usePlan();
|
|
26
|
-
return (_jsx(CardDescription, { className: cn('text-balance', className), "data-slot": "plan-description", ...props, children: isStreaming ? _jsx(Shimmer, { children: children }) : children }));
|
|
27
|
-
};
|
|
28
|
-
export const PlanAction = (props) => (_jsx(CardAction, { "data-slot": "plan-action", ...props }));
|
|
29
|
-
export const PlanContent = (props) => (_jsx(CollapsibleContent, { asChild: true, children: _jsx(CardContent, { "data-slot": "plan-content", ...props }) }));
|
|
30
|
-
export const PlanFooter = (props) => (_jsx(CardFooter, { "data-slot": "plan-footer", ...props }));
|
|
31
|
-
export const PlanTrigger = ({ className, ...props }) => (_jsx(CollapsibleTrigger, { asChild: true, children: _jsxs(Button, { className: cn('size-8', className), "data-slot": "plan-trigger", size: "icon", variant: "ghost", ...props, children: [_jsx(ChevronsUpDownIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Toggle plan" })] }) }));
|
|
32
|
-
//# sourceMappingURL=plan.js.map
|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AIF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAE,EAAE,CAAC,CACrD,KAAC,UAAU,iBAAW,aAAa,KAAK,KAAK,GAAI,CACjD,CAAC;AAIF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoB,EAAE,EAAE,CAAC,CACzE,KAAC,kBAAkB,IAAC,OAAO,kBAC1B,MAAC,MAAM,IACN,SAAS,EAAE,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,eACxB,cAAc,EACxB,IAAI,EAAC,MAAM,EACX,OAAO,EAAC,OAAO,KACX,KAAK,aAET,KAAC,kBAAkB,IAAC,SAAS,EAAC,QAAQ,GAAG,EACzC,eAAM,SAAS,EAAC,SAAS,4BAAmB,IACpC,GACW,CACrB,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { Button } from '../ui/button';
|
|
2
|
-
import { Collapsible, CollapsibleContent } from '../ui/collapsible';
|
|
3
|
-
import { ScrollArea } from '../ui/scroll-area';
|
|
4
|
-
import type { ComponentProps } from 'react';
|
|
5
|
-
export type QueueMessagePart = {
|
|
6
|
-
type: string;
|
|
7
|
-
text?: string;
|
|
8
|
-
url?: string;
|
|
9
|
-
filename?: string;
|
|
10
|
-
mediaType?: string;
|
|
11
|
-
};
|
|
12
|
-
export type QueueMessage = {
|
|
13
|
-
id: string;
|
|
14
|
-
parts: QueueMessagePart[];
|
|
15
|
-
};
|
|
16
|
-
export type QueueTodo = {
|
|
17
|
-
id: string;
|
|
18
|
-
title: string;
|
|
19
|
-
description?: string;
|
|
20
|
-
status?: 'pending' | 'completed';
|
|
21
|
-
};
|
|
22
|
-
export type QueueItemProps = ComponentProps<'li'>;
|
|
23
|
-
export declare const QueueItem: ({ className, ...props }: QueueItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export type QueueItemIndicatorProps = ComponentProps<'span'> & {
|
|
25
|
-
completed?: boolean;
|
|
26
|
-
};
|
|
27
|
-
export declare const QueueItemIndicator: ({ completed, className, ...props }: QueueItemIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
export type QueueItemContentProps = ComponentProps<'span'> & {
|
|
29
|
-
completed?: boolean;
|
|
30
|
-
};
|
|
31
|
-
export declare const QueueItemContent: ({ completed, className, ...props }: QueueItemContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
export type QueueItemDescriptionProps = ComponentProps<'div'> & {
|
|
33
|
-
completed?: boolean;
|
|
34
|
-
};
|
|
35
|
-
export declare const QueueItemDescription: ({ completed, className, ...props }: QueueItemDescriptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
-
export type QueueItemActionsProps = ComponentProps<'div'>;
|
|
37
|
-
export declare const QueueItemActions: ({ className, ...props }: QueueItemActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
-
export type QueueItemActionProps = Omit<ComponentProps<typeof Button>, 'variant' | 'size'>;
|
|
39
|
-
export declare const QueueItemAction: ({ className, ...props }: QueueItemActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
-
export type QueueItemAttachmentProps = ComponentProps<'div'>;
|
|
41
|
-
export declare const QueueItemAttachment: ({ className, ...props }: QueueItemAttachmentProps) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
-
export type QueueItemImageProps = ComponentProps<'img'>;
|
|
43
|
-
export declare const QueueItemImage: ({ className, ...props }: QueueItemImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
44
|
-
export type QueueItemFileProps = ComponentProps<'span'>;
|
|
45
|
-
export declare const QueueItemFile: ({ children, className, ...props }: QueueItemFileProps) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
-
export type QueueListProps = ComponentProps<typeof ScrollArea>;
|
|
47
|
-
export declare const QueueList: ({ children, className, ...props }: QueueListProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
-
export type QueueSectionProps = ComponentProps<typeof Collapsible>;
|
|
49
|
-
export declare const QueueSection: ({ className, defaultOpen, ...props }: QueueSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
-
export type QueueSectionTriggerProps = ComponentProps<'button'>;
|
|
51
|
-
export declare const QueueSectionTrigger: ({ children, className, ...props }: QueueSectionTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
-
export type QueueSectionLabelProps = ComponentProps<'span'> & {
|
|
53
|
-
count?: number;
|
|
54
|
-
label: string;
|
|
55
|
-
icon?: React.ReactNode;
|
|
56
|
-
};
|
|
57
|
-
export declare const QueueSectionLabel: ({ count, label, icon, className, ...props }: QueueSectionLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
58
|
-
export type QueueSectionContentProps = ComponentProps<typeof CollapsibleContent>;
|
|
59
|
-
export declare const QueueSectionContent: ({ className, ...props }: QueueSectionContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
60
|
-
export type QueueProps = ComponentProps<'div'>;
|
|
61
|
-
export declare const Queue: ({ className, ...props }: QueueProps) => import("react/jsx-runtime").JSX.Element;
|
|
62
|
-
//# sourceMappingURL=queue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/queue.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAsB,MAAM,mBAAmB,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,M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KAAK,GAAI,yBAAyB,UAAU,4CAQxD,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Button } from '../ui/button';
|
|
4
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible';
|
|
5
|
-
import { ScrollArea } from '../ui/scroll-area';
|
|
6
|
-
import { cn } from '../../lib/utils';
|
|
7
|
-
import { ChevronDownIcon, PaperclipIcon } from 'lucide-react';
|
|
8
|
-
export const QueueItem = ({ className, ...props }) => (_jsx("li", { className: cn('group flex flex-col gap-1 rounded-md px-3 py-1 text-sm transition-colors hover:bg-muted', className), ...props }));
|
|
9
|
-
export const QueueItemIndicator = ({ completed = false, className, ...props }) => (_jsx("span", { className: cn('mt-0.5 inline-block size-2.5 rounded-full border', completed
|
|
10
|
-
? 'border-muted-foreground/20 bg-muted-foreground/10'
|
|
11
|
-
: 'border-muted-foreground/50', className), ...props }));
|
|
12
|
-
export const QueueItemContent = ({ completed = false, className, ...props }) => (_jsx("span", { className: cn('line-clamp-1 grow break-words', completed ? 'text-muted-foreground/50 line-through' : 'text-muted-foreground', className), ...props }));
|
|
13
|
-
export const QueueItemDescription = ({ completed = false, className, ...props }) => (_jsx("div", { className: cn('ml-6 text-xs', completed ? 'text-muted-foreground/40 line-through' : 'text-muted-foreground', className), ...props }));
|
|
14
|
-
export const QueueItemActions = ({ className, ...props }) => (_jsx("div", { className: cn('flex gap-1', className), ...props }));
|
|
15
|
-
export const QueueItemAction = ({ className, ...props }) => (_jsx(Button, { className: cn('size-auto rounded p-1 text-muted-foreground opacity-0 transition-opacity hover:bg-muted-foreground/10 hover:text-foreground group-hover:opacity-100', className), size: "icon", type: "button", variant: "ghost", ...props }));
|
|
16
|
-
export const QueueItemAttachment = ({ className, ...props }) => (_jsx("div", { className: cn('mt-1 flex flex-wrap gap-2', className), ...props }));
|
|
17
|
-
export const QueueItemImage = ({ className, ...props }) => (_jsx("img", { alt: "", className: cn('h-8 w-8 rounded border object-cover', className), height: 32, width: 32, ...props }));
|
|
18
|
-
export const QueueItemFile = ({ children, className, ...props }) => (_jsxs("span", { className: cn('flex items-center gap-1 rounded border bg-muted px-2 py-1 text-xs', className), ...props, children: [_jsx(PaperclipIcon, { size: 12 }), _jsx("span", { className: "max-w-[100px] truncate", children: children })] }));
|
|
19
|
-
export const QueueList = ({ children, className, ...props }) => (_jsx(ScrollArea, { className: cn('-mb-1 mt-2', className), ...props, children: _jsx("div", { className: "max-h-40 pr-4", children: _jsx("ul", { children: children }) }) }));
|
|
20
|
-
export const QueueSection = ({ className, defaultOpen = true, ...props }) => (_jsx(Collapsible, { className: cn(className), defaultOpen: defaultOpen, ...props }));
|
|
21
|
-
export const QueueSectionTrigger = ({ children, className, ...props }) => (_jsx(CollapsibleTrigger, { asChild: true, children: _jsx("button", { className: cn('group flex w-full items-center justify-between rounded-md bg-muted/40 px-3 py-2 text-left font-medium text-muted-foreground text-sm transition-colors hover:bg-muted', className), type: "button", ...props, children: children }) }));
|
|
22
|
-
export const QueueSectionLabel = ({ count, label, icon, className, ...props }) => (_jsxs("span", { className: cn('flex items-center gap-2', className), ...props, children: [_jsx(ChevronDownIcon, { className: "group-data-[state=closed]:-rotate-90 size-4 transition-transform" }), icon, _jsxs("span", { children: [count, " ", label] })] }));
|
|
23
|
-
export const QueueSectionContent = ({ className, ...props }) => (_jsx(CollapsibleContent, { className: cn(className), ...props }));
|
|
24
|
-
export const Queue = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col gap-2 rounded-xl border border-border bg-background px-3 pt-2 pb-2 shadow-xs', className), ...props }));
|
|
25
|
-
//# sourceMappingURL=queue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../../src/components/ai-elements/queue.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,MAAM,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ACzF,KAAC,kBAAkB,IAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,KAAM,KAAK,GAAI,CAC3D,CAAC;AAIF,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAc,EAAE,EAAE,CAAC,CAC7D,cACC,SAAS,EAAE,EAAE,CACZ,4FAA4F,EAC5F,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps } from 'react';
|
|
2
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible';
|
|
3
|
-
export type ReasoningProps = ComponentProps<typeof Collapsible> & {
|
|
4
|
-
isStreaming?: boolean;
|
|
5
|
-
open?: boolean;
|
|
6
|
-
defaultOpen?: boolean;
|
|
7
|
-
onOpenChange?: (open: boolean) => void;
|
|
8
|
-
duration?: number;
|
|
9
|
-
};
|
|
10
|
-
export declare const Reasoning: import("react").MemoExoticComponent<({ className, isStreaming, open, defaultOpen, onOpenChange, duration: durationProp, children, ...props }: ReasoningProps) => import("react/jsx-runtime").JSX.Element>;
|
|
11
|
-
export type ReasoningTriggerProps = ComponentProps<typeof CollapsibleTrigger>;
|
|
12
|
-
export declare const ReasoningTrigger: import("react").MemoExoticComponent<({ className, children, ...props }: ReasoningTriggerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
13
|
-
export type ReasoningContentProps = ComponentProps<typeof CollapsibleContent> & {
|
|
14
|
-
children: string;
|
|
15
|
-
};
|
|
16
|
-
export declare const ReasoningContent: import("react").MemoExoticComponent<({ className, children, ...props }: ReasoningContentProps) => import("react/jsx-runtime").JSX.Element>;
|
|
17
|
-
//# sourceMappingURL=reasoning.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reasoning.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/reasoning.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAsBxF,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,GAAG;IACjE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAKF,eAAO,MAAM,SAAS,gJAUlB,cAAc,6CAwDjB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAY9E,eAAO,MAAM,gBAAgB,0EAA4C,qBAAqB,6CAsB5F,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,GAAG;IAC/E,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,gBAAgB,0EAA4C,qBAAqB,6CAW5F,CAAC"}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
|
4
|
-
import { BrainIcon, ChevronDownIcon } from 'lucide-react';
|
|
5
|
-
import { createContext, memo, useContext, useEffect, useState } from 'react';
|
|
6
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible';
|
|
7
|
-
import { cn } from '../../lib/utils';
|
|
8
|
-
import { Response } from './response';
|
|
9
|
-
import { Shimmer } from './shimmer';
|
|
10
|
-
const ReasoningContext = createContext(null);
|
|
11
|
-
const useReasoning = () => {
|
|
12
|
-
const context = useContext(ReasoningContext);
|
|
13
|
-
if (!context) {
|
|
14
|
-
throw new Error('Reasoning components must be used within Reasoning');
|
|
15
|
-
}
|
|
16
|
-
return context;
|
|
17
|
-
};
|
|
18
|
-
const AUTO_CLOSE_DELAY = 1000;
|
|
19
|
-
const MS_IN_S = 1000;
|
|
20
|
-
export const Reasoning = memo(({ className, isStreaming = false, open, defaultOpen = true, onOpenChange, duration: durationProp, children, ...props }) => {
|
|
21
|
-
const [isOpen, setIsOpen] = useControllableState({
|
|
22
|
-
prop: open,
|
|
23
|
-
defaultProp: defaultOpen,
|
|
24
|
-
onChange: onOpenChange,
|
|
25
|
-
});
|
|
26
|
-
const [duration, setDuration] = useControllableState({
|
|
27
|
-
prop: durationProp,
|
|
28
|
-
defaultProp: 0,
|
|
29
|
-
});
|
|
30
|
-
const [hasAutoClosed, setHasAutoClosed] = useState(false);
|
|
31
|
-
const [startTime, setStartTime] = useState(null);
|
|
32
|
-
// Track duration when streaming starts and ends
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
if (isStreaming) {
|
|
35
|
-
if (startTime === null) {
|
|
36
|
-
setStartTime(Date.now());
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
else if (startTime !== null) {
|
|
40
|
-
setDuration(Math.ceil((Date.now() - startTime) / MS_IN_S));
|
|
41
|
-
setStartTime(null);
|
|
42
|
-
}
|
|
43
|
-
}, [isStreaming, startTime, setDuration]);
|
|
44
|
-
// Auto-open when streaming starts, auto-close when streaming ends (once only)
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
if (defaultOpen && !isStreaming && isOpen && !hasAutoClosed) {
|
|
47
|
-
// Add a small delay before closing to allow user to see the content
|
|
48
|
-
const timer = setTimeout(() => {
|
|
49
|
-
setIsOpen(false);
|
|
50
|
-
setHasAutoClosed(true);
|
|
51
|
-
}, AUTO_CLOSE_DELAY);
|
|
52
|
-
return () => clearTimeout(timer);
|
|
53
|
-
}
|
|
54
|
-
}, [isStreaming, isOpen, defaultOpen, setIsOpen, hasAutoClosed]);
|
|
55
|
-
const handleOpenChange = (newOpen) => {
|
|
56
|
-
setIsOpen(newOpen);
|
|
57
|
-
};
|
|
58
|
-
return (_jsx(ReasoningContext.Provider, { value: { isStreaming, isOpen, setIsOpen, duration }, children: _jsx(Collapsible, { className: cn('not-prose mb-4', className), onOpenChange: handleOpenChange, open: isOpen, ...props, children: children }) }));
|
|
59
|
-
});
|
|
60
|
-
const getThinkingMessage = (isStreaming, duration) => {
|
|
61
|
-
if (isStreaming || duration === 0) {
|
|
62
|
-
return _jsx(Shimmer, { duration: 1, children: "Thinking..." });
|
|
63
|
-
}
|
|
64
|
-
if (duration === undefined) {
|
|
65
|
-
return _jsx("p", { children: "Thought for a few seconds" });
|
|
66
|
-
}
|
|
67
|
-
return _jsxs("p", { children: ["Thought for ", duration, " seconds"] });
|
|
68
|
-
};
|
|
69
|
-
export const ReasoningTrigger = memo(({ className, children, ...props }) => {
|
|
70
|
-
const { isStreaming, isOpen, duration } = useReasoning();
|
|
71
|
-
return (_jsx(CollapsibleTrigger, { className: cn('flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground', className), ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsx(BrainIcon, { className: "size-4" }), getThinkingMessage(isStreaming, duration), _jsx(ChevronDownIcon, { className: cn('size-4 transition-transform', isOpen ? 'rotate-180' : 'rotate-0') })] })) }));
|
|
72
|
-
});
|
|
73
|
-
export const ReasoningContent = memo(({ className, children, ...props }) => (_jsx(CollapsibleContent, { className: cn('mt-4 text-sm', 'data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in', className), ...props, children: _jsx(Response, { className: "grid gap-2", children: children }) })));
|
|
74
|
-
Reasoning.displayName = 'Reasoning';
|
|
75
|
-
ReasoningTrigger.displayName = 'ReasoningTrigger';
|
|
76
|
-
ReasoningContent.displayName = 'ReasoningContent';
|
|
77
|
-
//# sourceMappingURL=reasoning.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reasoning.js","sourceRoot":"","sources":["../../../src/components/ai-elements/reasoning.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACxF,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,MAAM,gBAAgB,GAAG,aAAa,CAA+B,IAAI,CAAC,CAAC;AAE3E,MAAM,YAAY,GAAG,GAAG,EAAE;IACzB,MAAM,OAAO,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC7C,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC,CAAC;AAUF,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,OAAO,GAAG,IAAI,CAAC;AAErB,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAC5B,CAAC,EACA,SAAS,EACT,WAAW,GAAG,KAAK,EACnB,IAAI,EACJ,WAAW,GAAG,IAAI,EAClB,YAAY,EACZ,QAAQ,EAAE,YAAY,EACtB,QAAQ,EACR,GAAG,KAAK,EACQ,EAAE,EAAE;IACpB,MAAM,CAAC,MAAM,EAAE,SAAS,CAA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,EAAC,QAAQ,GAAG,EAC/B,kBAAkB,CAAC,WAAW,EAAE,QAAQ,CAAC,EAC1C,KAAC,eAAe,IACf,SAAS,EAAE,EAAE,CAAC,6BAA6B,EAAE,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,GAC/E,IACA,CACH,GACmB,CACrB,CAAC;AACH,CAAC,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAyB,EAAE,EAAE,CAAC,CAClG,KAAC,kBAAkB,IAClB,SAAS,EAAE,EAAE,CACZ,cAAc,EACd,6MAA6M,EAC7M,SAAS,CACT,KACG,KAAK,YAET,KAAC,QAAQ,IAAC,SAAS,EAAC,YAAY,YAAE,QAAQ,GAAY,GAClC,CACrB,CAAC,CAAC;AAEH,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AACpC,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AAClD,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type ComponentProps } from 'react';
|
|
2
|
-
import { Streamdown } from 'streamdown';
|
|
3
|
-
type ResponseProps = ComponentProps<typeof Streamdown>;
|
|
4
|
-
export declare const Response: import("react").MemoExoticComponent<({ className, ...props }: ResponseProps) => import("react/jsx-runtime").JSX.Element>;
|
|
5
|
-
export {};
|
|
6
|
-
//# sourceMappingURL=response.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/response.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAAQ,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,KAAK,aAAa,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC;AAEvD,eAAO,MAAM,QAAQ,gEACM,aAAa,6CAOvC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from '../../lib/utils';
|
|
4
|
-
import { memo } from 'react';
|
|
5
|
-
import { Streamdown } from 'streamdown';
|
|
6
|
-
export const Response = memo(({ className, ...props }) => (_jsx(Streamdown, { className: cn('size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0', className), ...props })), (prevProps, nextProps) => prevProps.children === nextProps.children);
|
|
7
|
-
Response.displayName = 'Response';
|
|
8
|
-
//# sourceMappingURL=response.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/components/ai-elements/response.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAuB,IAAI,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIxC,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAC3B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAiB,EAAE,EAAE,CAAC,CAC3C,KAAC,UAAU,IACV,SAAS,EAAE,EAAE,CAAC,wDAAwD,EAAE,SAAS,CAAC,KAC9E,KAAK,GACR,CACF,EACD,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ,CACnE,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible';
|
|
2
|
-
import type { ComponentProps } from 'react';
|
|
3
|
-
export type SourcesProps = ComponentProps<'div'>;
|
|
4
|
-
export declare const Sources: ({ className, ...props }: SourcesProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export type SourcesTriggerProps = ComponentProps<typeof CollapsibleTrigger> & {
|
|
6
|
-
count: number;
|
|
7
|
-
};
|
|
8
|
-
export declare const SourcesTrigger: ({ className, count, children, ...props }: SourcesTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export type SourcesContentProps = ComponentProps<typeof CollapsibleContent>;
|
|
10
|
-
export declare const SourcesContent: ({ className, ...props }: SourcesContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export type SourceProps = ComponentProps<'a'>;
|
|
12
|
-
export declare const Source: ({ href, title, children, ...props }: SourceProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
//# sourceMappingURL=sources.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/sources.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAe,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEjD,eAAO,MAAM,OAAO,GAAI,yBAAyB,YAAY,4CAE5D,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,GAAG;IAC7E,KAAK,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,0CAA0C,mBAAmB,4CAS3F,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE5E,eAAO,MAAM,cAAc,GAAI,yBAAyB,mBAAmB,4CAS1E,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;AAE9C,eAAO,MAAM,MAAM,GAAI,qCAAqC,WAAW,4CAStE,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
5
|
-
import { BookIcon, ChevronDownIcon } from 'lucide-react';
|
|
6
|
-
export const Sources = ({ className, ...props }) => (_jsx(Collapsible, { className: cn('not-prose mb-4 text-primary text-xs', className), ...props }));
|
|
7
|
-
export const SourcesTrigger = ({ className, count, children, ...props }) => (_jsx(CollapsibleTrigger, { className: cn('flex items-center gap-2', className), ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsxs("p", { className: "font-medium", children: ["Used ", count, " sources"] }), _jsx(ChevronDownIcon, { className: "h-4 w-4" })] })) }));
|
|
8
|
-
export const SourcesContent = ({ className, ...props }) => (_jsx(CollapsibleContent, { className: cn('mt-3 flex w-fit flex-col gap-2', 'data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 outline-none data-[state=closed]:animate-out data-[state=open]:animate-in', className), ...props }));
|
|
9
|
-
export const Source = ({ href, title, children, ...props }) => (_jsx("a", { className: "flex items-center gap-2", href: href, rel: "noreferrer", target: "_blank", ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsx(BookIcon, { className: "h-4 w-4" }), _jsx("span", { className: "block font-medium", children: title })] })) }));
|
|
10
|
-
//# sourceMappingURL=sources.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sources.js","sourceRoot":"","sources":["../../../src/components/ai-elements/sources.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACxF,OAAO,EAAE,EAAE,EAAE,M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,IAChD,CACH,GACE,CACJ,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps } from 'react';
|
|
2
|
-
import { Button } from '../ui/button';
|
|
3
|
-
import { ScrollArea } from '../ui/scroll-area';
|
|
4
|
-
export type SuggestionsProps = ComponentProps<typeof ScrollArea>;
|
|
5
|
-
export declare const Suggestions: ({ className, children, ...props }: SuggestionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export type SuggestionProps = Omit<ComponentProps<typeof Button>, 'onClick'> & {
|
|
7
|
-
suggestion: string;
|
|
8
|
-
onClick?: (suggestion: string) => void;
|
|
9
|
-
};
|
|
10
|
-
export declare const Suggestion: ({ suggestion, onClick, className, variant, size, children, ...props }: SuggestionProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
//# sourceMappingURL=suggestion.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/suggestion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,UAAU,EAAa,MAAM,mBAAmB,CAAC;AAG1D,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC;AAEjE,eAAO,MAAM,WAAW,GAAI,mCAAmC,gBAAgB,4CAK9E,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,SAAS,CAAC,GAAG;IAC9E,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,uEAQxB,eAAe,4CAiBjB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Button } from '../ui/button';
|
|
4
|
-
import { ScrollArea, ScrollBar } from '../ui/scroll-area';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
6
|
-
export const Suggestions = ({ className, children, ...props }) => (_jsxs(ScrollArea, { className: "w-full overflow-x-auto whitespace-nowrap", ...props, children: [_jsx("div", { className: cn('flex w-max flex-nowrap items-center gap-2', className), children: children }), _jsx(ScrollBar, { className: "hidden", orientation: "horizontal" })] }));
|
|
7
|
-
export const Suggestion = ({ suggestion, onClick, className, variant = 'outline', size = 'sm', children, ...props }) => {
|
|
8
|
-
const handleClick = () => {
|
|
9
|
-
onClick?.(suggestion);
|
|
10
|
-
};
|
|
11
|
-
return (_jsx(Button, { className: cn('cursor-pointer rounded-full px-4', className), onClick: handleClick, size: size, type: "button", variant: variant, ...props, children: children || suggestion }));
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=suggestion.js.map
|