diff --git a/src/routes/samples/agent/index.lazy.tsx b/src/routes/samples/agent/index.lazy.tsx index 9610e6c..0bc5e6f 100644 --- a/src/routes/samples/agent/index.lazy.tsx +++ b/src/routes/samples/agent/index.lazy.tsx @@ -10,7 +10,7 @@ import { } from "@/components/ui/number-input"; import { Box, Button, Input, Spinner, Text } from "@chakra-ui/react"; import { createLazyFileRoute } from "@tanstack/react-router"; -import { useCallback, useState } from "react"; +import { useState } from "react"; import { GoogleMapWithDirection } from "../../../components/samples/agent/GoogleMapWithDirection"; export const Route = createLazyFileRoute("/samples/agent/")({ @@ -48,6 +48,7 @@ type HashObject = { days: number; theme: string; userInterest: string; + selectedMonth: number; }; function GeminiPage() { @@ -119,11 +120,12 @@ function GeminiPage() { days: 1, theme: travelThemes[0], userInterest: "", + selectedMonth: 7, }); const [plan, setPlan] = useState(null); const [isLoading, setIsLoading] = useState(false); - const additionalPromptInput = `出発地: ${formState.departurePrefecture}, 旅行先: ${formState.destination}, 人数: ${formState.numberOfPeople}人, 日数: ${formState.days}日, テーマ: ${formState.theme}, ユーザーの興味関心: ${formState.userInterest}`; + const additionalPromptInput = `出発地: ${formState.departurePrefecture}, 旅行先: ${formState.destination}, 人数: ${formState.numberOfPeople}人, 日数: ${formState.days}日, テーマ: ${formState.theme}, 旅行希望月: ${formState.selectedMonth}月, ユーザーの興味関心: ${formState.userInterest}`; const handleClick = async () => { setIsLoading(true); @@ -198,6 +200,29 @@ function GeminiPage() { + + + ) => + setFormState({ + ...formState, + selectedMonth: Number(e.currentTarget.value), + }) + } + > + {Array.from({ length: 12 }, (_, i) => { + const month = i + 1; + return ( + + ); + })} + + +