diff --git a/src/commons/application/actions/__tests__/SessionActions.ts b/src/commons/application/actions/__tests__/SessionActions.ts index a2def9171e..a26136d2df 100644 --- a/src/commons/application/actions/__tests__/SessionActions.ts +++ b/src/commons/application/actions/__tests__/SessionActions.ts @@ -253,6 +253,7 @@ test('setCourseConfiguration generates correct action object', () => { sourceChapter: Chapter.SOURCE_1, sourceVariant: Variant.DEFAULT, moduleHelpText: 'Help text', + defaultLlmPrompt: 'defaul Llm Prompt', assessmentTypes: ['Missions', 'Quests', 'Paths', 'Contests', 'Others'] }; const action = setCourseConfiguration(courseConfig); @@ -656,6 +657,7 @@ test('updateCourseConfig generates correct action object', () => { sourceChapter: Chapter.SOURCE_1, sourceVariant: Variant.DEFAULT, moduleHelpText: 'Help text', + defaultLlmPrompt: 'default LLM Prompt', assessmentTypes: ['Missions', 'Quests', 'Paths', 'Contests', 'Others'] }; const action = updateCourseConfig(courseConfig); diff --git a/src/commons/application/reducers/__tests__/SessionReducer.ts b/src/commons/application/reducers/__tests__/SessionReducer.ts index bdd39ae661..efffe3a579 100644 --- a/src/commons/application/reducers/__tests__/SessionReducer.ts +++ b/src/commons/application/reducers/__tests__/SessionReducer.ts @@ -100,6 +100,7 @@ test('SET_COURSE_CONFIGURATION works correctly', () => { sourceChapter: Chapter.SOURCE_1, sourceVariant: Variant.DEFAULT, moduleHelpText: 'Help text', + defaultLlmPrompt: 'default LLM Prompt', assessmentTypes: ['Missions', 'Quests', 'Paths', 'Contests', 'Others'] }; const action = { diff --git a/src/commons/application/types/SessionTypes.ts b/src/commons/application/types/SessionTypes.ts index ac5640e725..72062d029f 100644 --- a/src/commons/application/types/SessionTypes.ts +++ b/src/commons/application/types/SessionTypes.ts @@ -99,6 +99,7 @@ export type SessionState = { readonly sourceChapter?: Chapter; readonly sourceVariant?: Variant; readonly moduleHelpText?: string; + readonly defaultLlmPrompt?: string; readonly assetsPrefix?: string; readonly assessmentConfigurations?: AssessmentConfiguration[]; @@ -164,6 +165,7 @@ export type CourseConfiguration = { sourceChapter: Chapter; sourceVariant: Variant; moduleHelpText: string; + defaultLlmPrompt: string; assetsPrefix: string; }; diff --git a/src/commons/dropdown/DropdownCreateCourse.tsx b/src/commons/dropdown/DropdownCreateCourse.tsx index 41c6fc09a6..3f9ab95636 100644 --- a/src/commons/dropdown/DropdownCreateCourse.tsx +++ b/src/commons/dropdown/DropdownCreateCourse.tsx @@ -42,7 +42,8 @@ const DropdownCreateCourse: React.FC = props => { enableStories: false, sourceChapter: Chapter.SOURCE_1, sourceVariant: Variant.DEFAULT, - moduleHelpText: '' + moduleHelpText: '', + defaultLlmPrompt: '' }); const [courseHelpTextSelectedTab, setCourseHelpTextSelectedTab] = @@ -173,6 +174,40 @@ const DropdownCreateCourse: React.FC = props => { )} + + Default LLM Prompt  + + (optional) + + + + + + {courseHelpTextSelectedTab === CourseHelpTextEditorTab.WRITE && ( +