"use client"; import { createBffAgentClient } from "@agents24/client/bff"; import { useState } from "react"; import { Agents24ChatScaffold } from "@/index"; import { useThreadQueryNavigation } from "@/use-thread-query-navigation"; import { getHostIdentity } from "@/host-identity"; export default function ChatApp() { const [client] = useState(() => createBffAgentClient({ basePath: "/api/agents24" })); const navigation = useThreadQueryNavigation(); return { if (completion.serverId !== serverId || !completion.connectionId) { throw new Error("MCP authorization did not return the expected connection."); } }} />; }