File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -61,11 +61,11 @@ export default function CollabRoom({ roomId }: { roomId: string }) {
61
61
{ loading ? (
62
62
< LoadingScreen />
63
63
) : (
64
- < QuestionDisplay question = { question } />
64
+ < QuestionDisplay question = { question } />
65
65
) }
66
- < Chat roomId = { roomId } question = { question } code = { code } />
66
+ < Chat roomId = { roomId } question = { question } code = { code } />
67
67
</ div >
68
- < CodeEditor roomId = { roomId } setCode = { setCode } />
68
+ < CodeEditor roomId = { roomId } setCode = { setCode } />
69
69
</ div >
70
70
</ div >
71
71
) ;
Original file line number Diff line number Diff line change @@ -16,8 +16,11 @@ const difficultyColors = {
16
16
Hard : "bg-red-500" ,
17
17
} ;
18
18
19
- export default function QuestionDisplay ( { question } : { question : Question | null } ) {
20
-
19
+ export default function QuestionDisplay ( {
20
+ question,
21
+ } : {
22
+ question : Question | null ;
23
+ } ) {
21
24
if ( ! question ) {
22
25
return < div > Question not found</ div > ;
23
26
}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { Message } from "@/components/collab/chat";
3
3
4
4
export const sendAiMessage = async ( messages : Message [ ] ) => {
5
5
const apiMessages = messages . map ( ( msg ) => ( {
6
- role : `${ ( msg . userId === "assistant" || msg . userId === "system" ) ? msg . userId : "user" } ` ,
6
+ role : `${ msg . userId === "assistant" || msg . userId === "system" ? msg . userId : "user" } ` ,
7
7
content : msg . text ,
8
8
} ) ) ;
9
9
const response = await fetch (
You can’t perform that action at this time.
0 commit comments