This commit is contained in:
Jamie Brunton committed 2025-12-30 18:52:10 +00:00
1 parent 25ab750c7d
commit 5dec79838e
4 files changed
+14 -5

No files matched your search

@@ -26,6 +26,7 @@ interface AiGeneratorDialogProps {
packDescription?: string | null;
existingCategories?: string[];
existingPacks?: string[];
existingQuestions?: string[];
isExplicit?: boolean;
};
onGenerated: (result: any) => void;
@@ -71,7 +72,7 @@ export function AiGeneratorDialog({
toast.error('Pack name is required');
return;
}
const result = await generateQuestions(context.packName, count, undefined, tone, context.packDescription || undefined);
const result = await generateQuestions(context.packName, count, undefined, tone, context.packDescription || undefined, context.existingQuestions);
setGeneratedQuestions(result);
// Select all questions by default
setSelectedQuestionIndices(new Set(result.map((_, i) => i)));
@@ -1,5 +1,5 @@
import { useState, useRef, useEffect } from 'react';
import data from '@emoji-mart/data';
import * as data from '@emoji-mart/data';
import Picker from '@emoji-mart/react';
import { Button } from './button';