"use client" import { useState, useCallback, useEffect } from "react" import { AIChat } from "@/components/ai/ai-chat" import { JobSelector } from "@/components/ai/job-selector" import { Bot, Lightbulb, Target, MessageSquare, Wifi, WifiOff } from "lucide-react" export default function AIAssistantPage() { const [selectedJob, setSelectedJob] = useState<{ job_title: string; keywords: string[]; industry: string; description: string } | null>(null) const [aiOnline, setAiOnline] = useState(null) const handleJobSelect = useCallback((job: typeof selectedJob) => { setSelectedJob(job) }, []) useEffect(() => { let cancelled = false const check = async () => { try { const res = await fetch("/api/ai/jobs") if (!cancelled) setAiOnline(res.ok) } catch { if (!cancelled) setAiOnline(false) } } check() const id = setInterval(check, 15000) return () => { cancelled = true; clearInterval(id) } }, []) return (

AI Sales Assistant

Uncensored sales tips and strategies powered by local AI

{aiOnline === null ? "Checking..." : aiOnline ? "Connected" : "Disconnected"} {aiOnline === null ? ( ) : aiOnline ? ( ) : ( )}

Target Job

{selectedJob && (

{selectedJob.job_title}

{selectedJob.industry}

{selectedJob.description}

{selectedJob.keywords.map((kw, i) => ( {kw} ))}
)}

Tips

  • Ask for cold email templates for a specific job
  • Request objection handling tips
  • Ask for outreach strategies per industry
) }