File tree Expand file tree Collapse file tree 6 files changed +6
-3
lines changed Expand file tree Collapse file tree 6 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ export type SessionState = {
4040 readonly enableSourcecast ?: boolean ;
4141 readonly enableStories ?: boolean ;
4242 readonly enableLlmGrading ?: boolean ;
43+ readonly llmApiKey ?: string ;
4344 readonly sourceChapter ?: Chapter ;
4445 readonly sourceVariant ?: Variant ;
4546 readonly moduleHelpText ?: string ;
Original file line number Diff line number Diff line change @@ -296,6 +296,7 @@ const DropdownCreateCourse: React.FC<Props> = props => {
296296 >
297297 < InputGroup
298298 id = "llmApiKey"
299+ type = "password"
299300 value = { courseConfig . llmApiKey }
300301 onChange = { e =>
301302 setCourseConfig ( {
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ const AdminPanel: React.FC = () => {
6666 enableStories : session . enableStories ,
6767 enableLlmGrading : session . enableLlmGrading ,
6868 moduleHelpText : session . moduleHelpText ,
69- llmApiKey : ''
69+ llmApiKey : session . llmApiKey
7070 } ) ;
7171 } , [
7272 session . courseName ,
Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ const CourseConfigPanel: React.FC<Props> = props => {
143143 >
144144 < InputGroup
145145 id = "llmApiKey"
146+ type = "password"
146147 defaultValue = { llmApiKey }
147148 onChange = { e =>
148149 props . setCourseConfiguration ( {
Original file line number Diff line number Diff line change @@ -305,8 +305,7 @@ const GradingWorkspace: React.FC<Props> = props => {
305305 ? [ grading ! . answers [ questionId ] . student . username ]
306306 : grading ! . answers [ questionId ] . team ! . map ( member => member . username )
307307 }
308- is_llm = { ! ! llm_grading && grading ! . answers [ questionId ] . question . type == "programming" &&
309- ! ! grading ! . answers [ questionId ] . question . llm_prompt }
308+ is_llm = { ! ! llm_grading && grading ! . answers [ questionId ] . question . type == "programming" }
310309 comments = { grading ! . answers [ questionId ] . grade . comments ?? '' }
311310 graderName = {
312311 grading ! . answers [ questionId ] . grade . grader
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ export const saveState = (state: OverallState) => {
7070 enableSourcecast : state . session . enableSourcecast ,
7171 enableStories : state . session . enableStories ,
7272 enableLlmGrading : state . session . enableLlmGrading ,
73+ llmApiKey : state . session . llmApiKey ,
7374 moduleHelpText : state . session . moduleHelpText ,
7475 assetsPrefix : state . session . assetsPrefix ,
7576 assessmentConfigurations : state . session . assessmentConfigurations ,
You can’t perform that action at this time.
0 commit comments