Commit 7bad56b
CP3108 SR AI-powered marking (#3126)
* Add Grading comment selector basic UI
* Connect to backend
* Content changes not found but are showing up as changed
* Hide generate comment button if no LLM prompt
* Input field for API key during Course creation
* Add input field for enabling LLM Grading
* Disable comment selector if llm grading not enabled
* Added LLM API Key input and integration with backend
* Add to the course editing panel for llm grading and api key
* Update localStorage.ts
Fix redux state not saving issue
* Add save chosen and final comment feature
Comment selector can now handle selecting multiple suggestions
* Add Spinner when generating comments
* Update to show API Key as password field
* Fix format
* Revert "Content changes not found but are showing up as changed"
This reverts commit 780a269.
* Edit frontend to load previous AI comments by default
* Moves api key, api url, llm model and course prompt to course level
* Add tooltip about formatting instructions
* style
* Add view "composed prompt" in the grading editor view
* Remove un-used 'save comments'
* typo
* Add copy prompt to clipboard
* Fix typo
* Fix bug preventing avengers from generating ai comments
* Fix TS errors
* Fix more TS errors!
* fix some style issues
* Update src/pages/academy/grading/subcomponents/GradingEditor.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/commons/dropdown/DropdownCreateCourse.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Work on comments
* Small style fix
* Abstract styles to scss modules
* Remove llmApiKey from any kind of storage on FE
* Re-format ai_comments to reference answer_id instead
* Merge all prompts into :prompts
---------
Co-authored-by: tkaixiang <tkaixiang@gmail.com>1 parent b8bd3ca commit 7bad56b
File tree
20 files changed
+607
-80
lines changed- src
- commons
- application
- actions/__tests__
- reducers/__tests__
- types
- assessment
- dropdown
- mocks
- sagas
- features/grading
- pages
- academy
- adminPanel
- subcomponents
- grading/subcomponents
- styles
20 files changed
+607
-80
lines changedLines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
| 608 | + | |
| 609 | + | |
608 | 610 | | |
609 | 611 | | |
610 | 612 | | |
| |||
620 | 622 | | |
621 | 623 | | |
622 | 624 | | |
623 | | - | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
624 | 628 | | |
625 | 629 | | |
| 630 | + | |
626 | 631 | | |
627 | 632 | | |
628 | 633 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| 405 | + | |
405 | 406 | | |
406 | 407 | | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
407 | 412 | | |
408 | 413 | | |
409 | 414 | | |
| |||
430 | 435 | | |
431 | 436 | | |
432 | 437 | | |
| 438 | + | |
433 | 439 | | |
434 | 440 | | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
435 | 445 | | |
436 | 446 | | |
437 | 447 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
| |||
109 | 113 | | |
110 | 114 | | |
111 | 115 | | |
| 116 | + | |
112 | 117 | | |
113 | 118 | | |
114 | 119 | | |
| |||
117 | 122 | | |
118 | 123 | | |
119 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
120 | 128 | | |
121 | 129 | | |
122 | 130 | | |
| |||
128 | 136 | | |
129 | 137 | | |
130 | 138 | | |
131 | | - | |
| 139 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
146 | 151 | | |
147 | 152 | | |
148 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | | - | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
222 | 224 | | |
223 | 225 | | |
224 | 226 | | |
225 | | - | |
| 227 | + | |
| 228 | + | |
226 | 229 | | |
227 | 230 | | |
228 | 231 | | |
| |||
234 | 237 | | |
235 | 238 | | |
236 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
237 | 252 | | |
238 | 253 | | |
239 | 254 | | |
| |||
273 | 288 | | |
274 | 289 | | |
275 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
276 | 309 | | |
277 | 310 | | |
278 | 311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
347 | 351 | | |
348 | 352 | | |
349 | 353 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
| |||
244 | 248 | | |
245 | 249 | | |
246 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
247 | 255 | | |
248 | 256 | | |
249 | 257 | | |
| |||
336 | 344 | | |
337 | 345 | | |
338 | 346 | | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
339 | 351 | | |
340 | 352 | | |
341 | 353 | | |
| |||
434 | 446 | | |
435 | 447 | | |
436 | 448 | | |
437 | | - | |
| 449 | + | |
| 450 | + | |
438 | 451 | | |
439 | 452 | | |
440 | 453 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
640 | | - | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
641 | 645 | | |
642 | 646 | | |
643 | 647 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1030 | 1030 | | |
1031 | 1031 | | |
1032 | 1032 | | |
1033 | | - | |
| 1033 | + | |
1034 | 1034 | | |
| 1035 | + | |
1035 | 1036 | | |
1036 | 1037 | | |
1037 | 1038 | | |
| |||
1054 | 1055 | | |
1055 | 1056 | | |
1056 | 1057 | | |
1057 | | - | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
1058 | 1061 | | |
1059 | 1062 | | |
1060 | 1063 | | |
| |||
1064 | 1067 | | |
1065 | 1068 | | |
1066 | 1069 | | |
1067 | | - | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
1068 | 1075 | | |
1069 | 1076 | | |
1070 | 1077 | | |
| |||
1548 | 1555 | | |
1549 | 1556 | | |
1550 | 1557 | | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
1551 | 1588 | | |
1552 | 1589 | | |
1553 | 1590 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| |||
168 | 170 | | |
169 | 171 | | |
170 | 172 | | |
| 173 | + | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
| |||
189 | 192 | | |
190 | 193 | | |
191 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
192 | 199 | | |
193 | 200 | | |
194 | 201 | | |
| |||
0 commit comments