diff --git a/src/app/(dashboard)/chats/page.tsx b/src/app/(dashboard)/chats/page.tsx index e647e45..bfc2e1c 100644 --- a/src/app/(dashboard)/chats/page.tsx +++ b/src/app/(dashboard)/chats/page.tsx @@ -182,6 +182,7 @@ export default function ChatsPage() { const blobUrlsRef = useRef([]) const conversationOrderRef = useRef([]) const pollTimerRef = useRef | null>(null) + const [isCallModalOpen, setIsCallModalOpen] = useState(false) const socketRef = useRef(null) const isDeletingRef = useRef(false) diff --git a/src/app/api/ai/chat/route.ts b/src/app/api/ai/chat/route.ts deleted file mode 100644 index 839e5cb..0000000 --- a/src/app/api/ai/chat/route.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { NextRequest, NextResponse } from "next/server" -import { getSessionUser } from "@/lib/auth" -import { chatWithAI } from "@/lib/ai" - -export async function POST(request: NextRequest) { - try { - const user = await getSessionUser() - if (!user) return NextResponse.json({ error: "Unauthorized" }, { status: 401 }) - - if (!["sales", "admin", "super_admin"].includes(user.role)) { - return NextResponse.json({ error: "Forbidden" }, { status: 403 }) - } - - const { message } = await request.json() - if (!message || typeof message !== "string") { - return NextResponse.json({ error: "Message is required" }, { status: 400 }) - } - - // Forward the JWT from the session cookie to the Rust backend - const sessionCookie = request.cookies.get("session")?.value - if (!sessionCookie) return NextResponse.json({ error: "No session" }, { status: 401 }) - - const response = await chatWithAI(message, sessionCookie) - - return NextResponse.json({ response }) - } catch (error) { - console.error("AI chat error:", error) - return NextResponse.json({ error: "AI service unavailable" }, { status: 503 }) - } -} diff --git a/src/components/layout/crm-icon.tsx b/src/components/layout/crm-icon.tsx index bd71d62..a218cfb 100644 --- a/src/components/layout/crm-icon.tsx +++ b/src/components/layout/crm-icon.tsx @@ -8,17 +8,17 @@ export function CrmIcon() { viewBox="0 0 64 64" aria-hidden="true" > - + - + - + diff --git a/src/components/shared/captain-america-shield.tsx b/src/components/shared/captain-america-shield.tsx index 9d682ab..5776e67 100644 --- a/src/components/shared/captain-america-shield.tsx +++ b/src/components/shared/captain-america-shield.tsx @@ -13,7 +13,7 @@ export function CaptainAmericaShield() { - + @@ -24,7 +24,7 @@ export function CaptainAmericaShield() { points="50,95 5,60 5,30 50,5 95,30 95,60" fill="none" stroke="#c62828" - stroke-width="1.5" + strokeWidth="1.5" /> )