Skip to content

Commit 580644a

Browse files
Update to show API Key as password field
1 parent 44a583e commit 580644a

File tree

6 files changed

+6
-3
lines changed

6 files changed

+6
-3
lines changed

src/commons/application/types/SessionTypes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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;

src/commons/dropdown/DropdownCreateCourse.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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({

src/pages/academy/adminPanel/AdminPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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,

src/pages/academy/adminPanel/subcomponents/CourseConfigPanel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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({

src/pages/academy/grading/subcomponents/GradingWorkspace.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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

src/pages/localStorage.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)