Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
Serafin-dev committed Oct 11, 2024
1 parent 6ae9151 commit 4b1eba0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions lms/static/js/edxnotes/plugins/llm_summarize.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@
annotator.subscribe('annotationEditorHidden', this.cleanupSummarize);
},
handleSummarize: function (editor, annotation) {
// if (!editor.options || !editor.options.isSummarizing) return;
if (!editor.options?.isSummarizing) return;
if (!editor.options || !editor.options.isSummarizing) return;
// if (!editor.options?.isSummarizing) return;

function toggleLoader() {
const saveButton = document.querySelector('.annotator-controls .annotator-save');
Expand All @@ -116,8 +116,8 @@
},
body: JSON.stringify({
text_to_summarize: annotation.quote,
course_id: editor.options?.llmSummarize?.courseId,
// course_id: editor.options && editor.options.llmSummarize && editor.options.llmSummarize.courseId,
// course_id: editor.options?.llmSummarize?.courseId,
course_id: editor.options && editor.options.llmSummarize && editor.options.llmSummarize.courseId,
}),
});

Expand Down
8 changes: 4 additions & 4 deletions lms/static/js/edxnotes/views/notes_factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
}
},
llmSummarize: {
// isEnabled: params && params.llmSummarize && params.llmSummarize.isEnabled,
// courseId: params && params.llmSummarize && params.llmSummarize.courseId,
isEnabled: params?.llmSummarize?.isEnabled,
courseId: params?.llmSummarize?.courseId,
isEnabled: params && params.llmSummarize && params.llmSummarize.isEnabled,
courseId: params && params.llmSummarize && params.llmSummarize.courseId,
// isEnabled: params?.llmSummarize?.isEnabled,
// courseId: params?.llmSummarize?.courseId,
},
};
};
Expand Down

0 comments on commit 4b1eba0

Please sign in to comment.