From 4871bb9ffdf982d13f38c2e93c22f2e43959c5c8 Mon Sep 17 00:00:00 2001 From: Arik Chakma Date: Fri, 13 Jun 2025 12:30:29 +0600 Subject: [PATCH] wip --- .../ContentGenerator/ContentGenerator.tsx | 46 ++++++++++++++++++- .../ContentGenerator/GuideOptions.tsx | 11 +++-- src/components/GenerateCourse/AICourse.tsx | 1 - .../GenerateCourse/FineTuneCourse.tsx | 16 +++++-- 4 files changed, 65 insertions(+), 9 deletions(-) diff --git a/src/components/ContentGenerator/ContentGenerator.tsx b/src/components/ContentGenerator/ContentGenerator.tsx index f10727bcc..0aff07477 100644 --- a/src/components/ContentGenerator/ContentGenerator.tsx +++ b/src/components/ContentGenerator/ContentGenerator.tsx @@ -8,6 +8,7 @@ import { import { useId, useState } from 'react'; import { FormatItem } from './FormatItem'; import { GuideOptions } from './GuideOptions'; +import { FineTuneCourse } from '../GenerateCourse/FineTuneCourse'; const allowedFormats = ['course', 'guide', 'roadmap'] as const; type AllowedFormat = (typeof allowedFormats)[number]; @@ -16,7 +17,17 @@ export function ContentGenerator() { const [title, setTitle] = useState(''); const [selectedFormat, setSelectedFormat] = useState('course'); + // guide options + const [depth, setDepth] = useState('essentials'); + + // fine-tune options + const [showFineTuneOptions, setShowFineTuneOptions] = useState(false); + const [about, setAbout] = useState(''); + const [goal, setGoal] = useState(''); + const [customInstructions, setCustomInstructions] = useState(''); + const titleFieldId = useId(); + const fineTuneOptionsId = useId(); const allowedFormats: { label: string; @@ -78,7 +89,40 @@ export function ContentGenerator() { })} - + + {selectedFormat === 'guide' && ( + + )} + + {selectedFormat !== 'roadmap' && ( + <> +
+ setShowFineTuneOptions(e.target.checked)} + /> + +
+ + {showFineTuneOptions && ( + + )} + + )} +