@@ -15,7 +15,7 @@ import SolutionDisplay from "@/components/SolutionDisplay";
1515import { CopilotKit , useCoAgent , useCopilotChat } from "@copilotkit/react-core" ;
1616import GitHubStarButtons from "@/components/StarComponent" ;
1717import Image from "next/image" ;
18- import { CopilotPopup , CopilotSidebar } from "@copilotkit/react-ui" ;
18+ import { CopilotSidebar } from "@copilotkit/react-ui" ;
1919import "@copilotkit/react-ui/styles.css" ;
2020
2121interface AgentState {
@@ -150,7 +150,7 @@ const DSASolutionInterface = () => {
150150 }
151151 } ;
152152
153- // eslint-disable-next-line @typescript-eslint/no-unused-vars
153+
154154 const { state, setState } = useCoAgent < AgentState > ( {
155155 name : "dsa_agent" ,
156156 initialState : {
@@ -176,7 +176,6 @@ const DSASolutionInterface = () => {
176176 ) ;
177177 } ;
178178
179- // Modified useEffect
180179 useEffect ( ( ) => {
181180 const newState = {
182181 question,
@@ -198,24 +197,6 @@ const DSASolutionInterface = () => {
198197 }
199198 } , [ question , testCases , timeComplexity , spaceComplexity ] ) ;
200199
201-
202-
203-
204-
205-
206-
207-
208-
209- // useEffect(() => {
210- // setState({
211- // ...state,
212- // question: question,
213- // testCases: testCases,
214- // timeComplexity: timeComplexity,
215- // spaceComplexity: spaceComplexity,
216- // });
217- // }, [question, testCases, timeComplexity, spaceComplexity]);
218-
219200 const handleRetry = ( ) => {
220201 if ( ! question . trim ( ) ) {
221202 console . error ( "Question is empty" ) ;
@@ -253,7 +234,6 @@ const DSASolutionInterface = () => {
253234 } , 100 ) ;
254235 } ;
255236
256- // Add this function to handle solution updates from chat
257237 const handleSolutionUpdate = ( content : string ) => {
258238 try {
259239 // Extract code block
@@ -311,7 +291,6 @@ const DSASolutionInterface = () => {
311291 const [ isPlaying , setIsPlaying ] = useState ( false ) ;
312292 const videoUrl = "https://vimeo.com/1044157863" ;
313293
314- // Extract Vimeo video ID from the URL and generate embeddable URL
315294 const getVimeoEmbedUrl = ( url : string ) => {
316295 const videoId = url . split ( "vimeo.com/" ) [ 1 ] ;
317296 return `https://player.vimeo.com/video/${ videoId } ` ;
@@ -336,7 +315,7 @@ const DSASolutionInterface = () => {
336315 animate = { { opacity : 1 , y : 0 } }
337316 className = "max-w-4xl mx-auto space-y-8"
338317 >
339- { /* Header */ }
318+
340319 < motion . div
341320 initial = { { scale : 0.95 , opacity : 0 } }
342321 animate = { { scale : 1 , opacity : 1 } }
0 commit comments