import { AgentChatHome, markAgentChatHomeHandoff, } from "@agent-native/core/client/agent-chat"; import { useT } from "@agent-native/core/client/i18n"; import { useEffect } from "react"; import { LocalCodebasePicker } from "@/components/plan/LocalCodebasePicker"; import { schedulePlanRoutePrewarm } from "@/lib/route-prewarm"; export function PlanChatPage() { const t = useT(); useEffect(() => { function handleChatRunning(event: Event) { const detail = (event as CustomEvent).detail; if (detail?.isRunning === true) markAgentChatHomeHandoff("plans"); } const cancelRoutePrewarm = schedulePlanRoutePrewarm(); window.addEventListener("agentNative.chatRunning", handleChatRunning); return () => { cancelRoutePrewarm(); window.removeEventListener("agentNative.chatRunning", handleChatRunning); }; }, []); return (

{t("chat.heading")}

{t("chat.description")}

} /> ); }