debug: add logging to handleGenerate

This commit is contained in:
SysVis AI 2025-12-28 21:04:31 +07:00
parent 51c60c3c00
commit a9c903dc29

View file

@ -66,6 +66,8 @@ export function ImageUpload() {
}, [handleFile]); }, [handleFile]);
const handleGenerate = useCallback(async () => { const handleGenerate = useCallback(async () => {
console.log('handleGenerate called', { aiMode, preview: !!preview, svgContent: !!svgContent, isLoading });
// Validate AI configuration before processing // Validate AI configuration before processing
if (aiMode === 'offline') { if (aiMode === 'offline') {
if (!ollamaUrl) { if (!ollamaUrl) {
@ -86,6 +88,7 @@ export function ImageUpload() {
// No external configuration needed - models run in browser // No external configuration needed - models run in browser
} }
console.log('Validation passed, starting processing...');
setLoading(true); setLoading(true);
setError(null); setError(null);