diff --git a/ui/admin/app/components/agent/AgentForm.tsx b/ui/admin/app/components/agent/AgentForm.tsx index 8387a16c..d9ad593e 100644 --- a/ui/admin/app/components/agent/AgentForm.tsx +++ b/ui/admin/app/components/agent/AgentForm.tsx @@ -60,17 +60,19 @@ export function AgentForm({ agent, onSubmit, onChange }: AgentFormProps) {
diff --git a/ui/admin/app/components/agent/PastThreads.tsx b/ui/admin/app/components/agent/PastThreads.tsx index 83ac6772..e960c76a 100644 --- a/ui/admin/app/components/agent/PastThreads.tsx +++ b/ui/admin/app/components/agent/PastThreads.tsx @@ -5,6 +5,7 @@ import useSWR from "swr"; import { Thread } from "~/lib/model/threads"; import { ThreadsService } from "~/lib/service/api/threadsService"; +import { TypographyP } from "~/components/Typography"; import { LoadingSpinner } from "~/components/ui/LoadingSpinner"; import { Button } from "~/components/ui/button"; import { @@ -20,8 +21,12 @@ import { PopoverContent, PopoverTrigger, } from "~/components/ui/popover"; - -import { TypographyH4, TypographyP } from "../Typography"; +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "~/components/ui/tooltip"; interface PastThreadsProps { agentId: string; @@ -55,55 +60,64 @@ export const PastThreads: React.FC = ({ }; return ( - - - - - - - - - No threads found. - {isLoading ? ( -
- -
- ) : error ? ( -
- Failed to load threads -
- ) : threads && threads.length > 0 ? ( - - {threads.map((thread: Thread) => ( - - handleThreadSelect(thread.id) - } - className="cursor-pointer" - > -
- - Thread - - {thread.id} - - - - {new Date( - thread.created - ).toLocaleString()} - -
-
- ))} -
- ) : null} -
-
-
-
+ + + + + + + + + Switch threads + + + + + No threads found. + {isLoading ? ( +
+ +
+ ) : error ? ( +
+ Failed to load threads +
+ ) : threads && threads.length > 0 ? ( + + {threads.map((thread: Thread) => ( + + handleThreadSelect( + thread.id + ) + } + className="cursor-pointer" + > +
+ + Thread + + {thread.id} + + + + {new Date( + thread.created + ).toLocaleString()} + +
+
+ ))} +
+ ) : null} +
+
+
+
+
+
); }; diff --git a/ui/admin/app/components/ui/input.tsx b/ui/admin/app/components/ui/input.tsx index 4db24b77..2612d11e 100644 --- a/ui/admin/app/components/ui/input.tsx +++ b/ui/admin/app/components/ui/input.tsx @@ -1,18 +1,33 @@ +import { type VariantProps, cva } from "class-variance-authority"; import * as React from "react"; import { cn } from "~/lib/utils"; -export type InputProps = React.InputHTMLAttributes; +const inputVariants = cva( + "flex h-9 w-full rounded-md px-3 bg-transparent border border-input text-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50", + { + variants: { + variant: { + default: "", + ghost: "shadow-none cursor-pointer hover:border-primary px-0 mb-0 font-bold outline-none border-transparent focus:border-primary", + }, + }, + defaultVariants: { + variant: "default", + }, + } +); + +export interface InputProps + extends React.InputHTMLAttributes, + VariantProps {} const Input = React.forwardRef( - ({ className, type, ...props }, ref) => { + ({ className, variant, type, ...props }, ref) => { return ( @@ -21,4 +36,4 @@ const Input = React.forwardRef( ); Input.displayName = "Input"; -export { Input }; +export { Input, inputVariants }; diff --git a/ui/admin/app/routes/_auth.agents.$agent.tsx b/ui/admin/app/routes/_auth.agents.$agent.tsx index 9dcb5ca4..63d959f4 100644 --- a/ui/admin/app/routes/_auth.agents.$agent.tsx +++ b/ui/admin/app/routes/_auth.agents.$agent.tsx @@ -6,7 +6,6 @@ import { } from "@remix-run/react"; import { useCallback } from "react"; import { $params, $path } from "remix-routes"; -import { z } from "zod"; import { AgentService } from "~/lib/service/api/agentService"; import { QueryParamSchemas } from "~/lib/service/routeQueryParams";