@@ -15,7 +15,7 @@ import SolutionDisplay from "@/components/SolutionDisplay";
15
15
import { CopilotKit , useCoAgent , useCopilotChat } from "@copilotkit/react-core" ;
16
16
import GitHubStarButtons from "@/components/StarComponent" ;
17
17
import Image from "next/image" ;
18
- import { CopilotPopup , CopilotSidebar } from "@copilotkit/react-ui" ;
18
+ import { CopilotSidebar } from "@copilotkit/react-ui" ;
19
19
import "@copilotkit/react-ui/styles.css" ;
20
20
21
21
interface AgentState {
@@ -150,7 +150,7 @@ const DSASolutionInterface = () => {
150
150
}
151
151
} ;
152
152
153
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
153
+
154
154
const { state, setState } = useCoAgent < AgentState > ( {
155
155
name : "dsa_agent" ,
156
156
initialState : {
@@ -176,7 +176,6 @@ const DSASolutionInterface = () => {
176
176
) ;
177
177
} ;
178
178
179
- // Modified useEffect
180
179
useEffect ( ( ) => {
181
180
const newState = {
182
181
question,
@@ -198,24 +197,6 @@ const DSASolutionInterface = () => {
198
197
}
199
198
} , [ question , testCases , timeComplexity , spaceComplexity ] ) ;
200
199
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
-
219
200
const handleRetry = ( ) => {
220
201
if ( ! question . trim ( ) ) {
221
202
console . error ( "Question is empty" ) ;
@@ -253,7 +234,6 @@ const DSASolutionInterface = () => {
253
234
} , 100 ) ;
254
235
} ;
255
236
256
- // Add this function to handle solution updates from chat
257
237
const handleSolutionUpdate = ( content : string ) => {
258
238
try {
259
239
// Extract code block
@@ -311,7 +291,6 @@ const DSASolutionInterface = () => {
311
291
const [ isPlaying , setIsPlaying ] = useState ( false ) ;
312
292
const videoUrl = "https://vimeo.com/1044157863" ;
313
293
314
- // Extract Vimeo video ID from the URL and generate embeddable URL
315
294
const getVimeoEmbedUrl = ( url : string ) => {
316
295
const videoId = url . split ( "vimeo.com/" ) [ 1 ] ;
317
296
return `https://player.vimeo.com/video/${ videoId } ` ;
@@ -336,7 +315,7 @@ const DSASolutionInterface = () => {
336
315
animate = { { opacity : 1 , y : 0 } }
337
316
className = "max-w-4xl mx-auto space-y-8"
338
317
>
339
- { /* Header */ }
318
+
340
319
< motion . div
341
320
initial = { { scale : 0.95 , opacity : 0 } }
342
321
animate = { { scale : 1 , opacity : 1 } }
0 commit comments