"use client"; import type { ToolCallMessagePartComponent } from "@assistant-ui/react"; import { MapPinIcon, Loader2Icon } from "lucide-react"; type LocationArgs = { name: string; address?: string; lat: number; lng: number; }; type LocationResult = { success: boolean; }; export const LocationToolUI: ToolCallMessagePartComponent< LocationArgs, LocationResult > = function LocationUI({ args, status }) { if (status.type === "running" && (args.lat == null || args.lng == null)) { return (
{name}
{address && ({address}
)}