import React from 'react' import { usePlaygroundStore } from '@/store' import { useQueryState } from 'nuqs' import Link from 'next/link' const HistoryBlankStateIcon = () => ( ) const SessionBlankState = () => { const { selectedEndpoint, isEndpointActive, hasStorage } = usePlaygroundStore() const [agentId] = useQueryState('agent') const errorMessage = (() => { switch (true) { case !isEndpointActive: return 'Endpoint is not connected. Please connect the endpoint to see the history.' case !selectedEndpoint: return 'Select an endpoint to see the history.' case !agentId: return 'Select an agent to see the history.' case !hasStorage: return ( <> Connect{' '} storage {' '} to your agent to see sessions.{' '} > ) default: return 'No session records yet. Start a conversation to create one.' } })() return (
{errorMessage}