diff --git a/client/src/components/chat.tsx b/client/src/components/chat.tsx index 3e131f2e791..b54521de539 100644 --- a/client/src/components/chat.tsx +++ b/client/src/components/chat.tsx @@ -21,6 +21,7 @@ import { useToast } from "@/hooks/use-toast"; import AIWriter from "react-aiwriter"; import { IAttachment } from "@/types"; import { AudioRecorder } from "./audio-recorder"; +import { Badge } from "./ui/badge"; interface ExtraContentFields { user: string; @@ -233,19 +234,32 @@ export default function Page({ agentId }: { agentId: UUID }) { /> ) : null} - - {message?.createdAt ? ( - - ) : null} +
+ {message?.source ? ( + + {message.source} + + ) : null} + {message?.action ? ( + + {message.action} + + ) : null} + {message?.createdAt ? ( + + ) : null} +
diff --git a/client/src/components/connection-status.tsx b/client/src/components/connection-status.tsx index df71f8cf4a5..57aca41bd2c 100644 --- a/client/src/components/connection-status.tsx +++ b/client/src/components/connection-status.tsx @@ -54,7 +54,7 @@ export default function ConnectionStatus() { ])} > {isLoading - ? "Loading..." + ? "Connecting..." : connected ? "Connected" : "Disconnected"} diff --git a/client/src/components/ui/badge.tsx b/client/src/components/ui/badge.tsx new file mode 100644 index 00000000000..d9a4dd51bdb --- /dev/null +++ b/client/src/components/ui/badge.tsx @@ -0,0 +1,36 @@ +import * as React from "react" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const badgeVariants = cva( + "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", + { + variants: { + variant: { + default: + "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80", + secondary: + "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80", + destructive: + "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80", + outline: "text-foreground", + }, + }, + defaultVariants: { + variant: "default", + }, + } +) + +export interface BadgeProps + extends React.HTMLAttributes, + VariantProps {} + +function Badge({ className, variant, ...props }: BadgeProps) { + return ( +
+ ) +} + +export { Badge, badgeVariants } diff --git a/client/src/components/ui/chat/chat-tts-button.tsx b/client/src/components/ui/chat/chat-tts-button.tsx index 7a842ae20dc..c90c8bd963a 100644 --- a/client/src/components/ui/chat/chat-tts-button.tsx +++ b/client/src/components/ui/chat/chat-tts-button.tsx @@ -105,7 +105,7 @@ export default function ChatTtsButton({ -

Read aloud

+

{playing ? "Stop" : "Read aloud"}

diff --git a/client/src/routes/home.tsx b/client/src/routes/home.tsx index 29f83ddae09..387b733d901 100644 --- a/client/src/routes/home.tsx +++ b/client/src/routes/home.tsx @@ -26,7 +26,7 @@ export default function Home() { return (
-
+
{agents?.map((agent: { id: UUID; name: string }) => (