import { motion } from "framer-motion"; import { useTranslation } from "next-i18next"; import type { KeyboardEvent, RefObject } from "react"; import { useState } from "react"; import { FaCog, FaPlay, FaStar } from "react-icons/fa"; import { useAgentStore } from "../../stores"; import type { Message } from "../../types/message"; import AppTitle from "../AppTitle"; import Button from "../Button"; import ExampleAgents from "../console/ExampleAgents"; import { ToolsDialog } from "../dialog/ToolsDialog"; import Globe from "../Globe"; import Input from "../Input"; type LandingProps = { messages: Message[]; disableStartAgent: boolean; handlePlay: () => void; handleKeyPress: (e: KeyboardEvent) => void; goalInputRef: RefObject; goalInput: string; setGoalInput: (string) => void; setShowSignInDialog: (boolean) => void; setAgentRun: (newName: string, newGoal: string) => void; }; const Landing = (props: LandingProps) => { const [showToolsDialog, setShowToolsDialog] = useState(false); const { t } = useTranslation("indexPage"); const agent = useAgentStore.use.agent(); return ( <>
{`${t("LABEL_AGENT_GOAL")}`} } disabled={agent != null} value={props.goalInput} onChange={(e) => props.setGoalInput(e.target.value)} onKeyDown={props.handleKeyPress} placeholder={`${t("PLACEHOLDER_AGENT_GOAL")}`} type="textarea" />
); }; export default Landing;