diff --git a/src/pages/[course_name]/prompt.tsx b/src/pages/[course_name]/prompt.tsx index 6b2e6c09..097ecf72 100644 --- a/src/pages/[course_name]/prompt.tsx +++ b/src/pages/[course_name]/prompt.tsx @@ -98,6 +98,7 @@ const CourseMain: NextPage = () => { ) const [baseSystemPrompt, setBaseSystemPrompt] = useState('') const [opened, { close, open }] = useDisclosure(false) + const [resetModalOpened, { close: closeResetModal, open: openResetModal }] = useDisclosure(false) const [apiKey, setApiKey] = useState(undefined) const { messages, input, handleInputChange, reload, setMessages, setInput } = useChat({ @@ -117,7 +118,7 @@ const CourseMain: NextPage = () => { const [insightsOpen, setInsightsOpen] = useState(false) const courseMetadataRef = useRef(null); - + useEffect(() => { courseMetadataRef.current = courseMetadata; }, [courseMetadata]); @@ -544,170 +545,133 @@ The final prompt you output should adhere to the following structure below. Do n shadow="xs" padding="none" radius="xl" - className="mt-[2%] w-[96%] md:w-[90%]" + className="mt-[2%] w-[96%] md:w-[90%] 2xl:w-[90%]" > - - {/* Left Section: Prompt Guidance */} +
-
- - - Customize Your System Prompt - - - {/* Collapsible Insights Section */} - +
+
+ + Prompting + + / + 40 + ? 'max-w-[120px] truncate sm:max-w-[300px] lg:max-w-[400px]' + : '' + }`} + > + {course_name} + +
+
+
+ {/* Left Section Content */} +
+
+ + + + setInsightsOpen(!insightsOpen)} > - setInsightsOpen(!insightsOpen)} > - - - - Prompt Engineering Guide - - -
- -
-
- - -
- - For additional insights and best practices on prompt creation, please review: - - } + + + - - e.stopPropagation()} - > - The Official OpenAI Prompt Engineering Guide - - - - - e.stopPropagation()} - > - The Official Anthropic Prompt Library - - - - + Prompt Engineering Guide + + +
+ +
+ + +
- The System Prompt provides the foundation for every conversation in this project. It defines the model's role, tone, and behavior. Consider including: - } > - Key instructions or examples - A warm welcome message - Helpful links for further learning + + e.stopPropagation()} + > + The Official OpenAI Prompt Engineering Guide + + + + + e.stopPropagation()} + > + The Official Anthropic Prompt Library + + + + + + The System Prompt provides the foundation for every conversation in this project. It defines the model's role, tone, and behavior. Consider including: + + } + > + Key instructions or examples + A warm welcome message + Helpful links for further learning + + - -
-
- +
+
+ -
+ + {/* SYSTEM PROMPT INPUT BOX */}
- - - System Prompt - - {isRightSideVisible ? ( - -
- - setIsRightSideVisible(!isRightSideVisible) - } - /> -
-
- ) : ( - -
- - setIsRightSideVisible(!isRightSideVisible) - } - /> -
-
- )}{' '} -
-
- handleSubmitPromptOptimization( - e, - reload, - setMessages, - ) - } +
-