-
Couldn't load subscription status.
- Fork 174
CP3108 SR AI-powered marking #3126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
EugeneOYZ1203n
wants to merge
41
commits into
master
Choose a base branch
from
eugene-grading-comment-selector
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+590
−14
Open
Changes from 16 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
be85663
Add Grading comment selector basic UI
EugeneOYZ1203n 05b449a
Connect to backend
EugeneOYZ1203n 780a269
Content changes not found but are showing up as changed
EugeneOYZ1203n 3ae34a0
Hide generate comment button if no LLM prompt
EugeneOYZ1203n b41843a
Input field for API key during Course creation
EugeneOYZ1203n 05b1a9e
Add input field for enabling LLM Grading
EugeneOYZ1203n 2d54115
Disable comment selector if llm grading not enabled
EugeneOYZ1203n 928633d
Added LLM API Key input and integration with backend
EugeneOYZ1203n 73703b1
Add to the course editing panel for llm grading and api key
EugeneOYZ1203n 730cb35
Update localStorage.ts
EugeneOYZ1203n fb4f15d
Add save chosen and final comment feature
EugeneOYZ1203n 44a583e
Add Spinner when generating comments
EugeneOYZ1203n 580644a
Update to show API Key as password field
EugeneOYZ1203n 774fc2d
Merge branch 'master' of https://github.com/source-academy/frontend i…
RichDom2185 a0512bd
Fix format
RichDom2185 b3f5ca7
Revert "Content changes not found but are showing up as changed"
RichDom2185 a91b128
Merge branch 'master' into eugene-grading-comment-selector
martin-henz 509b3a3
Merge branch 'master' into eugene-grading-comment-selector
RichDom2185 aa3bfd8
Edit frontend to load previous AI comments by default
Tkaixiang 7248aae
Moves api key, api url, llm model and course prompt to course level
Tkaixiang 27fac47
Add tooltip about formatting instructions
Tkaixiang 09376be
style
Tkaixiang 412bfd8
Add view "composed prompt" in the grading editor view
Tkaixiang 0628c81
Remove un-used 'save comments'
Tkaixiang 1226a2f
typo
Tkaixiang ce97e0d
Add copy prompt to clipboard
Tkaixiang cd04255
Fix typo
Tkaixiang 837e4ea
Fix bug preventing avengers from generating ai comments
Tkaixiang ea2095f
Merge branch 'master' of github.com:source-academy/frontend into euge…
Tkaixiang 4fe943f
Fix TS errors
Tkaixiang 9981631
Fix more TS errors!
Tkaixiang 018f16d
fix some style issues
Tkaixiang a3a7745
Merge branch 'master' into eugene-grading-comment-selector
RichDom2185 47a4ccc
Update src/pages/academy/grading/subcomponents/GradingEditor.tsx
RichDom2185 8b7859f
Update src/commons/dropdown/DropdownCreateCourse.tsx
RichDom2185 035554a
Merge branch 'master' into eugene-grading-comment-selector
RichDom2185 b2f6a8b
Work on comments
Tkaixiang 96921b9
Merge branch 'master' into eugene-grading-comment-selector
Tkaixiang d70d535
Small style fix
Tkaixiang 86b01df
Merge branch 'eugene-grading-comment-selector' of github.com:source-a…
Tkaixiang dbd04fe
Merge branch 'master' into eugene-grading-comment-selector
Tkaixiang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/pages/academy/grading/subcomponents/GradingCommentSelector.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| import { NonIdealState, Spinner } from '@blueprintjs/core'; | ||
| import React from 'react'; | ||
|
|
||
| type Props = { | ||
| comments: string[]; | ||
| isLoading: boolean; | ||
| onSelect: (comment: string) => void; | ||
| }; | ||
|
|
||
| const GradingCommentSelector: React.FC<Props> = props => { | ||
| return ( | ||
| <div className="grading-comment-selector"> | ||
| <div className="grading-comment-selector-title">Comment Suggestions:</div> | ||
|
|
||
| {props.isLoading ? ( | ||
| <NonIdealState icon={<Spinner />} /> | ||
| ) : ( | ||
| <div> | ||
| {' '} | ||
| {props.comments.map(el => { | ||
| return ( | ||
| <div | ||
| className="grading-comment-selector-item" | ||
| onClick={() => { | ||
| props.onSelect(el); | ||
| }} | ||
| > | ||
| {el} | ||
| </div> | ||
| ); | ||
| })}{' '} | ||
| </div> | ||
| )} | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default GradingCommentSelector; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed? It's all done in the backend right?