@applica-software-guru/persona-sdk 0.1.80 → 0.1.83
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/components.json +5 -2
- package/dist/bundle.cjs.js +23 -19
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.es.js +7130 -3182
- package/dist/bundle.es.js.map +1 -1
- package/dist/bundle.iife.js +23 -19
- package/dist/bundle.iife.js.map +1 -1
- package/dist/bundle.umd.js +23 -19
- package/dist/bundle.umd.js.map +1 -1
- package/package.json +10 -11
- package/playground/src/components/assistant-ui/attachment.tsx +72 -89
- package/playground/src/components/assistant-ui/markdown-text.tsx +139 -34
- package/playground/src/components/assistant-ui/thread.tsx +238 -235
- package/playground/src/components/assistant-ui/tool-fallback.tsx +79 -19
- package/playground/src/components/assistant-ui/tooltip-icon-button.tsx +35 -31
- package/playground/src/components/ui/avatar.tsx +46 -30
- package/playground/src/components/ui/button.tsx +45 -28
- package/playground/src/components/ui/dialog.tsx +13 -5
- package/playground/src/components/ui/tooltip.tsx +54 -25
- package/src/messages.ts +2 -2
|
@@ -1,29 +1,89 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { ToolCallMessagePartComponent } from "@assistant-ui/react";
|
|
2
|
+
import {
|
|
3
|
+
CheckIcon,
|
|
4
|
+
ChevronDownIcon,
|
|
5
|
+
ChevronUpIcon,
|
|
6
|
+
XCircleIcon,
|
|
7
|
+
} from "lucide-react";
|
|
8
|
+
import { useState } from "react";
|
|
9
|
+
import { Button } from "@/components/ui/button";
|
|
10
|
+
import { cn } from "@/lib/utils";
|
|
5
11
|
|
|
6
|
-
export const ToolFallback:
|
|
12
|
+
export const ToolFallback: ToolCallMessagePartComponent = ({
|
|
13
|
+
toolName,
|
|
14
|
+
argsText,
|
|
15
|
+
result,
|
|
16
|
+
status,
|
|
17
|
+
}) => {
|
|
7
18
|
const [isCollapsed, setIsCollapsed] = useState(true);
|
|
19
|
+
|
|
20
|
+
const isCancelled =
|
|
21
|
+
status?.type === "incomplete" && status.reason === "cancelled";
|
|
22
|
+
const cancelledReason =
|
|
23
|
+
isCancelled && status.error
|
|
24
|
+
? typeof status.error === "string"
|
|
25
|
+
? status.error
|
|
26
|
+
: JSON.stringify(status.error)
|
|
27
|
+
: null;
|
|
28
|
+
|
|
8
29
|
return (
|
|
9
|
-
<div
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
30
|
+
<div
|
|
31
|
+
className={cn(
|
|
32
|
+
"aui-tool-fallback-root mb-4 flex w-full flex-col gap-3 rounded-lg border py-3",
|
|
33
|
+
isCancelled && "border-muted-foreground/30 bg-muted/30",
|
|
34
|
+
)}
|
|
35
|
+
>
|
|
36
|
+
<div className="aui-tool-fallback-header flex items-center gap-2 px-4">
|
|
37
|
+
{isCancelled ? (
|
|
38
|
+
<XCircleIcon className="aui-tool-fallback-icon size-4 text-muted-foreground" />
|
|
39
|
+
) : (
|
|
40
|
+
<CheckIcon className="aui-tool-fallback-icon size-4" />
|
|
41
|
+
)}
|
|
42
|
+
<p
|
|
43
|
+
className={cn(
|
|
44
|
+
"aui-tool-fallback-title grow",
|
|
45
|
+
isCancelled && "text-muted-foreground line-through",
|
|
46
|
+
)}
|
|
47
|
+
>
|
|
48
|
+
{isCancelled ? "Cancelled tool: " : "Used tool: "}
|
|
49
|
+
<b>{toolName}</b>
|
|
14
50
|
</p>
|
|
15
|
-
<
|
|
16
|
-
|
|
51
|
+
<Button onClick={() => setIsCollapsed(!isCollapsed)}>
|
|
52
|
+
{isCollapsed ? <ChevronUpIcon /> : <ChevronDownIcon />}
|
|
53
|
+
</Button>
|
|
17
54
|
</div>
|
|
18
55
|
{!isCollapsed && (
|
|
19
|
-
<div className="flex flex-col gap-2 border-t pt-2">
|
|
20
|
-
|
|
21
|
-
<
|
|
56
|
+
<div className="aui-tool-fallback-content flex flex-col gap-2 border-t pt-2">
|
|
57
|
+
{cancelledReason && (
|
|
58
|
+
<div className="aui-tool-fallback-cancelled-root px-4">
|
|
59
|
+
<p className="aui-tool-fallback-cancelled-header font-semibold text-muted-foreground">
|
|
60
|
+
Cancelled reason:
|
|
61
|
+
</p>
|
|
62
|
+
<p className="aui-tool-fallback-cancelled-reason text-muted-foreground">
|
|
63
|
+
{cancelledReason}
|
|
64
|
+
</p>
|
|
65
|
+
</div>
|
|
66
|
+
)}
|
|
67
|
+
<div
|
|
68
|
+
className={cn(
|
|
69
|
+
"aui-tool-fallback-args-root px-4",
|
|
70
|
+
isCancelled && "opacity-60",
|
|
71
|
+
)}
|
|
72
|
+
>
|
|
73
|
+
<pre className="aui-tool-fallback-args-value whitespace-pre-wrap">
|
|
74
|
+
{argsText}
|
|
75
|
+
</pre>
|
|
22
76
|
</div>
|
|
23
|
-
{result !== undefined && (
|
|
24
|
-
<div className="border-t border-dashed px-4 pt-2">
|
|
25
|
-
<p className="font-semibold">
|
|
26
|
-
|
|
77
|
+
{!isCancelled && result !== undefined && (
|
|
78
|
+
<div className="aui-tool-fallback-result-root border-t border-dashed px-4 pt-2">
|
|
79
|
+
<p className="aui-tool-fallback-result-header font-semibold">
|
|
80
|
+
Result:
|
|
81
|
+
</p>
|
|
82
|
+
<pre className="aui-tool-fallback-result-content whitespace-pre-wrap">
|
|
83
|
+
{typeof result === "string"
|
|
84
|
+
? result
|
|
85
|
+
: JSON.stringify(result, null, 2)}
|
|
86
|
+
</pre>
|
|
27
87
|
</div>
|
|
28
88
|
)}
|
|
29
89
|
</div>
|
|
@@ -1,38 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { ComponentPropsWithRef, forwardRef } from "react";
|
|
4
|
+
import { Slottable } from "@radix-ui/react-slot";
|
|
4
5
|
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import {
|
|
7
|
+
Tooltip,
|
|
8
|
+
TooltipContent,
|
|
9
|
+
TooltipTrigger,
|
|
10
|
+
} from "@/components/ui/tooltip";
|
|
11
|
+
import { Button } from "@/components/ui/button";
|
|
12
|
+
import { cn } from "@/lib/utils";
|
|
8
13
|
|
|
9
|
-
export type TooltipIconButtonProps =
|
|
14
|
+
export type TooltipIconButtonProps = ComponentPropsWithRef<typeof Button> & {
|
|
10
15
|
tooltip: string;
|
|
11
|
-
side?:
|
|
16
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
12
17
|
};
|
|
13
18
|
|
|
14
|
-
export const TooltipIconButton = forwardRef<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
);
|
|
19
|
+
export const TooltipIconButton = forwardRef<
|
|
20
|
+
HTMLButtonElement,
|
|
21
|
+
TooltipIconButtonProps
|
|
22
|
+
>(({ children, tooltip, side = "bottom", className, ...rest }, ref) => {
|
|
23
|
+
return (
|
|
24
|
+
<Tooltip>
|
|
25
|
+
<TooltipTrigger asChild>
|
|
26
|
+
<Button
|
|
27
|
+
variant="ghost"
|
|
28
|
+
size="icon"
|
|
29
|
+
{...rest}
|
|
30
|
+
className={cn("aui-button-icon size-6 p-1", className)}
|
|
31
|
+
ref={ref}
|
|
32
|
+
>
|
|
33
|
+
<Slottable>{children}</Slottable>
|
|
34
|
+
<span className="aui-sr-only sr-only">{tooltip}</span>
|
|
35
|
+
</Button>
|
|
36
|
+
</TooltipTrigger>
|
|
37
|
+
<TooltipContent side={side}>{tooltip}</TooltipContent>
|
|
38
|
+
</Tooltip>
|
|
39
|
+
);
|
|
40
|
+
});
|
|
37
41
|
|
|
38
|
-
TooltipIconButton.displayName =
|
|
42
|
+
TooltipIconButton.displayName = "TooltipIconButton";
|
|
@@ -1,35 +1,51 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar"
|
|
2
3
|
|
|
3
|
-
import
|
|
4
|
-
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
function Avatar({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Root>) {
|
|
10
|
+
return (
|
|
11
|
+
<AvatarPrimitive.Root
|
|
12
|
+
data-slot="avatar"
|
|
13
|
+
className={cn(
|
|
14
|
+
"relative flex size-8 shrink-0 overflow-hidden rounded-full",
|
|
15
|
+
className
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
7
21
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
function AvatarImage({
|
|
23
|
+
className,
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Image>) {
|
|
26
|
+
return (
|
|
27
|
+
<AvatarPrimitive.Image
|
|
28
|
+
data-slot="avatar-image"
|
|
29
|
+
className={cn("aspect-square size-full", className)}
|
|
30
|
+
{...props}
|
|
31
|
+
/>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
14
34
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
35
|
+
function AvatarFallback({
|
|
36
|
+
className,
|
|
37
|
+
...props
|
|
38
|
+
}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
|
|
39
|
+
return (
|
|
40
|
+
<AvatarPrimitive.Fallback
|
|
41
|
+
data-slot="avatar-fallback"
|
|
42
|
+
className={cn(
|
|
43
|
+
"bg-muted flex size-full items-center justify-center rounded-full",
|
|
44
|
+
className
|
|
45
|
+
)}
|
|
46
|
+
{...props}
|
|
47
|
+
/>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
22
50
|
|
|
23
|
-
|
|
24
|
-
React.ElementRef<typeof AvatarPrimitive.Fallback>,
|
|
25
|
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
|
|
26
|
-
>(({ className, ...props }, ref) => (
|
|
27
|
-
<AvatarPrimitive.Fallback
|
|
28
|
-
ref={ref}
|
|
29
|
-
className={cn('flex h-full w-full items-center justify-center rounded-full bg-muted', className)}
|
|
30
|
-
{...props}
|
|
31
|
-
/>
|
|
32
|
-
));
|
|
33
|
-
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
34
|
-
|
|
35
|
-
export { Avatar, AvatarImage, AvatarFallback };
|
|
51
|
+
export { Avatar, AvatarImage, AvatarFallback }
|
|
@@ -1,43 +1,60 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { Slot } from
|
|
3
|
-
import { cva, type VariantProps } from
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot"
|
|
3
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
4
|
|
|
5
|
-
import { cn } from
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
6
|
|
|
7
7
|
const buttonVariants = cva(
|
|
8
|
-
|
|
8
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
|
-
default:
|
|
13
|
-
destructive:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
13
|
+
destructive:
|
|
14
|
+
"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
15
|
+
outline:
|
|
16
|
+
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
17
|
+
secondary:
|
|
18
|
+
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
19
|
+
ghost:
|
|
20
|
+
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
21
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
18
22
|
},
|
|
19
23
|
size: {
|
|
20
|
-
default:
|
|
21
|
-
sm:
|
|
22
|
-
lg:
|
|
23
|
-
icon:
|
|
24
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
25
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
26
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
27
|
+
icon: "size-9",
|
|
28
|
+
"icon-sm": "size-8",
|
|
29
|
+
"icon-lg": "size-10",
|
|
24
30
|
},
|
|
25
31
|
},
|
|
26
32
|
defaultVariants: {
|
|
27
|
-
variant:
|
|
28
|
-
size:
|
|
33
|
+
variant: "default",
|
|
34
|
+
size: "default",
|
|
29
35
|
},
|
|
30
|
-
}
|
|
31
|
-
)
|
|
36
|
+
}
|
|
37
|
+
)
|
|
32
38
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
function Button({
|
|
40
|
+
className,
|
|
41
|
+
variant,
|
|
42
|
+
size,
|
|
43
|
+
asChild = false,
|
|
44
|
+
...props
|
|
45
|
+
}: React.ComponentProps<"button"> &
|
|
46
|
+
VariantProps<typeof buttonVariants> & {
|
|
47
|
+
asChild?: boolean
|
|
48
|
+
}) {
|
|
49
|
+
const Comp = asChild ? Slot : "button"
|
|
36
50
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
})
|
|
41
|
-
|
|
51
|
+
return (
|
|
52
|
+
<Comp
|
|
53
|
+
data-slot="button"
|
|
54
|
+
className={cn(buttonVariants({ variant, size, className }))}
|
|
55
|
+
{...props}
|
|
56
|
+
/>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
42
59
|
|
|
43
|
-
export { Button, buttonVariants }
|
|
60
|
+
export { Button, buttonVariants }
|
|
@@ -47,8 +47,11 @@ function DialogOverlay({
|
|
|
47
47
|
function DialogContent({
|
|
48
48
|
className,
|
|
49
49
|
children,
|
|
50
|
+
showCloseButton = true,
|
|
50
51
|
...props
|
|
51
|
-
}: React.ComponentProps<typeof DialogPrimitive.Content>
|
|
52
|
+
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
53
|
+
showCloseButton?: boolean
|
|
54
|
+
}) {
|
|
52
55
|
return (
|
|
53
56
|
<DialogPortal data-slot="dialog-portal">
|
|
54
57
|
<DialogOverlay />
|
|
@@ -61,10 +64,15 @@ function DialogContent({
|
|
|
61
64
|
{...props}
|
|
62
65
|
>
|
|
63
66
|
{children}
|
|
64
|
-
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
{showCloseButton && (
|
|
68
|
+
<DialogPrimitive.Close
|
|
69
|
+
data-slot="dialog-close"
|
|
70
|
+
className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
|
|
71
|
+
>
|
|
72
|
+
<XIcon />
|
|
73
|
+
<span className="sr-only">Close</span>
|
|
74
|
+
</DialogPrimitive.Close>
|
|
75
|
+
)}
|
|
68
76
|
</DialogPrimitive.Content>
|
|
69
77
|
</DialogPortal>
|
|
70
78
|
)
|
|
@@ -1,32 +1,61 @@
|
|
|
1
|
-
|
|
1
|
+
"use client"
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as TooltipPrimitive from
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip"
|
|
5
5
|
|
|
6
|
-
import { cn } from
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function TooltipProvider({
|
|
9
|
+
delayDuration = 0,
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
|
|
12
|
+
return (
|
|
13
|
+
<TooltipPrimitive.Provider
|
|
14
|
+
data-slot="tooltip-provider"
|
|
15
|
+
delayDuration={delayDuration}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
9
20
|
|
|
10
|
-
|
|
21
|
+
function Tooltip({
|
|
22
|
+
...props
|
|
23
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Root>) {
|
|
24
|
+
return (
|
|
25
|
+
<TooltipProvider>
|
|
26
|
+
<TooltipPrimitive.Root data-slot="tooltip" {...props} />
|
|
27
|
+
</TooltipProvider>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
11
30
|
|
|
12
|
-
|
|
31
|
+
function TooltipTrigger({
|
|
32
|
+
...props
|
|
33
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
|
|
34
|
+
return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />
|
|
35
|
+
}
|
|
13
36
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
37
|
+
function TooltipContent({
|
|
38
|
+
className,
|
|
39
|
+
sideOffset = 0,
|
|
40
|
+
children,
|
|
41
|
+
...props
|
|
42
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Content>) {
|
|
43
|
+
return (
|
|
44
|
+
<TooltipPrimitive.Portal>
|
|
45
|
+
<TooltipPrimitive.Content
|
|
46
|
+
data-slot="tooltip-content"
|
|
47
|
+
sideOffset={sideOffset}
|
|
48
|
+
className={cn(
|
|
49
|
+
"bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
50
|
+
className
|
|
51
|
+
)}
|
|
52
|
+
{...props}
|
|
53
|
+
>
|
|
54
|
+
{children}
|
|
55
|
+
<TooltipPrimitive.Arrow className="bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
|
|
56
|
+
</TooltipPrimitive.Content>
|
|
57
|
+
</TooltipPrimitive.Portal>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
31
60
|
|
|
32
|
-
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
|
|
61
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
|
package/src/messages.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PersonaMessage } from './types';
|
|
2
|
-
import {
|
|
2
|
+
import { FileMessagePart, ThreadMessageLike } from '@assistant-ui/react';
|
|
3
3
|
|
|
4
4
|
function removeEmptyMessages(messages: PersonaMessage[]): PersonaMessage[] {
|
|
5
5
|
return messages.filter((message) => {
|
|
@@ -69,7 +69,7 @@ function convertMessage(message: PersonaMessage): ThreadMessageLike {
|
|
|
69
69
|
type: 'file',
|
|
70
70
|
data: message.file.url,
|
|
71
71
|
mimeType: message.file.contentType,
|
|
72
|
-
} as
|
|
72
|
+
} as FileMessagePart,
|
|
73
73
|
]
|
|
74
74
|
: [];
|
|
75
75
|
|