Files
MoodleGPT/src/index.ts
T
2024-02-28 19:07:19 -05:00

15 lines
398 B
TypeScript

import type Config from '@typing/config';
import { codeListener, setUpMoodleGpt } from './core/code-listener';
chrome.storage.sync.get(['moodleGPT']).then(function (storage) {
const config: Config = storage.moodleGPT;
if (!config) throw new Error('Please configure MoodleGPT into the extension');
if (config.code) {
codeListener(config);
} else {
setUpMoodleGpt(config);
}
});