feat: implement micro learning generation service with cached LLM content delivery and UI components
All checks were successful
On Push to Main / test (push) Successful in 32s
On Push to Main / publish (push) Successful in 1m2s
On Push to Main / deploy-dev (push) Successful in 1m32s

This commit is contained in:
RaymondVerhoef
2026-05-25 22:14:00 +02:00
parent 7164317908
commit f16438c1bc
4 changed files with 70 additions and 38 deletions

View File

@@ -1,4 +1,4 @@
import { getOrGenerateMicroLearning, regenerateMicroLearning } from '../lib/microLearningService';
import { getOrGenerateMicroLearning, regenerateMicroLearning, getExistingTypes } from '../lib/microLearningService';
export function useMicroLearnings() {
/**
@@ -16,5 +16,13 @@ export function useMicroLearnings() {
return regenerateMicroLearning(topicId, type);
};
return { getOrGenerate, regenerate };
/**
* Check which micro learning types already exist for a given topic.
* Returns { concept_explainer: true, scenario_quiz: false, ... }
*/
const checkExistingTypes = async (topicId) => {
return getExistingTypes(topicId);
};
return { getOrGenerate, regenerate, checkExistingTypes };
}