"use client"; import { useStream } from "@langchain/langgraph-sdk/react"; import { useParams } from "next/navigation"; import { getLangGraphClient } from "@/core/api"; import type { MessageThreadState } from "@/core/thread"; const apiClient = getLangGraphClient(); export default function TestPage() { const { thread_id: threadId } = useParams<{ thread_id: string }>(); const thread = useStream({ client: apiClient, assistantId: "lead_agent", threadId, reconnectOnMount: true, fetchStateHistory: true, }); return (
{threadId}
{thread.isLoading ? "loading" : "not loading"}
); }