@chatsdk-dev/elements 0.0.1
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/README.md +43 -0
- package/dist/chunk-2LHKM7RD.js +14 -0
- package/dist/chunk-5UMYP6MD.js +10 -0
- package/dist/chunk-AP4MG32M.js +36 -0
- package/dist/chunk-CFM57HOS.js +358 -0
- package/dist/chunk-EGIUE7H2.js +37 -0
- package/dist/chunk-M5OONVIO.js +90 -0
- package/dist/chunk-MXTBCHYC.js +31 -0
- package/dist/chunk-NIC3MOMY.js +55 -0
- package/dist/chunk-QTRMNIG3.js +83 -0
- package/dist/chunk-R7G3RQLU.js +36 -0
- package/dist/chunk-RJG5D2TM.js +113 -0
- package/dist/chunk-SLJNKQ2G.js +125 -0
- package/dist/chunk-TDEFIW2L.js +9 -0
- package/dist/chunk-TDP6D7U7.js +551 -0
- package/dist/chunk-V2ITXC65.js +24 -0
- package/dist/chunk-VS55HRUS.js +16 -0
- package/dist/chunk-VYDYCGJL.js +25 -0
- package/dist/chunk-X5YUF2YM.js +113 -0
- package/dist/chunk-YX46JVQN.js +78 -0
- package/dist/chunk-YXAMLTTT.js +16 -0
- package/dist/chunk-YXFVHSY4.js +51 -0
- package/dist/chunk-ZCSZX3OI.js +4 -0
- package/dist/common/use-copy-to-clipboard.d.ts +3 -0
- package/dist/common/use-copy-to-clipboard.js +33 -0
- package/dist/common/utilts.d.ts +8 -0
- package/dist/common/utilts.js +28 -0
- package/dist/components/ai-elements/actions.d.ts +13 -0
- package/dist/components/ai-elements/actions.js +42 -0
- package/dist/components/ai-elements/agent.d.ts +31 -0
- package/dist/components/ai-elements/agent.js +77 -0
- package/dist/components/ai-elements/artifact.d.ts +27 -0
- package/dist/components/ai-elements/artifact.js +108 -0
- package/dist/components/ai-elements/attachments.d.ts +57 -0
- package/dist/components/ai-elements/attachments.js +258 -0
- package/dist/components/ai-elements/audio-player.d.ts +33 -0
- package/dist/components/ai-elements/audio-player.js +199 -0
- package/dist/components/ai-elements/canvas.d.ts +10 -0
- package/dist/components/ai-elements/canvas.js +24 -0
- package/dist/components/ai-elements/chain-of-thought.d.ts +34 -0
- package/dist/components/ai-elements/chain-of-thought.js +159 -0
- package/dist/components/ai-elements/checkpoint.d.ts +16 -0
- package/dist/components/ai-elements/checkpoint.js +47 -0
- package/dist/components/ai-elements/code-block.d.ts +48 -0
- package/dist/components/ai-elements/code-block.js +1 -0
- package/dist/components/ai-elements/commit.d.ts +68 -0
- package/dist/components/ai-elements/commit.js +314 -0
- package/dist/components/ai-elements/confirmation.d.ts +52 -0
- package/dist/components/ai-elements/confirmation.js +76 -0
- package/dist/components/ai-elements/connection.d.ts +5 -0
- package/dist/components/ai-elements/connection.js +34 -0
- package/dist/components/ai-elements/context.d.ts +36 -0
- package/dist/components/ai-elements/context.js +320 -0
- package/dist/components/ai-elements/controls.d.ts +8 -0
- package/dist/components/ai-elements/controls.js +17 -0
- package/dist/components/ai-elements/conversation.d.ts +27 -0
- package/dist/components/ai-elements/conversation.js +119 -0
- package/dist/components/ai-elements/edge.d.ts +9 -0
- package/dist/components/ai-elements/edge.js +111 -0
- package/dist/components/ai-elements/environment-variables.d.ts +42 -0
- package/dist/components/ai-elements/environment-variables.js +208 -0
- package/dist/components/ai-elements/file-tree.d.ts +30 -0
- package/dist/components/ai-elements/file-tree.js +212 -0
- package/dist/components/ai-elements/image.d.ts +10 -0
- package/dist/components/ai-elements/image.js +23 -0
- package/dist/components/ai-elements/inline-citation.d.ts +42 -0
- package/dist/components/ai-elements/inline-citation.js +203 -0
- package/dist/components/ai-elements/jsx-preview.d.ts +33 -0
- package/dist/components/ai-elements/jsx-preview.js +206 -0
- package/dist/components/ai-elements/loader.d.ts +9 -0
- package/dist/components/ai-elements/loader.js +115 -0
- package/dist/components/ai-elements/message.d.ts +42 -0
- package/dist/components/ai-elements/message.js +259 -0
- package/dist/components/ai-elements/mic-selector.d.ts +49 -0
- package/dist/components/ai-elements/mic-selector.js +252 -0
- package/dist/components/ai-elements/model-selector.d.ts +39 -0
- package/dist/components/ai-elements/model-selector.js +73 -0
- package/dist/components/ai-elements/node.d.ts +25 -0
- package/dist/components/ai-elements/node.js +41 -0
- package/dist/components/ai-elements/open-in-chat.d.ts +32 -0
- package/dist/components/ai-elements/open-in-chat.js +366 -0
- package/dist/components/ai-elements/package-info.d.ts +32 -0
- package/dist/components/ai-elements/package-info.js +162 -0
- package/dist/components/ai-elements/panel.d.ts +8 -0
- package/dist/components/ai-elements/panel.js +17 -0
- package/dist/components/ai-elements/persona.d.ts +50 -0
- package/dist/components/ai-elements/persona.js +209 -0
- package/dist/components/ai-elements/plan.d.ts +29 -0
- package/dist/components/ai-elements/plan.js +95 -0
- package/dist/components/ai-elements/prompt-input.d.ts +153 -0
- package/dist/components/ai-elements/prompt-input.js +939 -0
- package/dist/components/ai-elements/queue.d.ts +65 -0
- package/dist/components/ai-elements/queue.js +179 -0
- package/dist/components/ai-elements/reasoning.d.ts +30 -0
- package/dist/components/ai-elements/reasoning.js +161 -0
- package/dist/components/ai-elements/response.d.ts +9 -0
- package/dist/components/ai-elements/response.js +33 -0
- package/dist/components/ai-elements/sandbox.d.ts +28 -0
- package/dist/components/ai-elements/sandbox.js +98 -0
- package/dist/components/ai-elements/schema-display.d.ts +58 -0
- package/dist/components/ai-elements/schema-display.js +313 -0
- package/dist/components/ai-elements/shimmer.d.ts +14 -0
- package/dist/components/ai-elements/shimmer.js +1 -0
- package/dist/components/ai-elements/snippet.d.ts +22 -0
- package/dist/components/ai-elements/snippet.js +90 -0
- package/dist/components/ai-elements/sources.d.ts +16 -0
- package/dist/components/ai-elements/sources.js +62 -0
- package/dist/components/ai-elements/speech-input.d.ts +57 -0
- package/dist/components/ai-elements/speech-input.js +206 -0
- package/dist/components/ai-elements/stack-trace.d.ts +42 -0
- package/dist/components/ai-elements/stack-trace.js +377 -0
- package/dist/components/ai-elements/suggestion.d.ts +14 -0
- package/dist/components/ai-elements/suggestion.js +41 -0
- package/dist/components/ai-elements/task.d.ts +18 -0
- package/dist/components/ai-elements/task.js +60 -0
- package/dist/components/ai-elements/terminal.d.ts +31 -0
- package/dist/components/ai-elements/terminal.js +203 -0
- package/dist/components/ai-elements/test-results.d.ts +61 -0
- package/dist/components/ai-elements/test-results.js +349 -0
- package/dist/components/ai-elements/tool.d.ts +35 -0
- package/dist/components/ai-elements/tool.js +2 -0
- package/dist/components/ai-elements/toolbar.d.ts +8 -0
- package/dist/components/ai-elements/toolbar.js +18 -0
- package/dist/components/ai-elements/transcription.d.ts +19 -0
- package/dist/components/ai-elements/transcription.js +90 -0
- package/dist/components/ai-elements/voice-selector.d.ts +66 -0
- package/dist/components/ai-elements/voice-selector.js +332 -0
- package/dist/components/ai-elements/web-preview.d.ts +38 -0
- package/dist/components/ai-elements/web-preview.js +214 -0
- package/dist/components/info-card.d.ts +14 -0
- package/dist/components/info-card.js +1 -0
- package/dist/components/responsive-alert-dialog.d.ts +19 -0
- package/dist/components/responsive-alert-dialog.js +1 -0
- package/dist/components/responsive-dialog.d.ts +14 -0
- package/dist/components/responsive-dialog.js +1 -0
- package/dist/config-IcWUmjwj.d.ts +239 -0
- package/dist/features/chat/chat-card.d.ts +5 -0
- package/dist/features/chat/chat-card.js +14 -0
- package/dist/features/chat/chat-element/chat-element.d.ts +8 -0
- package/dist/features/chat/chat-element/chat-element.js +14 -0
- package/dist/features/chat/chat-element/use-chat.d.ts +21 -0
- package/dist/features/chat/chat-element/use-chat.js +14 -0
- package/dist/features/chat/chat-element/use-initial-messages.d.ts +20 -0
- package/dist/features/chat/chat-element/use-initial-messages.js +14 -0
- package/dist/features/chat/chat-header/chat-header.d.ts +8 -0
- package/dist/features/chat/chat-header/chat-header.js +14 -0
- package/dist/features/chat/chat-header/chat-menu.d.ts +5 -0
- package/dist/features/chat/chat-header/chat-menu.js +2 -0
- package/dist/features/chat/chat-history/chat-history-empty.d.ts +5 -0
- package/dist/features/chat/chat-history/chat-history-empty.js +1 -0
- package/dist/features/chat/chat-history/chat-history.d.ts +5 -0
- package/dist/features/chat/chat-history/chat-history.js +14 -0
- package/dist/features/chat/chat-message.d.ts +10 -0
- package/dist/features/chat/chat-message.js +1 -0
- package/dist/features/chat/chat-molecule.d.ts +35 -0
- package/dist/features/chat/chat-molecule.js +14 -0
- package/dist/features/chat/chat-prompt-input.d.ts +16 -0
- package/dist/features/chat/chat-prompt-input.js +14 -0
- package/dist/features/chat/chat.context.d.ts +26 -0
- package/dist/features/chat/chat.context.js +13 -0
- package/dist/features/chat/index.d.ts +14 -0
- package/dist/features/chat/index.js +14 -0
- package/dist/features/chat/queries/query-keys.d.ts +8 -0
- package/dist/features/chat/queries/query-keys.js +1 -0
- package/dist/features/chat/queries/use-create-conversation-mutation.d.ts +29 -0
- package/dist/features/chat/queries/use-create-conversation-mutation.js +38 -0
- package/dist/features/chat/queries/use-get-chat-query.d.ts +9 -0
- package/dist/features/chat/queries/use-get-chat-query.js +14 -0
- package/dist/features/chat/queries/use-get-conversation-query.d.ts +62 -0
- package/dist/features/chat/queries/use-get-conversation-query.js +14 -0
- package/dist/features/chat/queries/use-list-conversations-query.d.ts +29 -0
- package/dist/features/chat/queries/use-list-conversations-query.js +14 -0
- package/dist/features/chat/store.d.ts +13 -0
- package/dist/features/chat/store.js +1 -0
- package/dist/features/chat/utils.d.ts +5 -0
- package/dist/features/chat/utils.js +1 -0
- package/dist/features/data-fetching/use-api-client.d.ts +5 -0
- package/dist/features/data-fetching/use-api-client.js +14 -0
- package/dist/features/logger/logger.d.ts +9 -0
- package/dist/features/logger/logger.js +1 -0
- package/dist/features/molecule/chatsdk-provider.d.ts +19 -0
- package/dist/features/molecule/chatsdk-provider.js +26 -0
- package/dist/features/molecule/constants.d.ts +3 -0
- package/dist/features/molecule/constants.js +1 -0
- package/dist/features/molecule/molecule-provider.d.ts +39 -0
- package/dist/features/molecule/molecule-provider.js +1 -0
- package/dist/features/molecule/store.d.ts +53 -0
- package/dist/features/molecule/store.js +3 -0
- package/dist/features/molecule/types/api.d.ts +8 -0
- package/dist/features/molecule/types/api.js +1 -0
- package/dist/features/molecule/types/callbacks.d.ts +22 -0
- package/dist/features/molecule/types/callbacks.js +1 -0
- package/dist/features/molecule/types/config.d.ts +10 -0
- package/dist/features/molecule/types/config.js +1 -0
- package/dist/features/molecule/types/context.d.ts +11 -0
- package/dist/features/molecule/types/context.js +1 -0
- package/dist/features/molecule/types/locale.d.ts +9 -0
- package/dist/features/molecule/types/locale.js +1 -0
- package/dist/features/molecule/types/theme.d.ts +38 -0
- package/dist/features/molecule/types/theme.js +1 -0
- package/dist/features/molecule/types/translations.d.ts +10 -0
- package/dist/features/molecule/types/translations.js +1 -0
- package/dist/features/molecule/use-merge-global-config.d.ts +22 -0
- package/dist/features/molecule/use-merge-global-config.js +5 -0
- package/dist/features/molecule/use-molecule-config.d.ts +41 -0
- package/dist/features/molecule/use-molecule-config.js +6 -0
- package/dist/features/molecule/utils.d.ts +10 -0
- package/dist/features/molecule/utils.js +1 -0
- package/dist/i18n/config.d.ts +61 -0
- package/dist/i18n/config.js +1 -0
- package/dist/i18n/i18next.d.ts +11 -0
- package/dist/i18n/i18next.js +2 -0
- package/dist/i18n/utils.d.ts +11 -0
- package/dist/i18n/utils.js +6 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +20 -0
- package/dist/styles.css +6811 -0
- package/package.json +123 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Alert, AlertDescription } from '@chatsdk-dev/ui/components/alert';
|
|
3
|
+
import { Button } from '@chatsdk-dev/ui/components/button';
|
|
4
|
+
import { ToolUIPart } from 'ai';
|
|
5
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
6
|
+
|
|
7
|
+
type ToolUIPartApproval = {
|
|
8
|
+
id: string;
|
|
9
|
+
approved?: never;
|
|
10
|
+
reason?: never;
|
|
11
|
+
} | {
|
|
12
|
+
id: string;
|
|
13
|
+
approved: boolean;
|
|
14
|
+
reason?: string;
|
|
15
|
+
} | {
|
|
16
|
+
id: string;
|
|
17
|
+
approved: true;
|
|
18
|
+
reason?: string;
|
|
19
|
+
} | {
|
|
20
|
+
id: string;
|
|
21
|
+
approved: true;
|
|
22
|
+
reason?: string;
|
|
23
|
+
} | {
|
|
24
|
+
id: string;
|
|
25
|
+
approved: false;
|
|
26
|
+
reason?: string;
|
|
27
|
+
} | undefined;
|
|
28
|
+
type ConfirmationProps = ComponentProps<typeof Alert> & {
|
|
29
|
+
approval?: ToolUIPartApproval;
|
|
30
|
+
state: ToolUIPart["state"];
|
|
31
|
+
};
|
|
32
|
+
declare const Confirmation: ({ className, approval, state, ...props }: ConfirmationProps) => react_jsx_runtime.JSX.Element | null;
|
|
33
|
+
type ConfirmationTitleProps = ComponentProps<typeof AlertDescription>;
|
|
34
|
+
declare const ConfirmationTitle: ({ className, ...props }: ConfirmationTitleProps) => react_jsx_runtime.JSX.Element;
|
|
35
|
+
interface ConfirmationRequestProps {
|
|
36
|
+
children?: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
declare const ConfirmationRequest: ({ children }: ConfirmationRequestProps) => ReactNode;
|
|
39
|
+
interface ConfirmationAcceptedProps {
|
|
40
|
+
children?: ReactNode;
|
|
41
|
+
}
|
|
42
|
+
declare const ConfirmationAccepted: ({ children, }: ConfirmationAcceptedProps) => ReactNode;
|
|
43
|
+
interface ConfirmationRejectedProps {
|
|
44
|
+
children?: ReactNode;
|
|
45
|
+
}
|
|
46
|
+
declare const ConfirmationRejected: ({ children, }: ConfirmationRejectedProps) => ReactNode;
|
|
47
|
+
type ConfirmationActionsProps = ComponentProps<"div">;
|
|
48
|
+
declare const ConfirmationActions: ({ className, ...props }: ConfirmationActionsProps) => react_jsx_runtime.JSX.Element | null;
|
|
49
|
+
type ConfirmationActionProps = ComponentProps<typeof Button>;
|
|
50
|
+
declare const ConfirmationAction: (props: ConfirmationActionProps) => react_jsx_runtime.JSX.Element;
|
|
51
|
+
|
|
52
|
+
export { Confirmation, ConfirmationAccepted, type ConfirmationAcceptedProps, ConfirmationAction, type ConfirmationActionProps, ConfirmationActions, type ConfirmationActionsProps, type ConfirmationProps, ConfirmationRejected, type ConfirmationRejectedProps, ConfirmationRequest, type ConfirmationRequestProps, ConfirmationTitle, type ConfirmationTitleProps };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Alert, AlertDescription } from '@chatsdk-dev/ui/components/alert';
|
|
2
|
+
import { Button } from '@chatsdk-dev/ui/components/button';
|
|
3
|
+
import { cn } from '@chatsdk-dev/ui/lib/utils';
|
|
4
|
+
import { createContext, useMemo, useContext } from 'react';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var ConfirmationContext = createContext(
|
|
8
|
+
null
|
|
9
|
+
);
|
|
10
|
+
var useConfirmation = () => {
|
|
11
|
+
const context = useContext(ConfirmationContext);
|
|
12
|
+
if (!context) {
|
|
13
|
+
throw new Error("Confirmation components must be used within Confirmation");
|
|
14
|
+
}
|
|
15
|
+
return context;
|
|
16
|
+
};
|
|
17
|
+
var Confirmation = ({
|
|
18
|
+
className,
|
|
19
|
+
approval,
|
|
20
|
+
state,
|
|
21
|
+
...props
|
|
22
|
+
}) => {
|
|
23
|
+
const contextValue = useMemo(() => ({ approval, state }), [approval, state]);
|
|
24
|
+
if (!approval || state === "input-streaming" || state === "input-available") {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
return /* @__PURE__ */ jsx(ConfirmationContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(Alert, { className: cn("flex flex-col gap-2", className), ...props }) });
|
|
28
|
+
};
|
|
29
|
+
var ConfirmationTitle = ({
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
}) => /* @__PURE__ */ jsx(AlertDescription, { className: cn("inline", className), ...props });
|
|
33
|
+
var ConfirmationRequest = ({ children }) => {
|
|
34
|
+
const { state } = useConfirmation();
|
|
35
|
+
if (state !== "approval-requested") {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
return children;
|
|
39
|
+
};
|
|
40
|
+
var ConfirmationAccepted = ({
|
|
41
|
+
children
|
|
42
|
+
}) => {
|
|
43
|
+
const { approval, state } = useConfirmation();
|
|
44
|
+
if (!approval?.approved || state !== "approval-responded" && state !== "output-denied" && state !== "output-available") {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
return children;
|
|
48
|
+
};
|
|
49
|
+
var ConfirmationRejected = ({
|
|
50
|
+
children
|
|
51
|
+
}) => {
|
|
52
|
+
const { approval, state } = useConfirmation();
|
|
53
|
+
if (approval?.approved !== false || state !== "approval-responded" && state !== "output-denied" && state !== "output-available") {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
return children;
|
|
57
|
+
};
|
|
58
|
+
var ConfirmationActions = ({
|
|
59
|
+
className,
|
|
60
|
+
...props
|
|
61
|
+
}) => {
|
|
62
|
+
const { state } = useConfirmation();
|
|
63
|
+
if (state !== "approval-requested") {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
return /* @__PURE__ */ jsx(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: cn("flex items-center justify-end gap-2 self-end", className),
|
|
70
|
+
...props
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
var ConfirmationAction = (props) => /* @__PURE__ */ jsx(Button, { className: "h-8 px-3 text-sm", type: "button", ...props });
|
|
75
|
+
|
|
76
|
+
export { Confirmation, ConfirmationAccepted, ConfirmationAction, ConfirmationActions, ConfirmationRejected, ConfirmationRequest, ConfirmationTitle };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
// src/components/ai-elements/connection.tsx
|
|
4
|
+
var HALF = 0.5;
|
|
5
|
+
var Connection = ({
|
|
6
|
+
fromX,
|
|
7
|
+
fromY,
|
|
8
|
+
toX,
|
|
9
|
+
toY
|
|
10
|
+
}) => /* @__PURE__ */ jsxs("g", { children: [
|
|
11
|
+
/* @__PURE__ */ jsx(
|
|
12
|
+
"path",
|
|
13
|
+
{
|
|
14
|
+
className: "animated",
|
|
15
|
+
d: `M${fromX},${fromY} C ${fromX + (toX - fromX) * HALF},${fromY} ${fromX + (toX - fromX) * HALF},${toY} ${toX},${toY}`,
|
|
16
|
+
fill: "none",
|
|
17
|
+
stroke: "var(--color-ring)",
|
|
18
|
+
strokeWidth: 1
|
|
19
|
+
}
|
|
20
|
+
),
|
|
21
|
+
/* @__PURE__ */ jsx(
|
|
22
|
+
"circle",
|
|
23
|
+
{
|
|
24
|
+
cx: toX,
|
|
25
|
+
cy: toY,
|
|
26
|
+
fill: "#fff",
|
|
27
|
+
r: 3,
|
|
28
|
+
stroke: "var(--color-ring)",
|
|
29
|
+
strokeWidth: 1
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
] });
|
|
33
|
+
|
|
34
|
+
export { Connection };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import { Button } from '@chatsdk-dev/ui/components/button';
|
|
5
|
+
import { HoverCard, HoverCardContent } from '@chatsdk-dev/ui/components/hover-card';
|
|
6
|
+
import { LanguageModelUsage } from 'ai';
|
|
7
|
+
|
|
8
|
+
type ModelId = string;
|
|
9
|
+
interface ContextSchema {
|
|
10
|
+
usedTokens: number;
|
|
11
|
+
maxTokens: number;
|
|
12
|
+
usage?: LanguageModelUsage;
|
|
13
|
+
modelId?: ModelId;
|
|
14
|
+
}
|
|
15
|
+
type ContextProps = ComponentProps<typeof HoverCard> & ContextSchema;
|
|
16
|
+
declare const Context: ({ usedTokens, maxTokens, usage, modelId, ...props }: ContextProps) => react_jsx_runtime.JSX.Element;
|
|
17
|
+
type ContextTriggerProps = ComponentProps<typeof Button>;
|
|
18
|
+
declare const ContextTrigger: ({ children, ...props }: ContextTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
19
|
+
type ContextContentProps = ComponentProps<typeof HoverCardContent>;
|
|
20
|
+
declare const ContextContent: ({ className, ...props }: ContextContentProps) => react_jsx_runtime.JSX.Element;
|
|
21
|
+
type ContextContentHeaderProps = ComponentProps<"div">;
|
|
22
|
+
declare const ContextContentHeader: ({ children, className, ...props }: ContextContentHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
23
|
+
type ContextContentBodyProps = ComponentProps<"div">;
|
|
24
|
+
declare const ContextContentBody: ({ children, className, ...props }: ContextContentBodyProps) => react_jsx_runtime.JSX.Element;
|
|
25
|
+
type ContextContentFooterProps = ComponentProps<"div">;
|
|
26
|
+
declare const ContextContentFooter: ({ children, className, ...props }: ContextContentFooterProps) => react_jsx_runtime.JSX.Element;
|
|
27
|
+
type ContextInputUsageProps = ComponentProps<"div">;
|
|
28
|
+
declare const ContextInputUsage: ({ className, children, ...props }: ContextInputUsageProps) => string | number | bigint | true | react_jsx_runtime.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | null;
|
|
29
|
+
type ContextOutputUsageProps = ComponentProps<"div">;
|
|
30
|
+
declare const ContextOutputUsage: ({ className, children, ...props }: ContextOutputUsageProps) => string | number | bigint | true | react_jsx_runtime.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | null;
|
|
31
|
+
type ContextReasoningUsageProps = ComponentProps<"div">;
|
|
32
|
+
declare const ContextReasoningUsage: ({ className, children, ...props }: ContextReasoningUsageProps) => string | number | bigint | true | react_jsx_runtime.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | null;
|
|
33
|
+
type ContextCacheUsageProps = ComponentProps<"div">;
|
|
34
|
+
declare const ContextCacheUsage: ({ className, children, ...props }: ContextCacheUsageProps) => string | number | bigint | true | react_jsx_runtime.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | null;
|
|
35
|
+
|
|
36
|
+
export { Context, ContextCacheUsage, type ContextCacheUsageProps, ContextContent, ContextContentBody, type ContextContentBodyProps, ContextContentFooter, type ContextContentFooterProps, ContextContentHeader, type ContextContentHeaderProps, type ContextContentProps, ContextInputUsage, type ContextInputUsageProps, ContextOutputUsage, type ContextOutputUsageProps, type ContextProps, ContextReasoningUsage, type ContextReasoningUsageProps, ContextTrigger, type ContextTriggerProps };
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
import { Button } from '@chatsdk-dev/ui/components/button';
|
|
2
|
+
import { HoverCard, HoverCardTrigger, HoverCardContent } from '@chatsdk-dev/ui/components/hover-card';
|
|
3
|
+
import { Progress } from '@chatsdk-dev/ui/components/progress';
|
|
4
|
+
import { cn } from '@chatsdk-dev/ui/lib/utils';
|
|
5
|
+
import { createContext, useMemo, useContext } from 'react';
|
|
6
|
+
import { getUsage } from 'tokenlens';
|
|
7
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var PERCENT_MAX = 100;
|
|
10
|
+
var ICON_RADIUS = 10;
|
|
11
|
+
var ICON_VIEWBOX = 24;
|
|
12
|
+
var ICON_CENTER = 12;
|
|
13
|
+
var ICON_STROKE_WIDTH = 2;
|
|
14
|
+
var ContextContext = createContext(null);
|
|
15
|
+
var useContextValue = () => {
|
|
16
|
+
const context = useContext(ContextContext);
|
|
17
|
+
if (!context) {
|
|
18
|
+
throw new Error("Context components must be used within Context");
|
|
19
|
+
}
|
|
20
|
+
return context;
|
|
21
|
+
};
|
|
22
|
+
var Context = ({
|
|
23
|
+
usedTokens,
|
|
24
|
+
maxTokens,
|
|
25
|
+
usage,
|
|
26
|
+
modelId,
|
|
27
|
+
...props
|
|
28
|
+
}) => {
|
|
29
|
+
const contextValue = useMemo(
|
|
30
|
+
() => ({ maxTokens, modelId, usage, usedTokens }),
|
|
31
|
+
[maxTokens, modelId, usage, usedTokens]
|
|
32
|
+
);
|
|
33
|
+
return /* @__PURE__ */ jsx(ContextContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(HoverCard, { ...props }) });
|
|
34
|
+
};
|
|
35
|
+
var ContextIcon = () => {
|
|
36
|
+
const { usedTokens, maxTokens } = useContextValue();
|
|
37
|
+
const circumference = 2 * Math.PI * ICON_RADIUS;
|
|
38
|
+
const usedPercent = usedTokens / maxTokens;
|
|
39
|
+
const dashOffset = circumference * (1 - usedPercent);
|
|
40
|
+
return /* @__PURE__ */ jsxs(
|
|
41
|
+
"svg",
|
|
42
|
+
{
|
|
43
|
+
"aria-label": "Model context usage",
|
|
44
|
+
height: "20",
|
|
45
|
+
role: "img",
|
|
46
|
+
style: { color: "currentcolor" },
|
|
47
|
+
viewBox: `0 0 ${ICON_VIEWBOX} ${ICON_VIEWBOX}`,
|
|
48
|
+
width: "20",
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ jsx(
|
|
51
|
+
"circle",
|
|
52
|
+
{
|
|
53
|
+
cx: ICON_CENTER,
|
|
54
|
+
cy: ICON_CENTER,
|
|
55
|
+
fill: "none",
|
|
56
|
+
opacity: "0.25",
|
|
57
|
+
r: ICON_RADIUS,
|
|
58
|
+
stroke: "currentColor",
|
|
59
|
+
strokeWidth: ICON_STROKE_WIDTH
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
"circle",
|
|
64
|
+
{
|
|
65
|
+
cx: ICON_CENTER,
|
|
66
|
+
cy: ICON_CENTER,
|
|
67
|
+
fill: "none",
|
|
68
|
+
opacity: "0.7",
|
|
69
|
+
r: ICON_RADIUS,
|
|
70
|
+
stroke: "currentColor",
|
|
71
|
+
strokeDasharray: `${circumference} ${circumference}`,
|
|
72
|
+
strokeDashoffset: dashOffset,
|
|
73
|
+
strokeLinecap: "round",
|
|
74
|
+
strokeWidth: ICON_STROKE_WIDTH,
|
|
75
|
+
style: { transform: "rotate(-90deg)", transformOrigin: "center" }
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
var ContextTrigger = ({ children, ...props }) => {
|
|
83
|
+
const { usedTokens, maxTokens } = useContextValue();
|
|
84
|
+
const usedPercent = usedTokens / maxTokens;
|
|
85
|
+
const renderedPercent = new Intl.NumberFormat("en-US", {
|
|
86
|
+
maximumFractionDigits: 1,
|
|
87
|
+
style: "percent"
|
|
88
|
+
}).format(usedPercent);
|
|
89
|
+
return /* @__PURE__ */ jsx(
|
|
90
|
+
HoverCardTrigger,
|
|
91
|
+
{
|
|
92
|
+
render: () => children ? /* @__PURE__ */ jsx(Fragment, { children }) : /* @__PURE__ */ jsxs(Button, { type: "button", variant: "ghost", ...props, children: [
|
|
93
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-muted-foreground", children: renderedPercent }),
|
|
94
|
+
/* @__PURE__ */ jsx(ContextIcon, {})
|
|
95
|
+
] })
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
};
|
|
99
|
+
var ContextContent = ({
|
|
100
|
+
className,
|
|
101
|
+
...props
|
|
102
|
+
}) => /* @__PURE__ */ jsx(
|
|
103
|
+
HoverCardContent,
|
|
104
|
+
{
|
|
105
|
+
className: cn("min-w-60 divide-y overflow-hidden p-0", className),
|
|
106
|
+
...props
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
var ContextContentHeader = ({
|
|
110
|
+
children,
|
|
111
|
+
className,
|
|
112
|
+
...props
|
|
113
|
+
}) => {
|
|
114
|
+
const { usedTokens, maxTokens } = useContextValue();
|
|
115
|
+
const usedPercent = usedTokens / maxTokens;
|
|
116
|
+
const displayPct = new Intl.NumberFormat("en-US", {
|
|
117
|
+
maximumFractionDigits: 1,
|
|
118
|
+
style: "percent"
|
|
119
|
+
}).format(usedPercent);
|
|
120
|
+
const used = new Intl.NumberFormat("en-US", {
|
|
121
|
+
notation: "compact"
|
|
122
|
+
}).format(usedTokens);
|
|
123
|
+
const total = new Intl.NumberFormat("en-US", {
|
|
124
|
+
notation: "compact"
|
|
125
|
+
}).format(maxTokens);
|
|
126
|
+
return /* @__PURE__ */ jsx("div", { className: cn("w-full space-y-2 p-3", className), ...props, children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
127
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 text-xs", children: [
|
|
128
|
+
/* @__PURE__ */ jsx("p", { children: displayPct }),
|
|
129
|
+
/* @__PURE__ */ jsxs("p", { className: "font-mono text-muted-foreground", children: [
|
|
130
|
+
used,
|
|
131
|
+
" / ",
|
|
132
|
+
total
|
|
133
|
+
] })
|
|
134
|
+
] }),
|
|
135
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-2", children: /* @__PURE__ */ jsx(Progress, { className: "bg-muted", value: usedPercent * PERCENT_MAX }) })
|
|
136
|
+
] }) });
|
|
137
|
+
};
|
|
138
|
+
var ContextContentBody = ({
|
|
139
|
+
children,
|
|
140
|
+
className,
|
|
141
|
+
...props
|
|
142
|
+
}) => /* @__PURE__ */ jsx("div", { className: cn("w-full p-3", className), ...props, children });
|
|
143
|
+
var ContextContentFooter = ({
|
|
144
|
+
children,
|
|
145
|
+
className,
|
|
146
|
+
...props
|
|
147
|
+
}) => {
|
|
148
|
+
const { modelId, usage } = useContextValue();
|
|
149
|
+
const costUSD = modelId ? getUsage({
|
|
150
|
+
modelId,
|
|
151
|
+
usage: {
|
|
152
|
+
input: usage?.inputTokens ?? 0,
|
|
153
|
+
output: usage?.outputTokens ?? 0
|
|
154
|
+
}
|
|
155
|
+
}).costUSD?.totalUSD : void 0;
|
|
156
|
+
const totalCost = new Intl.NumberFormat("en-US", {
|
|
157
|
+
currency: "USD",
|
|
158
|
+
style: "currency"
|
|
159
|
+
}).format(costUSD ?? 0);
|
|
160
|
+
return /* @__PURE__ */ jsx(
|
|
161
|
+
"div",
|
|
162
|
+
{
|
|
163
|
+
className: cn(
|
|
164
|
+
"flex w-full items-center justify-between gap-3 bg-secondary p-3 text-xs",
|
|
165
|
+
className
|
|
166
|
+
),
|
|
167
|
+
...props,
|
|
168
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
169
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Total cost" }),
|
|
170
|
+
/* @__PURE__ */ jsx("span", { children: totalCost })
|
|
171
|
+
] })
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
};
|
|
175
|
+
var TokensWithCost = ({
|
|
176
|
+
tokens,
|
|
177
|
+
costText
|
|
178
|
+
}) => /* @__PURE__ */ jsxs("span", { children: [
|
|
179
|
+
tokens === void 0 ? "\u2014" : new Intl.NumberFormat("en-US", {
|
|
180
|
+
notation: "compact"
|
|
181
|
+
}).format(tokens),
|
|
182
|
+
costText ? /* @__PURE__ */ jsxs("span", { className: "ml-2 text-muted-foreground", children: [
|
|
183
|
+
"\u2022 ",
|
|
184
|
+
costText
|
|
185
|
+
] }) : null
|
|
186
|
+
] });
|
|
187
|
+
var ContextInputUsage = ({
|
|
188
|
+
className,
|
|
189
|
+
children,
|
|
190
|
+
...props
|
|
191
|
+
}) => {
|
|
192
|
+
const { usage, modelId } = useContextValue();
|
|
193
|
+
const inputTokens = usage?.inputTokens ?? 0;
|
|
194
|
+
if (children) {
|
|
195
|
+
return children;
|
|
196
|
+
}
|
|
197
|
+
if (!inputTokens) {
|
|
198
|
+
return null;
|
|
199
|
+
}
|
|
200
|
+
const inputCost = modelId ? getUsage({
|
|
201
|
+
modelId,
|
|
202
|
+
usage: { input: inputTokens, output: 0 }
|
|
203
|
+
}).costUSD?.totalUSD : void 0;
|
|
204
|
+
const inputCostText = new Intl.NumberFormat("en-US", {
|
|
205
|
+
currency: "USD",
|
|
206
|
+
style: "currency"
|
|
207
|
+
}).format(inputCost ?? 0);
|
|
208
|
+
return /* @__PURE__ */ jsxs(
|
|
209
|
+
"div",
|
|
210
|
+
{
|
|
211
|
+
className: cn("flex items-center justify-between text-xs", className),
|
|
212
|
+
...props,
|
|
213
|
+
children: [
|
|
214
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Input" }),
|
|
215
|
+
/* @__PURE__ */ jsx(TokensWithCost, { costText: inputCostText, tokens: inputTokens })
|
|
216
|
+
]
|
|
217
|
+
}
|
|
218
|
+
);
|
|
219
|
+
};
|
|
220
|
+
var ContextOutputUsage = ({
|
|
221
|
+
className,
|
|
222
|
+
children,
|
|
223
|
+
...props
|
|
224
|
+
}) => {
|
|
225
|
+
const { usage, modelId } = useContextValue();
|
|
226
|
+
const outputTokens = usage?.outputTokens ?? 0;
|
|
227
|
+
if (children) {
|
|
228
|
+
return children;
|
|
229
|
+
}
|
|
230
|
+
if (!outputTokens) {
|
|
231
|
+
return null;
|
|
232
|
+
}
|
|
233
|
+
const outputCost = modelId ? getUsage({
|
|
234
|
+
modelId,
|
|
235
|
+
usage: { input: 0, output: outputTokens }
|
|
236
|
+
}).costUSD?.totalUSD : void 0;
|
|
237
|
+
const outputCostText = new Intl.NumberFormat("en-US", {
|
|
238
|
+
currency: "USD",
|
|
239
|
+
style: "currency"
|
|
240
|
+
}).format(outputCost ?? 0);
|
|
241
|
+
return /* @__PURE__ */ jsxs(
|
|
242
|
+
"div",
|
|
243
|
+
{
|
|
244
|
+
className: cn("flex items-center justify-between text-xs", className),
|
|
245
|
+
...props,
|
|
246
|
+
children: [
|
|
247
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Output" }),
|
|
248
|
+
/* @__PURE__ */ jsx(TokensWithCost, { costText: outputCostText, tokens: outputTokens })
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
);
|
|
252
|
+
};
|
|
253
|
+
var ContextReasoningUsage = ({
|
|
254
|
+
className,
|
|
255
|
+
children,
|
|
256
|
+
...props
|
|
257
|
+
}) => {
|
|
258
|
+
const { usage, modelId } = useContextValue();
|
|
259
|
+
const reasoningTokens = usage?.reasoningTokens ?? 0;
|
|
260
|
+
if (children) {
|
|
261
|
+
return children;
|
|
262
|
+
}
|
|
263
|
+
if (!reasoningTokens) {
|
|
264
|
+
return null;
|
|
265
|
+
}
|
|
266
|
+
const reasoningCost = modelId ? getUsage({
|
|
267
|
+
modelId,
|
|
268
|
+
usage: { reasoningTokens }
|
|
269
|
+
}).costUSD?.totalUSD : void 0;
|
|
270
|
+
const reasoningCostText = new Intl.NumberFormat("en-US", {
|
|
271
|
+
currency: "USD",
|
|
272
|
+
style: "currency"
|
|
273
|
+
}).format(reasoningCost ?? 0);
|
|
274
|
+
return /* @__PURE__ */ jsxs(
|
|
275
|
+
"div",
|
|
276
|
+
{
|
|
277
|
+
className: cn("flex items-center justify-between text-xs", className),
|
|
278
|
+
...props,
|
|
279
|
+
children: [
|
|
280
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Reasoning" }),
|
|
281
|
+
/* @__PURE__ */ jsx(TokensWithCost, { costText: reasoningCostText, tokens: reasoningTokens })
|
|
282
|
+
]
|
|
283
|
+
}
|
|
284
|
+
);
|
|
285
|
+
};
|
|
286
|
+
var ContextCacheUsage = ({
|
|
287
|
+
className,
|
|
288
|
+
children,
|
|
289
|
+
...props
|
|
290
|
+
}) => {
|
|
291
|
+
const { usage, modelId } = useContextValue();
|
|
292
|
+
const cacheTokens = usage?.cachedInputTokens ?? 0;
|
|
293
|
+
if (children) {
|
|
294
|
+
return children;
|
|
295
|
+
}
|
|
296
|
+
if (!cacheTokens) {
|
|
297
|
+
return null;
|
|
298
|
+
}
|
|
299
|
+
const cacheCost = modelId ? getUsage({
|
|
300
|
+
modelId,
|
|
301
|
+
usage: { cacheReads: cacheTokens, input: 0, output: 0 }
|
|
302
|
+
}).costUSD?.totalUSD : void 0;
|
|
303
|
+
const cacheCostText = new Intl.NumberFormat("en-US", {
|
|
304
|
+
currency: "USD",
|
|
305
|
+
style: "currency"
|
|
306
|
+
}).format(cacheCost ?? 0);
|
|
307
|
+
return /* @__PURE__ */ jsxs(
|
|
308
|
+
"div",
|
|
309
|
+
{
|
|
310
|
+
className: cn("flex items-center justify-between text-xs", className),
|
|
311
|
+
...props,
|
|
312
|
+
children: [
|
|
313
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Cache" }),
|
|
314
|
+
/* @__PURE__ */ jsx(TokensWithCost, { costText: cacheCostText, tokens: cacheTokens })
|
|
315
|
+
]
|
|
316
|
+
}
|
|
317
|
+
);
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
export { Context, ContextCacheUsage, ContextContent, ContextContentBody, ContextContentFooter, ContextContentHeader, ContextInputUsage, ContextOutputUsage, ContextReasoningUsage, ContextTrigger };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Controls as Controls$1 } from '@xyflow/react';
|
|
3
|
+
import { ComponentProps } from 'react';
|
|
4
|
+
|
|
5
|
+
type ControlsProps = ComponentProps<typeof Controls$1>;
|
|
6
|
+
declare const Controls: ({ className, ...props }: ControlsProps) => react_jsx_runtime.JSX.Element;
|
|
7
|
+
|
|
8
|
+
export { Controls, type ControlsProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cn } from '@chatsdk-dev/ui/lib/utils';
|
|
2
|
+
import { Controls as Controls$1 } from '@xyflow/react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var Controls = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
6
|
+
Controls$1,
|
|
7
|
+
{
|
|
8
|
+
className: cn(
|
|
9
|
+
"gap-px overflow-hidden rounded-md border bg-card p-1 shadow-none!",
|
|
10
|
+
"[&>button]:rounded-md [&>button]:border-none! [&>button]:bg-transparent! [&>button]:hover:bg-secondary!",
|
|
11
|
+
className
|
|
12
|
+
),
|
|
13
|
+
...props
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
export { Controls };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Button } from '@chatsdk-dev/ui/components/button';
|
|
3
|
+
import { UIMessage } from 'ai';
|
|
4
|
+
import { ComponentProps } from 'react';
|
|
5
|
+
import { StickToBottom } from 'use-stick-to-bottom';
|
|
6
|
+
|
|
7
|
+
type ConversationProps = ComponentProps<typeof StickToBottom>;
|
|
8
|
+
declare const Conversation: ({ className, ...props }: ConversationProps) => react_jsx_runtime.JSX.Element;
|
|
9
|
+
type ConversationContentProps = ComponentProps<typeof StickToBottom.Content>;
|
|
10
|
+
declare const ConversationContent: ({ className, ...props }: ConversationContentProps) => react_jsx_runtime.JSX.Element;
|
|
11
|
+
type ConversationEmptyStateProps = ComponentProps<"div"> & {
|
|
12
|
+
title?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
icon?: React.ReactNode;
|
|
15
|
+
};
|
|
16
|
+
declare const ConversationEmptyState: ({ className, title, description, icon, children, ...props }: ConversationEmptyStateProps) => react_jsx_runtime.JSX.Element;
|
|
17
|
+
type ConversationScrollButtonProps = ComponentProps<typeof Button>;
|
|
18
|
+
declare const ConversationScrollButton: ({ className, ...props }: ConversationScrollButtonProps) => false | react_jsx_runtime.JSX.Element;
|
|
19
|
+
type ConversationDownloadProps = Omit<ComponentProps<typeof Button>, "onClick"> & {
|
|
20
|
+
messages: UIMessage[];
|
|
21
|
+
filename?: string;
|
|
22
|
+
formatMessage?: (message: UIMessage, index: number) => string;
|
|
23
|
+
};
|
|
24
|
+
declare const messagesToMarkdown: (messages: UIMessage[], formatMessage?: (message: UIMessage, index: number) => string) => string;
|
|
25
|
+
declare const ConversationDownload: ({ messages, filename, formatMessage, className, children, ...props }: ConversationDownloadProps) => react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
export { Conversation, ConversationContent, type ConversationContentProps, ConversationDownload, type ConversationDownloadProps, ConversationEmptyState, type ConversationEmptyStateProps, type ConversationProps, ConversationScrollButton, type ConversationScrollButtonProps, messagesToMarkdown };
|