diff --git a/src/components/wrappers/dashboard/agent/agent-card/agent-card.tsx b/src/components/wrappers/dashboard/agent/agent-card/agent-card.tsx index d14f3f3e..35d45c0e 100644 --- a/src/components/wrappers/dashboard/agent/agent-card/agent-card.tsx +++ b/src/components/wrappers/dashboard/agent/agent-card/agent-card.tsx @@ -8,6 +8,8 @@ import {formatDateLastContact} from "@/utils/date-formatting"; import {AgentWith} from "@/db/schema/08_agent"; import {Activity, ChevronRight, Copy, Check, Fingerprint, Server, Database, ShieldCheck} from "lucide-react"; import {Badge} from "@/components/ui/badge"; +import {truncateWords} from "@/utils/text"; +import {useIsMobile} from "@/hooks/use-mobile"; export type agentCardProps = { data: AgentWith; @@ -15,6 +17,7 @@ export type agentCardProps = { export const AgentCard = (props: agentCardProps) => { const {data: agent} = props; + const isMobile = useIsMobile(); const [isCopied, setIsCopied] = useState(false); const handleCopy = (e: React.MouseEvent) => { @@ -38,7 +41,7 @@ export const AgentCard = (props: agentCardProps) => {

- {agent.name} + {isMobile ? truncateWords(agent.name, 2) : agent.name}

{agent.version && (